@minimax-ai/code 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/CHANGELOG.zh-CN.md +11 -0
- package/README.zh-CN.md +7 -0
- package/chunks/{auth-command-PAXVNVRT.js → auth-command-RALSSOBM.js} +1 -1
- package/chunks/{chunk-TJQSYP6F.js → chunk-H6PMSAEU.js} +1 -1
- package/chunks/{chunk-2V3P6YKN.js → chunk-HOQXGGPN.js} +1 -1
- package/chunks/{chunk-DKH4PMKZ.js → chunk-I2LCYMGW.js} +1 -1
- package/chunks/{chunk-KUDSBDBH.js → chunk-OCFW7RRF.js} +58 -58
- package/chunks/{chunk-AMSXOG5J.js → chunk-TNWAAYEI.js} +1 -1
- package/chunks/{chunk-OS45FJAT.js → chunk-U3QRH3KH.js} +1 -1
- package/chunks/{chunk-G5SJVXKS.js → chunk-X3H6BQVR.js} +1 -1
- package/chunks/chunk-YDWWGAEN.js +2 -0
- package/chunks/{chunk-A3JEH4SG.js → chunk-ZOTCLOIA.js} +1 -1
- package/chunks/{data-dir-CJUCEEM2.js → data-dir-LAVNS5CI.js} +1 -1
- package/chunks/{dist-EFT2FGDY.js → dist-2NNKON6X.js} +1 -1
- package/chunks/{launcher-XGHNFCFW.js → launcher-ZFRO5N7B.js} +106 -106
- package/chunks/{lifecycle-BA3J6UBY.js → lifecycle-KKL4N2ZX.js} +1 -1
- package/chunks/{main-FKSBI7QW.js → main-6ZNVM4CH.js} +2 -2
- package/chunks/{plugin-command-M6TDCJC3.js → plugin-command-U5CBRSLA.js} +1 -1
- package/chunks/{provider-command-JYXYMJQE.js → provider-command-TAABOR2G.js} +1 -1
- package/chunks/{run-acp-command-D6MFAHK5.js → run-acp-command-HOW4TLUX.js} +2 -2
- package/chunks/{run-exec-command-DOIM2GGA.js → run-exec-command-I4PI5FOJ.js} +1 -1
- package/cli.js +2 -2
- package/package.json +1 -1
- package/chunks/chunk-DNVQMSFL.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
|
|
2
|
-
import{a as Bje,b as E0,c as go,d as _y,e as hy,f as C0,g as lc,h as A0,i as Th}from"./chunk-4ESEMCSG.js";import{a as Uje,b as R0,c as Fje}from"./chunk-EFVDRFCG.js";import{$ as U,$a as T8,$b as qke,$c as y0,$d as cy,$e as Ny,A as sc,Aa as bye,Ab as oke,Ac as Xi,Ad as wo,Ae as Fqe,Af as bje,B as i0,Ba as Iye,Bb as dke,Bc as Yo,Bd as q0,Be as zqe,Bf as Sh,C as Wge,Ca as o0,Cb as lke,Cc as Xt,Cd as tqe,Ce as Kqe,Cf as Ije,D as Gge,Da as Sye,Db as mke,Dc as jr,Dd as rqe,De as Vqe,Df as Sje,E as $ge,Ea as Tye,Eb as cke,Ec as qi,Ed as nqe,Ee as bh,Ef as Tje,F as L,Fa as Eye,Fb as uke,Fc as Pe,Fd as sqe,Fe as Wqe,Ff as Eje,G as Hge,Ga as d0,Gb as fke,Gc as _e,Gd as dc,Ge as Gqe,Gf as Cje,H as Xge,Ha as Cye,Hb as Nke,Hc as ct,Hd as oqe,He as $qe,Hf as Aje,I as Qge,Ia as l0,Ic as Jo,Id as dqe,Ie as Hqe,If as Rje,J as E,Ja as S8,Jb as pke,Jc as gh,Jd as lqe,Je as Xqe,Jf as Dje,K as Yge,Ka as Aye,Kb as _ke,Kc as Xd,Kd as ly,Ke as U8,Kf as xje,L as Jge,La as Rye,Lb as hke,Lc as x8,Ld as mqe,Le as Qqe,Lf as Mje,M as Zge,Ma as Dye,Mb as vke,Mc as Dke,Md as cqe,Me as Yqe,Mf as Pje,N as t0,Na as xye,Nb as _0,Nc as xke,Nd as uqe,Ne as cS,Nf as Lje,O as r0,Oa as Mye,Ob as h0,Oc as Ts,Od as fqe,Oe as Jqe,Of as G8,P as k8,Pa as Pye,Pb as kCa,Pc as Zo,Pd as Nqe,Pe as Zqe,Q as eye,Qa as Lye,Qb as rS,Qc as Mke,Qd as O8,Qe as eje,R as aye,Ra as Oye,Rb as nS,Rc as Pke,Rd as pqe,Re as aje,S as ea,Sa as Bye,Sb as qCa,Sc as Lke,Sd as _qe,Se as Ih,T as iye,Ta as Uye,Tb as zu,Tc as Oke,Td as hqe,Te as ije,U as oc,Ua as Ha,Ub as wke,Uc as w0,Ud as vqe,Ue as tje,V as oye,Va as _o,Vb as gke,Vc as oS,Vd as wqe,Ve as rje,W as dye,Wa as kr,Wb as yke,Wc as M8,Wd as j0,We as nje,X as lye,Xa as qr,Xb as sy,Xc as g0,Xd as gqe,Xe as I0,Y as mye,Ya as m0,Yb as v0,Yc as Bke,Yd as my,Ye as sje,Z as iy,Za as ry,Zb as E8,Zc as oy,Zd as yqe,Ze as S0,_ as cye,_a as Fye,_b as kke,_c as yh,_d as mS,_e as oje,a as aS,aa as uye,ab as c0,ac as jke,ad as Uke,ae as kqe,af as dje,b as yCa,ba as fye,bb as zye,bc as bke,bd as kh,be as Es,bf as Qd,c as Age,ca as Nye,cb as Fu,cc as Ct,cd as k0,ce as uy,cf as py,da as q8,db as Kye,dc as Ike,dd as qh,de as fy,df as F8,e as Rge,ea as pye,eb as u0,ec as sS,ed as Fke,ee as qqe,ef as lje,f as Dge,fa as _ye,fb as Vye,fc as Ske,fd as zke,fe as b0,ff as mje,g as Gl,ga as po,gb as ny,gc as Tke,gd as Kke,ge as jqe,gf as cje,h as w8,ha as $l,hb as f0,hc as C8,hd as Vke,he as bqe,hf as uje,i as xge,ia as Hi,ib as Wye,ic as Eke,id as Wke,ie as Iqe,if as fje,j as Mge,ja as $a,jb as Gye,jc as Kn,jd as Gke,je as B8,jf as Nje,k as ey,ka as j8,kb as $ye,kc as vh,kd as dy,ke as Sqe,kf as T0,la as hye,lb as Hye,lc as wh,ld as dS,le as Tqe,lf as z8,ma as vye,mb as Xye,mc as Cke,md as P8,me as Eqe,mf as uS,na as iS,nb as Qye,nc as Ake,nd as $ke,ne as Cqe,nf as K8,oa as wye,ob as Yye,oc as A8,od as Hke,oe as Vu,of as V8,p as Pge,pa as gye,pb as N0,pc as Rke,pd as Xke,pe as Aqe,pf as pje,qa as yye,qb as Jye,qc as Ce,qd as Qke,qe as Rqe,qf as _je,r as Uge,ra as kye,rb as Zye,rc as ee,rd as Yke,re as Hr,rf as hje,s as Fge,sa as n0,sb as eke,sc as Ku,sd as Jke,se as Dqe,sf as vje,t as zge,ta as tS,tb as ake,tc as Oe,td as lS,te as xqe,tf as wje,ua as qye,ub as ike,uc as ho,ud as Zke,ue as Mqe,uf as gje,v as e0,va as ty,vb as tke,vc as Hl,vd as jh,ve as Pqe,vf as W8,w as a0,wa as b8,wb as rke,wc as R8,wd as eqe,we as Lqe,wf as yje,x as Kge,xa as jye,xb as p0,xc as vo,xd as aqe,xe as Oqe,xf as kje,y as Vge,ya as I8,yb as nke,yc as D8,yd as iqe,ye as Bqe,yf as qje,z as Ui,za as s0,zb as ske,zc as Xl,zd as L8,ze as Uqe,zf as jje}from"./chunk-TJQSYP6F.js";import{d as Tge,e as Ege,f as JP,g as ZP,h as v8,i as Cge,l as g8}from"./chunk-VMPSG3GF.js";import{a as Oje}from"./chunk-G5SJVXKS.js";import{c as Sge,g as QP}from"./chunk-CF3YFDG4.js";import{a as h8}from"./chunk-PRXIML4F.js";import{a as YP,b as _N}from"./chunk-FKQFVOLR.js";import{b as ay}from"./chunk-X4N2MWNJ.js";import{c as sye}from"./chunk-HVP63X6W.js";import{f as Lge,r as y8,t as Oge,v as Bge}from"./chunk-S6GSNWAM.js";import{a as rye,b as nye}from"./chunk-UJCQHSQD.js";import{a as tye}from"./chunk-G64EFDMH.js";import{a as zje}from"./chunk-4Y64C4JT.js";import{a as gCa}from"./chunk-HQ2U4QVQ.js";import{a as n8,e as $we,f as Hwe,g as Xwe,j as _8,l as eS,q as Ige}from"./chunk-2V3P6YKN.js";import{$ as tge,Ba as fN,C as Jwe,Ca as yt,E as Zwe,Ga as UP,I as QI,Ia as Pu,J as ege,Ja as mge,Ma as cge,Na as ph,O as age,Oa as uge,Pa as Hd,Ra as _h,S as YI,Sa as Lu,U as Qo,Ua as fge,V as ige,a as cN,aa as rge,ab as Uu,b as s8,bb as jge,c as Qwe,ca as nge,cb as hh,d as Jg,db as N8,e as La,eb as p8,ga as ya,ha as Va,i as o8,ia as uN,j as MP,ja as Is,k as PP,ka as sge,kb as bge,l as zn,m as Ywe,ma as oge,n as Zg,na as LP,o as d8,ua as dge,v as l8,va as OP,w as m8,wa as Nh,xa as BP,ya as lge}from"./chunk-KUDSBDBH.js";import{$ as XP,E as VP,G as hge,H as c8,I as u8,J as vge,K as WP,L as GP,O as wge,P as gge,Q as yge,R as $P,S as kge,X as pN,Y as HP,Z as qge,_ as f8,a as Nge,b as pge,d as FP,k as wn,l as Ou,m as zP,n as NN,o as JI,p as _ge,q as KP,r as ZI,s as Ss,z as Bu}from"./chunk-Z4VKGZFA.js";import{a as rt,c as be,e as Mi}from"./chunk-D76SO2ME.js";var f2e=be((O5t,eF)=>{var u2e=u2e||function(a){return Buffer.from(a).toString("base64")};function i3a(a){var e=this,i=Math.round,t=Math.floor,r=new Array(64),n=new Array(64),s=new Array(64),o=new Array(64),d,l,m,c,u=new Array(65535),f=new Array(65535),N=new Array(64),_=new Array(64),h=[],v=0,w=7,g=new Array(64),k=new Array(64),y=new Array(64),q=new Array(256),b=new Array(2048),P,O=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],B=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],K=[0,1,2,3,4,5,6,7,8,9,10,11],$=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],X=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],re=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Z=[0,1,2,3,4,5,6,7,8,9,10,11],pe=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],se=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function Ie(ie){for(var na=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ha=0;ha<64;ha++){var ua=t((na[ha]*ie+50)/100);ua<1?ua=1:ua>255&&(ua=255),r[O[ha]]=ua}for(var Aa=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Ma=0;Ma<64;Ma++){var yi=t((Aa[Ma]*ie+50)/100);yi<1?yi=1:yi>255&&(yi=255),n[O[Ma]]=yi}for(var ki=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Vt=0,gt=0;gt<8;gt++)for(var we=0;we<8;we++)s[Vt]=1/(r[O[Vt]]*ki[gt]*ki[we]*8),o[Vt]=1/(n[O[Vt]]*ki[gt]*ki[we]*8),Vt++}function ke(ie,na){for(var ha=0,ua=0,Aa=new Array,Ma=1;Ma<=16;Ma++){for(var yi=1;yi<=ie[Ma];yi++)Aa[na[ua]]=[],Aa[na[ua]][0]=ha,Aa[na[ua]][1]=Ma,ua++,ha++;ha*=2}return Aa}function ye(){d=ke(B,K),l=ke(re,Z),m=ke($,X),c=ke(pe,se)}function We(){for(var ie=1,na=2,ha=1;ha<=15;ha++){for(var ua=ie;ua<na;ua++)f[32767+ua]=ha,u[32767+ua]=[],u[32767+ua][1]=ha,u[32767+ua][0]=ua;for(var Aa=-(na-1);Aa<=-ie;Aa++)f[32767+Aa]=ha,u[32767+Aa]=[],u[32767+Aa][1]=ha,u[32767+Aa][0]=na-1+Aa;ie<<=1,na<<=1}}function ge(){for(var ie=0;ie<256;ie++)b[ie]=19595*ie,b[ie+256>>0]=38470*ie,b[ie+512>>0]=7471*ie+32768,b[ie+768>>0]=-11059*ie,b[ie+1024>>0]=-21709*ie,b[ie+1280>>0]=32768*ie+8421375,b[ie+1536>>0]=-27439*ie,b[ie+1792>>0]=-5329*ie}function ce(ie){for(var na=ie[0],ha=ie[1]-1;ha>=0;)na&1<<ha&&(v|=1<<w),ha--,w--,w<0&&(v==255?(H(255),H(0)):H(v),w=7,v=0)}function H(ie){h.push(ie)}function oe(ie){H(ie>>8&255),H(ie&255)}function xe(ie,na){var ha,ua,Aa,Ma,yi,ki,Vt,gt,we=0,Ye,Ia=8,Ut=64;for(Ye=0;Ye<Ia;++Ye){ha=ie[we],ua=ie[we+1],Aa=ie[we+2],Ma=ie[we+3],yi=ie[we+4],ki=ie[we+5],Vt=ie[we+6],gt=ie[we+7];var Pa=ha+gt,ai=ha-gt,tt=ua+Vt,ga=ua-Vt,xi=Aa+ki,Fn=Aa-ki,Et=Ma+yi,$d=Ma-yi,nc=Pa+Et,fh=Pa-Et,Qg=tt+xi,Yg=tt-xi;ie[we]=nc+Qg,ie[we+4]=nc-Qg;var KI=(Yg+fh)*.707106781;ie[we+2]=fh+KI,ie[we+6]=fh-KI,nc=$d+Fn,Qg=Fn+ga,Yg=ga+ai;var VI=(nc-Yg)*.382683433,AP=.5411961*nc+VI,WI=1.306562965*Yg+VI,GI=Qg*.707106781,$I=ai+GI,HI=ai-GI;ie[we+5]=HI+AP,ie[we+3]=HI-AP,ie[we+1]=$I+WI,ie[we+7]=$I-WI,we+=8}for(we=0,Ye=0;Ye<Ia;++Ye){ha=ie[we],ua=ie[we+8],Aa=ie[we+16],Ma=ie[we+24],yi=ie[we+32],ki=ie[we+40],Vt=ie[we+48],gt=ie[we+56];var xwe=ha+gt,t8=ha-gt,Mwe=ua+Vt,Pwe=ua-Vt,Lwe=Aa+ki,Owe=Aa-ki,Bwe=Ma+yi,wCa=Ma-yi,XI=xwe+Bwe,r8=xwe-Bwe,RP=Mwe+Lwe,DP=Mwe-Lwe;ie[we]=XI+RP,ie[we+32]=XI-RP;var Uwe=(DP+r8)*.707106781;ie[we+16]=r8+Uwe,ie[we+48]=r8-Uwe,XI=wCa+Owe,RP=Owe+Pwe,DP=Pwe+t8;var Fwe=(XI-DP)*.382683433,zwe=.5411961*XI+Fwe,Kwe=1.306562965*DP+Fwe,Vwe=RP*.707106781,Wwe=t8+Vwe,Gwe=t8-Vwe;ie[we+40]=Gwe+zwe,ie[we+24]=Gwe-zwe,ie[we+8]=Wwe+Kwe,ie[we+56]=Wwe-Kwe,we++}var xP;for(Ye=0;Ye<Ut;++Ye)xP=ie[Ye]*na[Ye],N[Ye]=xP>0?xP+.5|0:xP-.5|0;return N}function Ae(){oe(65504),oe(16),H(74),H(70),H(73),H(70),H(0),H(1),H(1),H(0),oe(1),oe(1),H(0),H(0)}function Se(ie){if(ie){oe(65505),ie[0]===69&&ie[1]===120&&ie[2]===105&&ie[3]===102?oe(ie.length+2):(oe(ie.length+5+2),H(69),H(120),H(105),H(102),H(0));for(var na=0;na<ie.length;na++)H(ie[na])}}function Ue(ie,na){oe(65472),oe(17),H(8),oe(na),oe(ie),H(3),H(1),H(17),H(0),H(2),H(17),H(1),H(3),H(17),H(1)}function Ge(){oe(65499),oe(132),H(0);for(var ie=0;ie<64;ie++)H(r[ie]);H(1);for(var na=0;na<64;na++)H(n[na])}function je(){oe(65476),oe(418),H(0);for(var ie=0;ie<16;ie++)H(B[ie+1]);for(var na=0;na<=11;na++)H(K[na]);H(16);for(var ha=0;ha<16;ha++)H($[ha+1]);for(var ua=0;ua<=161;ua++)H(X[ua]);H(1);for(var Aa=0;Aa<16;Aa++)H(re[Aa+1]);for(var Ma=0;Ma<=11;Ma++)H(Z[Ma]);H(17);for(var yi=0;yi<16;yi++)H(pe[yi+1]);for(var ki=0;ki<=161;ki++)H(se[ki])}function ve(ie){typeof ie>"u"||ie.constructor!==Array||ie.forEach(na=>{if(typeof na=="string"){oe(65534);var ha=na.length;oe(ha+2);var ua;for(ua=0;ua<ha;ua++)H(na.charCodeAt(ua))}})}function ba(){oe(65498),oe(12),H(3),H(1),H(0),H(2),H(17),H(3),H(17),H(0),H(63),H(0)}function Qe(ie,na,ha,ua,Aa){for(var Ma=Aa[0],yi=Aa[240],ki,Vt=16,gt=63,we=64,Ye=xe(ie,na),Ia=0;Ia<we;++Ia)_[O[Ia]]=Ye[Ia];var Ut=_[0]-ha;ha=_[0],Ut==0?ce(ua[0]):(ki=32767+Ut,ce(ua[f[ki]]),ce(u[ki]));for(var Pa=63;Pa>0&&_[Pa]==0;Pa--);if(Pa==0)return ce(Ma),ha;for(var ai=1,tt;ai<=Pa;){for(var ga=ai;_[ai]==0&&ai<=Pa;++ai);var xi=ai-ga;if(xi>=Vt){tt=xi>>4;for(var Fn=1;Fn<=tt;++Fn)ce(yi);xi=xi&15}ki=32767+_[ai],ce(Aa[(xi<<4)+f[ki]]),ce(u[ki]),ai++}return Pa!=gt&&ce(Ma),ha}function ta(){for(var ie=String.fromCharCode,na=0;na<256;na++)q[na]=ie(na)}this.encode=function(ie,na){var ha=new Date().getTime();na&&Gd(na),h=new Array,v=0,w=7,oe(65496),Ae(),ve(ie.comments),Se(ie.exifBuffer),Ge(),Ue(ie.width,ie.height),je(),ba();var ua=0,Aa=0,Ma=0;v=0,w=7,this.encode.displayName="_encode_";for(var yi=ie.data,ki=ie.width,Vt=ie.height,gt=ki*4,we=ki*3,Ye,Ia=0,Ut,Pa,ai,tt,ga,xi,Fn,Et;Ia<Vt;){for(Ye=0;Ye<gt;){for(tt=gt*Ia+Ye,ga=tt,xi=-1,Fn=0,Et=0;Et<64;Et++)Fn=Et>>3,xi=(Et&7)*4,ga=tt+Fn*gt+xi,Ia+Fn>=Vt&&(ga-=gt*(Ia+1+Fn-Vt)),Ye+xi>=gt&&(ga-=Ye+xi-gt+4),Ut=yi[ga++],Pa=yi[ga++],ai=yi[ga++],g[Et]=(b[Ut]+b[Pa+256>>0]+b[ai+512>>0]>>16)-128,k[Et]=(b[Ut+768>>0]+b[Pa+1024>>0]+b[ai+1280>>0]>>16)-128,y[Et]=(b[Ut+1280>>0]+b[Pa+1536>>0]+b[ai+1792>>0]>>16)-128;ua=Qe(g,s,ua,d,m),Aa=Qe(k,o,Aa,l,c),Ma=Qe(y,o,Ma,l,c),Ye+=32}Ia+=8}if(w>=0){var $d=[];$d[1]=w+1,$d[0]=(1<<w+1)-1,ce($d)}if(oe(65497),typeof eF>"u")return new Uint8Array(h);return Buffer.from(h);var nc,fh};function Gd(ie){if(ie<=0&&(ie=1),ie>100&&(ie=100),P!=ie){var na=0;ie<50?na=Math.floor(5e3/ie):na=Math.floor(200-ie*2),Ie(na),P=ie}}function Wl(){var ie=new Date().getTime();a||(a=50),ta(),ye(),We(),ge(),Gd(a);var na=new Date().getTime()-ie}Wl()}typeof eF<"u"?eF.exports=c2e:typeof window<"u"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=c2e);function c2e(a,e){typeof e>"u"&&(e=50);var i=new i3a(e),t=i.encode(a,e);return{data:t,width:a.width,height:a.height}}});var p2e=be((B5t,fae)=>{var uae=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,t=799,r=3406,n=2276,s=1567,o=3784,d=5793,l=2896;function m(){}function c(w,g){for(var k=0,y=[],q,b,P=16;P>0&&!w[P-1];)P--;y.push({children:[],index:0});var O=y[0],B;for(q=0;q<P;q++){for(b=0;b<w[q];b++){for(O=y.pop(),O.children[O.index]=g[k];O.index>0;){if(y.length===0)throw new Error("Could not recreate Huffman Table");O=y.pop()}for(O.index++,y.push(O);y.length<=q;)y.push(B={children:[],index:0}),O.children[O.index]=B.children,O=B;k++}q+1<P&&(y.push(B={children:[],index:0}),O.children[O.index]=B.children,O=B)}return y[0].children}function u(w,g,k,y,q,b,P,O,B,K){var $=k.precision,X=k.samplesPerLine,re=k.scanLines,Z=k.mcusPerLine,pe=k.progressive,se=k.maxH,Ie=k.maxV,ke=g,ye=0,We=0;function ge(){if(We>0)return We--,ye>>We&1;if(ye=w[g++],ye==255){var we=w[g++];if(we)throw new Error("unexpected marker: "+(ye<<8|we).toString(16))}return We=7,ye>>>7}function ce(we){for(var Ye=we,Ia;(Ia=ge())!==null;){if(Ye=Ye[Ia],typeof Ye=="number")return Ye;if(typeof Ye!="object")throw new Error("invalid huffman sequence")}return null}function H(we){for(var Ye=0;we>0;){var Ia=ge();if(Ia===null)return;Ye=Ye<<1|Ia,we--}return Ye}function oe(we){var Ye=H(we);return Ye>=1<<we-1?Ye:Ye+(-1<<we)+1}function xe(we,Ye){var Ia=ce(we.huffmanTableDC),Ut=Ia===0?0:oe(Ia);Ye[0]=we.pred+=Ut;for(var Pa=1;Pa<64;){var ai=ce(we.huffmanTableAC),tt=ai&15,ga=ai>>4;if(tt===0){if(ga<15)break;Pa+=16;continue}Pa+=ga;var xi=e[Pa];Ye[xi]=oe(tt),Pa++}}function Ae(we,Ye){var Ia=ce(we.huffmanTableDC),Ut=Ia===0?0:oe(Ia)<<B;Ye[0]=we.pred+=Ut}function Se(we,Ye){Ye[0]|=ge()<<B}var Ue=0;function Ge(we,Ye){if(Ue>0){Ue--;return}for(var Ia=b,Ut=P;Ia<=Ut;){var Pa=ce(we.huffmanTableAC),ai=Pa&15,tt=Pa>>4;if(ai===0){if(tt<15){Ue=H(tt)+(1<<tt)-1;break}Ia+=16;continue}Ia+=tt;var ga=e[Ia];Ye[ga]=oe(ai)*(1<<B),Ia++}}var je=0,ve;function ba(we,Ye){for(var Ia=b,Ut=P,Pa=0;Ia<=Ut;){var ai=e[Ia],tt=Ye[ai]<0?-1:1;switch(je){case 0:var ga=ce(we.huffmanTableAC),xi=ga&15,Pa=ga>>4;if(xi===0)Pa<15?(Ue=H(Pa)+(1<<Pa),je=4):(Pa=16,je=1);else{if(xi!==1)throw new Error("invalid ACn encoding");ve=oe(xi),je=Pa?2:3}continue;case 1:case 2:Ye[ai]?Ye[ai]+=(ge()<<B)*tt:(Pa--,Pa===0&&(je=je==2?3:0));break;case 3:Ye[ai]?Ye[ai]+=(ge()<<B)*tt:(Ye[ai]=ve<<B,je=0);break;case 4:Ye[ai]&&(Ye[ai]+=(ge()<<B)*tt);break}Ia++}je===4&&(Ue--,Ue===0&&(je=0))}function Qe(we,Ye,Ia,Ut,Pa){var ai=Ia/Z|0,tt=Ia%Z,ga=ai*we.v+Ut,xi=tt*we.h+Pa;we.blocks[ga]===void 0&&K.tolerantDecoding||Ye(we,we.blocks[ga][xi])}function ta(we,Ye,Ia){var Ut=Ia/we.blocksPerLine|0,Pa=Ia%we.blocksPerLine;we.blocks[Ut]===void 0&&K.tolerantDecoding||Ye(we,we.blocks[Ut][Pa])}var Gd=y.length,Wl,ie,na,ha,ua,Aa;pe?b===0?Aa=O===0?Ae:Se:Aa=O===0?Ge:ba:Aa=xe;var Ma=0,yi,ki;Gd==1?ki=y[0].blocksPerLine*y[0].blocksPerColumn:ki=Z*k.mcusPerColumn,q||(q=ki);for(var Vt,gt;Ma<ki;){for(ie=0;ie<Gd;ie++)y[ie].pred=0;if(Ue=0,Gd==1)for(Wl=y[0],ua=0;ua<q;ua++)ta(Wl,Aa,Ma),Ma++;else for(ua=0;ua<q;ua++){for(ie=0;ie<Gd;ie++)for(Wl=y[ie],Vt=Wl.h,gt=Wl.v,na=0;na<gt;na++)for(ha=0;ha<Vt;ha++)Qe(Wl,Aa,Ma,na,ha);if(Ma++,Ma===ki)break}if(Ma===ki)do{if(w[g]===255&&w[g+1]!==0)break;g+=1}while(g<w.length-2);if(We=0,yi=w[g]<<8|w[g+1],yi<65280)throw new Error("marker was not found");if(yi>=65488&&yi<=65495)g+=2;else break}return g-ke}function f(w,g){var k=[],y=g.blocksPerLine,q=g.blocksPerColumn,b=y<<3,P=new Int32Array(64),O=new Uint8Array(64);function B(ke,ye,We){var ge=g.quantizationTable,ce,H,oe,xe,Ae,Se,Ue,Ge,je,ve=We,ba;for(ba=0;ba<64;ba++)ve[ba]=ke[ba]*ge[ba];for(ba=0;ba<8;++ba){var Qe=8*ba;if(ve[1+Qe]==0&&ve[2+Qe]==0&&ve[3+Qe]==0&&ve[4+Qe]==0&&ve[5+Qe]==0&&ve[6+Qe]==0&&ve[7+Qe]==0){je=d*ve[0+Qe]+512>>10,ve[0+Qe]=je,ve[1+Qe]=je,ve[2+Qe]=je,ve[3+Qe]=je,ve[4+Qe]=je,ve[5+Qe]=je,ve[6+Qe]=je,ve[7+Qe]=je;continue}ce=d*ve[0+Qe]+128>>8,H=d*ve[4+Qe]+128>>8,oe=ve[2+Qe],xe=ve[6+Qe],Ae=l*(ve[1+Qe]-ve[7+Qe])+128>>8,Ge=l*(ve[1+Qe]+ve[7+Qe])+128>>8,Se=ve[3+Qe]<<4,Ue=ve[5+Qe]<<4,je=ce-H+1>>1,ce=ce+H+1>>1,H=je,je=oe*o+xe*s+128>>8,oe=oe*s-xe*o+128>>8,xe=je,je=Ae-Ue+1>>1,Ae=Ae+Ue+1>>1,Ue=je,je=Ge+Se+1>>1,Se=Ge-Se+1>>1,Ge=je,je=ce-xe+1>>1,ce=ce+xe+1>>1,xe=je,je=H-oe+1>>1,H=H+oe+1>>1,oe=je,je=Ae*n+Ge*r+2048>>12,Ae=Ae*r-Ge*n+2048>>12,Ge=je,je=Se*t+Ue*i+2048>>12,Se=Se*i-Ue*t+2048>>12,Ue=je,ve[0+Qe]=ce+Ge,ve[7+Qe]=ce-Ge,ve[1+Qe]=H+Ue,ve[6+Qe]=H-Ue,ve[2+Qe]=oe+Se,ve[5+Qe]=oe-Se,ve[3+Qe]=xe+Ae,ve[4+Qe]=xe-Ae}for(ba=0;ba<8;++ba){var ta=ba;if(ve[8+ta]==0&&ve[16+ta]==0&&ve[24+ta]==0&&ve[32+ta]==0&&ve[40+ta]==0&&ve[48+ta]==0&&ve[56+ta]==0){je=d*We[ba+0]+8192>>14,ve[0+ta]=je,ve[8+ta]=je,ve[16+ta]=je,ve[24+ta]=je,ve[32+ta]=je,ve[40+ta]=je,ve[48+ta]=je,ve[56+ta]=je;continue}ce=d*ve[0+ta]+2048>>12,H=d*ve[32+ta]+2048>>12,oe=ve[16+ta],xe=ve[48+ta],Ae=l*(ve[8+ta]-ve[56+ta])+2048>>12,Ge=l*(ve[8+ta]+ve[56+ta])+2048>>12,Se=ve[24+ta],Ue=ve[40+ta],je=ce-H+1>>1,ce=ce+H+1>>1,H=je,je=oe*o+xe*s+2048>>12,oe=oe*s-xe*o+2048>>12,xe=je,je=Ae-Ue+1>>1,Ae=Ae+Ue+1>>1,Ue=je,je=Ge+Se+1>>1,Se=Ge-Se+1>>1,Ge=je,je=ce-xe+1>>1,ce=ce+xe+1>>1,xe=je,je=H-oe+1>>1,H=H+oe+1>>1,oe=je,je=Ae*n+Ge*r+2048>>12,Ae=Ae*r-Ge*n+2048>>12,Ge=je,je=Se*t+Ue*i+2048>>12,Se=Se*i-Ue*t+2048>>12,Ue=je,ve[0+ta]=ce+Ge,ve[56+ta]=ce-Ge,ve[8+ta]=H+Ue,ve[48+ta]=H-Ue,ve[16+ta]=oe+Se,ve[40+ta]=oe-Se,ve[24+ta]=xe+Ae,ve[32+ta]=xe-Ae}for(ba=0;ba<64;++ba){var Gd=128+(ve[ba]+8>>4);ye[ba]=Gd<0?0:Gd>255?255:Gd}}v(b*q*8);for(var K,$,X=0;X<q;X++){var re=X<<3;for(K=0;K<8;K++)k.push(new Uint8Array(b));for(var Z=0;Z<y;Z++){B(g.blocks[X][Z],O,P);var pe=0,se=Z<<3;for($=0;$<8;$++){var Ie=k[re+$];for(K=0;K<8;K++)Ie[se+K]=O[pe++]}}}return k}function N(w){return w<0?0:w>255?255:w}m.prototype={load:function(g){var k=new XMLHttpRequest;k.open("GET",g,!0),k.responseType="arraybuffer",k.onload=(function(){var y=new Uint8Array(k.response||k.mozResponseArrayBuffer);this.parse(y),this.onload&&this.onload()}).bind(this),k.send(null)},parse:function(g){var k=this.opts.maxResolutionInMP*1e3*1e3,y=0,q=g.length;function b(){var ga=g[y]<<8|g[y+1];return y+=2,ga}function P(){var ga=b(),xi=g.subarray(y,y+ga-2);return y+=xi.length,xi}function O(ga){var xi=1,Fn=1,Et,$d;for($d in ga.components)ga.components.hasOwnProperty($d)&&(Et=ga.components[$d],xi<Et.h&&(xi=Et.h),Fn<Et.v&&(Fn=Et.v));var nc=Math.ceil(ga.samplesPerLine/8/xi),fh=Math.ceil(ga.scanLines/8/Fn);for($d in ga.components)if(ga.components.hasOwnProperty($d)){Et=ga.components[$d];var Qg=Math.ceil(Math.ceil(ga.samplesPerLine/8)*Et.h/xi),Yg=Math.ceil(Math.ceil(ga.scanLines/8)*Et.v/Fn),KI=nc*Et.h,VI=fh*Et.v,AP=VI*KI,WI=[];v(AP*256);for(var GI=0;GI<VI;GI++){for(var $I=[],HI=0;HI<KI;HI++)$I.push(new Int32Array(64));WI.push($I)}Et.blocksPerLine=Qg,Et.blocksPerColumn=Yg,Et.blocks=WI}ga.maxH=xi,ga.maxV=Fn,ga.mcusPerLine=nc,ga.mcusPerColumn=fh}var B=null,K=null,$=null,X,re,Z=[],pe=[],se=[],Ie=[],ke=b(),ye=-1;if(this.comments=[],ke!=65496)throw new Error("SOI not found");for(ke=b();ke!=65497;){var We,ge,ce;switch(ke){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var H=P();if(ke===65534){var oe=String.fromCharCode.apply(null,H);this.comments.push(oe)}ke===65504&&H[0]===74&&H[1]===70&&H[2]===73&&H[3]===70&&H[4]===0&&(B={version:{major:H[5],minor:H[6]},densityUnits:H[7],xDensity:H[8]<<8|H[9],yDensity:H[10]<<8|H[11],thumbWidth:H[12],thumbHeight:H[13],thumbData:H.subarray(14,14+3*H[12]*H[13])}),ke===65505&&H[0]===69&&H[1]===120&&H[2]===105&&H[3]===102&&H[4]===0&&(this.exifBuffer=H.subarray(5,H.length)),ke===65518&&H[0]===65&&H[1]===100&&H[2]===111&&H[3]===98&&H[4]===101&&H[5]===0&&(K={version:H[6],flags0:H[7]<<8|H[8],flags1:H[9]<<8|H[10],transformCode:H[11]});break;case 65499:for(var xe=b(),Ae=xe+y-2;y<Ae;){var Se=g[y++];v(256);var Ue=new Int32Array(64);if(Se>>4===0)for(ge=0;ge<64;ge++){var Ge=e[ge];Ue[Ge]=g[y++]}else if(Se>>4===1)for(ge=0;ge<64;ge++){var Ge=e[ge];Ue[Ge]=b()}else throw new Error("DQT: invalid table spec");Z[Se&15]=Ue}break;case 65472:case 65473:case 65474:b(),X={},X.extended=ke===65473,X.progressive=ke===65474,X.precision=g[y++],X.scanLines=b(),X.samplesPerLine=b(),X.components={},X.componentsOrder=[];var je=X.scanLines*X.samplesPerLine;if(je>k){var ve=Math.ceil((je-k)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${ve}MP`)}var ba=g[y++],Qe,ta=0,Gd=0;for(We=0;We<ba;We++){Qe=g[y];var Wl=g[y+1]>>4,ie=g[y+1]&15,na=g[y+2];if(Wl<=0||ie<=0)throw new Error("Invalid sampling factor, expected values above 0");X.componentsOrder.push(Qe),X.components[Qe]={h:Wl,v:ie,quantizationIdx:na},y+=3}O(X),pe.push(X);break;case 65476:var ha=b();for(We=2;We<ha;){var ua=g[y++],Aa=new Uint8Array(16),Ma=0;for(ge=0;ge<16;ge++,y++)Ma+=Aa[ge]=g[y];v(16+Ma);var yi=new Uint8Array(Ma);for(ge=0;ge<Ma;ge++,y++)yi[ge]=g[y];We+=17+Ma,(ua>>4===0?Ie:se)[ua&15]=c(Aa,yi)}break;case 65501:b(),re=b();break;case 65500:b(),b();break;case 65498:var ki=b(),Vt=g[y++],gt=[],we;for(We=0;We<Vt;We++){we=X.components[g[y++]];var Ye=g[y++];we.huffmanTableDC=Ie[Ye>>4],we.huffmanTableAC=se[Ye&15],gt.push(we)}var Ia=g[y++],Ut=g[y++],Pa=g[y++],ai=u(g,y,X,gt,re,Ia,Ut,Pa>>4,Pa&15,this.opts);y+=ai;break;case 65535:g[y]!==255&&y--;break;default:if(g[y-3]==255&&g[y-2]>=192&&g[y-2]<=254){y-=3;break}else if(ke===224||ke==225){if(ye!==-1)throw new Error(`first unknown JPEG marker at offset ${ye.toString(16)}, second unknown JPEG marker ${ke.toString(16)} at offset ${(y-1).toString(16)}`);ye=y-1;let ga=b();if(g[y+ga-2]===255){y+=ga-2;break}}throw new Error("unknown JPEG marker "+ke.toString(16))}ke=b()}if(pe.length!=1)throw new Error("only single frame JPEGs supported");for(var We=0;We<pe.length;We++){var tt=pe[We].components;for(var ge in tt)tt[ge].quantizationTable=Z[tt[ge].quantizationIdx],delete tt[ge].quantizationIdx}this.width=X.samplesPerLine,this.height=X.scanLines,this.jfif=B,this.adobe=K,this.components=[];for(var We=0;We<X.componentsOrder.length;We++){var we=X.components[X.componentsOrder[We]];this.components.push({lines:f(X,we),scaleX:we.h/X.maxH,scaleY:we.v/X.maxV})}},getData:function(g,k){var y=this.width/g,q=this.height/k,b,P,O,B,K,$,X,re,Z,pe,se=0,Ie,ke,ye,We,ge,ce,H,oe,xe,Ae,Se,Ue=g*k*this.components.length;v(Ue);var Ge=new Uint8Array(Ue);switch(this.components.length){case 1:for(b=this.components[0],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],Z=0;Z<g;Z++)Ie=K[0|Z*b.scaleX*y],Ge[se++]=Ie;break;case 2:for(b=this.components[0],P=this.components[1],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],Z=0;Z<g;Z++)Ie=K[0|Z*b.scaleX*y],Ge[se++]=Ie,Ie=$[0|Z*P.scaleX*y],Ge[se++]=Ie;break;case 3:for(Se=!0,this.adobe&&this.adobe.transformCode?Se=!0:typeof this.opts.colorTransform<"u"&&(Se=!!this.opts.colorTransform),b=this.components[0],P=this.components[1],O=this.components[2],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],X=O.lines[0|pe*O.scaleY*q],Z=0;Z<g;Z++)Se?(Ie=K[0|Z*b.scaleX*y],ke=$[0|Z*P.scaleX*y],ye=X[0|Z*O.scaleX*y],oe=N(Ie+1.402*(ye-128)),xe=N(Ie-.3441363*(ke-128)-.71413636*(ye-128)),Ae=N(Ie+1.772*(ke-128))):(oe=K[0|Z*b.scaleX*y],xe=$[0|Z*P.scaleX*y],Ae=X[0|Z*O.scaleX*y]),Ge[se++]=oe,Ge[se++]=xe,Ge[se++]=Ae;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(Se=!1,this.adobe&&this.adobe.transformCode?Se=!0:typeof this.opts.colorTransform<"u"&&(Se=!!this.opts.colorTransform),b=this.components[0],P=this.components[1],O=this.components[2],B=this.components[3],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],X=O.lines[0|pe*O.scaleY*q],re=B.lines[0|pe*B.scaleY*q],Z=0;Z<g;Z++)Se?(Ie=K[0|Z*b.scaleX*y],ke=$[0|Z*P.scaleX*y],ye=X[0|Z*O.scaleX*y],We=re[0|Z*B.scaleX*y],ge=255-N(Ie+1.402*(ye-128)),ce=255-N(Ie-.3441363*(ke-128)-.71413636*(ye-128)),H=255-N(Ie+1.772*(ke-128))):(ge=K[0|Z*b.scaleX*y],ce=$[0|Z*P.scaleX*y],H=X[0|Z*O.scaleX*y],We=re[0|Z*B.scaleX*y]),Ge[se++]=255-ge,Ge[se++]=255-ce,Ge[se++]=255-H,Ge[se++]=255-We;break;default:throw new Error("Unsupported color mode")}return Ge},copyToImageData:function(g,k){var y=g.width,q=g.height,b=g.data,P=this.getData(y,q),O=0,B=0,K,$,X,re,Z,pe,se,Ie,ke;switch(this.components.length){case 1:for($=0;$<q;$++)for(K=0;K<y;K++)X=P[O++],b[B++]=X,b[B++]=X,b[B++]=X,k&&(b[B++]=255);break;case 3:for($=0;$<q;$++)for(K=0;K<y;K++)se=P[O++],Ie=P[O++],ke=P[O++],b[B++]=se,b[B++]=Ie,b[B++]=ke,k&&(b[B++]=255);break;case 4:for($=0;$<q;$++)for(K=0;K<y;K++)Z=P[O++],pe=P[O++],X=P[O++],re=P[O++],se=255-N(Z*(1-re/255)+re),Ie=255-N(pe*(1-re/255)+re),ke=255-N(X*(1-re/255)+re),b[B++]=se,b[B++]=Ie,b[B++]=ke,k&&(b[B++]=255);break;default:throw new Error("Unsupported color mode")}}};var _=0,h=0;function v(w=0){var g=_+w;if(g>h){var k=Math.ceil((g-h)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${k}MB`)}_=g}return m.resetMaxMemoryUsage=function(w){_=0,h=w},m.getBytesAllocated=function(){return _},m.requestMemoryAllocation=v,m})();typeof fae<"u"?fae.exports=N2e:typeof window<"u"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=N2e);function N2e(a,e={}){var i={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},t={...i,...e},r=new Uint8Array(a),n=new uae;n.opts=t,uae.resetMaxMemoryUsage(t.maxMemoryUsageInMB*1024*1024),n.parse(r);var s=t.formatAsRGBA?4:3,o=n.width*n.height*s;try{uae.requestMemoryAllocation(o);var d={width:n.width,height:n.height,exifBuffer:n.exifBuffer,data:t.useTArray?new Uint8Array(o):Buffer.alloc(o)};n.comments.length>0&&(d.comments=n.comments)}catch(l){throw l instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+o):l instanceof ReferenceError&&l.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):l}return n.copyToImageData(d,t.formatAsRGBA),d}});var h2e=be((U5t,_2e)=>{var t3a=f2e(),r3a=p2e();_2e.exports={encode:t3a,decode:r3a}});var Nae=be((F5t,w2e)=>{"use strict";var n3a=rt("util"),v2e=rt("stream"),mm=w2e.exports=function(){v2e.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n3a.inherits(mm,v2e);mm.prototype.read=function(a,e){this._reads.push({length:Math.abs(a),allowLess:a<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};mm.prototype.write=function(a,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let i;return Buffer.isBuffer(a)?i=a:i=Buffer.from(a,e||this._encoding),this._buffers.push(i),this._buffered+=i.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};mm.prototype.end=function(a,e){a&&this.write(a,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};mm.prototype.destroySoon=mm.prototype.end;mm.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};mm.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};mm.prototype._processReadAllowingLess=function(a){this._reads.shift();let e=this._buffers[0];e.length>a.length?(this._buffered-=a.length,this._buffers[0]=e.slice(a.length),a.func.call(this,e.slice(0,a.length))):(this._buffered-=e.length,this._buffers.shift(),a.func.call(this,e))};mm.prototype._processRead=function(a){this._reads.shift();let e=0,i=0,t=Buffer.alloc(a.length);for(;e<a.length;){let r=this._buffers[i++],n=Math.min(r.length,a.length-e);r.copy(t,e,0,n),e+=n,n!==r.length&&(this._buffers[--i]=r.slice(n))}i>0&&this._buffers.splice(0,i),this._buffered-=a.length,a.func.call(this,t)};mm.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let a=this._reads[0];if(a.allowLess)this._processReadAllowingLess(a);else if(this._buffered>=a.length)this._processRead(a);else break}this._buffers&&!this.writable&&this._end()}catch(a){this.emit("error",a)}}});var _ae=be(pae=>{"use strict";var cp=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];pae.getImagePasses=function(a,e){let i=[],t=a%8,r=e%8,n=(a-t)/8,s=(e-r)/8;for(let o=0;o<cp.length;o++){let d=cp[o],l=n*d.x.length,m=s*d.y.length;for(let c=0;c<d.x.length&&d.x[c]<t;c++)l++;for(let c=0;c<d.y.length&&d.y[c]<r;c++)m++;l>0&&m>0&&i.push({width:l,height:m,index:o})}return i};pae.getInterlaceIterator=function(a){return function(e,i,t){let r=e%cp[t].x.length,n=(e-r)/cp[t].x.length*8+cp[t].x[r],s=i%cp[t].y.length,o=(i-s)/cp[t].y.length*8+cp[t].y[s];return n*4+o*a*4}}});var hae=be((K5t,g2e)=>{"use strict";g2e.exports=function(e,i,t){let r=e+i-t,n=Math.abs(r-e),s=Math.abs(r-i),o=Math.abs(r-t);return n<=s&&n<=o?e:s<=o?i:t}});var vae=be((V5t,k2e)=>{"use strict";var s3a=_ae(),o3a=hae();function y2e(a,e,i){let t=a*e;return i!==8&&(t=Math.ceil(t/(8/i))),t}var Kk=k2e.exports=function(a,e){let i=a.width,t=a.height,r=a.interlace,n=a.bpp,s=a.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],r){let o=s3a.getImagePasses(i,t);for(let d=0;d<o.length;d++)this._images.push({byteWidth:y2e(o[d].width,n,s),height:o[d].height,lineIndex:0})}else this._images.push({byteWidth:y2e(i,n,s),height:t,lineIndex:0});s===8?this._xComparison=n:s===16?this._xComparison=n*2:this._xComparison=1};Kk.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};Kk.prototype._unFilterType1=function(a,e,i){let t=this._xComparison,r=t-1;for(let n=0;n<i;n++){let s=a[1+n],o=n>r?e[n-t]:0;e[n]=s+o}};Kk.prototype._unFilterType2=function(a,e,i){let t=this._lastLine;for(let r=0;r<i;r++){let n=a[1+r],s=t?t[r]:0;e[r]=n+s}};Kk.prototype._unFilterType3=function(a,e,i){let t=this._xComparison,r=t-1,n=this._lastLine;for(let s=0;s<i;s++){let o=a[1+s],d=n?n[s]:0,l=s>r?e[s-t]:0,m=Math.floor((l+d)/2);e[s]=o+m}};Kk.prototype._unFilterType4=function(a,e,i){let t=this._xComparison,r=t-1,n=this._lastLine;for(let s=0;s<i;s++){let o=a[1+s],d=n?n[s]:0,l=s>r?e[s-t]:0,m=s>r&&n?n[s-t]:0,c=o3a(l,d,m);e[s]=o+c}};Kk.prototype._reverseFilterLine=function(a){let e=a[0],i,t=this._images[this._imageIndex],r=t.byteWidth;if(e===0)i=a.slice(1,r+1);else switch(i=Buffer.alloc(r),e){case 1:this._unFilterType1(a,i,r);break;case 2:this._unFilterType2(a,i,r);break;case 3:this._unFilterType3(a,i,r);break;case 4:this._unFilterType4(a,i,r);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(i),t.lineIndex++,t.lineIndex>=t.height?(this._lastLine=null,this._imageIndex++,t=this._images[this._imageIndex]):this._lastLine=i,t?this.read(t.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var b2e=be((W5t,j2e)=>{"use strict";var d3a=rt("util"),q2e=Nae(),l3a=vae(),m3a=j2e.exports=function(a){q2e.call(this);let e=[],i=this;this._filter=new l3a(a,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",Buffer.concat(e))}}),this._filter.start()};d3a.inherits(m3a,q2e)});var Vk=be((G5t,I2e)=>{"use strict";I2e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var yae=be(($5t,S2e)=>{"use strict";var wae=[];(function(){for(let a=0;a<256;a++){let e=a;for(let i=0;i<8;i++)e&1?e=3988292384^e>>>1:e=e>>>1;wae[a]=e}})();var gae=S2e.exports=function(){this._crc=-1};gae.prototype.write=function(a){for(let e=0;e<a.length;e++)this._crc=wae[(this._crc^a[e])&255]^this._crc>>>8;return!0};gae.prototype.crc32=function(){return this._crc^-1};gae.crc32=function(a){let e=-1;for(let i=0;i<a.length;i++)e=wae[(e^a[i])&255]^e>>>8;return e^-1}});var kae=be((H5t,T2e)=>{"use strict";var Zr=Vk(),c3a=yae(),En=T2e.exports=function(a,e){this._options=a,a.checkCRC=a.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[Zr.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[Zr.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[Zr.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[Zr.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[Zr.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[Zr.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};En.prototype.start=function(){this.read(Zr.PNG_SIGNATURE.length,this._parseSignature.bind(this))};En.prototype._parseSignature=function(a){let e=Zr.PNG_SIGNATURE;for(let i=0;i<e.length;i++)if(a[i]!==e[i]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};En.prototype._parseChunkBegin=function(a){let e=a.readUInt32BE(0),i=a.readUInt32BE(4),t="";for(let n=4;n<8;n++)t+=String.fromCharCode(a[n]);let r=!!(a[4]&32);if(!this._hasIHDR&&i!==Zr.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new c3a,this._crc.write(Buffer.from(t)),this._chunks[i])return this._chunks[i](e);if(!r){this.error(new Error("Unsupported critical chunk type "+t));return}this.read(e+4,this._skipChunk.bind(this))};En.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};En.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};En.prototype._parseChunkEnd=function(a){let e=a.readInt32BE(0),i=this._crc.crc32();if(this._options.checkCRC&&i!==e){this.error(new Error("Crc error - "+e+" - "+i));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};En.prototype._handleIHDR=function(a){this.read(a,this._parseIHDR.bind(this))};En.prototype._parseIHDR=function(a){this._crc.write(a);let e=a.readUInt32BE(0),i=a.readUInt32BE(4),t=a[8],r=a[9],n=a[10],s=a[11],o=a[12];if(t!==8&&t!==4&&t!==2&&t!==1&&t!==16){this.error(new Error("Unsupported bit depth "+t));return}if(!(r in Zr.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(n!==0){this.error(new Error("Unsupported compression method"));return}if(s!==0){this.error(new Error("Unsupported filter method"));return}if(o!==0&&o!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=r;let d=Zr.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:i,depth:t,interlace:!!o,palette:!!(r&Zr.COLORTYPE_PALETTE),color:!!(r&Zr.COLORTYPE_COLOR),alpha:!!(r&Zr.COLORTYPE_ALPHA),bpp:d,colorType:r}),this._handleChunkEnd()};En.prototype._handlePLTE=function(a){this.read(a,this._parsePLTE.bind(this))};En.prototype._parsePLTE=function(a){this._crc.write(a);let e=Math.floor(a.length/3);for(let i=0;i<e;i++)this._palette.push([a[i*3],a[i*3+1],a[i*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};En.prototype._handleTRNS=function(a){this.simpleTransparency(),this.read(a,this._parseTRNS.bind(this))};En.prototype._parseTRNS=function(a){if(this._crc.write(a),this._colorType===Zr.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(a.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<a.length;e++)this._palette[e][3]=a[e];this.palette(this._palette)}this._colorType===Zr.COLORTYPE_GRAYSCALE&&this.transColor([a.readUInt16BE(0)]),this._colorType===Zr.COLORTYPE_COLOR&&this.transColor([a.readUInt16BE(0),a.readUInt16BE(2),a.readUInt16BE(4)]),this._handleChunkEnd()};En.prototype._handleGAMA=function(a){this.read(a,this._parseGAMA.bind(this))};En.prototype._parseGAMA=function(a){this._crc.write(a),this.gamma(a.readUInt32BE(0)/Zr.GAMMA_DIVISION),this._handleChunkEnd()};En.prototype._handleIDAT=function(a){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-a,this._parseIDAT.bind(this,a))};En.prototype._parseIDAT=function(a,e){if(this._crc.write(e),this._colorType===Zr.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let i=a-e.length;i>0?this._handleIDAT(i):this._handleChunkEnd()};En.prototype._handleIEND=function(a){this.read(a,this._parseIEND.bind(this))};En.prototype._parseIEND=function(a){this._crc.write(a),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var qae=be(C2e=>{"use strict";var E2e=_ae(),u3a=[function(){},function(a,e,i,t){if(t===e.length)throw new Error("Ran out of data");let r=e[t];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=255},function(a,e,i,t){if(t+1>=e.length)throw new Error("Ran out of data");let r=e[t];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=e[t+1]},function(a,e,i,t){if(t+2>=e.length)throw new Error("Ran out of data");a[i]=e[t],a[i+1]=e[t+1],a[i+2]=e[t+2],a[i+3]=255},function(a,e,i,t){if(t+3>=e.length)throw new Error("Ran out of data");a[i]=e[t],a[i+1]=e[t+1],a[i+2]=e[t+2],a[i+3]=e[t+3]}],f3a=[function(){},function(a,e,i,t){let r=e[0];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=t},function(a,e,i){let t=e[0];a[i]=t,a[i+1]=t,a[i+2]=t,a[i+3]=e[1]},function(a,e,i,t){a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=t},function(a,e,i){a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3]}];function N3a(a,e){let i=[],t=0;function r(){if(t===a.length)throw new Error("Ran out of data");let n=a[t];t++;let s,o,d,l,m,c,u,f;switch(e){default:throw new Error("unrecognised depth");case 16:u=a[t],t++,i.push((n<<8)+u);break;case 4:u=n&15,f=n>>4,i.push(f,u);break;case 2:m=n&3,c=n>>2&3,u=n>>4&3,f=n>>6&3,i.push(f,u,c,m);break;case 1:s=n&1,o=n>>1&1,d=n>>2&1,l=n>>3&1,m=n>>4&1,c=n>>5&1,u=n>>6&1,f=n>>7&1,i.push(f,u,c,m,l,d,o,s);break}}return{get:function(n){for(;i.length<n;)r();let s=i.slice(0,n);return i=i.slice(n),s},resetAfterLine:function(){i.length=0},end:function(){if(t!==a.length)throw new Error("extra data found")}}}function p3a(a,e,i,t,r,n){let s=a.width,o=a.height,d=a.index;for(let l=0;l<o;l++)for(let m=0;m<s;m++){let c=i(m,l,d);u3a[t](e,r,c,n),n+=t}return n}function _3a(a,e,i,t,r,n){let s=a.width,o=a.height,d=a.index;for(let l=0;l<o;l++){for(let m=0;m<s;m++){let c=r.get(t),u=i(m,l,d);f3a[t](e,c,u,n)}r.resetAfterLine()}}C2e.dataToBitMap=function(a,e){let i=e.width,t=e.height,r=e.depth,n=e.bpp,s=e.interlace,o;r!==8&&(o=N3a(a,r));let d;r<=8?d=Buffer.alloc(i*t*4):d=new Uint16Array(i*t*4);let l=Math.pow(2,r)-1,m=0,c,u;if(s)c=E2e.getImagePasses(i,t),u=E2e.getInterlaceIterator(i,t);else{let f=0;u=function(){let N=f;return f+=4,N},c=[{width:i,height:t}]}for(let f=0;f<c.length;f++)r===8?m=p3a(c[f],d,u,n,a,m):_3a(c[f],d,u,n,o,l);if(r===8){if(m!==a.length)throw new Error("extra data found")}else o.end();return d}});var jae=be((Q5t,A2e)=>{"use strict";function h3a(a,e,i,t,r){let n=0;for(let s=0;s<t;s++)for(let o=0;o<i;o++){let d=r[a[n]];if(!d)throw new Error("index "+a[n]+" not in palette");for(let l=0;l<4;l++)e[n+l]=d[l];n+=4}}function v3a(a,e,i,t,r){let n=0;for(let s=0;s<t;s++)for(let o=0;o<i;o++){let d=!1;if(r.length===1?r[0]===a[n]&&(d=!0):r[0]===a[n]&&r[1]===a[n+1]&&r[2]===a[n+2]&&(d=!0),d)for(let l=0;l<4;l++)e[n+l]=0;n+=4}}function w3a(a,e,i,t,r){let n=255,s=Math.pow(2,r)-1,o=0;for(let d=0;d<t;d++)for(let l=0;l<i;l++){for(let m=0;m<4;m++)e[o+m]=Math.floor(a[o+m]*n/s+.5);o+=4}}A2e.exports=function(a,e,i=!1){let t=e.depth,r=e.width,n=e.height,s=e.colorType,o=e.transColor,d=e.palette,l=a;return s===3?h3a(a,l,r,n,d):(o&&v3a(a,l,r,n,o),t!==8&&!i&&(t===16&&(l=Buffer.alloc(r*n*4)),w3a(a,l,r,n,t))),l}});var x2e=be((Y5t,D2e)=>{"use strict";var g3a=rt("util"),bae=rt("zlib"),R2e=Nae(),y3a=b2e(),k3a=kae(),q3a=qae(),j3a=jae(),Cc=D2e.exports=function(a){R2e.call(this),this._parser=new k3a(a,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=a,this.writable=!0,this._parser.start()};g3a.inherits(Cc,R2e);Cc.prototype._handleError=function(a){this.emit("error",a),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};Cc.prototype._inflateData=function(a){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=bae.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let i=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(i,bae.Z_MIN_CHUNK);this._inflate=bae.createInflate({chunkSize:t});let r=i,n=this.emit.bind(this,"error");this._inflate.on("error",function(o){r&&n(o)}),this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",function(o){r&&(o.length>r&&(o=o.slice(0,r)),r-=o.length,s(o))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(a)};Cc.prototype._handleMetaData=function(a){this._metaData=a,this._bitmapInfo=Object.create(a),this._filter=new y3a(this._bitmapInfo)};Cc.prototype._handleTransColor=function(a){this._bitmapInfo.transColor=a};Cc.prototype._handlePalette=function(a){this._bitmapInfo.palette=a};Cc.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Cc.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Cc.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};Cc.prototype._complete=function(a){if(this.errord)return;let e;try{let i=q3a.dataToBitMap(a,this._bitmapInfo);e=j3a(i,this._bitmapInfo,this._options.skipRescale),i=null}catch(i){this._handleError(i);return}this.emit("parsed",e)}});var P2e=be((J5t,M2e)=>{"use strict";var cl=Vk();M2e.exports=function(a,e,i,t){let r=[cl.COLORTYPE_COLOR_ALPHA,cl.COLORTYPE_ALPHA].indexOf(t.colorType)!==-1;if(t.colorType===t.inputColorType){let N=(function(){let _=new ArrayBuffer(2);return new DataView(_).setInt16(0,256,!0),new Int16Array(_)[0]!==256})();if(t.bitDepth===8||t.bitDepth===16&&N)return a}let n=t.bitDepth!==16?a:new Uint16Array(a.buffer),s=255,o=cl.COLORTYPE_TO_BPP_MAP[t.inputColorType];o===4&&!t.inputHasAlpha&&(o=3);let d=cl.COLORTYPE_TO_BPP_MAP[t.colorType];t.bitDepth===16&&(s=65535,d*=2);let l=Buffer.alloc(e*i*d),m=0,c=0,u=t.bgColor||{};u.red===void 0&&(u.red=s),u.green===void 0&&(u.green=s),u.blue===void 0&&(u.blue=s);function f(){let N,_,h,v=s;switch(t.inputColorType){case cl.COLORTYPE_COLOR_ALPHA:v=n[m+3],N=n[m],_=n[m+1],h=n[m+2];break;case cl.COLORTYPE_COLOR:N=n[m],_=n[m+1],h=n[m+2];break;case cl.COLORTYPE_ALPHA:v=n[m+1],N=n[m],_=N,h=N;break;case cl.COLORTYPE_GRAYSCALE:N=n[m],_=N,h=N;break;default:throw new Error("input color type:"+t.inputColorType+" is not supported at present")}return t.inputHasAlpha&&(r||(v/=s,N=Math.min(Math.max(Math.round((1-v)*u.red+v*N),0),s),_=Math.min(Math.max(Math.round((1-v)*u.green+v*_),0),s),h=Math.min(Math.max(Math.round((1-v)*u.blue+v*h),0),s))),{red:N,green:_,blue:h,alpha:v}}for(let N=0;N<i;N++)for(let _=0;_<e;_++){let h=f(n,m);switch(t.colorType){case cl.COLORTYPE_COLOR_ALPHA:case cl.COLORTYPE_COLOR:t.bitDepth===8?(l[c]=h.red,l[c+1]=h.green,l[c+2]=h.blue,r&&(l[c+3]=h.alpha)):(l.writeUInt16BE(h.red,c),l.writeUInt16BE(h.green,c+2),l.writeUInt16BE(h.blue,c+4),r&&l.writeUInt16BE(h.alpha,c+6));break;case cl.COLORTYPE_ALPHA:case cl.COLORTYPE_GRAYSCALE:{let v=(h.red+h.green+h.blue)/3;t.bitDepth===8?(l[c]=v,r&&(l[c+1]=h.alpha)):(l.writeUInt16BE(v,c),r&&l.writeUInt16BE(h.alpha,c+2));break}default:throw new Error("unrecognised color Type "+t.colorType)}m+=o,c+=d}return l}});var B2e=be((Z5t,O2e)=>{"use strict";var L2e=hae();function b3a(a,e,i,t,r){for(let n=0;n<i;n++)t[r+n]=a[e+n]}function I3a(a,e,i){let t=0,r=e+i;for(let n=e;n<r;n++)t+=Math.abs(a[n]);return t}function S3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=a[e+s]-o;t[r+s]=d}}function T3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=a[e+n]-s;r+=Math.abs(o)}return r}function E3a(a,e,i,t,r){for(let n=0;n<i;n++){let s=e>0?a[e+n-i]:0,o=a[e+n]-s;t[r+n]=o}}function C3a(a,e,i){let t=0,r=e+i;for(let n=e;n<r;n++){let s=e>0?a[n-i]:0,o=a[n]-s;t+=Math.abs(o)}return t}function A3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=e>0?a[e+s-i]:0,l=a[e+s]-(o+d>>1);t[r+s]=l}}function R3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=e>0?a[e+n-i]:0,d=a[e+n]-(s+o>>1);r+=Math.abs(d)}return r}function D3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=e>0?a[e+s-i]:0,l=e>0&&s>=n?a[e+s-(i+n)]:0,m=a[e+s]-L2e(o,d,l);t[r+s]=m}}function x3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=e>0?a[e+n-i]:0,d=e>0&&n>=t?a[e+n-(i+t)]:0,l=a[e+n]-L2e(s,o,d);r+=Math.abs(l)}return r}var M3a={0:b3a,1:S3a,2:E3a,3:A3a,4:D3a},P3a={0:I3a,1:T3a,2:C3a,3:R3a,4:x3a};O2e.exports=function(a,e,i,t,r){let n;if(!("filterType"in t)||t.filterType===-1)n=[0,1,2,3,4];else if(typeof t.filterType=="number")n=[t.filterType];else throw new Error("unrecognised filter types");t.bitDepth===16&&(r*=2);let s=e*r,o=0,d=0,l=Buffer.alloc((s+1)*i),m=n[0];for(let c=0;c<i;c++){if(n.length>1){let u=1/0;for(let f=0;f<n.length;f++){let N=P3a[n[f]](a,d,s,r);N<u&&(m=n[f],u=N)}}l[o]=m,o++,M3a[m](a,d,s,l,o,r),o+=s,d+=s}return l}});var Iae=be((e6t,U2e)=>{"use strict";var ms=Vk(),L3a=yae(),O3a=P2e(),B3a=B2e(),U3a=rt("zlib"),up=U2e.exports=function(a){if(this._options=a,a.deflateChunkSize=a.deflateChunkSize||32*1024,a.deflateLevel=a.deflateLevel!=null?a.deflateLevel:9,a.deflateStrategy=a.deflateStrategy!=null?a.deflateStrategy:3,a.inputHasAlpha=a.inputHasAlpha!=null?a.inputHasAlpha:!0,a.deflateFactory=a.deflateFactory||U3a.createDeflate,a.bitDepth=a.bitDepth||8,a.colorType=typeof a.colorType=="number"?a.colorType:ms.COLORTYPE_COLOR_ALPHA,a.inputColorType=typeof a.inputColorType=="number"?a.inputColorType:ms.COLORTYPE_COLOR_ALPHA,[ms.COLORTYPE_GRAYSCALE,ms.COLORTYPE_COLOR,ms.COLORTYPE_COLOR_ALPHA,ms.COLORTYPE_ALPHA].indexOf(a.colorType)===-1)throw new Error("option color type:"+a.colorType+" is not supported at present");if([ms.COLORTYPE_GRAYSCALE,ms.COLORTYPE_COLOR,ms.COLORTYPE_COLOR_ALPHA,ms.COLORTYPE_ALPHA].indexOf(a.inputColorType)===-1)throw new Error("option input color type:"+a.inputColorType+" is not supported at present");if(a.bitDepth!==8&&a.bitDepth!==16)throw new Error("option bit depth:"+a.bitDepth+" is not supported at present")};up.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};up.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};up.prototype.filterData=function(a,e,i){let t=O3a(a,e,i,this._options),r=ms.COLORTYPE_TO_BPP_MAP[this._options.colorType];return B3a(t,e,i,this._options,r)};up.prototype._packChunk=function(a,e){let i=e?e.length:0,t=Buffer.alloc(i+12);return t.writeUInt32BE(i,0),t.writeUInt32BE(a,4),e&&e.copy(t,8),t.writeInt32BE(L3a.crc32(t.slice(4,t.length-4)),t.length-4),t};up.prototype.packGAMA=function(a){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(a*ms.GAMMA_DIVISION),0),this._packChunk(ms.TYPE_gAMA,e)};up.prototype.packIHDR=function(a,e){let i=Buffer.alloc(13);return i.writeUInt32BE(a,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(ms.TYPE_IHDR,i)};up.prototype.packIDAT=function(a){return this._packChunk(ms.TYPE_IDAT,a)};up.prototype.packIEND=function(){return this._packChunk(ms.TYPE_IEND,null)}});var V2e=be((a6t,K2e)=>{"use strict";var F3a=rt("util"),F2e=rt("stream"),z3a=Vk(),K3a=Iae(),z2e=K2e.exports=function(a){F2e.call(this);let e=a||{};this._packer=new K3a(e),this._deflate=this._packer.createDeflate(),this.readable=!0};F3a.inherits(z2e,F2e);z2e.prototype.pack=function(a,e,i,t){this.emit("data",Buffer.from(z3a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),t&&this.emit("data",this._packer.packGAMA(t));let r=this._packer.filterData(a,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(n){this.emit("data",this._packer.packIDAT(n))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(r)}});var Q2e=be((jC,X2e)=>{"use strict";var W2e=rt("assert").ok,Wk=rt("zlib"),V3a=rt("util"),G2e=rt("buffer").kMaxLength;function $v(a){if(!(this instanceof $v))return new $v(a);a&&a.chunkSize<Wk.Z_MIN_CHUNK&&(a.chunkSize=Wk.Z_MIN_CHUNK),Wk.Inflate.call(this,a),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,a&&a.maxLength!=null&&(this._maxLength=a.maxLength)}function W3a(a){return new $v(a)}function $2e(a,e){e&&process.nextTick(e),a._handle&&(a._handle.close(),a._handle=null)}$v.prototype._processChunk=function(a,e,i){if(typeof i=="function")return Wk.Inflate._processChunk.call(this,a,e,i);let t=this,r=a&&a.length,n=this._chunkSize-this._offset,s=this._maxLength,o=0,d=[],l=0,m;this.on("error",function(N){m=N});function c(N,_){if(t._hadError)return;let h=n-_;if(W2e(h>=0,"have should not go down"),h>0){let v=t._buffer.slice(t._offset,t._offset+h);if(t._offset+=h,v.length>s&&(v=v.slice(0,s)),d.push(v),l+=v.length,s-=v.length,s===0)return!1}return(_===0||t._offset>=t._chunkSize)&&(n=t._chunkSize,t._offset=0,t._buffer=Buffer.allocUnsafe(t._chunkSize)),_===0?(o+=r-N,r=N,!0):!1}W2e(this._handle,"zlib binding closed");let u;do u=this._handle.writeSync(e,a,o,r,this._buffer,this._offset,n),u=u||this._writeState;while(!this._hadError&&c(u[0],u[1]));if(this._hadError)throw m;if(l>=G2e)throw $2e(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+G2e.toString(16)+" bytes");let f=Buffer.concat(d,l);return $2e(this),f};V3a.inherits($v,Wk.Inflate);function G3a(a,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let i=a._finishFlushFlag;return i==null&&(i=Wk.Z_FINISH),a._processChunk(e,i)}function H2e(a,e){return G3a(new $v(e),a)}X2e.exports=jC=H2e;jC.Inflate=$v;jC.createInflate=W3a;jC.inflateSync=H2e});var Sae=be((i6t,J2e)=>{"use strict";var Y2e=J2e.exports=function(a){this._buffer=a,this._reads=[]};Y2e.prototype.read=function(a,e){this._reads.push({length:Math.abs(a),allowLess:a<0,func:e})};Y2e.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let a=this._reads[0];if(this._buffer.length&&(this._buffer.length>=a.length||a.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(a.length),a.func.call(this,e.slice(0,a.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var eBe=be(Z2e=>{"use strict";var $3a=Sae(),H3a=vae();Z2e.process=function(a,e){let i=[],t=new $3a(a);return new H3a(e,{read:t.read.bind(t),write:function(n){i.push(n)},complete:function(){}}).start(),t.process(),Buffer.concat(i)}});var rBe=be((r6t,tBe)=>{"use strict";var aBe=!0,iBe=rt("zlib"),X3a=Q2e();iBe.deflateSync||(aBe=!1);var Q3a=Sae(),Y3a=eBe(),J3a=kae(),Z3a=qae(),eXa=jae();tBe.exports=function(a,e){if(!aBe)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i;function t(k){i=k}let r;function n(k){r=k}function s(k){r.transColor=k}function o(k){r.palette=k}function d(){r.alpha=!0}let l;function m(k){l=k}let c=[];function u(k){c.push(k)}let f=new Q3a(a);if(new J3a(e,{read:f.read.bind(f),error:t,metadata:n,gamma:m,palette:o,transColor:s,inflateData:u,simpleTransparency:d}).start(),f.process(),i)throw i;let _=Buffer.concat(c);c.length=0;let h;if(r.interlace)h=iBe.inflateSync(_);else{let y=((r.width*r.bpp*r.depth+7>>3)+1)*r.height;h=X3a(_,{chunkSize:y,maxLength:y})}if(_=null,!h||!h.length)throw new Error("bad png - invalid inflate data response");let v=Y3a.process(h,r);_=null;let w=Z3a.dataToBitMap(v,r);v=null;let g=eXa(w,r,e.skipRescale);return r.data=g,r.gamma=l||0,r}});var dBe=be((n6t,oBe)=>{"use strict";var nBe=!0,sBe=rt("zlib");sBe.deflateSync||(nBe=!1);var aXa=Vk(),iXa=Iae();oBe.exports=function(a,e){if(!nBe)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i=e||{},t=new iXa(i),r=[];r.push(Buffer.from(aXa.PNG_SIGNATURE)),r.push(t.packIHDR(a.width,a.height)),a.gamma&&r.push(t.packGAMA(a.gamma));let n=t.filterData(a.data,a.width,a.height),s=sBe.deflateSync(n,t.getDeflateOptions());if(n=null,!s||!s.length)throw new Error("bad png - invalid compressed data response");return r.push(t.packIDAT(s)),r.push(t.packIEND()),Buffer.concat(r)}});var lBe=be(Tae=>{"use strict";var tXa=rBe(),rXa=dBe();Tae.read=function(a,e){return tXa(a,e||{})};Tae.write=function(a,e){return rXa(a,e)}});var aF=be(cBe=>{"use strict";var nXa=rt("util"),mBe=rt("stream"),sXa=x2e(),oXa=V2e(),dXa=lBe(),Us=cBe.PNG=function(a){mBe.call(this),a=a||{},this.width=a.width|0,this.height=a.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,a.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new sXa(a),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new oXa(a),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};nXa.inherits(Us,mBe);Us.sync=dXa;Us.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};Us.prototype.parse=function(a,e){if(e){let i,t;i=function(r){this.removeListener("error",t),this.data=r,e(null,this)}.bind(this),t=function(r){this.removeListener("parsed",i),e(r,null)}.bind(this),this.once("parsed",i),this.once("error",t)}return this.end(a),this};Us.prototype.write=function(a){return this._parser.write(a),!0};Us.prototype.end=function(a){this._parser.end(a)};Us.prototype._metadata=function(a){this.width=a.width,this.height=a.height,this.emit("metadata",a)};Us.prototype._gamma=function(a){this.gamma=a};Us.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};Us.bitblt=function(a,e,i,t,r,n,s,o){if(i|=0,t|=0,r|=0,n|=0,s|=0,o|=0,i>a.width||t>a.height||i+r>a.width||t+n>a.height)throw new Error("bitblt reading outside image");if(s>e.width||o>e.height||s+r>e.width||o+n>e.height)throw new Error("bitblt writing outside image");for(let d=0;d<n;d++)a.data.copy(e.data,(o+d)*e.width+s<<2,(t+d)*a.width+i<<2,(t+d)*a.width+i+r<<2)};Us.prototype.bitblt=function(a,e,i,t,r,n,s){return Us.bitblt(this,a,e,i,t,r,n,s),this};Us.adjustGamma=function(a){if(a.gamma){for(let e=0;e<a.height;e++)for(let i=0;i<a.width;i++){let t=a.width*e+i<<2;for(let r=0;r<3;r++){let n=a.data[t+r]/255;n=Math.pow(n,1/2.2/a.gamma),a.data[t+r]=Math.round(n*255)}}a.gamma=0}};Us.prototype.adjustGamma=function(){Us.adjustGamma(this)}});var Wte=be((tnr,AWe)=>{AWe.exports=rt("stream")});var fA=be((Gte,DWe)=>{var nK=rt("buffer"),mf=nK.Buffer;function RWe(a,e){for(var i in a)e[i]=a[i]}mf.from&&mf.alloc&&mf.allocUnsafe&&mf.allocUnsafeSlow?DWe.exports=nK:(RWe(nK,Gte),Gte.Buffer=Iq);function Iq(a,e,i){return mf(a,e,i)}RWe(mf,Iq);Iq.from=function(a,e,i){if(typeof a=="number")throw new TypeError("Argument must not be a number");return mf(a,e,i)};Iq.alloc=function(a,e,i){if(typeof a!="number")throw new TypeError("Argument must be a number");var t=mf(a);return e!==void 0?typeof i=="string"?t.fill(e,i):t.fill(e):t.fill(0),t};Iq.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return mf(a)};Iq.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return nK.SlowBuffer(a)}});var MWe=be((rnr,$te)=>{"use strict";function xti(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}var xWe=fA().Buffer,NA=rt("util");function Mti(a,e,i){a.copy(e,i)}$te.exports=(function(){function a(){xti(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(i){var t={data:i,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},a.prototype.unshift=function(i){var t={data:i,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},a.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(i){if(this.length===0)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=i+t.data;return r},a.prototype.concat=function(i){if(this.length===0)return xWe.alloc(0);for(var t=xWe.allocUnsafe(i>>>0),r=this.head,n=0;r;)Mti(r.data,t,n),n+=r.data.length,r=r.next;return t},a})();NA&&NA.inspect&&NA.inspect.custom&&($te.exports.prototype[NA.inspect.custom]=function(){var a=NA.inspect({length:this.length});return this.constructor.name+" "+a})});var Hte=be((nnr,PWe)=>{"use strict";var sK=h0();function Pti(a,e){var i=this,t=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return t||r?(e?e(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,sK.nextTick(oK,this,a)):sK.nextTick(oK,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(n){!e&&n?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,sK.nextTick(oK,i,n)):sK.nextTick(oK,i,n):e&&e(n)}),this)}function Lti(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function oK(a,e){a.emit("error",e)}PWe.exports={destroy:Pti,undestroy:Lti}});var Qte=be((snr,VWe)=>{"use strict";var ow=h0();VWe.exports=xr;function OWe(a){var e=this;this.next=null,this.entry=null,this.finish=function(){ari(e,a)}}var Oti=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:ow.nextTick,Sq;xr.WritableState=_A;var BWe=Object.create(rS());BWe.inherits=nS();var Bti={deprecate:qCa()},UWe=Wte(),lK=fA().Buffer,Uti=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fti(a){return lK.from(a)}function zti(a){return lK.isBuffer(a)||a instanceof Uti}var FWe=Hte();BWe.inherits(xr,UWe);function Kti(){}function _A(a,e){Sq=Sq||dw(),a=a||{};var i=e instanceof Sq;this.objectMode=!!a.objectMode,i&&(this.objectMode=this.objectMode||!!a.writableObjectMode);var t=a.highWaterMark,r=a.writableHighWaterMark,n=this.objectMode?16:16*1024;t||t===0?this.highWaterMark=t:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=n,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=a.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Qti(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new OWe(this)}_A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,i=[];e;)i.push(e),e=e.next;return i};(function(){try{Object.defineProperty(_A.prototype,"buffer",{get:Bti.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var dK;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(dK=Function.prototype[Symbol.hasInstance],Object.defineProperty(xr,Symbol.hasInstance,{value:function(a){return dK.call(this,a)?!0:this!==xr?!1:a&&a._writableState instanceof _A}})):dK=function(a){return a instanceof this};function xr(a){if(Sq=Sq||dw(),!dK.call(xr,this)&&!(this instanceof Sq))return new xr(a);this._writableState=new _A(a,this),this.writable=!0,a&&(typeof a.write=="function"&&(this._write=a.write),typeof a.writev=="function"&&(this._writev=a.writev),typeof a.destroy=="function"&&(this._destroy=a.destroy),typeof a.final=="function"&&(this._final=a.final)),UWe.call(this)}xr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Vti(a,e){var i=new Error("write after end");a.emit("error",i),ow.nextTick(e,i)}function Wti(a,e,i,t){var r=!0,n=!1;return i===null?n=new TypeError("May not write null values to stream"):typeof i!="string"&&i!==void 0&&!e.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n&&(a.emit("error",n),ow.nextTick(t,n),r=!1),r}xr.prototype.write=function(a,e,i){var t=this._writableState,r=!1,n=!t.objectMode&&zti(a);return n&&!lK.isBuffer(a)&&(a=Fti(a)),typeof e=="function"&&(i=e,e=null),n?e="buffer":e||(e=t.defaultEncoding),typeof i!="function"&&(i=Kti),t.ended?Vti(this,i):(n||Wti(this,t,a,i))&&(t.pendingcb++,r=$ti(this,t,n,a,e,i)),r};xr.prototype.cork=function(){var a=this._writableState;a.corked++};xr.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,!a.writing&&!a.corked&&!a.bufferProcessing&&a.bufferedRequest&&zWe(this,a))};xr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function Gti(a,e,i){return!a.objectMode&&a.decodeStrings!==!1&&typeof e=="string"&&(e=lK.from(e,i)),e}Object.defineProperty(xr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $ti(a,e,i,t,r,n){if(!i){var s=Gti(e,t,r);t!==s&&(i=!0,r="buffer",t=s)}var o=e.objectMode?1:t.length;e.length+=o;var d=e.length<e.highWaterMark;if(d||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:t,encoding:r,isBuf:i,callback:n,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Xte(a,e,!1,o,t,r,n);return d}function Xte(a,e,i,t,r,n,s){e.writelen=t,e.writecb=s,e.writing=!0,e.sync=!0,i?a._writev(r,e.onwrite):a._write(r,n,e.onwrite),e.sync=!1}function Hti(a,e,i,t,r){--e.pendingcb,i?(ow.nextTick(r,t),ow.nextTick(pA,a,e),a._writableState.errorEmitted=!0,a.emit("error",t)):(r(t),a._writableState.errorEmitted=!0,a.emit("error",t),pA(a,e))}function Xti(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function Qti(a,e){var i=a._writableState,t=i.sync,r=i.writecb;if(Xti(i),e)Hti(a,i,t,e,r);else{var n=KWe(i);!n&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest&&zWe(a,i),t?Oti(LWe,a,i,n,r):LWe(a,i,n,r)}}function LWe(a,e,i,t){i||Yti(a,e),e.pendingcb--,t(),pA(a,e)}function Yti(a,e){e.length===0&&e.needDrain&&(e.needDrain=!1,a.emit("drain"))}function zWe(a,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(a._writev&&i&&i.next){var t=e.bufferedRequestCount,r=new Array(t),n=e.corkedRequestsFree;n.entry=i;for(var s=0,o=!0;i;)r[s]=i,i.isBuf||(o=!1),i=i.next,s+=1;r.allBuffers=o,Xte(a,e,!0,e.length,r,"",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new OWe(e),e.bufferedRequestCount=0}else{for(;i;){var d=i.chunk,l=i.encoding,m=i.callback,c=e.objectMode?1:d.length;if(Xte(a,e,!1,c,d,l,m),i=i.next,e.bufferedRequestCount--,e.writing)break}i===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=i,e.bufferProcessing=!1}xr.prototype._write=function(a,e,i){i(new Error("_write() is not implemented"))};xr.prototype._writev=null;xr.prototype.end=function(a,e,i){var t=this._writableState;typeof a=="function"?(i=a,a=null,e=null):typeof e=="function"&&(i=e,e=null),a!=null&&this.write(a,e),t.corked&&(t.corked=1,this.uncork()),t.ending||eri(this,t,i)};function KWe(a){return a.ending&&a.length===0&&a.bufferedRequest===null&&!a.finished&&!a.writing}function Jti(a,e){a._final(function(i){e.pendingcb--,i&&a.emit("error",i),e.prefinished=!0,a.emit("prefinish"),pA(a,e)})}function Zti(a,e){!e.prefinished&&!e.finalCalled&&(typeof a._final=="function"?(e.pendingcb++,e.finalCalled=!0,ow.nextTick(Jti,a,e)):(e.prefinished=!0,a.emit("prefinish")))}function pA(a,e){var i=KWe(e);return i&&(Zti(a,e),e.pendingcb===0&&(e.finished=!0,a.emit("finish"))),i}function eri(a,e,i){e.ending=!0,pA(a,e),i&&(e.finished?ow.nextTick(i):a.once("finish",i)),e.ended=!0,a.writable=!1}function ari(a,e,i){var t=a.entry;for(a.entry=null;t;){var r=t.callback;e.pendingcb--,r(i),t=t.next}e.corkedRequestsFree.next=a}Object.defineProperty(xr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=a)}});xr.prototype.destroy=FWe.destroy;xr.prototype._undestroy=FWe.undestroy;xr.prototype._destroy=function(a,e){this.end(),e(a)}});var dw=be((onr,HWe)=>{"use strict";var WWe=h0(),iri=Object.keys||function(a){var e=[];for(var i in a)e.push(i);return e};HWe.exports=cf;var GWe=Object.create(rS());GWe.inherits=nS();var $We=Zte(),Jte=Qte();GWe.inherits(cf,$We);for(Yte=iri(Jte.prototype),mK=0;mK<Yte.length;mK++)cK=Yte[mK],cf.prototype[cK]||(cf.prototype[cK]=Jte.prototype[cK]);var Yte,cK,mK;function cf(a){if(!(this instanceof cf))return new cf(a);$We.call(this,a),Jte.call(this,a),a&&a.readable===!1&&(this.readable=!1),a&&a.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,a&&a.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",tri)}Object.defineProperty(cf.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tri(){this.allowHalfOpen||this._writableState.ended||WWe.nextTick(rri,this)}function rri(a){a.end()}Object.defineProperty(cf.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=a,this._writableState.destroyed=a)}});cf.prototype._destroy=function(a,e){this.push(null),this.end(),WWe.nextTick(e,a)}});var ire=be(QWe=>{"use strict";var are=fA().Buffer,XWe=are.isEncoding||function(a){switch(a=""+a,a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function nri(a){if(!a)return"utf8";for(var e;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(e)return;a=(""+a).toLowerCase(),e=!0}}function sri(a){var e=nri(a);if(typeof e!="string"&&(are.isEncoding===XWe||!XWe(a)))throw new Error("Unknown encoding: "+a);return e||a}QWe.StringDecoder=hA;function hA(a){this.encoding=sri(a);var e;switch(this.encoding){case"utf16le":this.text=uri,this.end=fri,e=4;break;case"utf8":this.fillLast=lri,e=4;break;case"base64":this.text=Nri,this.end=pri,e=3;break;default:this.write=_ri,this.end=hri;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=are.allocUnsafe(e)}hA.prototype.write=function(a){if(a.length===0)return"";var e,i;if(this.lastNeed){if(e=this.fillLast(a),e===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<a.length?e?e+this.text(a,i):this.text(a,i):e||""};hA.prototype.end=cri;hA.prototype.text=mri;hA.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length};function ere(a){return a<=127?0:a>>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function ori(a,e,i){var t=e.length-1;if(t<i)return 0;var r=ere(e[t]);return r>=0?(r>0&&(a.lastNeed=r-1),r):--t<i||r===-2?0:(r=ere(e[t]),r>=0?(r>0&&(a.lastNeed=r-2),r):--t<i||r===-2?0:(r=ere(e[t]),r>=0?(r>0&&(r===2?r=0:a.lastNeed=r-3),r):0))}function dri(a,e,i){if((e[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function lri(a){var e=this.lastTotal-this.lastNeed,i=dri(this,a,e);if(i!==void 0)return i;if(this.lastNeed<=a.length)return a.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,e,0,a.length),this.lastNeed-=a.length}function mri(a,e){var i=ori(this,a,e);if(!this.lastNeed)return a.toString("utf8",e);this.lastTotal=i;var t=a.length-(i-this.lastNeed);return a.copy(this.lastChar,0,t),a.toString("utf8",e,t)}function cri(a){var e=a&&a.length?this.write(a):"";return this.lastNeed?e+"\uFFFD":e}function uri(a,e){if((a.length-e)%2===0){var i=a.toString("utf16le",e);if(i){var t=i.charCodeAt(i.length-1);if(t>=55296&&t<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",e,a.length-1)}function fri(a){var e=a&&a.length?this.write(a):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function Nri(a,e){var i=(a.length-e)%3;return i===0?a.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,i===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",e,a.length-i))}function pri(a){var e=a&&a.length?this.write(a):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function _ri(a){return a.toString(this.encoding)}function hri(a){return a&&a.length?this.write(a):""}});var Zte=be((mnr,dGe)=>{"use strict";var Eq=h0();dGe.exports=xt;var vri=kCa(),vA;xt.ReadableState=tGe;var lnr=rt("events").EventEmitter,eGe=function(a,e){return a.listeners(e).length},ore=Wte(),wA=fA().Buffer,wri=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function gri(a){return wA.from(a)}function yri(a){return wA.isBuffer(a)||a instanceof wri}var aGe=Object.create(rS());aGe.inherits=nS();var tre=rt("util"),Pi=void 0;tre&&tre.debuglog?Pi=tre.debuglog("stream"):Pi=function(){};var kri=MWe(),iGe=Hte(),Tq;aGe.inherits(xt,ore);var rre=["error","close","destroy","pause","resume"];function qri(a,e,i){if(typeof a.prependListener=="function")return a.prependListener(e,i);!a._events||!a._events[e]?a.on(e,i):vri(a._events[e])?a._events[e].unshift(i):a._events[e]=[i,a._events[e]]}function tGe(a,e){vA=vA||dw(),a=a||{};var i=e instanceof vA;this.objectMode=!!a.objectMode,i&&(this.objectMode=this.objectMode||!!a.readableObjectMode);var t=a.highWaterMark,r=a.readableHighWaterMark,n=this.objectMode?16:16*1024;t||t===0?this.highWaterMark=t:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new kri,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=a.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(Tq||(Tq=ire().StringDecoder),this.decoder=new Tq(a.encoding),this.encoding=a.encoding)}function xt(a){if(vA=vA||dw(),!(this instanceof xt))return new xt(a);this._readableState=new tGe(a,this),this.readable=!0,a&&(typeof a.read=="function"&&(this._read=a.read),typeof a.destroy=="function"&&(this._destroy=a.destroy)),ore.call(this)}Object.defineProperty(xt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}});xt.prototype.destroy=iGe.destroy;xt.prototype._undestroy=iGe.undestroy;xt.prototype._destroy=function(a,e){this.push(null),e(a)};xt.prototype.push=function(a,e){var i=this._readableState,t;return i.objectMode?t=!0:typeof a=="string"&&(e=e||i.defaultEncoding,e!==i.encoding&&(a=wA.from(a,e),e=""),t=!0),rGe(this,a,e,!1,t)};xt.prototype.unshift=function(a){return rGe(this,a,null,!0,!1)};function rGe(a,e,i,t,r){var n=a._readableState;if(e===null)n.reading=!1,Sri(a,n);else{var s;r||(s=jri(n,e)),s?a.emit("error",s):n.objectMode||e&&e.length>0?(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==wA.prototype&&(e=gri(e)),t?n.endEmitted?a.emit("error",new Error("stream.unshift() after end event")):nre(a,n,e,!0):n.ended?a.emit("error",new Error("stream.push() after EOF")):(n.reading=!1,n.decoder&&!i?(e=n.decoder.write(e),n.objectMode||e.length!==0?nre(a,n,e,!1):nGe(a,n)):nre(a,n,e,!1))):t||(n.reading=!1)}return bri(n)}function nre(a,e,i,t){e.flowing&&e.length===0&&!e.sync?(a.emit("data",i),a.read(0)):(e.length+=e.objectMode?1:i.length,t?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&uK(a)),nGe(a,e)}function jri(a,e){var i;return!yri(e)&&typeof e!="string"&&e!==void 0&&!a.objectMode&&(i=new TypeError("Invalid non-string/buffer chunk")),i}function bri(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||a.length===0)}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(a){return Tq||(Tq=ire().StringDecoder),this._readableState.decoder=new Tq(a),this._readableState.encoding=a,this};var YWe=8388608;function Iri(a){return a>=YWe?a=YWe:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function JWe(a,e){return a<=0||e.length===0&&e.ended?0:e.objectMode?1:a!==a?e.flowing&&e.length?e.buffer.head.data.length:e.length:(a>e.highWaterMark&&(e.highWaterMark=Iri(a)),a<=e.length?a:e.ended?e.length:(e.needReadable=!0,0))}xt.prototype.read=function(a){Pi("read",a),a=parseInt(a,10);var e=this._readableState,i=a;if(a!==0&&(e.emittedReadable=!1),a===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Pi("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?sre(this):uK(this),null;if(a=JWe(a,e),a===0&&e.ended)return e.length===0&&sre(this),null;var t=e.needReadable;Pi("need readable",t),(e.length===0||e.length-a<e.highWaterMark)&&(t=!0,Pi("length less than watermark",t)),e.ended||e.reading?(t=!1,Pi("reading or ended",t)):t&&(Pi("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(a=JWe(i,e)));var r;return a>0?r=sGe(a,e):r=null,r===null?(e.needReadable=!0,a=0):e.length-=a,e.length===0&&(e.ended||(e.needReadable=!0),i!==a&&e.ended&&sre(this)),r!==null&&this.emit("data",r),r};function Sri(a,e){if(!e.ended){if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,uK(a)}}function uK(a){var e=a._readableState;e.needReadable=!1,e.emittedReadable||(Pi("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Eq.nextTick(ZWe,a):ZWe(a))}function ZWe(a){Pi("emit readable"),a.emit("readable"),dre(a)}function nGe(a,e){e.readingMore||(e.readingMore=!0,Eq.nextTick(Tri,a,e))}function Tri(a,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Pi("maybeReadMore read 0"),a.read(0),i!==e.length);)i=e.length;e.readingMore=!1}xt.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))};xt.prototype.pipe=function(a,e){var i=this,t=this._readableState;switch(t.pipesCount){case 0:t.pipes=a;break;case 1:t.pipes=[t.pipes,a];break;default:t.pipes.push(a);break}t.pipesCount+=1,Pi("pipe count=%d opts=%j",t.pipesCount,e);var r=(!e||e.end!==!1)&&a!==process.stdout&&a!==process.stderr,n=r?o:h;t.endEmitted?Eq.nextTick(n):i.once("end",n),a.on("unpipe",s);function s(v,w){Pi("onunpipe"),v===i&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,m())}function o(){Pi("onend"),a.end()}var d=Eri(i);a.on("drain",d);var l=!1;function m(){Pi("cleanup"),a.removeListener("close",N),a.removeListener("finish",_),a.removeListener("drain",d),a.removeListener("error",f),a.removeListener("unpipe",s),i.removeListener("end",o),i.removeListener("end",h),i.removeListener("data",u),l=!0,t.awaitDrain&&(!a._writableState||a._writableState.needDrain)&&d()}var c=!1;i.on("data",u);function u(v){Pi("ondata"),c=!1;var w=a.write(v);w===!1&&!c&&((t.pipesCount===1&&t.pipes===a||t.pipesCount>1&&oGe(t.pipes,a)!==-1)&&!l&&(Pi("false write response, pause",t.awaitDrain),t.awaitDrain++,c=!0),i.pause())}function f(v){Pi("onerror",v),h(),a.removeListener("error",f),eGe(a,"error")===0&&a.emit("error",v)}qri(a,"error",f);function N(){a.removeListener("finish",_),h()}a.once("close",N);function _(){Pi("onfinish"),a.removeListener("close",N),h()}a.once("finish",_);function h(){Pi("unpipe"),i.unpipe(a)}return a.emit("pipe",i),t.flowing||(Pi("pipe resume"),i.resume()),a};function Eri(a){return function(){var e=a._readableState;Pi("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&eGe(a,"data")&&(e.flowing=!0,dre(a))}}xt.prototype.unpipe=function(a){var e=this._readableState,i={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return a&&a!==e.pipes?this:(a||(a=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,a&&a.emit("unpipe",this,i),this);if(!a){var t=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)t[n].emit("unpipe",this,{hasUnpiped:!1});return this}var s=oGe(e.pipes,a);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),a.emit("unpipe",this,i),this)};xt.prototype.on=function(a,e){var i=ore.prototype.on.call(this,a,e);if(a==="data")this._readableState.flowing!==!1&&this.resume();else if(a==="readable"){var t=this._readableState;!t.endEmitted&&!t.readableListening&&(t.readableListening=t.needReadable=!0,t.emittedReadable=!1,t.reading?t.length&&uK(this):Eq.nextTick(Cri,this))}return i};xt.prototype.addListener=xt.prototype.on;function Cri(a){Pi("readable nexttick read 0"),a.read(0)}xt.prototype.resume=function(){var a=this._readableState;return a.flowing||(Pi("resume"),a.flowing=!0,Ari(this,a)),this};function Ari(a,e){e.resumeScheduled||(e.resumeScheduled=!0,Eq.nextTick(Rri,a,e))}function Rri(a,e){e.reading||(Pi("resume read 0"),a.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,a.emit("resume"),dre(a),e.flowing&&!e.reading&&a.read(0)}xt.prototype.pause=function(){return Pi("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Pi("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function dre(a){var e=a._readableState;for(Pi("flow",e.flowing);e.flowing&&a.read()!==null;);}xt.prototype.wrap=function(a){var e=this,i=this._readableState,t=!1;a.on("end",function(){if(Pi("wrapped end"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),a.on("data",function(s){if(Pi("wrapped data"),i.decoder&&(s=i.decoder.write(s)),!(i.objectMode&&s==null)&&!(!i.objectMode&&(!s||!s.length))){var o=e.push(s);o||(t=!0,a.pause())}});for(var r in a)this[r]===void 0&&typeof a[r]=="function"&&(this[r]=(function(s){return function(){return a[s].apply(a,arguments)}})(r));for(var n=0;n<rre.length;n++)a.on(rre[n],this.emit.bind(this,rre[n]));return this._read=function(s){Pi("wrapped _read",s),t&&(t=!1,a.resume())},this};Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});xt._fromList=sGe;function sGe(a,e){if(e.length===0)return null;var i;return e.objectMode?i=e.buffer.shift():!a||a>=e.length?(e.decoder?i=e.buffer.join(""):e.buffer.length===1?i=e.buffer.head.data:i=e.buffer.concat(e.length),e.buffer.clear()):i=Dri(a,e.buffer,e.decoder),i}function Dri(a,e,i){var t;return a<e.head.data.length?(t=e.head.data.slice(0,a),e.head.data=e.head.data.slice(a)):a===e.head.data.length?t=e.shift():t=i?xri(a,e):Mri(a,e),t}function xri(a,e){var i=e.head,t=1,r=i.data;for(a-=r.length;i=i.next;){var n=i.data,s=a>n.length?n.length:a;if(s===n.length?r+=n:r+=n.slice(0,a),a-=s,a===0){s===n.length?(++t,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=n.slice(s));break}++t}return e.length-=t,r}function Mri(a,e){var i=wA.allocUnsafe(a),t=e.head,r=1;for(t.data.copy(i),a-=t.data.length;t=t.next;){var n=t.data,s=a>n.length?n.length:a;if(n.copy(i,i.length-a,0,s),a-=s,a===0){s===n.length?(++r,t.next?e.head=t.next:e.head=e.tail=null):(e.head=t,t.data=n.slice(s));break}++r}return e.length-=r,i}function sre(a){var e=a._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Eq.nextTick(Pri,e,a))}function Pri(a,e){!a.endEmitted&&a.length===0&&(a.endEmitted=!0,e.readable=!1,e.emit("end"))}function oGe(a,e){for(var i=0,t=a.length;i<t;i++)if(a[i]===e)return i;return-1}});var lre=be((cnr,cGe)=>{"use strict";cGe.exports=uf;var fK=dw(),mGe=Object.create(rS());mGe.inherits=nS();mGe.inherits(uf,fK);function Lri(a,e){var i=this._transformState;i.transforming=!1;var t=i.writecb;if(!t)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,e!=null&&this.push(e),t(a);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function uf(a){if(!(this instanceof uf))return new uf(a);fK.call(this,a),this._transformState={afterTransform:Lri.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",Ori)}function Ori(){var a=this;typeof this._flush=="function"?this._flush(function(e,i){lGe(a,e,i)}):lGe(this,null,null)}uf.prototype.push=function(a,e){return this._transformState.needTransform=!1,fK.prototype.push.call(this,a,e)};uf.prototype._transform=function(a,e,i){throw new Error("_transform() is not implemented")};uf.prototype._write=function(a,e,i){var t=this._transformState;if(t.writecb=i,t.writechunk=a,t.writeencoding=e,!t.transforming){var r=this._readableState;(t.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}};uf.prototype._read=function(a){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};uf.prototype._destroy=function(a,e){var i=this;fK.prototype._destroy.call(this,a,function(t){e(t),i.emit("close")})};function lGe(a,e,i){if(e)return a.emit("error",e);if(i!=null&&a.push(i),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}});var pGe=be((unr,NGe)=>{"use strict";NGe.exports=gA;var uGe=lre(),fGe=Object.create(rS());fGe.inherits=nS();fGe.inherits(gA,uGe);function gA(a){if(!(this instanceof gA))return new gA(a);uGe.call(this,a)}gA.prototype._transform=function(a,e,i){i(null,a)}});var _Ge=be((Hn,NK)=>{var Pc=rt("stream");process.env.READABLE_STREAM==="disable"&&Pc?(NK.exports=Pc,Hn=NK.exports=Pc.Readable,Hn.Readable=Pc.Readable,Hn.Writable=Pc.Writable,Hn.Duplex=Pc.Duplex,Hn.Transform=Pc.Transform,Hn.PassThrough=Pc.PassThrough,Hn.Stream=Pc):(Hn=NK.exports=Zte(),Hn.Stream=Pc||Hn,Hn.Readable=Hn,Hn.Writable=Qte(),Hn.Duplex=dw(),Hn.Transform=lre(),Hn.PassThrough=pGe())});var vGe=be((fnr,hGe)=>{hGe.exports=_Ge().PassThrough});var kGe=be((Nnr,yGe)=>{var wGe=rt("util"),hK=vGe();yGe.exports={Readable:pK,Writable:_K};wGe.inherits(pK,hK);wGe.inherits(_K,hK);function gGe(a,e,i){a[e]=function(){return delete a[e],i.apply(this,arguments),this[e].apply(this,arguments)}}function pK(a,e){if(!(this instanceof pK))return new pK(a,e);hK.call(this,e),gGe(this,"_read",function(){var i=a.call(this,e),t=this.emit.bind(this,"error");i.on("error",t),i.pipe(this)}),this.emit("readable")}function _K(a,e){if(!(this instanceof _K))return new _K(a,e);hK.call(this,e),gGe(this,"_write",function(){var i=a.call(this,e),t=this.emit.bind(this,"error");i.on("error",t),this.pipe(i)}),this.emit("writable")}});var aia=be((fLr,eia)=>{function Zaa(a){this.buffer=a.data,this.width=a.width,this.height=a.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag="BM",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}Zaa.prototype.encode=function(){var a=new Buffer(this.offset+this.rgbSize);this.pos=0,a.write(this.flag,this.pos,2),this.pos+=2,a.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,a.writeUInt32LE(this.reserved,this.pos),this.pos+=4,a.writeUInt32LE(this.offset,this.pos),this.pos+=4,a.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,a.writeUInt32LE(this.width,this.pos),this.pos+=4,a.writeInt32LE(-this.height,this.pos),this.pos+=4,a.writeUInt16LE(this.planes,this.pos),this.pos+=2,a.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,a.writeUInt32LE(this.compress,this.pos),this.pos+=4,a.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,a.writeUInt32LE(this.hr,this.pos),this.pos+=4,a.writeUInt32LE(this.vr,this.pos),this.pos+=4,a.writeUInt32LE(this.colors,this.pos),this.pos+=4,a.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var e=0,i=3*this.width+this.extraBytes,t=0;t<this.height;t++){for(var r=0;r<this.width;r++){var n=this.pos+t*i+r*3;e++,a[n]=this.buffer[e++],a[n+1]=this.buffer[e++],a[n+2]=this.buffer[e++]}if(this.extraBytes>0){var s=this.pos+t*i+this.width*3;a.fill(0,s,s+this.extraBytes)}}return a};eia.exports=function(a,e){typeof e>"u"&&(e=100);var i=new Zaa(a),t=i.encode();return{data:t,width:a.width,height:a.height}}});var tia=be((NLr,iia)=>{function Am(a,e){if(this.pos=0,this.buffer=a,this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),this.flag!="BM")throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}Am.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var a=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(a);for(var e=0;e<a;e++){var i=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);this.palette[e]={red:r,green:t,blue:i,quad:n}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)};Am.prototype.parseRGBA=function(){var a="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Buffer(e),this[a]()};Am.prototype.bit1=function(){for(var a=Math.ceil(this.width/8),e=a%4,i=this.height>=0?this.height-1:-this.height,i=this.height-1;i>=0;i--){for(var t=this.bottom_up?i:this.height-1-i,r=0;r<a;r++)for(var n=this.buffer.readUInt8(this.pos++),s=t*this.width*4+r*8*4,o=0;o<8&&r*8+o<this.width;o++){var d=this.palette[n>>7-o&1];this.data[s+o*4]=0,this.data[s+o*4+1]=d.blue,this.data[s+o*4+2]=d.green,this.data[s+o*4+3]=d.red}e!=0&&(this.pos+=4-e)}};Am.prototype.bit4=function(){if(this.compress==2){let h=function(v){var w=this.palette[v];this.data[a]=0,this.data[a+1]=w.blue,this.data[a+2]=w.green,this.data[a+3]=w.red,a+=4};var _=h;this.data.fill(255);for(var a=0,e=this.bottom_up?this.height-1:0,i=!1;a<this.data.length;){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++);if(t==0)if(r==0){this.bottom_up?e--:e++,a=e*this.width*4,i=!1;continue}else{if(r==1)break;if(r==2){var n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=s:e+=s,a+=s*this.width*4+n*4}else{for(var o=this.buffer.readUInt8(this.pos++),d=0;d<r;d++)i?h.call(this,o&15):h.call(this,(o&240)>>4),d&1&&d+1<r&&(o=this.buffer.readUInt8(this.pos++)),i=!i;(r+1>>1&1)==1&&this.pos++}}else for(var d=0;d<t;d++)i?h.call(this,r&15):h.call(this,(r&240)>>4),i=!i}}else for(var l=Math.ceil(this.width/2),m=l%4,s=this.height-1;s>=0;s--){for(var c=this.bottom_up?s:this.height-1-s,n=0;n<l;n++){var r=this.buffer.readUInt8(this.pos++),a=c*this.width*4+n*2*4,u=r>>4,f=r&15,N=this.palette[u];if(this.data[a]=0,this.data[a+1]=N.blue,this.data[a+2]=N.green,this.data[a+3]=N.red,n*2+1>=this.width)break;N=this.palette[f],this.data[a+4]=0,this.data[a+4+1]=N.blue,this.data[a+4+2]=N.green,this.data[a+4+3]=N.red}m!=0&&(this.pos+=4-m)}};Am.prototype.bit8=function(){if(this.compress==1){let u=function(f){var N=this.palette[f];this.data[a]=0,this.data[a+1]=N.blue,this.data[a+2]=N.green,this.data[a+3]=N.red,a+=4};var c=u;this.data.fill(255);for(var a=0,e=this.bottom_up?this.height-1:0;a<this.data.length;){var i=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++);if(i==0)if(t==0){this.bottom_up?e--:e++,a=e*this.width*4;continue}else{if(t==1)break;if(t==2){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=n:e+=n,a+=n*this.width*4+r*4}else{for(var s=0;s<t;s++){var o=this.buffer.readUInt8(this.pos++);u.call(this,o)}t&!0&&this.pos++}}else for(var s=0;s<i;s++)u.call(this,t)}}else for(var d=this.width%4,n=this.height-1;n>=0;n--){for(var l=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var t=this.buffer.readUInt8(this.pos++),a=l*this.width*4+r*4;if(t<this.palette.length){var m=this.palette[t];this.data[a]=0,this.data[a+1]=m.blue,this.data[a+2]=m.green,this.data[a+3]=m.red}else this.data[a]=0,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}d!=0&&(this.pos+=4-d)}};Am.prototype.bit15=function(){for(var a=this.width%3,e=parseInt("11111",2),i=e,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var s=this.buffer.readUInt16LE(this.pos);this.pos+=2;var o=(s&i)/i*255|0,d=(s>>5&i)/i*255|0,l=(s>>10&i)/i*255|0,m=s>>15?255:0,c=r*this.width*4+n*4;this.data[c]=m,this.data[c+1]=o,this.data[c+2]=d,this.data[c+3]=l}this.pos+=a}};Am.prototype.bit16=function(){var a=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,this.compress==3&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var e=[0,0,0],i=0;i<16;i++)this.maskRed>>i&1&&e[0]++,this.maskGreen>>i&1&&e[1]++,this.maskBlue>>i&1&&e[2]++;e[1]+=e[0],e[2]+=e[1],e[0]=8-e[0],e[1]-=8,e[2]-=8;for(var t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var s=this.buffer.readUInt16LE(this.pos);this.pos+=2;var o=(s&this.maskBlue)<<e[0],d=(s&this.maskGreen)>>e[1],l=(s&this.maskRed)>>e[2],m=r*this.width*4+n*4;this.data[m]=0,this.data[m+1]=o,this.data[m+2]=d,this.data[m+3]=l}this.pos+=a}};Am.prototype.bit24=function(){for(var a=this.height-1;a>=0;a--){for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=e*this.width*4+i*4;this.data[s]=0,this.data[s+1]=t,this.data[s+2]=r,this.data[s+3]=n}this.pos+=this.width%4}};Am.prototype.bit32=function(){if(this.compress==3){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var a=this.height-1;a>=0;a--)for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++),o=e*this.width*4+i*4;this.data[o]=t,this.data[o+1]=r,this.data[o+2]=n,this.data[o+3]=s}}else for(var a=this.height-1;a>=0;a--)for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++),o=e*this.width*4+i*4;this.data[o]=t,this.data[o+1]=r,this.data[o+2]=n,this.data[o+3]=s}};Am.prototype.getData=function(){return this.data};iia.exports=function(a){var e=new Am(a);return e}});var nia=be((pLr,ria)=>{var QBi=aia(),YBi=tia();ria.exports={encode:QBi,decode:YBi}});var Ua=be((EVr,bna)=>{bna.exports={options:{usePureJavaScript:!1}}});var Tna=be((CVr,Sna)=>{var vue={};Sna.exports=vue;var Ina={};vue.encode=function(a,e,i){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(i!==void 0&&typeof i!="number")throw new TypeError('"maxline" must be a number.');var t="";if(!(a instanceof Uint8Array))t=VGi(a,e);else{var r=0,n=e.length,s=e.charAt(0),o=[0];for(r=0;r<a.length;++r){for(var d=0,l=a[r];d<o.length;++d)l+=o[d]<<8,o[d]=l%n,l=l/n|0;for(;l>0;)o.push(l%n),l=l/n|0}for(r=0;a[r]===0&&r<a.length-1;++r)t+=s;for(r=o.length-1;r>=0;--r)t+=e[o[r]]}if(i){var m=new RegExp(".{1,"+i+"}","g");t=t.match(m).join(`\r
|
|
2
|
+
import{a as Bje,b as E0,c as go,d as _y,e as hy,f as C0,g as lc,h as A0,i as Th}from"./chunk-4ESEMCSG.js";import{a as Uje,b as R0,c as Fje}from"./chunk-EFVDRFCG.js";import{$ as U,$a as T8,$b as qke,$c as y0,$d as cy,$e as Ny,A as sc,Aa as bye,Ab as oke,Ac as Xi,Ad as wo,Ae as Fqe,Af as bje,B as i0,Ba as Iye,Bb as dke,Bc as Yo,Bd as q0,Be as zqe,Bf as Sh,C as Wge,Ca as o0,Cb as lke,Cc as Xt,Cd as tqe,Ce as Kqe,Cf as Ije,D as Gge,Da as Sye,Db as mke,Dc as jr,Dd as rqe,De as Vqe,Df as Sje,E as $ge,Ea as Tye,Eb as cke,Ec as qi,Ed as nqe,Ee as bh,Ef as Tje,F as L,Fa as Eye,Fb as uke,Fc as Pe,Fd as sqe,Fe as Wqe,Ff as Eje,G as Hge,Ga as d0,Gb as fke,Gc as _e,Gd as dc,Ge as Gqe,Gf as Cje,H as Xge,Ha as Cye,Hb as Nke,Hc as ct,Hd as oqe,He as $qe,Hf as Aje,I as Qge,Ia as l0,Ic as Jo,Id as dqe,Ie as Hqe,If as Rje,J as E,Ja as S8,Jb as pke,Jc as gh,Jd as lqe,Je as Xqe,Jf as Dje,K as Yge,Ka as Aye,Kb as _ke,Kc as Xd,Kd as ly,Ke as U8,Kf as xje,L as Jge,La as Rye,Lb as hke,Lc as x8,Ld as mqe,Le as Qqe,Lf as Mje,M as Zge,Ma as Dye,Mb as vke,Mc as Dke,Md as cqe,Me as Yqe,Mf as Pje,N as t0,Na as xye,Nb as _0,Nc as xke,Nd as uqe,Ne as cS,Nf as Lje,O as r0,Oa as Mye,Ob as h0,Oc as Ts,Od as fqe,Oe as Jqe,Of as G8,P as k8,Pa as Pye,Pb as kCa,Pc as Zo,Pd as Nqe,Pe as Zqe,Q as eye,Qa as Lye,Qb as rS,Qc as Mke,Qd as O8,Qe as eje,R as aye,Ra as Oye,Rb as nS,Rc as Pke,Rd as pqe,Re as aje,S as ea,Sa as Bye,Sb as qCa,Sc as Lke,Sd as _qe,Se as Ih,T as iye,Ta as Uye,Tb as zu,Tc as Oke,Td as hqe,Te as ije,U as oc,Ua as Ha,Ub as wke,Uc as w0,Ud as vqe,Ue as tje,V as oye,Va as _o,Vb as gke,Vc as oS,Vd as wqe,Ve as rje,W as dye,Wa as kr,Wb as yke,Wc as M8,Wd as j0,We as nje,X as lye,Xa as qr,Xb as sy,Xc as g0,Xd as gqe,Xe as I0,Y as mye,Ya as m0,Yb as v0,Yc as Bke,Yd as my,Ye as sje,Z as iy,Za as ry,Zb as E8,Zc as oy,Zd as yqe,Ze as S0,_ as cye,_a as Fye,_b as kke,_c as yh,_d as mS,_e as oje,a as aS,aa as uye,ab as c0,ac as jke,ad as Uke,ae as kqe,af as dje,b as yCa,ba as fye,bb as zye,bc as bke,bd as kh,be as Es,bf as Qd,c as Age,ca as Nye,cb as Fu,cc as Ct,cd as k0,ce as uy,cf as py,da as q8,db as Kye,dc as Ike,dd as qh,de as fy,df as F8,e as Rge,ea as pye,eb as u0,ec as sS,ed as Fke,ee as qqe,ef as lje,f as Dge,fa as _ye,fb as Vye,fc as Ske,fd as zke,fe as b0,ff as mje,g as Gl,ga as po,gb as ny,gc as Tke,gd as Kke,ge as jqe,gf as cje,h as w8,ha as $l,hb as f0,hc as C8,hd as Vke,he as bqe,hf as uje,i as xge,ia as Hi,ib as Wye,ic as Eke,id as Wke,ie as Iqe,if as fje,j as Mge,ja as $a,jb as Gye,jc as Kn,jd as Gke,je as B8,jf as Nje,k as ey,ka as j8,kb as $ye,kc as vh,kd as dy,ke as Sqe,kf as T0,la as hye,lb as Hye,lc as wh,ld as dS,le as Tqe,lf as z8,ma as vye,mb as Xye,mc as Cke,md as P8,me as Eqe,mf as uS,na as iS,nb as Qye,nc as Ake,nd as $ke,ne as Cqe,nf as K8,oa as wye,ob as Yye,oc as A8,od as Hke,oe as Vu,of as V8,p as Pge,pa as gye,pb as N0,pc as Rke,pd as Xke,pe as Aqe,pf as pje,qa as yye,qb as Jye,qc as Ce,qd as Qke,qe as Rqe,qf as _je,r as Uge,ra as kye,rb as Zye,rc as ee,rd as Yke,re as Hr,rf as hje,s as Fge,sa as n0,sb as eke,sc as Ku,sd as Jke,se as Dqe,sf as vje,t as zge,ta as tS,tb as ake,tc as Oe,td as lS,te as xqe,tf as wje,ua as qye,ub as ike,uc as ho,ud as Zke,ue as Mqe,uf as gje,v as e0,va as ty,vb as tke,vc as Hl,vd as jh,ve as Pqe,vf as W8,w as a0,wa as b8,wb as rke,wc as R8,wd as eqe,we as Lqe,wf as yje,x as Kge,xa as jye,xb as p0,xc as vo,xd as aqe,xe as Oqe,xf as kje,y as Vge,ya as I8,yb as nke,yc as D8,yd as iqe,ye as Bqe,yf as qje,z as Ui,za as s0,zb as ske,zc as Xl,zd as L8,ze as Uqe,zf as jje}from"./chunk-H6PMSAEU.js";import{d as Tge,e as Ege,f as JP,g as ZP,h as v8,i as Cge,l as g8}from"./chunk-VMPSG3GF.js";import{a as Oje}from"./chunk-X3H6BQVR.js";import{c as Sge,g as QP}from"./chunk-CF3YFDG4.js";import{a as h8}from"./chunk-PRXIML4F.js";import{a as YP,b as _N}from"./chunk-FKQFVOLR.js";import{b as ay}from"./chunk-X4N2MWNJ.js";import{c as sye}from"./chunk-HVP63X6W.js";import{f as Lge,r as y8,t as Oge,v as Bge}from"./chunk-S6GSNWAM.js";import{a as rye,b as nye}from"./chunk-UJCQHSQD.js";import{a as tye}from"./chunk-G64EFDMH.js";import{a as zje}from"./chunk-4Y64C4JT.js";import{a as gCa}from"./chunk-HQ2U4QVQ.js";import{a as n8,e as $we,f as Hwe,g as Xwe,j as _8,l as eS,q as Ige}from"./chunk-HOQXGGPN.js";import{$ as tge,Ba as fN,C as Jwe,Ca as yt,E as Zwe,Ga as UP,I as QI,Ia as Pu,J as ege,Ja as mge,Ma as cge,Na as ph,O as age,Oa as uge,Pa as Hd,Ra as _h,S as YI,Sa as Lu,U as Qo,Ua as fge,V as ige,a as cN,aa as rge,ab as Uu,b as s8,bb as jge,c as Qwe,ca as nge,cb as hh,d as Jg,db as N8,e as La,eb as p8,ga as ya,ha as Va,i as o8,ia as uN,j as MP,ja as Is,k as PP,ka as sge,kb as bge,l as zn,m as Ywe,ma as oge,n as Zg,na as LP,o as d8,ua as dge,v as l8,va as OP,w as m8,wa as Nh,xa as BP,ya as lge}from"./chunk-OCFW7RRF.js";import{$ as XP,E as VP,G as hge,H as c8,I as u8,J as vge,K as WP,L as GP,O as wge,P as gge,Q as yge,R as $P,S as kge,X as pN,Y as HP,Z as qge,_ as f8,a as Nge,b as pge,d as FP,k as wn,l as Ou,m as zP,n as NN,o as JI,p as _ge,q as KP,r as ZI,s as Ss,z as Bu}from"./chunk-Z4VKGZFA.js";import{a as rt,c as be,e as Mi}from"./chunk-D76SO2ME.js";var f2e=be((O5t,eF)=>{var u2e=u2e||function(a){return Buffer.from(a).toString("base64")};function i3a(a){var e=this,i=Math.round,t=Math.floor,r=new Array(64),n=new Array(64),s=new Array(64),o=new Array(64),d,l,m,c,u=new Array(65535),f=new Array(65535),N=new Array(64),_=new Array(64),h=[],v=0,w=7,g=new Array(64),k=new Array(64),y=new Array(64),q=new Array(256),b=new Array(2048),P,O=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],B=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],K=[0,1,2,3,4,5,6,7,8,9,10,11],$=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],X=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],re=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Z=[0,1,2,3,4,5,6,7,8,9,10,11],pe=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],se=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function Ie(ie){for(var na=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ha=0;ha<64;ha++){var ua=t((na[ha]*ie+50)/100);ua<1?ua=1:ua>255&&(ua=255),r[O[ha]]=ua}for(var Aa=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Ma=0;Ma<64;Ma++){var yi=t((Aa[Ma]*ie+50)/100);yi<1?yi=1:yi>255&&(yi=255),n[O[Ma]]=yi}for(var ki=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Vt=0,gt=0;gt<8;gt++)for(var we=0;we<8;we++)s[Vt]=1/(r[O[Vt]]*ki[gt]*ki[we]*8),o[Vt]=1/(n[O[Vt]]*ki[gt]*ki[we]*8),Vt++}function ke(ie,na){for(var ha=0,ua=0,Aa=new Array,Ma=1;Ma<=16;Ma++){for(var yi=1;yi<=ie[Ma];yi++)Aa[na[ua]]=[],Aa[na[ua]][0]=ha,Aa[na[ua]][1]=Ma,ua++,ha++;ha*=2}return Aa}function ye(){d=ke(B,K),l=ke(re,Z),m=ke($,X),c=ke(pe,se)}function We(){for(var ie=1,na=2,ha=1;ha<=15;ha++){for(var ua=ie;ua<na;ua++)f[32767+ua]=ha,u[32767+ua]=[],u[32767+ua][1]=ha,u[32767+ua][0]=ua;for(var Aa=-(na-1);Aa<=-ie;Aa++)f[32767+Aa]=ha,u[32767+Aa]=[],u[32767+Aa][1]=ha,u[32767+Aa][0]=na-1+Aa;ie<<=1,na<<=1}}function ge(){for(var ie=0;ie<256;ie++)b[ie]=19595*ie,b[ie+256>>0]=38470*ie,b[ie+512>>0]=7471*ie+32768,b[ie+768>>0]=-11059*ie,b[ie+1024>>0]=-21709*ie,b[ie+1280>>0]=32768*ie+8421375,b[ie+1536>>0]=-27439*ie,b[ie+1792>>0]=-5329*ie}function ce(ie){for(var na=ie[0],ha=ie[1]-1;ha>=0;)na&1<<ha&&(v|=1<<w),ha--,w--,w<0&&(v==255?(H(255),H(0)):H(v),w=7,v=0)}function H(ie){h.push(ie)}function oe(ie){H(ie>>8&255),H(ie&255)}function xe(ie,na){var ha,ua,Aa,Ma,yi,ki,Vt,gt,we=0,Ye,Ia=8,Ut=64;for(Ye=0;Ye<Ia;++Ye){ha=ie[we],ua=ie[we+1],Aa=ie[we+2],Ma=ie[we+3],yi=ie[we+4],ki=ie[we+5],Vt=ie[we+6],gt=ie[we+7];var Pa=ha+gt,ai=ha-gt,tt=ua+Vt,ga=ua-Vt,xi=Aa+ki,Fn=Aa-ki,Et=Ma+yi,$d=Ma-yi,nc=Pa+Et,fh=Pa-Et,Qg=tt+xi,Yg=tt-xi;ie[we]=nc+Qg,ie[we+4]=nc-Qg;var KI=(Yg+fh)*.707106781;ie[we+2]=fh+KI,ie[we+6]=fh-KI,nc=$d+Fn,Qg=Fn+ga,Yg=ga+ai;var VI=(nc-Yg)*.382683433,AP=.5411961*nc+VI,WI=1.306562965*Yg+VI,GI=Qg*.707106781,$I=ai+GI,HI=ai-GI;ie[we+5]=HI+AP,ie[we+3]=HI-AP,ie[we+1]=$I+WI,ie[we+7]=$I-WI,we+=8}for(we=0,Ye=0;Ye<Ia;++Ye){ha=ie[we],ua=ie[we+8],Aa=ie[we+16],Ma=ie[we+24],yi=ie[we+32],ki=ie[we+40],Vt=ie[we+48],gt=ie[we+56];var xwe=ha+gt,t8=ha-gt,Mwe=ua+Vt,Pwe=ua-Vt,Lwe=Aa+ki,Owe=Aa-ki,Bwe=Ma+yi,wCa=Ma-yi,XI=xwe+Bwe,r8=xwe-Bwe,RP=Mwe+Lwe,DP=Mwe-Lwe;ie[we]=XI+RP,ie[we+32]=XI-RP;var Uwe=(DP+r8)*.707106781;ie[we+16]=r8+Uwe,ie[we+48]=r8-Uwe,XI=wCa+Owe,RP=Owe+Pwe,DP=Pwe+t8;var Fwe=(XI-DP)*.382683433,zwe=.5411961*XI+Fwe,Kwe=1.306562965*DP+Fwe,Vwe=RP*.707106781,Wwe=t8+Vwe,Gwe=t8-Vwe;ie[we+40]=Gwe+zwe,ie[we+24]=Gwe-zwe,ie[we+8]=Wwe+Kwe,ie[we+56]=Wwe-Kwe,we++}var xP;for(Ye=0;Ye<Ut;++Ye)xP=ie[Ye]*na[Ye],N[Ye]=xP>0?xP+.5|0:xP-.5|0;return N}function Ae(){oe(65504),oe(16),H(74),H(70),H(73),H(70),H(0),H(1),H(1),H(0),oe(1),oe(1),H(0),H(0)}function Se(ie){if(ie){oe(65505),ie[0]===69&&ie[1]===120&&ie[2]===105&&ie[3]===102?oe(ie.length+2):(oe(ie.length+5+2),H(69),H(120),H(105),H(102),H(0));for(var na=0;na<ie.length;na++)H(ie[na])}}function Ue(ie,na){oe(65472),oe(17),H(8),oe(na),oe(ie),H(3),H(1),H(17),H(0),H(2),H(17),H(1),H(3),H(17),H(1)}function Ge(){oe(65499),oe(132),H(0);for(var ie=0;ie<64;ie++)H(r[ie]);H(1);for(var na=0;na<64;na++)H(n[na])}function je(){oe(65476),oe(418),H(0);for(var ie=0;ie<16;ie++)H(B[ie+1]);for(var na=0;na<=11;na++)H(K[na]);H(16);for(var ha=0;ha<16;ha++)H($[ha+1]);for(var ua=0;ua<=161;ua++)H(X[ua]);H(1);for(var Aa=0;Aa<16;Aa++)H(re[Aa+1]);for(var Ma=0;Ma<=11;Ma++)H(Z[Ma]);H(17);for(var yi=0;yi<16;yi++)H(pe[yi+1]);for(var ki=0;ki<=161;ki++)H(se[ki])}function ve(ie){typeof ie>"u"||ie.constructor!==Array||ie.forEach(na=>{if(typeof na=="string"){oe(65534);var ha=na.length;oe(ha+2);var ua;for(ua=0;ua<ha;ua++)H(na.charCodeAt(ua))}})}function ba(){oe(65498),oe(12),H(3),H(1),H(0),H(2),H(17),H(3),H(17),H(0),H(63),H(0)}function Qe(ie,na,ha,ua,Aa){for(var Ma=Aa[0],yi=Aa[240],ki,Vt=16,gt=63,we=64,Ye=xe(ie,na),Ia=0;Ia<we;++Ia)_[O[Ia]]=Ye[Ia];var Ut=_[0]-ha;ha=_[0],Ut==0?ce(ua[0]):(ki=32767+Ut,ce(ua[f[ki]]),ce(u[ki]));for(var Pa=63;Pa>0&&_[Pa]==0;Pa--);if(Pa==0)return ce(Ma),ha;for(var ai=1,tt;ai<=Pa;){for(var ga=ai;_[ai]==0&&ai<=Pa;++ai);var xi=ai-ga;if(xi>=Vt){tt=xi>>4;for(var Fn=1;Fn<=tt;++Fn)ce(yi);xi=xi&15}ki=32767+_[ai],ce(Aa[(xi<<4)+f[ki]]),ce(u[ki]),ai++}return Pa!=gt&&ce(Ma),ha}function ta(){for(var ie=String.fromCharCode,na=0;na<256;na++)q[na]=ie(na)}this.encode=function(ie,na){var ha=new Date().getTime();na&&Gd(na),h=new Array,v=0,w=7,oe(65496),Ae(),ve(ie.comments),Se(ie.exifBuffer),Ge(),Ue(ie.width,ie.height),je(),ba();var ua=0,Aa=0,Ma=0;v=0,w=7,this.encode.displayName="_encode_";for(var yi=ie.data,ki=ie.width,Vt=ie.height,gt=ki*4,we=ki*3,Ye,Ia=0,Ut,Pa,ai,tt,ga,xi,Fn,Et;Ia<Vt;){for(Ye=0;Ye<gt;){for(tt=gt*Ia+Ye,ga=tt,xi=-1,Fn=0,Et=0;Et<64;Et++)Fn=Et>>3,xi=(Et&7)*4,ga=tt+Fn*gt+xi,Ia+Fn>=Vt&&(ga-=gt*(Ia+1+Fn-Vt)),Ye+xi>=gt&&(ga-=Ye+xi-gt+4),Ut=yi[ga++],Pa=yi[ga++],ai=yi[ga++],g[Et]=(b[Ut]+b[Pa+256>>0]+b[ai+512>>0]>>16)-128,k[Et]=(b[Ut+768>>0]+b[Pa+1024>>0]+b[ai+1280>>0]>>16)-128,y[Et]=(b[Ut+1280>>0]+b[Pa+1536>>0]+b[ai+1792>>0]>>16)-128;ua=Qe(g,s,ua,d,m),Aa=Qe(k,o,Aa,l,c),Ma=Qe(y,o,Ma,l,c),Ye+=32}Ia+=8}if(w>=0){var $d=[];$d[1]=w+1,$d[0]=(1<<w+1)-1,ce($d)}if(oe(65497),typeof eF>"u")return new Uint8Array(h);return Buffer.from(h);var nc,fh};function Gd(ie){if(ie<=0&&(ie=1),ie>100&&(ie=100),P!=ie){var na=0;ie<50?na=Math.floor(5e3/ie):na=Math.floor(200-ie*2),Ie(na),P=ie}}function Wl(){var ie=new Date().getTime();a||(a=50),ta(),ye(),We(),ge(),Gd(a);var na=new Date().getTime()-ie}Wl()}typeof eF<"u"?eF.exports=c2e:typeof window<"u"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=c2e);function c2e(a,e){typeof e>"u"&&(e=50);var i=new i3a(e),t=i.encode(a,e);return{data:t,width:a.width,height:a.height}}});var p2e=be((B5t,fae)=>{var uae=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,t=799,r=3406,n=2276,s=1567,o=3784,d=5793,l=2896;function m(){}function c(w,g){for(var k=0,y=[],q,b,P=16;P>0&&!w[P-1];)P--;y.push({children:[],index:0});var O=y[0],B;for(q=0;q<P;q++){for(b=0;b<w[q];b++){for(O=y.pop(),O.children[O.index]=g[k];O.index>0;){if(y.length===0)throw new Error("Could not recreate Huffman Table");O=y.pop()}for(O.index++,y.push(O);y.length<=q;)y.push(B={children:[],index:0}),O.children[O.index]=B.children,O=B;k++}q+1<P&&(y.push(B={children:[],index:0}),O.children[O.index]=B.children,O=B)}return y[0].children}function u(w,g,k,y,q,b,P,O,B,K){var $=k.precision,X=k.samplesPerLine,re=k.scanLines,Z=k.mcusPerLine,pe=k.progressive,se=k.maxH,Ie=k.maxV,ke=g,ye=0,We=0;function ge(){if(We>0)return We--,ye>>We&1;if(ye=w[g++],ye==255){var we=w[g++];if(we)throw new Error("unexpected marker: "+(ye<<8|we).toString(16))}return We=7,ye>>>7}function ce(we){for(var Ye=we,Ia;(Ia=ge())!==null;){if(Ye=Ye[Ia],typeof Ye=="number")return Ye;if(typeof Ye!="object")throw new Error("invalid huffman sequence")}return null}function H(we){for(var Ye=0;we>0;){var Ia=ge();if(Ia===null)return;Ye=Ye<<1|Ia,we--}return Ye}function oe(we){var Ye=H(we);return Ye>=1<<we-1?Ye:Ye+(-1<<we)+1}function xe(we,Ye){var Ia=ce(we.huffmanTableDC),Ut=Ia===0?0:oe(Ia);Ye[0]=we.pred+=Ut;for(var Pa=1;Pa<64;){var ai=ce(we.huffmanTableAC),tt=ai&15,ga=ai>>4;if(tt===0){if(ga<15)break;Pa+=16;continue}Pa+=ga;var xi=e[Pa];Ye[xi]=oe(tt),Pa++}}function Ae(we,Ye){var Ia=ce(we.huffmanTableDC),Ut=Ia===0?0:oe(Ia)<<B;Ye[0]=we.pred+=Ut}function Se(we,Ye){Ye[0]|=ge()<<B}var Ue=0;function Ge(we,Ye){if(Ue>0){Ue--;return}for(var Ia=b,Ut=P;Ia<=Ut;){var Pa=ce(we.huffmanTableAC),ai=Pa&15,tt=Pa>>4;if(ai===0){if(tt<15){Ue=H(tt)+(1<<tt)-1;break}Ia+=16;continue}Ia+=tt;var ga=e[Ia];Ye[ga]=oe(ai)*(1<<B),Ia++}}var je=0,ve;function ba(we,Ye){for(var Ia=b,Ut=P,Pa=0;Ia<=Ut;){var ai=e[Ia],tt=Ye[ai]<0?-1:1;switch(je){case 0:var ga=ce(we.huffmanTableAC),xi=ga&15,Pa=ga>>4;if(xi===0)Pa<15?(Ue=H(Pa)+(1<<Pa),je=4):(Pa=16,je=1);else{if(xi!==1)throw new Error("invalid ACn encoding");ve=oe(xi),je=Pa?2:3}continue;case 1:case 2:Ye[ai]?Ye[ai]+=(ge()<<B)*tt:(Pa--,Pa===0&&(je=je==2?3:0));break;case 3:Ye[ai]?Ye[ai]+=(ge()<<B)*tt:(Ye[ai]=ve<<B,je=0);break;case 4:Ye[ai]&&(Ye[ai]+=(ge()<<B)*tt);break}Ia++}je===4&&(Ue--,Ue===0&&(je=0))}function Qe(we,Ye,Ia,Ut,Pa){var ai=Ia/Z|0,tt=Ia%Z,ga=ai*we.v+Ut,xi=tt*we.h+Pa;we.blocks[ga]===void 0&&K.tolerantDecoding||Ye(we,we.blocks[ga][xi])}function ta(we,Ye,Ia){var Ut=Ia/we.blocksPerLine|0,Pa=Ia%we.blocksPerLine;we.blocks[Ut]===void 0&&K.tolerantDecoding||Ye(we,we.blocks[Ut][Pa])}var Gd=y.length,Wl,ie,na,ha,ua,Aa;pe?b===0?Aa=O===0?Ae:Se:Aa=O===0?Ge:ba:Aa=xe;var Ma=0,yi,ki;Gd==1?ki=y[0].blocksPerLine*y[0].blocksPerColumn:ki=Z*k.mcusPerColumn,q||(q=ki);for(var Vt,gt;Ma<ki;){for(ie=0;ie<Gd;ie++)y[ie].pred=0;if(Ue=0,Gd==1)for(Wl=y[0],ua=0;ua<q;ua++)ta(Wl,Aa,Ma),Ma++;else for(ua=0;ua<q;ua++){for(ie=0;ie<Gd;ie++)for(Wl=y[ie],Vt=Wl.h,gt=Wl.v,na=0;na<gt;na++)for(ha=0;ha<Vt;ha++)Qe(Wl,Aa,Ma,na,ha);if(Ma++,Ma===ki)break}if(Ma===ki)do{if(w[g]===255&&w[g+1]!==0)break;g+=1}while(g<w.length-2);if(We=0,yi=w[g]<<8|w[g+1],yi<65280)throw new Error("marker was not found");if(yi>=65488&&yi<=65495)g+=2;else break}return g-ke}function f(w,g){var k=[],y=g.blocksPerLine,q=g.blocksPerColumn,b=y<<3,P=new Int32Array(64),O=new Uint8Array(64);function B(ke,ye,We){var ge=g.quantizationTable,ce,H,oe,xe,Ae,Se,Ue,Ge,je,ve=We,ba;for(ba=0;ba<64;ba++)ve[ba]=ke[ba]*ge[ba];for(ba=0;ba<8;++ba){var Qe=8*ba;if(ve[1+Qe]==0&&ve[2+Qe]==0&&ve[3+Qe]==0&&ve[4+Qe]==0&&ve[5+Qe]==0&&ve[6+Qe]==0&&ve[7+Qe]==0){je=d*ve[0+Qe]+512>>10,ve[0+Qe]=je,ve[1+Qe]=je,ve[2+Qe]=je,ve[3+Qe]=je,ve[4+Qe]=je,ve[5+Qe]=je,ve[6+Qe]=je,ve[7+Qe]=je;continue}ce=d*ve[0+Qe]+128>>8,H=d*ve[4+Qe]+128>>8,oe=ve[2+Qe],xe=ve[6+Qe],Ae=l*(ve[1+Qe]-ve[7+Qe])+128>>8,Ge=l*(ve[1+Qe]+ve[7+Qe])+128>>8,Se=ve[3+Qe]<<4,Ue=ve[5+Qe]<<4,je=ce-H+1>>1,ce=ce+H+1>>1,H=je,je=oe*o+xe*s+128>>8,oe=oe*s-xe*o+128>>8,xe=je,je=Ae-Ue+1>>1,Ae=Ae+Ue+1>>1,Ue=je,je=Ge+Se+1>>1,Se=Ge-Se+1>>1,Ge=je,je=ce-xe+1>>1,ce=ce+xe+1>>1,xe=je,je=H-oe+1>>1,H=H+oe+1>>1,oe=je,je=Ae*n+Ge*r+2048>>12,Ae=Ae*r-Ge*n+2048>>12,Ge=je,je=Se*t+Ue*i+2048>>12,Se=Se*i-Ue*t+2048>>12,Ue=je,ve[0+Qe]=ce+Ge,ve[7+Qe]=ce-Ge,ve[1+Qe]=H+Ue,ve[6+Qe]=H-Ue,ve[2+Qe]=oe+Se,ve[5+Qe]=oe-Se,ve[3+Qe]=xe+Ae,ve[4+Qe]=xe-Ae}for(ba=0;ba<8;++ba){var ta=ba;if(ve[8+ta]==0&&ve[16+ta]==0&&ve[24+ta]==0&&ve[32+ta]==0&&ve[40+ta]==0&&ve[48+ta]==0&&ve[56+ta]==0){je=d*We[ba+0]+8192>>14,ve[0+ta]=je,ve[8+ta]=je,ve[16+ta]=je,ve[24+ta]=je,ve[32+ta]=je,ve[40+ta]=je,ve[48+ta]=je,ve[56+ta]=je;continue}ce=d*ve[0+ta]+2048>>12,H=d*ve[32+ta]+2048>>12,oe=ve[16+ta],xe=ve[48+ta],Ae=l*(ve[8+ta]-ve[56+ta])+2048>>12,Ge=l*(ve[8+ta]+ve[56+ta])+2048>>12,Se=ve[24+ta],Ue=ve[40+ta],je=ce-H+1>>1,ce=ce+H+1>>1,H=je,je=oe*o+xe*s+2048>>12,oe=oe*s-xe*o+2048>>12,xe=je,je=Ae-Ue+1>>1,Ae=Ae+Ue+1>>1,Ue=je,je=Ge+Se+1>>1,Se=Ge-Se+1>>1,Ge=je,je=ce-xe+1>>1,ce=ce+xe+1>>1,xe=je,je=H-oe+1>>1,H=H+oe+1>>1,oe=je,je=Ae*n+Ge*r+2048>>12,Ae=Ae*r-Ge*n+2048>>12,Ge=je,je=Se*t+Ue*i+2048>>12,Se=Se*i-Ue*t+2048>>12,Ue=je,ve[0+ta]=ce+Ge,ve[56+ta]=ce-Ge,ve[8+ta]=H+Ue,ve[48+ta]=H-Ue,ve[16+ta]=oe+Se,ve[40+ta]=oe-Se,ve[24+ta]=xe+Ae,ve[32+ta]=xe-Ae}for(ba=0;ba<64;++ba){var Gd=128+(ve[ba]+8>>4);ye[ba]=Gd<0?0:Gd>255?255:Gd}}v(b*q*8);for(var K,$,X=0;X<q;X++){var re=X<<3;for(K=0;K<8;K++)k.push(new Uint8Array(b));for(var Z=0;Z<y;Z++){B(g.blocks[X][Z],O,P);var pe=0,se=Z<<3;for($=0;$<8;$++){var Ie=k[re+$];for(K=0;K<8;K++)Ie[se+K]=O[pe++]}}}return k}function N(w){return w<0?0:w>255?255:w}m.prototype={load:function(g){var k=new XMLHttpRequest;k.open("GET",g,!0),k.responseType="arraybuffer",k.onload=(function(){var y=new Uint8Array(k.response||k.mozResponseArrayBuffer);this.parse(y),this.onload&&this.onload()}).bind(this),k.send(null)},parse:function(g){var k=this.opts.maxResolutionInMP*1e3*1e3,y=0,q=g.length;function b(){var ga=g[y]<<8|g[y+1];return y+=2,ga}function P(){var ga=b(),xi=g.subarray(y,y+ga-2);return y+=xi.length,xi}function O(ga){var xi=1,Fn=1,Et,$d;for($d in ga.components)ga.components.hasOwnProperty($d)&&(Et=ga.components[$d],xi<Et.h&&(xi=Et.h),Fn<Et.v&&(Fn=Et.v));var nc=Math.ceil(ga.samplesPerLine/8/xi),fh=Math.ceil(ga.scanLines/8/Fn);for($d in ga.components)if(ga.components.hasOwnProperty($d)){Et=ga.components[$d];var Qg=Math.ceil(Math.ceil(ga.samplesPerLine/8)*Et.h/xi),Yg=Math.ceil(Math.ceil(ga.scanLines/8)*Et.v/Fn),KI=nc*Et.h,VI=fh*Et.v,AP=VI*KI,WI=[];v(AP*256);for(var GI=0;GI<VI;GI++){for(var $I=[],HI=0;HI<KI;HI++)$I.push(new Int32Array(64));WI.push($I)}Et.blocksPerLine=Qg,Et.blocksPerColumn=Yg,Et.blocks=WI}ga.maxH=xi,ga.maxV=Fn,ga.mcusPerLine=nc,ga.mcusPerColumn=fh}var B=null,K=null,$=null,X,re,Z=[],pe=[],se=[],Ie=[],ke=b(),ye=-1;if(this.comments=[],ke!=65496)throw new Error("SOI not found");for(ke=b();ke!=65497;){var We,ge,ce;switch(ke){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var H=P();if(ke===65534){var oe=String.fromCharCode.apply(null,H);this.comments.push(oe)}ke===65504&&H[0]===74&&H[1]===70&&H[2]===73&&H[3]===70&&H[4]===0&&(B={version:{major:H[5],minor:H[6]},densityUnits:H[7],xDensity:H[8]<<8|H[9],yDensity:H[10]<<8|H[11],thumbWidth:H[12],thumbHeight:H[13],thumbData:H.subarray(14,14+3*H[12]*H[13])}),ke===65505&&H[0]===69&&H[1]===120&&H[2]===105&&H[3]===102&&H[4]===0&&(this.exifBuffer=H.subarray(5,H.length)),ke===65518&&H[0]===65&&H[1]===100&&H[2]===111&&H[3]===98&&H[4]===101&&H[5]===0&&(K={version:H[6],flags0:H[7]<<8|H[8],flags1:H[9]<<8|H[10],transformCode:H[11]});break;case 65499:for(var xe=b(),Ae=xe+y-2;y<Ae;){var Se=g[y++];v(256);var Ue=new Int32Array(64);if(Se>>4===0)for(ge=0;ge<64;ge++){var Ge=e[ge];Ue[Ge]=g[y++]}else if(Se>>4===1)for(ge=0;ge<64;ge++){var Ge=e[ge];Ue[Ge]=b()}else throw new Error("DQT: invalid table spec");Z[Se&15]=Ue}break;case 65472:case 65473:case 65474:b(),X={},X.extended=ke===65473,X.progressive=ke===65474,X.precision=g[y++],X.scanLines=b(),X.samplesPerLine=b(),X.components={},X.componentsOrder=[];var je=X.scanLines*X.samplesPerLine;if(je>k){var ve=Math.ceil((je-k)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${ve}MP`)}var ba=g[y++],Qe,ta=0,Gd=0;for(We=0;We<ba;We++){Qe=g[y];var Wl=g[y+1]>>4,ie=g[y+1]&15,na=g[y+2];if(Wl<=0||ie<=0)throw new Error("Invalid sampling factor, expected values above 0");X.componentsOrder.push(Qe),X.components[Qe]={h:Wl,v:ie,quantizationIdx:na},y+=3}O(X),pe.push(X);break;case 65476:var ha=b();for(We=2;We<ha;){var ua=g[y++],Aa=new Uint8Array(16),Ma=0;for(ge=0;ge<16;ge++,y++)Ma+=Aa[ge]=g[y];v(16+Ma);var yi=new Uint8Array(Ma);for(ge=0;ge<Ma;ge++,y++)yi[ge]=g[y];We+=17+Ma,(ua>>4===0?Ie:se)[ua&15]=c(Aa,yi)}break;case 65501:b(),re=b();break;case 65500:b(),b();break;case 65498:var ki=b(),Vt=g[y++],gt=[],we;for(We=0;We<Vt;We++){we=X.components[g[y++]];var Ye=g[y++];we.huffmanTableDC=Ie[Ye>>4],we.huffmanTableAC=se[Ye&15],gt.push(we)}var Ia=g[y++],Ut=g[y++],Pa=g[y++],ai=u(g,y,X,gt,re,Ia,Ut,Pa>>4,Pa&15,this.opts);y+=ai;break;case 65535:g[y]!==255&&y--;break;default:if(g[y-3]==255&&g[y-2]>=192&&g[y-2]<=254){y-=3;break}else if(ke===224||ke==225){if(ye!==-1)throw new Error(`first unknown JPEG marker at offset ${ye.toString(16)}, second unknown JPEG marker ${ke.toString(16)} at offset ${(y-1).toString(16)}`);ye=y-1;let ga=b();if(g[y+ga-2]===255){y+=ga-2;break}}throw new Error("unknown JPEG marker "+ke.toString(16))}ke=b()}if(pe.length!=1)throw new Error("only single frame JPEGs supported");for(var We=0;We<pe.length;We++){var tt=pe[We].components;for(var ge in tt)tt[ge].quantizationTable=Z[tt[ge].quantizationIdx],delete tt[ge].quantizationIdx}this.width=X.samplesPerLine,this.height=X.scanLines,this.jfif=B,this.adobe=K,this.components=[];for(var We=0;We<X.componentsOrder.length;We++){var we=X.components[X.componentsOrder[We]];this.components.push({lines:f(X,we),scaleX:we.h/X.maxH,scaleY:we.v/X.maxV})}},getData:function(g,k){var y=this.width/g,q=this.height/k,b,P,O,B,K,$,X,re,Z,pe,se=0,Ie,ke,ye,We,ge,ce,H,oe,xe,Ae,Se,Ue=g*k*this.components.length;v(Ue);var Ge=new Uint8Array(Ue);switch(this.components.length){case 1:for(b=this.components[0],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],Z=0;Z<g;Z++)Ie=K[0|Z*b.scaleX*y],Ge[se++]=Ie;break;case 2:for(b=this.components[0],P=this.components[1],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],Z=0;Z<g;Z++)Ie=K[0|Z*b.scaleX*y],Ge[se++]=Ie,Ie=$[0|Z*P.scaleX*y],Ge[se++]=Ie;break;case 3:for(Se=!0,this.adobe&&this.adobe.transformCode?Se=!0:typeof this.opts.colorTransform<"u"&&(Se=!!this.opts.colorTransform),b=this.components[0],P=this.components[1],O=this.components[2],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],X=O.lines[0|pe*O.scaleY*q],Z=0;Z<g;Z++)Se?(Ie=K[0|Z*b.scaleX*y],ke=$[0|Z*P.scaleX*y],ye=X[0|Z*O.scaleX*y],oe=N(Ie+1.402*(ye-128)),xe=N(Ie-.3441363*(ke-128)-.71413636*(ye-128)),Ae=N(Ie+1.772*(ke-128))):(oe=K[0|Z*b.scaleX*y],xe=$[0|Z*P.scaleX*y],Ae=X[0|Z*O.scaleX*y]),Ge[se++]=oe,Ge[se++]=xe,Ge[se++]=Ae;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(Se=!1,this.adobe&&this.adobe.transformCode?Se=!0:typeof this.opts.colorTransform<"u"&&(Se=!!this.opts.colorTransform),b=this.components[0],P=this.components[1],O=this.components[2],B=this.components[3],pe=0;pe<k;pe++)for(K=b.lines[0|pe*b.scaleY*q],$=P.lines[0|pe*P.scaleY*q],X=O.lines[0|pe*O.scaleY*q],re=B.lines[0|pe*B.scaleY*q],Z=0;Z<g;Z++)Se?(Ie=K[0|Z*b.scaleX*y],ke=$[0|Z*P.scaleX*y],ye=X[0|Z*O.scaleX*y],We=re[0|Z*B.scaleX*y],ge=255-N(Ie+1.402*(ye-128)),ce=255-N(Ie-.3441363*(ke-128)-.71413636*(ye-128)),H=255-N(Ie+1.772*(ke-128))):(ge=K[0|Z*b.scaleX*y],ce=$[0|Z*P.scaleX*y],H=X[0|Z*O.scaleX*y],We=re[0|Z*B.scaleX*y]),Ge[se++]=255-ge,Ge[se++]=255-ce,Ge[se++]=255-H,Ge[se++]=255-We;break;default:throw new Error("Unsupported color mode")}return Ge},copyToImageData:function(g,k){var y=g.width,q=g.height,b=g.data,P=this.getData(y,q),O=0,B=0,K,$,X,re,Z,pe,se,Ie,ke;switch(this.components.length){case 1:for($=0;$<q;$++)for(K=0;K<y;K++)X=P[O++],b[B++]=X,b[B++]=X,b[B++]=X,k&&(b[B++]=255);break;case 3:for($=0;$<q;$++)for(K=0;K<y;K++)se=P[O++],Ie=P[O++],ke=P[O++],b[B++]=se,b[B++]=Ie,b[B++]=ke,k&&(b[B++]=255);break;case 4:for($=0;$<q;$++)for(K=0;K<y;K++)Z=P[O++],pe=P[O++],X=P[O++],re=P[O++],se=255-N(Z*(1-re/255)+re),Ie=255-N(pe*(1-re/255)+re),ke=255-N(X*(1-re/255)+re),b[B++]=se,b[B++]=Ie,b[B++]=ke,k&&(b[B++]=255);break;default:throw new Error("Unsupported color mode")}}};var _=0,h=0;function v(w=0){var g=_+w;if(g>h){var k=Math.ceil((g-h)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${k}MB`)}_=g}return m.resetMaxMemoryUsage=function(w){_=0,h=w},m.getBytesAllocated=function(){return _},m.requestMemoryAllocation=v,m})();typeof fae<"u"?fae.exports=N2e:typeof window<"u"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=N2e);function N2e(a,e={}){var i={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},t={...i,...e},r=new Uint8Array(a),n=new uae;n.opts=t,uae.resetMaxMemoryUsage(t.maxMemoryUsageInMB*1024*1024),n.parse(r);var s=t.formatAsRGBA?4:3,o=n.width*n.height*s;try{uae.requestMemoryAllocation(o);var d={width:n.width,height:n.height,exifBuffer:n.exifBuffer,data:t.useTArray?new Uint8Array(o):Buffer.alloc(o)};n.comments.length>0&&(d.comments=n.comments)}catch(l){throw l instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+o):l instanceof ReferenceError&&l.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):l}return n.copyToImageData(d,t.formatAsRGBA),d}});var h2e=be((U5t,_2e)=>{var t3a=f2e(),r3a=p2e();_2e.exports={encode:t3a,decode:r3a}});var Nae=be((F5t,w2e)=>{"use strict";var n3a=rt("util"),v2e=rt("stream"),mm=w2e.exports=function(){v2e.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n3a.inherits(mm,v2e);mm.prototype.read=function(a,e){this._reads.push({length:Math.abs(a),allowLess:a<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};mm.prototype.write=function(a,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let i;return Buffer.isBuffer(a)?i=a:i=Buffer.from(a,e||this._encoding),this._buffers.push(i),this._buffered+=i.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};mm.prototype.end=function(a,e){a&&this.write(a,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};mm.prototype.destroySoon=mm.prototype.end;mm.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};mm.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};mm.prototype._processReadAllowingLess=function(a){this._reads.shift();let e=this._buffers[0];e.length>a.length?(this._buffered-=a.length,this._buffers[0]=e.slice(a.length),a.func.call(this,e.slice(0,a.length))):(this._buffered-=e.length,this._buffers.shift(),a.func.call(this,e))};mm.prototype._processRead=function(a){this._reads.shift();let e=0,i=0,t=Buffer.alloc(a.length);for(;e<a.length;){let r=this._buffers[i++],n=Math.min(r.length,a.length-e);r.copy(t,e,0,n),e+=n,n!==r.length&&(this._buffers[--i]=r.slice(n))}i>0&&this._buffers.splice(0,i),this._buffered-=a.length,a.func.call(this,t)};mm.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let a=this._reads[0];if(a.allowLess)this._processReadAllowingLess(a);else if(this._buffered>=a.length)this._processRead(a);else break}this._buffers&&!this.writable&&this._end()}catch(a){this.emit("error",a)}}});var _ae=be(pae=>{"use strict";var cp=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];pae.getImagePasses=function(a,e){let i=[],t=a%8,r=e%8,n=(a-t)/8,s=(e-r)/8;for(let o=0;o<cp.length;o++){let d=cp[o],l=n*d.x.length,m=s*d.y.length;for(let c=0;c<d.x.length&&d.x[c]<t;c++)l++;for(let c=0;c<d.y.length&&d.y[c]<r;c++)m++;l>0&&m>0&&i.push({width:l,height:m,index:o})}return i};pae.getInterlaceIterator=function(a){return function(e,i,t){let r=e%cp[t].x.length,n=(e-r)/cp[t].x.length*8+cp[t].x[r],s=i%cp[t].y.length,o=(i-s)/cp[t].y.length*8+cp[t].y[s];return n*4+o*a*4}}});var hae=be((K5t,g2e)=>{"use strict";g2e.exports=function(e,i,t){let r=e+i-t,n=Math.abs(r-e),s=Math.abs(r-i),o=Math.abs(r-t);return n<=s&&n<=o?e:s<=o?i:t}});var vae=be((V5t,k2e)=>{"use strict";var s3a=_ae(),o3a=hae();function y2e(a,e,i){let t=a*e;return i!==8&&(t=Math.ceil(t/(8/i))),t}var Kk=k2e.exports=function(a,e){let i=a.width,t=a.height,r=a.interlace,n=a.bpp,s=a.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],r){let o=s3a.getImagePasses(i,t);for(let d=0;d<o.length;d++)this._images.push({byteWidth:y2e(o[d].width,n,s),height:o[d].height,lineIndex:0})}else this._images.push({byteWidth:y2e(i,n,s),height:t,lineIndex:0});s===8?this._xComparison=n:s===16?this._xComparison=n*2:this._xComparison=1};Kk.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};Kk.prototype._unFilterType1=function(a,e,i){let t=this._xComparison,r=t-1;for(let n=0;n<i;n++){let s=a[1+n],o=n>r?e[n-t]:0;e[n]=s+o}};Kk.prototype._unFilterType2=function(a,e,i){let t=this._lastLine;for(let r=0;r<i;r++){let n=a[1+r],s=t?t[r]:0;e[r]=n+s}};Kk.prototype._unFilterType3=function(a,e,i){let t=this._xComparison,r=t-1,n=this._lastLine;for(let s=0;s<i;s++){let o=a[1+s],d=n?n[s]:0,l=s>r?e[s-t]:0,m=Math.floor((l+d)/2);e[s]=o+m}};Kk.prototype._unFilterType4=function(a,e,i){let t=this._xComparison,r=t-1,n=this._lastLine;for(let s=0;s<i;s++){let o=a[1+s],d=n?n[s]:0,l=s>r?e[s-t]:0,m=s>r&&n?n[s-t]:0,c=o3a(l,d,m);e[s]=o+c}};Kk.prototype._reverseFilterLine=function(a){let e=a[0],i,t=this._images[this._imageIndex],r=t.byteWidth;if(e===0)i=a.slice(1,r+1);else switch(i=Buffer.alloc(r),e){case 1:this._unFilterType1(a,i,r);break;case 2:this._unFilterType2(a,i,r);break;case 3:this._unFilterType3(a,i,r);break;case 4:this._unFilterType4(a,i,r);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(i),t.lineIndex++,t.lineIndex>=t.height?(this._lastLine=null,this._imageIndex++,t=this._images[this._imageIndex]):this._lastLine=i,t?this.read(t.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var b2e=be((W5t,j2e)=>{"use strict";var d3a=rt("util"),q2e=Nae(),l3a=vae(),m3a=j2e.exports=function(a){q2e.call(this);let e=[],i=this;this._filter=new l3a(a,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",Buffer.concat(e))}}),this._filter.start()};d3a.inherits(m3a,q2e)});var Vk=be((G5t,I2e)=>{"use strict";I2e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var yae=be(($5t,S2e)=>{"use strict";var wae=[];(function(){for(let a=0;a<256;a++){let e=a;for(let i=0;i<8;i++)e&1?e=3988292384^e>>>1:e=e>>>1;wae[a]=e}})();var gae=S2e.exports=function(){this._crc=-1};gae.prototype.write=function(a){for(let e=0;e<a.length;e++)this._crc=wae[(this._crc^a[e])&255]^this._crc>>>8;return!0};gae.prototype.crc32=function(){return this._crc^-1};gae.crc32=function(a){let e=-1;for(let i=0;i<a.length;i++)e=wae[(e^a[i])&255]^e>>>8;return e^-1}});var kae=be((H5t,T2e)=>{"use strict";var Zr=Vk(),c3a=yae(),En=T2e.exports=function(a,e){this._options=a,a.checkCRC=a.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[Zr.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[Zr.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[Zr.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[Zr.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[Zr.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[Zr.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};En.prototype.start=function(){this.read(Zr.PNG_SIGNATURE.length,this._parseSignature.bind(this))};En.prototype._parseSignature=function(a){let e=Zr.PNG_SIGNATURE;for(let i=0;i<e.length;i++)if(a[i]!==e[i]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};En.prototype._parseChunkBegin=function(a){let e=a.readUInt32BE(0),i=a.readUInt32BE(4),t="";for(let n=4;n<8;n++)t+=String.fromCharCode(a[n]);let r=!!(a[4]&32);if(!this._hasIHDR&&i!==Zr.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new c3a,this._crc.write(Buffer.from(t)),this._chunks[i])return this._chunks[i](e);if(!r){this.error(new Error("Unsupported critical chunk type "+t));return}this.read(e+4,this._skipChunk.bind(this))};En.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};En.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};En.prototype._parseChunkEnd=function(a){let e=a.readInt32BE(0),i=this._crc.crc32();if(this._options.checkCRC&&i!==e){this.error(new Error("Crc error - "+e+" - "+i));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};En.prototype._handleIHDR=function(a){this.read(a,this._parseIHDR.bind(this))};En.prototype._parseIHDR=function(a){this._crc.write(a);let e=a.readUInt32BE(0),i=a.readUInt32BE(4),t=a[8],r=a[9],n=a[10],s=a[11],o=a[12];if(t!==8&&t!==4&&t!==2&&t!==1&&t!==16){this.error(new Error("Unsupported bit depth "+t));return}if(!(r in Zr.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(n!==0){this.error(new Error("Unsupported compression method"));return}if(s!==0){this.error(new Error("Unsupported filter method"));return}if(o!==0&&o!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=r;let d=Zr.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:i,depth:t,interlace:!!o,palette:!!(r&Zr.COLORTYPE_PALETTE),color:!!(r&Zr.COLORTYPE_COLOR),alpha:!!(r&Zr.COLORTYPE_ALPHA),bpp:d,colorType:r}),this._handleChunkEnd()};En.prototype._handlePLTE=function(a){this.read(a,this._parsePLTE.bind(this))};En.prototype._parsePLTE=function(a){this._crc.write(a);let e=Math.floor(a.length/3);for(let i=0;i<e;i++)this._palette.push([a[i*3],a[i*3+1],a[i*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};En.prototype._handleTRNS=function(a){this.simpleTransparency(),this.read(a,this._parseTRNS.bind(this))};En.prototype._parseTRNS=function(a){if(this._crc.write(a),this._colorType===Zr.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(a.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<a.length;e++)this._palette[e][3]=a[e];this.palette(this._palette)}this._colorType===Zr.COLORTYPE_GRAYSCALE&&this.transColor([a.readUInt16BE(0)]),this._colorType===Zr.COLORTYPE_COLOR&&this.transColor([a.readUInt16BE(0),a.readUInt16BE(2),a.readUInt16BE(4)]),this._handleChunkEnd()};En.prototype._handleGAMA=function(a){this.read(a,this._parseGAMA.bind(this))};En.prototype._parseGAMA=function(a){this._crc.write(a),this.gamma(a.readUInt32BE(0)/Zr.GAMMA_DIVISION),this._handleChunkEnd()};En.prototype._handleIDAT=function(a){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-a,this._parseIDAT.bind(this,a))};En.prototype._parseIDAT=function(a,e){if(this._crc.write(e),this._colorType===Zr.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let i=a-e.length;i>0?this._handleIDAT(i):this._handleChunkEnd()};En.prototype._handleIEND=function(a){this.read(a,this._parseIEND.bind(this))};En.prototype._parseIEND=function(a){this._crc.write(a),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var qae=be(C2e=>{"use strict";var E2e=_ae(),u3a=[function(){},function(a,e,i,t){if(t===e.length)throw new Error("Ran out of data");let r=e[t];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=255},function(a,e,i,t){if(t+1>=e.length)throw new Error("Ran out of data");let r=e[t];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=e[t+1]},function(a,e,i,t){if(t+2>=e.length)throw new Error("Ran out of data");a[i]=e[t],a[i+1]=e[t+1],a[i+2]=e[t+2],a[i+3]=255},function(a,e,i,t){if(t+3>=e.length)throw new Error("Ran out of data");a[i]=e[t],a[i+1]=e[t+1],a[i+2]=e[t+2],a[i+3]=e[t+3]}],f3a=[function(){},function(a,e,i,t){let r=e[0];a[i]=r,a[i+1]=r,a[i+2]=r,a[i+3]=t},function(a,e,i){let t=e[0];a[i]=t,a[i+1]=t,a[i+2]=t,a[i+3]=e[1]},function(a,e,i,t){a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=t},function(a,e,i){a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3]}];function N3a(a,e){let i=[],t=0;function r(){if(t===a.length)throw new Error("Ran out of data");let n=a[t];t++;let s,o,d,l,m,c,u,f;switch(e){default:throw new Error("unrecognised depth");case 16:u=a[t],t++,i.push((n<<8)+u);break;case 4:u=n&15,f=n>>4,i.push(f,u);break;case 2:m=n&3,c=n>>2&3,u=n>>4&3,f=n>>6&3,i.push(f,u,c,m);break;case 1:s=n&1,o=n>>1&1,d=n>>2&1,l=n>>3&1,m=n>>4&1,c=n>>5&1,u=n>>6&1,f=n>>7&1,i.push(f,u,c,m,l,d,o,s);break}}return{get:function(n){for(;i.length<n;)r();let s=i.slice(0,n);return i=i.slice(n),s},resetAfterLine:function(){i.length=0},end:function(){if(t!==a.length)throw new Error("extra data found")}}}function p3a(a,e,i,t,r,n){let s=a.width,o=a.height,d=a.index;for(let l=0;l<o;l++)for(let m=0;m<s;m++){let c=i(m,l,d);u3a[t](e,r,c,n),n+=t}return n}function _3a(a,e,i,t,r,n){let s=a.width,o=a.height,d=a.index;for(let l=0;l<o;l++){for(let m=0;m<s;m++){let c=r.get(t),u=i(m,l,d);f3a[t](e,c,u,n)}r.resetAfterLine()}}C2e.dataToBitMap=function(a,e){let i=e.width,t=e.height,r=e.depth,n=e.bpp,s=e.interlace,o;r!==8&&(o=N3a(a,r));let d;r<=8?d=Buffer.alloc(i*t*4):d=new Uint16Array(i*t*4);let l=Math.pow(2,r)-1,m=0,c,u;if(s)c=E2e.getImagePasses(i,t),u=E2e.getInterlaceIterator(i,t);else{let f=0;u=function(){let N=f;return f+=4,N},c=[{width:i,height:t}]}for(let f=0;f<c.length;f++)r===8?m=p3a(c[f],d,u,n,a,m):_3a(c[f],d,u,n,o,l);if(r===8){if(m!==a.length)throw new Error("extra data found")}else o.end();return d}});var jae=be((Q5t,A2e)=>{"use strict";function h3a(a,e,i,t,r){let n=0;for(let s=0;s<t;s++)for(let o=0;o<i;o++){let d=r[a[n]];if(!d)throw new Error("index "+a[n]+" not in palette");for(let l=0;l<4;l++)e[n+l]=d[l];n+=4}}function v3a(a,e,i,t,r){let n=0;for(let s=0;s<t;s++)for(let o=0;o<i;o++){let d=!1;if(r.length===1?r[0]===a[n]&&(d=!0):r[0]===a[n]&&r[1]===a[n+1]&&r[2]===a[n+2]&&(d=!0),d)for(let l=0;l<4;l++)e[n+l]=0;n+=4}}function w3a(a,e,i,t,r){let n=255,s=Math.pow(2,r)-1,o=0;for(let d=0;d<t;d++)for(let l=0;l<i;l++){for(let m=0;m<4;m++)e[o+m]=Math.floor(a[o+m]*n/s+.5);o+=4}}A2e.exports=function(a,e,i=!1){let t=e.depth,r=e.width,n=e.height,s=e.colorType,o=e.transColor,d=e.palette,l=a;return s===3?h3a(a,l,r,n,d):(o&&v3a(a,l,r,n,o),t!==8&&!i&&(t===16&&(l=Buffer.alloc(r*n*4)),w3a(a,l,r,n,t))),l}});var x2e=be((Y5t,D2e)=>{"use strict";var g3a=rt("util"),bae=rt("zlib"),R2e=Nae(),y3a=b2e(),k3a=kae(),q3a=qae(),j3a=jae(),Cc=D2e.exports=function(a){R2e.call(this),this._parser=new k3a(a,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=a,this.writable=!0,this._parser.start()};g3a.inherits(Cc,R2e);Cc.prototype._handleError=function(a){this.emit("error",a),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};Cc.prototype._inflateData=function(a){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=bae.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let i=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(i,bae.Z_MIN_CHUNK);this._inflate=bae.createInflate({chunkSize:t});let r=i,n=this.emit.bind(this,"error");this._inflate.on("error",function(o){r&&n(o)}),this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",function(o){r&&(o.length>r&&(o=o.slice(0,r)),r-=o.length,s(o))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(a)};Cc.prototype._handleMetaData=function(a){this._metaData=a,this._bitmapInfo=Object.create(a),this._filter=new y3a(this._bitmapInfo)};Cc.prototype._handleTransColor=function(a){this._bitmapInfo.transColor=a};Cc.prototype._handlePalette=function(a){this._bitmapInfo.palette=a};Cc.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Cc.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Cc.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};Cc.prototype._complete=function(a){if(this.errord)return;let e;try{let i=q3a.dataToBitMap(a,this._bitmapInfo);e=j3a(i,this._bitmapInfo,this._options.skipRescale),i=null}catch(i){this._handleError(i);return}this.emit("parsed",e)}});var P2e=be((J5t,M2e)=>{"use strict";var cl=Vk();M2e.exports=function(a,e,i,t){let r=[cl.COLORTYPE_COLOR_ALPHA,cl.COLORTYPE_ALPHA].indexOf(t.colorType)!==-1;if(t.colorType===t.inputColorType){let N=(function(){let _=new ArrayBuffer(2);return new DataView(_).setInt16(0,256,!0),new Int16Array(_)[0]!==256})();if(t.bitDepth===8||t.bitDepth===16&&N)return a}let n=t.bitDepth!==16?a:new Uint16Array(a.buffer),s=255,o=cl.COLORTYPE_TO_BPP_MAP[t.inputColorType];o===4&&!t.inputHasAlpha&&(o=3);let d=cl.COLORTYPE_TO_BPP_MAP[t.colorType];t.bitDepth===16&&(s=65535,d*=2);let l=Buffer.alloc(e*i*d),m=0,c=0,u=t.bgColor||{};u.red===void 0&&(u.red=s),u.green===void 0&&(u.green=s),u.blue===void 0&&(u.blue=s);function f(){let N,_,h,v=s;switch(t.inputColorType){case cl.COLORTYPE_COLOR_ALPHA:v=n[m+3],N=n[m],_=n[m+1],h=n[m+2];break;case cl.COLORTYPE_COLOR:N=n[m],_=n[m+1],h=n[m+2];break;case cl.COLORTYPE_ALPHA:v=n[m+1],N=n[m],_=N,h=N;break;case cl.COLORTYPE_GRAYSCALE:N=n[m],_=N,h=N;break;default:throw new Error("input color type:"+t.inputColorType+" is not supported at present")}return t.inputHasAlpha&&(r||(v/=s,N=Math.min(Math.max(Math.round((1-v)*u.red+v*N),0),s),_=Math.min(Math.max(Math.round((1-v)*u.green+v*_),0),s),h=Math.min(Math.max(Math.round((1-v)*u.blue+v*h),0),s))),{red:N,green:_,blue:h,alpha:v}}for(let N=0;N<i;N++)for(let _=0;_<e;_++){let h=f(n,m);switch(t.colorType){case cl.COLORTYPE_COLOR_ALPHA:case cl.COLORTYPE_COLOR:t.bitDepth===8?(l[c]=h.red,l[c+1]=h.green,l[c+2]=h.blue,r&&(l[c+3]=h.alpha)):(l.writeUInt16BE(h.red,c),l.writeUInt16BE(h.green,c+2),l.writeUInt16BE(h.blue,c+4),r&&l.writeUInt16BE(h.alpha,c+6));break;case cl.COLORTYPE_ALPHA:case cl.COLORTYPE_GRAYSCALE:{let v=(h.red+h.green+h.blue)/3;t.bitDepth===8?(l[c]=v,r&&(l[c+1]=h.alpha)):(l.writeUInt16BE(v,c),r&&l.writeUInt16BE(h.alpha,c+2));break}default:throw new Error("unrecognised color Type "+t.colorType)}m+=o,c+=d}return l}});var B2e=be((Z5t,O2e)=>{"use strict";var L2e=hae();function b3a(a,e,i,t,r){for(let n=0;n<i;n++)t[r+n]=a[e+n]}function I3a(a,e,i){let t=0,r=e+i;for(let n=e;n<r;n++)t+=Math.abs(a[n]);return t}function S3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=a[e+s]-o;t[r+s]=d}}function T3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=a[e+n]-s;r+=Math.abs(o)}return r}function E3a(a,e,i,t,r){for(let n=0;n<i;n++){let s=e>0?a[e+n-i]:0,o=a[e+n]-s;t[r+n]=o}}function C3a(a,e,i){let t=0,r=e+i;for(let n=e;n<r;n++){let s=e>0?a[n-i]:0,o=a[n]-s;t+=Math.abs(o)}return t}function A3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=e>0?a[e+s-i]:0,l=a[e+s]-(o+d>>1);t[r+s]=l}}function R3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=e>0?a[e+n-i]:0,d=a[e+n]-(s+o>>1);r+=Math.abs(d)}return r}function D3a(a,e,i,t,r,n){for(let s=0;s<i;s++){let o=s>=n?a[e+s-n]:0,d=e>0?a[e+s-i]:0,l=e>0&&s>=n?a[e+s-(i+n)]:0,m=a[e+s]-L2e(o,d,l);t[r+s]=m}}function x3a(a,e,i,t){let r=0;for(let n=0;n<i;n++){let s=n>=t?a[e+n-t]:0,o=e>0?a[e+n-i]:0,d=e>0&&n>=t?a[e+n-(i+t)]:0,l=a[e+n]-L2e(s,o,d);r+=Math.abs(l)}return r}var M3a={0:b3a,1:S3a,2:E3a,3:A3a,4:D3a},P3a={0:I3a,1:T3a,2:C3a,3:R3a,4:x3a};O2e.exports=function(a,e,i,t,r){let n;if(!("filterType"in t)||t.filterType===-1)n=[0,1,2,3,4];else if(typeof t.filterType=="number")n=[t.filterType];else throw new Error("unrecognised filter types");t.bitDepth===16&&(r*=2);let s=e*r,o=0,d=0,l=Buffer.alloc((s+1)*i),m=n[0];for(let c=0;c<i;c++){if(n.length>1){let u=1/0;for(let f=0;f<n.length;f++){let N=P3a[n[f]](a,d,s,r);N<u&&(m=n[f],u=N)}}l[o]=m,o++,M3a[m](a,d,s,l,o,r),o+=s,d+=s}return l}});var Iae=be((e6t,U2e)=>{"use strict";var ms=Vk(),L3a=yae(),O3a=P2e(),B3a=B2e(),U3a=rt("zlib"),up=U2e.exports=function(a){if(this._options=a,a.deflateChunkSize=a.deflateChunkSize||32*1024,a.deflateLevel=a.deflateLevel!=null?a.deflateLevel:9,a.deflateStrategy=a.deflateStrategy!=null?a.deflateStrategy:3,a.inputHasAlpha=a.inputHasAlpha!=null?a.inputHasAlpha:!0,a.deflateFactory=a.deflateFactory||U3a.createDeflate,a.bitDepth=a.bitDepth||8,a.colorType=typeof a.colorType=="number"?a.colorType:ms.COLORTYPE_COLOR_ALPHA,a.inputColorType=typeof a.inputColorType=="number"?a.inputColorType:ms.COLORTYPE_COLOR_ALPHA,[ms.COLORTYPE_GRAYSCALE,ms.COLORTYPE_COLOR,ms.COLORTYPE_COLOR_ALPHA,ms.COLORTYPE_ALPHA].indexOf(a.colorType)===-1)throw new Error("option color type:"+a.colorType+" is not supported at present");if([ms.COLORTYPE_GRAYSCALE,ms.COLORTYPE_COLOR,ms.COLORTYPE_COLOR_ALPHA,ms.COLORTYPE_ALPHA].indexOf(a.inputColorType)===-1)throw new Error("option input color type:"+a.inputColorType+" is not supported at present");if(a.bitDepth!==8&&a.bitDepth!==16)throw new Error("option bit depth:"+a.bitDepth+" is not supported at present")};up.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};up.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};up.prototype.filterData=function(a,e,i){let t=O3a(a,e,i,this._options),r=ms.COLORTYPE_TO_BPP_MAP[this._options.colorType];return B3a(t,e,i,this._options,r)};up.prototype._packChunk=function(a,e){let i=e?e.length:0,t=Buffer.alloc(i+12);return t.writeUInt32BE(i,0),t.writeUInt32BE(a,4),e&&e.copy(t,8),t.writeInt32BE(L3a.crc32(t.slice(4,t.length-4)),t.length-4),t};up.prototype.packGAMA=function(a){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(a*ms.GAMMA_DIVISION),0),this._packChunk(ms.TYPE_gAMA,e)};up.prototype.packIHDR=function(a,e){let i=Buffer.alloc(13);return i.writeUInt32BE(a,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(ms.TYPE_IHDR,i)};up.prototype.packIDAT=function(a){return this._packChunk(ms.TYPE_IDAT,a)};up.prototype.packIEND=function(){return this._packChunk(ms.TYPE_IEND,null)}});var V2e=be((a6t,K2e)=>{"use strict";var F3a=rt("util"),F2e=rt("stream"),z3a=Vk(),K3a=Iae(),z2e=K2e.exports=function(a){F2e.call(this);let e=a||{};this._packer=new K3a(e),this._deflate=this._packer.createDeflate(),this.readable=!0};F3a.inherits(z2e,F2e);z2e.prototype.pack=function(a,e,i,t){this.emit("data",Buffer.from(z3a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),t&&this.emit("data",this._packer.packGAMA(t));let r=this._packer.filterData(a,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(n){this.emit("data",this._packer.packIDAT(n))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(r)}});var Q2e=be((jC,X2e)=>{"use strict";var W2e=rt("assert").ok,Wk=rt("zlib"),V3a=rt("util"),G2e=rt("buffer").kMaxLength;function $v(a){if(!(this instanceof $v))return new $v(a);a&&a.chunkSize<Wk.Z_MIN_CHUNK&&(a.chunkSize=Wk.Z_MIN_CHUNK),Wk.Inflate.call(this,a),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,a&&a.maxLength!=null&&(this._maxLength=a.maxLength)}function W3a(a){return new $v(a)}function $2e(a,e){e&&process.nextTick(e),a._handle&&(a._handle.close(),a._handle=null)}$v.prototype._processChunk=function(a,e,i){if(typeof i=="function")return Wk.Inflate._processChunk.call(this,a,e,i);let t=this,r=a&&a.length,n=this._chunkSize-this._offset,s=this._maxLength,o=0,d=[],l=0,m;this.on("error",function(N){m=N});function c(N,_){if(t._hadError)return;let h=n-_;if(W2e(h>=0,"have should not go down"),h>0){let v=t._buffer.slice(t._offset,t._offset+h);if(t._offset+=h,v.length>s&&(v=v.slice(0,s)),d.push(v),l+=v.length,s-=v.length,s===0)return!1}return(_===0||t._offset>=t._chunkSize)&&(n=t._chunkSize,t._offset=0,t._buffer=Buffer.allocUnsafe(t._chunkSize)),_===0?(o+=r-N,r=N,!0):!1}W2e(this._handle,"zlib binding closed");let u;do u=this._handle.writeSync(e,a,o,r,this._buffer,this._offset,n),u=u||this._writeState;while(!this._hadError&&c(u[0],u[1]));if(this._hadError)throw m;if(l>=G2e)throw $2e(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+G2e.toString(16)+" bytes");let f=Buffer.concat(d,l);return $2e(this),f};V3a.inherits($v,Wk.Inflate);function G3a(a,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let i=a._finishFlushFlag;return i==null&&(i=Wk.Z_FINISH),a._processChunk(e,i)}function H2e(a,e){return G3a(new $v(e),a)}X2e.exports=jC=H2e;jC.Inflate=$v;jC.createInflate=W3a;jC.inflateSync=H2e});var Sae=be((i6t,J2e)=>{"use strict";var Y2e=J2e.exports=function(a){this._buffer=a,this._reads=[]};Y2e.prototype.read=function(a,e){this._reads.push({length:Math.abs(a),allowLess:a<0,func:e})};Y2e.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let a=this._reads[0];if(this._buffer.length&&(this._buffer.length>=a.length||a.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(a.length),a.func.call(this,e.slice(0,a.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var eBe=be(Z2e=>{"use strict";var $3a=Sae(),H3a=vae();Z2e.process=function(a,e){let i=[],t=new $3a(a);return new H3a(e,{read:t.read.bind(t),write:function(n){i.push(n)},complete:function(){}}).start(),t.process(),Buffer.concat(i)}});var rBe=be((r6t,tBe)=>{"use strict";var aBe=!0,iBe=rt("zlib"),X3a=Q2e();iBe.deflateSync||(aBe=!1);var Q3a=Sae(),Y3a=eBe(),J3a=kae(),Z3a=qae(),eXa=jae();tBe.exports=function(a,e){if(!aBe)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i;function t(k){i=k}let r;function n(k){r=k}function s(k){r.transColor=k}function o(k){r.palette=k}function d(){r.alpha=!0}let l;function m(k){l=k}let c=[];function u(k){c.push(k)}let f=new Q3a(a);if(new J3a(e,{read:f.read.bind(f),error:t,metadata:n,gamma:m,palette:o,transColor:s,inflateData:u,simpleTransparency:d}).start(),f.process(),i)throw i;let _=Buffer.concat(c);c.length=0;let h;if(r.interlace)h=iBe.inflateSync(_);else{let y=((r.width*r.bpp*r.depth+7>>3)+1)*r.height;h=X3a(_,{chunkSize:y,maxLength:y})}if(_=null,!h||!h.length)throw new Error("bad png - invalid inflate data response");let v=Y3a.process(h,r);_=null;let w=Z3a.dataToBitMap(v,r);v=null;let g=eXa(w,r,e.skipRescale);return r.data=g,r.gamma=l||0,r}});var dBe=be((n6t,oBe)=>{"use strict";var nBe=!0,sBe=rt("zlib");sBe.deflateSync||(nBe=!1);var aXa=Vk(),iXa=Iae();oBe.exports=function(a,e){if(!nBe)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i=e||{},t=new iXa(i),r=[];r.push(Buffer.from(aXa.PNG_SIGNATURE)),r.push(t.packIHDR(a.width,a.height)),a.gamma&&r.push(t.packGAMA(a.gamma));let n=t.filterData(a.data,a.width,a.height),s=sBe.deflateSync(n,t.getDeflateOptions());if(n=null,!s||!s.length)throw new Error("bad png - invalid compressed data response");return r.push(t.packIDAT(s)),r.push(t.packIEND()),Buffer.concat(r)}});var lBe=be(Tae=>{"use strict";var tXa=rBe(),rXa=dBe();Tae.read=function(a,e){return tXa(a,e||{})};Tae.write=function(a,e){return rXa(a,e)}});var aF=be(cBe=>{"use strict";var nXa=rt("util"),mBe=rt("stream"),sXa=x2e(),oXa=V2e(),dXa=lBe(),Us=cBe.PNG=function(a){mBe.call(this),a=a||{},this.width=a.width|0,this.height=a.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,a.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new sXa(a),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new oXa(a),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};nXa.inherits(Us,mBe);Us.sync=dXa;Us.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};Us.prototype.parse=function(a,e){if(e){let i,t;i=function(r){this.removeListener("error",t),this.data=r,e(null,this)}.bind(this),t=function(r){this.removeListener("parsed",i),e(r,null)}.bind(this),this.once("parsed",i),this.once("error",t)}return this.end(a),this};Us.prototype.write=function(a){return this._parser.write(a),!0};Us.prototype.end=function(a){this._parser.end(a)};Us.prototype._metadata=function(a){this.width=a.width,this.height=a.height,this.emit("metadata",a)};Us.prototype._gamma=function(a){this.gamma=a};Us.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};Us.bitblt=function(a,e,i,t,r,n,s,o){if(i|=0,t|=0,r|=0,n|=0,s|=0,o|=0,i>a.width||t>a.height||i+r>a.width||t+n>a.height)throw new Error("bitblt reading outside image");if(s>e.width||o>e.height||s+r>e.width||o+n>e.height)throw new Error("bitblt writing outside image");for(let d=0;d<n;d++)a.data.copy(e.data,(o+d)*e.width+s<<2,(t+d)*a.width+i<<2,(t+d)*a.width+i+r<<2)};Us.prototype.bitblt=function(a,e,i,t,r,n,s){return Us.bitblt(this,a,e,i,t,r,n,s),this};Us.adjustGamma=function(a){if(a.gamma){for(let e=0;e<a.height;e++)for(let i=0;i<a.width;i++){let t=a.width*e+i<<2;for(let r=0;r<3;r++){let n=a.data[t+r]/255;n=Math.pow(n,1/2.2/a.gamma),a.data[t+r]=Math.round(n*255)}}a.gamma=0}};Us.prototype.adjustGamma=function(){Us.adjustGamma(this)}});var Wte=be((tnr,AWe)=>{AWe.exports=rt("stream")});var fA=be((Gte,DWe)=>{var nK=rt("buffer"),mf=nK.Buffer;function RWe(a,e){for(var i in a)e[i]=a[i]}mf.from&&mf.alloc&&mf.allocUnsafe&&mf.allocUnsafeSlow?DWe.exports=nK:(RWe(nK,Gte),Gte.Buffer=Iq);function Iq(a,e,i){return mf(a,e,i)}RWe(mf,Iq);Iq.from=function(a,e,i){if(typeof a=="number")throw new TypeError("Argument must not be a number");return mf(a,e,i)};Iq.alloc=function(a,e,i){if(typeof a!="number")throw new TypeError("Argument must be a number");var t=mf(a);return e!==void 0?typeof i=="string"?t.fill(e,i):t.fill(e):t.fill(0),t};Iq.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return mf(a)};Iq.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return nK.SlowBuffer(a)}});var MWe=be((rnr,$te)=>{"use strict";function xti(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}var xWe=fA().Buffer,NA=rt("util");function Mti(a,e,i){a.copy(e,i)}$te.exports=(function(){function a(){xti(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(i){var t={data:i,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},a.prototype.unshift=function(i){var t={data:i,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},a.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(i){if(this.length===0)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=i+t.data;return r},a.prototype.concat=function(i){if(this.length===0)return xWe.alloc(0);for(var t=xWe.allocUnsafe(i>>>0),r=this.head,n=0;r;)Mti(r.data,t,n),n+=r.data.length,r=r.next;return t},a})();NA&&NA.inspect&&NA.inspect.custom&&($te.exports.prototype[NA.inspect.custom]=function(){var a=NA.inspect({length:this.length});return this.constructor.name+" "+a})});var Hte=be((nnr,PWe)=>{"use strict";var sK=h0();function Pti(a,e){var i=this,t=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return t||r?(e?e(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,sK.nextTick(oK,this,a)):sK.nextTick(oK,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(n){!e&&n?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,sK.nextTick(oK,i,n)):sK.nextTick(oK,i,n):e&&e(n)}),this)}function Lti(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function oK(a,e){a.emit("error",e)}PWe.exports={destroy:Pti,undestroy:Lti}});var Qte=be((snr,VWe)=>{"use strict";var ow=h0();VWe.exports=xr;function OWe(a){var e=this;this.next=null,this.entry=null,this.finish=function(){ari(e,a)}}var Oti=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:ow.nextTick,Sq;xr.WritableState=_A;var BWe=Object.create(rS());BWe.inherits=nS();var Bti={deprecate:qCa()},UWe=Wte(),lK=fA().Buffer,Uti=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fti(a){return lK.from(a)}function zti(a){return lK.isBuffer(a)||a instanceof Uti}var FWe=Hte();BWe.inherits(xr,UWe);function Kti(){}function _A(a,e){Sq=Sq||dw(),a=a||{};var i=e instanceof Sq;this.objectMode=!!a.objectMode,i&&(this.objectMode=this.objectMode||!!a.writableObjectMode);var t=a.highWaterMark,r=a.writableHighWaterMark,n=this.objectMode?16:16*1024;t||t===0?this.highWaterMark=t:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=n,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=a.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Qti(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new OWe(this)}_A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,i=[];e;)i.push(e),e=e.next;return i};(function(){try{Object.defineProperty(_A.prototype,"buffer",{get:Bti.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var dK;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(dK=Function.prototype[Symbol.hasInstance],Object.defineProperty(xr,Symbol.hasInstance,{value:function(a){return dK.call(this,a)?!0:this!==xr?!1:a&&a._writableState instanceof _A}})):dK=function(a){return a instanceof this};function xr(a){if(Sq=Sq||dw(),!dK.call(xr,this)&&!(this instanceof Sq))return new xr(a);this._writableState=new _A(a,this),this.writable=!0,a&&(typeof a.write=="function"&&(this._write=a.write),typeof a.writev=="function"&&(this._writev=a.writev),typeof a.destroy=="function"&&(this._destroy=a.destroy),typeof a.final=="function"&&(this._final=a.final)),UWe.call(this)}xr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Vti(a,e){var i=new Error("write after end");a.emit("error",i),ow.nextTick(e,i)}function Wti(a,e,i,t){var r=!0,n=!1;return i===null?n=new TypeError("May not write null values to stream"):typeof i!="string"&&i!==void 0&&!e.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n&&(a.emit("error",n),ow.nextTick(t,n),r=!1),r}xr.prototype.write=function(a,e,i){var t=this._writableState,r=!1,n=!t.objectMode&&zti(a);return n&&!lK.isBuffer(a)&&(a=Fti(a)),typeof e=="function"&&(i=e,e=null),n?e="buffer":e||(e=t.defaultEncoding),typeof i!="function"&&(i=Kti),t.ended?Vti(this,i):(n||Wti(this,t,a,i))&&(t.pendingcb++,r=$ti(this,t,n,a,e,i)),r};xr.prototype.cork=function(){var a=this._writableState;a.corked++};xr.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,!a.writing&&!a.corked&&!a.bufferProcessing&&a.bufferedRequest&&zWe(this,a))};xr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function Gti(a,e,i){return!a.objectMode&&a.decodeStrings!==!1&&typeof e=="string"&&(e=lK.from(e,i)),e}Object.defineProperty(xr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $ti(a,e,i,t,r,n){if(!i){var s=Gti(e,t,r);t!==s&&(i=!0,r="buffer",t=s)}var o=e.objectMode?1:t.length;e.length+=o;var d=e.length<e.highWaterMark;if(d||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:t,encoding:r,isBuf:i,callback:n,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Xte(a,e,!1,o,t,r,n);return d}function Xte(a,e,i,t,r,n,s){e.writelen=t,e.writecb=s,e.writing=!0,e.sync=!0,i?a._writev(r,e.onwrite):a._write(r,n,e.onwrite),e.sync=!1}function Hti(a,e,i,t,r){--e.pendingcb,i?(ow.nextTick(r,t),ow.nextTick(pA,a,e),a._writableState.errorEmitted=!0,a.emit("error",t)):(r(t),a._writableState.errorEmitted=!0,a.emit("error",t),pA(a,e))}function Xti(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function Qti(a,e){var i=a._writableState,t=i.sync,r=i.writecb;if(Xti(i),e)Hti(a,i,t,e,r);else{var n=KWe(i);!n&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest&&zWe(a,i),t?Oti(LWe,a,i,n,r):LWe(a,i,n,r)}}function LWe(a,e,i,t){i||Yti(a,e),e.pendingcb--,t(),pA(a,e)}function Yti(a,e){e.length===0&&e.needDrain&&(e.needDrain=!1,a.emit("drain"))}function zWe(a,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(a._writev&&i&&i.next){var t=e.bufferedRequestCount,r=new Array(t),n=e.corkedRequestsFree;n.entry=i;for(var s=0,o=!0;i;)r[s]=i,i.isBuf||(o=!1),i=i.next,s+=1;r.allBuffers=o,Xte(a,e,!0,e.length,r,"",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new OWe(e),e.bufferedRequestCount=0}else{for(;i;){var d=i.chunk,l=i.encoding,m=i.callback,c=e.objectMode?1:d.length;if(Xte(a,e,!1,c,d,l,m),i=i.next,e.bufferedRequestCount--,e.writing)break}i===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=i,e.bufferProcessing=!1}xr.prototype._write=function(a,e,i){i(new Error("_write() is not implemented"))};xr.prototype._writev=null;xr.prototype.end=function(a,e,i){var t=this._writableState;typeof a=="function"?(i=a,a=null,e=null):typeof e=="function"&&(i=e,e=null),a!=null&&this.write(a,e),t.corked&&(t.corked=1,this.uncork()),t.ending||eri(this,t,i)};function KWe(a){return a.ending&&a.length===0&&a.bufferedRequest===null&&!a.finished&&!a.writing}function Jti(a,e){a._final(function(i){e.pendingcb--,i&&a.emit("error",i),e.prefinished=!0,a.emit("prefinish"),pA(a,e)})}function Zti(a,e){!e.prefinished&&!e.finalCalled&&(typeof a._final=="function"?(e.pendingcb++,e.finalCalled=!0,ow.nextTick(Jti,a,e)):(e.prefinished=!0,a.emit("prefinish")))}function pA(a,e){var i=KWe(e);return i&&(Zti(a,e),e.pendingcb===0&&(e.finished=!0,a.emit("finish"))),i}function eri(a,e,i){e.ending=!0,pA(a,e),i&&(e.finished?ow.nextTick(i):a.once("finish",i)),e.ended=!0,a.writable=!1}function ari(a,e,i){var t=a.entry;for(a.entry=null;t;){var r=t.callback;e.pendingcb--,r(i),t=t.next}e.corkedRequestsFree.next=a}Object.defineProperty(xr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=a)}});xr.prototype.destroy=FWe.destroy;xr.prototype._undestroy=FWe.undestroy;xr.prototype._destroy=function(a,e){this.end(),e(a)}});var dw=be((onr,HWe)=>{"use strict";var WWe=h0(),iri=Object.keys||function(a){var e=[];for(var i in a)e.push(i);return e};HWe.exports=cf;var GWe=Object.create(rS());GWe.inherits=nS();var $We=Zte(),Jte=Qte();GWe.inherits(cf,$We);for(Yte=iri(Jte.prototype),mK=0;mK<Yte.length;mK++)cK=Yte[mK],cf.prototype[cK]||(cf.prototype[cK]=Jte.prototype[cK]);var Yte,cK,mK;function cf(a){if(!(this instanceof cf))return new cf(a);$We.call(this,a),Jte.call(this,a),a&&a.readable===!1&&(this.readable=!1),a&&a.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,a&&a.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",tri)}Object.defineProperty(cf.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tri(){this.allowHalfOpen||this._writableState.ended||WWe.nextTick(rri,this)}function rri(a){a.end()}Object.defineProperty(cf.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=a,this._writableState.destroyed=a)}});cf.prototype._destroy=function(a,e){this.push(null),this.end(),WWe.nextTick(e,a)}});var ire=be(QWe=>{"use strict";var are=fA().Buffer,XWe=are.isEncoding||function(a){switch(a=""+a,a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function nri(a){if(!a)return"utf8";for(var e;;)switch(a){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return a;default:if(e)return;a=(""+a).toLowerCase(),e=!0}}function sri(a){var e=nri(a);if(typeof e!="string"&&(are.isEncoding===XWe||!XWe(a)))throw new Error("Unknown encoding: "+a);return e||a}QWe.StringDecoder=hA;function hA(a){this.encoding=sri(a);var e;switch(this.encoding){case"utf16le":this.text=uri,this.end=fri,e=4;break;case"utf8":this.fillLast=lri,e=4;break;case"base64":this.text=Nri,this.end=pri,e=3;break;default:this.write=_ri,this.end=hri;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=are.allocUnsafe(e)}hA.prototype.write=function(a){if(a.length===0)return"";var e,i;if(this.lastNeed){if(e=this.fillLast(a),e===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<a.length?e?e+this.text(a,i):this.text(a,i):e||""};hA.prototype.end=cri;hA.prototype.text=mri;hA.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length};function ere(a){return a<=127?0:a>>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function ori(a,e,i){var t=e.length-1;if(t<i)return 0;var r=ere(e[t]);return r>=0?(r>0&&(a.lastNeed=r-1),r):--t<i||r===-2?0:(r=ere(e[t]),r>=0?(r>0&&(a.lastNeed=r-2),r):--t<i||r===-2?0:(r=ere(e[t]),r>=0?(r>0&&(r===2?r=0:a.lastNeed=r-3),r):0))}function dri(a,e,i){if((e[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function lri(a){var e=this.lastTotal-this.lastNeed,i=dri(this,a,e);if(i!==void 0)return i;if(this.lastNeed<=a.length)return a.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,e,0,a.length),this.lastNeed-=a.length}function mri(a,e){var i=ori(this,a,e);if(!this.lastNeed)return a.toString("utf8",e);this.lastTotal=i;var t=a.length-(i-this.lastNeed);return a.copy(this.lastChar,0,t),a.toString("utf8",e,t)}function cri(a){var e=a&&a.length?this.write(a):"";return this.lastNeed?e+"\uFFFD":e}function uri(a,e){if((a.length-e)%2===0){var i=a.toString("utf16le",e);if(i){var t=i.charCodeAt(i.length-1);if(t>=55296&&t<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",e,a.length-1)}function fri(a){var e=a&&a.length?this.write(a):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function Nri(a,e){var i=(a.length-e)%3;return i===0?a.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,i===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",e,a.length-i))}function pri(a){var e=a&&a.length?this.write(a):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function _ri(a){return a.toString(this.encoding)}function hri(a){return a&&a.length?this.write(a):""}});var Zte=be((mnr,dGe)=>{"use strict";var Eq=h0();dGe.exports=xt;var vri=kCa(),vA;xt.ReadableState=tGe;var lnr=rt("events").EventEmitter,eGe=function(a,e){return a.listeners(e).length},ore=Wte(),wA=fA().Buffer,wri=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function gri(a){return wA.from(a)}function yri(a){return wA.isBuffer(a)||a instanceof wri}var aGe=Object.create(rS());aGe.inherits=nS();var tre=rt("util"),Pi=void 0;tre&&tre.debuglog?Pi=tre.debuglog("stream"):Pi=function(){};var kri=MWe(),iGe=Hte(),Tq;aGe.inherits(xt,ore);var rre=["error","close","destroy","pause","resume"];function qri(a,e,i){if(typeof a.prependListener=="function")return a.prependListener(e,i);!a._events||!a._events[e]?a.on(e,i):vri(a._events[e])?a._events[e].unshift(i):a._events[e]=[i,a._events[e]]}function tGe(a,e){vA=vA||dw(),a=a||{};var i=e instanceof vA;this.objectMode=!!a.objectMode,i&&(this.objectMode=this.objectMode||!!a.readableObjectMode);var t=a.highWaterMark,r=a.readableHighWaterMark,n=this.objectMode?16:16*1024;t||t===0?this.highWaterMark=t:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new kri,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=a.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(Tq||(Tq=ire().StringDecoder),this.decoder=new Tq(a.encoding),this.encoding=a.encoding)}function xt(a){if(vA=vA||dw(),!(this instanceof xt))return new xt(a);this._readableState=new tGe(a,this),this.readable=!0,a&&(typeof a.read=="function"&&(this._read=a.read),typeof a.destroy=="function"&&(this._destroy=a.destroy)),ore.call(this)}Object.defineProperty(xt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}});xt.prototype.destroy=iGe.destroy;xt.prototype._undestroy=iGe.undestroy;xt.prototype._destroy=function(a,e){this.push(null),e(a)};xt.prototype.push=function(a,e){var i=this._readableState,t;return i.objectMode?t=!0:typeof a=="string"&&(e=e||i.defaultEncoding,e!==i.encoding&&(a=wA.from(a,e),e=""),t=!0),rGe(this,a,e,!1,t)};xt.prototype.unshift=function(a){return rGe(this,a,null,!0,!1)};function rGe(a,e,i,t,r){var n=a._readableState;if(e===null)n.reading=!1,Sri(a,n);else{var s;r||(s=jri(n,e)),s?a.emit("error",s):n.objectMode||e&&e.length>0?(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==wA.prototype&&(e=gri(e)),t?n.endEmitted?a.emit("error",new Error("stream.unshift() after end event")):nre(a,n,e,!0):n.ended?a.emit("error",new Error("stream.push() after EOF")):(n.reading=!1,n.decoder&&!i?(e=n.decoder.write(e),n.objectMode||e.length!==0?nre(a,n,e,!1):nGe(a,n)):nre(a,n,e,!1))):t||(n.reading=!1)}return bri(n)}function nre(a,e,i,t){e.flowing&&e.length===0&&!e.sync?(a.emit("data",i),a.read(0)):(e.length+=e.objectMode?1:i.length,t?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&uK(a)),nGe(a,e)}function jri(a,e){var i;return!yri(e)&&typeof e!="string"&&e!==void 0&&!a.objectMode&&(i=new TypeError("Invalid non-string/buffer chunk")),i}function bri(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||a.length===0)}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(a){return Tq||(Tq=ire().StringDecoder),this._readableState.decoder=new Tq(a),this._readableState.encoding=a,this};var YWe=8388608;function Iri(a){return a>=YWe?a=YWe:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function JWe(a,e){return a<=0||e.length===0&&e.ended?0:e.objectMode?1:a!==a?e.flowing&&e.length?e.buffer.head.data.length:e.length:(a>e.highWaterMark&&(e.highWaterMark=Iri(a)),a<=e.length?a:e.ended?e.length:(e.needReadable=!0,0))}xt.prototype.read=function(a){Pi("read",a),a=parseInt(a,10);var e=this._readableState,i=a;if(a!==0&&(e.emittedReadable=!1),a===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Pi("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?sre(this):uK(this),null;if(a=JWe(a,e),a===0&&e.ended)return e.length===0&&sre(this),null;var t=e.needReadable;Pi("need readable",t),(e.length===0||e.length-a<e.highWaterMark)&&(t=!0,Pi("length less than watermark",t)),e.ended||e.reading?(t=!1,Pi("reading or ended",t)):t&&(Pi("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(a=JWe(i,e)));var r;return a>0?r=sGe(a,e):r=null,r===null?(e.needReadable=!0,a=0):e.length-=a,e.length===0&&(e.ended||(e.needReadable=!0),i!==a&&e.ended&&sre(this)),r!==null&&this.emit("data",r),r};function Sri(a,e){if(!e.ended){if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,uK(a)}}function uK(a){var e=a._readableState;e.needReadable=!1,e.emittedReadable||(Pi("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Eq.nextTick(ZWe,a):ZWe(a))}function ZWe(a){Pi("emit readable"),a.emit("readable"),dre(a)}function nGe(a,e){e.readingMore||(e.readingMore=!0,Eq.nextTick(Tri,a,e))}function Tri(a,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Pi("maybeReadMore read 0"),a.read(0),i!==e.length);)i=e.length;e.readingMore=!1}xt.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))};xt.prototype.pipe=function(a,e){var i=this,t=this._readableState;switch(t.pipesCount){case 0:t.pipes=a;break;case 1:t.pipes=[t.pipes,a];break;default:t.pipes.push(a);break}t.pipesCount+=1,Pi("pipe count=%d opts=%j",t.pipesCount,e);var r=(!e||e.end!==!1)&&a!==process.stdout&&a!==process.stderr,n=r?o:h;t.endEmitted?Eq.nextTick(n):i.once("end",n),a.on("unpipe",s);function s(v,w){Pi("onunpipe"),v===i&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,m())}function o(){Pi("onend"),a.end()}var d=Eri(i);a.on("drain",d);var l=!1;function m(){Pi("cleanup"),a.removeListener("close",N),a.removeListener("finish",_),a.removeListener("drain",d),a.removeListener("error",f),a.removeListener("unpipe",s),i.removeListener("end",o),i.removeListener("end",h),i.removeListener("data",u),l=!0,t.awaitDrain&&(!a._writableState||a._writableState.needDrain)&&d()}var c=!1;i.on("data",u);function u(v){Pi("ondata"),c=!1;var w=a.write(v);w===!1&&!c&&((t.pipesCount===1&&t.pipes===a||t.pipesCount>1&&oGe(t.pipes,a)!==-1)&&!l&&(Pi("false write response, pause",t.awaitDrain),t.awaitDrain++,c=!0),i.pause())}function f(v){Pi("onerror",v),h(),a.removeListener("error",f),eGe(a,"error")===0&&a.emit("error",v)}qri(a,"error",f);function N(){a.removeListener("finish",_),h()}a.once("close",N);function _(){Pi("onfinish"),a.removeListener("close",N),h()}a.once("finish",_);function h(){Pi("unpipe"),i.unpipe(a)}return a.emit("pipe",i),t.flowing||(Pi("pipe resume"),i.resume()),a};function Eri(a){return function(){var e=a._readableState;Pi("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&eGe(a,"data")&&(e.flowing=!0,dre(a))}}xt.prototype.unpipe=function(a){var e=this._readableState,i={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return a&&a!==e.pipes?this:(a||(a=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,a&&a.emit("unpipe",this,i),this);if(!a){var t=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)t[n].emit("unpipe",this,{hasUnpiped:!1});return this}var s=oGe(e.pipes,a);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),a.emit("unpipe",this,i),this)};xt.prototype.on=function(a,e){var i=ore.prototype.on.call(this,a,e);if(a==="data")this._readableState.flowing!==!1&&this.resume();else if(a==="readable"){var t=this._readableState;!t.endEmitted&&!t.readableListening&&(t.readableListening=t.needReadable=!0,t.emittedReadable=!1,t.reading?t.length&&uK(this):Eq.nextTick(Cri,this))}return i};xt.prototype.addListener=xt.prototype.on;function Cri(a){Pi("readable nexttick read 0"),a.read(0)}xt.prototype.resume=function(){var a=this._readableState;return a.flowing||(Pi("resume"),a.flowing=!0,Ari(this,a)),this};function Ari(a,e){e.resumeScheduled||(e.resumeScheduled=!0,Eq.nextTick(Rri,a,e))}function Rri(a,e){e.reading||(Pi("resume read 0"),a.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,a.emit("resume"),dre(a),e.flowing&&!e.reading&&a.read(0)}xt.prototype.pause=function(){return Pi("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Pi("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function dre(a){var e=a._readableState;for(Pi("flow",e.flowing);e.flowing&&a.read()!==null;);}xt.prototype.wrap=function(a){var e=this,i=this._readableState,t=!1;a.on("end",function(){if(Pi("wrapped end"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),a.on("data",function(s){if(Pi("wrapped data"),i.decoder&&(s=i.decoder.write(s)),!(i.objectMode&&s==null)&&!(!i.objectMode&&(!s||!s.length))){var o=e.push(s);o||(t=!0,a.pause())}});for(var r in a)this[r]===void 0&&typeof a[r]=="function"&&(this[r]=(function(s){return function(){return a[s].apply(a,arguments)}})(r));for(var n=0;n<rre.length;n++)a.on(rre[n],this.emit.bind(this,rre[n]));return this._read=function(s){Pi("wrapped _read",s),t&&(t=!1,a.resume())},this};Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});xt._fromList=sGe;function sGe(a,e){if(e.length===0)return null;var i;return e.objectMode?i=e.buffer.shift():!a||a>=e.length?(e.decoder?i=e.buffer.join(""):e.buffer.length===1?i=e.buffer.head.data:i=e.buffer.concat(e.length),e.buffer.clear()):i=Dri(a,e.buffer,e.decoder),i}function Dri(a,e,i){var t;return a<e.head.data.length?(t=e.head.data.slice(0,a),e.head.data=e.head.data.slice(a)):a===e.head.data.length?t=e.shift():t=i?xri(a,e):Mri(a,e),t}function xri(a,e){var i=e.head,t=1,r=i.data;for(a-=r.length;i=i.next;){var n=i.data,s=a>n.length?n.length:a;if(s===n.length?r+=n:r+=n.slice(0,a),a-=s,a===0){s===n.length?(++t,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=n.slice(s));break}++t}return e.length-=t,r}function Mri(a,e){var i=wA.allocUnsafe(a),t=e.head,r=1;for(t.data.copy(i),a-=t.data.length;t=t.next;){var n=t.data,s=a>n.length?n.length:a;if(n.copy(i,i.length-a,0,s),a-=s,a===0){s===n.length?(++r,t.next?e.head=t.next:e.head=e.tail=null):(e.head=t,t.data=n.slice(s));break}++r}return e.length-=r,i}function sre(a){var e=a._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Eq.nextTick(Pri,e,a))}function Pri(a,e){!a.endEmitted&&a.length===0&&(a.endEmitted=!0,e.readable=!1,e.emit("end"))}function oGe(a,e){for(var i=0,t=a.length;i<t;i++)if(a[i]===e)return i;return-1}});var lre=be((cnr,cGe)=>{"use strict";cGe.exports=uf;var fK=dw(),mGe=Object.create(rS());mGe.inherits=nS();mGe.inherits(uf,fK);function Lri(a,e){var i=this._transformState;i.transforming=!1;var t=i.writecb;if(!t)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,e!=null&&this.push(e),t(a);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function uf(a){if(!(this instanceof uf))return new uf(a);fK.call(this,a),this._transformState={afterTransform:Lri.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",Ori)}function Ori(){var a=this;typeof this._flush=="function"?this._flush(function(e,i){lGe(a,e,i)}):lGe(this,null,null)}uf.prototype.push=function(a,e){return this._transformState.needTransform=!1,fK.prototype.push.call(this,a,e)};uf.prototype._transform=function(a,e,i){throw new Error("_transform() is not implemented")};uf.prototype._write=function(a,e,i){var t=this._transformState;if(t.writecb=i,t.writechunk=a,t.writeencoding=e,!t.transforming){var r=this._readableState;(t.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}};uf.prototype._read=function(a){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};uf.prototype._destroy=function(a,e){var i=this;fK.prototype._destroy.call(this,a,function(t){e(t),i.emit("close")})};function lGe(a,e,i){if(e)return a.emit("error",e);if(i!=null&&a.push(i),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}});var pGe=be((unr,NGe)=>{"use strict";NGe.exports=gA;var uGe=lre(),fGe=Object.create(rS());fGe.inherits=nS();fGe.inherits(gA,uGe);function gA(a){if(!(this instanceof gA))return new gA(a);uGe.call(this,a)}gA.prototype._transform=function(a,e,i){i(null,a)}});var _Ge=be((Hn,NK)=>{var Pc=rt("stream");process.env.READABLE_STREAM==="disable"&&Pc?(NK.exports=Pc,Hn=NK.exports=Pc.Readable,Hn.Readable=Pc.Readable,Hn.Writable=Pc.Writable,Hn.Duplex=Pc.Duplex,Hn.Transform=Pc.Transform,Hn.PassThrough=Pc.PassThrough,Hn.Stream=Pc):(Hn=NK.exports=Zte(),Hn.Stream=Pc||Hn,Hn.Readable=Hn,Hn.Writable=Qte(),Hn.Duplex=dw(),Hn.Transform=lre(),Hn.PassThrough=pGe())});var vGe=be((fnr,hGe)=>{hGe.exports=_Ge().PassThrough});var kGe=be((Nnr,yGe)=>{var wGe=rt("util"),hK=vGe();yGe.exports={Readable:pK,Writable:_K};wGe.inherits(pK,hK);wGe.inherits(_K,hK);function gGe(a,e,i){a[e]=function(){return delete a[e],i.apply(this,arguments),this[e].apply(this,arguments)}}function pK(a,e){if(!(this instanceof pK))return new pK(a,e);hK.call(this,e),gGe(this,"_read",function(){var i=a.call(this,e),t=this.emit.bind(this,"error");i.on("error",t),i.pipe(this)}),this.emit("readable")}function _K(a,e){if(!(this instanceof _K))return new _K(a,e);hK.call(this,e),gGe(this,"_write",function(){var i=a.call(this,e),t=this.emit.bind(this,"error");i.on("error",t),this.pipe(i)}),this.emit("writable")}});var aia=be((fLr,eia)=>{function Zaa(a){this.buffer=a.data,this.width=a.width,this.height=a.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag="BM",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}Zaa.prototype.encode=function(){var a=new Buffer(this.offset+this.rgbSize);this.pos=0,a.write(this.flag,this.pos,2),this.pos+=2,a.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,a.writeUInt32LE(this.reserved,this.pos),this.pos+=4,a.writeUInt32LE(this.offset,this.pos),this.pos+=4,a.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,a.writeUInt32LE(this.width,this.pos),this.pos+=4,a.writeInt32LE(-this.height,this.pos),this.pos+=4,a.writeUInt16LE(this.planes,this.pos),this.pos+=2,a.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,a.writeUInt32LE(this.compress,this.pos),this.pos+=4,a.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,a.writeUInt32LE(this.hr,this.pos),this.pos+=4,a.writeUInt32LE(this.vr,this.pos),this.pos+=4,a.writeUInt32LE(this.colors,this.pos),this.pos+=4,a.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var e=0,i=3*this.width+this.extraBytes,t=0;t<this.height;t++){for(var r=0;r<this.width;r++){var n=this.pos+t*i+r*3;e++,a[n]=this.buffer[e++],a[n+1]=this.buffer[e++],a[n+2]=this.buffer[e++]}if(this.extraBytes>0){var s=this.pos+t*i+this.width*3;a.fill(0,s,s+this.extraBytes)}}return a};eia.exports=function(a,e){typeof e>"u"&&(e=100);var i=new Zaa(a),t=i.encode();return{data:t,width:a.width,height:a.height}}});var tia=be((NLr,iia)=>{function Am(a,e){if(this.pos=0,this.buffer=a,this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),this.flag!="BM")throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}Am.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var a=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(a);for(var e=0;e<a;e++){var i=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);this.palette[e]={red:r,green:t,blue:i,quad:n}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)};Am.prototype.parseRGBA=function(){var a="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Buffer(e),this[a]()};Am.prototype.bit1=function(){for(var a=Math.ceil(this.width/8),e=a%4,i=this.height>=0?this.height-1:-this.height,i=this.height-1;i>=0;i--){for(var t=this.bottom_up?i:this.height-1-i,r=0;r<a;r++)for(var n=this.buffer.readUInt8(this.pos++),s=t*this.width*4+r*8*4,o=0;o<8&&r*8+o<this.width;o++){var d=this.palette[n>>7-o&1];this.data[s+o*4]=0,this.data[s+o*4+1]=d.blue,this.data[s+o*4+2]=d.green,this.data[s+o*4+3]=d.red}e!=0&&(this.pos+=4-e)}};Am.prototype.bit4=function(){if(this.compress==2){let h=function(v){var w=this.palette[v];this.data[a]=0,this.data[a+1]=w.blue,this.data[a+2]=w.green,this.data[a+3]=w.red,a+=4};var _=h;this.data.fill(255);for(var a=0,e=this.bottom_up?this.height-1:0,i=!1;a<this.data.length;){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++);if(t==0)if(r==0){this.bottom_up?e--:e++,a=e*this.width*4,i=!1;continue}else{if(r==1)break;if(r==2){var n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=s:e+=s,a+=s*this.width*4+n*4}else{for(var o=this.buffer.readUInt8(this.pos++),d=0;d<r;d++)i?h.call(this,o&15):h.call(this,(o&240)>>4),d&1&&d+1<r&&(o=this.buffer.readUInt8(this.pos++)),i=!i;(r+1>>1&1)==1&&this.pos++}}else for(var d=0;d<t;d++)i?h.call(this,r&15):h.call(this,(r&240)>>4),i=!i}}else for(var l=Math.ceil(this.width/2),m=l%4,s=this.height-1;s>=0;s--){for(var c=this.bottom_up?s:this.height-1-s,n=0;n<l;n++){var r=this.buffer.readUInt8(this.pos++),a=c*this.width*4+n*2*4,u=r>>4,f=r&15,N=this.palette[u];if(this.data[a]=0,this.data[a+1]=N.blue,this.data[a+2]=N.green,this.data[a+3]=N.red,n*2+1>=this.width)break;N=this.palette[f],this.data[a+4]=0,this.data[a+4+1]=N.blue,this.data[a+4+2]=N.green,this.data[a+4+3]=N.red}m!=0&&(this.pos+=4-m)}};Am.prototype.bit8=function(){if(this.compress==1){let u=function(f){var N=this.palette[f];this.data[a]=0,this.data[a+1]=N.blue,this.data[a+2]=N.green,this.data[a+3]=N.red,a+=4};var c=u;this.data.fill(255);for(var a=0,e=this.bottom_up?this.height-1:0;a<this.data.length;){var i=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++);if(i==0)if(t==0){this.bottom_up?e--:e++,a=e*this.width*4;continue}else{if(t==1)break;if(t==2){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=n:e+=n,a+=n*this.width*4+r*4}else{for(var s=0;s<t;s++){var o=this.buffer.readUInt8(this.pos++);u.call(this,o)}t&!0&&this.pos++}}else for(var s=0;s<i;s++)u.call(this,t)}}else for(var d=this.width%4,n=this.height-1;n>=0;n--){for(var l=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var t=this.buffer.readUInt8(this.pos++),a=l*this.width*4+r*4;if(t<this.palette.length){var m=this.palette[t];this.data[a]=0,this.data[a+1]=m.blue,this.data[a+2]=m.green,this.data[a+3]=m.red}else this.data[a]=0,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}d!=0&&(this.pos+=4-d)}};Am.prototype.bit15=function(){for(var a=this.width%3,e=parseInt("11111",2),i=e,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var s=this.buffer.readUInt16LE(this.pos);this.pos+=2;var o=(s&i)/i*255|0,d=(s>>5&i)/i*255|0,l=(s>>10&i)/i*255|0,m=s>>15?255:0,c=r*this.width*4+n*4;this.data[c]=m,this.data[c+1]=o,this.data[c+2]=d,this.data[c+3]=l}this.pos+=a}};Am.prototype.bit16=function(){var a=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,this.compress==3&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var e=[0,0,0],i=0;i<16;i++)this.maskRed>>i&1&&e[0]++,this.maskGreen>>i&1&&e[1]++,this.maskBlue>>i&1&&e[2]++;e[1]+=e[0],e[2]+=e[1],e[0]=8-e[0],e[1]-=8,e[2]-=8;for(var t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var s=this.buffer.readUInt16LE(this.pos);this.pos+=2;var o=(s&this.maskBlue)<<e[0],d=(s&this.maskGreen)>>e[1],l=(s&this.maskRed)>>e[2],m=r*this.width*4+n*4;this.data[m]=0,this.data[m+1]=o,this.data[m+2]=d,this.data[m+3]=l}this.pos+=a}};Am.prototype.bit24=function(){for(var a=this.height-1;a>=0;a--){for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=e*this.width*4+i*4;this.data[s]=0,this.data[s+1]=t,this.data[s+2]=r,this.data[s+3]=n}this.pos+=this.width%4}};Am.prototype.bit32=function(){if(this.compress==3){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var a=this.height-1;a>=0;a--)for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var t=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++),o=e*this.width*4+i*4;this.data[o]=t,this.data[o+1]=r,this.data[o+2]=n,this.data[o+3]=s}}else for(var a=this.height-1;a>=0;a--)for(var e=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++),t=this.buffer.readUInt8(this.pos++),o=e*this.width*4+i*4;this.data[o]=t,this.data[o+1]=r,this.data[o+2]=n,this.data[o+3]=s}};Am.prototype.getData=function(){return this.data};iia.exports=function(a){var e=new Am(a);return e}});var nia=be((pLr,ria)=>{var QBi=aia(),YBi=tia();ria.exports={encode:QBi,decode:YBi}});var Ua=be((EVr,bna)=>{bna.exports={options:{usePureJavaScript:!1}}});var Tna=be((CVr,Sna)=>{var vue={};Sna.exports=vue;var Ina={};vue.encode=function(a,e,i){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(i!==void 0&&typeof i!="number")throw new TypeError('"maxline" must be a number.');var t="";if(!(a instanceof Uint8Array))t=VGi(a,e);else{var r=0,n=e.length,s=e.charAt(0),o=[0];for(r=0;r<a.length;++r){for(var d=0,l=a[r];d<o.length;++d)l+=o[d]<<8,o[d]=l%n,l=l/n|0;for(;l>0;)o.push(l%n),l=l/n|0}for(r=0;a[r]===0&&r<a.length-1;++r)t+=s;for(r=o.length-1;r>=0;--r)t+=e[o[r]]}if(i){var m=new RegExp(".{1,"+i+"}","g");t=t.match(m).join(`\r
|
|
3
3
|
`)}return t};vue.decode=function(a,e){if(typeof a!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var i=Ina[e];if(!i){i=Ina[e]=[];for(var t=0;t<e.length;++t)i[e.charCodeAt(t)]=t}a=a.replace(/\s/g,"");for(var r=e.length,n=e.charAt(0),s=[0],t=0;t<a.length;t++){var o=i[a.charCodeAt(t)];if(o===void 0)return;for(var d=0,l=o;d<s.length;++d)l+=s[d]*r,s[d]=l&255,l>>=8;for(;l>0;)s.push(l&255),l>>=8}for(var m=0;a[m]===n&&m<a.length-1;++m)s.push(0);return typeof Buffer<"u"?Buffer.from(s.reverse()):new Uint8Array(s.reverse())};function VGi(a,e){var i=0,t=e.length,r=e.charAt(0),n=[0];for(i=0;i<a.length();++i){for(var s=0,o=a.at(i);s<n.length;++s)o+=n[s]<<8,n[s]=o%t,o=o/t|0;for(;o>0;)n.push(o%t),o=o/t|0}var d="";for(i=0;a.at(i)===0&&i<a.length()-1;++i)d+=r;for(i=n.length-1;i>=0;--i)d+=e[n[i]];return d}});var Ti=be((AVr,Rna)=>{var Ena=Ua(),Cna=Tna(),G=Rna.exports=Ena.util=Ena.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){G.nextTick=process.nextTick,typeof setImmediate=="function"?G.setImmediate=setImmediate:G.setImmediate=G.nextTick;return}if(typeof setImmediate=="function"){G.setImmediate=function(){return setImmediate.apply(void 0,arguments)},G.nextTick=function(o){return setImmediate(o)};return}if(G.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(d){if(d.source===window&&d.data===a){d.stopPropagation();var l=e.slice();e.length=0,l.forEach(function(m){m()})}};var s=o,a="forge.setImmediate",e=[];G.setImmediate=function(d){e.push(d),e.length===1&&window.postMessage(a,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var i=Date.now(),t=!0,r=document.createElement("div"),e=[];new MutationObserver(function(){var d=e.slice();e.length=0,d.forEach(function(l){l()})}).observe(r,{attributes:!0});var n=G.setImmediate;G.setImmediate=function(d){Date.now()-i>15?(i=Date.now(),n(d)):(e.push(d),e.length===1&&r.setAttribute("a",t=!t))}}G.nextTick=G.setImmediate})();G.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;G.globalScope=(function(){return G.isNodejs?global:typeof self>"u"?window:self})();G.isArray=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"};G.isArrayBuffer=function(a){return typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer};G.isArrayBufferView=function(a){return a&&G.isArrayBuffer(a.buffer)&&a.byteLength!==void 0};function vx(a){if(!(a===8||a===16||a===24||a===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+a)}G.ByteBuffer=wue;function wue(a){if(this.data="",this.read=0,typeof a=="string")this.data=a;else if(G.isArrayBuffer(a)||G.isArrayBufferView(a))if(typeof Buffer<"u"&&a instanceof Buffer)this.data=a.toString("binary");else{var e=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var i=0;i<e.length;++i)this.putByte(e[i])}}else(a instanceof wue||typeof a=="object"&&typeof a.data=="string"&&typeof a.read=="number")&&(this.data=a.data,this.read=a.read);this._constructedStringLength=0}G.ByteStringBuffer=wue;var WGi=4096;G.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a,this._constructedStringLength>WGi&&(this.data.substr(0,1),this._constructedStringLength=0)};G.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};G.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};G.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};G.ByteStringBuffer.prototype.fillWithByte=function(a,e){a=String.fromCharCode(a);for(var i=this.data;e>0;)e&1&&(i+=a),e>>>=1,e>0&&(a+=a);return this.data=i,this._optimizeConstructedString(e),this};G.ByteStringBuffer.prototype.putBytes=function(a){return this.data+=a,this._optimizeConstructedString(a.length),this};G.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(G.encodeUtf8(a))};G.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};G.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};G.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};G.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255))};G.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};G.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};G.ByteStringBuffer.prototype.putInt=function(a,e){vx(e);var i="";do e-=8,i+=String.fromCharCode(a>>e&255);while(e>0);return this.putBytes(i)};G.ByteStringBuffer.prototype.putSignedInt=function(a,e){return a<0&&(a+=2<<e-1),this.putInt(a,e)};G.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};G.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};G.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,a};G.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,a};G.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,a};G.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,a};G.ByteStringBuffer.prototype.getInt24Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,a};G.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,a};G.ByteStringBuffer.prototype.getInt=function(a){vx(a);var e=0;do e=(e<<8)+this.data.charCodeAt(this.read++),a-=8;while(a>0);return e};G.ByteStringBuffer.prototype.getSignedInt=function(a){var e=this.getInt(a),i=2<<a-2;return e>=i&&(e-=i<<1),e};G.ByteStringBuffer.prototype.getBytes=function(a){var e;return a?(a=Math.min(this.length(),a),e=this.data.slice(this.read,this.read+a),this.read+=a):a===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};G.ByteStringBuffer.prototype.bytes=function(a){return typeof a>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};G.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+a)};G.ByteStringBuffer.prototype.setAt=function(a,e){return this.data=this.data.substr(0,this.read+a)+String.fromCharCode(e)+this.data.substr(this.read+a+1),this};G.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};G.ByteStringBuffer.prototype.copy=function(){var a=G.createBuffer(this.data);return a.read=this.read,a};G.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};G.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};G.ByteStringBuffer.prototype.truncate=function(a){var e=Math.max(0,this.length()-a);return this.data=this.data.substr(this.read,e),this.read=0,this};G.ByteStringBuffer.prototype.toHex=function(){for(var a="",e=this.read;e<this.data.length;++e){var i=this.data.charCodeAt(e);i<16&&(a+="0"),a+=i.toString(16)}return a};G.ByteStringBuffer.prototype.toString=function(){return G.decodeUtf8(this.bytes())};function GGi(a,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var i=G.isArrayBuffer(a),t=G.isArrayBufferView(a);if(i||t){i?this.data=new DataView(a):this.data=new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in e?e.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,a!=null&&this.putBytes(a),"writeOffset"in e&&(this.write=e.writeOffset)}G.DataBuffer=GGi;G.DataBuffer.prototype.length=function(){return this.write-this.read};G.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};G.DataBuffer.prototype.accommodate=function(a,e){if(this.length()>=a)return this;e=Math.max(e||this.growSize,a);var i=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),t=new Uint8Array(this.length()+e);return t.set(i),this.data=new DataView(t.buffer),this};G.DataBuffer.prototype.putByte=function(a){return this.accommodate(1),this.data.setUint8(this.write++,a),this};G.DataBuffer.prototype.fillWithByte=function(a,e){this.accommodate(e);for(var i=0;i<e;++i)this.data.setUint8(a);return this};G.DataBuffer.prototype.putBytes=function(a,e){if(G.isArrayBufferView(a)){var i=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),t=i.byteLength-i.byteOffset;this.accommodate(t);var r=new Uint8Array(this.data.buffer,this.write);return r.set(i),this.write+=t,this}if(G.isArrayBuffer(a)){var i=new Uint8Array(a);this.accommodate(i.byteLength);var r=new Uint8Array(this.data.buffer);return r.set(i,this.write),this.write+=i.byteLength,this}if(a instanceof G.DataBuffer||typeof a=="object"&&typeof a.read=="number"&&typeof a.write=="number"&&G.isArrayBufferView(a.data)){var i=new Uint8Array(a.data.byteLength,a.read,a.length());this.accommodate(i.byteLength);var r=new Uint8Array(a.data.byteLength,this.write);return r.set(i),this.write+=i.byteLength,this}if(a instanceof G.ByteStringBuffer&&(a=a.data,e="binary"),e=e||"binary",typeof a=="string"){var n;if(e==="hex")return this.accommodate(Math.ceil(a.length/2)),n=new Uint8Array(this.data.buffer,this.write),this.write+=G.binary.hex.decode(a,n,this.write),this;if(e==="base64")return this.accommodate(Math.ceil(a.length/4)*3),n=new Uint8Array(this.data.buffer,this.write),this.write+=G.binary.base64.decode(a,n,this.write),this;if(e==="utf8"&&(a=G.encodeUtf8(a),e="binary"),e==="binary"||e==="raw")return this.accommodate(a.length),n=new Uint8Array(this.data.buffer,this.write),this.write+=G.binary.raw.decode(n),this;if(e==="utf16")return this.accommodate(a.length*2),n=new Uint16Array(this.data.buffer,this.write),this.write+=G.text.utf16.encode(n),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+a)};G.DataBuffer.prototype.putBuffer=function(a){return this.putBytes(a),a.clear(),this};G.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};G.DataBuffer.prototype.putInt16=function(a){return this.accommodate(2),this.data.setInt16(this.write,a),this.write+=2,this};G.DataBuffer.prototype.putInt24=function(a){return this.accommodate(3),this.data.setInt16(this.write,a>>8&65535),this.data.setInt8(this.write,a>>16&255),this.write+=3,this};G.DataBuffer.prototype.putInt32=function(a){return this.accommodate(4),this.data.setInt32(this.write,a),this.write+=4,this};G.DataBuffer.prototype.putInt16Le=function(a){return this.accommodate(2),this.data.setInt16(this.write,a,!0),this.write+=2,this};G.DataBuffer.prototype.putInt24Le=function(a){return this.accommodate(3),this.data.setInt8(this.write,a>>16&255),this.data.setInt16(this.write,a>>8&65535,!0),this.write+=3,this};G.DataBuffer.prototype.putInt32Le=function(a){return this.accommodate(4),this.data.setInt32(this.write,a,!0),this.write+=4,this};G.DataBuffer.prototype.putInt=function(a,e){vx(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,a>>e&255);while(e>0);return this};G.DataBuffer.prototype.putSignedInt=function(a,e){return vx(e),this.accommodate(e/8),a<0&&(a+=2<<e-1),this.putInt(a,e)};G.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};G.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);return this.read+=2,a};G.DataBuffer.prototype.getInt24=function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,a};G.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);return this.read+=4,a};G.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);return this.read+=2,a};G.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,a};G.DataBuffer.prototype.getInt32Le=function(){var a=this.data.getInt32(this.read,!0);return this.read+=4,a};G.DataBuffer.prototype.getInt=function(a){vx(a);var e=0;do e=(e<<8)+this.data.getInt8(this.read++),a-=8;while(a>0);return e};G.DataBuffer.prototype.getSignedInt=function(a){var e=this.getInt(a),i=2<<a-2;return e>=i&&(e-=i<<1),e};G.DataBuffer.prototype.getBytes=function(a){var e;return a?(a=Math.min(this.length(),a),e=this.data.slice(this.read,this.read+a),this.read+=a):a===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};G.DataBuffer.prototype.bytes=function(a){return typeof a>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};G.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};G.DataBuffer.prototype.setAt=function(a,e){return this.data.setUint8(a,e),this};G.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};G.DataBuffer.prototype.copy=function(){return new G.DataBuffer(this)};G.DataBuffer.prototype.compact=function(){if(this.read>0){var a=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(a.byteLength);e.set(a),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};G.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};G.DataBuffer.prototype.truncate=function(a){return this.write=Math.max(0,this.length()-a),this.read=Math.min(this.read,this.write),this};G.DataBuffer.prototype.toHex=function(){for(var a="",e=this.read;e<this.data.byteLength;++e){var i=this.data.getUint8(e);i<16&&(a+="0"),a+=i.toString(16)}return a};G.DataBuffer.prototype.toString=function(a){var e=new Uint8Array(this.data,this.read,this.length());if(a=a||"utf8",a==="binary"||a==="raw")return G.binary.raw.encode(e);if(a==="hex")return G.binary.hex.encode(e);if(a==="base64")return G.binary.base64.encode(e);if(a==="utf8")return G.text.utf8.decode(e);if(a==="utf16")return G.text.utf16.decode(e);throw new Error("Invalid encoding: "+a)};G.createBuffer=function(a,e){return e=e||"raw",a!==void 0&&e==="utf8"&&(a=G.encodeUtf8(a)),new G.ByteBuffer(a)};G.fillString=function(a,e){for(var i="";e>0;)e&1&&(i+=a),e>>>=1,e>0&&(a+=a);return i};G.xorBytes=function(a,e,i){for(var t="",r="",n="",s=0,o=0;i>0;--i,++s)r=a.charCodeAt(s)^e.charCodeAt(s),o>=10&&(t+=n,n="",o=0),n+=String.fromCharCode(r),++o;return t+=n,t};G.hexToBytes=function(a){var e="",i=0;for(a.length&!0&&(i=1,e+=String.fromCharCode(parseInt(a[0],16)));i<a.length;i+=2)e+=String.fromCharCode(parseInt(a.substr(i,2),16));return e};G.bytesToHex=function(a){return G.createBuffer(a).toHex()};G.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var w_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g_=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Ana="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";G.encode64=function(a,e){for(var i="",t="",r,n,s,o=0;o<a.length;)r=a.charCodeAt(o++),n=a.charCodeAt(o++),s=a.charCodeAt(o++),i+=w_.charAt(r>>2),i+=w_.charAt((r&3)<<4|n>>4),isNaN(n)?i+="==":(i+=w_.charAt((n&15)<<2|s>>6),i+=isNaN(s)?"=":w_.charAt(s&63)),e&&i.length>e&&(t+=i.substr(0,e)+`\r
|
|
4
4
|
`,i=i.substr(e));return t+=i,t};G.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",i,t,r,n,s=0;s<a.length;)i=g_[a.charCodeAt(s++)-43],t=g_[a.charCodeAt(s++)-43],r=g_[a.charCodeAt(s++)-43],n=g_[a.charCodeAt(s++)-43],e+=String.fromCharCode(i<<2|t>>4),r!==64&&(e+=String.fromCharCode((t&15)<<4|r>>2),n!==64&&(e+=String.fromCharCode((r&3)<<6|n)));return e};G.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};G.decodeUtf8=function(a){return decodeURIComponent(escape(a))};G.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:Cna.encode,decode:Cna.decode}};G.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};G.binary.raw.decode=function(a,e,i){var t=e;t||(t=new Uint8Array(a.length)),i=i||0;for(var r=i,n=0;n<a.length;++n)t[r++]=a.charCodeAt(n);return e?r-i:t};G.binary.hex.encode=G.bytesToHex;G.binary.hex.decode=function(a,e,i){var t=e;t||(t=new Uint8Array(Math.ceil(a.length/2))),i=i||0;var r=0,n=i;for(a.length&1&&(r=1,t[n++]=parseInt(a[0],16));r<a.length;r+=2)t[n++]=parseInt(a.substr(r,2),16);return e?n-i:t};G.binary.base64.encode=function(a,e){for(var i="",t="",r,n,s,o=0;o<a.byteLength;)r=a[o++],n=a[o++],s=a[o++],i+=w_.charAt(r>>2),i+=w_.charAt((r&3)<<4|n>>4),isNaN(n)?i+="==":(i+=w_.charAt((n&15)<<2|s>>6),i+=isNaN(s)?"=":w_.charAt(s&63)),e&&i.length>e&&(t+=i.substr(0,e)+`\r
|
|
5
5
|
`,i=i.substr(e));return t+=i,t};G.binary.base64.decode=function(a,e,i){var t=e;t||(t=new Uint8Array(Math.ceil(a.length/4)*3)),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,""),i=i||0;for(var r,n,s,o,d=0,l=i;d<a.length;)r=g_[a.charCodeAt(d++)-43],n=g_[a.charCodeAt(d++)-43],s=g_[a.charCodeAt(d++)-43],o=g_[a.charCodeAt(d++)-43],t[l++]=r<<2|n>>4,s!==64&&(t[l++]=(n&15)<<4|s>>2,o!==64&&(t[l++]=(s&3)<<6|o));return e?l-i:t.subarray(0,l)};G.binary.base58.encode=function(a,e){return G.binary.baseN.encode(a,Ana,e)};G.binary.base58.decode=function(a,e){return G.binary.baseN.decode(a,Ana,e)};G.text={utf8:{},utf16:{}};G.text.utf8.encode=function(a,e,i){a=G.encodeUtf8(a);var t=e;t||(t=new Uint8Array(a.length)),i=i||0;for(var r=i,n=0;n<a.length;++n)t[r++]=a.charCodeAt(n);return e?r-i:t};G.text.utf8.decode=function(a){return G.decodeUtf8(String.fromCharCode.apply(null,a))};G.text.utf16.encode=function(a,e,i){var t=e;t||(t=new Uint8Array(a.length*2));var r=new Uint16Array(t.buffer);i=i||0;for(var n=i,s=i,o=0;o<a.length;++o)r[s++]=a.charCodeAt(o),n+=2;return e?n-i:t};G.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};G.deflate=function(a,e,i){if(e=G.decode64(a.deflate(G.encode64(e)).rval),i){var t=2,r=e.charCodeAt(1);r&32&&(t=6),e=e.substring(t,e.length-4)}return e};G.inflate=function(a,e,i){var t=a.inflate(G.encode64(e)).rval;return t===null?null:G.decode64(t)};var gue=function(a,e,i){if(!a)throw new Error("WebStorage not available.");var t;if(i===null?t=a.removeItem(e):(i=G.encode64(JSON.stringify(i)),t=a.setItem(e,i)),typeof t<"u"&&t.rval!==!0){var r=new Error(t.error.message);throw r.id=t.error.id,r.name=t.error.name,r}},yue=function(a,e){if(!a)throw new Error("WebStorage not available.");var i=a.getItem(e);if(a.init)if(i.rval===null){if(i.error){var t=new Error(i.error.message);throw t.id=i.error.id,t.name=i.error.name,t}i=null}else i=i.rval;return i!==null&&(i=JSON.parse(G.decode64(i))),i},$Gi=function(a,e,i,t){var r=yue(a,e);r===null&&(r={}),r[i]=t,gue(a,e,r)},HGi=function(a,e,i){var t=yue(a,e);return t!==null&&(t=i in t?t[i]:null),t},XGi=function(a,e,i){var t=yue(a,e);if(t!==null&&i in t){delete t[i];var r=!0;for(var n in t){r=!1;break}r&&(t=null),gue(a,e,t)}},QGi=function(a,e){gue(a,e,null)},VH=function(a,e,i){var t=null;typeof i>"u"&&(i=["web","flash"]);var r,n=!1,s=null;for(var o in i){r=i[o];try{if(r==="flash"||r==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");t=a.apply(this,e),n=r==="flash"}(r==="web"||r==="both")&&(e[0]=localStorage,t=a.apply(this,e),n=!0)}catch(d){s=d}if(n)break}if(!n)throw s;return t};G.setItem=function(a,e,i,t,r){VH($Gi,arguments,r)};G.getItem=function(a,e,i,t){return VH(HGi,arguments,t)};G.removeItem=function(a,e,i,t){VH(XGi,arguments,t)};G.clearItems=function(a,e,i){VH(QGi,arguments,i)};G.isEmpty=function(a){for(var e in a)if(a.hasOwnProperty(e))return!1;return!0};G.format=function(a){for(var e=/%./g,i,t,r=0,n=[],s=0;i=e.exec(a);){t=a.substring(s,e.lastIndex-2),t.length>0&&n.push(t),s=e.lastIndex;var o=i[0][1];switch(o){case"s":case"o":r<arguments.length?n.push(arguments[r+++1]):n.push("<?>");break;case"%":n.push("%");break;default:n.push("<%"+o+"?>")}}return n.push(a.substring(s)),n.join("")};G.formatNumber=function(a,e,i,t){var r=a,n=isNaN(e=Math.abs(e))?2:e,s=i===void 0?",":i,o=t===void 0?".":t,d=r<0?"-":"",l=parseInt(r=Math.abs(+r||0).toFixed(n),10)+"",m=l.length>3?l.length%3:0;return d+(m?l.substr(0,m)+o:"")+l.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+o)+(n?s+Math.abs(r-l).toFixed(n).slice(2):"")};G.formatSize=function(a){return a>=1073741824?a=G.formatNumber(a/1073741824,2,".","")+" GiB":a>=1048576?a=G.formatNumber(a/1048576,2,".","")+" MiB":a>=1024?a=G.formatNumber(a/1024,0)+" KiB":a=G.formatNumber(a,0)+" bytes",a};G.bytesFromIP=function(a){return a.indexOf(".")!==-1?G.bytesFromIPv4(a):a.indexOf(":")!==-1?G.bytesFromIPv6(a):null};G.bytesFromIPv4=function(a){if(a=a.split("."),a.length!==4)return null;for(var e=G.createBuffer(),i=0;i<a.length;++i){var t=parseInt(a[i],10);if(isNaN(t))return null;e.putByte(t)}return e.getBytes()};G.bytesFromIPv6=function(a){var e=0;a=a.split(":").filter(function(s){return s.length===0&&++e,!0});for(var i=(8-a.length+e)*2,t=G.createBuffer(),r=0;r<8;++r){if(!a[r]||a[r].length===0){t.fillWithByte(0,i),i=0;continue}var n=G.hexToBytes(a[r]);n.length<2&&t.putByte(0),t.putBytes(n)}return t.getBytes()};G.bytesToIP=function(a){return a.length===4?G.bytesToIPv4(a):a.length===16?G.bytesToIPv6(a):null};G.bytesToIPv4=function(a){if(a.length!==4)return null;for(var e=[],i=0;i<a.length;++i)e.push(a.charCodeAt(i));return e.join(".")};G.bytesToIPv6=function(a){if(a.length!==16)return null;for(var e=[],i=[],t=0,r=0;r<a.length;r+=2){for(var n=G.bytesToHex(a[r]+a[r+1]);n[0]==="0"&&n!=="0";)n=n.substr(1);if(n==="0"){var s=i[i.length-1],o=e.length;!s||o!==s.end+1?i.push({start:o,end:o}):(s.end=o,s.end-s.start>i[t].end-i[t].start&&(t=i.length-1))}e.push(n)}if(i.length>0){var d=i[t];d.end-d.start>0&&(e.splice(d.start,d.end-d.start+1,""),d.start===0&&e.unshift(""),d.end===7&&e.push(""))}return e.join(":")};G.estimateCores=function(a,e){if(typeof a=="function"&&(e=a,a={}),a=a||{},"cores"in G&&!a.update)return e(null,G.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return G.cores=navigator.hardwareConcurrency,e(null,G.cores);if(typeof Worker>"u")return G.cores=1,e(null,G.cores);if(typeof Blob>"u")return G.cores=2,e(null,G.cores);var i=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){for(var o=Date.now(),d=o+4;Date.now()<d;);self.postMessage({st:o,et:d})})}.toString(),")()"],{type:"application/javascript"}));t([],5,16);function t(s,o,d){if(o===0){var l=Math.floor(s.reduce(function(m,c){return m+c},0)/s.length);return G.cores=Math.max(1,l),URL.revokeObjectURL(i),e(null,G.cores)}r(d,function(m,c){s.push(n(d,c)),t(s,o-1,d)})}function r(s,o){for(var d=[],l=[],m=0;m<s;++m){var c=new Worker(i);c.addEventListener("message",function(u){if(l.push(u.data),l.length===s){for(var f=0;f<s;++f)d[f].terminate();o(null,l)}}),d.push(c)}for(var m=0;m<s;++m)d[m].postMessage(m)}function n(s,o){for(var d=[],l=0;l<s;++l)for(var m=o[l],c=d[l]=[],u=0;u<s;++u)if(l!==u){var f=o[u];(m.st>f.st&&m.st<f.et||f.st>m.st&&f.st<m.et)&&c.push(u)}return d.reduce(function(N,_){return Math.max(N,_.length)},0)}}});var WH=be((RVr,Dna)=>{var Pn=Ua();Ti();Dna.exports=Pn.cipher=Pn.cipher||{};Pn.cipher.algorithms=Pn.cipher.algorithms||{};Pn.cipher.createCipher=function(a,e){var i=a;if(typeof i=="string"&&(i=Pn.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+a);return new Pn.cipher.BlockCipher({algorithm:i,key:e,decrypt:!1})};Pn.cipher.createDecipher=function(a,e){var i=a;if(typeof i=="string"&&(i=Pn.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+a);return new Pn.cipher.BlockCipher({algorithm:i,key:e,decrypt:!0})};Pn.cipher.registerAlgorithm=function(a,e){a=a.toUpperCase(),Pn.cipher.algorithms[a]=e};Pn.cipher.getAlgorithm=function(a){return a=a.toUpperCase(),a in Pn.cipher.algorithms?Pn.cipher.algorithms[a]:null};var kue=Pn.cipher.BlockCipher=function(a){this.algorithm=a.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=a.decrypt,this.algorithm.initialize(a)};kue.prototype.start=function(a){a=a||{};var e={};for(var i in a)e[i]=a[i];e.decrypt=this._decrypt,this._finish=!1,this._input=Pn.util.createBuffer(),this.output=a.output||Pn.util.createBuffer(),this.mode.start(e)};kue.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};kue.prototype.finish=function(a){a&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(i){return a(this.blockSize,i,!1)},this.mode.unpad=function(i){return a(this.blockSize,i,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var jue=be((DVr,xna)=>{var Ln=Ua();Ti();Ln.cipher=Ln.cipher||{};var Ja=xna.exports=Ln.cipher.modes=Ln.cipher.modes||{};Ja.ecb=function(a){a=a||{},this.name="ECB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ja.ecb.prototype.start=function(a){};Ja.ecb.prototype.encrypt=function(a,e,i){if(a.length()<this.blockSize&&!(i&&a.length()>0))return!0;for(var t=0;t<this._ints;++t)this._inBlock[t]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var t=0;t<this._ints;++t)e.putInt32(this._outBlock[t])};Ja.ecb.prototype.decrypt=function(a,e,i){if(a.length()<this.blockSize&&!(i&&a.length()>0))return!0;for(var t=0;t<this._ints;++t)this._inBlock[t]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var t=0;t<this._ints;++t)e.putInt32(this._outBlock[t])};Ja.ecb.prototype.pad=function(a,e){var i=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(i,i),!0};Ja.ecb.prototype.unpad=function(a,e){if(e.overflow>0)return!1;var i=a.length(),t=a.at(i-1);return t>this.blockSize<<2?!1:(a.truncate(t),!0)};Ja.cbc=function(a){a=a||{},this.name="CBC",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Ja.cbc.prototype.start=function(a){if(a.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=GH(a.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Ja.cbc.prototype.encrypt=function(a,e,i){if(a.length()<this.blockSize&&!(i&&a.length()>0))return!0;for(var t=0;t<this._ints;++t)this._inBlock[t]=this._prev[t]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var t=0;t<this._ints;++t)e.putInt32(this._outBlock[t]);this._prev=this._outBlock};Ja.cbc.prototype.decrypt=function(a,e,i){if(a.length()<this.blockSize&&!(i&&a.length()>0))return!0;for(var t=0;t<this._ints;++t)this._inBlock[t]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var t=0;t<this._ints;++t)e.putInt32(this._prev[t]^this._outBlock[t]);this._prev=this._inBlock.slice(0)};Ja.cbc.prototype.pad=function(a,e){var i=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(i,i),!0};Ja.cbc.prototype.unpad=function(a,e){if(e.overflow>0)return!1;var i=a.length(),t=a.at(i-1);return t>this.blockSize<<2?!1:(a.truncate(t),!0)};Ja.cfb=function(a){a=a||{},this.name="CFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};Ja.cfb.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=GH(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ja.cfb.prototype.encrypt=function(a,e,i){var t=a.length();if(t===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&t>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=a.getInt32()^this._outBlock[r],e.putInt32(this._inBlock[r]);return}var n=(this.blockSize-t)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=a.getInt32()^this._outBlock[r],this._partialOutput.putInt32(this._partialBlock[r]);if(n>0)a.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;e.putBytes(this._partialOutput.getBytes(t-this._partialBytes)),this._partialBytes=0};Ja.cfb.prototype.decrypt=function(a,e,i){var t=a.length();if(t===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&t>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=a.getInt32(),e.putInt32(this._inBlock[r]^this._outBlock[r]);return}var n=(this.blockSize-t)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[r]^this._outBlock[r]);if(n>0)a.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;e.putBytes(this._partialOutput.getBytes(t-this._partialBytes)),this._partialBytes=0};Ja.ofb=function(a){a=a||{},this.name="OFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};Ja.ofb.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=GH(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ja.ofb.prototype.encrypt=function(a,e,i){var t=a.length();if(a.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&t>=this.blockSize){for(var r=0;r<this._ints;++r)e.putInt32(a.getInt32()^this._outBlock[r]),this._inBlock[r]=this._outBlock[r];return}var n=(this.blockSize-t)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(a.getInt32()^this._outBlock[r]);if(n>0)a.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._outBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;e.putBytes(this._partialOutput.getBytes(t-this._partialBytes)),this._partialBytes=0};Ja.ofb.prototype.decrypt=Ja.ofb.prototype.encrypt;Ja.ctr=function(a){a=a||{},this.name="CTR",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};Ja.ctr.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=GH(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Ja.ctr.prototype.encrypt=function(a,e,i){var t=a.length();if(t===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&t>=this.blockSize)for(var r=0;r<this._ints;++r)e.putInt32(a.getInt32()^this._outBlock[r]);else{var n=(this.blockSize-t)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(a.getInt32()^this._outBlock[r]);if(n>0&&(a.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;e.putBytes(this._partialOutput.getBytes(t-this._partialBytes)),this._partialBytes=0}$H(this._inBlock)};Ja.ctr.prototype.decrypt=Ja.ctr.prototype.encrypt;Ja.gcm=function(a){a=a||{},this.name="GCM",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Ja.gcm.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");var e=Ln.util.createBuffer(a.iv);this._cipherLength=0;var i;if("additionalData"in a?i=Ln.util.createBuffer(a.additionalData):i=Ln.util.createBuffer(),"tagLength"in a?this._tagLength=a.tagLength:this._tagLength=128,this._tag=null,a.decrypt&&(this._tag=Ln.util.createBuffer(a.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var t=e.length();if(t===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(que(t*8)))}this._inBlock=this._j0.slice(0),$H(this._inBlock),this._partialBytes=0,i=Ln.util.createBuffer(i),this._aDataLength=que(i.length()*8);var r=i.length()%this.blockSize;for(r&&i.fillWithByte(0,this.blockSize-r),this._s=[0,0,0,0];i.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[i.getInt32(),i.getInt32(),i.getInt32(),i.getInt32()])};Ja.gcm.prototype.encrypt=function(a,e,i){var t=a.length();if(t===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&t>=this.blockSize){for(var r=0;r<this._ints;++r)e.putInt32(this._outBlock[r]^=a.getInt32());this._cipherLength+=this.blockSize}else{var n=(this.blockSize-t)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(a.getInt32()^this._outBlock[r]);if(n<=0||i){if(i){var s=t%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(var r=0;r<this._ints;++r)this._outBlock[r]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return a.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;e.putBytes(this._partialOutput.getBytes(t-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),$H(this._inBlock)};Ja.gcm.prototype.decrypt=function(a,e,i){var t=a.length();if(t<this.blockSize&&!(i&&t>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),$H(this._inBlock),this._hashBlock[0]=a.getInt32(),this._hashBlock[1]=a.getInt32(),this._hashBlock[2]=a.getInt32(),this._hashBlock[3]=a.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var r=0;r<this._ints;++r)e.putInt32(this._outBlock[r]^this._hashBlock[r]);t<this.blockSize?this._cipherLength+=t%this.blockSize:this._cipherLength+=this.blockSize};Ja.gcm.prototype.afterFinish=function(a,e){var i=!0;e.decrypt&&e.overflow&&a.truncate(this.blockSize-e.overflow),this.tag=Ln.util.createBuffer();var t=this._aDataLength.concat(que(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,t);var r=[];this.cipher.encrypt(this._j0,r);for(var n=0;n<this._ints;++n)this.tag.putInt32(this._s[n]^r[n]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(i=!1),i};Ja.gcm.prototype.multiply=function(a,e){for(var i=[0,0,0,0],t=e.slice(0),r=0;r<128;++r){var n=a[r/32|0]&1<<31-r%32;n&&(i[0]^=t[0],i[1]^=t[1],i[2]^=t[2],i[3]^=t[3]),this.pow(t,t)}return i};Ja.gcm.prototype.pow=function(a,e){for(var i=a[3]&1,t=3;t>0;--t)e[t]=a[t]>>>1|(a[t-1]&1)<<31;e[0]=a[0]>>>1,i&&(e[0]^=this._R)};Ja.gcm.prototype.tableMultiply=function(a){for(var e=[0,0,0,0],i=0;i<32;++i){var t=i/8|0,r=a[t]>>>(7-i%8)*4&15,n=this._m[i][r];e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3]}return e};Ja.gcm.prototype.ghash=function(a,e,i){return e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3],this.tableMultiply(e)};Ja.gcm.prototype.generateHashTable=function(a,e){for(var i=8/e,t=4*i,r=16*i,n=new Array(r),s=0;s<r;++s){var o=[0,0,0,0],d=s/t|0,l=(t-1-s%t)*e;o[d]=1<<e-1<<l,n[s]=this.generateSubHashTable(this.multiply(o,a),e)}return n};Ja.gcm.prototype.generateSubHashTable=function(a,e){var i=1<<e,t=i>>>1,r=new Array(i);r[t]=a.slice(0);for(var n=t>>>1;n>0;)this.pow(r[2*n],r[n]=[]),n>>=1;for(n=2;n<t;){for(var s=1;s<n;++s){var o=r[n],d=r[s];r[n+s]=[o[0]^d[0],o[1]^d[1],o[2]^d[2],o[3]^d[3]]}n*=2}for(r[0]=[0,0,0,0],n=t+1;n<i;++n){var l=r[n^t];r[n]=[a[0]^l[0],a[1]^l[1],a[2]^l[2],a[3]^l[3]]}return r};function GH(a,e){if(typeof a=="string"&&(a=Ln.util.createBuffer(a)),Ln.util.isArray(a)&&a.length>4){var i=a;a=Ln.util.createBuffer();for(var t=0;t<i.length;++t)a.putByte(i[t])}if(a.length()<e)throw new Error("Invalid IV length; got "+a.length()+" bytes and expected "+e+" bytes.");if(!Ln.util.isArray(a)){for(var r=[],n=e/4,t=0;t<n;++t)r.push(a.getInt32());a=r}return a}function $H(a){a[a.length-1]=a[a.length-1]+1&4294967295}function que(a){return[a/4294967296|0,a&4294967295]}});var y_=be((xVr,Ona)=>{var St=Ua();WH();jue();Ti();Ona.exports=St.aes=St.aes||{};St.aes.startEncrypting=function(a,e,i,t){var r=HH({key:a,output:i,decrypt:!1,mode:t});return r.start(e),r};St.aes.createEncryptionCipher=function(a,e){return HH({key:a,output:null,decrypt:!1,mode:e})};St.aes.startDecrypting=function(a,e,i,t){var r=HH({key:a,output:i,decrypt:!0,mode:t});return r.start(e),r};St.aes.createDecryptionCipher=function(a,e){return HH({key:a,output:null,decrypt:!0,mode:e})};St.aes.Algorithm=function(a,e){Sue||Pna();var i=this;i.name=a,i.mode=new e({blockSize:16,cipher:{encrypt:function(t,r){return Iue(i._w,t,r,!1)},decrypt:function(t,r){return Iue(i._w,t,r,!0)}}}),i._init=!1};St.aes.Algorithm.prototype.initialize=function(a){if(!this._init){var e=a.key,i;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=St.util.createBuffer(e);else if(St.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){i=e,e=St.util.createBuffer();for(var t=0;t<i.length;++t)e.putByte(i[t])}if(!St.util.isArray(e)){i=e,e=[];var r=i.length();if(r===16||r===24||r===32){r=r>>>2;for(var t=0;t<r;++t)e.push(i.getInt32())}}if(!St.util.isArray(e)||!(e.length===4||e.length===6||e.length===8))throw new Error("Invalid key parameter.");var n=this.mode.name,s=["CFB","OFB","CTR","GCM"].indexOf(n)!==-1;this._w=Lna(e,a.decrypt&&!s),this._init=!0}};St.aes._expandKey=function(a,e){return Sue||Pna(),Lna(a,e)};St.aes._updateBlock=Iue;fb("AES-ECB",St.cipher.modes.ecb);fb("AES-CBC",St.cipher.modes.cbc);fb("AES-CFB",St.cipher.modes.cfb);fb("AES-OFB",St.cipher.modes.ofb);fb("AES-CTR",St.cipher.modes.ctr);fb("AES-GCM",St.cipher.modes.gcm);function fb(a,e){var i=function(){return new St.aes.Algorithm(a,e)};St.cipher.registerAlgorithm(a,i)}var Sue=!1,ub=4,no,bue,Mna,ug,Pm;function Pna(){Sue=!0,Mna=[0,1,2,4,8,16,32,64,128,27,54];for(var a=new Array(256),e=0;e<128;++e)a[e]=e<<1,a[e+128]=e+128<<1^283;no=new Array(256),bue=new Array(256),ug=new Array(4),Pm=new Array(4);for(var e=0;e<4;++e)ug[e]=new Array(256),Pm[e]=new Array(256);for(var i=0,t=0,r,n,s,o,d,l,m,e=0;e<256;++e){o=t^t<<1^t<<2^t<<3^t<<4,o=o>>8^o&255^99,no[i]=o,bue[o]=i,d=a[o],r=a[i],n=a[r],s=a[n],l=d<<24^o<<16^o<<8^(o^d),m=(r^n^s)<<24^(i^s)<<16^(i^n^s)<<8^(i^r^s);for(var c=0;c<4;++c)ug[c][i]=l,Pm[c][o]=m,l=l<<24|l>>>8,m=m<<24|m>>>8;i===0?i=t=1:(i=r^a[a[a[r^s]]],t^=a[a[t]])}}function Lna(a,e){for(var i=a.slice(0),t,r=1,n=i.length,s=n+6+1,o=ub*s,d=n;d<o;++d)t=i[d-1],d%n===0?(t=no[t>>>16&255]<<24^no[t>>>8&255]<<16^no[t&255]<<8^no[t>>>24]^Mna[r]<<24,r++):n>6&&d%n===4&&(t=no[t>>>24]<<24^no[t>>>16&255]<<16^no[t>>>8&255]<<8^no[t&255]),i[d]=i[d-n]^t;if(e){var l,m=Pm[0],c=Pm[1],u=Pm[2],f=Pm[3],N=i.slice(0);o=i.length;for(var d=0,_=o-ub;d<o;d+=ub,_-=ub)if(d===0||d===o-ub)N[d]=i[_],N[d+1]=i[_+3],N[d+2]=i[_+2],N[d+3]=i[_+1];else for(var h=0;h<ub;++h)l=i[_+h],N[d+(3&-h)]=m[no[l>>>24]]^c[no[l>>>16&255]]^u[no[l>>>8&255]]^f[no[l&255]];i=N}return i}function Iue(a,e,i,t){var r=a.length/4-1,n,s,o,d,l;t?(n=Pm[0],s=Pm[1],o=Pm[2],d=Pm[3],l=bue):(n=ug[0],s=ug[1],o=ug[2],d=ug[3],l=no);var m,c,u,f,N,_,h;m=e[0]^a[0],c=e[t?3:1]^a[1],u=e[2]^a[2],f=e[t?1:3]^a[3];for(var v=3,w=1;w<r;++w)N=n[m>>>24]^s[c>>>16&255]^o[u>>>8&255]^d[f&255]^a[++v],_=n[c>>>24]^s[u>>>16&255]^o[f>>>8&255]^d[m&255]^a[++v],h=n[u>>>24]^s[f>>>16&255]^o[m>>>8&255]^d[c&255]^a[++v],f=n[f>>>24]^s[m>>>16&255]^o[c>>>8&255]^d[u&255]^a[++v],m=N,c=_,u=h;i[0]=l[m>>>24]<<24^l[c>>>16&255]<<16^l[u>>>8&255]<<8^l[f&255]^a[++v],i[t?3:1]=l[c>>>24]<<24^l[u>>>16&255]<<16^l[f>>>8&255]<<8^l[m&255]^a[++v],i[2]=l[u>>>24]<<24^l[f>>>16&255]<<16^l[m>>>8&255]<<8^l[c&255]^a[++v],i[t?1:3]=l[f>>>24]<<24^l[m>>>16&255]<<16^l[c>>>8&255]<<8^l[u&255]^a[++v]}function HH(a){a=a||{};var e=(a.mode||"CBC").toUpperCase(),i="AES-"+e,t;a.decrypt?t=St.cipher.createDecipher(i,a.key):t=St.cipher.createCipher(i,a.key);var r=t.start;return t.start=function(n,s){var o=null;s instanceof St.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=n,r.call(t,s)},t}});var k_=be((MVr,Bna)=>{var wx=Ua();wx.pki=wx.pki||{};var Tue=Bna.exports=wx.pki.oids=wx.oids=wx.oids||{};function he(a,e){Tue[a]=e,Tue[e]=a}function $i(a,e){Tue[a]=e}he("1.2.840.113549.1.1.1","rsaEncryption");he("1.2.840.113549.1.1.4","md5WithRSAEncryption");he("1.2.840.113549.1.1.5","sha1WithRSAEncryption");he("1.2.840.113549.1.1.7","RSAES-OAEP");he("1.2.840.113549.1.1.8","mgf1");he("1.2.840.113549.1.1.9","pSpecified");he("1.2.840.113549.1.1.10","RSASSA-PSS");he("1.2.840.113549.1.1.11","sha256WithRSAEncryption");he("1.2.840.113549.1.1.12","sha384WithRSAEncryption");he("1.2.840.113549.1.1.13","sha512WithRSAEncryption");he("1.3.101.112","EdDSA25519");he("1.2.840.10040.4.3","dsa-with-sha1");he("1.3.14.3.2.7","desCBC");he("1.3.14.3.2.26","sha1");he("1.3.14.3.2.29","sha1WithRSASignature");he("2.16.840.1.101.3.4.2.1","sha256");he("2.16.840.1.101.3.4.2.2","sha384");he("2.16.840.1.101.3.4.2.3","sha512");he("2.16.840.1.101.3.4.2.4","sha224");he("2.16.840.1.101.3.4.2.5","sha512-224");he("2.16.840.1.101.3.4.2.6","sha512-256");he("1.2.840.113549.2.2","md2");he("1.2.840.113549.2.5","md5");he("1.2.840.113549.1.7.1","data");he("1.2.840.113549.1.7.2","signedData");he("1.2.840.113549.1.7.3","envelopedData");he("1.2.840.113549.1.7.4","signedAndEnvelopedData");he("1.2.840.113549.1.7.5","digestedData");he("1.2.840.113549.1.7.6","encryptedData");he("1.2.840.113549.1.9.1","emailAddress");he("1.2.840.113549.1.9.2","unstructuredName");he("1.2.840.113549.1.9.3","contentType");he("1.2.840.113549.1.9.4","messageDigest");he("1.2.840.113549.1.9.5","signingTime");he("1.2.840.113549.1.9.6","counterSignature");he("1.2.840.113549.1.9.7","challengePassword");he("1.2.840.113549.1.9.8","unstructuredAddress");he("1.2.840.113549.1.9.14","extensionRequest");he("1.2.840.113549.1.9.20","friendlyName");he("1.2.840.113549.1.9.21","localKeyId");he("1.2.840.113549.1.9.22.1","x509Certificate");he("1.2.840.113549.1.12.10.1.1","keyBag");he("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");he("1.2.840.113549.1.12.10.1.3","certBag");he("1.2.840.113549.1.12.10.1.4","crlBag");he("1.2.840.113549.1.12.10.1.5","secretBag");he("1.2.840.113549.1.12.10.1.6","safeContentsBag");he("1.2.840.113549.1.5.13","pkcs5PBES2");he("1.2.840.113549.1.5.12","pkcs5PBKDF2");he("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");he("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");he("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");he("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");he("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");he("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");he("1.2.840.113549.2.7","hmacWithSHA1");he("1.2.840.113549.2.8","hmacWithSHA224");he("1.2.840.113549.2.9","hmacWithSHA256");he("1.2.840.113549.2.10","hmacWithSHA384");he("1.2.840.113549.2.11","hmacWithSHA512");he("1.2.840.113549.3.7","des-EDE3-CBC");he("2.16.840.1.101.3.4.1.2","aes128-CBC");he("2.16.840.1.101.3.4.1.22","aes192-CBC");he("2.16.840.1.101.3.4.1.42","aes256-CBC");he("2.5.4.3","commonName");he("2.5.4.4","surname");he("2.5.4.5","serialNumber");he("2.5.4.6","countryName");he("2.5.4.7","localityName");he("2.5.4.8","stateOrProvinceName");he("2.5.4.9","streetAddress");he("2.5.4.10","organizationName");he("2.5.4.11","organizationalUnitName");he("2.5.4.12","title");he("2.5.4.13","description");he("2.5.4.15","businessCategory");he("2.5.4.17","postalCode");he("2.5.4.42","givenName");he("2.5.4.65","pseudonym");he("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");he("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");he("2.16.840.1.113730.1.1","nsCertType");he("2.16.840.1.113730.1.13","nsComment");$i("2.5.29.1","authorityKeyIdentifier");$i("2.5.29.2","keyAttributes");$i("2.5.29.3","certificatePolicies");$i("2.5.29.4","keyUsageRestriction");$i("2.5.29.5","policyMapping");$i("2.5.29.6","subtreesConstraint");$i("2.5.29.7","subjectAltName");$i("2.5.29.8","issuerAltName");$i("2.5.29.9","subjectDirectoryAttributes");$i("2.5.29.10","basicConstraints");$i("2.5.29.11","nameConstraints");$i("2.5.29.12","policyConstraints");$i("2.5.29.13","basicConstraints");he("2.5.29.14","subjectKeyIdentifier");he("2.5.29.15","keyUsage");$i("2.5.29.16","privateKeyUsagePeriod");he("2.5.29.17","subjectAltName");he("2.5.29.18","issuerAltName");he("2.5.29.19","basicConstraints");$i("2.5.29.20","cRLNumber");$i("2.5.29.21","cRLReason");$i("2.5.29.22","expirationDate");$i("2.5.29.23","instructionCode");$i("2.5.29.24","invalidityDate");$i("2.5.29.25","cRLDistributionPoints");$i("2.5.29.26","issuingDistributionPoint");$i("2.5.29.27","deltaCRLIndicator");$i("2.5.29.28","issuingDistributionPoint");$i("2.5.29.29","certificateIssuer");$i("2.5.29.30","nameConstraints");he("2.5.29.31","cRLDistributionPoints");he("2.5.29.32","certificatePolicies");$i("2.5.29.33","policyMappings");$i("2.5.29.34","policyConstraints");he("2.5.29.35","authorityKeyIdentifier");$i("2.5.29.36","policyConstraints");he("2.5.29.37","extKeyUsage");$i("2.5.29.46","freshestCRL");$i("2.5.29.54","inhibitAnyPolicy");he("1.3.6.1.4.1.11129.2.4.2","timestampList");he("1.3.6.1.5.5.7.1.1","authorityInfoAccess");he("1.3.6.1.5.5.7.3.1","serverAuth");he("1.3.6.1.5.5.7.3.2","clientAuth");he("1.3.6.1.5.5.7.3.3","codeSigning");he("1.3.6.1.5.5.7.3.4","emailProtection");he("1.3.6.1.5.5.7.3.8","timeStamping")});var Lm=be((PVr,Fna)=>{var Ot=Ua();Ti();k_();var De=Fna.exports=Ot.asn1=Ot.asn1||{};De.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};De.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};De.maxDepth=256;De.create=function(a,e,i,t,r){if(Ot.util.isArray(t)){for(var n=[],s=0;s<t.length;++s)t[s]!==void 0&&n.push(t[s]);t=n}var o={tagClass:a,type:e,constructed:i,composed:i||Ot.util.isArray(t),value:t};return r&&"bitStringContents"in r&&(o.bitStringContents=r.bitStringContents,o.original=De.copy(o)),o};De.copy=function(a,e){var i;if(Ot.util.isArray(a)){i=[];for(var t=0;t<a.length;++t)i.push(De.copy(a[t],e));return i}return typeof a=="string"?a:(i={tagClass:a.tagClass,type:a.type,constructed:a.constructed,composed:a.composed,value:De.copy(a.value,e)},e&&!e.excludeBitStringContents&&(i.bitStringContents=a.bitStringContents),i)};De.equals=function(a,e,i){if(Ot.util.isArray(a)){if(!Ot.util.isArray(e)||a.length!==e.length)return!1;for(var t=0;t<a.length;++t)if(!De.equals(a[t],e[t]))return!1;return!0}if(typeof a!=typeof e)return!1;if(typeof a=="string")return a===e;var r=a.tagClass===e.tagClass&&a.type===e.type&&a.constructed===e.constructed&&a.composed===e.composed&&De.equals(a.value,e.value);return i&&i.includeBitStringContents&&(r=r&&a.bitStringContents===e.bitStringContents),r};De.getBerValueLength=function(a){var e=a.getByte();if(e!==128){var i,t=e&128;return t?i=a.getInt((e&127)<<3):i=e,i}};function gx(a,e,i){if(i>e){var t=new Error("Too few bytes to parse DER.");throw t.available=a.length(),t.remaining=e,t.requested=i,t}}var YGi=function(a,e){var i=a.getByte();if(e--,i!==128){var t,r=i&128;if(!r)t=i;else{var n=i&127;gx(a,e,n),t=a.getInt(n<<3)}if(t<0)throw new Error("Negative length: "+t);return t}};De.fromDer=function(a,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"maxDepth"in e||(e.maxDepth=De.maxDepth),typeof a=="string"&&(a=Ot.util.createBuffer(a));var i=a.length(),t=XH(a,a.length(),0,e);if(e.parseAllBytes&&a.length()!==0){var r=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw r.byteCount=i,r.remaining=a.length(),r}return t};function XH(a,e,i,t){if(i>=t.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var r;gx(a,e,2);var n=a.getByte();e--;var s=n&192,o=n&31;r=a.length();var d=YGi(a,e);if(e-=r-a.length(),d!==void 0&&d>e){if(t.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=a.length(),l.remaining=e,l.requested=d,l}d=e}var m,c,u=(n&32)===32;if(u)if(m=[],d===void 0)for(;;){if(gx(a,e,2),a.bytes(2)==="\0\0"){a.getBytes(2),e-=2;break}r=a.length(),m.push(XH(a,e,i+1,t)),e-=r-a.length()}else for(;d>0;)r=a.length(),m.push(XH(a,d,i+1,t)),e-=r-a.length(),d-=r-a.length();if(m===void 0&&s===De.Class.UNIVERSAL&&o===De.Type.BITSTRING&&(c=a.bytes(d)),m===void 0&&t.decodeBitStrings&&s===De.Class.UNIVERSAL&&o===De.Type.BITSTRING&&d>1){var f=a.read,N=e,_=0;if(o===De.Type.BITSTRING&&(gx(a,e,1),_=a.getByte(),e--),_===0)try{r=a.length();var h={strict:!0,decodeBitStrings:!0},v=XH(a,e,i+1,h),w=r-a.length();e-=w,o==De.Type.BITSTRING&&w++;var g=v.tagClass;w===d&&(g===De.Class.UNIVERSAL||g===De.Class.CONTEXT_SPECIFIC)&&(m=[v])}catch{}m===void 0&&(a.read=f,e=N)}if(m===void 0){if(d===void 0){if(t.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(o===De.Type.BMPSTRING)for(m="";d>0;d-=2)gx(a,e,2),m+=String.fromCharCode(a.getInt16()),e-=2;else m=a.getBytes(d),e-=d}var k=c===void 0?null:{bitStringContents:c};return De.create(s,o,u,m,k)}De.toDer=function(a){var e=Ot.util.createBuffer(),i=a.tagClass|a.type,t=Ot.util.createBuffer(),r=!1;if("bitStringContents"in a&&(r=!0,a.original&&(r=De.equals(a,a.original))),r)t.putBytes(a.bitStringContents);else if(a.composed){a.constructed?i|=32:t.putByte(0);for(var n=0;n<a.value.length;++n)a.value[n]!==void 0&&t.putBuffer(De.toDer(a.value[n]))}else if(a.type===De.Type.BMPSTRING)for(var n=0;n<a.value.length;++n)t.putInt16(a.value.charCodeAt(n));else a.type===De.Type.INTEGER&&a.value.length>1&&(a.value.charCodeAt(0)===0&&(a.value.charCodeAt(1)&128)===0||a.value.charCodeAt(0)===255&&(a.value.charCodeAt(1)&128)===128)?t.putBytes(a.value.substr(1)):t.putBytes(a.value);if(e.putByte(i),t.length()<=127)e.putByte(t.length()&127);else{var s=t.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);e.putByte(o.length|128);for(var n=o.length-1;n>=0;--n)e.putByte(o.charCodeAt(n))}return e.putBuffer(t),e};De.oidToDer=function(a){var e=a.split("."),i=Ot.util.createBuffer();i.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var t,r,n,s,o=2;o<e.length;++o){if(t=!0,r=[],n=parseInt(e[o],10),n>4294967295)throw new Error("OID value too large; max is 32-bits.");do s=n&127,n=n>>>7,t||(s|=128),r.push(s),t=!1;while(n>0);for(var d=r.length-1;d>=0;--d)i.putByte(r[d])}return i};De.derToOid=function(a){var e;typeof a=="string"&&(a=Ot.util.createBuffer(a));var i=a.getByte();e=Math.floor(i/40)+"."+i%40;for(var t=0;a.length()>0;){if(t>70368744177663)throw new Error("OID value too large; max is 53-bits.");i=a.getByte(),t=t*128,i&128?t+=i&127:(e+="."+(t+i),t=0)}return e};De.utcTimeToDate=function(a){var e=new Date,i=parseInt(a.substr(0,2),10);i=i>=50?1900+i:2e3+i;var t=parseInt(a.substr(2,2),10)-1,r=parseInt(a.substr(4,2),10),n=parseInt(a.substr(6,2),10),s=parseInt(a.substr(8,2),10),o=0;if(a.length>11){var d=a.charAt(10),l=10;d!=="+"&&d!=="-"&&(o=parseInt(a.substr(10,2),10),l+=2)}if(e.setUTCFullYear(i,t,r),e.setUTCHours(n,s,o,0),l&&(d=a.charAt(l),d==="+"||d==="-")){var m=parseInt(a.substr(l+1,2),10),c=parseInt(a.substr(l+4,2),10),u=m*60+c;u*=6e4,d==="+"?e.setTime(+e-u):e.setTime(+e+u)}return e};De.generalizedTimeToDate=function(a){var e=new Date,i=parseInt(a.substr(0,4),10),t=parseInt(a.substr(4,2),10)-1,r=parseInt(a.substr(6,2),10),n=parseInt(a.substr(8,2),10),s=parseInt(a.substr(10,2),10),o=parseInt(a.substr(12,2),10),d=0,l=0,m=!1;a.charAt(a.length-1)==="Z"&&(m=!0);var c=a.length-5,u=a.charAt(c);if(u==="+"||u==="-"){var f=parseInt(a.substr(c+1,2),10),N=parseInt(a.substr(c+4,2),10);l=f*60+N,l*=6e4,u==="+"&&(l*=-1),m=!0}return a.charAt(14)==="."&&(d=parseFloat(a.substr(14),10)*1e3),m?(e.setUTCFullYear(i,t,r),e.setUTCHours(n,s,o,d),e.setTime(+e+l)):(e.setFullYear(i,t,r),e.setHours(n,s,o,d)),e};De.dateToUtcTime=function(a){if(typeof a=="string")return a;var e="",i=[];i.push((""+a.getUTCFullYear()).substr(2)),i.push(""+(a.getUTCMonth()+1)),i.push(""+a.getUTCDate()),i.push(""+a.getUTCHours()),i.push(""+a.getUTCMinutes()),i.push(""+a.getUTCSeconds());for(var t=0;t<i.length;++t)i[t].length<2&&(e+="0"),e+=i[t];return e+="Z",e};De.dateToGeneralizedTime=function(a){if(typeof a=="string")return a;var e="",i=[];i.push(""+a.getUTCFullYear()),i.push(""+(a.getUTCMonth()+1)),i.push(""+a.getUTCDate()),i.push(""+a.getUTCHours()),i.push(""+a.getUTCMinutes()),i.push(""+a.getUTCSeconds());for(var t=0;t<i.length;++t)i[t].length<2&&(e+="0"),e+=i[t];return e+="Z",e};De.integerToDer=function(a){var e=Ot.util.createBuffer();if(a>=-128&&a<128)return e.putSignedInt(a,8);if(a>=-32768&&a<32768)return e.putSignedInt(a,16);if(a>=-8388608&&a<8388608)return e.putSignedInt(a,24);if(a>=-2147483648&&a<2147483648)return e.putSignedInt(a,32);var i=new Error("Integer too large; max is 32-bits.");throw i.integer=a,i};De.derToInteger=function(a){typeof a=="string"&&(a=Ot.util.createBuffer(a));var e=a.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return a.getSignedInt(e)};De.validate=function(a,e,i,t){var r=!1;if((a.tagClass===e.tagClass||typeof e.tagClass>"u")&&(a.type===e.type||typeof e.type>"u"))if(a.constructed===e.constructed||typeof e.constructed>"u"){if(r=!0,e.value&&Ot.util.isArray(e.value))for(var n=0,s=0;r&&s<e.value.length;++s){var o=e.value[s];r=!!o.optional;var d=a.value[n];if(!d){o.optional||(r=!1,t&&t.push("["+e.name+'] Missing required element. Expected tag class "'+o.tagClass+'", type "'+o.type+'"'));continue}var l=typeof o.tagClass<"u"&&typeof o.type<"u";if(l&&(d.tagClass!==o.tagClass||d.type!==o.type))if(o.optional){r=!0;continue}else{r=!1,t&&t.push("["+e.name+"] Tag mismatch. Expected ("+o.tagClass+","+o.type+"), got ("+d.tagClass+","+d.type+")");break}var m=De.validate(d,o,i,t);if(m)++n,r=!0;else if(o.optional)r=!0;else{r=!1;break}}if(r&&i&&(e.capture&&(i[e.capture]=a.value),e.captureAsn1&&(i[e.captureAsn1]=a),e.captureBitStringContents&&"bitStringContents"in a&&(i[e.captureBitStringContents]=a.bitStringContents),e.captureBitStringValue&&"bitStringContents"in a)){var c;if(a.bitStringContents.length<2)i[e.captureBitStringValue]="";else{var u=a.bitStringContents.charCodeAt(0);if(u!==0)throw new Error("captureBitStringValue only supported for zero unused bits");i[e.captureBitStringValue]=a.bitStringContents.slice(1)}}}else t&&t.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+a.constructed+'"');else t&&(a.tagClass!==e.tagClass&&t.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+a.tagClass+'"'),a.type!==e.type&&t.push("["+e.name+'] Expected type "'+e.type+'", got "'+a.type+'"'));return r};var Una=/[^\\u0000-\\u00ff]/;De.prettyPrint=function(a,e,i){var t="";e=e||0,i=i||2,e>0&&(t+=`
|