import{g as jr}from"./chunk-M2YCTORM.js";import"./chunk-M72QJ5SI.js";import"./chunk-5SHCNQ2O.js";import"./chunk-7IBR52CF.js";import"./chunk-2T5IQXGX.js";import"./chunk-JM5NHRL4.js";import{F as on,G as rs,I as is,T as ns,g as sr,s as qr,z as Mt}from"./chunk-VOKPYVET.js";import{a as Ft,c as Wr,d as Yf,e as ts}from"./chunk-5XVCUSSZ.js";var po=Wr(co=>{"use strict";(function(e){"use strict";if(e.TextEncoder&&e.TextDecoder)return!1;function t(i="utf-8"){if(i!=="utf-8")throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${i}') is invalid.`)}Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(i,n={stream:!1}){if(n.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let a=0,o=i.length,f=[],d=0,h=Math.max(32,o+(o>>1)+7),u=new Uint8Array(h>>3<<3);for(;a=55296&&b<=56319){if(a=55296&&b<=56319)continue}if(d+4>u.length){h+=8,h*=1+a/i.length*2,h=h>>3<<3;let x=new Uint8Array(h);x.set(u),u=x}if((b&4294967168)==0){u[d++]=b;continue}else if((b&4294965248)==0)u[d++]=b>>6&31|192;else if((b&4294901760)==0)u[d++]=b>>12&15|224,u[d++]=b>>6&63|128;else if((b&4292870144)==0)u[d++]=b>>18&7|240,u[d++]=b>>12&63|128,u[d++]=b>>6&63|128;else continue;u[d++]=b&63|128}return u.slice(0,d)};function r(i="utf-8",n={fatal:!1}){if(i!=="utf-8")throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${i}') is invalid.`);if(n.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(i,n={stream:!1}){if(n.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");let a=new Uint8Array(i),o=0,f=a.length,d=[];for(;o65535&&(v-=65536,d.push(v>>>10&1023|55296),v=56320|v&1023),d.push(v)}}return String.fromCharCode.apply(null,d)},e.TextEncoder=t,e.TextDecoder=r})(typeof window!="undefined"?window:typeof self!="undefined"?self:co)});var zu=Wr((ua,la)=>{(function(e,t){typeof ua=="object"&&typeof la!="undefined"?la.exports=t():typeof define=="function"&&define.amd?define(t):e.chroma=t()})(ua,function(){"use strict";for(var e=function(s,l,c){return l===void 0&&(l=0),c===void 0&&(c=1),sc?c:s},t=function(s){s._clipped=!1,s._unclipped=s.slice(0);for(var l=0;l<=3;l++)l<3?((s[l]<0||s[l]>255)&&(s._clipped=!0),s[l]=e(s[l],0,255)):l===3&&(s[l]=e(s[l],0,1));return s},r={},i=0,n=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];i=3?Array.prototype.slice.call(s):o(s[0])=="object"&&l?l.split("").filter(function(c){return s[0][c]!==void 0}).map(function(c){return s[0][c]}):s[0]},d=function(s){if(s.length<2)return null;var l=s.length-1;return o(s[l])=="string"?s[l].toLowerCase():null},h=Math.PI,u={clip_rgb:t,limit:e,type:o,unpack:f,last:d,PI:h,TWOPI:h*2,PITHIRD:h/3,DEG2RAD:h/180,RAD2DEG:180/h},b={format:{},autodetect:[]},x=u.last,v=u.clip_rgb,S=u.type,F=function(){for(var l=[],c=arguments.length;c--;)l[c]=arguments[c];var g=this;if(S(l[0])==="object"&&l[0].constructor&&l[0].constructor===this.constructor)return l[0];var _=x(l),y=!1;if(!_){y=!0,b.sorted||(b.autodetect=b.autodetect.sort(function(N,I){return I.p-N.p}),b.sorted=!0);for(var m=0,k=b.autodetect;m4?s[4]:1;return y===1?[0,0,0,m]:[c>=1?0:255*(1-c)*(1-y),g>=1?0:255*(1-g)*(1-y),_>=1?0:255*(1-_)*(1-y),m]},ne=se,z=u.unpack,H=u.type;w.prototype.cmyk=function(){return de(this._rgb)},C.cmyk=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["cmyk"])))},b.format.cmyk=ne,b.autodetect.push({p:2,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=z(s,"cmyk"),H(s)==="array"&&s.length===4)return"cmyk"}});var Ke=u.unpack,St=u.last,Ct=function(s){return Math.round(s*100)/100},Br=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Ke(s,"hsla"),g=St(s)||"lsa";return c[0]=Ct(c[0]||0),c[1]=Ct(c[1]*100)+"%",c[2]=Ct(c[2]*100)+"%",g==="hsla"||c.length>3&&c[3]<1?(c[3]=c.length>3?c[3]:1,g="hsla"):c.length=3,g+"("+c.join(",")+")"},At=Br,It=u.unpack,pl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];s=It(s,"rgba");var c=s[0],g=s[1],_=s[2];c/=255,g/=255,_/=255;var y=Math.min(c,g,_),m=Math.max(c,g,_),k=(m+y)/2,E,A;return m===y?(E=0,A=Number.NaN):E=k<.5?(m-y)/(m+y):(m-y)/(2-m-y),c==m?A=(g-_)/(m-y):g==m?A=2+(_-c)/(m-y):_==m&&(A=4+(c-g)/(m-y)),A*=60,A<0&&(A+=360),s.length>3&&s[3]!==void 0?[A,E,k,s[3]]:[A,E,k]},_a=pl,dl=u.unpack,gl=u.last,Di=Math.round,vl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=dl(s,"rgba"),g=gl(s)||"rgb";return g.substr(0,3)=="hsl"?At(_a(c),g):(c[0]=Di(c[0]),c[1]=Di(c[1]),c[2]=Di(c[2]),(g==="rgba"||c.length>3&&c[3]<1)&&(c[3]=c.length>3?c[3]:1,g="rgba"),g+"("+c.slice(0,g==="rgb"?3:4).join(",")+")")},bl=vl,ml=u.unpack,Ui=Math.round,_l=function(){for(var s,l=[],c=arguments.length;c--;)l[c]=arguments[c];l=ml(l,"hsl");var g=l[0],_=l[1],y=l[2],m,k,E;if(_===0)m=k=E=y*255;else{var A=[0,0,0],N=[0,0,0],I=y<.5?y*(1+_):y+_-y*_,O=2*y-I,L=g/360;A[0]=L+1/3,A[1]=L,A[2]=L-1/3;for(var $=0;$<3;$++)A[$]<0&&(A[$]+=1),A[$]>1&&(A[$]-=1),6*A[$]<1?N[$]=O+(I-O)*6*A[$]:2*A[$]<1?N[$]=I:3*A[$]<2?N[$]=O+(I-O)*(2/3-A[$])*6:N[$]=O;s=[Ui(N[0]*255),Ui(N[1]*255),Ui(N[2]*255)],m=s[0],k=s[1],E=s[2]}return l.length>3?[m,k,E,l[3]]:[m,k,E,1]},Bi=_l,xa=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ya=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,wa=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ka=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ea=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Sa=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ca=Math.round,Aa=function(s){s=s.toLowerCase().trim();var l;if(b.format.named)try{return b.format.named(s)}catch($){}if(l=s.match(xa)){for(var c=l.slice(1,4),g=0;g<3;g++)c[g]=+c[g];return c[3]=1,c}if(l=s.match(ya)){for(var _=l.slice(1,5),y=0;y<4;y++)_[y]=+_[y];return _}if(l=s.match(wa)){for(var m=l.slice(1,4),k=0;k<3;k++)m[k]=Ca(m[k]*2.55);return m[3]=1,m}if(l=s.match(ka)){for(var E=l.slice(1,5),A=0;A<3;A++)E[A]=Ca(E[A]*2.55);return E[3]=+E[3],E}if(l=s.match(Ea)){var N=l.slice(1,4);N[1]*=.01,N[2]*=.01;var I=Bi(N);return I[3]=1,I}if(l=s.match(Sa)){var O=l.slice(1,4);O[1]*=.01,O[2]*=.01;var L=Bi(O);return L[3]=+l[4],L}};Aa.test=function(s){return xa.test(s)||ya.test(s)||wa.test(s)||ka.test(s)||Ea.test(s)||Sa.test(s)};var Ia=Aa,xl=u.type;w.prototype.css=function(s){return bl(this._rgb,s)},C.css=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["css"])))},b.format.css=Ia,b.autodetect.push({p:5,test:function(s){for(var l=[],c=arguments.length-1;c-- >0;)l[c]=arguments[c+1];if(!l.length&&xl(s)==="string"&&Ia.test(s))return"css"}});var yl=u.unpack;b.format.gl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=yl(s,"rgba");return c[0]*=255,c[1]*=255,c[2]*=255,c},C.gl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["gl"])))},w.prototype.gl=function(){var s=this._rgb;return[s[0]/255,s[1]/255,s[2]/255,s[3]]};var wl=u.unpack,kl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=wl(s,"rgb"),g=c[0],_=c[1],y=c[2],m=Math.min(g,_,y),k=Math.max(g,_,y),E=k-m,A=E*100/255,N=m/(255-E)*100,I;return E===0?I=Number.NaN:(g===k&&(I=(_-y)/E),_===k&&(I=2+(y-g)/E),y===k&&(I=4+(g-_)/E),I*=60,I<0&&(I+=360)),[I,A,N]},El=kl,Sl=u.unpack,Cl=Math.floor,Al=function(){for(var s,l,c,g,_,y,m=[],k=arguments.length;k--;)m[k]=arguments[k];m=Sl(m,"hcg");var E=m[0],A=m[1],N=m[2],I,O,L;N=N*255;var $=A*255;if(A===0)I=O=L=N;else{E===360&&(E=0),E>360&&(E-=360),E<0&&(E+=360),E/=60;var K=Cl(E),G=E-K,re=N*(1-A),le=re+$*(1-G),xe=re+$*G,ye=re+$;switch(K){case 0:s=[ye,xe,re],I=s[0],O=s[1],L=s[2];break;case 1:l=[le,ye,re],I=l[0],O=l[1],L=l[2];break;case 2:c=[re,ye,xe],I=c[0],O=c[1],L=c[2];break;case 3:g=[re,le,ye],I=g[0],O=g[1],L=g[2];break;case 4:_=[xe,re,ye],I=_[0],O=_[1],L=_[2];break;case 5:y=[ye,re,le],I=y[0],O=y[1],L=y[2];break}}return[I,O,L,m.length>3?m[3]:1]},Il=Al,Nl=u.unpack,Tl=u.type;w.prototype.hcg=function(){return El(this._rgb)},C.hcg=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hcg"])))},b.format.hcg=Il,b.autodetect.push({p:1,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=Nl(s,"hcg"),Tl(s)==="array"&&s.length===3)return"hcg"}});var Rl=u.unpack,Pl=u.last,$r=Math.round,Ll=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Rl(s,"rgba"),g=c[0],_=c[1],y=c[2],m=c[3],k=Pl(s)||"auto";m===void 0&&(m=1),k==="auto"&&(k=m<1?"rgba":"rgb"),g=$r(g),_=$r(_),y=$r(y);var E=g<<16|_<<8|y,A="000000"+E.toString(16);A=A.substr(A.length-6);var N="0"+$r(m*255).toString(16);switch(N=N.substr(N.length-2),k.toLowerCase()){case"rgba":return"#"+A+N;case"argb":return"#"+N+A;default:return"#"+A}},Na=Ll,Ol=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Fl=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ml=function(s){if(s.match(Ol)){(s.length===4||s.length===7)&&(s=s.substr(1)),s.length===3&&(s=s.split(""),s=s[0]+s[0]+s[1]+s[1]+s[2]+s[2]);var l=parseInt(s,16),c=l>>16,g=l>>8&255,_=l&255;return[c,g,_,1]}if(s.match(Fl)){(s.length===5||s.length===9)&&(s=s.substr(1)),s.length===4&&(s=s.split(""),s=s[0]+s[0]+s[1]+s[1]+s[2]+s[2]+s[3]+s[3]);var y=parseInt(s,16),m=y>>24&255,k=y>>16&255,E=y>>8&255,A=Math.round((y&255)/255*100)/100;return[m,k,E,A]}throw new Error("unknown hex color: "+s)},Ta=Ml,Dl=u.type;w.prototype.hex=function(s){return Na(this._rgb,s)},C.hex=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hex"])))},b.format.hex=Ta,b.autodetect.push({p:4,test:function(s){for(var l=[],c=arguments.length-1;c-- >0;)l[c]=arguments[c+1];if(!l.length&&Dl(s)==="string"&&[3,4,5,6,7,8,9].indexOf(s.length)>=0)return"hex"}});var Ul=u.unpack,Ra=u.TWOPI,Bl=Math.min,$l=Math.sqrt,Vl=Math.acos,zl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Ul(s,"rgb"),g=c[0],_=c[1],y=c[2];g/=255,_/=255,y/=255;var m,k=Bl(g,_,y),E=(g+_+y)/3,A=E>0?1-k/E:0;return A===0?m=NaN:(m=(g-_+(g-y))/2,m/=$l((g-_)*(g-_)+(g-y)*(_-y)),m=Vl(m),y>_&&(m=Ra-m),m/=Ra),[m*360,A,E]},Hl=zl,Gl=u.unpack,$i=u.limit,Nt=u.TWOPI,Vi=u.PITHIRD,Tt=Math.cos,Zl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];s=Gl(s,"hsi");var c=s[0],g=s[1],_=s[2],y,m,k;return isNaN(c)&&(c=0),isNaN(g)&&(g=0),c>360&&(c-=360),c<0&&(c+=360),c/=360,c<1/3?(k=(1-g)/3,y=(1+g*Tt(Nt*c)/Tt(Vi-Nt*c))/3,m=1-(k+y)):c<2/3?(c-=1/3,y=(1-g)/3,m=(1+g*Tt(Nt*c)/Tt(Vi-Nt*c))/3,k=1-(y+m)):(c-=2/3,m=(1-g)/3,k=(1+g*Tt(Nt*c)/Tt(Vi-Nt*c))/3,y=1-(m+k)),y=$i(_*y*3),m=$i(_*m*3),k=$i(_*k*3),[y*255,m*255,k*255,s.length>3?s[3]:1]},Wl=Zl,ql=u.unpack,jl=u.type;w.prototype.hsi=function(){return Hl(this._rgb)},C.hsi=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hsi"])))},b.format.hsi=Wl,b.autodetect.push({p:2,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=ql(s,"hsi"),jl(s)==="array"&&s.length===3)return"hsi"}});var Kl=u.unpack,Yl=u.type;w.prototype.hsl=function(){return _a(this._rgb)},C.hsl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hsl"])))},b.format.hsl=Bi,b.autodetect.push({p:2,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=Kl(s,"hsl"),Yl(s)==="array"&&s.length===3)return"hsl"}});var Xl=u.unpack,Ql=Math.min,Jl=Math.max,eh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];s=Xl(s,"rgb");var c=s[0],g=s[1],_=s[2],y=Ql(c,g,_),m=Jl(c,g,_),k=m-y,E,A,N;return N=m/255,m===0?(E=Number.NaN,A=0):(A=k/m,c===m&&(E=(g-_)/k),g===m&&(E=2+(_-c)/k),_===m&&(E=4+(c-g)/k),E*=60,E<0&&(E+=360)),[E,A,N]},th=eh,rh=u.unpack,ih=Math.floor,nh=function(){for(var s,l,c,g,_,y,m=[],k=arguments.length;k--;)m[k]=arguments[k];m=rh(m,"hsv");var E=m[0],A=m[1],N=m[2],I,O,L;if(N*=255,A===0)I=O=L=N;else{E===360&&(E=0),E>360&&(E-=360),E<0&&(E+=360),E/=60;var $=ih(E),K=E-$,G=N*(1-A),re=N*(1-A*K),le=N*(1-A*(1-K));switch($){case 0:s=[N,le,G],I=s[0],O=s[1],L=s[2];break;case 1:l=[re,N,G],I=l[0],O=l[1],L=l[2];break;case 2:c=[G,N,le],I=c[0],O=c[1],L=c[2];break;case 3:g=[G,re,N],I=g[0],O=g[1],L=g[2];break;case 4:_=[le,G,N],I=_[0],O=_[1],L=_[2];break;case 5:y=[N,G,re],I=y[0],O=y[1],L=y[2];break}}return[I,O,L,m.length>3?m[3]:1]},ah=nh,sh=u.unpack,oh=u.type;w.prototype.hsv=function(){return th(this._rgb)},C.hsv=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hsv"])))},b.format.hsv=ah,b.autodetect.push({p:2,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=sh(s,"hsv"),oh(s)==="array"&&s.length===3)return"hsv"}});var Ae={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},uh=u.unpack,Pa=Math.pow,lh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=uh(s,"rgb"),g=c[0],_=c[1],y=c[2],m=hh(g,_,y),k=m[0],E=m[1],A=m[2],N=116*E-16;return[N<0?0:N,500*(k-E),200*(E-A)]},zi=function(s){return(s/=255)<=.04045?s/12.92:Pa((s+.055)/1.055,2.4)},Hi=function(s){return s>Ae.t3?Pa(s,1/3):s/Ae.t2+Ae.t0},hh=function(s,l,c){s=zi(s),l=zi(l),c=zi(c);var g=Hi((.4124564*s+.3575761*l+.1804375*c)/Ae.Xn),_=Hi((.2126729*s+.7151522*l+.072175*c)/Ae.Yn),y=Hi((.0193339*s+.119192*l+.9503041*c)/Ae.Zn);return[g,_,y]},La=lh,fh=u.unpack,ch=Math.pow,ph=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];s=fh(s,"lab");var c=s[0],g=s[1],_=s[2],y,m,k,E,A,N;return m=(c+16)/116,y=isNaN(g)?m:m+g/500,k=isNaN(_)?m:m-_/200,m=Ae.Yn*Zi(m),y=Ae.Xn*Zi(y),k=Ae.Zn*Zi(k),E=Gi(3.2404542*y-1.5371385*m-.4985314*k),A=Gi(-.969266*y+1.8760108*m+.041556*k),N=Gi(.0556434*y-.2040259*m+1.0572252*k),[E,A,N,s.length>3?s[3]:1]},Gi=function(s){return 255*(s<=.00304?12.92*s:1.055*ch(s,1/2.4)-.055)},Zi=function(s){return s>Ae.t1?s*s*s:Ae.t2*(s-Ae.t0)},Oa=ph,dh=u.unpack,gh=u.type;w.prototype.lab=function(){return La(this._rgb)},C.lab=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["lab"])))},b.format.lab=Oa,b.autodetect.push({p:2,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=dh(s,"lab"),gh(s)==="array"&&s.length===3)return"lab"}});var vh=u.unpack,bh=u.RAD2DEG,mh=Math.sqrt,_h=Math.atan2,xh=Math.round,yh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=vh(s,"lab"),g=c[0],_=c[1],y=c[2],m=mh(_*_+y*y),k=(_h(y,_)*bh+360)%360;return xh(m*1e4)===0&&(k=Number.NaN),[g,m,k]},wh=yh,kh=u.unpack,Eh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=kh(s,"rgb"),g=c[0],_=c[1],y=c[2],m=La(g,_,y),k=m[0],E=m[1],A=m[2];return wh(k,E,A)},Fa=Eh,Sh=u.unpack,Ch=u.DEG2RAD,Ah=Math.sin,Ih=Math.cos,Nh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Sh(s,"lch"),g=c[0],_=c[1],y=c[2];return isNaN(y)&&(y=0),y=y*Ch,[g,Ih(y)*_,Ah(y)*_]},Th=Nh,Rh=u.unpack,Ph=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];s=Rh(s,"lch");var c=s[0],g=s[1],_=s[2],y=Th(c,g,_),m=y[0],k=y[1],E=y[2],A=Oa(m,k,E),N=A[0],I=A[1],O=A[2];return[N,I,O,s.length>3?s[3]:1]},Ma=Ph,Lh=u.unpack,Oh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Lh(s,"hcl").reverse();return Ma.apply(void 0,c)},Fh=Oh,Mh=u.unpack,Dh=u.type;w.prototype.lch=function(){return Fa(this._rgb)},w.prototype.hcl=function(){return Fa(this._rgb).reverse()},C.lch=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["lch"])))},C.hcl=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["hcl"])))},b.format.lch=Ma,b.format.hcl=Fh,["lch","hcl"].forEach(function(s){return b.autodetect.push({p:2,test:function(){for(var l=[],c=arguments.length;c--;)l[c]=arguments[c];if(l=Mh(l,s),Dh(l)==="array"&&l.length===3)return s}})});var Uh={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Rt=Uh,Bh=u.type;w.prototype.name=function(){for(var s=Na(this._rgb,"rgb"),l=0,c=Object.keys(Rt);l0;)l[c]=arguments[c+1];if(!l.length&&Bh(s)==="string"&&Rt[s.toLowerCase()])return"named"}});var $h=u.unpack,Vh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=$h(s,"rgb"),g=c[0],_=c[1],y=c[2];return(g<<16)+(_<<8)+y},zh=Vh,Hh=u.type,Gh=function(s){if(Hh(s)=="number"&&s>=0&&s<=16777215){var l=s>>16,c=s>>8&255,g=s&255;return[l,c,g,1]}throw new Error("unknown num color: "+s)},Zh=Gh,Wh=u.type;w.prototype.num=function(){return zh(this._rgb)},C.num=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["num"])))},b.format.num=Zh,b.autodetect.push({p:5,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s.length===1&&Wh(s[0])==="number"&&s[0]>=0&&s[0]<=16777215)return"num"}});var Da=u.unpack,Ua=u.type,Ba=Math.round;w.prototype.rgb=function(s){return s===void 0&&(s=!0),s===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ba)},w.prototype.rgba=function(s){return s===void 0&&(s=!0),this._rgb.slice(0,4).map(function(l,c){return c<3?s===!1?l:Ba(l):l})},C.rgb=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["rgb"])))},b.format.rgb=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];var c=Da(s,"rgba");return c[3]===void 0&&(c[3]=1),c},b.autodetect.push({p:3,test:function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];if(s=Da(s,"rgba"),Ua(s)==="array"&&(s.length===3||s.length===4&&Ua(s[3])=="number"&&s[3]>=0&&s[3]<=1))return"rgb"}});var Vr=Math.log,qh=function(s){var l=s/100,c,g,_;return l<66?(c=255,g=-155.25485562709179-.44596950469579133*(g=l-2)+104.49216199393888*Vr(g),_=l<20?0:-254.76935184120902+.8274096064007395*(_=l-10)+115.67994401066147*Vr(_)):(c=351.97690566805693+.114206453784165*(c=l-55)-40.25366309332127*Vr(c),g=325.4494125711974+.07943456536662342*(g=l-50)-28.0852963507957*Vr(g),_=255),[c,g,_,1]},$a=qh,jh=u.unpack,Kh=Math.round,Yh=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];for(var c=jh(s,"rgb"),g=c[0],_=c[2],y=1e3,m=4e4,k=.4,E;m-y>k;){E=(m+y)*.5;var A=$a(E);A[2]/A[0]>=_/g?m=E:y=E}return Kh(E)},Xh=Yh;w.prototype.temp=w.prototype.kelvin=w.prototype.temperature=function(){return Xh(this._rgb)},C.temp=C.kelvin=C.temperature=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];return new(Function.prototype.bind.apply(w,[null].concat(s,["temp"])))},b.format.temp=b.format.kelvin=b.format.temperature=$a;var Qh=u.type;w.prototype.alpha=function(s,l){return l===void 0&&(l=!1),s!==void 0&&Qh(s)==="number"?l?(this._rgb[3]=s,this):new w([this._rgb[0],this._rgb[1],this._rgb[2],s],"rgb"):this._rgb[3]},w.prototype.clipped=function(){return this._rgb._clipped||!1},w.prototype.darken=function(s){s===void 0&&(s=1);var l=this,c=l.lab();return c[0]-=Ae.Kn*s,new w(c,"lab").alpha(l.alpha(),!0)},w.prototype.brighten=function(s){return s===void 0&&(s=1),this.darken(-s)},w.prototype.darker=w.prototype.darken,w.prototype.brighter=w.prototype.brighten,w.prototype.get=function(s){var l=s.split("."),c=l[0],g=l[1],_=this[c]();if(g){var y=c.indexOf(g);if(y>-1)return _[y];throw new Error("unknown channel "+g+" in mode "+c)}else return _};var Jh=u.type,ef=Math.pow,tf=1e-7,rf=20;w.prototype.luminance=function(s){if(s!==void 0&&Jh(s)==="number"){if(s===0)return new w([0,0,0,this._rgb[3]],"rgb");if(s===1)return new w([255,255,255,this._rgb[3]],"rgb");var l=this.luminance(),c="rgb",g=rf,_=function(m,k){var E=m.interpolate(k,.5,c),A=E.luminance();return Math.abs(s-A)s?_(m,E):_(E,k)},y=(l>s?_(new w([0,0,0]),this):_(this,new w([255,255,255]))).rgb();return new w(y.concat([this._rgb[3]]))}return nf.apply(void 0,this._rgb.slice(0,3))};var nf=function(s,l,c){return s=Wi(s),l=Wi(l),c=Wi(c),.2126*s+.7152*l+.0722*c},Wi=function(s){return s/=255,s<=.03928?s/12.92:ef((s+.055)/1.055,2.4)},Ie={},Va=u.type,za=function(s,l,c){c===void 0&&(c=.5);for(var g=[],_=arguments.length-3;_-- >0;)g[_]=arguments[_+3];var y=g[0]||"lrgb";if(!Ie[y]&&!g.length&&(y=Object.keys(Ie)[0]),!Ie[y])throw new Error("interpolation mode "+y+" is not defined");return Va(s)!=="object"&&(s=new w(s)),Va(l)!=="object"&&(l=new w(l)),Ie[y](s,l,c).alpha(s.alpha()+c*(l.alpha()-s.alpha()))};w.prototype.mix=w.prototype.interpolate=function(s,l){l===void 0&&(l=.5);for(var c=[],g=arguments.length-2;g-- >0;)c[g]=arguments[g+2];return za.apply(void 0,[this,s,l].concat(c))},w.prototype.premultiply=function(s){s===void 0&&(s=!1);var l=this._rgb,c=l[3];return s?(this._rgb=[l[0]*c,l[1]*c,l[2]*c,c],this):new w([l[0]*c,l[1]*c,l[2]*c,c],"rgb")},w.prototype.saturate=function(s){s===void 0&&(s=1);var l=this,c=l.lch();return c[1]+=Ae.Kn*s,c[1]<0&&(c[1]=0),new w(c,"lch").alpha(l.alpha(),!0)},w.prototype.desaturate=function(s){return s===void 0&&(s=1),this.saturate(-s)};var Ha=u.type;w.prototype.set=function(s,l,c){c===void 0&&(c=!1);var g=s.split("."),_=g[0],y=g[1],m=this[_]();if(y){var k=_.indexOf(y);if(k>-1){if(Ha(l)=="string")switch(l.charAt(0)){case"+":m[k]+=+l;break;case"-":m[k]+=+l;break;case"*":m[k]*=+l.substr(1);break;case"/":m[k]/=+l.substr(1);break;default:m[k]=+l}else if(Ha(l)==="number")m[k]=l;else throw new Error("unsupported value for Color.set");var E=new w(m,_);return c?(this._rgb=E._rgb,this):E}throw new Error("unknown channel "+y+" in mode "+_)}else return m};var af=function(s,l,c){var g=s._rgb,_=l._rgb;return new w(g[0]+c*(_[0]-g[0]),g[1]+c*(_[1]-g[1]),g[2]+c*(_[2]-g[2]),"rgb")};Ie.rgb=af;var qi=Math.sqrt,Pt=Math.pow,sf=function(s,l,c){var g=s._rgb,_=g[0],y=g[1],m=g[2],k=l._rgb,E=k[0],A=k[1],N=k[2];return new w(qi(Pt(_,2)*(1-c)+Pt(E,2)*c),qi(Pt(y,2)*(1-c)+Pt(A,2)*c),qi(Pt(m,2)*(1-c)+Pt(N,2)*c),"rgb")};Ie.lrgb=sf;var of=function(s,l,c){var g=s.lab(),_=l.lab();return new w(g[0]+c*(_[0]-g[0]),g[1]+c*(_[1]-g[1]),g[2]+c*(_[2]-g[2]),"lab")};Ie.lab=of;var ir=function(s,l,c,g){var _,y,m,k;g==="hsl"?(m=s.hsl(),k=l.hsl()):g==="hsv"?(m=s.hsv(),k=l.hsv()):g==="hcg"?(m=s.hcg(),k=l.hcg()):g==="hsi"?(m=s.hsi(),k=l.hsi()):(g==="lch"||g==="hcl")&&(g="hcl",m=s.hcl(),k=l.hcl());var E,A,N,I,O,L;g.substr(0,1)==="h"&&(_=m,E=_[0],N=_[1],O=_[2],y=k,A=y[0],I=y[1],L=y[2]);var $,K,G,re;return!isNaN(E)&&!isNaN(A)?(A>E&&A-E>180?re=A-(E+360):A180?re=A+360-E:re=A-E,K=E+c*re):isNaN(E)?isNaN(A)?K=Number.NaN:(K=A,(O==1||O==0)&&g!="hsv"&&($=I)):(K=E,(L==1||L==0)&&g!="hsv"&&($=N)),$===void 0&&($=N+c*(I-N)),G=O+c*(L-O),new w([K,$,G],g)},Ga=function(s,l,c){return ir(s,l,c,"lch")};Ie.lch=Ga,Ie.hcl=Ga;var uf=function(s,l,c){var g=s.num(),_=l.num();return new w(g+c*(_-g),"num")};Ie.num=uf;var lf=function(s,l,c){return ir(s,l,c,"hcg")};Ie.hcg=lf;var hf=function(s,l,c){return ir(s,l,c,"hsi")};Ie.hsi=hf;var ff=function(s,l,c){return ir(s,l,c,"hsl")};Ie.hsl=ff;var cf=function(s,l,c){return ir(s,l,c,"hsv")};Ie.hsv=cf;var pf=u.clip_rgb,ji=Math.pow,Ki=Math.sqrt,Yi=Math.PI,Za=Math.cos,Wa=Math.sin,df=Math.atan2,gf=function(s,l,c){l===void 0&&(l="lrgb"),c===void 0&&(c=null);var g=s.length;c||(c=Array.from(new Array(g)).map(function(){return 1}));var _=g/c.reduce(function(K,G){return K+G});if(c.forEach(function(K,G){c[G]*=_}),s=s.map(function(K){return new w(K)}),l==="lrgb")return vf(s,c);for(var y=s.shift(),m=y.get(l),k=[],E=0,A=0,N=0;N=360;)$-=360;m[L]=$}else m[L]=m[L]/k[L];return O/=g,new w(m,l).alpha(O>.99999?1:O,!0)},vf=function(s,l){for(var c=s.length,g=[0,0,0,0],_=0;_.9999999&&(g[3]=1),new w(pf(g))},Lt=u.type,bf=Math.pow,zr=function(s){var l="rgb",c=C("#ccc"),g=0,_=[0,1],y=[],m=[0,0],k=!1,E=[],A=!1,N=0,I=1,O=!1,L={},$=!0,K=1,G=function(T){if(T=T||["#fff","#000"],T&&Lt(T)==="string"&&C.brewer&&C.brewer[T.toLowerCase()]&&(T=C.brewer[T.toLowerCase()]),Lt(T)==="array"){T.length===1&&(T=[T[0],T[0]]),T=T.slice(0);for(var U=0;U=k[Y];)Y++;return Y-1}return 0},le=function(T){return T},xe=function(T){return T},ye=function(T,U){var Y,q;if(U==null&&(U=!1),isNaN(T)||T===null)return c;if(U)q=T;else if(k&&k.length>2){var Ne=re(T);q=Ne/(k.length-2)}else I!==N?q=(T-N)/(I-N):q=1;q=xe(q),U||(q=le(q)),K!==1&&(q=bf(q,K)),q=m[0]+q*(1-m[0]-m[1]),q=Math.min(1,Math.max(0,q));var pe=Math.floor(q*1e4);if($&&L[pe])Y=L[pe];else{if(Lt(E)==="array")for(var oe=0;oe=ue&&oe===y.length-1){Y=E[oe];break}if(q>ue&&q2){var oe=T.map(function(ve,he){return he/(T.length-1)}),ue=T.map(function(ve){return(ve-N)/(I-N)});ue.every(function(ve,he){return oe[he]===ve})||(xe=function(ve){if(ve<=0||ve>=1)return ve;for(var he=0;ve>=ue[he+1];)he++;var at=(ve-ue[he])/(ue[he+1]-ue[he]),Ot=oe[he]+at*(oe[he+1]-oe[he]);return Ot})}}return _=[N,I],Q},Q.mode=function(T){return arguments.length?(l=T,Pe(),Q):l},Q.range=function(T,U){return G(T,U),Q},Q.out=function(T){return A=T,Q},Q.spread=function(T){return arguments.length?(g=T,Q):g},Q.correctLightness=function(T){return T==null&&(T=!0),O=T,Pe(),O?le=function(U){for(var Y=ye(0,!0).lab()[0],q=ye(1,!0).lab()[0],Ne=Y>q,pe=ye(U,!0).lab()[0],oe=Y+(q-Y)*U,ue=pe-oe,ve=0,he=1,at=20;Math.abs(ue)>.01&&at-- >0;)(function(){return Ne&&(ue*=-1),ue<0?(ve=U,U+=(he-U)*.5):(he=U,U+=(ve-U)*.5),pe=ye(U,!0).lab()[0],ue=pe-oe})();return U}:le=function(U){return U},Q},Q.padding=function(T){return T!=null?(Lt(T)==="number"&&(T=[T,T]),m=T,Q):m},Q.colors=function(T,U){arguments.length<2&&(U="hex");var Y=[];if(arguments.length===0)Y=E.slice(0);else if(T===1)Y=[Q(.5)];else if(T>1){var q=_[0],Ne=_[1]-q;Y=mf(0,T,!1).map(function(he){return Q(q+he/(T-1)*Ne)})}else{s=[];var pe=[];if(k&&k.length>2)for(var oe=1,ue=k.length,ve=1<=ue;ve?oeue;ve?oe++:oe--)pe.push((k[oe-1]+k[oe])*.5);else pe=_;Y=pe.map(function(he){return Q(he)})}return C[U]&&(Y=Y.map(function(he){return he[U]()})),Y},Q.cache=function(T){return T!=null?($=T,Q):$},Q.gamma=function(T){return T!=null?(K=T,Q):K},Q.nodata=function(T){return T!=null?(c=C(T),Q):c},Q};function mf(s,l,c){for(var g=[],_=sy;_?m++:m--)g.push(m);return g}var Xi=function(s){var l,c,g,_,y,m,k;if(s=s.map(function(I){return new w(I)}),s.length===2)l=s.map(function(I){return I.lab()}),y=l[0],m=l[1],_=function(I){var O=[0,1,2].map(function(L){return y[L]+I*(m[L]-y[L])});return new w(O,"lab")};else if(s.length===3)c=s.map(function(I){return I.lab()}),y=c[0],m=c[1],k=c[2],_=function(I){var O=[0,1,2].map(function(L){return(1-I)*(1-I)*y[L]+2*(1-I)*I*m[L]+I*I*k[L]});return new w(O,"lab")};else if(s.length===4){var E;g=s.map(function(I){return I.lab()}),y=g[0],m=g[1],k=g[2],E=g[3],_=function(I){var O=[0,1,2].map(function(L){return(1-I)*(1-I)*(1-I)*y[L]+3*(1-I)*(1-I)*I*m[L]+3*(1-I)*I*I*k[L]+I*I*I*E[L]});return new w(O,"lab")}}else if(s.length===5){var A=Xi(s.slice(0,3)),N=Xi(s.slice(2,5));_=function(I){return I<.5?A(I*2):N((I-.5)*2)}}return _},_f=function(s){var l=Xi(s);return l.scale=function(){return zr(l)},l},Ve=function(s,l,c){if(!Ve[c])throw new Error("unknown blend mode "+c);return Ve[c](s,l)},it=function(s){return function(l,c){var g=C(c).rgb(),_=C(l).rgb();return C.rgb(s(g,_))}},nt=function(s){return function(l,c){var g=[];return g[0]=s(l[0],c[0]),g[1]=s(l[1],c[1]),g[2]=s(l[2],c[2]),g}},xf=function(s){return s},yf=function(s,l){return s*l/255},wf=function(s,l){return s>l?l:s},kf=function(s,l){return s>l?s:l},Ef=function(s,l){return 255*(1-(1-s/255)*(1-l/255))},Sf=function(s,l){return l<128?2*s*l/255:255*(1-2*(1-s/255)*(1-l/255))},Cf=function(s,l){return 255*(1-(1-l/255)/(s/255))},Af=function(s,l){return s===255?255:(s=255*(l/255)/(1-s/255),s>255?255:s)};Ve.normal=it(nt(xf)),Ve.multiply=it(nt(yf)),Ve.screen=it(nt(Ef)),Ve.overlay=it(nt(Sf)),Ve.darken=it(nt(wf)),Ve.lighten=it(nt(kf)),Ve.dodge=it(nt(Af)),Ve.burn=it(nt(Cf));for(var If=Ve,Qi=u.type,Nf=u.clip_rgb,Tf=u.TWOPI,Rf=Math.pow,Pf=Math.sin,Lf=Math.cos,Of=function(s,l,c,g,_){s===void 0&&(s=300),l===void 0&&(l=-1.5),c===void 0&&(c=1),g===void 0&&(g=1),_===void 0&&(_=[0,1]);var y=0,m;Qi(_)==="array"?m=_[1]-_[0]:(m=0,_=[_,_]);var k=function(E){var A=Tf*((s+120)/360+l*E),N=Rf(_[0]+m*E,g),I=y!==0?c[0]+E*y:c,O=I*N*(1-N)/2,L=Lf(A),$=Pf(A),K=N+O*(-.14861*L+1.78277*$),G=N+O*(-.29227*L-.90649*$),re=N+O*(1.97294*L);return C(Nf([K*255,G*255,re*255,1]))};return k.start=function(E){return E==null?s:(s=E,k)},k.rotations=function(E){return E==null?l:(l=E,k)},k.gamma=function(E){return E==null?g:(g=E,k)},k.hue=function(E){return E==null?c:(c=E,Qi(c)==="array"?(y=c[1]-c[0],y===0&&(c=c[1])):y=0,k)},k.lightness=function(E){return E==null?_:(Qi(E)==="array"?(_=E,m=E[1]-E[0]):(_=[E,E],m=0),k)},k.scale=function(){return C.scale(k)},k.hue(c),k},Ff="0123456789abcdef",Mf=Math.floor,Df=Math.random,Uf=function(){for(var s="#",l=0;l<6;l++)s+=Ff.charAt(Mf(Df()*16));return new w(s,"hex")},qa=Math.log,Bf=Math.pow,$f=Math.floor,Vf=Math.abs,ja=function(s,l){l===void 0&&(l=null);var c={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return o(s)==="object"&&(s=Object.values(s)),s.forEach(function(g){l&&o(g)==="object"&&(g=g[l]),g!=null&&!isNaN(g)&&(c.values.push(g),c.sum+=g,gc.max&&(c.max=g),c.count+=1)}),c.domain=[c.min,c.max],c.limits=function(g,_){return Ka(c,g,_)},c},Ka=function(s,l,c){l===void 0&&(l="equal"),c===void 0&&(c=7),o(s)=="array"&&(s=ja(s));var g=s.min,_=s.max,y=s.values.sort(function(an,sn){return an-sn});if(c===1)return[g,_];var m=[];if(l.substr(0,1)==="c"&&(m.push(g),m.push(_)),l.substr(0,1)==="e"){m.push(g);for(var k=1;k 0");var E=Math.LOG10E*qa(g),A=Math.LOG10E*qa(_);m.push(g);for(var N=1;N200&&(xe=!1)}for(var nr={},tn=0;tng?(c+.05)/(g+.05):(g+.05)/(c+.05)},Hr=Math.sqrt,Hf=Math.atan2,Xa=Math.abs,Qa=Math.cos,Ji=Math.PI,Gf=function(s,l,c,g){c===void 0&&(c=1),g===void 0&&(g=1),s=new w(s),l=new w(l);for(var _=Array.from(s.lab()),y=_[0],m=_[1],k=_[2],E=Array.from(l.lab()),A=E[0],N=E[1],I=E[2],O=Hr(m*m+k*k),L=Hr(N*N+I*I),$=y<16?.511:.040975*y/(1+.01765*y),K=.0638*O/(1+.0131*O)+.638,G=O<1e-6?0:Hf(k,m)*180/Ji;G<0;)G+=360;for(;G>=360;)G-=360;var re=G>=164&&G<=345?.56+Xa(.2*Qa(Ji*(G+168)/180)):.36+Xa(.4*Qa(Ji*(G+35)/180)),le=O*O*O*O,xe=Hr(le/(le+1900)),ye=K*(xe*re+1-xe),Pe=y-A,Q=O-L,T=m-N,U=k-I,Y=T*T+U*U-Q*Q,q=Pe/(c*$),Ne=Q/(g*K),pe=ye;return Hr(q*q+Ne*Ne+Y/(pe*pe))},Zf=function(s,l,c){c===void 0&&(c="lab"),s=new w(s),l=new w(l);var g=s.get(c),_=l.get(c),y=0;for(var m in g){var k=(g[m]||0)-(_[m]||0);y+=k*k}return Math.sqrt(y)},Wf=function(){for(var s=[],l=arguments.length;l--;)s[l]=arguments[l];try{return new(Function.prototype.bind.apply(w,[null].concat(s))),!0}catch(c){return!1}},qf={cool:function(){return zr([C.hsl(180,1,.9),C.hsl(250,.7,.4)])},hot:function(){return zr(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},Gr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},en=0,Ja=Object.keys(Gr);en{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("stackframe",[],t):typeof ga=="object"?Ju.exports=t():e.StackFrame=t()})(ga,function(){"use strict";function e(v){return!isNaN(parseFloat(v))&&isFinite(v)}function t(v){return v.charAt(0).toUpperCase()+v.substring(1)}function r(v){return function(){return this[v]}}var i=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],a=["fileName","functionName","source"],o=["args"],f=["evalOrigin"],d=i.concat(n,a,o,f);function h(v){if(!!v)for(var S=0;S{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("error-stack-parser",["stackframe"],t):typeof va=="object"?tl.exports=t(el()):e.ErrorStackParser=t(e.StackFrame)})(va,function(t){"use strict";var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(o){if(typeof o.stacktrace!="undefined"||typeof o["opera#sourceloc"]!="undefined")return this.parseOpera(o);if(o.stack&&o.stack.match(i))return this.parseV8OrIE(o);if(o.stack)return this.parseFFOrSafari(o);throw new Error("Cannot parse given Error object")},extractLocation:function(o){if(o.indexOf(":")===-1)return[o];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,d=f.exec(o.replace(/[()]/g,""));return[d[1],d[2]||void 0,d[3]||void 0]},parseV8OrIE:function(o){var f=o.stack.split(` `).filter(function(d){return!!d.match(i)},this);return f.map(function(d){d.indexOf("(eval ")>-1&&(d=d.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var h=d.replace(/^\s+/,"").replace(/\(eval code/g,"("),u=h.match(/ (\((.+):(\d+):(\d+)\)$)/);h=u?h.replace(u[0],""):h;var b=h.split(/\s+/).slice(1),x=this.extractLocation(u?u[1]:b.pop()),v=b.join(" ")||void 0,S=["eval",""].indexOf(x[0])>-1?void 0:x[0];return new t({functionName:v,fileName:S,lineNumber:x[1],columnNumber:x[2],source:d})},this)},parseFFOrSafari:function(o){var f=o.stack.split(` `).filter(function(d){return!d.match(n)},this);return f.map(function(d){if(d.indexOf(" > eval")>-1&&(d=d.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),d.indexOf("@")===-1&&d.indexOf(":")===-1)return new t({functionName:d});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=d.match(h),b=u&&u[1]?u[1]:void 0,x=this.extractLocation(d.replace(h,""));return new t({functionName:b,fileName:x[0],lineNumber:x[1],columnNumber:x[2],source:d})},this)},parseOpera:function(o){return!o.stacktrace||o.message.indexOf(` `)>-1&&o.message.split(` `).length>o.stacktrace.split(` `).length?this.parseOpera9(o):o.stack?this.parseOpera11(o):this.parseOpera10(o)},parseOpera9:function(o){for(var f=/Line (\d+).*script (?:in )?(\S+)/i,d=o.message.split(` `),h=[],u=2,b=d.length;u/,"$2").replace(/\([^)]*\)/g,"")||void 0,v;b.match(/\(([^)]*)\)/)&&(v=b.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var S=v===void 0||v==="[arguments not available]"?void 0:v.split(",");return new t({functionName:x,args:S,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:d})},this)}}})});var Kr,ge,as,Xf,or,ss,os,Qf,Yr={},us=[],Jf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function st(e,t){for(var r in t)e[r]=t[r];return e}function ls(e){var t=e.parentNode;t&&t.removeChild(e)}function ae(e,t,r){var i,n,a,o={};for(a in t)a=="key"?i=t[a]:a=="ref"?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Kr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Xr(e,o,i,n,null)}function Xr(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n==null?++as:n};return n==null&&ge.vnode!=null&&ge.vnode(a),a}function un(){return{current:null}}function Qr(e){return e.children}function Le(e,t){this.props=e,this.context=t}function Dt(e,t){if(t==null)return e.__?Dt(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t0?Xr(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=r,v.__b=r.__b+1,(x=P[u])===null||x&&v.key==x.key&&v.type===x.type)P[u]=void 0;else for(b=0;be)return!1;if(r+=t[i+1],r>=e)return!0}}function Ye(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ac.test(String.fromCharCode(e)):t===!1?!1:pn(e,ks)}function Ut(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&sc.test(String.fromCharCode(e)):t===!1?!1:pn(e,ks)||pn(e,oc)}var te=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Oe(e,t){return new te(e,{beforeExpr:!0,binop:t})}var Fe={beforeExpr:!0},Te={startsExpr:!0},dn={};function J(e,t){return t===void 0&&(t={}),t.keyword=e,dn[e]=new te(e,t)}var p={num:new te("num",Te),regexp:new te("regexp",Te),string:new te("string",Te),name:new te("name",Te),privateId:new te("privateId",Te),eof:new te("eof"),bracketL:new te("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new te("]"),braceL:new te("{",{beforeExpr:!0,startsExpr:!0}),braceR:new te("}"),parenL:new te("(",{beforeExpr:!0,startsExpr:!0}),parenR:new te(")"),comma:new te(",",Fe),semi:new te(";",Fe),colon:new te(":",Fe),dot:new te("."),question:new te("?",Fe),questionDot:new te("?."),arrow:new te("=>",Fe),template:new te("template"),invalidTemplate:new te("invalidTemplate"),ellipsis:new te("...",Fe),backQuote:new te("`",Te),dollarBraceL:new te("${",{beforeExpr:!0,startsExpr:!0}),eq:new te("=",{beforeExpr:!0,isAssign:!0}),assign:new te("_=",{beforeExpr:!0,isAssign:!0}),incDec:new te("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new te("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Oe("||",1),logicalAND:Oe("&&",2),bitwiseOR:Oe("|",3),bitwiseXOR:Oe("^",4),bitwiseAND:Oe("&",5),equality:Oe("==/!=/===/!==",6),relational:Oe("/<=/>=",7),bitShift:Oe("<>/>>>",8),plusMin:new te("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Oe("%",10),star:Oe("*",10),slash:Oe("/",10),starstar:new te("**",{beforeExpr:!0}),coalesce:Oe("??",1),_break:J("break"),_case:J("case",Fe),_catch:J("catch"),_continue:J("continue"),_debugger:J("debugger"),_default:J("default",Fe),_do:J("do",{isLoop:!0,beforeExpr:!0}),_else:J("else",Fe),_finally:J("finally"),_for:J("for",{isLoop:!0}),_function:J("function",Te),_if:J("if"),_return:J("return",Fe),_switch:J("switch"),_throw:J("throw",Fe),_try:J("try"),_var:J("var"),_const:J("const"),_while:J("while",{isLoop:!0}),_with:J("with"),_new:J("new",{beforeExpr:!0,startsExpr:!0}),_this:J("this",Te),_super:J("super",Te),_class:J("class",Te),_extends:J("extends",Fe),_export:J("export"),_import:J("import",Te),_null:J("null",Te),_true:J("true",Te),_false:J("false",Te),_in:J("in",{beforeExpr:!0,binop:7}),_instanceof:J("instanceof",{beforeExpr:!0,binop:7}),_typeof:J("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:J("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:J("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Me=/\r\n?|\n|\u2028|\u2029/,uc=new RegExp(Me.source,"g");function Bt(e){return e===10||e===13||e===8232||e===8233}function Es(e,t,r){r===void 0&&(r=e.length);for(var i=t;i=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),As(t.onToken)){var i=t.onToken;t.onToken=function(n){return i.push(n)}}return As(t.onComment)&&(t.onComment=pc(t,t.onComment)),t}function pc(e,t){return function(r,i,n,a,o,f){var d={type:r?"Block":"Line",value:i,start:n,end:a};e.locations&&(d.loc=new ti(this,o,f)),e.ranges&&(d.range=[n,a]),t.push(d)}}var hr=1,$t=2,vn=4,Ts=8,Rs=16,Ps=32,bn=64,Ls=128,fr=256,mn=hr|$t|fr;function _n(e,t){return $t|(e?vn:0)|(t?Ts:0)}var ri=0,xn=1,Xe=2,Os=3,Fs=4,Ms=5,be=function(t,r,i){this.options=t=cc(t),this.sourceFile=t.sourceFile,this.keywords=mt(ic[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var n="";t.allowReserved!==!0&&(n=hn[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(n+=" await")),this.reservedWords=mt(n);var a=(n?n+" ":"")+hn.strict;this.reservedWordsStrict=mt(a),this.reservedWordsStrictBind=mt(a+" "+hn.strictBind),this.input=String(r),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(` `,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Me).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=p.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(hr),this.regexpState=null,this.privateNameStack=[]},Ze={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};be.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Ze.inFunction.get=function(){return(this.currentVarScope().flags&$t)>0};Ze.inGenerator.get=function(){return(this.currentVarScope().flags&Ts)>0&&!this.currentVarScope().inClassFieldInit};Ze.inAsync.get=function(){return(this.currentVarScope().flags&vn)>0&&!this.currentVarScope().inClassFieldInit};Ze.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&fr)return!1;if(t.flags&$t)return(t.flags&vn)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ze.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&bn)>0||r||this.options.allowSuperOutsideMethod};Ze.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ls)>0};Ze.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ze.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&($t|fr))>0||r};Ze.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&fr)>0};be.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var i=this,n=0;n=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}e+=t[0].length,De.lastIndex=e,e+=De.exec(this.input)[0].length,this.input[e]===";"&&e++}};Ce.eat=function(e){return this.type===e?(this.next(),!0):!1};Ce.isContextual=function(e){return this.type===p.name&&this.value===e&&!this.containsEsc};Ce.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Ce.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Ce.canInsertSemicolon=function(){return this.type===p.eof||this.type===p.braceR||Me.test(this.input.slice(this.lastTokEnd,this.start))};Ce.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Ce.semicolon=function(){!this.eat(p.semi)&&!this.insertSemicolon()&&this.unexpected()};Ce.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Ce.expect=function(e){this.eat(e)||this.unexpected()};Ce.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};function ii(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Ce.checkPatternErrors=function(e,t){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}};Ce.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};Ce.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&i<56320)return!0;if(e)return!1;if(i===123)return!0;if(Ye(i,!0)){for(var n=r+1;Ut(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var a=this.input.slice(r,n);if(!nc.test(a))return!0}return!1};B.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;De.lastIndex=this.pos;var e=De.exec(this.input),t=this.pos+e[0].length,r;return!Me.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Ut(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};B.parseStatement=function(e,t,r){var i=this.type,n=this.startNode(),a;switch(this.isLet(e)&&(i=p._var,a="let"),i){case p._break:case p._continue:return this.parseBreakContinueStatement(n,i.keyword);case p._debugger:return this.parseDebuggerStatement(n);case p._do:return this.parseDoStatement(n);case p._for:return this.parseForStatement(n);case p._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case p._class:return e&&this.unexpected(),this.parseClass(n,!0);case p._if:return this.parseIfStatement(n);case p._return:return this.parseReturnStatement(n);case p._switch:return this.parseSwitchStatement(n);case p._throw:return this.parseThrowStatement(n);case p._try:return this.parseTryStatement(n);case p._const:case p._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(n,a);case p._while:return this.parseWhileStatement(n);case p._with:return this.parseWithStatement(n);case p.braceL:return this.parseBlock(!0,n);case p.semi:return this.parseEmptyStatement(n);case p._export:case p._import:if(this.options.ecmaVersion>10&&i===p._import){De.lastIndex=this.pos;var o=De.exec(this.input),f=this.pos+o[0].length,d=this.input.charCodeAt(f);if(d===40||d===46)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===p._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var h=this.value,u=this.parseExpression();return i===p.name&&u.type==="Identifier"&&this.eat(p.colon)?this.parseLabeledStatement(n,h,u,e):this.parseExpressionStatement(n,u)}};B.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(p.semi)||this.insertSemicolon()?e.label=null:this.type!==p.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(p.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};B.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(yn),this.enterScope(0),this.expect(p.parenL),this.type===p.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===p._var||this.type===p._const||r){var i=this.startNode(),n=r?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===p._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===p._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var a=this.isContextual("let"),o=!1,f=new ii,d=this.parseExpression(t>-1?"await":!0,f);return this.type===p._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===p._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&o&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,f),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(f,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))};B.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,cr|(r?0:wn),!1,t)};B.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(p._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};B.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(p.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};B.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(p.braceL),this.labels.push(gc),this.enterScope(0);for(var t,r=!1;this.type!==p.braceR;)if(this.type===p._case||this.type===p._default){var i=this.type===p._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(p.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};B.parseThrowStatement=function(e){return this.next(),Me.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var vc=[];B.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===p._catch){var t=this.startNode();if(this.next(),this.eat(p.parenL)){t.param=this.parseBindingAtom();var r=t.param.type==="Identifier";this.enterScope(r?Ps:0),this.checkLValPattern(t.param,r?Fs:Xe),this.expect(p.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(p._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};B.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")};B.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(yn),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};B.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};B.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};B.parseLabeledStatement=function(e,t,r,i){for(var n=0,a=this.labels;n=0;d--){var h=this.labels[d];if(h.statementStart===e.start)h.statementStart=this.start,h.kind=f;else break}return this.labels.push({name:t,kind:f,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};B.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};B.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(p.braceL),e&&this.enterScope(0);this.type!==p.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};B.parseFor=function(e,t){return e.init=t,this.expect(p.semi),e.test=this.type===p.semi?null:this.parseExpression(),this.expect(p.semi),e.update=this.type===p.parenR?null:this.parseExpression(),this.expect(p.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};B.parseForIn=function(e,t){var r=this.type===p._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(p.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};B.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(p.eq)?i.init=this.parseMaybeAssign(t):r==="const"&&!(this.type===p._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():i.id.type!=="Identifier"&&!(t&&(this.type===p._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(p.comma))break}return e};B.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?xn:Xe,!1)};var cr=1,wn=2,Ds=4;B.parseFunction=function(e,t,r,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===p.star&&t&wn&&this.unexpected(),e.generator=this.eat(p.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&cr&&(e.id=t&Ds&&this.type!==p.name?null:this.parseIdent(),e.id&&!(t&wn)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?xn:Xe:Os));var a=this.yieldPos,o=this.awaitPos,f=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_n(e.async,e.generator)),t&cr||(e.id=this.type===p.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,n),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=f,this.finishNode(e,t&cr?"FunctionDeclaration":"FunctionExpression")};B.parseFunctionParams=function(e){this.expect(p.parenL),e.params=this.parseBindingList(p.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};B.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),a=!1;for(n.body=[],this.expect(p.braceL);this.type!==p.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(n.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(a&&this.raise(o.start,"Duplicate constructor in the same class"),a=!0):o.key&&o.key.type==="PrivateIdentifier"&&bc(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};B.parseClassElement=function(e){if(this.eat(p.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,a=!1,o="method",f=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(p.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===p.star?f=!0:i="static"}if(r.static=f,!i&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===p.star)&&!this.canInsertSemicolon()?a=!0:i="async"),!i&&(t>=9||!a)&&this.eat(p.star)&&(n=!0),!i&&!a&&!n){var d=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=d:i=d)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===p.parenL||o!=="method"||n||a){var h=!r.static&&ni(r,"constructor"),u=h&&e;h&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=h?"constructor":o,this.parseClassMethod(r,n,a,u)}else this.parseClassField(r);return r};B.isClassElementNameStart=function(){return this.type===p.name||this.type===p.privateId||this.type===p.num||this.type===p.string||this.type===p.bracketL||this.type.keyword};B.parseClassElementName=function(e){this.type===p.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};B.parseClassMethod=function(e,t,r,i){var n=e.key;e.kind==="constructor"?(t&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):e.static&&ni(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,r,i);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};B.parseClassField=function(e){if(ni(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ni(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(p.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};B.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(fr|bn);this.type!==p.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};B.parseClassId=function(e,t){this.type===p.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Xe,!1)):(t===!0&&this.unexpected(),e.id=null)};B.parseClassSuper=function(e){e.superClass=this.eat(p._extends)?this.parseExprSubscripts(!1):null};B.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};B.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,r=e.used,i=this.privateNameStack.length,n=i===0?null:this.privateNameStack[i-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==p.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(p._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===p._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,cr|Ds,!1,r)}else if(this.type===p._class){var n=this.startNode();e.declaration=this.parseClass(n,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==p.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,o=e.specifiers;a=13&&this.type===p.string){var e=this.parseLiteral(this.value);return fc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};B.adaptDirectivePrologue=function(e){for(var t=0;t=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=e.properties;i=8&&!o&&f.name==="async"&&!this.canInsertSemicolon()&&this.eat(p._function))return this.overrideContext(fe.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(p.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[f],!1,t);if(this.options.ecmaVersion>=8&&f.name==="async"&&this.type===p.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return f=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(p.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[f],!0,t)}return f;case p.regexp:var d=this.value;return r=this.parseLiteral(d.value),r.regex={pattern:d.pattern,flags:d.flags},r;case p.num:case p.string:return this.parseLiteral(this.value);case p._null:case p._true:case p._false:return r=this.startNode(),r.value=this.type===p._null?null:this.type===p._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case p.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case p.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(p.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case p.braceL:return this.overrideContext(fe.b_expr),this.parseObj(!1,e);case p._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case p._class:return this.parseClass(this.startNode(),!1);case p._new:return this.parseNew();case p.backQuote:return this.parseTemplate();case p._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}};W.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case p.parenL:return this.parseDynamicImport(e);case p.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}};W.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(p.parenR)){var t=this.start;this.eat(p.comma)&&this.eat(p.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};W.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};W.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};W.parseParenExpression=function(){this.expect(p.parenL);var e=this.parseExpression();return this.expect(p.parenR),e};W.parseParenAndDistinguishExpression=function(e,t){var r=this.start,i=this.startLoc,n,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,f=this.startLoc,d=[],h=!0,u=!1,b=new ii,x=this.yieldPos,v=this.awaitPos,S;for(this.yieldPos=0,this.awaitPos=0;this.type!==p.parenR;)if(h?h=!1:this.expect(p.comma),a&&this.afterTrailingComma(p.parenR,!0)){u=!0;break}else if(this.type===p.ellipsis){S=this.start,d.push(this.parseParenItem(this.parseRestBinding())),this.type===p.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else d.push(this.parseMaybeAssign(!1,b,this.parseParenItem));var F=this.lastTokEnd,w=this.lastTokEndLoc;if(this.expect(p.parenR),e&&!this.canInsertSemicolon()&&this.eat(p.arrow))return this.checkPatternErrors(b,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=x,this.awaitPos=v,this.parseParenArrowList(r,i,d,t);(!d.length||u)&&this.unexpected(this.lastTokStart),S&&this.unexpected(S),this.checkExpressionErrors(b,!0),this.yieldPos=x||this.yieldPos,this.awaitPos=v||this.awaitPos,d.length>1?(n=this.startNodeAt(o,f),n.expressions=d,this.finishNodeAt(n,"SequenceExpression",F,w)):n=d[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var P=this.startNodeAt(r,i);return P.expression=n,this.finishNode(P,"ParenthesizedExpression")}else return n};W.parseParenItem=function(e){return e};W.parseParenArrowList=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,i)};var mc=[];W.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(p.dot)){e.meta=t;var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc,a=this.type===p._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,n,!0,!1),a&&e.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(p.parenL)?e.arguments=this.parseExprList(p.parenR,this.options.ecmaVersion>=8,!1):e.arguments=mc,this.finishNode(e,"NewExpression")};W.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===p.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` `),cooked:this.value},this.next(),r.tail=this.type===p.backQuote,this.finishNode(r,"TemplateElement")};W.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];!i.tail;)this.type===p.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(p.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(p.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};W.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===p.name||this.type===p.num||this.type===p.string||this.type===p.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===p.star)&&!Me.test(this.input.slice(this.lastTokEnd,this.start))};W.parseObj=function(e,t){var r=this.startNode(),i=!0,n={};for(r.properties=[],this.next();!this.eat(p.braceR);){if(i)i=!1;else if(this.expect(p.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(p.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,n,t),r.properties.push(a)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};W.parseProperty=function(e,t){var r=this.startNode(),i,n,a,o;if(this.options.ecmaVersion>=9&&this.eat(p.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===p.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===p.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,t),this.type===p.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(i=this.eat(p.star)));var f=this.containsEsc;return this.parsePropertyName(r),!e&&!f&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(p.star),this.parsePropertyName(r,t)):n=!1,this.parsePropertyValue(r,e,i,n,a,o,t,f),this.finishNode(r,"Property")};W.parsePropertyValue=function(e,t,r,i,n,a,o,f){if((r||i)&&this.type===p.colon&&this.unexpected(),this.eat(p.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===p.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,i);else if(!t&&!f&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==p.comma&&this.type!==p.braceR&&this.type!==p.eq){(r||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var d=e.kind==="get"?0:1;if(e.value.params.length!==d){var h=e.value.start;e.kind==="get"?this.raiseRecoverable(h,"getter should have no params"):this.raiseRecoverable(h,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,a,this.copyNode(e.key)):this.type===p.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};W.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(p.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(p.bracketR),e.key;e.computed=!1}return e.key=this.type===p.num||this.type===p.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};W.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};W.parseMethod=function(e,t,r){var i=this.startNode(),n=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(_n(t,i.generator)|bn|(r?Ls:0)),this.expect(p.parenL),i.params=this.parseBindingList(p.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")};W.parseArrowExpression=function(e,t,r,i){var n=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(_n(r,!1)|Rs),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};W.parseFunctionBody=function(e,t,r,i){var n=t&&this.type!==p.braceL,a=this.strict,o=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var f=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||f)&&(o=this.strictDirective(this.end),o&&f&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var d=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Ms),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=d}this.exitScope()};W.isSimpleParamList=function(e){for(var t=0,r=e;t-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&n.flags&hr&&delete this.undefinedExports[e]}else if(t===Fs){var a=this.currentScope();a.lexical.push(e)}else if(t===Os){var o=this.currentScope();this.treatFunctionsAsVar?i=o.lexical.indexOf(e)>-1:i=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var f=this.scopeStack.length-1;f>=0;--f){var d=this.scopeStack[f];if(d.lexical.indexOf(e)>-1&&!(d.flags&Ps&&d.lexical[0]===e)||!this.treatFunctionsAsVarInScope(d)&&d.functions.indexOf(e)>-1){i=!0;break}if(d.var.push(e),this.inModule&&d.flags&hr&&delete this.undefinedExports[e],d.flags&mn)break}i&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};ot.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};ot.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ot.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&mn)return t}};ot.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&mn&&!(t.flags&Rs))return t}};var si=function(t,r,i){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new ti(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},pr=be.prototype;pr.startNode=function(){return new si(this,this.start,this.startLoc)};pr.startNodeAt=function(e,t){return new si(this,e,t)};function Bs(e,t,r,i){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=r),e}pr.finishNode=function(e,t){return Bs.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};pr.finishNodeAt=function(e,t,r,i){return Bs.call(this,e,t,r,i)};pr.copyNode=function(e){var t=new si(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var $s="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Vs=$s+" Extended_Pictographic",zs=Vs,Hs=zs+" EBase EComp EMod EPres ExtPict",xc=Hs,yc={9:$s,10:Vs,11:zs,12:Hs,13:xc},Gs="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Zs="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ws=Zs+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",qs=Ws+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",js=qs+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",wc=js+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",kc={9:Zs,10:Ws,11:qs,12:js,13:wc},Ks={};function Ec(e){var t=Ks[e]={binary:mt(yc[e]+" "+Gs),nonBinary:{General_Category:mt(Gs),Script:mt(kc[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(oi=0,kn=[9,10,11,12,13];oi=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":""),this.unicodeProperties=Ks[t.options.ecmaVersion>=13?13:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};Qe.prototype.reset=function(t,r,i){var n=i.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=i,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9};Qe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Qe.prototype.at=function(t,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(t>=n)return-1;var a=i.charCodeAt(t);if(!(r||this.switchU)||a<=55295||a>=57344||t+1>=n)return a;var o=i.charCodeAt(t+1);return o>=56320&&o<=57343?(a<<10)+o-56613888:a};Qe.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(t>=n)return n;var a=i.charCodeAt(t),o;return!(r||this.switchU)||a<=55295||a>=57344||t+1>=n||(o=i.charCodeAt(t+1))<56320||o>57343?t+1:t+2};Qe.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Qe.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Qe.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Qe.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};function ui(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}D.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,i=0;i-1&&this.raise(e.start,"Duplicate regular expression flag")}};D.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};D.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};D.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};D.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};D.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return n!==-1&&n=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};D.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};D.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};D.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Xs(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Xs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}D.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!Xs(r);)e.advance();return e.pos!==t};D.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};D.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};D.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};D.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ui(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ui(e.lastIntValue);return!0}return!1};D.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),Sc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function Sc(e){return Ye(e,!0)||e===36||e===95}D.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),Cc(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function Cc(e){return Ut(e,!0)||e===36||e===95||e===8204||e===8205}D.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};D.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};D.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};D.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};D.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};D.regexp_eatZero=function(e){return e.current()===48&&!li(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};D.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};D.regexp_eatControlLetter=function(e){var t=e.current();return Qs(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Qs(e){return e>=65&&e<=90||e>=97&&e<=122}D.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(i&&n>=55296&&n<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(n-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=n}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ac(e.lastIntValue))return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function Ac(e){return e>=0&&e<=1114111}D.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};D.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};D.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Ic(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1};function Ic(e){return e===100||e===68||e===115||e===83||e===119||e===87}D.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,i),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n),!0}return!1};D.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){ur(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};D.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")};D.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Js(t=e.current());)e.lastStringValue+=ui(t),e.advance();return e.lastStringValue!==""};function Js(e){return Qs(e)||e===95}D.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Nc(t=e.current());)e.lastStringValue+=ui(t),e.advance();return e.lastStringValue!==""};function Nc(e){return Js(e)||li(e)}D.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};D.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1};D.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};D.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||ro(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return i!==93?(e.lastIntValue=i,e.advance(),!0):!1};D.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};D.regexp_eatClassControlLetter=function(e){var t=e.current();return li(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};D.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};D.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;li(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function li(e){return e>=48&&e<=57}D.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;eo(r=e.current());)e.lastIntValue=16*e.lastIntValue+to(r),e.advance();return e.pos!==t};function eo(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function to(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}D.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};D.regexp_eatOctalDigit=function(e){var t=e.current();return ro(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function ro(e){return e>=48&&e<=55}D.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length)return this.finishToken(p.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};X.readToken=function(e){return Ye(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};X.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};X.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,n=t;(i=Es(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};X.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&Ss.test(String.fromCharCode(e)))++this.pos;else break e}}};X.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};X.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(p.ellipsis)):(++this.pos,this.finishToken(p.dot))};X.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(p.assign,2):this.finishOp(p.slash,1)};X.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,i=e===42?p.star:p.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,i=p.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(p.assign,r+1):this.finishOp(i,r)};X.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(p.assign,3)}return this.finishOp(e===124?p.logicalOR:p.logicalAND,2)}return t===61?this.finishOp(p.assign,2):this.finishOp(e===124?p.bitwiseOR:p.bitwiseAND,1)};X.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(p.assign,2):this.finishOp(p.bitwiseXOR,1)};X.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Me.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(p.incDec,2):t===61?this.finishOp(p.assign,2):this.finishOp(p.plusMin,1)};X.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(p.assign,r+1):this.finishOp(p.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(p.relational,r))};X.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(p.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(p.arrow)):this.finishOp(e===61?p.eq:p.prefix,1)};X.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(p.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(p.assign,3)}return this.finishOp(p.coalesce,2)}}return this.finishOp(p.question,1)};X.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Ye(t,!0)||t===92))return this.finishToken(p.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+hi(t)+"'")};X.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(p.parenL);case 41:return++this.pos,this.finishToken(p.parenR);case 59:return++this.pos,this.finishToken(p.semi);case 44:return++this.pos,this.finishToken(p.comma);case 91:return++this.pos,this.finishToken(p.bracketL);case 93:return++this.pos,this.finishToken(p.bracketR);case 123:return++this.pos,this.finishToken(p.braceL);case 125:return++this.pos,this.finishToken(p.braceR);case 58:return++this.pos,this.finishToken(p.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(p.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(p.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+hi(e)+"'")};X.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};X.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Me.test(i)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}++this.pos}var n=this.input.slice(r,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var f=this.regexpState||(this.regexpState=new Qe(this));f.reset(r,n,o),this.validateRegExpFlags(f),this.validateRegExpPattern(f);var d=null;try{d=new RegExp(n,o)}catch(h){}return this.finishToken(p.regexp,{pattern:n,flags:o,value:d})};X.readInt=function(e,t,r){for(var i=this.options.ecmaVersion>=12&&t===void 0,n=r&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,f=0,d=0,h=t==null?1/0:t;d=97?b=u-97+10:u>=65?b=u-65+10:u>=48&&u<=57?b=u-48:b=1/0,b>=e)break;f=u,o=o*e+b}return i&&f===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Tc(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function io(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}X.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=io(this.input.slice(t,this.pos)),++this.pos):Ye(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(p.num,r)};X.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&i===110){var n=io(this.input.slice(t,this.pos));return++this.pos,Ye(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(p.num,n)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),Ye(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=Tc(this.input.slice(t,this.pos),r);return this.finishToken(p.num,a)};X.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};function hi(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}X.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;i===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Bt(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(p.string,t)};var no={};X.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===no)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};X.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw no;this.raise(e,t)};X.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===p.template||this.type===p.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(p.dollarBraceL)):(++this.pos,this.finishToken(p.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(p.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Bt(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};X.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return Bt(t)?"":String.fromCharCode(t)}};X.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};X.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos0&&(a+=";"),f.length!==0){for(var d=0,h=[],u=0,b=f;u1&&(v+=gr(x[1]-t)+gr(x[2]-r)+gr(x[3]-i),t=x[1],r=x[2],i=x[3]),x.length===5&&(v+=gr(x[4]-n),n=x[4]),h.push(v)}a+=h.join(",")}}return a}function gr(e){var t="";e=e<0?-e<<1|1:e<<1;do{var r=e&31;e>>>=5,e>0&&(r|=32),t+=Sn[r]}while(e>0);return t}var fi=function e(t){this.bits=t instanceof e?t.bits.slice():[]};fi.prototype.add=function(t){this.bits[t>>5]|=1<<(t&31)};fi.prototype.has=function(t){return!!(this.bits[t>>5]&1<<(t&31))};var we=function(t,r,i){this.start=t,this.end=r,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};we.prototype.appendLeft=function(t){this.outro+=t};we.prototype.appendRight=function(t){this.intro=this.intro+t};we.prototype.clone=function(){var t=new we(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t};we.prototype.contains=function(t){return this.start=i.length)return" ";var n=i.reduce(function(a,o){var f=/^ +/.exec(o)[0].length;return Math.min(f,a)},1/0);return new Array(n+1).join(" ")}function oo(e,t){var r=e.split(/[/\\]/),i=t.split(/[/\\]/);for(r.pop();r[0]===i[0];)r.shift(),i.shift();if(r.length)for(var n=r.length;n--;)r[n]="..";return r.concat(i).join("/")}var Oc=Object.prototype.toString;function uo(e){return Oc.call(e)==="[object Object]"}function An(e){for(var t=e.split(` `),r=[],i=0,n=0;i>1;o=0&&a.push(n),this.rawSegments.push(a)}else this.pending&&this.rawSegments.push(this.pending);this.advance(r),this.pending=null};vr.prototype.addUneditedChunk=function(t,r,i,n,a){for(var o=r.start,f=!0;o1){for(var i=0;i=t&&i<=r)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(r),this._split(i);var n=this.byStart[t],a=this.byEnd[r],o=n.previous,f=a.next,d=this.byStart[i];if(!d&&a===this.lastChunk)return this;var h=d?d.previous:this.lastChunk;return o&&(o.next=f),f&&(f.previous=o),h&&(h.next=n),d&&(d.previous=a),n.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=n.previous,this.lastChunk.next=null),n.previous=h,a.next=d||null,h||(this.firstChunk=n),d||(this.lastChunk=a),this};j.prototype.overwrite=function(t,r,i,n){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length;if(r>this.original.length)throw new Error("end is out of bounds");if(t===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(r),n===!0&&(zt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),zt.storeName=!0),n={storeName:!0});var a=n!==void 0?n.storeName:!1,o=n!==void 0?n.contentOnly:!1;if(a){var f=this.original.slice(t,r);this.storedNames[f]=!0}var d=this.byStart[t],h=this.byEnd[r];if(d){if(r>d.end&&d.next!==this.byStart[d.end])throw new Error("Cannot overwrite across a split point");if(d.edit(i,a,o),d!==h){for(var u=d.next;u!==h;)u.edit("",!1),u=u.next;u.edit("",!1)}}else{var b=new we(t,r,"").edit(i,a);h.next=b,b.previous=h}return this};j.prototype.prepend=function(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this};j.prototype.prependLeft=function(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);var i=this.byEnd[t];return i?i.prependLeft(r):this.intro=r+this.intro,this};j.prototype.prependRight=function(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);var i=this.byStart[t];return i?i.prependRight(r):this.outro=r+this.outro,this};j.prototype.remove=function(t,r){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length;if(t===r)return this;if(t<0||r>this.original.length)throw new Error("Character is out of bounds");if(t>r)throw new Error("end must be greater than start");this._split(t),this._split(r);for(var i=this.byStart[t];i;)i.intro="",i.outro="",i.edit(""),i=r>i.end?this.byStart[i.end]:null;return this};j.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""};j.prototype.lastLine=function(){var t=this.outro.lastIndexOf(br);if(t!==-1)return this.outro.substr(t+1);var r=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(t=i.outro.lastIndexOf(br),t!==-1)return i.outro.substr(t+1)+r;r=i.outro+r}if(i.content.length>0){if(t=i.content.lastIndexOf(br),t!==-1)return i.content.substr(t+1)+r;r=i.content+r}if(i.intro.length>0){if(t=i.intro.lastIndexOf(br),t!==-1)return i.intro.substr(t+1)+r;r=i.intro+r}}while(i=i.previous);return t=this.intro.lastIndexOf(br),t!==-1?this.intro.substr(t+1)+r:this.intro+r};j.prototype.slice=function(t,r){for(t===void 0&&(t=0),r===void 0&&(r=this.original.length);t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length;for(var i="",n=this.firstChunk;n&&(n.start>t||n.end<=t);){if(n.start=r)return i;n=n.next}if(n&&n.edited&&n.start!==t)throw new Error("Cannot use replaced character "+t+" as slice start anchor.");for(var a=n;n;){n.intro&&(a!==n||n.start===t)&&(i+=n.intro);var o=n.start=r;if(o&&n.edited&&n.end!==r)throw new Error("Cannot use replaced character "+r+" as slice end anchor.");var f=a===n?t-n.start:0,d=o?n.content.length+r-n.end:n.content.length;if(i+=n.content.slice(f,d),n.outro&&(!o||n.end===r)&&(i+=n.outro),o)break;n=n.next}return i};j.prototype.snip=function(t,r){var i=this.clone();return i.remove(0,t),i.remove(r,i.original.length),i};j.prototype._split=function(t){if(!(this.byStart[t]||this.byEnd[t]))for(var r=this.lastSearchedChunk,i=t>r.end;r;){if(r.contains(t))return this._splitChunk(r,t);r=i?this.byStart[r.end]:this.byEnd[r.start]}};j.prototype._splitChunk=function(t,r){if(t.edited&&t.content.length){var i=An(this.original)(r);throw new Error("Cannot split a chunk that has already been edited ("+i.line+":"+i.column+' \u2013 "'+t.original+'")')}var n=t.split(r);return this.byEnd[r]=t,this.byStart[r]=n,this.byEnd[n.end]=n,t===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=t,!0};j.prototype.toString=function(){for(var t=this.intro,r=this.firstChunk;r;)t+=r.toString(),r=r.next;return t+this.outro};j.prototype.isEmpty=function(){var t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0};j.prototype.length=function(){var t=this.firstChunk,r=0;do r+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return r};j.prototype.trimLines=function(){return this.trim("[\\r\\n]")};j.prototype.trim=function(t){return this.trimStart(t).trimEnd(t)};j.prototype.trimEndAborted=function(t){var r=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;var i=this.lastChunk;do{var n=i.end,a=i.trimEnd(r);if(i.end!==n&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),a)return!0;i=i.previous}while(i);return!1};j.prototype.trimEnd=function(t){return this.trimEndAborted(t),this};j.prototype.trimStartAborted=function(t){var r=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;var i=this.firstChunk;do{var n=i.end,a=i.trimStart(r);if(i.end!==n&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),a)return!0;i=i.next}while(i);return!1};j.prototype.trimStart=function(t){return this.trimStartAborted(t),this};var lo=Object.prototype.hasOwnProperty,Se=function(t){t===void 0&&(t={}),this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:` `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};Se.prototype.addSource=function(t){if(t instanceof j)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!uo(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(i){lo.call(t,i)||(t[i]=t.content[i])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!lo.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else{var r=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==r.content)throw new Error("Illegal source: same filename ("+t.filename+"), different contents")}return this.sources.push(t),this};Se.prototype.append=function(t,r){return this.addSource({content:new j(t),separator:r&&r.separator||""}),this};Se.prototype.clone=function(){var t=new Se({intro:this.intro,separator:this.separator});return this.sources.forEach(function(r){t.addSource({filename:r.filename,content:r.content.clone(),separator:r.separator})}),t};Se.prototype.generateDecodedMap=function(t){var r=this;t===void 0&&(t={});var i=[];this.sources.forEach(function(a){Object.keys(a.content.storedNames).forEach(function(o){~i.indexOf(o)||i.push(o)})});var n=new vr(t.hires);return this.intro&&n.advance(this.intro),this.sources.forEach(function(a,o){o>0&&n.advance(r.separator);var f=a.filename?r.uniqueSourceIndexByFilename[a.filename]:-1,d=a.content,h=An(d.original);d.intro&&n.advance(d.intro),d.firstChunk.eachNext(function(u){var b=h(u.start);u.intro.length&&n.advance(u.intro),a.filename?u.edited?n.addEdit(f,u.content,b,u.storeName?i.indexOf(u.original):-1):n.addUneditedChunk(f,u,d.original,b,d.sourcemapLocations):n.advance(u.content),u.outro.length&&n.advance(u.outro)}),d.outro&&n.advance(d.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():null,sources:this.uniqueSources.map(function(a){return t.file?oo(t.file,a.filename):a.filename}),sourcesContent:this.uniqueSources.map(function(a){return t.includeContent?a.content:null}),names:i,mappings:n.raw}};Se.prototype.generateMap=function(t){return new ci(this.generateDecodedMap(t))};Se.prototype.getIndentString=function(){var t={};return this.sources.forEach(function(r){var i=r.content.indentStr;i!==null&&(t[i]||(t[i]=0),t[i]+=1)}),Object.keys(t).sort(function(r,i){return t[r]-t[i]})[0]||" "};Se.prototype.indent=function(t){var r=this;if(arguments.length||(t=this.getIndentString()),t==="")return this;var i=!this.intro||this.intro.slice(-1)===` `;return this.sources.forEach(function(n,a){var o=n.separator!==void 0?n.separator:r.separator,f=i||a>0&&/\r?\n$/.test(o);n.content.indent(t,{exclude:n.indentExclusionRanges,indentStart:f}),i=n.content.lastChar()===` `}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,function(n,a){return a>0?t+n:n})),this};Se.prototype.prepend=function(t){return this.intro=t+this.intro,this};Se.prototype.toString=function(){var t=this,r=this.sources.map(function(i,n){var a=i.separator!==void 0?i.separator:t.separator,o=(n>0?a:"")+i.content.toString();return o}).join("");return this.intro+r};Se.prototype.isEmpty=function(){return!(this.intro.length&&this.intro.trim()||this.sources.some(function(t){return!t.content.isEmpty()}))};Se.prototype.length=function(){return this.sources.reduce(function(t,r){return t+r.content.length()},this.intro.length)};Se.prototype.trimLines=function(){return this.trim("[\\r\\n]")};Se.prototype.trim=function(t){return this.trimStart(t).trimEnd(t)};Se.prototype.trimStart=function(t){var r=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(r,""),!this.intro){var i,n=0;do if(i=this.sources[n++],!i)break;while(!i.content.trimStartAborted(t))}return this};Se.prototype.trimEnd=function(t){var r=new RegExp((t||"\\s")+"+$"),i,n=this.sources.length-1;do if(i=this.sources[n--],!i){this.intro=this.intro.replace(r,"");break}while(!i.content.trimEndAborted(t));return this};var ho=j;var mr=new WeakSet;function pi(e){if(mr.has(e))throw new Error("Cannot run helper method after manipulator callback of iterated or target node has finished running")}var ut=new WeakMap;var Tn={};Yf(Tn,{parent:()=>di,source:()=>In,update:()=>Nn});function In(e){let{context:t}=ut.get(e);return t.magicString.slice(e.start,e.end).toString()}function di(e,t=1){let{parent:r}=ut.get(e);if(!!r)return t<=1?r:di(r,t-1)}function Nn(e,t){pi(e);let{context:r}=ut.get(e);r.magicString.overwrite(e.start,e.end,t)}function Ht(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function gi(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"}function fo(e){let t=[];for(let r of Object.keys(e)){let i=e[r];if(Array.isArray(i))for(let n of i)gi(n)&&t.push(n);else gi(i)&&t.push(i)}return t}function Rn(e,t,r){if(t.length===0)return;let[i,...n]=t,a=On(i,r);return Ht(a)?a.then(()=>Rn(e,n,r)):Rn(e,n,r)}function Pn(e,t){let r=fo(e);for(let i of r)ut.set(i,{parent:e,context:t}),Pn(i,t)}function Ln(e,t){return(...r)=>{let i=Tn[t];return gi(r[0])?(t==="update"&&pi(r[0]),i(...r)):i(e,...r)}}function On(e,t){let r=fo(e),i=Rn(e,r,t),n={source:Ln(e,"source"),parent:Ln(e,"parent"),update:Ln(e,"update")};if(Ht(i))return i.then(()=>t.manipulator(e,n)).then(a=>(mr.add(e),a));{let a=t.manipulator(e,n);return Ht(a)?a.then(o=>(mr.add(e),o)):(mr.add(e),a)}}function Fn({magicString:e,options:t}){let r=e.toString();return Object.freeze({code:r,map:e.generateMap(t.sourceMap),toString:()=>r})}function Mn(...e){var t;let r,i,n=String(e[0]);if(typeof e[1]=="function")r={},i=e[1];else if(typeof e[1]=="object"&&typeof e[2]=="function")r=e[1],i=e[2];else throw new Error("Invalid arguments. After the source code argument, yufka() expects either an options object and a manipulator function or just a manipulator function");let a=Ft({ecmaVersion:"latest"},(t=r.acorn)!==null&&t!==void 0?t:{}),o=r.parser?r.parser.parse(n,a):ao(n,a),d={magicString:new ho(n),options:r,manipulator:i};ut.set(o,{parent:void 0,context:d}),Pn(o,d);let h=On(o,d);return Ht(h)?h.then(()=>Fn(d)):Fn(d)}Mn.source=In;Mn.parent=di;Mn.update=Nn;var pg=ts(po()),Fc=new TextDecoder("utf-8");function go(e){return Fc.decode(e)}var Mc=new TextEncoder;function vo(e){return Mc.encode(e)}var Dc=1024*8,Gt=class{constructor(t=Dc,r={}){let i=!1;typeof t=="number"?t=new ArrayBuffer(t):(i=!0,this.lastWrittenByte=t.byteLength);let n=r.offset?r.offset>>>0:0,a=t.byteLength-n,o=n;(ArrayBuffer.isView(t)||t instanceof Gt)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+n),t=t.buffer),i?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){let i=(this.offset+t)*2,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){let r=new Uint8Array(t);for(let i=0;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}};var Uc=4,bo=0,mo=1,Bc=2;function Zt(e){let t=e.length;for(;--t>=0;)e[t]=0}var $c=0,_o=1,Vc=2,zc=3,Hc=258,Dn=29,_r=256,xr=_r+1+Dn,Wt=30,Un=19,xo=2*xr+1,_t=15,Bn=16,Gc=7,$n=256,yo=16,wo=17,ko=18,Vn=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),vi=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Zc=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Eo=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Wc=512,Je=new Array((xr+2)*2);Zt(Je);var yr=new Array(Wt*2);Zt(yr);var wr=new Array(Wc);Zt(wr);var kr=new Array(Hc-zc+1);Zt(kr);var zn=new Array(Dn);Zt(zn);var bi=new Array(Wt);Zt(bi);function Hn(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var So,Co,Ao;function Gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Io=e=>e<256?wr[e]:wr[256+(e>>>7)],Er=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Re=(e,t,r)=>{e.bi_valid>Bn-r?(e.bi_buf|=t<>Bn-e.bi_valid,e.bi_valid+=r-Bn):(e.bi_buf|=t<{Re(e,r[t*2],r[t*2+1])},No=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},qc=e=>{e.bi_valid===16?(Er(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},jc=(e,t)=>{let r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,d=t.stat_desc.max_length,h,u,b,x,v,S,F=0;for(x=0;x<=_t;x++)e.bl_count[x]=0;for(r[e.heap[e.heap_max]*2+1]=0,h=e.heap_max+1;hd&&(x=d,F++),r[u*2+1]=x,!(u>i)&&(e.bl_count[x]++,v=0,u>=f&&(v=o[u-f]),S=r[u*2],e.opt_len+=S*(x+v),a&&(e.static_len+=S*(n[u*2+1]+v)));if(F!==0){do{for(x=d-1;e.bl_count[x]===0;)x--;e.bl_count[x]--,e.bl_count[x+1]+=2,e.bl_count[d]--,F-=2}while(F>0);for(x=d;x!==0;x--)for(u=e.bl_count[x];u!==0;)b=e.heap[--h],!(b>i)&&(r[b*2+1]!==x&&(e.opt_len+=(x-r[b*2+1])*r[b*2],r[b*2+1]=x),u--)}},To=(e,t,r)=>{let i=new Array(_t+1),n=0,a,o;for(a=1;a<=_t;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){let f=e[o*2+1];f!==0&&(e[o*2]=No(i[f]++,f))}},Kc=()=>{let e,t,r,i,n,a=new Array(_t+1);for(r=0,i=0;i>=7;i{let t;for(t=0;t{e.bi_valid>8?Er(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Yc=(e,t,r,i)=>{Po(e),i&&(Er(e,r),Er(e,~r)),e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},Lo=(e,t,r,i)=>{let n=t*2,a=r*2;return e[n]{let i=e.heap[r],n=r<<1;for(;n<=e.heap_len&&(n{let i,n,a=0,o,f;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?We(e,n,t):(o=kr[n],We(e,o+_r+1,t),f=Vn[o],f!==0&&(n-=zn[o],Re(e,n,f)),i--,o=Io(i),We(e,o,r),f=vi[o],f!==0&&(i-=bi[o],Re(e,i,f)));while(a{let r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,f,d=-1,h;for(e.heap_len=0,e.heap_max=xo,o=0;o>1;o>=1;o--)Zn(e,r,o);h=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Zn(e,r,1),f=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=f,r[h*2]=r[o*2]+r[f*2],e.depth[h]=(e.depth[o]>=e.depth[f]?e.depth[o]:e.depth[f])+1,r[o*2+1]=r[f*2+1]=h,e.heap[1]=h++,Zn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],jc(e,t),To(r,d,e.bl_count)},Fo=(e,t,r)=>{let i,n=-1,a,o=t[0*2+1],f=0,d=7,h=4;for(o===0&&(d=138,h=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++f{let i,n=-1,a,o=t[0*2+1],f=0,d=7,h=4;for(o===0&&(d=138,h=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++f{let t;for(Fo(e,e.dyn_ltree,e.l_desc.max_code),Fo(e,e.dyn_dtree,e.d_desc.max_code),Wn(e,e.bl_desc),t=Un-1;t>=3&&e.bl_tree[Eo[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Qc=(e,t,r,i)=>{let n;for(Re(e,t-257,5),Re(e,r-1,5),Re(e,i-4,4),n=0;n{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return bo;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return mo;for(r=32;r<_r;r++)if(e.dyn_ltree[r*2]!==0)return mo;return bo},Do=!1,ep=e=>{Do||(Kc(),Do=!0),e.l_desc=new Gn(e.dyn_ltree,So),e.d_desc=new Gn(e.dyn_dtree,Co),e.bl_desc=new Gn(e.bl_tree,Ao),e.bi_buf=0,e.bi_valid=0,Ro(e)},Uo=(e,t,r,i)=>{Re(e,($c<<1)+(i?1:0),3),Yc(e,t,r,!0)},tp=e=>{Re(e,_o<<1,3),We(e,$n,Je),qc(e)},rp=(e,t,r,i)=>{let n,a,o=0;e.level>0?(e.strm.data_type===Bc&&(e.strm.data_type=Jc(e)),Wn(e,e.l_desc),Wn(e,e.d_desc),o=Xc(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Uo(e,t,r,i):e.strategy===Uc||a===n?(Re(e,(_o<<1)+(i?1:0),3),Oo(e,Je,yr)):(Re(e,(Vc<<1)+(i?1:0),3),Qc(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Oo(e,e.dyn_ltree,e.dyn_dtree)),Ro(e),i&&Po(e)},ip=(e,t,r)=>(e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(kr[r]+_r+1)*2]++,e.dyn_dtree[Io(t)*2]++),e.last_lit===e.lit_bufsize-1),np=ep,ap=Uo,sp=rp,op=ip,up=tp,lp={_tr_init:np,_tr_stored_block:ap,_tr_flush_block:sp,_tr_tally:op,_tr_align:up},hp=(e,t,r,i)=>{let n=e&65535|0,a=e>>>16&65535|0,o=0;for(;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0},Sr=hp,fp=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},cp=new Uint32Array(fp()),pp=(e,t,r,i)=>{let n=cp,a=i+r;e^=-1;for(let o=i;o>>8^n[(e^t[o])&255];return e^-1},_e=pp,qt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Cr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:dp,_tr_stored_block:gp,_tr_flush_block:vp,_tr_tally:lt,_tr_align:bp}=lp,{Z_NO_FLUSH:xt,Z_PARTIAL_FLUSH:mp,Z_FULL_FLUSH:_p,Z_FINISH:ht,Z_BLOCK:Bo,Z_OK:qe,Z_STREAM_END:$o,Z_STREAM_ERROR:Ue,Z_DATA_ERROR:xp,Z_BUF_ERROR:qn,Z_DEFAULT_COMPRESSION:yp,Z_FILTERED:wp,Z_HUFFMAN_ONLY:mi,Z_RLE:kp,Z_FIXED:Ep,Z_DEFAULT_STRATEGY:Sp,Z_UNKNOWN:Cp,Z_DEFLATED:_i}=Cr,Ap=9,Ip=15,Np=8,Tp=29,Rp=256,jn=Rp+1+Tp,Pp=30,Lp=19,Op=2*jn+1,Fp=15,ee=3,ft=258,Ge=ft+ee+1,Mp=32,xi=42,Kn=69,yi=73,wi=91,ki=103,yt=113,Ar=666,me=1,Ir=2,wt=3,jt=4,Dp=3,ct=(e,t)=>(e.msg=qt[t],t),Vo=e=>(e<<1)-(e>4?9:0),pt=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Up=(e,t,r)=>(t<{let t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},ke=(e,t)=>{vp(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,gt(e.strm)},ie=(e,t)=>{e.pending_buf[e.pending++]=t},Nr=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Bp=(e,t,r,i)=>{let n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),r),e.state.wrap===1?e.adler=Sr(e.adler,t,n,r):e.state.wrap===2&&(e.adler=_e(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)},zo=(e,t)=>{let r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,f=e.nice_match,d=e.strstart>e.w_size-Ge?e.strstart-(e.w_size-Ge):0,h=e.window,u=e.w_mask,b=e.prev,x=e.strstart+ft,v=h[i+o-1],S=h[i+o];e.prev_length>=e.good_match&&(r>>=2),f>e.lookahead&&(f=e.lookahead);do if(n=t,!(h[n+o]!==S||h[n+o-1]!==v||h[n]!==h[i]||h[++n]!==h[i+1])){i+=2,n++;do;while(h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&h[++i]===h[++n]&&io){if(e.match_start=t,o=a,a>=f)break;v=h[i+o-1],S=h[i+o]}}while((t=b[t&u])>d&&--r!=0);return o<=e.lookahead?o:e.lookahead},kt=e=>{let t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ge)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t}if(e.strm.avail_in===0)break;if(i=Bp(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=ee)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=dt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=dt(e,e.ins_h,e.window[o+ee-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert{let r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(kt(e),e.lookahead===0&&t===xt)return me;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;let i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,ke(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ge&&(ke(e,!1),e.strm.avail_out===0))return me}return e.insert=0,t===ht?(ke(e,!0),e.strm.avail_out===0?wt:jt):(e.strstart>e.block_start&&(ke(e,!1),e.strm.avail_out===0),me)},Yn=(e,t)=>{let r,i;for(;;){if(e.lookahead=ee&&(e.ins_h=dt(e,e.ins_h,e.window[e.strstart+ee-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Ge&&(e.match_length=zo(e,r)),e.match_length>=ee)if(i=lt(e,e.strstart-e.match_start,e.match_length-ee),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ee){e.match_length--;do e.strstart++,e.ins_h=dt(e,e.ins_h,e.window[e.strstart+ee-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!=0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=dt(e,e.ins_h,e.window[e.strstart+1]);else i=lt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ke(e,!1),e.strm.avail_out===0))return me}return e.insert=e.strstart{let r,i,n;for(;;){if(e.lookahead=ee&&(e.ins_h=dt(e,e.ins_h,e.window[e.strstart+ee-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ee-1,r!==0&&e.prev_length4096)&&(e.match_length=ee-1)),e.prev_length>=ee&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-ee,i=lt(e,e.strstart-1-e.prev_match,e.prev_length-ee),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=dt(e,e.ins_h,e.window[e.strstart+ee-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!=0);if(e.match_available=0,e.match_length=ee-1,e.strstart++,i&&(ke(e,!1),e.strm.avail_out===0))return me}else if(e.match_available){if(i=lt(e,0,e.window[e.strstart-1]),i&&ke(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return me}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=lt(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let r,i,n,a,o=e.window;for(;;){if(e.lookahead<=ft){if(kt(e),e.lookahead<=ft&&t===xt)return me;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ee&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+ft;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&ne.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ee?(r=lt(e,1,e.match_length-ee),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=lt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ke(e,!1),e.strm.avail_out===0))return me}return e.insert=0,t===ht?(ke(e,!0),e.strm.avail_out===0?wt:jt):e.last_lit&&(ke(e,!1),e.strm.avail_out===0)?me:Ir},zp=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(kt(e),e.lookahead===0)){if(t===xt)return me;break}if(e.match_length=0,r=lt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ke(e,!1),e.strm.avail_out===0))return me}return e.insert=0,t===ht?(ke(e,!0),e.strm.avail_out===0?wt:jt):e.last_lit&&(ke(e,!1),e.strm.avail_out===0)?me:Ir};function je(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}var Tr=[new je(0,0,0,0,$p),new je(4,4,8,4,Yn),new je(4,5,16,8,Yn),new je(4,6,32,32,Yn),new je(4,4,16,16,Kt),new je(8,16,32,32,Kt),new je(8,16,128,128,Kt),new je(8,32,128,256,Kt),new je(32,128,258,1024,Kt),new je(32,258,258,4096,Kt)],Hp=e=>{e.window_size=2*e.w_size,pt(e.head),e.max_lazy_match=Tr[e.level].max_lazy,e.good_match=Tr[e.level].good_length,e.nice_match=Tr[e.level].nice_length,e.max_chain_length=Tr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ee-1,e.match_available=0,e.ins_h=0};function Gp(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_i,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Op*2),this.dyn_dtree=new Uint16Array((2*Pp+1)*2),this.bl_tree=new Uint16Array((2*Lp+1)*2),pt(this.dyn_ltree),pt(this.dyn_dtree),pt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Fp+1),this.heap=new Uint16Array(2*jn+1),pt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*jn+1),pt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ho=e=>{if(!e||!e.state)return ct(e,Ue);e.total_in=e.total_out=0,e.data_type=Cp;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?xi:yt,e.adler=t.wrap===2?0:1,t.last_flush=xt,dp(t),qe},Go=e=>{let t=Ho(e);return t===qe&&Hp(e.state),t},Zp=(e,t)=>!e||!e.state||e.state.wrap!==2?Ue:(e.state.gzhead=t,qe),Zo=(e,t,r,i,n,a)=>{if(!e)return Ue;let o=1;if(t===yp&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>Ap||r!==_i||i<8||i>15||t<0||t>9||a<0||a>Ep)return ct(e,Ue);i===8&&(i=9);let f=new Gp;return e.state=f,f.strm=e,f.wrap=o,f.gzhead=null,f.w_bits=i,f.w_size=1<Zo(e,t,_i,Ip,Np,Sp),qp=(e,t)=>{let r,i;if(!e||!e.state||t>Bo||t<0)return e?ct(e,Ue):Ue;let n=e.state;if(!e.output||!e.input&&e.avail_in!==0||n.status===Ar&&t!==ht)return ct(e,e.avail_out===0?qn:Ue);n.strm=e;let a=n.last_flush;if(n.last_flush=t,n.status===xi)if(n.wrap===2)e.adler=0,ie(n,31),ie(n,139),ie(n,8),n.gzhead?(ie(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ie(n,n.gzhead.time&255),ie(n,n.gzhead.time>>8&255),ie(n,n.gzhead.time>>16&255),ie(n,n.gzhead.time>>24&255),ie(n,n.level===9?2:n.strategy>=mi||n.level<2?4:0),ie(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ie(n,n.gzhead.extra.length&255),ie(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=_e(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Kn):(ie(n,0),ie(n,0),ie(n,0),ie(n,0),ie(n,0),ie(n,n.level===9?2:n.strategy>=mi||n.level<2?4:0),ie(n,Dp),n.status=yt);else{let o=_i+(n.w_bits-8<<4)<<8,f=-1;n.strategy>=mi||n.level<2?f=0:n.level<6?f=1:n.level===6?f=2:f=3,o|=f<<6,n.strstart!==0&&(o|=Mp),o+=31-o%31,n.status=yt,Nr(n,o),n.strstart!==0&&(Nr(n,e.adler>>>16),Nr(n,e.adler&65535)),e.adler=1}if(n.status===Kn)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),gt(e),r=n.pending,n.pending===n.pending_buf_size));)ie(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=yi)}else n.status=yi;if(n.status===yi)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),gt(e),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindexr&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),i===0&&(n.gzindex=0,n.status=wi)}else n.status=wi;if(n.status===wi)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),gt(e),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindexr&&(e.adler=_e(e.adler,n.pending_buf,n.pending-r,r)),i===0&&(n.status=ki)}else n.status=ki;if(n.status===ki&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&>(e),n.pending+2<=n.pending_buf_size&&(ie(n,e.adler&255),ie(n,e.adler>>8&255),e.adler=0,n.status=yt)):n.status=yt),n.pending!==0){if(gt(e),e.avail_out===0)return n.last_flush=-1,qe}else if(e.avail_in===0&&Vo(t)<=Vo(a)&&t!==ht)return ct(e,qn);if(n.status===Ar&&e.avail_in!==0)return ct(e,qn);if(e.avail_in!==0||n.lookahead!==0||t!==xt&&n.status!==Ar){let o=n.strategy===mi?zp(n,t):n.strategy===kp?Vp(n,t):Tr[n.level].func(n,t);if((o===wt||o===jt)&&(n.status=Ar),o===me||o===wt)return e.avail_out===0&&(n.last_flush=-1),qe;if(o===Ir&&(t===mp?bp(n):t!==Bo&&(gp(n,0,0,!1),t===_p&&(pt(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),gt(e),e.avail_out===0))return n.last_flush=-1,qe}return t!==ht?qe:n.wrap<=0?$o:(n.wrap===2?(ie(n,e.adler&255),ie(n,e.adler>>8&255),ie(n,e.adler>>16&255),ie(n,e.adler>>24&255),ie(n,e.total_in&255),ie(n,e.total_in>>8&255),ie(n,e.total_in>>16&255),ie(n,e.total_in>>24&255)):(Nr(n,e.adler>>>16),Nr(n,e.adler&65535)),gt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?qe:$o)},jp=e=>{if(!e||!e.state)return Ue;let t=e.state.status;return t!==xi&&t!==Kn&&t!==yi&&t!==wi&&t!==ki&&t!==yt&&t!==Ar?ct(e,Ue):(e.state=null,t===yt?ct(e,xp):qe)},Kp=(e,t)=>{let r=t.length;if(!e||!e.state)return Ue;let i=e.state,n=i.wrap;if(n===2||n===1&&i.status!==xi||i.lookahead)return Ue;if(n===1&&(e.adler=Sr(e.adler,t,r,0)),i.wrap=0,r>=i.w_size){n===0&&(pt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let d=new Uint8Array(i.w_size);d.set(t.subarray(r-i.w_size,r),0),t=d,r=i.w_size}let a=e.avail_in,o=e.next_in,f=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,kt(i);i.lookahead>=ee;){let d=i.strstart,h=i.lookahead-(ee-1);do i.ins_h=dt(i,i.ins_h,i.window[d+ee-1]),i.prev[d&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=d,d++;while(--h);i.strstart=d,i.lookahead=ee-1,kt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=ee-1,i.match_available=0,e.next_in=o,e.input=f,e.avail_in=a,i.wrap=n,qe},Yp=Wp,Xp=Zo,Qp=Go,Jp=Ho,ed=Zp,td=qp,rd=jp,id=Kp,nd="pako deflate (from Nodeca project)",Rr={deflateInit:Yp,deflateInit2:Xp,deflateReset:Qp,deflateResetKeep:Jp,deflateSetHeader:ed,deflate:td,deflateEnd:rd,deflateSetDictionary:id,deflateInfo:nd},ad=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),sd=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let r=t.shift();if(!!r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(let i in r)ad(r,i)&&(e[i]=r[i])}}return e},od=e=>{let t=0;for(let i=0,n=e.length;i=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Pr[254]=Pr[254]=1;var ud=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,i,n,a,o=e.length,f=0;for(n=0;n>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},ld=(e,t)=>{if(t<65534&&e.subarray&&Wo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let i=0;i{let r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let i,n,a=new Array(r*2);for(n=0,i=0;i4){a[n++]=65533,i+=f-1;continue}for(o&=f===2?31:f===3?15:7;f>1&&i1){a[n++]=65533;continue}o<65536?a[n++]=o:(o-=65536,a[n++]=55296|o>>10&1023,a[n++]=56320|o&1023)}return ld(a,n)},fd=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)==128;)r--;return r<0||r===0?t:r+Pr[e[r]]>t?r:t},Lr={string2buf:ud,buf2string:hd,utf8border:fd};function cd(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var qo=cd,jo=Object.prototype.toString,{Z_NO_FLUSH:pd,Z_SYNC_FLUSH:dd,Z_FULL_FLUSH:gd,Z_FINISH:vd,Z_OK:Si,Z_STREAM_END:bd,Z_DEFAULT_COMPRESSION:md,Z_DEFAULT_STRATEGY:_d,Z_DEFLATED:xd}=Cr;function Xn(e){this.options=Ei.assign({level:md,method:xd,chunkSize:16384,windowBits:15,memLevel:8,strategy:_d},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qo,this.strm.avail_out=0;let r=Rr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Si)throw new Error(qt[r]);if(t.header&&Rr.deflateSetHeader(this.strm,t.header),t.dictionary){let i;if(typeof t.dictionary=="string"?i=Lr.string2buf(t.dictionary):jo.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=Rr.deflateSetDictionary(this.strm,i),r!==Si)throw new Error(qt[r]);this._dict_set=!0}}Xn.prototype.push=function(e,t){let r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?vd:pd,typeof e=="string"?r.input=Lr.string2buf(e):jo.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(a===dd||a===gd)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(n=Rr.deflate(r,a),n===bd)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=Rr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Si;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Xn.prototype.onData=function(e){this.chunks.push(e)};Xn.prototype.onEnd=function(e){e===Si&&(this.result=Ei.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ci=30,yd=12,wd=function(t,r){let i,n,a,o,f,d,h,u,b,x,v,S,F,w,P,C,V,R,Z,de,M,se,ne,z,H=t.state;i=t.next_in,ne=t.input,n=i+(t.avail_in-5),a=t.next_out,z=t.output,o=a-(r-t.avail_out),f=a+(t.avail_out-257),d=H.dmax,h=H.wsize,u=H.whave,b=H.wnext,x=H.window,v=H.hold,S=H.bits,F=H.lencode,w=H.distcode,P=(1<>>24,v>>>=R,S-=R,R=V>>>16&255,R===0)z[a++]=V&65535;else if(R&16){Z=V&65535,R&=15,R&&(S>>=R,S-=R),S<15&&(v+=ne[i++]<>>24,v>>>=R,S-=R,R=V>>>16&255,R&16){if(de=V&65535,R&=15,Sd){t.msg="invalid distance too far back",H.mode=Ci;break e}if(v>>>=R,S-=R,R=a-o,de>R){if(R=de-R,R>u&&H.sane){t.msg="invalid distance too far back",H.mode=Ci;break e}if(M=0,se=x,b===0){if(M+=h-R,R2;)z[a++]=se[M++],z[a++]=se[M++],z[a++]=se[M++],Z-=3;Z&&(z[a++]=se[M++],Z>1&&(z[a++]=se[M++]))}else{M=a-de;do z[a++]=z[M++],z[a++]=z[M++],z[a++]=z[M++],Z-=3;while(Z>2);Z&&(z[a++]=z[M++],Z>1&&(z[a++]=z[M++]))}}else if((R&64)==0){V=w[(V&65535)+(v&(1<>3,i-=Z,S-=Z<<3,v&=(1<{let d=f.bits,h=0,u=0,b=0,x=0,v=0,S=0,F=0,w=0,P=0,C=0,V,R,Z,de,M,se=null,ne=0,z,H=new Uint16Array(Yt+1),Ke=new Uint16Array(Yt+1),St=null,Ct=0,Br,At,It;for(h=0;h<=Yt;h++)H[h]=0;for(u=0;u=1&&H[x]===0;x--);if(v>x&&(v=x),x===0)return n[a++]=1<<24|64<<16|0,n[a++]=1<<24|64<<16|0,f.bits=1,0;for(b=1;b0&&(e===Xo||x!==1))return-1;for(Ke[1]=0,h=1;hKo||e===Qo&&P>Yo)return 1;for(;;){Br=h-F,o[u]z?(At=St[Ct+o[u]],It=se[ne+o[u]]):(At=32+64,It=0),V=1<>F)+R]=Br<<24|At<<16|It|0;while(R!==0);for(V=1<>=1;if(V!==0?(C&=V-1,C+=V):C=0,u++,--H[h]==0){if(h===x)break;h=t[r+o[u]]}if(h>v&&(C&de)!==Z){for(F===0&&(F=v),M+=b,S=h-F,w=1<Ko||e===Qo&&P>Yo)return 1;Z=C&de,n[Z]=v<<24|S<<16|M-a|0}}return C!==0&&(n[M+C]=h-F<<24|64<<16|0),f.bits=v,0},Or=Ad,Id=0,Jo=1,eu=2,{Z_FINISH:tu,Z_BLOCK:Nd,Z_TREES:Ai,Z_OK:Et,Z_STREAM_END:Td,Z_NEED_DICT:Rd,Z_STREAM_ERROR:Be,Z_DATA_ERROR:ru,Z_MEM_ERROR:iu,Z_BUF_ERROR:Pd,Z_DEFLATED:nu}=Cr,au=1,su=2,ou=3,uu=4,lu=5,hu=6,fu=7,cu=8,pu=9,du=10,Ii=11,et=12,Jn=13,gu=14,ea=15,vu=16,bu=17,mu=18,_u=19,Ni=20,Ti=21,xu=22,yu=23,wu=24,ku=25,Eu=26,ta=27,Su=28,Cu=29,ce=30,Au=31,Ld=32,Od=852,Fd=592,Md=15,Dd=Md,Iu=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function Ud(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Nu=e=>{if(!e||!e.state)return Be;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=au,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(Od),t.distcode=t.distdyn=new Int32Array(Fd),t.sane=1,t.back=-1,Et},Tu=e=>{if(!e||!e.state)return Be;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Nu(e)},Ru=(e,t)=>{let r;if(!e||!e.state)return Be;let i=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?Be:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Tu(e))},Pu=(e,t)=>{if(!e)return Be;let r=new Ud;e.state=r,r.window=null;let i=Ru(e,t);return i!==Et&&(e.state=null),i},Bd=e=>Pu(e,Dd),Lu=!0,ra,ia,$d=e=>{if(Lu){ra=new Int32Array(512),ia=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Or(Jo,e.lens,0,288,ra,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Or(eu,e.lens,0,32,ia,0,e.work,{bits:5}),Lu=!1}e.lencode=ra,e.lenbits=9,e.distcode=ia,e.distbits=5},Ou=(e,t,r,i)=>{let n,a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),a.window.set(t.subarray(r-i,r-i+n),a.wnext),i-=n,i?(a.window.set(t.subarray(r-i,r),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave{let r,i,n,a,o,f,d,h,u,b,x,v,S,F,w=0,P,C,V,R,Z,de,M,se,ne=new Uint8Array(4),z,H,Ke=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Be;r=e.state,r.mode===et&&(r.mode=Jn),o=e.next_out,n=e.output,d=e.avail_out,a=e.next_in,i=e.input,f=e.avail_in,h=r.hold,u=r.bits,b=f,x=d,se=Et;e:for(;;)switch(r.mode){case au:if(r.wrap===0){r.mode=Jn;break}for(;u<16;){if(f===0)break e;f--,h+=i[a++]<>>8&255,r.check=_e(r.check,ne,2,0),h=0,u=0,r.mode=su;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((h&255)<<8)+(h>>8))%31){e.msg="incorrect header check",r.mode=ce;break}if((h&15)!==nu){e.msg="unknown compression method",r.mode=ce;break}if(h>>>=4,u-=4,M=(h&15)+8,r.wbits===0)r.wbits=M;else if(M>r.wbits){e.msg="invalid window size",r.mode=ce;break}r.dmax=1<>8&1),r.flags&512&&(ne[0]=h&255,ne[1]=h>>>8&255,r.check=_e(r.check,ne,2,0)),h=0,u=0,r.mode=ou;case ou:for(;u<32;){if(f===0)break e;f--,h+=i[a++]<>>8&255,ne[2]=h>>>16&255,ne[3]=h>>>24&255,r.check=_e(r.check,ne,4,0)),h=0,u=0,r.mode=uu;case uu:for(;u<16;){if(f===0)break e;f--,h+=i[a++]<>8),r.flags&512&&(ne[0]=h&255,ne[1]=h>>>8&255,r.check=_e(r.check,ne,2,0)),h=0,u=0,r.mode=lu;case lu:if(r.flags&1024){for(;u<16;){if(f===0)break e;f--,h+=i[a++]<>>8&255,r.check=_e(r.check,ne,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=hu;case hu:if(r.flags&1024&&(v=r.length,v>f&&(v=f),v&&(r.head&&(M=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(i.subarray(a,a+v),M)),r.flags&512&&(r.check=_e(r.check,i,v,a)),f-=v,a+=v,r.length-=v),r.length))break e;r.length=0,r.mode=fu;case fu:if(r.flags&2048){if(f===0)break e;v=0;do M=i[a+v++],r.head&&M&&r.length<65536&&(r.head.name+=String.fromCharCode(M));while(M&&v>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=et;break;case du:for(;u<32;){if(f===0)break e;f--,h+=i[a++]<>>=u&7,u-=u&7,r.mode=ta;break}for(;u<3;){if(f===0)break e;f--,h+=i[a++]<>>=1,u-=1,h&3){case 0:r.mode=gu;break;case 1:if($d(r),r.mode=Ni,t===Ai){h>>>=2,u-=2;break e}break;case 2:r.mode=bu;break;case 3:e.msg="invalid block type",r.mode=ce}h>>>=2,u-=2;break;case gu:for(h>>>=u&7,u-=u&7;u<32;){if(f===0)break e;f--,h+=i[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=ce;break}if(r.length=h&65535,h=0,u=0,r.mode=ea,t===Ai)break e;case ea:r.mode=vu;case vu:if(v=r.length,v){if(v>f&&(v=f),v>d&&(v=d),v===0)break e;n.set(i.subarray(a,a+v),o),f-=v,a+=v,d-=v,o+=v,r.length-=v;break}r.mode=et;break;case bu:for(;u<14;){if(f===0)break e;f--,h+=i[a++]<>>=5,u-=5,r.ndist=(h&31)+1,h>>>=5,u-=5,r.ncode=(h&15)+4,h>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ce;break}r.have=0,r.mode=mu;case mu:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[Ke[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,z={bits:r.lenbits},se=Or(Id,r.lens,0,19,r.lencode,0,r.work,z),r.lenbits=z.bits,se){e.msg="invalid code lengths set",r.mode=ce;break}r.have=0,r.mode=_u;case _u:for(;r.have>>24,C=w>>>16&255,V=w&65535,!(P<=u);){if(f===0)break e;f--,h+=i[a++]<>>=P,u-=P,r.lens[r.have++]=V;else{if(V===16){for(H=P+2;u>>=P,u-=P,r.have===0){e.msg="invalid bit length repeat",r.mode=ce;break}M=r.lens[r.have-1],v=3+(h&3),h>>>=2,u-=2}else if(V===17){for(H=P+3;u>>=P,u-=P,M=0,v=3+(h&7),h>>>=3,u-=3}else{for(H=P+7;u>>=P,u-=P,M=0,v=11+(h&127),h>>>=7,u-=7}if(r.have+v>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ce;break}for(;v--;)r.lens[r.have++]=M}}if(r.mode===ce)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=ce;break}if(r.lenbits=9,z={bits:r.lenbits},se=Or(Jo,r.lens,0,r.nlen,r.lencode,0,r.work,z),r.lenbits=z.bits,se){e.msg="invalid literal/lengths set",r.mode=ce;break}if(r.distbits=6,r.distcode=r.distdyn,z={bits:r.distbits},se=Or(eu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,z),r.distbits=z.bits,se){e.msg="invalid distances set",r.mode=ce;break}if(r.mode=Ni,t===Ai)break e;case Ni:r.mode=Ti;case Ti:if(f>=6&&d>=258){e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=f,r.hold=h,r.bits=u,wd(e,x),o=e.next_out,n=e.output,d=e.avail_out,a=e.next_in,i=e.input,f=e.avail_in,h=r.hold,u=r.bits,r.mode===et&&(r.back=-1);break}for(r.back=0;w=r.lencode[h&(1<>>24,C=w>>>16&255,V=w&65535,!(P<=u);){if(f===0)break e;f--,h+=i[a++]<>R)],P=w>>>24,C=w>>>16&255,V=w&65535,!(R+P<=u);){if(f===0)break e;f--,h+=i[a++]<>>=R,u-=R,r.back+=R}if(h>>>=P,u-=P,r.back+=P,r.length=V,C===0){r.mode=Eu;break}if(C&32){r.back=-1,r.mode=et;break}if(C&64){e.msg="invalid literal/length code",r.mode=ce;break}r.extra=C&15,r.mode=xu;case xu:if(r.extra){for(H=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=yu;case yu:for(;w=r.distcode[h&(1<>>24,C=w>>>16&255,V=w&65535,!(P<=u);){if(f===0)break e;f--,h+=i[a++]<>R)],P=w>>>24,C=w>>>16&255,V=w&65535,!(R+P<=u);){if(f===0)break e;f--,h+=i[a++]<>>=R,u-=R,r.back+=R}if(h>>>=P,u-=P,r.back+=P,C&64){e.msg="invalid distance code",r.mode=ce;break}r.offset=V,r.extra=C&15,r.mode=wu;case wu:if(r.extra){for(H=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ce;break}r.mode=ku;case ku:if(d===0)break e;if(v=x-d,r.offset>v){if(v=r.offset-v,v>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ce;break}v>r.wnext?(v-=r.wnext,S=r.wsize-v):S=r.wnext-v,v>r.length&&(v=r.length),F=r.window}else F=n,S=o-r.offset,v=r.length;v>d&&(v=d),d-=v,r.length-=v;do n[o++]=F[S++];while(--v);r.length===0&&(r.mode=Ti);break;case Eu:if(d===0)break e;n[o++]=r.length,d--,r.mode=Ti;break;case ta:if(r.wrap){for(;u<32;){if(f===0)break e;f--,h|=i[a++]<{if(!e||!e.state)return Be;let t=e.state;return t.window&&(t.window=null),e.state=null,Et},Hd=(e,t)=>{if(!e||!e.state)return Be;let r=e.state;return(r.wrap&2)==0?Be:(r.head=t,t.done=!1,Et)},Gd=(e,t)=>{let r=t.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Ii)?Be:i.mode===Ii&&(n=1,n=Sr(n,t,r,0),n!==i.check)?ru:(a=Ou(e,t,r,r),a?(i.mode=Au,iu):(i.havedict=1,Et))},Zd=Tu,Wd=Ru,qd=Nu,jd=Bd,Kd=Pu,Yd=Vd,Xd=zd,Qd=Hd,Jd=Gd,e0="pako inflate (from Nodeca project)",tt={inflateReset:Zd,inflateReset2:Wd,inflateResetKeep:qd,inflateInit:jd,inflateInit2:Kd,inflate:Yd,inflateEnd:Xd,inflateGetHeader:Qd,inflateSetDictionary:Jd,inflateInfo:e0};function t0(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var r0=t0,Fu=Object.prototype.toString,{Z_NO_FLUSH:i0,Z_FINISH:n0,Z_OK:Fr,Z_STREAM_END:na,Z_NEED_DICT:aa,Z_STREAM_ERROR:a0,Z_DATA_ERROR:Mu,Z_MEM_ERROR:s0}=Cr;function Mr(e){this.options=Ei.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qo,this.strm.avail_out=0;let r=tt.inflateInit2(this.strm,t.windowBits);if(r!==Fr)throw new Error(qt[r]);if(this.header=new r0,tt.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Lr.string2buf(t.dictionary):Fu.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=tt.inflateSetDictionary(this.strm,t.dictionary),r!==Fr)))throw new Error(qt[r])}Mr.prototype.push=function(e,t){let r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,f;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?n0:i0,Fu.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),a=tt.inflate(r,o),a===aa&&n&&(a=tt.inflateSetDictionary(r,n),a===Fr?a=tt.inflate(r,o):a===Mu&&(a=aa));r.avail_in>0&&a===na&&r.state.wrap>0&&e[r.next_in]!==0;)tt.inflateReset(r),a=tt.inflate(r,o);switch(a){case a0:case Mu:case aa:case s0:return this.onEnd(a),this.ended=!0,!1}if(f=r.avail_out,r.next_out&&(r.avail_out===0||a===na))if(this.options.to==="string"){let d=Lr.utf8border(r.output,r.next_out),h=r.next_out-d,u=Lr.buf2string(r.output,d);r.next_out=h,r.avail_out=i-h,h&&r.output.set(r.output.subarray(d,d+h),0),this.onData(u)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===Fr&&f===0)){if(a===na)return a=tt.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Mr.prototype.onData=function(e){this.chunks.push(e)};Mr.prototype.onEnd=function(e){e===Fr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ei.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function sa(e,t){let r=new Mr(t);if(r.push(e),r.err)throw r.msg||qt[r.err];return r.result}function o0(e,t){return t=t||{},t.raw=!0,sa(e,t)}var u0=Mr,l0=sa,h0=o0,f0=sa,c0=Cr,p0={Inflate:u0,inflate:l0,inflateRaw:h0,ungzip:f0,constants:c0};var{Inflate:d0,inflate:bg,inflateRaw:mg,ungzip:_g}=p0;var Du=d0;var Dr=[137,80,78,71,13,10,26,10],Uu=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t=t>>>1;Uu[e]=t}var Bu=4294967295;function g0(e,t,r){let i=e;for(let n=0;n>>8;return i}function oa(e,t){return(g0(Bu,e,t)^Bu)>>>0}var rt;(function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.GREYSCALE=0]="GREYSCALE",e[e.TRUECOLOUR=2]="TRUECOLOUR",e[e.INDEXED_COLOUR=3]="INDEXED_COLOUR",e[e.GREYSCALE_ALPHA=4]="GREYSCALE_ALPHA",e[e.TRUECOLOUR_ALPHA=6]="TRUECOLOUR_ALPHA"})(rt||(rt={}));var Xt;(function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.DEFLATE=0]="DEFLATE"})(Xt||(Xt={}));var Qt;(function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.ADAPTIVE=0]="ADAPTIVE"})(Qt||(Qt={}));var Jt;(function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.NO_INTERLACE=0]="NO_INTERLACE",e[e.ADAM7=1]="ADAM7"})(Jt||(Jt={}));var v0=new Uint8Array(0),b0="\0",m0=new Uint16Array([255]),_0=new Uint8Array(m0.buffer),x0=_0[0]===255,Ri=class extends Gt{constructor(t,r={}){super(t);let{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new Du,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._end=!1,this._hasPalette=!1,this._palette=[],this._compressionMethod=Xt.UNKNOWN,this._filterMethod=Qt.UNKNOWN,this._interlaceMethod=Jt.UNKNOWN,this._colorType=-1,this.setBigEndian()}decode(){for(this.decodeSignature();!this._end;)this.decodeChunk();return this.decodeImage(),this._png}decodeSignature(){for(let t=0;tthis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let r=0;for(;r>1)&255}else{for(;a>1)&255;for(;a>1)&255}}function S0(e,t,r,i,n){let a=0;if(r.length===0){for(;a>8&255}function I0(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var $u;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})($u||($u={}));function Vu(e,t){return new Ri(e,t).decode()}var Pi=ts(zu());function ha(e){if(e<0||e>65536)throw new Error("Palettes cannot have more than 2^16 (65536) colors.")}function Li(e){return e.colors instanceof Uint32Array}function fa(e){return e._rgb instanceof Array}var $e=class{constructor(t){if(typeof t=="number")ha(t),this.colors=new Uint32Array(t);else if(t instanceof Uint32Array)this.colors=new Uint32Array(t);else if(Mt(t))this.colors=new Uint32Array(t.map(Ee));else throw new Error("Invalid Palette constructor")}get(t){return this.colors[t]}chromas(){return Array.from(this.colors).map(t=>Oi(t&16777215))}},N0=Pi.default;function Oi(e){return typeof e=="number"?(0,Pi.default)(qr(e&16777215)):(0,Pi.default)(e)}function Ee(e,t,r){return er(e,t,r,255)|4278190080}function er(e,t,r,i){if(fa(e))return er(e._rgb[0],e._rgb[1],e._rgb[2],e._rgb[3]);if(typeof e=="number"){let n=e;return typeof t=="number"&&typeof r=="number"?(n&255)<<0|(t&255)<<8|(r&255)<<16|(i&255)<<24:e}if(typeof e!="string"&&Mt(e)&&typeof e[0]=="number"){let n=e,a=0;return a|=(n[0]&255)<<0,a|=(n[1]&255)<<8,a|=(n[2]&255)<<16,a|=(n[3]&255)<<24,a}return er(Oi(e).rgb())}var Fi;(function(d){function e(h,u){if(ha(u),typeof h=="function"){if(!u)throw new Error("You must also pass the number of colors to generate.");for(var b=new $e(u),x=0;x{let b=255*u/(h-1);return Ee(b,b,b)},h)}d.greys=n;function a(h){switch(h){case 2:return t();case 4:return r();case 8:return i();default:return f(h)}}d.colors=a;function o(h){return ha(h),new $e(N0.cubehelix().scale().colors(h))}d.helix=o;function f(h,u){return u=u||204559,e(b=>Ee(b*u),h)}d.factors=f})(Fi||(Fi={}));var Hu=new rs,Gu,vt={},zg=new Map;var ca;(function(n){function e(a,o){if(a==null)return a;let f=vt&&vt[o];return f&&a.$$setstate?a.$$setstate(f):f&&Object.assign(a,f),a}n.load=e;function t(a,o){return vt&&a&&a.$$getstate&&(vt[o]=a.$$getstate()),a}n.save=t;function r(a){return vt&&vt[a]}n.get=r;function i(a,o){vt&&(vt[a]=o)}n.set=i})(ca||(ca={}));function R0(e){if(e.startsWith("https://github.com/")){let t=e.split("/");if(t[5]==="blob")return`https://raw.githubusercontent.com/${t[3]}/${t[4]}/${t.slice(6).join("/")}`}return e}function P0(e,t){var r=new XMLHttpRequest;if(r.responseType=t==="text"?"text":"arraybuffer",r.open("GET",e,!1),r.send(null),r.response!=null&&r.status==200)return t==="text"?r.response:new Uint8Array(r.response);throw new Error(`The resource at "${e}" responded with status code of ${r.status}.`)}function L0(e,t){if(e.startsWith("http:")||e.startsWith("https:"))return P0(e,t);if(Gu)return Gu.getFileData(e)}function Zu(e,t){e=R0(e);let r=e,i=Hu.get(r);if(i!=null)return i;if(i=L0(e,t),i==null)throw new Error(`Cannot find resource "${e}"`);if(t==="text"&&typeof i!="string")throw new Error(`Resource "${e}" is not a string`);if(t==="binary"&&!(i instanceof Uint8Array))throw new Error(`Resource "${e}" is not a binary file`);return Hu.put(r,i),i}function Wu(e){var t=Zu(e,"binary");if(t instanceof Uint8Array)return t;throw new Error(`The resource at "${e}" is not a binary file.`)}function pa(e){return Zu(e,"text").split(` `)}var da=class{constructor(t,r){this.width=t;this.height=r;this.style={}}inbounds(t,r){return t>=0&&t=0&&rthis.get(r,i)),t}crop(t,r,i,n){let a=this.blank(i,n);return a.assign((o,f)=>this.get(o+t,f+r)),a}blit(t,r,i,n,a){r|=0,i|=0,n|=0,a|=0;for(var o=0;o>u&x}}return h.palette=d,h}function n(o){let f=new Mi(o.width,o.height),d=[0,0,0,0];for(let h=0;h=0&&x.length&&(h[b]=r(x,b,u),b=-1,x=[])}for(let P of o){let C;if((C=v.exec(P))?(d[C[1]]=C[2],C[1]==="bottom"&&(u=parseInt(C[2])),C[1]==="size"&&(f=parseInt(C[2]))):(C=S.exec(P))?(w(),C[1]!=null?b=parseInt(C[1],16):C[2]!=null?b=parseInt(C[2],16):C[3]!=null&&(b=null)):(C=F.exec(P))&&x.push(C[1]),isNaN(b+u+f))throw new Error(`couldn't decode .yaff: ${JSON.stringify(P)}`)}return w(),{maxheight:f,properties:d,glyphs:h}}a.decodeyafflines=i;function n(o){let f=0,d={},h={},u=-1,b=[],x=/^([0-9a-f]+)?[:]?\s*([-#]+)/i;function v(){u>=0&&b.length&&(h[u]=r(b,u,0),f=Math.max(f,b.length),u=-1,b=[])}for(let S of o){let F;if(F=x.exec(S)){if(F[1]!=null&&(v(),u=parseInt(F[1],16),isNaN(u)))throw new Error(`couldn't decode .draw: ${JSON.stringify(S)}`);b.push(F[2])}}return v(),{maxheight:f,properties:d,glyphs:h}}a.decodedrawlines=n})(Ku||(Ku={}));var Yu;(function(h){h[h.unknown=0]="unknown",h[h.u8=1]="u8",h[h.s8=2]="s8",h[h.u16=3]="u16",h[h.s16=4]="s16",h[h.u32=5]="u32",h[h.s32=6]="s32",h[h.f32=7]="f32",h[h.f64=8]="f64"})(Yu||(Yu={}));var Xu="$$event";function Qu(e){return!!e.$$interact}var Qg=rl(),il="$$consname";var nl=100,B0=1;function tr(e,t,r,i){let n=e.$$interact,a=Ft({interactid:n.interactid,type:t},i);if(r instanceof PointerEvent){let o=r.target,f=o.getBoundingClientRect(),d=o.width/f.width,h=o.height/f.height,u=(r.clientX-f.left)*d,b=(r.clientY-f.top)*h;a.x=Math.floor(u),a.y=Math.floor(b)}else console.log("Unknown event type",r);jr.updateDataItems([{key:Xu,value:a}])}var ba=class extends Le{render(t,r,i){let n=this.props.rgbavalue&16777215,a=qr(n);var o=`#${sr(a,6)}`,f=n&32768?"#222":"#ddd",d=sr(n&16777215,6);return ae("div",{class:"scripting-item scripting-color",style:`background-color: ${o}; color: ${f}`,alt:o},[])}},al=class extends Le{constructor(t){super(t);this.ref=un();this.pressed=!1}render(t,r,i){let n={class:"scripting-item",ref:this.ref,width:this.props.width,height:this.props.height,style:this.props.bitmap.style},a=this.props.bitmap;return Qu(a)?ae("canvas",Ft({onPointerMove:o=>{tr(a,"move",o,{pressed:this.pressed})},onPointerDown:o=>{this.pressed=!0,this.canvas.setPointerCapture(o.pointerId),tr(a,"down",o,{pressed:!0})},onPointerUp:o=>{this.pressed=!1,tr(a,"up",o,{pressed:!1})},onPointerOut:o=>{this.pressed=!1,tr(a,"out",o,{pressed:!1})}},n)):ae("canvas",n)}componentDidMount(){this.refresh()}componentWillUnmount(){this.canvas=null,this.imageData=null,this.datau32=null}componentDidUpdate(t,r,i){this.refresh()}prepare(){this.canvas=this.base,this.ctx=this.canvas.getContext("2d"),this.imageData=this.ctx.createImageData(this.canvas.width,this.canvas.height),this.datau32=new Uint32Array(this.imageData.data.buffer)}refresh(){(this.canvas!==this.base||this.imageData.width!=this.props.width||this.imageData.height!=this.props.height)&&this.prepare(),this.updateCanvas(this.datau32,this.props.bitmap),this.ctx.putImageData(this.imageData,0,0)}updateCanvas(t,r){r.palette&&this.updateCanvasIndexed(t,r),r.rgba&&this.updateCanvasRGBA(t,r)}updateCanvasRGBA(t,r){t.set(r.rgba)}updateCanvasIndexed(t,r){let i=r.palette.colors;for(var n=0;nthis.toggleExpand():null},[o!=null?ae("span",{class:"tree-key"},[o,n]):null,ae("span",{class:"tree-value scripting-item"},[ol(this.props.object)])]),this.state.expanded?W0(this.props.object,this.props.objpath):null])}toggleExpand(){this.setState({expanded:!this.state.expanded})}};function ol(e){if(typeof e=="object")try{var t=e[il]||Object.getPrototypeOf(e).constructor.name;return e.length>0&&(t+=`[${e.length}]`),t}catch(r){return console.log(r),r+""}else return $0(e)}function $0(e){var t="";return e&&e.$$&&typeof e.$$=="function"&&this._content!=null&&(e=e.$$()),e==null?t=e+"":typeof e=="number"?e!=(e|0)?t=e.toString():t=e+" ($"+sr(e)+")":typeof e=="string"?t=e:t=JSON.stringify(e),t.length>nl&&(t=t.substring(0,nl)+"..."),t}function V0(e){return e.bpp&&e.pixels&&e.palette}function z0(e){return e.rgba instanceof Uint32Array}function H0(e){return Li(e)?new $e(e.colors).chromas():Mt(e)?Array.from(e):e!=null?[e]:[]}function G0(e,t){return Li(e)?Oi(e.colors[t]):Mt(e)?e[t]:e!=null?e:null}function rr(e,t,r){if(t&&t.startsWith("$")){if(t.startsWith("$$")||e==null)return;t=null}if(e==null)return ae("span",{},e+"");if(e.uitype){let i=q0[e.uitype];if(!i)throw new Error(`Unknown UI component type: ${e.uitype}`);return ae(i,{iokey:r,uiobject:e})}else{if(e.literaltext)return ae("pre",{},[e.literaltext]);if(V0(e)||z0(e))return ae(al,{bitmap:e,width:e.width,height:e.height});if(fa(e))return ae(ba,{rgbavalue:Ee(e)});if(Li(e))if(e.colors.length<=256){let i=[],n={class:"",key:`${r}__obj`};return n.class+=" scripting-flex ",e.colors.forEach(a=>{i.push(ae(ba,{rgbavalue:a}))}),ae("div",n,i)}else{let{a:i,b:n}=on(e.colors.length,1,1,B0);return rr({rgba:e.colors,width:i,height:n},t,r)}else return ae(sl,{name:t,object:e,objpath:r},[])}}function Z0(e,t,r){let i=256;if(e.length<=i){let a=ns(e,0,e.length);return ae("pre",{},a)}else{let a=[];for(var n=0;nrr(a[1],a[0],`${t}.${a[1]}`));return ae("div",{class:"scripting-flex"},n)}var ul=class extends Le{render(t,r,i){let n=this.props.uiobject;return ae("div",{},[this.props.iokey,ae("input",{type:"range",min:n.min/n.step,max:n.max/n.step,value:n.value/n.step,onInput:a=>{let o={value:parseFloat(a.target.value)*n.step};this.setState(this.state),jr.updateDataItems([{key:this.props.iokey,value:o}])}}),ae("span",{},ol(n.value))])}},ll=class extends Le{constructor(){super(...arguments);this.ref=un()}render(t,r,i){let n=this.props.uiobject,a=H0(n.options);this.props.dropdown=a.length>16;let o=!this.props.dropdown||this.state.expanded,f=null;if(o&&(f=ae("div",{class:"scripting-select scripting-flex",ref:this.ref,onClick:d=>{let h=d.target;for(;h.parentElement&&h.parentElement!=this.ref.current;)h=h.parentElement;if(h.parentElement){let u=Array.from(h.parentElement.children).indexOf(h);if(u>=0&&u{let u=rr(d,null,`${this.props.iokey}__select_${h}`),b=h==n.index;return ae("div",{class:b?"scripting-selected":""},[u])}))),this.props.dropdown){let d=rr(G0(n.options,n.index),null,`${this.props.iokey}__selected`);return ae("div",{class:"tree-content",key:`${this.props.iokey}__tree`},[ae("div",{class:"tree-header "+(this.state.expanded?"tree-expanded":"tree-collapsed"),onClick:()=>this.toggleExpand()},[this.props.iokey,ae("span",{class:"tree-value scripting-item"},[d])]),f])}else return f}toggleExpand(){this.setState({expanded:!this.state.expanded})}},hl=class extends Le{render(t,r,i){let n=this.props.uiobject;return ae("button",{class:n.enabled?"scripting-button scripting-enabled":"scripting-button",onClick:a=>{tr(n,"click",a,{})}},[n.label])}},fl=class extends Le{render(t,r,i){let n=this.props.uiobject;return ae("div",{onKeyDown:a=>{tr(n,"key",a,{})}},[])}},q0={slider:ul,select:ll,button:hl,shortcut:fl},ma=class{constructor(t,r){this.maindoc=t;this.maindiv=r;r.classList.add("vertical-scroll")}updateCells(t){let r=t.map(i=>ae("div",{class:"scripting-cell",key:`${i.id}__cell`},[rr(i.object,i.id,i.id)]));ys(r,this.maindiv)}};var cl=class{constructor(t){this.mainElement=t,this.notebook=new ma(document,t)}start(){}reset(){}pause(){}resume(){}loadROM(t,r){this.notebook.updateCells(r.cells)}isRunning(){return!0}isDebugging(){return!1}getToolForFilename(t){return"js"}getDefaultExtension(){return".js"}getPresets(){return[]}};is.script=cl; /*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */ /** * chroma.js - JavaScript library for color conversions * * Copyright (c) 2011-2019, Gregor Aisch * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name Gregor Aisch may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ------------------------------------------------------- * * chroma.js includes colors from colorbrewer2.org, which are released under * the following license: * * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, * and The Pennsylvania State University. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. * * ------------------------------------------------------ * * Named colors are taken from X11 Color Names. * http://www.w3.org/TR/css3-color/#svg-color * * @preserve */ //# sourceMappingURL=script-B7KQC3KR.js.map