(()=>{var t={18442:(t,e,s)=>{const a=s(57147),i=s(59796);t.exports=class t{static decode(e,s){return a.readFile(e,(function(e,a){return new t(a).decode((t=>s(t)))}))}static load(e){const s=a.readFileSync(e);return new t(s)}constructor(t){let e;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){const t=this.readUInt32();let o="";for(e=0;e<4;e++)o+=String.fromCharCode(this.data[this.pos++]);switch(o){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(t);break;case"IDAT":for(e=0;e0)for(e=0;ethis.data.length)throw new Error("Incomplete or corrupt PNG file")}}read(t){const e=new Array(t);for(let s=0;s{if(e)throw e;const{width:a,height:i}=this,r=this.pixelBitlength/8,h=new Buffer(a*i*r),{length:o}=s;let n=0;function c(t,e,c,l,d=!1){const p=Math.ceil((a-t)/c),f=Math.ceil((i-e)/l),u=r*p,g=d?h:new Buffer(u*f);let b=0,w=0;for(;b(this.copyToImageData(e,s),t(e))))}}},57147:t=>{"use strict";t.exports=require("fs")},59796:t=>{"use strict";t.exports=require("zlib")}},e={},s=function s(a){var i=e[a];if(void 0!==i)return i.exports;var r=e[a]={exports:{}};return t[a](r,r.exports,s),r.exports}(18442);module.exports=s})(); //# sourceMappingURL=png-js.js.map