diff --git a/deps/speedscope/index.html b/deps/speedscope/index.html index 304842d7..38807b2a 100644 --- a/deps/speedscope/index.html +++ b/deps/speedscope/index.html @@ -11,7 +11,7 @@
- + diff --git a/deps/speedscope/release.txt b/deps/speedscope/release.txt index f5f89340..4b98eb00 100644 --- a/deps/speedscope/release.txt +++ b/deps/speedscope/release.txt @@ -1,3 +1,3 @@ -speedscope@1.21.2 -Wed Jan 15 14:56:30 PST 2025 -c04a148518425e8334e24542bb8ec34e299d9e07 +speedscope@1.22.0 +Thu Jan 16 16:49:47 PST 2025 +bd7b44a0a7d63375ee6ea0a0d1b96e65a456642f diff --git a/deps/speedscope/speedscope-CAEVGCWN.js b/deps/speedscope/speedscope-CAEVGCWN.js new file mode 100644 index 00000000..398c7f78 --- /dev/null +++ b/deps/speedscope/speedscope-CAEVGCWN.js @@ -0,0 +1,189 @@ +"use strict";(()=>{var nf=Object.create;var Zo=Object.defineProperty;var rf=Object.getOwnPropertyDescriptor;var af=Object.getOwnPropertyNames;var of=Object.getPrototypeOf,lf=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),wA=(t,e)=>{for(var n in e)Zo(t,n,{get:e[n],enumerable:!0})},Af=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of af(e))!lf.call(t,r)&&r!==n&&Zo(t,r,{get:()=>e[r],enumerable:!(a=rf(e,r))||a.enumerable});return t};var _e=(t,e,n)=>(n=t!=null?nf(of(t)):{},Af(e||!t||!t.__esModule?Zo(n,"default",{value:t,enumerable:!0}):n,t));function te(t){return t[t.length-1]||null}function Ue(t,e){function n(a,r){let o=e(a),i=e(r);return oi?1:0}t.sort(n)}function xe(t,e,n){return t.has(e)||t.set(e,n(e)),t.get(e)}function sa(t,e,n){return t.has(e)?t.get(e):n(e)}function Ze(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*MA(t,e){for(let n of t)yield e(n)}function JA(t,e){for(let n of t)e(n)}function rn(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function jt(t){let e=`${t.toFixed(0)}%`;return t===100?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function uf(t){return t-Math.floor(t)}function ca(t){return 2*Math.abs(uf(t)-.5)-1}function UA(t,e,n,a,r=1){for(console.assert(!isNaN(r)&&!isNaN(a));;){if(e-t<=r)return[t,e];let o=(e+t)/2;n(o){let a;return e==null?(a=t(n),e={args:n,result:a},a):(Ir(e.args,n)||(e.args=n,e.result=t(n)),e.result)}}function Un(t){let e=null;return n=>{let a;return e==null?(a=t(n),e={args:n,result:a},a):(e.args===n||(e.args=n,e.result=t(n)),e.result)}}function ff(t){let e=null;return()=>(e==null&&(e={result:t()}),e.result)}function PA(t){let e=pf();if(t.length%4!==0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);let n=t.length/4,a;t.length>=4&&t.charAt(t.length-1)==="="?t.charAt(t.length-2)==="="?a=n*3-2:a=n*3-1:a=n*3;let r=new Uint8Array(a),o=0;for(let i=0;i2;)M[i++]=S[L++],M[i++]=S[L++],M[i++]=S[L++],Q-=3;Q&&(M[i++]=S[L++],Q>1&&(M[i++]=S[L++]))}else{L=i-N;do M[i++]=M[L++],M[i++]=M[L++],M[i++]=M[L++],Q-=3;while(Q>2);Q&&(M[i++]=M[L++],Q>1&&(M[i++]=M[L++]))}}else if(v&64){e.msg="invalid distance code",a.mode=Do;break e}else{E=p[(E&65535)+(I&(1<>3,r-=Q,u-=Q<<3,I&=(1<{"use strict";var Ag=qt(),_r=15,sg=852,cg=592,_g=0,Ll=1,hg=2,by=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],xy=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Sy=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Ny=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];gg.exports=function(e,n,a,r,o,i,l,s){var A=s.bits,c=0,_=0,h=0,f=0,I=0,u=0,g=0,p=0,C=0,y=0,E,v,Q,N,L,S=null,w=0,M,se=new Ag.Buf16(_r+1),pn=new Ag.Buf16(_r+1),Lt=null,tn=0,nn,vt,Tt;for(c=0;c<=_r;c++)se[c]=0;for(_=0;_ =1&&se[f]===0;f--);if(I>f&&(I=f),f===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h 0&&(e===_g||f!==1))return-1;for(pn[1]=0,c=1;c<_r;c++)pn[c+1]=pn[c]+se[c];for(_=0;_ sg||e===hg&&C>cg)return 1;for(;;){nn=c-g,l[_] M?(vt=Lt[tn+l[_]],Tt=S[w+l[_]]):(vt=96,Tt=0),E=1< >g)+v]=nn<<24|vt<<16|Tt|0;while(v!==0);for(E=1< >=1;if(E!==0?(y&=E-1,y+=E):y=0,_++,--se[c]===0){if(c===f)break;c=n[a+l[_]]}if(c>I&&(y&N)!==Q){for(g===0&&(g=I),L+=h,u=c-g,p=1<sg||e===hg&&C>cg)return 1;Q=y&N,o[Q]=I<<24|u<<16|L-i|0}}return y!==0&&(o[L+y]=c-g<<24|64<<16|0),s.bits=I,0}});var Wg=x(Ct=>{"use strict";var tt=qt(),Kl=Bl(),Rt=jl(),ky=lg(),Vr=dg(),Dy=0,Jg=1,Ug=2,ug=4,Ry=5,Ro=6,Dn=0,Fy=1,Ly=2,ct=-2,Kg=-3,Pl=-4,Ty=-5,fg=8,Pg=1,pg=2,Cg=3,mg=4,Ig=5,yg=6,vg=7,Eg=8,Bg=9,jg=10,To=11,Xt=12,Tl=13,Qg=14,Hl=15,wg=16,bg=17,xg=18,Sg=19,Fo=20,Lo=21,Ng=22,kg=23,Dg=24,Rg=25,Fg=26,Ml=27,Lg=28,Tg=29,Ae=30,Ol=31,Hy=32,My=852,Jy=592,Uy=15,Ky=Uy;function Hg(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function Py(){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 tt.Buf16(320),this.work=new tt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Og(t){var e;return!t||!t.state?ct:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Pg,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new tt.Buf32(My),e.distcode=e.distdyn=new tt.Buf32(Jy),e.sane=1,e.back=-1,Dn)}function Gg(t){var e;return!t||!t.state?ct:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Og(t))}function zg(t,e){var n,a;return!t||!t.state||(a=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?ct:(a.window!==null&&a.wbits!==e&&(a.window=null),a.wrap=n,a.wbits=e,Gg(t))}function Vg(t,e){var n,a;return t?(a=new Py,t.state=a,a.window=null,n=zg(t,e),n!==Dn&&(t.state=null),n):ct}function Oy(t){return Vg(t,Ky)}var Mg=!0,Jl,Ul;function Gy(t){if(Mg){var e;for(Jl=new tt.Buf32(512),Ul=new tt.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Vr(Jg,t.lens,0,288,Jl,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Vr(Ug,t.lens,0,32,Ul,0,t.work,{bits:5}),Mg=!1}t.lencode=Jl,t.lenbits=9,t.distcode=Ul,t.distbits=5}function Yg(t,e,n,a){var r,o=t.state;return o.window===null&&(o.wsize=1< =o.wsize?(tt.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>a&&(r=a),tt.arraySet(o.window,e,n-a,r,o.wnext),a-=r,a?(tt.arraySet(o.window,e,n-a,a,0),o.wnext=a,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave >>8&255,n.check=Rt(n.check,S,2,0),A=0,c=0,n.mode=pg;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((A&255)<<8)+(A>>8))%31){t.msg="incorrect header check",n.mode=Ae;break}if((A&15)!==fg){t.msg="unknown compression method",n.mode=Ae;break}if(A>>>=4,c-=4,N=(A&15)+8,n.wbits===0)n.wbits=N;else if(N>n.wbits){t.msg="invalid window size",n.mode=Ae;break}n.dmax=1< >8&1),n.flags&512&&(S[0]=A&255,S[1]=A>>>8&255,n.check=Rt(n.check,S,2,0)),A=0,c=0,n.mode=Cg;case Cg:for(;c<32;){if(l===0)break e;l--,A+=a[o++]< >>8&255,S[2]=A>>>16&255,S[3]=A>>>24&255,n.check=Rt(n.check,S,4,0)),A=0,c=0,n.mode=mg;case mg:for(;c<16;){if(l===0)break e;l--,A+=a[o++]< >8),n.flags&512&&(S[0]=A&255,S[1]=A>>>8&255,n.check=Rt(n.check,S,2,0)),A=0,c=0,n.mode=Ig;case Ig:if(n.flags&1024){for(;c<16;){if(l===0)break e;l--,A+=a[o++]< >>8&255,n.check=Rt(n.check,S,2,0)),A=0,c=0}else n.head&&(n.head.extra=null);n.mode=yg;case yg:if(n.flags&1024&&(f=n.length,f>l&&(f=l),f&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),tt.arraySet(n.head.extra,a,o,f,N)),n.flags&512&&(n.check=Rt(n.check,a,f,o)),l-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=vg;case vg:if(n.flags&2048){if(l===0)break e;f=0;do N=a[o+f++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N));while(N&&f >9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Xt;break;case jg:for(;c<32;){if(l===0)break e;l--,A+=a[o++]< >>=c&7,c-=c&7,n.mode=Ml;break}for(;c<3;){if(l===0)break e;l--,A+=a[o++]< >>=1,c-=1,A&3){case 0:n.mode=Qg;break;case 1:if(Gy(n),n.mode=Fo,e===Ro){A>>>=2,c-=2;break e}break;case 2:n.mode=bg;break;case 3:t.msg="invalid block type",n.mode=Ae}A>>>=2,c-=2;break;case Qg:for(A>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,A+=a[o++]< >>16^65535)){t.msg="invalid stored block lengths",n.mode=Ae;break}if(n.length=A&65535,A=0,c=0,n.mode=Hl,e===Ro)break e;case Hl:n.mode=wg;case wg:if(f=n.length,f){if(f>l&&(f=l),f>s&&(f=s),f===0)break e;tt.arraySet(r,a,o,f,i),l-=f,o+=f,s-=f,i+=f,n.length-=f;break}n.mode=Xt;break;case bg:for(;c<14;){if(l===0)break e;l--,A+=a[o++]< >>=5,c-=5,n.ndist=(A&31)+1,A>>>=5,c-=5,n.ncode=(A&15)+4,A>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=Ae;break}n.have=0,n.mode=xg;case xg:for(;n.have >>=3,c-=3}for(;n.have<19;)n.lens[se[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,w={bits:n.lenbits},L=Vr(Dy,n.lens,0,19,n.lencode,0,n.work,w),n.lenbits=w.bits,L){t.msg="invalid code lengths set",n.mode=Ae;break}n.have=0,n.mode=Sg;case Sg:for(;n.have >>24,C=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]< >>=p,c-=p,n.lens[n.have++]=y;else{if(y===16){for(M=p+2;c >>=p,c-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=Ae;break}N=n.lens[n.have-1],f=3+(A&3),A>>>=2,c-=2}else if(y===17){for(M=p+3;c >>=p,c-=p,N=0,f=3+(A&7),A>>>=3,c-=3}else{for(M=p+7;c >>=p,c-=p,N=0,f=11+(A&127),A>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=Ae;break}for(;f--;)n.lens[n.have++]=N}}if(n.mode===Ae)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=Ae;break}if(n.lenbits=9,w={bits:n.lenbits},L=Vr(Jg,n.lens,0,n.nlen,n.lencode,0,n.work,w),n.lenbits=w.bits,L){t.msg="invalid literal/lengths set",n.mode=Ae;break}if(n.distbits=6,n.distcode=n.distdyn,w={bits:n.distbits},L=Vr(Ug,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,w),n.distbits=w.bits,L){t.msg="invalid distances set",n.mode=Ae;break}if(n.mode=Fo,e===Ro)break e;case Fo:n.mode=Lo;case Lo:if(l>=6&&s>=258){t.next_out=i,t.avail_out=s,t.next_in=o,t.avail_in=l,n.hold=A,n.bits=c,ky(t,h),i=t.next_out,r=t.output,s=t.avail_out,o=t.next_in,a=t.input,l=t.avail_in,A=n.hold,c=n.bits,n.mode===Xt&&(n.back=-1);break}for(n.back=0;g=n.lencode[A&(1< >>24,C=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]< >E)],p=g>>>24,C=g>>>16&255,y=g&65535,!(E+p<=c);){if(l===0)break e;l--,A+=a[o++]< >>=E,c-=E,n.back+=E}if(A>>>=p,c-=p,n.back+=p,n.length=y,C===0){n.mode=Fg;break}if(C&32){n.back=-1,n.mode=Xt;break}if(C&64){t.msg="invalid literal/length code",n.mode=Ae;break}n.extra=C&15,n.mode=Ng;case Ng:if(n.extra){for(M=n.extra;c >>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=kg;case kg:for(;g=n.distcode[A&(1< >>24,C=g>>>16&255,y=g&65535,!(p<=c);){if(l===0)break e;l--,A+=a[o++]< >E)],p=g>>>24,C=g>>>16&255,y=g&65535,!(E+p<=c);){if(l===0)break e;l--,A+=a[o++]< >>=E,c-=E,n.back+=E}if(A>>>=p,c-=p,n.back+=p,C&64){t.msg="invalid distance code",n.mode=Ae;break}n.offset=y,n.extra=C&15,n.mode=Dg;case Dg:if(n.extra){for(M=n.extra;c >>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=Ae;break}n.mode=Rg;case Rg:if(s===0)break e;if(f=h-s,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=Ae;break}f>n.wnext?(f-=n.wnext,I=n.wsize-f):I=n.wnext-f,f>n.length&&(f=n.length),u=n.window}else u=r,I=i-n.offset,f=n.length;f>s&&(f=s),s-=f,n.length-=f;do r[i++]=u[I++];while(--f);n.length===0&&(n.mode=Lo);break;case Fg:if(s===0)break e;r[i++]=n.length,s--,n.mode=Lo;break;case Ml:if(n.wrap){for(;c<32;){if(l===0)break e;l--,A|=a[o++]< {"use strict";qg.exports={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_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}});var Zg=x((bx,$g)=>{"use strict";function qy(){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}$g.exports=qy});var td=x(qr=>{"use strict";var Yr=Wg(),Wr=qt(),Ho=Sl(),ye=Gl(),ed=jo(),$y=Nl(),Zy=Zg(),Xg=Object.prototype.toString;function Rn(t){if(!(this instanceof Rn))return new Rn(t);this.options=Wr.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $y,this.strm.avail_out=0;var n=Yr.inflateInit2(this.strm,e.windowBits);if(n!==ye.Z_OK)throw new Error(ed[n]);this.header=new Zy,Yr.inflateGetHeader(this.strm,this.header)}Rn.prototype.push=function(t,e){var n=this.strm,a=this.options.chunkSize,r=this.options.dictionary,o,i,l,s,A,c,_=!1;if(this.ended)return!1;i=e===~~e?e:e===!0?ye.Z_FINISH:ye.Z_NO_FLUSH,typeof t=="string"?n.input=Ho.binstring2buf(t):Xg.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Wr.Buf8(a),n.next_out=0,n.avail_out=a),o=Yr.inflate(n,ye.Z_NO_FLUSH),o===ye.Z_NEED_DICT&&r&&(typeof r=="string"?c=Ho.string2buf(r):Xg.call(r)==="[object ArrayBuffer]"?c=new Uint8Array(r):c=r,o=Yr.inflateSetDictionary(this.strm,c)),o===ye.Z_BUF_ERROR&&_===!0&&(o=ye.Z_OK,_=!1),o!==ye.Z_STREAM_END&&o!==ye.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===ye.Z_STREAM_END||n.avail_in===0&&(i===ye.Z_FINISH||i===ye.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=Ho.utf8border(n.output,n.next_out),s=n.next_out-l,A=Ho.buf2string(n.output,l),n.next_out=s,n.avail_out=a-s,s&&Wr.arraySet(n.output,n.output,l,s,0),this.onData(A)):this.onData(Wr.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(_=!0)}while((n.avail_in>0||n.avail_out===0)&&o!==ye.Z_STREAM_END);return o===ye.Z_STREAM_END&&(i=ye.Z_FINISH),i===ye.Z_FINISH?(o=Yr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ye.Z_OK):(i===ye.Z_SYNC_FLUSH&&(this.onEnd(ye.Z_OK),n.avail_out=0),!0)};Rn.prototype.onData=function(t){this.chunks.push(t)};Rn.prototype.onEnd=function(t){t===ye.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Wr.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function zl(t,e){var n=new Rn(e);if(n.push(t,!0),n.err)throw n.msg||ed[n.err];return n.result}function Xy(t,e){return e=e||{},e.raw=!0,zl(t,e)}qr.Inflate=Rn;qr.inflate=zl;qr.inflateRaw=Xy;qr.ungzip=zl});var ad=x((Sx,rd)=>{"use strict";var ev=qt().assign,tv=og(),nv=td(),rv=Gl(),nd={};ev(nd,tv,nv,rv);rd.exports=nd});var od=x(Mo=>{(function(t){var e=String.fromCharCode;function n(a,r,o){for(var i=a[r],l=1,s=0,A=0;A =32&&i<=126?"Unexpected character "+e(i)+" in JSON at position "+r+" (line "+l+", column "+s+")":"Unexpected byte 0x"+i.toString(16)+" in JSON at position "+r+" (line "+l+", column "+s+")"))}t.JSON_parse=function(a){if(!(a instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var r=[],o=[],i=[],l=a.length,s=null,A=0,c,_=0;_ =l&&n(a,l),h=a[_++],h!==34;)if(h===92)switch(a[_++]){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=` +`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:{for(var u=0,g=0;g<4;g++)h=a[_++],u<<=4,h>=48&&h<=57?u|=h-48:h>=97&&h<=102?u|=h+-87:h>=65&&h<=70?u|=h+-55:n(a,--_);f+=e(u);break}default:n(a,--_);break}else if(h<=127)f+=e(h);else if((h&224)===192)f+=e((h&31)<<6|a[_++]&63);else if((h&240)===224)f+=e((h&15)<<12|(a[_++]&63)<<6|a[_++]&63);else if((h&248)==240){var p=(h&7)<<18|(a[_++]&63)<<12|(a[_++]&63)<<6|a[_++]&63;p>65535&&(p-=65536,f+=e(p>>10&1023|55296),p=56320|p&1023),f+=e(p)}f[0];break}case 91:{f=[],r.push(s),o.push(c),i.push(A),s=null,c=f,A=1;continue}case 123:{f={},r.push(s),o.push(c),i.push(A),s=null,c=f,A=2;continue}case 93:{A!==1&&n(a,--_),f=c,s=r.pop(),c=o.pop(),A=i.pop();break}case 125:{A!==2&&n(a,--_),f=c,s=r.pop(),c=o.pop(),A=i.pop();break}default:n(a,--_)}for(h=a[_];h<=32;)h=a[++_];switch(A){case 0:{if(_===l)return f;break}case 1:{if(c.push(f),h===44){_++;continue}if(h===93)continue;break}case 2:{if(s===null){if(s=f,h===58){_++;continue}}else{if(c[s]=f,s=null,h===44){_++;continue}if(h===125)continue}break}}break}}n(a,_)}})(Mo)});function Ad(t){return t=t.trim(),t[0]==="["&&(t=t.replace(/,\s*$/,""),t[t.length-1]!=="]"&&(t+="]")),JSON.parse(t)}function av(t){let e=0;for(let n=0;n 0&&/\s/.exec(String.fromCharCode(t[n-1]));)n--;if(String.fromCharCode(t[n-1])===","&&n--,String.fromCharCode(t[n-1])!=="]"){let a=new Uint8Array(n+1);a.set(t.subarray(0,n)),a[n]=93,t=a}}return(0,ld.JSON_parse)(t)}var id,ld,Jo,Vl,Yl,Uo,en,Wl=ie(()=>{"use strict";id=_e(ad()),ld=_e(od()),Jo=1<<27;Vl=class{constructor(e){this.chunks=[];let n=this.byteArray=new Uint8Array(e),a="utf-8";if(n.length>2&&(n[0]===255&&n[1]===254?a="utf-16le":n[0]===254&&n[1]===255&&(a="utf-16be")),typeof TextDecoder<"u"){let r=new TextDecoder(a);for(let o=0;o =Jo&&this.chunks.push("")}}splitLines(){let e=function*(){let n="";for(let a of this.chunks){let r=a.split(` +`);for(let o=0;o {try{return id.inflate(new Uint8Array(a)).buffer}catch{return a}})}async name(){return await this.namePromise}async readAsArrayBuffer(){return await this.uncompressedData}async readAsText(){let e=await this.readAsArrayBuffer();return new Vl(e)}static fromFile(e){let n=new Promise(a=>{let r=new FileReader;r.addEventListener("loadend",()=>{if(!(r.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");a(r.result)}),r.readAsArrayBuffer(e)});return new t(Promise.resolve(e.name),n)}static fromArrayBuffer(e,n){return new t(Promise.resolve(e),Promise.resolve(n))}}});function ov(t){let e=[...t.splitLines()].map(o=>o.split(" ")),n=e.shift();if(!n)return[];let a=new Map;for(let o=0;o 0;){let i=a.pop();r=Math.max(r,i.endValue),e.leaveFrame(i,r)}return"Bytes Used"in n[0]?e.setValueFormatter(new ze):("Weight"in n[0]||"Running Time"in n[0])&&e.setValueFormatter(new ee("milliseconds")),e.build()}async function cd(t){let e={name:t.name,files:new Map,subdirectories:new Map},n=await new Promise((a,r)=>{t.createReader().readEntries(o=>{a(o)},r)});for(let a of n)if(a.isDirectory){let r=await cd(a);e.subdirectories.set(r.name,r)}else{let r=await new Promise((o,i)=>{a.file(o,i)});e.files.set(r.name,r)}return e}function Ko(t){return en.fromFile(t).readAsArrayBuffer()}function lv(t){return en.fromFile(t).readAsText()}function Av(t,e){let n=Ze(t.subdirectories,"corespace"),a=Ze(n.subdirectories,`run${e}`);return Ze(a.subdirectories,"core")}async function sv(t){let e=Ze(t.subdirectories,"stores");for(let n of e.subdirectories.values()){let a=n.files.get("schema.xml");if(!a)continue;let r=await lv(a);if(!/name="time-profile"/.exec(r.firstChunk()))continue;let o=new $r(await Ko(Ze(n.files,"bulkstore")));o.readUint32(),o.readUint32(),o.readUint32();let i=o.readUint32(),l=o.readUint32();o.seek(i);let s=[];for(;;){let A=o.readUint48();if(A===0)break;let c=o.readUint32();o.skip(l-6-4-4);let _=o.readUint32();s.push({timestamp:A,threadID:c,backtraceID:_})}return s}throw new Error("Could not find sample list")}async function cv(t,e){let n=Ze(e.subdirectories,"uniquing"),a=Ze(n.subdirectories,"arrayUniquer"),r=Ze(a.files,"integeruniquer.index"),o=Ze(a.files,"integeruniquer.data"),i=new $r(await Ko(r)),l=new $r(await Ko(o));i.seek(32);let s=[];for(;i.hasMore();){let A=i.readUint32()+i.readUint32()*1048576;if(A===0)continue;l.seek(A);let c=l.readUint32(),_=[];for(;c--;)_.push(l.readUint64());s.push(_)}return s}async function _v(t){let e=Ze(t.files,"form.template"),n=dv(await Ko(e)),a=n["com.apple.xray.owner.template.version"],r=1;"com.apple.xray.owner.template"in n&&(r=n["com.apple.xray.owner.template"].get("_selectedRunNumber"));let o=n.$1;"stubInfoByUUID"in n&&(o=Array.from(n.stubInfoByUUID.keys())[0]);let i=n["com.apple.xray.run.data"],l=[];for(let s of i.runNumbers){let A=Ze(i.runData,s),c=Ze(A,"symbolsByPid"),_=new Map;for(let h of c.values()){for(let f of h.symbols){if(!f)continue;let{sourcePath:I,symbolName:u,addressToLine:g}=f;for(let p of g.keys())xe(_,p,()=>{let C=u||`0x${rn(p.toString(16),16)}`,y={key:`${I}:${C}`,name:C};return I&&(y.file=I),y})}l.push({number:s,addressToFrameMap:_})}}return{version:a,instrument:o,selectedRunNumber:r,runs:l}}async function _d(t){let e=await cd(t),{version:n,runs:a,instrument:r,selectedRunNumber:o}=await _v(e);if(r!=="com.apple.xray.instrument-type.coresampler2")throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${r}`);console.log("version: ",n),console.log("Importing time profile");let i=[],l=0;for(let s of a){let{addressToFrameMap:A,number:c}=s,_=await hv({fileName:t.name,tree:e,addressToFrameMap:A,runNumber:c});s.number===o&&(l=i.length+_.indexToView),i.push(..._.profiles)}return{name:t.name,indexToView:l,profiles:i}}async function hv(t){let{fileName:e,tree:n,addressToFrameMap:a,runNumber:r}=t,o=Av(n,r),i=await sv(o),l=await cv(i,o),s=new Map;for(let _ of i)s.set(_.threadID,sa(s,_.threadID,()=>0)+1);let A=Array.from(s.entries());Ue(A,_=>-_[1]);let c=A.map(_=>_[0]);return{name:e,indexToView:0,profiles:c.map(_=>gv({threadID:_,fileName:e,arrays:l,addressToFrameMap:a,samples:i}))}}function gv(t){let{fileName:e,addressToFrameMap:n,arrays:a,threadID:r,samples:o}=t,i=new Map;o=o.filter(c=>c.threadID===r);let l=new le(te(o).timestamp);l.setName(`${e} - thread ${r}`);function s(c,_){let h=n.get(c);if(h)_.push(h);else if(c in a)for(let f of a[c])s(f,_);else{let f={key:c,name:`0x${rn(c.toString(16),16)}`};n.set(c,f),_.push(f)}}let A=null;for(let c of o){let _=xe(i,c.backtraceID,h=>{let f=[];return s(h,f),f.reverse(),f});if(A===null&&(l.appendSampleWithWeight([],c.timestamp),A=c.timestamp),c.timestamp{switch(r){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{let i=Object.create(null);i.symbolName=o.$0,i.sourcePath=o.$1,i.addressToLine=new Map;for(let l=3;;l+=2){let s=o["$"+l],A=o["$"+(l+1)];if(s==null||A==null)break;i.addressToLine.set(s,A)}return i}case"PFTOwnerData":{let i=Object.create(null);return i.ownerName=o.$0,i.ownerPath=o.$1,i}case"PFTPersistentSymbols":{let i=Object.create(null),l=o.$4;i.threadNames=o.$3,i.symbols=[];for(let s=1;s n){if(t.$version!==1e5||t.$archiver!=="NSKeyedArchiver"||!ql(t.$top)||!sd(t.$objects))throw new Error("Invalid keyed archive");t.$objects[0]==="$null"&&(t.$objects[0]=null);for(let a=0;a {if(a instanceof Zr)return t.$objects[a.index];if(sd(a))for(let r=0;r a){if(ql(e)&&e.$class){let a=fv(t,e.$class).$classname;switch(a){case"NSDecimalNumberPlaceholder":{let l=e["NS.length"],s=e["NS.exponent"],A=e["NS.mantissa.bo"],c=e["NS.negative"],_=new Uint16Array(new Uint8Array(e["NS.mantissa"]).buffer),h=0;for(let f=0;f >8|(I&255)<<8),h+=I*Math.pow(65536,f)}return h*=Math.pow(10,s),c?-h:h}case"NSData":case"NSMutableData":return e["NS.bytes"]||e["NS.data"];case"NSString":case"NSMutableString":return e["NS.string"]?e["NS.string"]:e["NS.bytes"]?uv(e["NS.bytes"]):(console.warn(`Unexpected ${a} format: `,e),null);case"NSArray":case"NSMutableArray":if("NS.objects"in e)return e["NS.objects"];let r=[];for(;;){let l="NS.object."+r.length;if(!(l in e))break;r.push(e[l])}return r;case"_NSKeyedCoderOldStyleArray":{let l=e["NS.count"],s=[];for(let A=0;A {"use strict";He();W();Te();Wl();$r=class{constructor(e){this.bytePos=0;this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePos this.view.byteLength?0:this.view.getUint8(this.bytePos-1)}readUint32(){return this.bytePos+=4,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-4,!0)}readUint48(){return this.bytePos+=6,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-6,!0)+this.view.getUint16(this.bytePos-2,!0)*Math.pow(2,32)}readUint64(){return this.bytePos+=8,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-8,!0)+this.view.getUint32(this.bytePos-4,!0)*Math.pow(2,32)}};Zr=class{constructor(e){this.index=e}};$l=class{constructor(e){this.view=e;this.referenceSize=0;this.objects=[];this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,n=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let a=this.view.getUint32(e+12,!1),r=this.view.getUint32(e+20,!1),o=this.view.getUint32(e+28,!1);for(let i=0;i>4){case 0:return this.parseSingleton(e,a);case 1:return this.parseInteger(e,1<({key:i,name:i})),duration:parseInt(o,10)})}return e}function Xl(t){let e=Iv(t),n=e.reduce((r,o)=>r+o.duration,0),a=new le(n);if(e.length===0)return null;for(let r of e)a.appendSampleWithWeight(r.stack,r.duration);return a.build()}var gd=ie(()=>{"use strict";He()});function dd(t){let e=t.profile,n=e.threads.length===1?e.threads[0]:e.threads.filter(l=>l.name==="GeckoMain")[0],a=new Map;function r(l){let s=l[0],A=[];for(;s!=null;){let c=n.stackTable.data[s],[_,h]=c;A.push(h),s=_}return A.reverse(),A.map(c=>{let _=n.frameTable.data[c],h=n.stringTable[_[0]],f=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(h);return!f||f[2].startsWith("resource:")||f[2]==="self-hosted"||f[2].startsWith("self-hosted:")?null:xe(a,h,()=>({key:h,name:f[1],file:f[2],line:f[3]?parseInt(f[3]):void 0,col:f[4]?parseInt(f[4])+1:void 0}))}).filter(c=>c!=null)}let o=new me(t.duration),i=[];for(let l of n.samples.data){let s=r(l),A=l[1],c=-1;for(let _=0;_ c;_--)o.leaveFrame(i[_],A);for(let _=c+1;_ {"use strict";He();W();Te()});function yv(t,e){if(!t||!t.type)return{key:"(unknown type)",name:"(unknown type)"};let n=t.name;switch(t.type){case"CPP":{let a=n.match(/[tT] ([^(<]*)/);a&&(n=`(c++) ${a[1]}`);break}case"SHARED_LIB":n="(LIB) "+n;break;case"JS":{let a=n.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(a){let r=a[2],o=parseInt(a[3],10),i=parseInt(a[4],10),l=a[1].length>0?a[1]:r?`(anonymous ${r.split("/").pop()}:${o})`:"(anonymous)";return{key:n,name:l,file:r.length>0?r:"(unknown file)",line:o,col:i}}break}case"CODE":{switch(t.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":n="(IC) "+n;break;case"BytecodeHandler":n="(bytecode) ~"+n;break;case"Stub":n="(stub) "+n;break;case"Builtin":n="(builtin) "+n;break;case"RegExp":n="(regexp) "+n;break}break}default:{n=`(${t.type}) ${n}`;break}}return{key:n,name:n}}function eA(t){let e=new le,n=new Map;function a(o){return xe(n,o,i=>{let l=t.code[i];return yv(l,t)})}let r=0;Ue(t.ticks,o=>o.tm);for(let o of t.ticks){let i=[];for(let l=o.s.length-2;l>=0;l-=2){let s=o.s[l];if(s!==-1){if(s>t.code.length){i.push({key:s,name:`0x${s.toString(16)}`});continue}i.push(a(s))}}e.appendSampleWithWeight(i,o.tm-r),r=o.tm}return e.setValueFormatter(new ee("microseconds")),e.build()}var fd=ie(()=>{"use strict";He();W();Te()});function*vv(t){let e=[];for(let n of t.splitLines())n===""?(yield pd(e),e=[]):e.push(n);e.length>0&&(yield pd(e))}function pd(t){let e=t.filter(l=>!/^\s*#/.exec(l)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},a=e.shift();if(!a)return null;let r=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(a);if(!r)return null;n.command=r[1],r[3]?(n.processID=parseInt(r[2],10),n.threadID=parseInt(r[3],10)):n.threadID=parseInt(r[2],10);let o=/\s+(\d+\.\d+):\s+/.exec(a);o&&(n.time=parseFloat(o[1]));let i=/(\S+):\s*$/.exec(a);i&&(n.eventType=i[1]);for(let l of e){let s=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(l);if(!s)continue;let[,A,c,_]=s;c=c.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${A}`,symbolName:c,file:_})}return n.stack.reverse(),n}function tA(t){let e=new Map,n=null;for(let a of vv(t)){if(a==null||n!=null&&n!=a.eventType||a.time==null)continue;n=a.eventType;let r=[];a.command&&r.push(a.command),a.processID&&r.push(`pid: ${a.processID}`),a.threadID&&r.push(`tid: ${a.threadID}`);let o=r.join(" ");xe(e,o,()=>{let s=new le;return s.setName(o),s.setValueFormatter(new ee("seconds")),s}).appendSampleWithTimestamp(a.stack.map(({symbolName:s,file:A})=>({key:`${s} (${A})`,name:s==="[unknown]"?`??? (${A})`:s,file:A})),a.time)}return e.size===0?null:{name:e.size===1?Array.from(e.keys())[0]:"",indexToView:0,profiles:Array.from(MA(e.values(),a=>a.build()))}}var Cd=ie(()=>{"use strict";He();W();Te()});function nA(t,e,n,a,r){if(t.ticks===0&&t.entries===0&&t.alloc===0&&t.children.length===0)return e;let o=e,i=a.get(t.id);n.enterFrame(i,o);for(let l of t.children)o=nA(l,o,n,a,r);return o+=r(t),n.leaveFrame(i,o),o}function md(t){let e=new Map;for(let r of t.cost_centres){let o={key:r.id,name:`${r.module}.${r.label}`};r.src_loc.startsWith("<")||(o.file=r.src_loc),e.set(r.id,o)}let n=new me(t.total_ticks);nA(t.profile,0,n,e,r=>r.ticks),n.setValueFormatter(new ee("milliseconds")),n.setName(`${t.program} time`);let a=new me(t.total_ticks);return nA(t.profile,0,a,e,r=>r.alloc),a.setValueFormatter(new ze),a.setName(`${t.program} allocation`),{name:t.program,indexToView:0,profiles:[n.build(),a.build()]}}var Id=ie(()=>{"use strict";He();Te()});function Ev(t){return t.map(({name:e,url:n,line:a,column:r})=>({key:`${e}:${n}:${a}:${r}`,file:n,line:a,col:r,name:e||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)")})).reverse()}function rA(t){t.version!==1&&console.warn(`Unknown Safari profile version ${t.version}... Might be incompatible.`);let{recording:e}=t,{sampleStackTraces:n,sampleDurations:a}=e,r=n.length;if(r<1)return console.warn("Empty profile"),null;let o=n[r-1].timestamp-n[0].timestamp+a[0],i=new le(o),l=Number.MAX_VALUE;return n.forEach((s,A)=>{let c=s.timestamp,_=a[A],f=c-_-l;f>.002&&i.appendSampleWithWeight([],f),i.appendSampleWithWeight(Ev(s.stackFrames),_),l=c}),i.setValueFormatter(new ee("seconds")),i.setName(e.displayName),i.build()}var yd=ie(()=>{"use strict";He();Te()});var Ed=x((mS,vd)=>{"use strict";vd.exports=Bv;function Bv(t,e){for(var n=new Array(arguments.length-1),a=0,r=2,o=!0;r {"use strict";var Po=Qd;Po.length=function(e){var n=e.length;if(!n)return 0;for(var a=0;--n%4>1&&e.charAt(n)==="=";)++a;return Math.ceil(e.length*3)/4-a};var hr=new Array(64),jd=new Array(123);for(mt=0;mt<64;)jd[hr[mt]=mt<26?mt+65:mt<52?mt+71:mt<62?mt-4:mt-59|43]=mt++;var mt;Po.encode=function(e,n,a){for(var r=null,o=[],i=0,l=0,s;n>2],s=(A&3)<<4,l=1;break;case 1:o[i++]=hr[s|A>>4],s=(A&15)<<2,l=2;break;case 2:o[i++]=hr[s|A>>6],o[i++]=hr[A&63],l=0;break}i>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),i=0)}return l&&(o[i++]=hr[s],o[i++]=61,l===1&&(o[i++]=61)),r?(i&&r.push(String.fromCharCode.apply(String,o.slice(0,i))),r.join("")):String.fromCharCode.apply(String,o.slice(0,i))};var Bd="invalid encoding";Po.decode=function(e,n,a){for(var r=a,o=0,i,l=0;l 1)break;if((s=jd[s])===void 0)throw Error(Bd);switch(o){case 0:i=s,o=1;break;case 1:n[a++]=i<<2|(s&48)>>4,i=s,o=2;break;case 2:n[a++]=(i&15)<<4|(s&60)>>2,i=s,o=3;break;case 3:n[a++]=(i&3)<<6|s,o=0;break}}if(o===1)throw Error(Bd);return a-r};Po.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var xd=x((yS,bd)=>{"use strict";bd.exports=Oo;function Oo(){this._listeners={}}Oo.prototype.on=function(e,n,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:n,ctx:a||this}),this};Oo.prototype.off=function(e,n){if(e===void 0)this._listeners={};else if(n===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],r=0;r {"use strict";Fd.exports=Sd(Sd);function Sd(t){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),a=n[3]===128;function r(s,A,c){e[0]=s,A[c]=n[0],A[c+1]=n[1],A[c+2]=n[2],A[c+3]=n[3]}function o(s,A,c){e[0]=s,A[c]=n[3],A[c+1]=n[2],A[c+2]=n[1],A[c+3]=n[0]}t.writeFloatLE=a?r:o,t.writeFloatBE=a?o:r;function i(s,A){return n[0]=s[A],n[1]=s[A+1],n[2]=s[A+2],n[3]=s[A+3],e[0]}function l(s,A){return n[3]=s[A],n[2]=s[A+1],n[1]=s[A+2],n[0]=s[A+3],e[0]}t.readFloatLE=a?i:l,t.readFloatBE=a?l:i}():function(){function e(a,r,o,i){var l=r<0?1:0;if(l&&(r=-r),r===0)a(1/r>0?0:2147483648,o,i);else if(isNaN(r))a(2143289344,o,i);else if(r>34028234663852886e22)a((l<<31|2139095040)>>>0,o,i);else if(r<11754943508222875e-54)a((l<<31|Math.round(r/1401298464324817e-60))>>>0,o,i);else{var s=Math.floor(Math.log(r)/Math.LN2),A=Math.round(r*Math.pow(2,-s)*8388608)&8388607;a((l<<31|s+127<<23|A)>>>0,o,i)}}t.writeFloatLE=e.bind(null,Nd),t.writeFloatBE=e.bind(null,kd);function n(a,r,o){var i=a(r,o),l=(i>>31)*2+1,s=i>>>23&255,A=i&8388607;return s===255?A?NaN:l*(1/0):s===0?l*1401298464324817e-60*A:l*Math.pow(2,s-150)*(A+8388608)}t.readFloatLE=n.bind(null,Dd),t.readFloatBE=n.bind(null,Rd)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),a=n[7]===128;function r(s,A,c){e[0]=s,A[c]=n[0],A[c+1]=n[1],A[c+2]=n[2],A[c+3]=n[3],A[c+4]=n[4],A[c+5]=n[5],A[c+6]=n[6],A[c+7]=n[7]}function o(s,A,c){e[0]=s,A[c]=n[7],A[c+1]=n[6],A[c+2]=n[5],A[c+3]=n[4],A[c+4]=n[3],A[c+5]=n[2],A[c+6]=n[1],A[c+7]=n[0]}t.writeDoubleLE=a?r:o,t.writeDoubleBE=a?o:r;function i(s,A){return n[0]=s[A],n[1]=s[A+1],n[2]=s[A+2],n[3]=s[A+3],n[4]=s[A+4],n[5]=s[A+5],n[6]=s[A+6],n[7]=s[A+7],e[0]}function l(s,A){return n[7]=s[A],n[6]=s[A+1],n[5]=s[A+2],n[4]=s[A+3],n[3]=s[A+4],n[2]=s[A+5],n[1]=s[A+6],n[0]=s[A+7],e[0]}t.readDoubleLE=a?i:l,t.readDoubleBE=a?l:i}():function(){function e(a,r,o,i,l,s){var A=i<0?1:0;if(A&&(i=-i),i===0)a(0,l,s+r),a(1/i>0?0:2147483648,l,s+o);else if(isNaN(i))a(0,l,s+r),a(2146959360,l,s+o);else if(i>17976931348623157e292)a(0,l,s+r),a((A<<31|2146435072)>>>0,l,s+o);else{var c;if(i<22250738585072014e-324)c=i/5e-324,a(c>>>0,l,s+r),a((A<<31|c/4294967296)>>>0,l,s+o);else{var _=Math.floor(Math.log(i)/Math.LN2);_===1024&&(_=1023),c=i*Math.pow(2,-_),a(c*4503599627370496>>>0,l,s+r),a((A<<31|_+1023<<20|c*1048576&1048575)>>>0,l,s+o)}}}t.writeDoubleLE=e.bind(null,Nd,0,4),t.writeDoubleBE=e.bind(null,kd,4,0);function n(a,r,o,i,l){var s=a(i,l+r),A=a(i,l+o),c=(A>>31)*2+1,_=A>>>20&2047,h=4294967296*(A&1048575)+s;return _===2047?h?NaN:c*(1/0):_===0?c*5e-324*h:c*Math.pow(2,_-1075)*(h+4503599627370496)}t.readDoubleLE=n.bind(null,Dd,0,4),t.readDoubleBE=n.bind(null,Rd,4,0)}(),t}function Nd(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function kd(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=t&255}function Dd(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function Rd(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var Td=x((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}});var Md=x(Hd=>{"use strict";var aA=Hd;aA.length=function(e){for(var n=0,a=0,r=0;r 191&&s<224?i[l++]=(s&31)<<6|e[n++]&63:s>239&&s<365?(s=((s&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,i[l++]=55296+(s>>10),i[l++]=56320+(s&1023)):i[l++]=(s&15)<<12|(e[n++]&63)<<6|e[n++]&63,l>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),l=0);return o?(l&&o.push(String.fromCharCode.apply(String,i.slice(0,l))),o.join("")):String.fromCharCode.apply(String,i.slice(0,l))};aA.write=function(e,n,a){for(var r=a,o,i,l=0;l >6|192,n[a++]=o&63|128):(o&64512)===55296&&((i=e.charCodeAt(l+1))&64512)===56320?(o=65536+((o&1023)<<10)+(i&1023),++l,n[a++]=o>>18|240,n[a++]=o>>12&63|128,n[a++]=o>>6&63|128,n[a++]=o&63|128):(n[a++]=o>>12|224,n[a++]=o>>6&63|128,n[a++]=o&63|128);return a-r}});var Ud=x((BS,Jd)=>{"use strict";Jd.exports=jv;function jv(t,e,n){var a=n||8192,r=a>>>1,o=null,i=a;return function(s){if(s<1||s>r)return t(s);i+s>a&&(o=t(a),i=0);var A=e.call(o,i,i+=s);return i&7&&(i=(i|7)+1),A}}});var Pd=x((jS,Kd)=>{"use strict";Kd.exports=we;var Xr=un();function we(t,e){this.lo=t>>>0,this.hi=e>>>0}var Fn=we.zero=new we(0,0);Fn.toNumber=function(){return 0};Fn.zzEncode=Fn.zzDecode=function(){return this};Fn.length=function(){return 1};var Qv=we.zeroHash="\0\0\0\0\0\0\0\0";we.fromNumber=function(e){if(e===0)return Fn;var n=e<0;n&&(e=-e);var a=e>>>0,r=(e-a)/4294967296>>>0;return n&&(r=~r>>>0,a=~a>>>0,++a>4294967295&&(a=0,++r>4294967295&&(r=0))),new we(a,r)};we.from=function(e){if(typeof e=="number")return we.fromNumber(e);if(Xr.isString(e))if(Xr.Long)e=Xr.Long.fromString(e);else return we.fromNumber(parseInt(e,10));return e.low||e.high?new we(e.low>>>0,e.high>>>0):Fn};we.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var n=~this.lo+1>>>0,a=~this.hi>>>0;return n||(a=a+1>>>0),-(n+a*4294967296)}return this.lo+this.hi*4294967296};we.prototype.toLong=function(e){return Xr.Long?new Xr.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var dn=String.prototype.charCodeAt;we.fromHash=function(e){return e===Qv?Fn:new we((dn.call(e,0)|dn.call(e,1)<<8|dn.call(e,2)<<16|dn.call(e,3)<<24)>>>0,(dn.call(e,4)|dn.call(e,5)<<8|dn.call(e,6)<<16|dn.call(e,7)<<24)>>>0)};we.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};we.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};we.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};we.prototype.length=function(){var e=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?n===0?e<16384?e<128?1:2:e<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:a<128?9:10}});var un=x(oA=>{"use strict";var T=oA;T.asPromise=Ed();T.base64=wd();T.EventEmitter=xd();T.float=Ld();T.inquire=Td();T.utf8=Md();T.pool=Ud();T.LongBits=Pd();T.global=typeof window<"u"&&window||typeof global<"u"&&global||typeof self<"u"&&self||oA;T.emptyArray=Object.freeze?Object.freeze([]):[];T.emptyObject=Object.freeze?Object.freeze({}):{};T.isNode=!!(T.global.process&&T.global.process.versions&&T.global.process.versions.node);T.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};T.isString=function(e){return typeof e=="string"||e instanceof String};T.isObject=function(e){return e&&typeof e=="object"};T.isset=T.isSet=function(e,n){var a=e[n];return a!=null&&e.hasOwnProperty(n)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};T.Buffer=function(){try{var t=T.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}}();T._Buffer_from=null;T._Buffer_allocUnsafe=null;T.newBuffer=function(e){return typeof e=="number"?T.Buffer?T._Buffer_allocUnsafe(e):new T.Array(e):T.Buffer?T._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};T.Array=typeof Uint8Array<"u"?Uint8Array:Array;T.Long=T.global.dcodeIO&&T.global.dcodeIO.Long||T.global.Long||T.inquire("long");T.key2Re=/^true|false|0|1$/;T.key32Re=/^-?(?:0|[1-9][0-9]*)$/;T.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;T.longToHash=function(e){return e?T.LongBits.from(e).toHash():T.LongBits.zeroHash};T.longFromHash=function(e,n){var a=T.LongBits.fromHash(e);return T.Long?T.Long.fromBits(a.lo,a.hi,n):a.toNumber(!!n)};function Od(t,e,n){for(var a=Object.keys(e),r=0;r -1;--o)if(n[r[o]]===1&&this[r[o]]!==void 0&&this[r[o]]!==null)return r[o]}};T.oneOfSetter=function(e){return function(n){for(var a=0;a {"use strict";Wd.exports=Z;var _t=un(),Yd,Go=_t.LongBits,zd=_t.base64,Vd=_t.utf8;function ea(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function lA(){}function wv(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Z(){this.len=0,this.head=new ea(lA,0,0),this.tail=this.head,this.states=null}Z.create=_t.Buffer?function(){return(Z.create=function(){return new Yd})()}:function(){return new Z};Z.alloc=function(e){return new _t.Array(e)};_t.Array!==Array&&(Z.alloc=_t.pool(Z.alloc,_t.Array.prototype.subarray));Z.prototype._push=function(e,n,a){return this.tail=this.tail.next=new ea(e,n,a),this.len+=n,this};function AA(t,e,n){e[n]=t&255}function bv(t,e,n){for(;t>127;)e[n++]=t&127|128,t>>>=7;e[n]=t}function sA(t,e){this.len=t,this.next=void 0,this.val=e}sA.prototype=Object.create(ea.prototype);sA.prototype.fn=bv;Z.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new sA((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};Z.prototype.int32=function(e){return e<0?this._push(cA,10,Go.fromNumber(e)):this.uint32(e)};Z.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function cA(t,e,n){for(;t.hi;)e[n++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=t.lo&127|128,t.lo=t.lo>>>7;e[n++]=t.lo}Z.prototype.uint64=function(e){var n=Go.from(e);return this._push(cA,n.length(),n)};Z.prototype.int64=Z.prototype.uint64;Z.prototype.sint64=function(e){var n=Go.from(e).zzEncode();return this._push(cA,n.length(),n)};Z.prototype.bool=function(e){return this._push(AA,1,e?1:0)};function iA(t,e,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}Z.prototype.fixed32=function(e){return this._push(iA,4,e>>>0)};Z.prototype.sfixed32=Z.prototype.fixed32;Z.prototype.fixed64=function(e){var n=Go.from(e);return this._push(iA,4,n.lo)._push(iA,4,n.hi)};Z.prototype.sfixed64=Z.prototype.fixed64;Z.prototype.float=function(e){return this._push(_t.float.writeFloatLE,4,e)};Z.prototype.double=function(e){return this._push(_t.float.writeDoubleLE,8,e)};var xv=_t.Array.prototype.set?function(e,n,a){n.set(e,a)}:function(e,n,a){for(var r=0;r >>0;if(!n)return this._push(AA,1,0);if(_t.isString(e)){var a=Z.alloc(n=zd.length(e));zd.decode(e,a,0),e=a}return this.uint32(n)._push(xv,n,e)};Z.prototype.string=function(e){var n=Vd.length(e);return n?this.uint32(n)._push(Vd.write,n,e):this._push(AA,1,0)};Z.prototype.fork=function(){return this.states=new wv(this),this.head=this.tail=new ea(lA,0,0),this.len=0,this};Z.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new ea(lA,0,0),this.len=0),this};Z.prototype.ldelim=function(){var e=this.head,n=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=n,this.len+=a),this};Z.prototype.finish=function(){for(var e=this.head.next,n=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,n,a),a+=e.len,e=e.next;return n};Z._configure=function(t){Yd=t}});var Zd=x((bS,$d)=>{"use strict";$d.exports=Ln;var qd=_A();(Ln.prototype=Object.create(qd.prototype)).constructor=Ln;var ta=un(),zo=ta.Buffer;function Ln(){qd.call(this)}Ln.alloc=function(e){return(Ln.alloc=ta._Buffer_allocUnsafe)(e)};var Sv=zo&&zo.prototype instanceof Uint8Array&&zo.prototype.set.name==="set"?function(e,n,a){n.set(e,a)}:function(e,n,a){if(e.copy)e.copy(n,a,0,e.length);else for(var r=0;r >>0;return this.uint32(n),n&&this._push(Sv,n,e),this};function Nv(t,e,n){t.length<40?ta.utf8.write(t,e,n):e.utf8Write(t,n)}Ln.prototype.string=function(e){var n=zo.byteLength(e);return this.uint32(n),n&&this._push(Nv,n,e),this}});var gA=x((xS,ru)=>{"use strict";ru.exports=ve;var Ft=un(),tu,nu=Ft.LongBits,kv=Ft.utf8;function It(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function ve(t){this.buf=t,this.pos=0,this.len=t.length}var Xd=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new ve(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new ve(e);throw Error("illegal buffer")};ve.create=Ft.Buffer?function(e){return(ve.create=function(a){return Ft.Buffer.isBuffer(a)?new tu(a):Xd(a)})(e)}:Xd;ve.prototype._slice=Ft.Array.prototype.subarray||Ft.Array.prototype.slice;ve.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,It(this,10);return e}}();ve.prototype.int32=function(){return this.uint32()|0};ve.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function hA(){var t=new nu(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)< >>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw It(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)< >>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)< >>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)< >>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw It(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)< >>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}ve.prototype.bool=function(){return this.uint32()!==0};function Vo(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}ve.prototype.fixed32=function(){if(this.pos+4>this.len)throw It(this,4);return Vo(this.buf,this.pos+=4)};ve.prototype.sfixed32=function(){if(this.pos+4>this.len)throw It(this,4);return Vo(this.buf,this.pos+=4)|0};function eu(){if(this.pos+8>this.len)throw It(this,8);return new nu(Vo(this.buf,this.pos+=4),Vo(this.buf,this.pos+=4))}ve.prototype.float=function(){if(this.pos+4>this.len)throw It(this,4);var e=Ft.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};ve.prototype.double=function(){if(this.pos+8>this.len)throw It(this,4);var e=Ft.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};ve.prototype.bytes=function(){var e=this.uint32(),n=this.pos,a=this.pos+e;if(a>this.len)throw It(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(n,a):n===a?new this.buf.constructor(0):this._slice.call(this.buf,n,a)};ve.prototype.string=function(){var e=this.bytes();return kv.read(e,0,e.length)};ve.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw It(this,e);this.pos+=e}else do if(this.pos>=this.len)throw It(this);while(this.buf[this.pos++]&128);return this};ve.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};ve._configure=function(t){tu=t;var e=Ft.Long?"toLong":"toNumber";Ft.merge(ve.prototype,{int64:function(){return hA.call(this)[e](!1)},uint64:function(){return hA.call(this)[e](!0)},sint64:function(){return hA.call(this).zzDecode()[e](!1)},fixed64:function(){return eu.call(this)[e](!0)},sfixed64:function(){return eu.call(this)[e](!1)}})}});var lu=x((SS,iu)=>{"use strict";iu.exports=na;var ou=gA();(na.prototype=Object.create(ou.prototype)).constructor=na;var au=un();function na(t){ou.call(this,t)}au.Buffer&&(na.prototype._slice=au.Buffer.prototype.slice);na.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}});var su=x((NS,Au)=>{"use strict";Au.exports=ra;var dA=un();(ra.prototype=Object.create(dA.EventEmitter.prototype)).constructor=ra;function ra(t,e,n){if(typeof t!="function")throw TypeError("rpcImpl must be a function");dA.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!n}ra.prototype.rpcCall=function t(e,n,a,r,o){if(!r)throw TypeError("request must be specified");var i=this;if(!o)return dA.asPromise(t,i,e,n,a,r);if(!i.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return i.rpcImpl(e,n[i.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(s,A){if(s)return i.emit("error",s,e),o(s);if(A===null){i.end(!0);return}if(!(A instanceof a))try{A=a[i.responseDelimited?"decodeDelimited":"decode"](A)}catch(c){return i.emit("error",c,e),o(c)}return i.emit("data",A,e),o(null,A)})}catch(l){i.emit("error",l,e),setTimeout(function(){o(l)},0);return}};ra.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var _u=x(cu=>{"use strict";var Dv=cu;Dv.Service=su()});var gu=x((DS,hu)=>{"use strict";hu.exports={}});var fu=x(uu=>{"use strict";var Ye=uu;Ye.build="minimal";Ye.Writer=_A();Ye.BufferWriter=Zd();Ye.Reader=gA();Ye.BufferReader=lu();Ye.util=un();Ye.rpc=_u();Ye.roots=gu();Ye.configure=du;function du(){Ye.Reader._configure(Ye.BufferReader),Ye.util._configure()}Ye.Writer._configure(Ye.BufferWriter);du()});var Cu=x((FS,pu)=>{"use strict";pu.exports=fu()});var Iu=x((LS,mu)=>{"use strict";var nt=Cu(),X=nt.Reader,fn=nt.Writer,d=nt.util,k=nt.roots.default||(nt.roots.default={});k.perftools=function(){var t={};return t.profiles=function(){var e={};return e.Profile=function(){function n(a){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],a)for(var r=Object.keys(a),o=0;o >>3){case 1:l.sampleType&&l.sampleType.length||(l.sampleType=[]),l.sampleType.push(k.perftools.profiles.ValueType.decode(r,r.uint32()));break;case 2:l.sample&&l.sample.length||(l.sample=[]),l.sample.push(k.perftools.profiles.Sample.decode(r,r.uint32()));break;case 3:l.mapping&&l.mapping.length||(l.mapping=[]),l.mapping.push(k.perftools.profiles.Mapping.decode(r,r.uint32()));break;case 4:l.location&&l.location.length||(l.location=[]),l.location.push(k.perftools.profiles.Location.decode(r,r.uint32()));break;case 5:l.function&&l.function.length||(l.function=[]),l.function.push(k.perftools.profiles.Function.decode(r,r.uint32()));break;case 6:l.stringTable&&l.stringTable.length||(l.stringTable=[]),l.stringTable.push(r.string());break;case 7:l.dropFrames=r.int64();break;case 8:l.keepFrames=r.int64();break;case 9:l.timeNanos=r.int64();break;case 10:l.durationNanos=r.int64();break;case 11:l.periodType=k.perftools.profiles.ValueType.decode(r,r.uint32());break;case 12:l.period=r.int64();break;case 13:if(l.comment&&l.comment.length||(l.comment=[]),(s&7)===2)for(var A=r.uint32()+r.pos;r.pos>>0,r.dropFrames.high>>>0).toNumber())),r.keepFrames!=null&&(d.Long?(o.keepFrames=d.Long.fromValue(r.keepFrames)).unsigned=!1:typeof r.keepFrames=="string"?o.keepFrames=parseInt(r.keepFrames,10):typeof r.keepFrames=="number"?o.keepFrames=r.keepFrames:typeof r.keepFrames=="object"&&(o.keepFrames=new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber())),r.timeNanos!=null&&(d.Long?(o.timeNanos=d.Long.fromValue(r.timeNanos)).unsigned=!1:typeof r.timeNanos=="string"?o.timeNanos=parseInt(r.timeNanos,10):typeof r.timeNanos=="number"?o.timeNanos=r.timeNanos:typeof r.timeNanos=="object"&&(o.timeNanos=new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber())),r.durationNanos!=null&&(d.Long?(o.durationNanos=d.Long.fromValue(r.durationNanos)).unsigned=!1:typeof r.durationNanos=="string"?o.durationNanos=parseInt(r.durationNanos,10):typeof r.durationNanos=="number"?o.durationNanos=r.durationNanos:typeof r.durationNanos=="object"&&(o.durationNanos=new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber())),r.periodType!=null){if(typeof r.periodType!="object")throw TypeError(".perftools.profiles.Profile.periodType: object expected");o.periodType=k.perftools.profiles.ValueType.fromObject(r.periodType)}if(r.period!=null&&(d.Long?(o.period=d.Long.fromValue(r.period)).unsigned=!1:typeof r.period=="string"?o.period=parseInt(r.period,10):typeof r.period=="number"?o.period=r.period:typeof r.period=="object"&&(o.period=new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber())),r.comment){if(!Array.isArray(r.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");o.comment=[];for(var i=0;i >>0,r.comment[i].high>>>0).toNumber())}return r.defaultSampleType!=null&&(d.Long?(o.defaultSampleType=d.Long.fromValue(r.defaultSampleType)).unsigned=!1:typeof r.defaultSampleType=="string"?o.defaultSampleType=parseInt(r.defaultSampleType,10):typeof r.defaultSampleType=="number"?o.defaultSampleType=r.defaultSampleType:typeof r.defaultSampleType=="object"&&(o.defaultSampleType=new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if((o.arrays||o.defaults)&&(i.sampleType=[],i.sample=[],i.mapping=[],i.location=[],i.function=[],i.stringTable=[],i.comment=[]),o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.dropFrames=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.dropFrames=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.keepFrames=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.keepFrames=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.timeNanos=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.timeNanos=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.durationNanos=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.durationNanos=o.longs===String?"0":0;if(i.periodType=null,d.Long){var l=new d.Long(0,0,!1);i.period=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.period=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.defaultSampleType=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.defaultSampleType=o.longs===String?"0":0}if(r.sampleType&&r.sampleType.length){i.sampleType=[];for(var s=0;s >>0,r.dropFrames.high>>>0).toNumber():r.dropFrames),r.keepFrames!=null&&r.hasOwnProperty("keepFrames")&&(typeof r.keepFrames=="number"?i.keepFrames=o.longs===String?String(r.keepFrames):r.keepFrames:i.keepFrames=o.longs===String?d.Long.prototype.toString.call(r.keepFrames):o.longs===Number?new d.LongBits(r.keepFrames.low>>>0,r.keepFrames.high>>>0).toNumber():r.keepFrames),r.timeNanos!=null&&r.hasOwnProperty("timeNanos")&&(typeof r.timeNanos=="number"?i.timeNanos=o.longs===String?String(r.timeNanos):r.timeNanos:i.timeNanos=o.longs===String?d.Long.prototype.toString.call(r.timeNanos):o.longs===Number?new d.LongBits(r.timeNanos.low>>>0,r.timeNanos.high>>>0).toNumber():r.timeNanos),r.durationNanos!=null&&r.hasOwnProperty("durationNanos")&&(typeof r.durationNanos=="number"?i.durationNanos=o.longs===String?String(r.durationNanos):r.durationNanos:i.durationNanos=o.longs===String?d.Long.prototype.toString.call(r.durationNanos):o.longs===Number?new d.LongBits(r.durationNanos.low>>>0,r.durationNanos.high>>>0).toNumber():r.durationNanos),r.periodType!=null&&r.hasOwnProperty("periodType")&&(i.periodType=k.perftools.profiles.ValueType.toObject(r.periodType,o)),r.period!=null&&r.hasOwnProperty("period")&&(typeof r.period=="number"?i.period=o.longs===String?String(r.period):r.period:i.period=o.longs===String?d.Long.prototype.toString.call(r.period):o.longs===Number?new d.LongBits(r.period.low>>>0,r.period.high>>>0).toNumber():r.period),r.comment&&r.comment.length){i.comment=[];for(var s=0;s >>0,r.comment[s].high>>>0).toNumber():r.comment[s]}return r.defaultSampleType!=null&&r.hasOwnProperty("defaultSampleType")&&(typeof r.defaultSampleType=="number"?i.defaultSampleType=o.longs===String?String(r.defaultSampleType):r.defaultSampleType:i.defaultSampleType=o.longs===String?d.Long.prototype.toString.call(r.defaultSampleType):o.longs===Number?new d.LongBits(r.defaultSampleType.low>>>0,r.defaultSampleType.high>>>0).toNumber():r.defaultSampleType),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.ValueType=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o >>3){case 1:l.type=r.int64();break;case 2:l.unit=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.type!=null&&r.hasOwnProperty("type")&&!d.isInteger(r.type)&&!(r.type&&d.isInteger(r.type.low)&&d.isInteger(r.type.high))?"type: integer|Long expected":r.unit!=null&&r.hasOwnProperty("unit")&&!d.isInteger(r.unit)&&!(r.unit&&d.isInteger(r.unit.low)&&d.isInteger(r.unit.high))?"unit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.ValueType)return r;var o=new k.perftools.profiles.ValueType;return r.type!=null&&(d.Long?(o.type=d.Long.fromValue(r.type)).unsigned=!1:typeof r.type=="string"?o.type=parseInt(r.type,10):typeof r.type=="number"?o.type=r.type:typeof r.type=="object"&&(o.type=new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber())),r.unit!=null&&(d.Long?(o.unit=d.Long.fromValue(r.unit)).unsigned=!1:typeof r.unit=="string"?o.unit=parseInt(r.unit,10):typeof r.unit=="number"?o.unit=r.unit:typeof r.unit=="object"&&(o.unit=new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.type=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.type=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.unit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.unit=o.longs===String?"0":0}return r.type!=null&&r.hasOwnProperty("type")&&(typeof r.type=="number"?i.type=o.longs===String?String(r.type):r.type:i.type=o.longs===String?d.Long.prototype.toString.call(r.type):o.longs===Number?new d.LongBits(r.type.low>>>0,r.type.high>>>0).toNumber():r.type),r.unit!=null&&r.hasOwnProperty("unit")&&(typeof r.unit=="number"?i.unit=o.longs===String?String(r.unit):r.unit:i.unit=o.longs===String?d.Long.prototype.toString.call(r.unit):o.longs===Number?new d.LongBits(r.unit.low>>>0,r.unit.high>>>0).toNumber():r.unit),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Sample=function(){function n(a){if(this.locationId=[],this.value=[],this.label=[],a)for(var r=Object.keys(a),o=0;o >>3){case 1:if(l.locationId&&l.locationId.length||(l.locationId=[]),(s&7)===2)for(var A=r.uint32()+r.pos;r.pos>>0,r.locationId[i].high>>>0).toNumber(!0))}if(r.value){if(!Array.isArray(r.value))throw TypeError(".perftools.profiles.Sample.value: array expected");o.value=[];for(var i=0;i >>0,r.value[i].high>>>0).toNumber())}if(r.label){if(!Array.isArray(r.label))throw TypeError(".perftools.profiles.Sample.label: array expected");o.label=[];for(var i=0;i >>0,r.locationId[l].high>>>0).toNumber(!0):r.locationId[l]}if(r.value&&r.value.length){i.value=[];for(var l=0;l >>0,r.value[l].high>>>0).toNumber():r.value[l]}if(r.label&&r.label.length){i.label=[];for(var l=0;l >>3){case 1:l.key=r.int64();break;case 2:l.str=r.int64();break;case 3:l.num=r.int64();break;case 4:l.numUnit=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.key!=null&&r.hasOwnProperty("key")&&!d.isInteger(r.key)&&!(r.key&&d.isInteger(r.key.low)&&d.isInteger(r.key.high))?"key: integer|Long expected":r.str!=null&&r.hasOwnProperty("str")&&!d.isInteger(r.str)&&!(r.str&&d.isInteger(r.str.low)&&d.isInteger(r.str.high))?"str: integer|Long expected":r.num!=null&&r.hasOwnProperty("num")&&!d.isInteger(r.num)&&!(r.num&&d.isInteger(r.num.low)&&d.isInteger(r.num.high))?"num: integer|Long expected":r.numUnit!=null&&r.hasOwnProperty("numUnit")&&!d.isInteger(r.numUnit)&&!(r.numUnit&&d.isInteger(r.numUnit.low)&&d.isInteger(r.numUnit.high))?"numUnit: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Label)return r;var o=new k.perftools.profiles.Label;return r.key!=null&&(d.Long?(o.key=d.Long.fromValue(r.key)).unsigned=!1:typeof r.key=="string"?o.key=parseInt(r.key,10):typeof r.key=="number"?o.key=r.key:typeof r.key=="object"&&(o.key=new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber())),r.str!=null&&(d.Long?(o.str=d.Long.fromValue(r.str)).unsigned=!1:typeof r.str=="string"?o.str=parseInt(r.str,10):typeof r.str=="number"?o.str=r.str:typeof r.str=="object"&&(o.str=new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber())),r.num!=null&&(d.Long?(o.num=d.Long.fromValue(r.num)).unsigned=!1:typeof r.num=="string"?o.num=parseInt(r.num,10):typeof r.num=="number"?o.num=r.num:typeof r.num=="object"&&(o.num=new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber())),r.numUnit!=null&&(d.Long?(o.numUnit=d.Long.fromValue(r.numUnit)).unsigned=!1:typeof r.numUnit=="string"?o.numUnit=parseInt(r.numUnit,10):typeof r.numUnit=="number"?o.numUnit=r.numUnit:typeof r.numUnit=="object"&&(o.numUnit=new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!1);i.key=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.key=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.str=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.str=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.num=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.num=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.numUnit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.numUnit=o.longs===String?"0":0}return r.key!=null&&r.hasOwnProperty("key")&&(typeof r.key=="number"?i.key=o.longs===String?String(r.key):r.key:i.key=o.longs===String?d.Long.prototype.toString.call(r.key):o.longs===Number?new d.LongBits(r.key.low>>>0,r.key.high>>>0).toNumber():r.key),r.str!=null&&r.hasOwnProperty("str")&&(typeof r.str=="number"?i.str=o.longs===String?String(r.str):r.str:i.str=o.longs===String?d.Long.prototype.toString.call(r.str):o.longs===Number?new d.LongBits(r.str.low>>>0,r.str.high>>>0).toNumber():r.str),r.num!=null&&r.hasOwnProperty("num")&&(typeof r.num=="number"?i.num=o.longs===String?String(r.num):r.num:i.num=o.longs===String?d.Long.prototype.toString.call(r.num):o.longs===Number?new d.LongBits(r.num.low>>>0,r.num.high>>>0).toNumber():r.num),r.numUnit!=null&&r.hasOwnProperty("numUnit")&&(typeof r.numUnit=="number"?i.numUnit=o.longs===String?String(r.numUnit):r.numUnit:i.numUnit=o.longs===String?d.Long.prototype.toString.call(r.numUnit):o.longs===Number?new d.LongBits(r.numUnit.low>>>0,r.numUnit.high>>>0).toNumber():r.numUnit),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Mapping=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o >>3){case 1:l.id=r.uint64();break;case 2:l.memoryStart=r.uint64();break;case 3:l.memoryLimit=r.uint64();break;case 4:l.fileOffset=r.uint64();break;case 5:l.filename=r.int64();break;case 6:l.buildId=r.int64();break;case 7:l.hasFunctions=r.bool();break;case 8:l.hasFilenames=r.bool();break;case 9:l.hasLineNumbers=r.bool();break;case 10:l.hasInlineFrames=r.bool();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&!d.isInteger(r.memoryStart)&&!(r.memoryStart&&d.isInteger(r.memoryStart.low)&&d.isInteger(r.memoryStart.high))?"memoryStart: integer|Long expected":r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&!d.isInteger(r.memoryLimit)&&!(r.memoryLimit&&d.isInteger(r.memoryLimit.low)&&d.isInteger(r.memoryLimit.high))?"memoryLimit: integer|Long expected":r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&!d.isInteger(r.fileOffset)&&!(r.fileOffset&&d.isInteger(r.fileOffset.low)&&d.isInteger(r.fileOffset.high))?"fileOffset: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.buildId!=null&&r.hasOwnProperty("buildId")&&!d.isInteger(r.buildId)&&!(r.buildId&&d.isInteger(r.buildId.low)&&d.isInteger(r.buildId.high))?"buildId: integer|Long expected":r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&typeof r.hasFunctions!="boolean"?"hasFunctions: boolean expected":r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&typeof r.hasFilenames!="boolean"?"hasFilenames: boolean expected":r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&typeof r.hasLineNumbers!="boolean"?"hasLineNumbers: boolean expected":r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&typeof r.hasInlineFrames!="boolean"?"hasInlineFrames: boolean expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Mapping)return r;var o=new k.perftools.profiles.Mapping;return r.id!=null&&(d.Long?(o.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?o.id=parseInt(r.id,10):typeof r.id=="number"?o.id=r.id:typeof r.id=="object"&&(o.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.memoryStart!=null&&(d.Long?(o.memoryStart=d.Long.fromValue(r.memoryStart)).unsigned=!0:typeof r.memoryStart=="string"?o.memoryStart=parseInt(r.memoryStart,10):typeof r.memoryStart=="number"?o.memoryStart=r.memoryStart:typeof r.memoryStart=="object"&&(o.memoryStart=new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0))),r.memoryLimit!=null&&(d.Long?(o.memoryLimit=d.Long.fromValue(r.memoryLimit)).unsigned=!0:typeof r.memoryLimit=="string"?o.memoryLimit=parseInt(r.memoryLimit,10):typeof r.memoryLimit=="number"?o.memoryLimit=r.memoryLimit:typeof r.memoryLimit=="object"&&(o.memoryLimit=new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0))),r.fileOffset!=null&&(d.Long?(o.fileOffset=d.Long.fromValue(r.fileOffset)).unsigned=!0:typeof r.fileOffset=="string"?o.fileOffset=parseInt(r.fileOffset,10):typeof r.fileOffset=="number"?o.fileOffset=r.fileOffset:typeof r.fileOffset=="object"&&(o.fileOffset=new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0))),r.filename!=null&&(d.Long?(o.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?o.filename=parseInt(r.filename,10):typeof r.filename=="number"?o.filename=r.filename:typeof r.filename=="object"&&(o.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.buildId!=null&&(d.Long?(o.buildId=d.Long.fromValue(r.buildId)).unsigned=!1:typeof r.buildId=="string"?o.buildId=parseInt(r.buildId,10):typeof r.buildId=="number"?o.buildId=r.buildId:typeof r.buildId=="object"&&(o.buildId=new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber())),r.hasFunctions!=null&&(o.hasFunctions=!!r.hasFunctions),r.hasFilenames!=null&&(o.hasFilenames=!!r.hasFilenames),r.hasLineNumbers!=null&&(o.hasLineNumbers=!!r.hasLineNumbers),r.hasInlineFrames!=null&&(o.hasInlineFrames=!!r.hasInlineFrames),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.id=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.id=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.memoryStart=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.memoryStart=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.memoryLimit=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.memoryLimit=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!0);i.fileOffset=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.fileOffset=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.filename=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.filename=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.buildId=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.buildId=o.longs===String?"0":0;i.hasFunctions=!1,i.hasFilenames=!1,i.hasLineNumbers=!1,i.hasInlineFrames=!1}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?i.id=o.longs===String?String(r.id):r.id:i.id=o.longs===String?d.Long.prototype.toString.call(r.id):o.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.memoryStart!=null&&r.hasOwnProperty("memoryStart")&&(typeof r.memoryStart=="number"?i.memoryStart=o.longs===String?String(r.memoryStart):r.memoryStart:i.memoryStart=o.longs===String?d.Long.prototype.toString.call(r.memoryStart):o.longs===Number?new d.LongBits(r.memoryStart.low>>>0,r.memoryStart.high>>>0).toNumber(!0):r.memoryStart),r.memoryLimit!=null&&r.hasOwnProperty("memoryLimit")&&(typeof r.memoryLimit=="number"?i.memoryLimit=o.longs===String?String(r.memoryLimit):r.memoryLimit:i.memoryLimit=o.longs===String?d.Long.prototype.toString.call(r.memoryLimit):o.longs===Number?new d.LongBits(r.memoryLimit.low>>>0,r.memoryLimit.high>>>0).toNumber(!0):r.memoryLimit),r.fileOffset!=null&&r.hasOwnProperty("fileOffset")&&(typeof r.fileOffset=="number"?i.fileOffset=o.longs===String?String(r.fileOffset):r.fileOffset:i.fileOffset=o.longs===String?d.Long.prototype.toString.call(r.fileOffset):o.longs===Number?new d.LongBits(r.fileOffset.low>>>0,r.fileOffset.high>>>0).toNumber(!0):r.fileOffset),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?i.filename=o.longs===String?String(r.filename):r.filename:i.filename=o.longs===String?d.Long.prototype.toString.call(r.filename):o.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.buildId!=null&&r.hasOwnProperty("buildId")&&(typeof r.buildId=="number"?i.buildId=o.longs===String?String(r.buildId):r.buildId:i.buildId=o.longs===String?d.Long.prototype.toString.call(r.buildId):o.longs===Number?new d.LongBits(r.buildId.low>>>0,r.buildId.high>>>0).toNumber():r.buildId),r.hasFunctions!=null&&r.hasOwnProperty("hasFunctions")&&(i.hasFunctions=r.hasFunctions),r.hasFilenames!=null&&r.hasOwnProperty("hasFilenames")&&(i.hasFilenames=r.hasFilenames),r.hasLineNumbers!=null&&r.hasOwnProperty("hasLineNumbers")&&(i.hasLineNumbers=r.hasLineNumbers),r.hasInlineFrames!=null&&r.hasOwnProperty("hasInlineFrames")&&(i.hasInlineFrames=r.hasInlineFrames),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Location=function(){function n(a){if(this.line=[],a)for(var r=Object.keys(a),o=0;o >>3){case 1:l.id=r.uint64();break;case 2:l.mappingId=r.uint64();break;case 3:l.address=r.uint64();break;case 4:l.line&&l.line.length||(l.line=[]),l.line.push(k.perftools.profiles.Line.decode(r,r.uint32()));break;case 5:l.isFolded=r.bool();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high)))return"id: integer|Long expected";if(r.mappingId!=null&&r.hasOwnProperty("mappingId")&&!d.isInteger(r.mappingId)&&!(r.mappingId&&d.isInteger(r.mappingId.low)&&d.isInteger(r.mappingId.high)))return"mappingId: integer|Long expected";if(r.address!=null&&r.hasOwnProperty("address")&&!d.isInteger(r.address)&&!(r.address&&d.isInteger(r.address.low)&&d.isInteger(r.address.high)))return"address: integer|Long expected";if(r.line!=null&&r.hasOwnProperty("line")){if(!Array.isArray(r.line))return"line: array expected";for(var o=0;o >>0,r.id.high>>>0).toNumber(!0))),r.mappingId!=null&&(d.Long?(o.mappingId=d.Long.fromValue(r.mappingId)).unsigned=!0:typeof r.mappingId=="string"?o.mappingId=parseInt(r.mappingId,10):typeof r.mappingId=="number"?o.mappingId=r.mappingId:typeof r.mappingId=="object"&&(o.mappingId=new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0))),r.address!=null&&(d.Long?(o.address=d.Long.fromValue(r.address)).unsigned=!0:typeof r.address=="string"?o.address=parseInt(r.address,10):typeof r.address=="number"?o.address=r.address:typeof r.address=="object"&&(o.address=new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0))),r.line){if(!Array.isArray(r.line))throw TypeError(".perftools.profiles.Location.line: array expected");o.line=[];for(var i=0;i >>0,r.id.high>>>0).toNumber(!0):r.id),r.mappingId!=null&&r.hasOwnProperty("mappingId")&&(typeof r.mappingId=="number"?i.mappingId=o.longs===String?String(r.mappingId):r.mappingId:i.mappingId=o.longs===String?d.Long.prototype.toString.call(r.mappingId):o.longs===Number?new d.LongBits(r.mappingId.low>>>0,r.mappingId.high>>>0).toNumber(!0):r.mappingId),r.address!=null&&r.hasOwnProperty("address")&&(typeof r.address=="number"?i.address=o.longs===String?String(r.address):r.address:i.address=o.longs===String?d.Long.prototype.toString.call(r.address):o.longs===Number?new d.LongBits(r.address.low>>>0,r.address.high>>>0).toNumber(!0):r.address),r.line&&r.line.length){i.line=[];for(var s=0;s >>3){case 1:l.functionId=r.uint64();break;case 2:l.line=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.functionId!=null&&r.hasOwnProperty("functionId")&&!d.isInteger(r.functionId)&&!(r.functionId&&d.isInteger(r.functionId.low)&&d.isInteger(r.functionId.high))?"functionId: integer|Long expected":r.line!=null&&r.hasOwnProperty("line")&&!d.isInteger(r.line)&&!(r.line&&d.isInteger(r.line.low)&&d.isInteger(r.line.high))?"line: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Line)return r;var o=new k.perftools.profiles.Line;return r.functionId!=null&&(d.Long?(o.functionId=d.Long.fromValue(r.functionId)).unsigned=!0:typeof r.functionId=="string"?o.functionId=parseInt(r.functionId,10):typeof r.functionId=="number"?o.functionId=r.functionId:typeof r.functionId=="object"&&(o.functionId=new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0))),r.line!=null&&(d.Long?(o.line=d.Long.fromValue(r.line)).unsigned=!1:typeof r.line=="string"?o.line=parseInt(r.line,10):typeof r.line=="number"?o.line=r.line:typeof r.line=="object"&&(o.line=new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.functionId=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.functionId=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.line=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.line=o.longs===String?"0":0}return r.functionId!=null&&r.hasOwnProperty("functionId")&&(typeof r.functionId=="number"?i.functionId=o.longs===String?String(r.functionId):r.functionId:i.functionId=o.longs===String?d.Long.prototype.toString.call(r.functionId):o.longs===Number?new d.LongBits(r.functionId.low>>>0,r.functionId.high>>>0).toNumber(!0):r.functionId),r.line!=null&&r.hasOwnProperty("line")&&(typeof r.line=="number"?i.line=o.longs===String?String(r.line):r.line:i.line=o.longs===String?d.Long.prototype.toString.call(r.line):o.longs===Number?new d.LongBits(r.line.low>>>0,r.line.high>>>0).toNumber():r.line),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e.Function=function(){function n(a){if(a)for(var r=Object.keys(a),o=0;o >>3){case 1:l.id=r.uint64();break;case 2:l.name=r.int64();break;case 3:l.systemName=r.int64();break;case 4:l.filename=r.int64();break;case 5:l.startLine=r.int64();break;default:r.skipType(s&7);break}}return l},n.decodeDelimited=function(r){return r instanceof X||(r=new X(r)),this.decode(r,r.uint32())},n.verify=function(r){return typeof r!="object"||r===null?"object expected":r.id!=null&&r.hasOwnProperty("id")&&!d.isInteger(r.id)&&!(r.id&&d.isInteger(r.id.low)&&d.isInteger(r.id.high))?"id: integer|Long expected":r.name!=null&&r.hasOwnProperty("name")&&!d.isInteger(r.name)&&!(r.name&&d.isInteger(r.name.low)&&d.isInteger(r.name.high))?"name: integer|Long expected":r.systemName!=null&&r.hasOwnProperty("systemName")&&!d.isInteger(r.systemName)&&!(r.systemName&&d.isInteger(r.systemName.low)&&d.isInteger(r.systemName.high))?"systemName: integer|Long expected":r.filename!=null&&r.hasOwnProperty("filename")&&!d.isInteger(r.filename)&&!(r.filename&&d.isInteger(r.filename.low)&&d.isInteger(r.filename.high))?"filename: integer|Long expected":r.startLine!=null&&r.hasOwnProperty("startLine")&&!d.isInteger(r.startLine)&&!(r.startLine&&d.isInteger(r.startLine.low)&&d.isInteger(r.startLine.high))?"startLine: integer|Long expected":null},n.fromObject=function(r){if(r instanceof k.perftools.profiles.Function)return r;var o=new k.perftools.profiles.Function;return r.id!=null&&(d.Long?(o.id=d.Long.fromValue(r.id)).unsigned=!0:typeof r.id=="string"?o.id=parseInt(r.id,10):typeof r.id=="number"?o.id=r.id:typeof r.id=="object"&&(o.id=new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0))),r.name!=null&&(d.Long?(o.name=d.Long.fromValue(r.name)).unsigned=!1:typeof r.name=="string"?o.name=parseInt(r.name,10):typeof r.name=="number"?o.name=r.name:typeof r.name=="object"&&(o.name=new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber())),r.systemName!=null&&(d.Long?(o.systemName=d.Long.fromValue(r.systemName)).unsigned=!1:typeof r.systemName=="string"?o.systemName=parseInt(r.systemName,10):typeof r.systemName=="number"?o.systemName=r.systemName:typeof r.systemName=="object"&&(o.systemName=new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber())),r.filename!=null&&(d.Long?(o.filename=d.Long.fromValue(r.filename)).unsigned=!1:typeof r.filename=="string"?o.filename=parseInt(r.filename,10):typeof r.filename=="number"?o.filename=r.filename:typeof r.filename=="object"&&(o.filename=new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber())),r.startLine!=null&&(d.Long?(o.startLine=d.Long.fromValue(r.startLine)).unsigned=!1:typeof r.startLine=="string"?o.startLine=parseInt(r.startLine,10):typeof r.startLine=="number"?o.startLine=r.startLine:typeof r.startLine=="object"&&(o.startLine=new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber())),o},n.toObject=function(r,o){o||(o={});var i={};if(o.defaults){if(d.Long){var l=new d.Long(0,0,!0);i.id=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.id=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.name=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.name=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.systemName=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.systemName=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.filename=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.filename=o.longs===String?"0":0;if(d.Long){var l=new d.Long(0,0,!1);i.startLine=o.longs===String?l.toString():o.longs===Number?l.toNumber():l}else i.startLine=o.longs===String?"0":0}return r.id!=null&&r.hasOwnProperty("id")&&(typeof r.id=="number"?i.id=o.longs===String?String(r.id):r.id:i.id=o.longs===String?d.Long.prototype.toString.call(r.id):o.longs===Number?new d.LongBits(r.id.low>>>0,r.id.high>>>0).toNumber(!0):r.id),r.name!=null&&r.hasOwnProperty("name")&&(typeof r.name=="number"?i.name=o.longs===String?String(r.name):r.name:i.name=o.longs===String?d.Long.prototype.toString.call(r.name):o.longs===Number?new d.LongBits(r.name.low>>>0,r.name.high>>>0).toNumber():r.name),r.systemName!=null&&r.hasOwnProperty("systemName")&&(typeof r.systemName=="number"?i.systemName=o.longs===String?String(r.systemName):r.systemName:i.systemName=o.longs===String?d.Long.prototype.toString.call(r.systemName):o.longs===Number?new d.LongBits(r.systemName.low>>>0,r.systemName.high>>>0).toNumber():r.systemName),r.filename!=null&&r.hasOwnProperty("filename")&&(typeof r.filename=="number"?i.filename=o.longs===String?String(r.filename):r.filename:i.filename=o.longs===String?d.Long.prototype.toString.call(r.filename):o.longs===Number?new d.LongBits(r.filename.low>>>0,r.filename.high>>>0).toNumber():r.filename),r.startLine!=null&&r.hasOwnProperty("startLine")&&(typeof r.startLine=="number"?i.startLine=o.longs===String?String(r.startLine):r.startLine:i.startLine=o.longs===String?d.Long.prototype.toString.call(r.startLine):o.longs===Number?new d.LongBits(r.startLine.low>>>0,r.startLine.high>>>0).toNumber():r.startLine),i},n.prototype.toJSON=function(){return this.constructor.toObject(this,nt.util.toJSONOptions)},n}(),e}(),t}();mu.exports=k});var Nu=x((TS,Su)=>{Su.exports=re;var ht=null;try{ht=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function re(t,e,n){this.low=t|0,this.high=e|0,this.unsigned=!!n}re.prototype.__isLong__;Object.defineProperty(re.prototype,"__isLong__",{value:!0});function qe(t){return(t&&t.__isLong__)===!0}re.isLong=qe;var yu={},vu={};function Hn(t,e){var n,a,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(a=vu[t],a)?a:(n=ae(t,(t|0)<0?-1:0,!0),r&&(vu[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(a=yu[t],a)?a:(n=ae(t,t<0?-1:0,!1),r&&(yu[t]=n),n))}re.fromInt=Hn;function gt(t,e){if(isNaN(t))return e?Tn:dt;if(e){if(t<0)return Tn;if(t>=Qu)return xu}else{if(t<=-Bu)return We;if(t+1>=Bu)return bu}return t<0?gt(-t,e).neg():ae(t%dr|0,t/dr|0,e)}re.fromNumber=gt;function ae(t,e,n){return new re(t,e,n)}re.fromBits=ae;var Yo=Math.pow;function fA(t,e,n){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return dt;if(typeof e=="number"?(n=e,e=!1):e=!!e,n=n||10,n<2||36 0)throw Error("interior hyphen");if(a===0)return fA(t.substring(1),e,n).neg();for(var r=gt(Yo(n,8)),o=dt,i=0;i >>0:this.low};b.toNumber=function(){return this.unsigned?(this.high>>>0)*dr+(this.low>>>0):this.high*dr+(this.low>>>0)};b.toString=function(e){if(e=e||10,e<2||36 >>0,c=A.toString(e);if(i=s,i.isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}};b.getHighBits=function(){return this.high};b.getHighBitsUnsigned=function(){return this.high>>>0};b.getLowBits=function(){return this.low};b.getLowBitsUnsigned=function(){return this.low>>>0};b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(We)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,n=31;n>0&&!(e&1< =0};b.isOdd=function(){return(this.low&1)===1};b.isEven=function(){return(this.low&1)===0};b.equals=function(e){return qe(e)||(e=yt(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};b.eq=b.equals;b.notEquals=function(e){return!this.eq(e)};b.neq=b.notEquals;b.ne=b.notEquals;b.lessThan=function(e){return this.comp(e)<0};b.lt=b.lessThan;b.lessThanOrEqual=function(e){return this.comp(e)<=0};b.lte=b.lessThanOrEqual;b.le=b.lessThanOrEqual;b.greaterThan=function(e){return this.comp(e)>0};b.gt=b.greaterThan;b.greaterThanOrEqual=function(e){return this.comp(e)>=0};b.gte=b.greaterThanOrEqual;b.ge=b.greaterThanOrEqual;b.compare=function(e){if(qe(e)||(e=yt(e)),this.eq(e))return 0;var n=this.isNegative(),a=e.isNegative();return n&&!a?-1:!n&&a?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1};b.comp=b.compare;b.negate=function(){return!this.unsigned&&this.eq(We)?We:this.not().add(gr)};b.neg=b.negate;b.add=function(e){qe(e)||(e=yt(e));var n=this.high>>>16,a=this.high&65535,r=this.low>>>16,o=this.low&65535,i=e.high>>>16,l=e.high&65535,s=e.low>>>16,A=e.low&65535,c=0,_=0,h=0,f=0;return f+=o+A,h+=f>>>16,f&=65535,h+=r+s,_+=h>>>16,h&=65535,_+=a+l,c+=_>>>16,_&=65535,c+=n+i,c&=65535,ae(h<<16|f,c<<16|_,this.unsigned)};b.subtract=function(e){return qe(e)||(e=yt(e)),this.add(e.neg())};b.sub=b.subtract;b.multiply=function(e){if(this.isZero())return dt;if(qe(e)||(e=yt(e)),ht){var n=ht.mul(this.low,this.high,e.low,e.high);return ae(n,ht.get_high(),this.unsigned)}if(e.isZero())return dt;if(this.eq(We))return e.isOdd()?We:dt;if(e.eq(We))return this.isOdd()?We:dt;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(ju)&&e.lt(ju))return gt(this.toNumber()*e.toNumber(),this.unsigned);var a=this.high>>>16,r=this.high&65535,o=this.low>>>16,i=this.low&65535,l=e.high>>>16,s=e.high&65535,A=e.low>>>16,c=e.low&65535,_=0,h=0,f=0,I=0;return I+=i*c,f+=I>>>16,I&=65535,f+=o*c,h+=f>>>16,f&=65535,f+=i*A,h+=f>>>16,f&=65535,h+=r*c,_+=h>>>16,h&=65535,h+=o*A,_+=h>>>16,h&=65535,h+=i*s,_+=h>>>16,h&=65535,_+=a*c+r*A+o*s+i*l,_&=65535,ae(f<<16|I,_<<16|h,this.unsigned)};b.mul=b.multiply;b.divide=function(e){if(qe(e)||(e=yt(e)),e.isZero())throw Error("division by zero");if(ht){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?ht.div_u:ht.div_s)(this.low,this.high,e.low,e.high);return ae(n,ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Tn:dt;var a,r,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Tn;if(e.gt(this.shru(1)))return wu;o=Tn}else{if(this.eq(We)){if(e.eq(gr)||e.eq(uA))return We;if(e.eq(We))return gr;var i=this.shr(1);return a=i.div(e).shl(1),a.eq(dt)?e.isNegative()?gr:uA:(r=this.sub(e.mul(a)),o=a.add(r.div(e)),o)}else if(e.eq(We))return this.unsigned?Tn:dt;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=dt}for(r=this;r.gte(e);){a=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(a)/Math.LN2),s=l<=48?1:Yo(2,l-48),A=gt(a),c=A.mul(e);c.isNegative()||c.gt(r);)a-=s,A=gt(a,this.unsigned),c=A.mul(e);A.isZero()&&(A=gr),o=o.add(A),r=r.sub(c)}return o};b.div=b.divide;b.modulo=function(e){if(qe(e)||(e=yt(e)),ht){var n=(this.unsigned?ht.rem_u:ht.rem_s)(this.low,this.high,e.low,e.high);return ae(n,ht.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};b.mod=b.modulo;b.rem=b.modulo;b.not=function(){return ae(~this.low,~this.high,this.unsigned)};b.and=function(e){return qe(e)||(e=yt(e)),ae(this.low&e.low,this.high&e.high,this.unsigned)};b.or=function(e){return qe(e)||(e=yt(e)),ae(this.low|e.low,this.high|e.high,this.unsigned)};b.xor=function(e){return qe(e)||(e=yt(e)),ae(this.low^e.low,this.high^e.high,this.unsigned)};b.shiftLeft=function(e){return qe(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?ae(this.low< >>32-e,this.unsigned):ae(0,this.low< >>e|this.high<<32-e,this.high>>e,this.unsigned):ae(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};b.shr=b.shiftRight;b.shiftRightUnsigned=function(e){if(qe(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var a=this.low;return ae(a>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?ae(n,0,this.unsigned):ae(n>>>e-32,0,this.unsigned)};b.shru=b.shiftRightUnsigned;b.shr_u=b.shiftRightUnsigned;b.toSigned=function(){return this.unsigned?ae(this.low,this.high,!1):this};b.toUnsigned=function(){return this.unsigned?this:ae(this.low,this.high,!0)};b.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};b.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};b.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};re.fromBytes=function(e,n,a){return a?re.fromBytesLE(e,n):re.fromBytesBE(e,n)};re.fromBytesLE=function(e,n){return new re(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};re.fromBytesBE=function(e,n){return new re(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}});function Fv(t){let e=t.defaultSampleType,n=t.sampleType,a=n.length-1;if(!e||!+e)return a;let r=n.findIndex(o=>o.type===e);return r===-1?a:r}function Ru(t){if(t.byteLength===0)return null;let e;try{e=ku.perftools.profiles.Profile.decode(new Uint8Array(t))}catch{return null}function n(h){return typeof h=="number"?h:h.low}function a(h){return e.stringTable[n(h)]||null}let r=new Map;function o(h){let{name:f,filename:I,startLine:u}=h,g=f!=null&&a(f)||"(unknown)",p=I!=null?a(I):null,C=u!=null?+u:null,E={key:`${g}:${p}:${C}`,name:g};return p!=null&&(E.file=p),C!=null&&(E.line=C),E}for(let h of e.function)if(h.id){let f=o(h);f!=null&&r.set(n(h.id),f)}function i(h){let{line:f}=h;if(f==null)return null;let I=te(f);if(I==null)return null;if(I.functionId){let u=r.get(n(I.functionId)),g=I.line instanceof Du.default?I.line.toNumber():I.line;return g&&g>0&&u!=null&&(u.line=g),u||null}else return null}let l=new Map;for(let h of e.location)if(h.id!=null){let f=i(h);f&&l.set(n(h.id),f)}let s=e.sampleType.map(h=>({type:h.type&&a(h.type)||"samples",unit:h.unit&&a(h.unit)||"count"})),A=Fv(e);if(A<0||A>=s.length)return null;let c=s[A],_=new le;switch(c.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":_.setValueFormatter(new ee(c.unit));break;case"bytes":_.setValueFormatter(new ze);break}for(let h of e.sample){let f=h.locationId?h.locationId.map(u=>l.get(n(u))):[];if(f.reverse(),h.value==null||h.value.length<=A)return null;let I=h.value[A];_.appendSampleWithWeight(f.filter(u=>u!=null),+I)}return _.build()}var ku,Du,Fu=ie(()=>{"use strict";ku=_e(Iu());He();W();Te();Du=_e(Nu())});function Tv(t){return xe(Lv,t,e=>{let n=e.url,a=e.lineNumber,r=e.columnNumber,o=e.functionName||(n?`(anonymous ${n.split("/").pop()}:${a})`:"(anonymous)");return{key:`${o}:${n}:${a}:${r}`,name:o,file:n,line:a,col:r}})}function pA(t){let e=new Map,n=0,a=(s,A)=>{s.id=n++,e.set(s.id,s),A&&(s.parent=A.id),s.children.forEach(c=>a(c,s))};a(t.head);let r=s=>{if(s.children.length===0)return s.selfSize||0;let A=s.children.reduce((c,_)=>(c+=r(_),c),s.selfSize);return s.totalSize=A,A},o=r(t.head),i=[];for(let s of e.values()){let A=[];for(A.push(s);s.parent!==void 0;){let c=e.get(s.parent);if(c===void 0)break;A.unshift(c),s=c}i.push(A)}let l=new le(o);for(let s of i){let A=s[s.length-1];l.appendSampleWithWeight(s.map(c=>Tv(c.callFrame)),A.selfSize)}return l.setValueFormatter(new ze),l.build()}var Lv,Lu=ie(()=>{"use strict";He();W();Te();Lv=new Map});function Wo(t,e){return`${rn(""+t,10)}:${rn(""+e,10)}`}function Tu(t){let e=new Map;for(let n of t)xe(e,Wo(Number(n.pid),Number(n.tid)),()=>[]).push(n);return e}function Mv(t,e){if(t.length===0&&e.length===0)throw new Error("This method should not be given both queues empty");if(e.length===0)return"B";if(t.length===0)return"E";let n=t[0],a=e[0],r=n.ts,o=a.ts;return r 0){let i=Number.MAX_SAFE_INTEGER;for(let l of t)i=Math.min(i,l.ts);for(let l of t)l.ts-=i}let a=[];for(let i of t)switch(i.ph){case"B":{e.push(i);break}case"E":{n.push(i);break}case"X":{a.push(i);break}default:return i}function r(i){return i.dur??i.tdur??0}a.sort((i,l)=>{if(i.ts l.ts)return 1;let s=r(i),A=r(l);return s>A?-1:sl.ts?1:0}return e.sort(o),n.sort(o),[e,n]}function Uv(t){let e=[];for(let n of t)switch(n.ph){case"B":case"E":case"X":e.push(n)}return e}function Hu(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="process_name"&&n.args&&n.args.name&&e.set(n.pid,n.args.name);return e}function Mu(t){let e=new Map;for(let n of t)n.ph==="M"&&n.name==="thread_name"&&n.args&&n.args.name&&e.set(Wo(n.pid,n.tid),n.args.name);return e}function Ju(t){return`${t.name||"(unnamed)"}`}function mA(t){let e=Ju(t);return t.args&&(e+=` ${JSON.stringify(t.args)}`),e}function Mn(t,e="UNKNOWN"){if(e==="HERMES"){let a=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:Ju(t),key:a,file:t.args.url,line:t.args.line,col:t.args.column}}let n=mA(t);return{name:n,key:n}}function Uu(t,e,n,a){return t!=null&&e!=null?`${t} (pid ${n}), ${e} (tid ${a})`:t!=null?`${t} (pid ${n}, tid ${a})`:e!=null?`${e} (pid ${n}, tid ${a})`:`pid ${n}, tid ${a}`}function Kv(t,e){let n=Hu(t),a=Mu(t),r=new Map;return e.forEach(o=>{if(o.length===0)return;let i=Number(o[0].pid),l=Number(o[0].tid),s=Wo(i,l),A=n.get(i),c=a.get(s),_=Uu(A,c,i,l);r.set(s,_)}),r}function Pv(t,e){let n=Hu(t),a=Mu(t),r=new Map;return e.forEach(o=>{if(o.length===0)return;let{pid:i,tid:l}=o[0],s=Wo(i,l),A=n.get(i),c=a.get(s),_=Uu(A,c,i,l);r.set(s,_)}),r}function Ov(t,e,n="UNKNOWN"){let[a,r]=Jv(t),o=new me;o.setValueFormatter(new ee("microseconds")),o.setName(e);let i=[],l=A=>{i.push(A),o.enterFrame(Mn(A,n),A.ts)},s=A=>{let c=te(i);if(c==null){console.warn(`Tried to end frame "${Mn(A,n).key}", but the stack was empty. Doing nothing instead.`);return}let _=Mn(A,n),h=Mn(c,n);if(A.name!==c.name){console.warn(`ts=${A.ts}: Tried to end "${_.key}" when "${h.key}" was on the top of the stack. Doing nothing instead.`);return}_.key!==h.key&&console.warn(`ts=${A.ts}: Tried to end "${_.key}" when "${h.key}" was on the top of the stack. Ending ${h.key} instead.`),i.pop(),o.leaveFrame(h,A.ts)};for(;a.length>0||r.length>0;){let A=Mv(a,r);switch(A){case"B":{l(a.shift());break}case"E":{let _=te(i);if(_!=null){let f=Mn(_,n),I=!1;for(let u=1;u r[0].ts)break;let p=Mn(g,n);if(f.key===p.key){let C=r[0];r[0]=r[u],r[u]=C,I=!0;break}}if(!I)for(let u=1;u r[0].ts)break;if(g.name===_.name){let p=r[0];r[0]=r[u],r[u]=p,I=!0;break}}}let h=r.shift();s(h);break}default:return A}}for(let A=i.length-1;A>=0;A--){let c=Mn(i[A],n);console.warn(`Frame "${c.key}" was still open at end of profile. Closing automatically.`),o.leaveFrame(c,o.getTotalWeight())}return o.build()}function Gv(t){let e=[],n=Number(t[0].ts);return t.forEach((a,r)=>{if(r===0)return;let o=Number(a.ts)-n;n=Number(a.ts),e.push(o)}),e.push(0),e}function zv({name:t,category:e}){return{key:`${t}:${e}`,name:t}}function Vv(t,e){let n=[],a=e;for(;a;){let r=t[a];if(!r)throw new Error(`Could not find frame for id ${a}`);n.push(zv(r)),a=r.parent}return n.reverse()}function Yv(t,e,n){let a=new le;a.setValueFormatter(new ee("microseconds")),a.setName(n);let r=Gv(e);return e.forEach((o,i)=>{let l=r[i],s=Vv(t.stackFrames,o.sf);a.appendSampleWithWeight(s,l)}),a.build()}function CA(t,e="UNKNOWN"){let n=Uv(t),a=Tu(n),r=Pv(t,a),o=[];return r.forEach((i,l)=>{let s=a.get(l);if(!s)throw new Error(`Could not find events for key: ${s}`);o.push([l,Ov(s,i,e)])}),Ue(o,i=>i[0]),{name:"",indexToView:0,profiles:o.map(i=>i[1])}}function Wv(t){let e=Tu(t.samples),n=Kv(t.traceEvents,e),a=[];return n.forEach((r,o)=>{let i=e.get(o);if(!i)throw new Error(`Could not find samples for key: ${i}`);i.length!==0&&a.push([o,Yv(t,i,r)])}),Ue(a,r=>r[0]),{name:"",indexToView:0,profiles:a.map(r=>r[1])}}function aa(t){if(!Array.isArray(t)||t.length===0)return!1;for(let e of t){if(!("ph"in e))return!1;switch(e.ph){case"B":case"E":case"X":if(!("ts"in e))return!1;case"M":break}}return!0}function qv(t){return t?Hv.every(e=>e in t):!1}function $v(t){return aa(t)?qv(t[0].args):!1}function Ku(t){return"traceEvents"in t?aa(t.traceEvents):!1}function Zv(t){return"traceEvents"in t&&"stackFrames"in t&&"samples"in t&&aa(t.traceEvents)}function Pu(t){return Ku(t)||aa(t)}function Ou(t){return Zv(t)?Wv(t):Ku(t)?CA(t.traceEvents):$v(t)?CA(t,"HERMES"):aa(t)?CA(t):t}var Hv,Gu=ie(()=>{"use strict";W();He();Te();Hv=["line","column","name","category","url","params","allocatedCategory","allocatedName"]});function vA(t,e){return new yA(t,e).parse()}var IA,yA,zu=ie(()=>{"use strict";He();W();Te();IA=class{constructor(e,n){this.fileName=e;this.fieldName=n;this.frameSet=new Bt;this.totalWeights=new Map;this.childrenTotalWeights=new Map}getOrInsertFrame(e){return Ce.getOrInsert(this.frameSet,e)}addToTotalWeight(e,n){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+n):this.totalWeights.set(e,n)}addSelfWeight(e,n){this.addToTotalWeight(this.getOrInsertFrame(e),n)}addChildWithTotalWeight(e,n,a){let r=this.getOrInsertFrame(e),o=this.getOrInsertFrame(n),i=xe(this.childrenTotalWeights,r,l=>new Map);i.has(o)?i.set(o,i.get(o)+a):i.set(o,a),this.addToTotalWeight(r,a)}toProfile(){let e=new me,n=1;this.fieldName==="Time_(10ns)"?(e.setName(`${this.fileName} -- Time`),n=10,e.setValueFormatter(new ee("nanoseconds"))):this.fieldName=="Memory_(bytes)"?(e.setName(`${this.fileName} -- Memory`),e.setValueFormatter(new ze)):e.setName(`${this.fileName} -- ${this.fieldName}`);let a=0,r=new Set,o=0;for(let[s,A]of this.totalWeights)o=Math.max(o,A);let i=(s,A)=>{if(r.has(s)||A<1e-4*o)return;let c=sa(this.totalWeights,s,()=>0);if(c===0)return;let _=A;e.enterFrame(s,Math.round(a*n)),r.add(s);for(let[h,f]of this.childrenTotalWeights.get(s)||[]){let I=A*(f/c),u=a;i(h,I);let g=a-u;_-=g}r.delete(s),a+=_,e.leaveFrame(s,Math.round(a*n))},l=new Set(this.frameSet);for(let[s,A]of this.childrenTotalWeights)for(let[c,_]of A)l.delete(c);for(let s of l)i(s,this.totalWeights.get(s));return e.build()}},yA=class{constructor(e,n){this.importedFileName=n;this.callGraphs=null;this.eventsLine=null;this.filename=null;this.functionName=null;this.calleeFilename=null;this.calleeFunctionName=null;this.savedFileNames={};this.savedFunctionNames={};this.prevCostLineNumbers=[];this.lines=[...e.splitLines()],this.lineNum=0}parse(){for(;this.lineNum e.toProfile())}:null}frameInfo(){let e=this.filename||"(unknown)",n=this.functionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}calleeFrameInfo(){let e=this.calleeFilename||this.filename||"(unknown)",n=this.calleeFunctionName||"(unknown)";return{key:`${e}:${n}`,name:n,file:e}}parseHeaderLine(e){let n=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!n)return!1;if(n[1]!=="events")return!0;let a=n[2].split(" ");if(this.callGraphs!=null)throw new Error(`Duplicate "events: " lines specified. First was "${this.eventsLine}", now received "${e}" on ${this.lineNum}.`);return this.callGraphs=a.map(r=>new IA(this.importedFileName,r)),!0}parseAssignmentLine(e){let n=/^(\w+)=\s*(.*)$/.exec(e);if(!n)return!1;let a=n[1],r=n[2];switch(a){case"fe":case"fi":{this.parseNameWithCompression(r,this.savedFileNames);break}case"fl":{this.filename=this.parseNameWithCompression(r,this.savedFileNames);break}case"fn":{this.functionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"cfi":case"cfl":{this.calleeFilename=this.parseNameWithCompression(r,this.savedFileNames);break}case"cfn":{this.calleeFunctionName=this.parseNameWithCompression(r,this.savedFunctionNames);break}case"calls":{this.parseCostLine(this.lines[this.lineNum++],"child"),this.calleeFilename=null,this.calleeFunctionName=null;break}case"cob":case"ob":break;default:console.log(`Ignoring assignment to unrecognized key "${e}" on line ${this.lineNum}`)}return!0}parseNameWithCompression(e,n){{let a=/^\((\d+)\)\s*(.+)$/.exec(e);if(a){let r=a[1],o=a[2];if(r in n)throw new Error(`Redefinition of name with id: ${r}. Original value was "${n[r]}". Tried to redefine as "${o}" on line ${this.lineNum}.`);return n[r]=o,o}}{let a=/^\((\d+)\)$/.exec(e);if(a){let r=a[1];if(!(r in n))throw new Error(`Tried to use name with id ${r} on line ${this.lineNum} before it was defined.`);return n[r]}}return e}parseCostLine(e,n){let a=e.split(/\s+/),r=[];for(let i=0;i !/^$|^Log closed$|log opened/.exec(p)),a=-1,r=g(n[0]);if(r===null)throw Error;a=r.at;let o=te(n);if(o===null)throw Error;let i=g(o);if(i===null)throw Error;let l=i.at,s=new Bt,A=[],c=0,_,h=-1;function f(p,C,y){function E(Q,N){A.push(N),e.enterFrame(Ce.getOrInsert(s,{name:N,key:N}),Q),c=Q}h>-1&&(h=-1,_===y&&h>=c&&f(p,h,`QUEUE ${y}`));let v=`STACK ${p}`;[...A].reverse().find(Q=>Q.startsWith("STACK "))!==v&&(A.length===1&&I(c),E(C,v)),E(C,y)}function I(p){let C=A.pop();if(C===void 0)throw Error("Tried to leave frame when nothing was on stack.");e.leaveFrame(Ce.getOrInsert(s,{name:C,key:C}),p);let y=te(A);y!==null&&y.startsWith("QUEUE ")&&(I(p),y=te(A)),A.length>1&&y!==null&&y.startsWith("STACK ")&&I(p),c=p}function u(p,C,y){te(A)===y?I(C):c===0?(console.log(`Tried to leave frame "${y}" which was never entered. Assuming it has been running since the start.`),f(p,0,y),I(C)):console.log(`Tried to leave frame "${y}" which was never entered. Other events have happened since the start, ignoring line.`)}function g(p){if(p===void 0)throw Error("Probably tried to import empty file.");let C=p.split(":");return C.length<3?null:a!==-1?{at:parseInt(C[0])-a,event:C[1],stackInt:parseInt(C[2]),name:C[5]}:{at:parseInt(C[0]),event:C[1],stackInt:parseInt(C[2]),name:C[5]}}for(n.forEach((p,C,y)=>{let E=g(p);if(E!==null){if(E.event==="PUSH"){f(E.stackInt,E.at,E.name),C+=1;let v=g(y[C]);for(;v!==null&&v.at===E.at;)v.name===E.name&&v.stackInt===E.stackInt&&v.event==="POP"?(u(v.stackInt,v.at,v.name),y.splice(C,1),v=null):(C+=1,C 0;)I(l);return e.build()}var Yu=ie(()=>{"use strict";He();W();Te()});var Wu={};wA(Wu,{importFromFileSystemDirectoryEntry:()=>aE,importProfileGroupFromBase64:()=>eE,importProfileGroupFromText:()=>Xv,importProfilesFromArrayBuffer:()=>nE,importProfilesFromFile:()=>tE});async function Xv(t,e){return await qo(new Uo(t,e))}async function eE(t,e){return await qo(en.fromArrayBuffer(t,PA(e).buffer))}async function tE(t){return qo(en.fromFile(t))}async function nE(t,e){return qo(en.fromArrayBuffer(t,e))}async function qo(t){let e=await t.name(),n=await rE(t);if(n){n.name||(n.name=e);for(let a of n.profiles)a&&!a.getName()&&a.setName(e);return n}return null}function Re(t){return t?{name:t.getName(),indexToView:0,profiles:[t]}:null}async function rE(t){let e=await t.name(),n=await t.readAsArrayBuffer();{let o=Ru(n);if(o)return console.log("Importing as protobuf encoded pprof file"),Re(o)}let a=await t.readAsText();if(e.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),Ti(a.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline Object"),Dr(a.parseAsJSON().traceEvents,e);if(e.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline"),Dr(a.parseAsJSON(),e);if(e.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),Re(gl(a.parseAsJSON()));if(e.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),Re(Zl(a));if(e.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),tA(a);if(e.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),Re(Xl(a));if(e.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),Re(eA(a.parseAsJSON()));if(e.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),Re(pA(a.parseAsJSON()));if(e.endsWith("-recording.json"))return console.log("Importing as Safari profile"),Re(rA(a.parseAsJSON()));if(e.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),vA(a,e);let r;try{r=a.parseAsJSON()}catch{}if(r){if(r.$schema==="https://www.speedscope.app/file-format-schema.json")return console.log("Importing as speedscope json file"),Ti(r);if(r.systemHost&&r.systemHost.name=="Firefox")return console.log("Importing as Firefox profile"),Re(dd(r));if(hl(r))return console.log("Importing as Chrome Timeline"),Dr(r,e);if(gh(r))return console.log("Importing as Chrome Timeline Object"),Dr(r.traceEvents,e);if("nodes"in r&&"samples"in r&&"timeDeltas"in r)return console.log("Importing as Chrome CPU Profile"),Re(vo(r));if(Pu(r))return console.log("Importing as Trace Event Format profile"),Ou(r);if("head"in r&&"samples"in r&&"timestamps"in r)return console.log("Importing as Chrome CPU Profile (old format)"),Re(dh(r));if("mode"in r&&"frames"in r&&"raw_timestamp_deltas"in r)return console.log("Importing as stackprof profile"),Re(gl(r));if("code"in r&&"functions"in r&&"ticks"in r)return console.log("Importing as --prof-process v8 log"),Re(eA(r));if("head"in r&&"selfSize"in r.head)return console.log("Importing as Chrome Heap Profile"),Re(pA(r));if("rts_arguments"in r&&"initial_capabilities"in r)return console.log("Importing as Haskell GHC JSON Profile"),md(r);if("recording"in r&&"sampleStackTraces"in r.recording)return console.log("Importing as Safari profile"),Re(rA(r))}else{if(/^# callgrind format/.exec(a.firstChunk())||/^events:/m.exec(a.firstChunk())&&/^fn=/m.exec(a.firstChunk()))return console.log("Importing as Callgrind profile"),vA(a,e);if(/^[\w \t\(\)]*\tSymbol Name/.exec(a.firstChunk()))return console.log("Importing as Instruments.app deep copy"),Re(Zl(a));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(a.firstChunk()))return console.log("Importing as Papyrus profile"),Re(Vu(a));let o=tA(a);if(o)return console.log("Importing from linux perf script output"),o;let i=Xl(a);if(i)return console.log("Importing as collapsed stack format"),Re(i)}return null}async function aE(t){return _d(t)}var qu=ie(()=>{"use strict";uh();fh();hd();gd();ud();Hi();fd();Cd();Id();yd();Wl();Fu();W();Lu();Gu();zu();Yu()});var $u=x((DN,oE)=>{oE.exports="./perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt"});var U,sf,pr,ei,NA,bA,kA,DA,Ht={},ti=[],cf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function Cn(t,e){for(var n in e)t[n]=e[n];return t}function RA(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,n){var a,r=arguments,o={};for(a in e)a!=="key"&&a!=="ref"&&(o[a]=e[a]);if(arguments.length>3)for(n=[n],a=3;a =this.capacity;)this.map.delete(this.list.pop().data);let r=this.list.prepend(new oi(e));this.map.set(e,{value:n,listNode:r})}getOrInsert(e,n){let a=this.get(e);return a==null&&(a=n(e),this.insert(e,a)),a}removeLRU(){let e=this.list.pop();if(!e)return null;let n=e.data,a=this.map.get(n).value;return this.map.delete(n),[n,a]}clear(){this.list=new _a,this.map=new Map}};function Se(t,e,n){return t n?n:t}var B=class t{constructor(e,n){this.x=e;this.y=n}withX(e){return new t(e,this.y)}withY(e){return new t(this.x,e)}plus(e){return new t(this.x+e.x,this.y+e.y)}minus(e){return new t(this.x-e.x,this.y-e.y)}times(e){return new t(this.x*e,this.y*e)}timesPointwise(e){return new t(this.x*e.x,this.y*e.y)}dividedByPointwise(e){return new t(this.x/e.x,this.y/e.y)}dot(e){return this.x*e.x+this.y*e.y}equals(e){return this.x===e.x&&this.y===e.y}approxEquals(e,n=1e-9){return Math.abs(this.x-e.x) =0&&e<=31),t.TEXTURE0+e}var z;(f=>{class t{constructor(u=0,g=0,p=0,C=0){this.x=u;this.y=g;this.width=p;this.height=C}set(u,g,p,C){this.x=u,this.y=g,this.width=p,this.height=C}equals(u){return this.x===u.x&&this.y===u.y&&this.width===u.width&&this.height===u.height}}f.Rect=t;class e{constructor(u,g,p,C){this.redF=u;this.greenF=g;this.blueF=p;this.alphaF=C}equals(u){return this.redF===u.redF&&this.greenF===u.greenF&&this.blueF===u.blueF&&this.alphaF===u.alphaF}static{this.TRANSPARENT=new e(0,0,0,0)}}f.Color=e;let n;(w=>(w[w.ZERO=0]="ZERO",w[w.ONE=1]="ONE",w[w.SOURCE_COLOR=2]="SOURCE_COLOR",w[w.TARGET_COLOR=3]="TARGET_COLOR",w[w.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",w[w.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",w[w.SOURCE_ALPHA=6]="SOURCE_ALPHA",w[w.TARGET_ALPHA=7]="TARGET_ALPHA",w[w.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",w[w.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",w[w.CONSTANT=10]="CONSTANT",w[w.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"))(n=f.BlendOperation||={});let a;(g=>(g[g.TRIANGLES=0]="TRIANGLES",g[g.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"))(a=f.Primitive||={});class r{constructor(){this.resizeEventHandlers=new Set}setCopyBlendState(){this.setBlendState(1,0)}setAddBlendState(){this.setBlendState(1,1)}setPremultipliedBlendState(){this.setBlendState(1,8)}setUnpremultipliedBlendState(){this.setBlendState(6,8)}addAfterResizeEventHandler(u){this.resizeEventHandlers.add(u)}removeAfterResizeEventHandler(u){this.resizeEventHandlers.delete(u)}}f.Context=r;let o;(g=>(g[g.FLOAT=0]="FLOAT",g[g.BYTE=1]="BYTE"))(o=f.AttributeType||={});function i(I){return I==0?4:1}f.attributeByteLength=i;class l{constructor(u,g,p,C){this.name=u;this.type=g;this.count=p;this.byteOffset=C}}f.Attribute=l;class s{constructor(){this._attributes=[];this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(u,g,p){return this.attributes.push(new l(u,g,p,this.stride)),this._stride+=p*i(g),this}}f.VertexFormat=s;class A{uploadFloat32Array(u){this.upload(new Uint8Array(u.buffer),0)}uploadFloats(u){this.uploadFloat32Array(new Float32Array(u))}}f.VertexBuffer=A;let c;(g=>(g[g.NEAREST=0]="NEAREST",g[g.LINEAR=1]="LINEAR"))(c=f.PixelFilter||={});let _;(g=>(g[g.REPEAT=0]="REPEAT",g[g.CLAMP=1]="CLAMP"))(_=f.PixelWrap||={});class h{constructor(u,g,p){this.minFilter=u;this.magFilter=g;this.wrap=p}static{this.LINEAR_CLAMP=new h(1,1,1)}static{this.LINEAR_MIN_NEAREST_MAG_CLAMP=new h(1,0,1)}static{this.NEAREST_CLAMP=new h(0,0,1)}}f.TextureFormat=h})(z||={});var li;(f=>{class t extends z.Context{constructor(g=document.createElement("canvas")){super();this._attributeCount=0;this._blendOperations=0;this._contextResetHandlers=[];this._currentClearColor=z.Color.TRANSPARENT;this._currentRenderTarget=null;this._defaultViewport=new z.Rect;this._forceStateUpdate=!0;this._generation=1;this._height=0;this._oldBlendOperations=0;this._oldRenderTarget=null;this._oldViewport=new z.Rect;this._width=0;this.handleWebglContextRestored=()=>{this._attributeCount=0,this._currentClearColor=z.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let g of this._contextResetHandlers)g()};this.ANGLE_instanced_arrays=null;this.ANGLE_instanced_arrays_generation=-1;let p=g.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(p==null)throw new Error("Setup failure");this._gl=p;let C=g.style;g.width=0,g.height=0,C.width=C.height="0",g.addEventListener("webglcontextlost",y=>{y.preventDefault()}),g.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={0:this._gl.ZERO,1:this._gl.ONE,2:this._gl.SRC_COLOR,3:this._gl.DST_COLOR,4:this._gl.ONE_MINUS_SRC_COLOR,5:this._gl.ONE_MINUS_DST_COLOR,6:this._gl.SRC_ALPHA,7:this._gl.DST_ALPHA,8:this._gl.ONE_MINUS_SRC_ALPHA,9:this._gl.ONE_MINUS_DST_ALPHA,10:this._gl.CONSTANT_COLOR,11:this._gl.ONE_MINUS_CONSTANT_COLOR}}get widthInPixels(){return this._width}get heightInPixels(){return this._height}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(g){Cf(this._contextResetHandlers,g)}removeContextResetHandler(g){mf(this._contextResetHandlers,g)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(g,p){this._blendOperations=t._packBlendModes(g,p)}setViewport(g,p,C,y){(this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport).set(g,p,C,y)}get viewport(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return this._currentRenderTarget!=null?this._currentRenderTarget.viewport.height:this._height}draw(g,p,C){this._updateRenderTargetAndViewport(),A.from(p).prepare(),c.from(C).prepare(),this._updateFormat(p.format),this._updateBlendState(),this._gl.drawArrays(g==0?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(C.byteCount/p.format.stride)),this._forceStateUpdate=!1}resize(g,p,C,y){let E=this._gl.canvas,v=E.getBoundingClientRect();if(this._width===g&&this._height===p&&v.width===C&&v.height===y)return;let Q=E.style;E.width=g,E.height=p,Q.width=`${C}px`,Q.height=`${y}px`,this.setViewport(0,0,g,p),this._width=g,this._height=p,this.resizeEventHandlers.forEach(N=>N())}clear(g){this._updateRenderTargetAndViewport(),this._updateBlendState(),g.equals(this._currentClearColor)||(this._gl.clearColor(g.redF,g.greenF,g.blueF,g.alphaF),this._currentClearColor=g),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(g){this._currentRenderTarget=h.from(g)}createMaterial(g,p,C){let y=new A(this,g,p,C);return y.program,y}createVertexBuffer(g){return G(g>0&&g%4==0),new c(this,g)}createTexture(g,p,C,y){return new _(this,g,p,C,y)}createRenderTarget(g){return new h(this,_.from(g))}getANGLE_instanced_arrays(){if(this.ANGLE_instanced_arrays_generation!==this._generation&&(this.ANGLE_instanced_arrays=null),!this.ANGLE_instanced_arrays&&(this.ANGLE_instanced_arrays=this.gl.getExtension("ANGLE_instanced_arrays"),!this.ANGLE_instanced_arrays))throw new Error("Failed to get extension ANGLE_instanced_arrays");return this.ANGLE_instanced_arrays}_updateRenderTargetAndViewport(){let g=this._currentRenderTarget,p=g!=null?g.viewport:this._defaultViewport,C=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=g)&&(C.bindFramebuffer(C.FRAMEBUFFER,g?g.framebuffer:null),this._oldRenderTarget=g),(this._forceStateUpdate||!this._oldViewport.equals(p))&&(C.viewport(p.x,this.renderTargetHeightInPixels-p.y-p.height,p.width,p.height),this._oldViewport.set(p.x,p.y,p.width,p.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let g=this._gl,p=this._blendOperations,C=this._oldBlendOperations,y=p&15,E=p>>4;G(y in this._blendOperationMap),G(E in this._blendOperationMap),p==t.COPY_BLEND_OPERATIONS?g.disable(g.BLEND):((this._forceStateUpdate||C==t.COPY_BLEND_OPERATIONS)&&g.enable(g.BLEND),g.blendFunc(this._blendOperationMap[y],this._blendOperationMap[E])),this._oldBlendOperations=p}}_updateFormat(g){let p=this._gl,C=g.attributes,y=C.length;for(let E=0;E y;)this._attributeCount--,p.disableVertexAttribArray(this._attributeCount);this._attributeCount=y}getWebGLInfo(){let g=this.gl.getExtension("WEBGL_debug_renderer_info"),p=g?this.gl.getParameter(g.UNMASKED_RENDERER_WEBGL):null,C=g?this.gl.getParameter(g.UNMASKED_VENDOR_WEBGL):null,y=this.gl.getParameter(this.gl.VERSION);return{renderer:p,vendor:C,version:y}}static from(g){return G(g==null||g instanceof t),g}static _packBlendModes(g,p){return g|p<<4}static{this.COPY_BLEND_OPERATIONS=t._packBlendModes(1,0)}}f.Context=t;class e{constructor(u,g,p=0,C=null,y=!0){this._material=u;this._name=g;this._generation=p;this._location=C;this._isDirty=y}get location(){let u=t.from(this._material.context);if(this._generation!=u.generation&&(this._location=u.gl.getUniformLocation(this._material.program,this._name),this._generation=u.generation,!ii)){let g=this._material.program,p=u.gl;for(let C=0,y=p.getProgramParameter(g,p.ACTIVE_UNIFORMS);C 0&&this._texture.height>0?this._texture.texture:null)}}class A{constructor(u,g,p,C,y={},E=[],v=0,Q=null){this._context=u;this._format=g;this._vertexSource=p;this._fragmentSource=C;this._uniformsMap=y;this._uniformsList=E;this._generation=v;this._program=Q}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new n(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),G(p instanceof n),p.set(g)}setUniformInt(u,g){let p=this._uniformsMap[u]||null;p==null&&(p=new a(this,u),this._uniformsMap[u]=p,this._uniformsList.push(p)),G(p instanceof a),p.set(g)}setUniformVec2(u,g,p){let C=this._uniformsMap[u]||null;C==null&&(C=new r(this,u),this._uniformsMap[u]=C,this._uniformsList.push(C)),G(C instanceof r),C.set(g,p)}setUniformVec3(u,g,p,C){let y=this._uniformsMap[u]||null;y==null&&(y=new o(this,u),this._uniformsMap[u]=y,this._uniformsList.push(y)),G(y instanceof o),y.set(g,p,C)}setUniformVec4(u,g,p,C,y){let E=this._uniformsMap[u]||null;E==null&&(E=new i(this,u),this._uniformsMap[u]=E,this._uniformsList.push(E)),G(E instanceof i),E.set(g,p,C,y)}setUniformMat3(u,g,p,C,y,E,v,Q,N,L){let S=this._uniformsMap[u]||null;S==null&&(S=new l(this,u),this._uniformsMap[u]=S,this._uniformsList.push(S)),G(S instanceof l),S.set(g,p,C,y,E,v,Q,N,L)}setUniformSampler(u,g,p){let C=this._uniformsMap[u]||null;C==null&&(C=new s(this,u),this._uniformsMap[u]=C,this._uniformsList.push(C)),G(C instanceof s),C.set(g,p)}get program(){let u=this._context.gl;if(this._generation!=this._context.generation){this._program=u.createProgram(),this._compileShader(u,u.VERTEX_SHADER,this.vertexSource),this._compileShader(u,u.FRAGMENT_SHADER,this.fragmentSource);let g=this.format.attributes;for(let p=0;p =0),G(0<=g&&g+C<=this._byteCount),G(0<=p&&p+C<=this._byteCount),this._bytes&&g!=p&&C!=0&&(this._bytes.set(this._bytes.subarray(g,this._byteCount),p),this._growDirtyRegion(Math.min(g,p),Math.max(g,p)+C))}upload(g,p=0){G(0<=p&&p+g.length<=this._byteCount),G(this._bytes!=null),this._bytes.set(g,p),this._growDirtyRegion(p,p+g.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let g=this._context.gl;this._generation!==this._context.generation&&(this._buffer=g.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),g.bindBuffer(g.ARRAY_BUFFER,this._buffer),this._isDirty&&(g.bufferData(g.ARRAY_BUFFER,this._byteCount,g.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin {let n=O.betweenRects(e.configSpaceSrcRect,e.physicalSpaceDstRect),a=new B(this.gl.viewport.width,this.gl.viewport.height);return O.withTranslation(new B(-1,1)).times(O.withScale(new B(2,-2).dividedByPointwise(a))).times(n)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLES,this.material,e.batch.getBuffer())}};var ue=class t{constructor(e=0,n=0,a=0,r=1){this.r=e;this.g=n;this.b=a;this.a=r}static fromLumaChromaHue(e,n,a){let r=a/60,o=n*(1-Math.abs(r%2-1)),[i,l,s]=r<1?[n,o,0]:r<2?[o,n,0]:r<3?[0,n,o]:r<4?[0,o,n]:r<5?[o,0,n]:[n,0,o],A=e-(.3*i+.59*l+.11*s);return new t(Se(i+A,0,1),Se(l+A,0,1),Se(s+A,0,1),1)}static fromCSSHex(e){if(e.length!==7||e[0]!=="#")throw new Error(`Invalid color input ${e}`);let n=parseInt(e.substr(1,2),16)/255,a=parseInt(e.substr(3,2),16)/255,r=parseInt(e.substr(5,2),16)/255;if(n<0||n>1||a<0||a>1||r<0||r>1)throw new Error(`Invalid color input ${e}`);return new t(n,a,r)}withAlpha(e){return new t(this.r,this.g,this.b,e)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}};var fa=class{constructor(e,n,a){this.gl=e;this.rectangleBatchRenderer=n;this.textureRenderer=a;this.texture=e.createTexture(z.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=e.createRenderTarget(this.texture),this.rowCache=new ha(this.texture.height),this.clearLineBatch=new mn(e),this.clearLineBatch.addRect(R.unit,new ue(0,0,0,0)),e.addContextResetHandler(()=>{this.rowCache.clear()})}has(e){return this.rowCache.has(e)}getResolution(){return this.texture.width}getCapacity(){return this.texture.height}allocateLine(e){if(this.rowCache.getSize() {for(let a of e){let r=this.rowCache.get(a);if(r!=null)continue;r=this.allocateLine(a);let o=new R(new B(0,r),new B(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:R.unit,physicalSpaceDstRect:o}),n(o,a)}})}renderViaAtlas(e,n){let a=this.rowCache.get(e);if(a==null)return!1;let r=new R(new B(0,a),new B(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:r,dstRect:n}),!0}};var Ef=` + uniform mat3 uvTransform; + uniform mat3 positionTransform; + + attribute vec2 position; + attribute vec2 uv; + varying vec2 vUv; + + void main() { + vUv = (uvTransform * vec3(uv, 1)).xy; + gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); + } +`,Bf=` + precision mediump float; + + varying vec2 vUv; + uniform sampler2D texture; + + void main() { + gl_FragColor = texture2D(texture, vUv); + } +`,pa=class{constructor(e){this.gl=e;let n=new z.VertexFormat;n.add("position",z.AttributeType.FLOAT,2),n.add("uv",z.AttributeType.FLOAT,2);let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let o of a)r.push(o.pos[0]),r.push(o.pos[1]),r.push(o.uv[0]),r.push(o.uv[1]);this.buffer=e.createVertexBuffer(n.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(n,Ef,Bf)}render(e){this.material.setUniformSampler("texture",e.texture,0),Qt(this.material,"uvTransform",(()=>{let{srcRect:n,texture:a}=e,o=O.withTranslation(new B(0,1)).times(O.withScale(new B(1,-1))).times(O.betweenRects(new R(B.zero,new B(a.width,a.height)),R.unit)).transformRect(n);return O.betweenRects(R.unit,o)})()),Qt(this.material,"positionTransform",(()=>{let{dstRect:n}=e,{viewport:a}=this.gl,r=new B(a.width,a.height),i=O.withScale(new B(1,-1)).times(O.betweenRects(new R(B.zero,r),R.NDC)).transformRect(n);return O.betweenRects(R.NDC,i)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var si=new z.VertexFormat;si.add("position",z.AttributeType.FLOAT,2);var jf=` + attribute vec2 position; + + void main() { + gl_Position = vec4(position, 0, 1); + } +`,Qf=t=>{let{r:e,g:n,b:a}=ue.fromCSSHex(t.fgSecondaryColor),r=`${e.toFixed(1)}, ${n.toFixed(1)}, ${a.toFixed(1)}`;return` + precision mediump float; + + uniform mat3 configSpaceToPhysicalViewSpace; + uniform vec2 physicalSize; + uniform vec2 physicalOrigin; + uniform vec2 configSpaceViewportOrigin; + uniform vec2 configSpaceViewportSize; + uniform float framebufferHeight; + + void main() { + vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy; + vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy; + + vec2 halfSize = physicalSize / 2.0; + + float borderWidth = 2.0; + + origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0); + size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0); + + vec2 coord = gl_FragCoord.xy; + coord.x = coord.x - physicalOrigin.x; + coord.y = framebufferHeight - coord.y - physicalOrigin.y; + vec2 clamped = clamp(coord, origin, origin + size); + vec2 gap = clamped - coord; + float maxdist = max(abs(gap.x), abs(gap.y)); + + // TOOD(jlfwong): Could probably optimize this to use mix somehow. + if (maxdist == 0.0) { + // Inside viewport rectangle + gl_FragColor = vec4(0, 0, 0, 0); + } else if (maxdist < borderWidth) { + // Inside viewport rectangle at border + gl_FragColor = vec4(${r}, 0.8); + } else { + // Outside viewport rectangle + gl_FragColor = vec4(${r}, 0.5); + } + } + `},Ca=class{constructor(e,n){this.gl=e;let a=[[-1,1],[1,1],[-1,-1],[1,-1]],r=[];for(let o of a)r.push(o[0]),r.push(o[1]);this.buffer=e.createVertexBuffer(si.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(r).buffer)),this.material=e.createMaterial(si,jf,Qf(n))}render(e){Qt(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),Ai(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),Ai(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);let n=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",n.x,n.y),this.material.setUniformVec2("physicalSize",n.width,n.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(z.BlendOperation.SOURCE_ALPHA,z.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var ma=new z.VertexFormat;ma.add("position",z.AttributeType.FLOAT,2);ma.add("uv",z.AttributeType.FLOAT,2);var wf=` + uniform mat3 uvTransform; + uniform mat3 positionTransform; + + attribute vec2 position; + attribute vec2 uv; + varying vec2 vUv; + + void main() { + vUv = (uvTransform * vec3(uv, 1)).xy; + gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1); + } +`,bf=t=>` + precision mediump float; + + uniform vec2 uvSpacePixelSize; + uniform float renderOutlines; + + varying vec2 vUv; + uniform sampler2D colorTexture; + + // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue + vec3 hcl2rgb(float H, float C, float L) { + float hPrime = H / 60.0; + float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0)); + vec3 RGB = + hPrime < 1.0 ? vec3(C, X, 0) : + hPrime < 2.0 ? vec3(X, C, 0) : + hPrime < 3.0 ? vec3(0, C, X) : + hPrime < 4.0 ? vec3(0, X, C) : + hPrime < 5.0 ? vec3(X, 0, C) : + vec3(C, 0, X); + + float m = L - dot(RGB, vec3(0.30, 0.59, 0.11)); + return RGB + vec3(m, m, m); + } + + float triangle(float x) { + return 2.0 * abs(fract(x) - 0.5) - 1.0; + } + + ${t} + + void main() { + vec4 here = texture2D(colorTexture, vUv); + + if (here.z == 0.0) { + // Background color + gl_FragColor = vec4(0, 0, 0, 0); + return; + } + + // Sample the 4 surrounding pixels in the depth texture to determine + // if we should draw a boundary here or not. + vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y)); + vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0)); + vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y)); + vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0)); + + // NOTE: For outline checks, we intentionally check both the right + // and the left to determine if we're an edge. If a rectangle is a single + // pixel wide, we don't want to render it as an outline, so this method + // of checking ensures that we don't outline single physical-space + // pixel width rectangles. + if ( + renderOutlines > 0.0 && + ( + here.y == N.y && here.y != S.y || // Top edge + here.y == S.y && here.y != N.y || // Bottom edge + here.x == E.x && here.x != W.x || // Left edge + here.x == W.x && here.x != E.x + ) + ) { + // We're on an edge! Draw transparent. + gl_FragColor = vec4(0, 0, 0, 0); + } else { + // Not on an edge. Draw the appropriate color. + gl_FragColor = vec4(colorForBucket(here.z), here.a); + } + } +`,Ia=class{constructor(e,n){this.gl=e;let a=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],r=[];for(let o of a)r.push(o.pos[0]),r.push(o.pos[1]),r.push(o.uv[0]),r.push(o.uv[1]);this.buffer=e.createVertexBuffer(ma.stride*a.length),this.buffer.uploadFloats(r),this.material=e.createMaterial(ma,wf,bf(n.colorForBucketGLSL))}render(e){let{srcRect:n,rectInfoTexture:a}=e,o=O.withTranslation(new B(0,1)).times(O.withScale(new B(1,-1))).times(O.betweenRects(new R(B.zero,new B(a.width,a.height)),R.unit)).transformRect(n),i=O.betweenRects(R.unit,o),{dstRect:l}=e,s=new B(this.gl.viewport.width,this.gl.viewport.height),c=O.withScale(new B(1,-1)).times(O.betweenRects(new R(B.zero,s),R.NDC)).transformRect(l),_=O.betweenRects(R.NDC,c),h=B.unit.dividedByPointwise(new B(e.rectInfoTexture.width,e.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",e.rectInfoTexture,0),Qt(this.material,"uvTransform",i),this.material.setUniformFloat("renderOutlines",e.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",h.x,h.y),Qt(this.material,"positionTransform",_),this.gl.setUnpremultipliedBlendState(),this.gl.draw(z.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var ya=class{constructor(e,n){this.animationFrameRequest=null;this.beforeFrameHandlers=new Set;this.onBeforeFrame=()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels);let e=ue.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new z.Color(e.r,e.g,e.b,e.a));for(let n of this.beforeFrameHandlers)n()};this.gl=new li.Context(e),this.rectangleBatchRenderer=new da(this.gl),this.textureRenderer=new pa(this.gl),this.viewportRectangleRenderer=new Ca(this.gl,n),this.flamechartColorPassRenderer=new Ia(this.gl,n),this.theme=n,this.gl.addAfterResizeEventHandler(this.onBeforeFrame);let a=this.gl.getWebGLInfo();a&&console.log(`WebGL initialized. renderer: ${a.renderer}, vendor: ${a.vendor}, version: ${a.version}`),window.testContextLoss=()=>{this.gl.testContextLoss()}}addBeforeFrameHandler(e){this.beforeFrameHandlers.add(e)}removeBeforeFrameHandler(e){this.beforeFrameHandlers.delete(e)}requestFrame(){this.animationFrameRequest||(this.animationFrameRequest=requestAnimationFrame(this.onBeforeFrame))}setViewport(e,n){let{origin:a,size:r}=e,o=this.gl.viewport;this.gl.setViewport(a.x,a.y,r.x,r.y),n();let{x:i,y:l,width:s,height:A}=o;this.gl.setViewport(i,l,s,A)}renderBehind(e,n){let a=e.getBoundingClientRect(),r=new R(new B(a.left*window.devicePixelRatio,a.top*window.devicePixelRatio),new B(a.width*window.devicePixelRatio,a.height*window.devicePixelRatio));this.setViewport(r,n)}};var an=Un(t=>e=>t.get(e.key)||0),Mt=Oe(({theme:t,frameToColorBucket:e})=>{let n=an(e);return a=>{let r=n(a)/255;return t.colorForBucket(r).toCSS()}}),Jt=Oe(({theme:t,canvas:e})=>new ya(e,t)),OA=Un(t=>new fa(t.gl,t.rectangleBatchRenderer,t.textureRenderer)),GA=Oe(({profile:t,flattenRecursion:e})=>e?t.getProfileWithRecursionFlattened():t),Ut=Un(t=>{let e=[];t.forEachFrame(o=>e.push(o));function n(o){return(o.file||"")+o.name}function a(o,i){return n(o)>n(i)?1:-1}e.sort(a);let r=new Map;for(let o=0;o =n.__.length&&n.__.push({}),n.__[t]}function Ge(t){return yr=1,$A(ZA,t)}function $A(t,e,n){var a=vr(Kn++,2);return a.__c||(a.__c=at,a.__=[n?n(e):ZA(void 0,e),function(r){var o=t(a.__[0],r);a.__[0]!==o&&(a.__[0]=o,a.__c.setState({}))}]),a.__}function Xe(t,e){var n=vr(Kn++,3);!U.__s&&di(n.__H,e)&&(n.__=t,n.__H=e,at.__H.__h.push(n))}function gi(t,e){var n=vr(Kn++,4);!U.__s&&di(n.__H,e)&&(n.__=t,n.__H=e,at.__h.push(n))}function on(t){return yr=5,ne(function(){return{current:t}},[])}function ne(t,e){var n=vr(Kn++,7);return di(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function K(t,e){return yr=8,ne(function(){return t},e)}function ot(t){var e=at.context[t.__c],n=vr(Kn++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(at)),e.props.value):t.__}function xf(){ci.some(function(t){if(t.__P)try{t.__H.__h.forEach(_i),t.__H.__h.forEach(hi),t.__H.__h=[]}catch(e){return t.__H.__h=[],U.__e(e,t.__v),!0}}),ci=[]}function _i(t){t.t&&t.t()}function hi(t){var e=t.__();typeof e=="function"&&(t.t=e)}function di(t,e){return!t||e.some(function(n,a){return n!==t[a]})}function ZA(t,e){return typeof e=="function"?e(t):e}U.__r=function(t){VA&&VA(t),Kn=0,(at=t.__c).__H&&(at.__H.__h.forEach(_i),at.__H.__h.forEach(hi),at.__H.__h=[])},U.diffed=function(t){YA&&YA(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(ci.push(e)!==1&&zA===U.requestAnimationFrame||((zA=U.requestAnimationFrame)||function(a){var r,o=function(){clearTimeout(i),cancelAnimationFrame(r),setTimeout(a)},i=setTimeout(o,100);typeof window<"u"&&(r=requestAnimationFrame(o))})(xf))}},U.__c=function(t,e){e.some(function(n){try{n.__h.forEach(_i),n.__h=n.__h.filter(function(a){return!a.__||hi(a)})}catch(a){e.some(function(r){r.__h&&(r.__h=[])}),e=[],U.__e(a,n.__v)}}),WA&&WA(t,e)},U.unmount=function(t){qA&&qA(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach(function(a){return a.t&&a.t()})}catch(a){U.__e(a,e.__v)}}};function is(t,e){for(var n in e)t[n]=e[n];return t}function fi(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}var hB=function(t){var e,n;function a(r){var o;return(o=t.call(this,r)||this).isPureReactComponent=!0,o}return n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,a.prototype.shouldComponentUpdate=function(r,o){return fi(this.props,r)||fi(this.state,o)},a}(be);function fe(t,e){function n(r){var o=this.props.ref,i=o==r.ref;return!i&&o&&(o.call?o(null):o.current=null),e?!e(this.props,r)||!i:fi(this.props,r)}function a(r){return this.shouldComponentUpdate=n,m(t,is({},r))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var XA=U.__b;U.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),XA&&XA(t)};var Nf=U.__e;function ls(t){return t&&((t=is({},t)).__c=null,t.__k=t.__k&&t.__k.map(ls)),t}function es(){this.__u=0,this.o=null,this.__b=null}function As(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function va(){this.i=null,this.l=null}U.__e=function(t,e,n){if(t.then){for(var a,r=e;r=r.__;)if((a=r.__c)&&a.__c)return a.__c(t,e.__c)}Nf(t,e,n)},(es.prototype=new be).__c=function(t,e){var n=this;n.o==null&&(n.o=[]),n.o.push(e);var a=As(n.__v),r=!1,o=function(){r||(r=!0,a?a(i):i())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){o(),e.__c&&e.__c()};var i=function(){var l;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});l=n.o.pop();)l.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(o,o)},es.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=ls(this.__b),this.__b=null),[m(be,null,e.u?null:t.children),e.u&&t.fallback]};var ts=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1] n()))}get(){return this.state}subscribe(e){this.observers.push(e)}unsubscribe(e){let n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}};function q(t){let[e,n]=Ge(t.get());return gi(()=>{n(t.get());function a(){n(t.get())}return t.subscribe(a),()=>{t.unsubscribe(a)}},[t]),e}function Df(t){switch(t){case"time-ordered":return 0;case"left-heavy":return 1;case"sandwich":return 2;default:return null}}function ss(t=window.location.hash){try{if(!t.startsWith("#"))return{};let e=t.substr(1).split("&"),n={};for(let a of e){let[r,o]=a.split("=");if(o=decodeURIComponent(o),r==="profileURL")n.profileURL=o;else if(r==="title")n.title=o;else if(r==="localProfilePath")n.localProfilePath=o;else if(r==="view"){let i=Df(o);i!==null?n.viewMode=i:console.error(`Ignoring invalid view specifier: ${o}`)}}return n}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}W();var Ea={hover:null,selectedNode:null,configSpaceViewportRect:R.empty,logicalSpaceViewportSize:B.zero},Ba=class extends Ne{constructor(){super(...arguments);this.setProfileGroup=n=>{this.set({name:n.name,indexToView:n.indexToView,profiles:n.profiles.map(a=>({profile:a,chronoViewState:Ea,leftHeavyViewState:Ea,sandwichViewState:{callerCallee:null}}))})};this.setProfileIndexToView=n=>{this.state!=null&&(n=Se(n,0,this.state.profiles.length-1),this.set({...this.state,indexToView:n}))};this.setSelectedFrame=n=>{this.state==null||this.getActiveProfile()==null||this.updateActiveSandwichViewState(r=>n==null?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:Ea,calleeFlamegraph:Ea,selectedFrame:n}})}}set(n){let a=this.state;a!=null&&n!=null&&Ir(a,n)||super.set(n)}getActiveProfile(){return this.state==null?null:this.state.profiles[this.state?.indexToView]||null}updateActiveProfileState(n){if(this.state==null)return;let{indexToView:a,profiles:r}=this.state;this.set({...this.state,profiles:r.map((o,i)=>i!=a?o:n(o))})}updateActiveSandwichViewState(n){this.updateActiveProfileState(a=>({...a,sandwichViewState:n(a.sandwichViewState)}))}updateFlamechartState(n,a){switch(n){case"CHRONO":{this.updateActiveProfileState(r=>({...r,chronoViewState:a(r.chronoViewState)}));break}case"LEFT_HEAVY":{this.updateActiveProfileState(r=>({...r,leftHeavyViewState:a(r.leftHeavyViewState)}));break}case"SANDWICH_CALLEES":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,calleeFlamegraph:a(r.callerCallee.calleeFlamegraph)}}));break}case"SANDWICH_INVERTED_CALLERS":{this.updateActiveSandwichViewState(r=>({...r,callerCallee:r.callerCallee==null?null:{...r.callerCallee,invertedCallerFlamegraph:a(r.callerCallee.invertedCallerFlamegraph)}}));break}}}setFlamechartHoveredNode(n,a){this.updateFlamechartState(n,r=>({...r,hover:a}))}setSelectedNode(n,a){this.updateFlamechartState(n,r=>({...r,selectedNode:a}))}setConfigSpaceViewportRect(n,a){this.updateFlamechartState(n,r=>({...r,configSpaceViewportRect:a}))}setLogicalSpaceViewportSize(n,a){this.updateFlamechartState(n,r=>({...r,logicalSpaceViewportSize:a}))}clearHoverNode(){this.setFlamechartHoveredNode("CHRONO",null),this.setFlamechartHoveredNode("LEFT_HEAVY",null),this.setFlamechartHoveredNode("SANDWICH_CALLEES",null),this.setFlamechartHoveredNode("SANDWICH_INVERTED_CALLERS",null)}};var Kt=new Ne(!1,"flattenRecursion"),Pn=new Ne(!1,"searchIsActive"),On=new Ne("","searchQueryAtom"),ln=new Ne(0,"viewMode"),Fe=new Ba(null,"profileGroup");ln.subscribe(()=>{Fe.clearHoverNode()});var _s=ss(),hs=new Ne(_s,"hashParams"),In=new Ne(null,"glCanvas"),Ci=new Ne(!1,"dragActive"),cs=window.location.protocol,ja=cs==="http:"||cs==="https:",Rf=ja&&_s.profileURL!=null,mi=new Ne(Rf,"loading"),Ii=new Ne(!1,"error");var Er=new Ne({field:1,direction:1},"tableSortMethod");function Qa(){let t=q(Kt),e=q(Fe);if(!e||e.indexToView>=e.profiles.length)return null;let n=e.indexToView,a=e.profiles[n];return{...e.profiles[e.indexToView],profile:GA({profile:a.profile,flattenRecursion:t}),index:e.indexToView}}var wa="speedscope-color-scheme";function Ff(){let t=window.localStorage&&window.localStorage[wa];return t==="DARK"?1:t==="LIGHT"?2:0}function Lf(){return matchMedia("(prefers-color-scheme: dark)")}function Tf(t){if(Lf().matches)switch(t){case 0:return 2;case 2:return 1;case 1:return 0}else switch(t){case 0:return 1;case 1:return 2;case 2:return 0}}var yi=class extends Ne{constructor(){super(...arguments);this.cycleToNextColorScheme=()=>{this.set(Tf(this.get()))}}},yn=new yi(Ff(),"colorScheme");yn.subscribe(()=>{let t=yn.get();switch(t){case 1:{window.localStorage[wa]="DARK";break}case 2:{window.localStorage[wa]="LIGHT";break}case 0:{delete window.localStorage[wa];break}default:return t}return t});W();W();var gs=.2,ds=.1,us=.2,fs=.1,Hf=t=>{let e=ca(30*t),n=360*(.9*t),a=gs+ds*e,r=us-fs*e;return ue.fromLumaChromaHue(r,a,n)},Mf=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${gs.toFixed(1)} + ${ds.toFixed(1)} * x; + float L = ${us.toFixed(1)} - ${fs.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,vi={fgPrimaryColor:"#D0D0D0",fgSecondaryColor:"#666666",bgPrimaryColor:"#060606",bgSecondaryColor:"#0C0C0C",altFgPrimaryColor:"#D0D0D0",altFgSecondaryColor:"#666666",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#0C0C0C",selectionPrimaryColor:"#00769B",selectionSecondaryColor:"#004E75",weightColor:"#0F8A42",searchMatchTextColor:"#0C0C0C",searchMatchPrimaryColor:"#A66F1C",searchMatchSecondaryColor:"#D6AE24",colorForBucket:Hf,colorForBucketGLSL:Mf};W();var ps=.25,Cs=.2,ms=.8,Is=.15,Jf=t=>{let e=ca(30*t),n=360*(.9*t),a=ps+Cs*e,r=ms-Is*e;return ue.fromLumaChromaHue(r,a,n)},Uf=` + vec3 colorForBucket(float t) { + float x = triangle(30.0 * t); + float H = 360.0 * (0.9 * t); + float C = ${ps.toFixed(1)} + ${Cs.toFixed(1)} * x; + float L = ${ms.toFixed(1)} - ${Is.toFixed(1)} * x; + return hcl2rgb(H, C, L); + } +`,ba={fgPrimaryColor:"#000000",fgSecondaryColor:"#BDBDBD",bgPrimaryColor:"#FFFFFF",bgSecondaryColor:"#F6F6F6",altFgPrimaryColor:"#FFFFFF",altFgSecondaryColor:"#BDBDBD",altBgPrimaryColor:"#000000",altBgSecondaryColor:"#222222",selectionPrimaryColor:"#2F80ED",selectionSecondaryColor:"#8EB7ED",weightColor:"#6FCF97",searchMatchTextColor:"#000000",searchMatchPrimaryColor:"#FFAC02",searchMatchSecondaryColor:"#FEDC62",colorForBucket:Jf,colorForBucketGLSL:Uf};var vs=Et(ba);function V(){return ot(vs)}function pe(t){return Un(t)}function ys(){return matchMedia("(prefers-color-scheme: dark)")}function Es(t){switch(t){case 0:return"System";case 1:return"Dark";case 2:return"Light"}}function Kf(t,e){switch(t){case 0:return e?vi:ba;case 1:return vi;case 2:return ba}}function Bs(t){let[e,n]=Ge(()=>ys().matches),a=K(i=>{n(i.matches)},[n]);Xe(()=>{let i=ys();return i.addEventListener("change",a),()=>{i.removeEventListener("change",a)}},[a]);let r=q(yn),o=Kf(r,e);return m(vs.Provider,{value:o,children:t.children})}var Dc=_e(ws()),Rc=_e(xs()),Fc=_e(Ns()),Lc=_e(Ds()),Tc=_e(Ls()),Hc=_e(Ms()),Mc=_e(Ks()),Jc=_e(Os()),Uc=_e(zs()),Kc=_e(Ys()),Pc=_e(qs()),Oc=_e(ac()),Gc=_e(ic()),zc=_e(Cc()),Vc=_e(xc()),F=["Webkit"],xi=["Moz"],he=["ms"],Le=["Webkit","Moz"],Qe=["Webkit","ms"],Br=["Webkit","Moz","ms"],gC={plugins:[Dc.default,Rc.default,Fc.default,Lc.default,Tc.default,Hc.default,Mc.default,Jc.default,Uc.default,Kc.default,Pc.default,Oc.default],prefixMap:{transform:Qe,transformOrigin:Qe,transformOriginX:Qe,transformOriginY:Qe,backfaceVisibility:F,perspective:F,perspectiveOrigin:F,transformStyle:F,transformOriginZ:F,animation:F,animationDelay:F,animationDirection:F,animationFillMode:F,animationDuration:F,animationIterationCount:F,animationName:F,animationPlayState:F,animationTimingFunction:F,appearance:Le,userSelect:Br,fontKerning:F,textEmphasisPosition:F,textEmphasis:F,textEmphasisStyle:F,textEmphasisColor:F,boxDecorationBreak:F,clipPath:F,maskImage:F,maskMode:F,maskRepeat:F,maskPosition:F,maskClip:F,maskOrigin:F,maskSize:F,maskComposite:F,mask:F,maskBorderSource:F,maskBorderMode:F,maskBorderSlice:F,maskBorderWidth:F,maskBorderOutset:F,maskBorderRepeat:F,maskBorder:F,maskType:F,textDecorationStyle:Le,textDecorationSkip:Le,textDecorationLine:Le,textDecorationColor:Le,filter:F,fontFeatureSettings:Le,breakAfter:Br,breakBefore:Br,breakInside:Br,columnCount:Le,columnFill:Le,columnGap:Le,columnRule:Le,columnRuleColor:Le,columnRuleStyle:Le,columnRuleWidth:Le,columns:Le,columnSpan:Le,columnWidth:Le,writingMode:Qe,flex:Qe,flexBasis:F,flexDirection:Qe,flexGrow:F,flexFlow:Qe,flexShrink:F,flexWrap:Qe,alignContent:F,alignItems:F,alignSelf:F,justifyContent:F,order:F,transitionDelay:F,transitionDuration:F,transitionProperty:F,transitionTimingFunction:F,backdropFilter:F,scrollSnapType:Qe,scrollSnapPointsX:Qe,scrollSnapPointsY:Qe,scrollSnapDestination:Qe,scrollSnapCoordinate:Qe,shapeImageThreshold:F,shapeImageMargin:F,shapeImageOutside:F,hyphens:Br,flowInto:Qe,flowFrom:Qe,regionFragment:Qe,boxSizing:xi,textAlignLast:xi,tabSize:xi,wrapFlow:he,wrapThrough:he,wrapMargin:he,touchAction:he,gridTemplateColumns:he,gridTemplateRows:he,gridTemplateAreas:he,gridTemplate:he,gridAutoColumns:he,gridAutoRows:he,gridAutoFlow:he,grid:he,gridRowStart:he,gridColumnStart:he,gridRowEnd:he,gridRow:he,gridColumn:he,gridColumnEnd:he,gridColumnGap:he,gridRowGap:he,gridArea:he,gridGap:he,textSizeAdjust:Qe,borderImage:F,borderImageOutset:F,borderImageRepeat:F,borderImageSlice:F,borderImageSource:F,borderImageWidth:F}},dC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uC=function(){function t(e,n){for(var a=0;a "u"?"undefined":dC(a))==="object"){for(var l=this.elements.hasOwnProperty(n)?this.elements[n]:new t,s=Object.keys(a),A=0;A "u"?"undefined":kc(e))==="object"?(qc(e.src,"@font-face",[e],!1),'"'+String(e.fontFamily)+'"'):e}return t}(),animationName:function(){function t(e,n){if(Array.isArray(e))return e.map(function(o){return t(o,n)}).join(",");if((typeof e>"u"?"undefined":kc(e))==="object"){var a="keyframe_"+String(EC(e)),r="@keyframes "+a+"{";return e instanceof Si?e.forEach(function(o,i){r+=Ni(i,[o],n,ki,!1).join("")}):Object.keys(e).forEach(function(o){r+=Ni(o,[e[o]],n,ki,!1).join("")}),r+="}",Wc(a,[r]),a}else return e}return t}()},Gn={},Xa=[],zn=!1,Wc=function(e,n){var a;if(!Gn[e]){if(!zn){if(typeof document>"u")throw new Error("Cannot automatically buffer without a document");zn=!0,(0,Vc.default)(LC)}(a=Xa).push.apply(a,NC(n)),Gn[e]=!0}},qc=function(e,n,a,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];if(!Gn[e]){var i=Ni(n,a,o,ki,r);Wc(e,i)}},DC=function(){Xa=[],Gn={},zn=!1,it=null};var RC=function(){if(zn)throw new Error("Cannot buffer while already buffering");zn=!0},$c=function(){zn=!1;var e=Xa;return Xa=[],e},FC=function(){return $c().join("")},LC=function(){var e=$c();e.length>0&&kC(e)},TC=function(){return Object.keys(Gn)},HC=function(e){e.forEach(function(n){Gn[n]=!0})},MC=function t(e,n,a,r){for(var o=0;o 0&&arguments[0]!==void 0?arguments[0]:[];HC(e)}return t}()},OC=typeof window<"u"?null:{renderStatic:function(){function t(e){DC(),RC();var n=e(),a=FC();return{html:n,css:{content:a,renderedClassNames:TC()}}}return t}()},GC=null;function Xc(t,e){return{StyleSheet:Object.assign({},PC,{extend:function(){function n(a){var r=a.map(function(o){return o.selectorHandler}).filter(function(o){return o});return Xc(t,e.concat(r))}return n}()}),StyleSheetServer:OC,StyleSheetTestUtils:GC,minify:function(){function n(a){Zc=a?jr:UC}return n}(),css:function(){function n(){for(var a=arguments.length,r=Array(a),o=0;o{let a=VC(n.name,this.searchQuery);this.matches.set(n,a.length===0?null:a)})),this.matches.get(e)||null}},to=class{constructor(e,n){this.flamechart=e;this.profileResults=n;this.matches=null}getResults(){if(this.matches==null){let e=[],n=new Map,a=(o,i)=>{let{node:l}=o;if(this.profileResults.getMatchForFrame(l.frame)){let s=new R(new B(o.start,i),new B(o.end-o.start,1));n.set(l,e.length),e.push({configSpaceBounds:s,node:l})}o.children.forEach(s=>{a(s,i+1)})},r=this.flamechart.getLayers();r.length>0&&r[0].forEach(o=>a(o,0)),this.matches={matches:e,indexForNode:n}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){let n=this.getResults().indexForNode.get(e);return n===void 0?null:n}at(e){let n=this.getResults().matches;if(e<0||e>=n.length)throw new Error(`Index ${e} out of bounds in list of ${n.length} matches.`);return n[e]}};function e_(t){t.stopPropagation()}var En=Et(null),t_=({children:t})=>{let e=Qa(),n=e?e.profile:null,a=q(Pn),r=q(On),o=ne(()=>!n||!a||r.length===0?null:new eo(n,r),[a,r,n]);return m(En.Provider,{value:o},t)},no=fe(({numResults:t,resultIndex:e,selectNext:n,selectPrev:a})=>{let r=V(),o=YC(r),i=q(Pn),l=q(On),s=On.set,A=Pn.set,c=K(u=>{let g=u.target.value;s(g)},[s]),_=on(null),h=K(()=>A(!1),[A]),f=K(u=>{u.shiftKey?a():n()},[a,n]),I=K(u=>{u.stopPropagation(),u.key==="Escape"&&A(!1),u.key==="Enter"&&f(u),u.key=="f"&&(u.metaKey||u.ctrlKey)&&(_.current&&_.current.select(),u.preventDefault())},[A,f]);return Xe(()=>{let u=g=>{g.key=="f"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),_.current?_.current.select():(A(!0),requestAnimationFrame(()=>{_.current&&_.current.select()})))};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[A]),i?m("div",{className:j(o.searchView)},m("span",{className:j(o.icon)},"\u{1F50D}"),m("span",{className:j(o.inputContainer)},m("input",{className:j(o.input),value:l,onInput:c,onKeyDown:I,onKeyUp:e_,onKeyPress:e_,ref:_})),t!=null&&m(rt,null,m("span",{className:j(o.resultCount)},e==null?"?":e+1,"/",t),m("button",{className:j(o.icon,o.button),onClick:a},"\u2B05\uFE0F"),m("button",{className:j(o.icon,o.button),onClick:n},"\u27A1\uFE0F")),m("svg",{className:j(o.icon),onClick:h,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:r.altFgSecondaryColor}))):null}),YC=pe(t=>ge.create({searchView:{position:"absolute",top:0,right:10,height:20,width:16*13,borderWidth:2,borderColor:t.altFgPrimaryColor,borderStyle:"solid",fontSize:10,boxSizing:"border-box",background:t.altBgSecondaryColor,color:t.altFgPrimaryColor,display:"flex",alignItems:"center"},inputContainer:{flexShrink:1,flexGrow:1,display:"flex"},input:{width:"100%",border:"none",background:"none",fontSize:10,lineHeight:"20px",color:t.altFgPrimaryColor,":focus":{border:"none",outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},resultCount:{verticalAlign:"middle"},icon:{flexShrink:0,verticalAlign:"middle",height:"100%",margin:"0px 2px 0px 2px",fontSize:10},button:{display:"inline",background:"none",border:"none",padding:0,":focus":{outline:"none"}}}));function n_(t){return t.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{let a=parseInt(n,16);return String.fromCharCode(a)})}function r_(t){let e=t.split(` +`);if(!e.length||(e[e.length-1]===""&&e.pop(),!e.length))return null;let n=new Map,a=/^(\d+):(.+)$/,r=/^([\$\w]+):([\$\w-]+)$/;for(let o of e){let i=a.exec(o);if(i){n.set(`wasm-function[${i[1]}]`,n_(i[2]));continue}let l=r.exec(o);if(l){n.set(l[1],n_(l[2]));continue}return null}return o=>n.has(o.name)?{name:n.get(o.name)}:null}Hi();W();var Vt=class{constructor(e){this.source=e;this.layers=[];this.totalWeight=0;this.minFrameWidth=1;let n=[],a=(o,i)=>{let l=te(n),s={node:o,parent:l,children:[],start:i,end:i};l&&l.children.push(s),n.push(s)};this.minFrameWidth=1/0;let r=(o,i)=>{console.assert(n.length>0);let l=n.pop();if(l.end=i,l.end-l.start===0)return;let s=n.length;for(;this.layers.length<=s;)this.layers.push([]);this.layers[s].push(l),this.minFrameWidth=Math.min(this.minFrameWidth,l.end-l.start)};this.totalWeight=e.getTotalWeight(),e.forEachCall(a,r),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(e){return this.source.getColorBucketForFrame(e)}getMinFrameWidth(){return this.minFrameWidth}formatValue(e){return this.source.formatValue(e)}getClampedViewportWidth(e){let n=this.getTotalWeight(),a=Math.pow(2,40),r=Se(3*this.getMinFrameWidth(),n/a,n);return Se(e,r,n)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:n}){let a=new B(this.getTotalWeight(),this.getLayers().length),r=this.getClampedViewportWidth(e.size.x),o=e.size.withX(r),i=B.clamp(e.origin,new B(0,n?0:-1),B.max(B.zero,a.minus(o).plus(new B(0,1))));return new R(i,e.size.withX(r))}};W();var tm=1e4,oo=class{constructor(e,n,a){this.batch=e;this.bounds=n;this.numPrecedingRectanglesInRow=a;this.children=[]}getBatch(){return this.batch}getBounds(){return this.bounds}getRectCount(){return this.batch.getRectCount()}getChildren(){return this.children}getParity(){return this.numPrecedingRectanglesInRow%2}forEachLeafNodeWithinBounds(e,n){this.bounds.hasIntersectionWith(e)&&n(this)}},Mi=class{constructor(e){this.children=e;this.rectCount=0;if(e.length===0)throw new Error("Empty interior node");let n=1/0,a=-1/0,r=1/0,o=-1/0;for(let i of e){this.rectCount+=i.getRectCount();let l=i.getBounds();n=Math.min(n,l.left()),a=Math.max(a,l.right()),r=Math.min(r,l.top()),o=Math.max(o,l.bottom())}this.bounds=new R(new B(n,r),new B(a-n,o-r))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,n){if(this.bounds.hasIntersectionWith(e))for(let a of this.children)a.forEachLeafNodeWithinBounds(e,n)}},io=class t{get key(){return`${this.stackDepth}_${this.index}_${this.zoomLevel}`}constructor(e){this.stackDepth=e.stackDepth,this.zoomLevel=e.zoomLevel,this.index=e.index}static getOrInsert(e,n){return e.getOrInsert(new t(n))}},lo=class{constructor(e,n,a,r,o,i={inverted:!1}){this.gl=e;this.rowAtlas=n;this.flamechart=a;this.rectangleBatchRenderer=r;this.colorPassRenderer=o;this.options=i;this.layers=[];this.rectInfoTexture=null;this.rectInfoRenderTarget=null;this.atlasKeys=new Bt;let l=a.getLayers().length;for(let s=0;s =tm&&(A.push(new oo(f,new R(new B(_,c),new B(h-_,1)),I)),_=1/0,h=-1/0,f=new mn(this.gl));let C=new R(new B(p.start,c),new B(p.end-p.start,1));_=Math.min(_,C.left()),h=Math.max(h,C.right());let y=new ue((1+g%255)/256,(1+s%255)/256,(1+this.flamechart.getColorBucketForFrame(p.node.frame))/256);f.addRect(C,y),I++}f.getRectCount()>0&&A.push(new oo(f,new R(new B(_,c),new B(h-_,1)),I)),this.layers.push(new Mi(A))}}getRectInfoTexture(e,n){if(this.rectInfoTexture){let a=this.rectInfoTexture;(a.width!=e||a.height!=n)&&a.resize(e,n)}else this.rectInfoTexture=this.gl.createTexture(z.TextureFormat.NEAREST_CLAMP,e,n);return this.rectInfoTexture}getRectInfoRenderTarget(e,n){let a=this.getRectInfoTexture(e,n);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=a&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(a)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(a)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){let{stackDepth:n,zoomLevel:a,index:r}=e,i=this.flamechart.getTotalWeight()/Math.pow(2,a),l=this.flamechart.getLayers().length,s=this.options.inverted?l-1-n:n;return new R(new B(i*r,s),new B(i,1))}render(e){let{configSpaceSrcRect:n,physicalSpaceDstRect:a}=e,r=[],o=O.betweenRects(n,a);if(n.isEmpty())return;let i=0;for(;;){let y=io.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:i,index:0}),E=this.configSpaceBoundsForKey(y);if(o.transformRect(E).width() {let v=this.configSpaceBoundsForKey(E);this.layers[E.stackDepth].forEachLeafNodeWithinBounds(v,Q=>{this.rectangleBatchRenderer.render({batch:Q.getBatch(),configSpaceSrcRect:v,physicalSpaceDstRect:y})})});let p=this.getRectInfoRenderTarget(a.width(),a.height());ga(this.gl,p,()=>{this.gl.clear(new z.Color(0,0,0,0));let y=new R(B.zero,new B(this.gl.viewport.width,this.gl.viewport.height)),E=O.betweenRects(n,y);for(let v of u){let Q=this.configSpaceBoundsForKey(v);this.rowAtlas.renderViaAtlas(v,E.transformRect(Q))}for(let v of g){let Q=this.configSpaceBoundsForKey(v),N=E.transformRect(Q);this.layers[v.stackDepth].forEachLeafNodeWithinBounds(Q,L=>{this.rectangleBatchRenderer.render({batch:L.getBatch(),configSpaceSrcRect:Q,physicalSpaceDstRect:N})})}});let C=this.getRectInfoTexture(a.width(),a.height());this.colorPassRenderer.render({rectInfoTexture:C,srcRect:new R(B.zero,new B(C.width,C.height)),dstRect:a,renderOutlines:e.renderOutlines})}};W();W();var xt=pe(t=>ge.create({hoverCount:{color:t.weightColor},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:100,borderBottom:`2px solid ${t.fgSecondaryColor}`},panZoomView:{flex:1},detailView:{display:"grid",height:150,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`2px solid ${t.fgSecondaryColor}`,fontSize:10,position:"absolute",background:t.bgPrimaryColor,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:150,lineHeight:`${12}px`,overflow:"auto","::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:t.fgSecondaryColor},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${20}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},allInstancesCell:{background:t.selectionSecondaryColor,color:t.altFgPrimaryColor},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}));W();var Ui="\u2026",Ao=new Map,h_=-1;function Yt(t,e){return window.devicePixelRatio!==h_&&(Ao.clear(),h_=window.devicePixelRatio),Ao.has(e)||Ao.set(e,t.measureText(e).width),Ao.get(e)}function Ji(t,e){if(t.length<=e)return{trimmedString:t,trimmedLength:t.length,prefixLength:t.length,suffixLength:0,originalString:t,originalLength:t.length};let n=Math.floor(e/2),a=e-n-1,r=t.substring(0,n),o=t.substring(t.length-a,t.length),i=r+Ui+o;return{trimmedString:i,trimmedLength:i.length,prefixLength:r.length,suffixLength:o.length,originalString:t,originalLength:t.length}}function d_(t,e,n){if(Yt(t,e)<=n)return Ji(e,e.length);let[a]=UA(0,e.length,r=>Yt(t,Ji(e,Math.floor(r)).trimmedString),n);return Ji(e,Math.floor(a))}function g_(t,e){return e {this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.onWindowResize=()=>{this.onBeforeFrame()};this.onBeforeFrame=()=>{this.maybeClearInteractionLock(),this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onWheel=n=>{if(n.preventDefault(),this.frameHadWheelEvent=!0,(n.metaKey||n.ctrlKey)&&this.interactionLock!=="pan"){let r=1+n.deltaY/100;n.ctrlKey&&(r=1+n.deltaY/40),r=Se(r,.1,10),this.zoom(r)}else this.interactionLock!=="zoom"&&this.pan(new B(n.deltaX,n.deltaY));this.renderCanvas()};this.dragStartConfigSpaceMouse=null;this.dragConfigSpaceViewportOffset=null;this.draggingMode=null;this.onMouseDown=n=>{let a=this.configSpaceMouse(n);a&&(this.props.configSpaceViewportRect.contains(a)?(this.draggingMode=1,this.dragConfigSpaceViewportOffset=a.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=0,this.dragStartConfigSpaceMouse=a,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(a))};this.onWindowMouseMove=n=>{if(!this.dragStartConfigSpaceMouse)return;let a=this.configSpaceMouse(n);if(a){if(this.updateCursor(a),a=new R(new B(0,0),this.configSpaceSize()).closestPointTo(a),this.draggingMode===0){let r=this.dragStartConfigSpaceMouse,o=a;if(!r||!o)return;let i=Math.min(r.x,o.x),s=Math.max(r.x,o.x)-i,A=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new R(new B(i,o.y-A/2),new B(s,A)))}else if(this.draggingMode===1){if(!this.dragConfigSpaceViewportOffset)return;let r=a.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(r))}}};this.updateCursor=n=>{this.draggingMode===1?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===0?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(n)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"};this.onMouseLeave=()=>{this.draggingMode==null&&(document.body.style.cursor="default")};this.onMouseMove=n=>{let a=this.configSpaceMouse(n);a&&this.updateCursor(a)};this.onWindowMouseUp=n=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);let a=this.configSpaceMouse(n);a&&this.updateCursor(a)};this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}}physicalViewSize(){return new B(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return xt(this.props.theme)}minimapOrigin(){return new B(0,20*window.devicePixelRatio)}configSpaceSize(){return new B(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){let n=this.minimapOrigin();return O.betweenRects(new R(new B(0,0),this.configSpaceSize()),new R(n,this.physicalViewSize().minus(n)))}logicalToPhysicalViewSpace(){return O.withScale(new B(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new O;let n=this.container.getBoundingClientRect();return O.withTranslation(new B(-n.left,-n.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new R(new B(0,0),this.configSpaceSize()),physicalSpaceDstRect:new R(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){let n=this.overlayCtx;if(!n)return;let a=this.physicalViewSize();n.clearRect(0,0,a.x,a.y);let r=this.configSpaceToPhysicalViewSpace(),o=0,i=this.configSpaceSize().x,s=(this.configSpaceToPhysicalViewSpace().inverted()||new O).times(this.logicalToPhysicalViewSpace()).transformVector(new B(200,1)).x,A=20*window.devicePixelRatio,c=10*window.devicePixelRatio,_=(A-c)/2;n.font=`${c}px/${A}px "Source Code Pro", Courier, monospace`,n.textBaseline="top";let f=Math.pow(10,Math.floor(Math.log10(s)));s/f>5?f*=5:s/f>2&&(f*=2);let I=this.props.theme;{n.fillStyle=ue.fromCSSHex(I.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,0,a.x,A),n.textBaseline="top";for(let u=Math.ceil(o/f)*f;uge.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${t.fgSecondaryColor}`,width:8,height:8}}));function f_(t){let e=xt(V()),n=t.formatter(t.selectedTotal),a=t.formatter(t.selectedSelf),r=100*t.selectedTotal/t.grandTotal,o=100*t.selectedSelf/t.grandTotal;return m("div",{className:j(e.statsTable)},m("div",{className:j(t.cellStyle,e.statsTableCell,e.statsTableHeader)},t.title),m("div",{className:j(t.cellStyle,e.statsTableCell)},"Total"),m("div",{className:j(t.cellStyle,e.statsTableCell)},"Self"),m("div",{className:j(t.cellStyle,e.statsTableCell)},n),m("div",{className:j(t.cellStyle,e.statsTableCell)},a),m("div",{className:j(t.cellStyle,e.statsTableCell)},jt(r),m("div",{className:j(e.barDisplay),style:{height:`${r}%`}})),m("div",{className:j(t.cellStyle,e.statsTableCell)},jt(o),m("div",{className:j(e.barDisplay),style:{height:`${o}%`}})))}function rm(t){let e=xt(V()),n=[],a=t.node;for(;a&&!a.isRoot();a=a.parent){let r=[],{frame:o}=a;if(r.push(m(_o,{color:t.getFrameColor(o)})),n.length&&r.push(m("span",{className:j(e.stackFileLine)},"> ")),r.push(o.name),o.file){let i=o.file;o.line!=null&&(i+=`:${o.line}`,o.col!=null&&(i+=`:${o.col}`)),r.push(m("span",{className:j(e.stackFileLine)}," (",i,")"))}n.push(m("div",{className:j(e.stackLine)},r))}return m("div",{className:j(e.stackTraceView)},m("div",{className:j(e.stackTraceViewPadding)},n))}function p_(t){let e=xt(V()),{flamechart:n,selectedNode:a}=t,{frame:r}=a;return m("div",{className:j(e.detailView)},m(f_,{title:"This Instance",cellStyle:e.thisInstanceCell,grandTotal:n.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:n.formatValue.bind(n)}),m(f_,{title:"All Instances",cellStyle:e.allInstancesCell,grandTotal:n.getTotalWeight(),selectedTotal:r.getTotalWeight(),selectedSelf:r.getSelfWeight(),formatter:n.formatValue.bind(n)}),m(rm,{node:a,getFrameColor:t.getCSSColorForFrame}))}var wr=class{constructor(){this.argsBatch=[]}text(e){this.argsBatch.push(e)}fill(e,n){if(this.argsBatch.length!==0){e.fillStyle=n;for(let a of this.argsBatch)e.fillText(a.text,a.x,a.y);this.argsBatch=[]}}},Bn=class{constructor(){this.argsBatch=[]}rect(e){this.argsBatch.push(e)}drawPath(e){e.beginPath();for(let n of this.argsBatch)e.rect(n.x,n.y,n.w,n.h);e.closePath(),this.argsBatch=[]}fill(e,n){this.argsBatch.length!==0&&(e.fillStyle=n,this.drawPath(e),e.fill())}stroke(e,n,a){this.argsBatch.length!==0&&(e.strokeStyle=n,e.lineWidth=a,this.drawPath(e),e.stroke())}};var Yn=class extends be{constructor(){super(...arguments);this.container=null;this.containerRef=n=>{this.container=n||null};this.overlayCanvas=null;this.overlayCtx=null;this.hoveredLabel=null;this.overlayCanvasRef=n=>{n?(this.overlayCanvas=n,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)};this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=20;this.onWindowResize=()=>{this.updateConfigSpaceViewport(),this.onBeforeFrame()};this.frameHadWheelEvent=!1;this.framesWithoutWheelEvents=0;this.interactionLock=null;this.maybeClearInteractionLock=()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1};this.onBeforeFrame=()=>{this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays(),this.maybeClearInteractionLock()};this.renderCanvas=()=>{this.props.canvasContext.requestFrame()};this.lastDragPos=null;this.mouseDownPos=null;this.onMouseDown=n=>{this.mouseDownPos=this.lastDragPos=new B(n.offsetX,n.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)};this.onMouseDrag=n=>{if(!this.lastDragPos)return;let a=new B(n.offsetX,n.offsetY);this.pan(this.lastDragPos.minus(a)),this.lastDragPos=a,this.hoveredLabel&&this.props.onNodeHover(null)};this.onDblClick=n=>{if(this.hoveredLabel){let a=this.hoveredLabel.configSpaceBounds,r=new R(a.origin.minus(new B(0,1)),a.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(r)}};this.onClick=n=>{let a=new B(n.offsetX,n.offsetY),r=this.mouseDownPos;this.mouseDownPos=null,!(r&&a.minus(r).length()>5)&&(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))};this.onWindowMouseUp=n=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)};this.onMouseMove=n=>{if(this.updateCursor(),this.lastDragPos){n.preventDefault(),this.onMouseDrag(n);return}let a=new B(n.offsetX,n.offsetY),r=this.logicalToPhysicalViewSpace().transformPosition(a),o=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!o)return;let i=(s,A=0)=>{let c=s.end-s.start,_=this.props.renderInverted?this.configSpaceSize().y-1-A:A,h=new R(new B(s.start,_),new B(c,1));if(o.x h.right())return null;h.contains(o)&&(this.hoveredLabel={configSpaceBounds:h,node:s.node});for(let f of s.children)i(f,A+1)};(()=>{this.hoveredLabel=null})();for(let s of this.props.flamechart.getLayers()[0]||[])i(s);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:n}):this.props.onNodeHover(null),this.renderCanvas()};this.onMouseLeave=n=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()};this.onWheel=n=>{n.preventDefault(),this.frameHadWheelEvent=!0;let a=n.metaKey||n.ctrlKey,r=n.deltaY,o=n.deltaX;if(n.deltaMode===n.DOM_DELTA_LINE&&(r*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,o*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),a&&this.interactionLock!=="pan"){let i=1+r/100;n.ctrlKey&&(i=1+r/40),i=Se(i,.1,10),this.zoom(new B(n.offsetX,n.offsetY),i)}else this.interactionLock!=="zoom"&&this.pan(new B(o,r));this.renderCanvas()};this.onWindowKeyPress=n=>{if(!this.container)return;let{width:a,height:r}=this.container.getBoundingClientRect();n.key==="="||n.key==="+"?(this.zoom(new B(a/2,r/2),.5),n.preventDefault()):(n.key==="-"||n.key==="_")&&(this.zoom(new B(a/2,r/2),2),n.preventDefault()),!(n.ctrlKey||n.shiftKey||n.metaKey)&&(n.key==="0"?this.zoom(new B(a/2,r/2),1e9):n.key==="ArrowRight"||n.code==="KeyD"?this.pan(new B(100,0)):n.key==="ArrowLeft"||n.code==="KeyA"?this.pan(new B(-100,0)):n.key==="ArrowUp"||n.code==="KeyW"?this.pan(new B(0,-100)):n.key==="ArrowDown"||n.code==="KeyS"?this.pan(new B(0,100)):n.key==="Escape"&&(this.props.onNodeSelect(null),this.renderCanvas()))}}getStyle(){return xt(this.props.theme)}setConfigSpaceViewportRect(n){this.props.setConfigSpaceViewportRect(n)}configSpaceSize(){return new B(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new B(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){let n=this.physicalViewSize().y,a=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(a {let N=v.end-v.start,L=this.props.renderInverted?this.configSpaceSize().y-1-Q:Q,S=new R(new B(v.start,L),new B(N,1));if(!(N this.props.configSpaceViewportRect.right())&&!(S.right()this.props.configSpaceViewportRect.bottom())return;if(S.hasIntersectionWith(this.props.configSpaceViewportRect)){let w=a.transformRect(S);if(w.left()<0&&(w=w.withOrigin(w.origin.withX(0)).withSize(w.size.withX(w.size.x+w.left()))),w.right()>i.x&&(w=w.withSize(w.size.withX(i.x-w.left()))),w.width()>l){let M=this.props.searchResults?.getMatchForFrame(v.node.frame),se=d_(n,v.node.frame.name,w.width()-2*A);if(M){let Lt=u_(se,M),tn=0,nn=w.left()+A,vt=(o-r)/2-2;for(let[Tt,oa]of Lt){nn+=Yt(n,se.trimmedString.substring(tn,Tt));let fr=Yt(n,se.trimmedString.substring(Tt,oa));h.rect({x:nn,y:w.top()+vt,w:fr,h:o-2*vt}),nn+=fr,tn=oa}}(this.props.searchResults!=null&&!M?_:c).text({text:se.trimmedString,x:w.left()+A,y:Math.round(w.bottom()-(o-r)/2)})}}for(let w of v.children)g(w,Q+1)}},p=2*window.devicePixelRatio;n.strokeStyle=this.props.theme.selectionSecondaryColor;let C=(a.inverseTransformVector(new B(1,0))||new B(0,0)).x,y=(v,Q=0)=>{if(!this.props.selectedNode&&this.props.searchResults==null)return;let N=v.end-v.start,L=this.props.renderInverted?this.configSpaceSize().y-1-Q:Q,S=new R(new B(v.start,L),new B(N,1));if(!(N this.props.configSpaceViewportRect.right())&&!(S.right() this.props.configSpaceViewportRect.bottom())){if(S.hasIntersectionWith(this.props.configSpaceViewportRect)){if(this.props.searchResults?.getMatchForFrame(v.node.frame)){let w=a.transformRect(S);u.rect({x:Math.round(w.left()+p/2),y:Math.round(w.top()+p/2),w:Math.round(Math.max(0,w.width()-p)),h:Math.round(Math.max(0,w.height()-p))})}if(this.props.selectedNode!=null&&v.node.frame===this.props.selectedNode.frame){let w=v.node===this.props.selectedNode?f:I,M=a.transformRect(S);w.rect({x:Math.round(M.left()+1+p/2),y:Math.round(M.top()+1+p/2),w:Math.round(Math.max(0,M.width()-2-p)),h:Math.round(Math.max(0,M.height()-2-p))})}}for(let w of v.children)y(w,Q+1)}};for(let v of this.props.flamechart.getLayers()[0]||[])y(v);for(let v of this.props.flamechart.getLayers()[0]||[])g(v);let E=this.props.theme;if(u.fill(n,E.searchMatchPrimaryColor),h.fill(n,E.searchMatchSecondaryColor),_.fill(n,E.fgSecondaryColor),c.fill(n,this.props.searchResults!=null?E.searchMatchTextColor:E.fgPrimaryColor),I.stroke(n,E.selectionSecondaryColor,p),f.stroke(n,E.selectionPrimaryColor,p),this.hoveredLabel){let v=E.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(v=E.selectionPrimaryColor),n.lineWidth=2*devicePixelRatio,n.strokeStyle=v;let Q=a.transformRect(this.hoveredLabel.configSpaceBounds);n.strokeRect(Math.round(Q.left()),Math.round(Q.top()),Math.round(Math.max(0,Q.width())),Math.round(Math.max(0,Q.height())))}this.renderTimeIndicators()}renderTimeIndicators(){let n=this.overlayCtx;if(!n)return;let a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,r=this.physicalViewSize(),o=this.configSpaceToPhysicalViewSpace(),i=10*window.devicePixelRatio,l=(a-i)/2,s=this.props.configSpaceViewportRect.left(),A=this.props.configSpaceViewportRect.right(),_=(this.configSpaceToPhysicalViewSpace().inverted()||new O).times(this.logicalToPhysicalViewSpace()).transformVector(new B(200,1)).x,f=Math.pow(10,Math.floor(Math.log10(_)));_/f>5?f*=5:_/f>2&&(f*=2);let I=this.props.theme;{let u=this.props.renderInverted?r.y-a:0;n.fillStyle=ue.fromCSSHex(I.bgPrimaryColor).withAlpha(.8).toCSS(),n.fillRect(0,u,r.x,a),n.textBaseline="top";for(let g=Math.ceil(s/f)*f;g{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(n){this.interactionLock="pan";let a=this.logicalToPhysicalViewSpace().transformVector(n),r=this.configSpaceToPhysicalViewSpace().inverseTransformVector(a);this.hoveredLabel&&this.props.onNodeHover(null),r&&this.props.transformViewport(O.withTranslation(r))}zoom(n,a){this.interactionLock="zoom";let r=this.logicalToPhysicalViewSpace().transformPosition(n),o=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(r);if(!o)return;let i=O.withTranslation(o.times(-1)).scaledBy(new B(a,1)).translatedBy(o);this.props.transformViewport(i)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(n){this.props.flamechart!==n.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==n.searchResults?this.renderCanvas():this.props.selectedNode!==n.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==n.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),n.canvasContext.requestFrame()))}componentDidMount(){this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=this.getStyle();return m("div",{className:j(n.panZoomView,Ee.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},m("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:j(n.fill)}))}};function go(t){let e=om(V()),{containerSize:n,offset:a}=t,r=n.x,o=n.y,i=7,l=K(s=>{if(!s)return;let A=s.getBoundingClientRect(),c=a.x+i;c+A.width>r-1&&(c=r-A.width-1,c<1&&(c=1)),s.style.left=`${c}px`;let _=a.y+i;_+A.height>o-1&&(_=a.y-A.height-1,_<1&&(_=1)),s.style.top=`${_}px`},[r,o,a.x,a.y]);return m("div",{className:j(e.hoverTip),ref:l},m("div",{className:j(e.hoverTipRow)},t.children))}var ho=2,om=pe(t=>ge.create({hoverTip:{position:"absolute",background:t.bgPrimaryColor,border:"1px solid black",maxWidth:900,paddingTop:ho,paddingBottom:ho,pointerEvents:"none",userSelect:"none",fontSize:10,fontFamily:'"Source Code Pro", Courier, monospace',zIndex:2},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:ho,paddingRight:ho,maxWidth:900}}));var C_=Et(null),Ki=({flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r,children:o})=>{let i=ot(En),l=ne(()=>i==null?null:new to(t,i),[t,i]);return m(C_.Provider,{value:{results:l,flamechart:t,selectedNode:e,setSelectedNode:n,configSpaceViewportRect:a,setConfigSpaceViewportRect:r}},o)},m_=fe(()=>{let t=ot(C_),e=t==null?null:t.results,n=t==null?null:t.selectedNode,a=t==null?null:t.setSelectedNode,r=t==null?null:t.configSpaceViewportRect,o=t==null?null:t.setConfigSpaceViewportRect,i=t==null?null:t.flamechart,l=e==null?null:e.count(),s=ne(()=>e==null||n==null?null:e.indexOf(n),[e,n]),A=K(h=>{if(!a||!i||!r||!o)return;let f=h.configSpaceBounds,I=new R(f.origin.minus(new B(0,1)),f.size.withY(r.height()));a(h.node),o(i.getClampedConfigSpaceViewportRect({configSpaceViewportRect:I}))},[r,o,a,i]),{selectPrev:c,selectNext:_}=ne(()=>l==null||l===0||e==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!e?.at||l==null||l===0)return;let h=s==null?l-1:s-1;h<0&&(h=l-1);let f=e.at(h);A(f)},selectNext:()=>{if(!e?.at||l==null||l===0)return;let h=s==null?0:s+1;h>=l&&(h=0);let f=e.at(h);A(f)}},[l,s,e,A]);return m(no,{resultIndex:s,numResults:l,selectPrev:c,selectNext:_})});var ut=class extends be{};var br=class extends ut{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{let a=150/20,r=this.configSpaceSize(),o=this.props.flamechart.getClampedViewportWidth(n.size.x),i=n.size.withX(o),l=B.clamp(n.origin,new B(0,-1),B.max(B.zero,r.minus(i).plus(new B(0,a+1))));this.props.setConfigSpaceViewportRect(new R(l,n.size.withX(o)))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{let a=n.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(a)};this.onNodeHover=n=>{this.props.setNodeHover(n)};this.onNodeClick=n=>{this.props.setSelectedNode(n)};this.container=null;this.containerRef=n=>{this.container=n||null}}getStyle(){return xt(this.props.theme)}configSpaceSize(){return new B(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,o=jt(r);return`${this.props.flamechart.formatValue(n)} (${o})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:o,top:i}=this.container.getBoundingClientRect(),l=new B(n.event.clientX-o,n.event.clientY-i),s=n.node.frame,A=this.getStyle();return m(go,{containerSize:new B(a,r),offset:l},m("span",{className:j(A.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",s.name,s.file?m("div",null,s.file,":",s.line):void 0)}render(){let n=this.getStyle();return m("div",{className:j(n.fill,Ee.vbox),ref:this.containerRef},m(so,{theme:this.props.theme,configSpaceViewportRect:this.props.configSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect}),m(En.Consumer,null,a=>m(rt,null,m(Yn,{theme:this.props.theme,canvasContext:this.props.canvasContext,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,renderInverted:!1,onNodeHover:this.onNodeHover,onNodeSelect:this.onNodeClick,selectedNode:this.props.selectedNode,transformViewport:this.transformViewport,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:a}),m(m_,null))),this.renderTooltip(),this.props.selectedNode&&m(p_,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}};function Wn(t){return{setNodeHover:K(e=>{Fe.setFlamechartHoveredNode(t,e)},[t]),setLogicalSpaceViewportSize:K(e=>{Fe.setLogicalSpaceViewportSize(t,e)},[t]),setConfigSpaceViewportRect:K(e=>{Fe.setConfigSpaceViewportRect(t,e)},[t]),setSelectedNode:K(e=>{Fe.setSelectedNode(t,e)},[t])}}var im=Oe(({profile:t,getColorBucketForFrame:e})=>new Vt({getTotalWeight:t.getTotalWeight.bind(t),forEachCall:t.forEachCall.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),qn=t=>Oe(({canvasContext:e,flamechart:n})=>new lo(e.gl,OA(e),n,e.rectangleBatchRenderer,e.flamechartColorPassRenderer,t)),lm=qn(),y_=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,chronoViewState:r}=e,o=V(),i=Jt({theme:o,canvas:n}),l=Ut(a),s=an(l),A=Mt({theme:o,frameToColorBucket:l}),c=im({profile:a,getColorBucketForFrame:s}),_=lm({canvasContext:i,flamechart:c}),h=Wn("CHRONO");return m(Ki,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:h.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:h.setConfigSpaceViewportRect},m(br,{theme:o,renderInverted:!1,flamechart:c,flamechartRenderer:_,canvasContext:i,getCSSColorForFrame:A,...r,...h}))}),Am=Oe(({profile:t,getColorBucketForFrame:e})=>new Vt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),sm=qn(),v_=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{profile:a,leftHeavyViewState:r}=e,o=V(),i=Jt({theme:o,canvas:n}),l=Ut(a),s=an(l),A=Mt({theme:o,frameToColorBucket:l}),c=Am({profile:a,getColorBucketForFrame:s}),_=sm({canvasContext:i,flamechart:c}),h=Wn("LEFT_HEAVY");return m(Ki,{flamechart:c,selectedNode:r.selectedNode,setSelectedNode:h.setSelectedNode,configSpaceViewportRect:r.configSpaceViewportRect,setConfigSpaceViewportRect:h.setConfigSpaceViewportRect},m(br,{theme:o,renderInverted:!1,flamechart:c,flamechartRenderer:_,canvasContext:i,getCSSColorForFrame:A,...r,...h}))});function B_(t,e){return gm(t,e)}var Pi=97,j_=122,Q_=65,cm=90,_m=48,hm=57;function E_(t){let e=t.charCodeAt(0);return Pi<=e&&e<=j_?1:Q_<=e&&e<=cm?2:_m<=e&&e<=hm?3:0}function Oi(t,e){if(t===e)return!0;let n=e.charCodeAt(0);return Pi<=n&&n<=j_?t.charCodeAt(0)===n-Pi+Q_:!1}function gm(t,e){if(e.length==0)return{matchedRanges:[],score:0};let n=0,a=-1,r=-1,o=t.length,i=e.length;for(let l=0;l =a;l--){let s=t[l],A=e[n];if(Oi(s,A)&&(n--,n<0))return a=l,mm(t,e,a,r)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}var Gi=16,w_=-3,zi=-1,Vi=Gi/2,dm=Gi/2,um=Vi+zi,fm=-(w_+zi),pm=2;function Cm(t,e){return t===0&&e!==0?Vi:t===1&&e==2||t!==3&&e==3?um:e===0?dm:0}function mm(t,e,n,a){let r=0,o=0,i=!1,l=0,s=0,A=new Array(e.length),c=0;n>0&&(c=E_(t[n-1]));for(let h=n;h{l(),t(s)},[l,t,s]),f=K(C=>{e(s)},[e,s]),I=n.getName(),u=1+Math.floor(Math.log10(o)),g=j(_.highlighted),p=ne(()=>Im(I,A,g),[I,A,g]);return m("div",{ref:i,onMouseUp:h,onMouseEnter:f,title:I,className:j(_.profileRow,c%2===0&&_.profileRowEven,a&&_.profileRowSelected,r&&_.profileRowHovered)},m("span",{className:j(_.profileIndex,a&&_.profileIndexSelected),style:{width:u+"em"}},s+1,":")," ",p)}function b_(t){t.stopPropagation()}function vm(t,e){let n=[];for(let a=0;a -a.score),n}function S_({profiles:t,closeProfileSelect:e,indexToView:n,visible:a,setProfileIndexToView:r}){let o=N_(V()),[i,l]=Ge(""),s=K(y=>{let E=y.target.value;l(E)},[l]),A=K(y=>{y&&(a?y.select():y.blur())},[a]),c=ne(()=>vm(t,i),[t,i]),[_,h]=Ge(0),f=on(null);Xe(()=>{a&&(h(null),f.current!==null&&f.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[a]);let I=K(y=>{y.stopPropagation();let E=null;switch(y.key){case"Enter":{_!=null&&(e(),r(_));break}case"Escape":{e();break}case"ArrowDown":{if(y.preventDefault(),E=0,_!=null){let v=c.findIndex(Q=>Q.indexInProfileGroup===_);v!==-1&&(E=v+1)}break}case"ArrowUp":{if(y.preventDefault(),E=c.length-1,_!=null){let v=c.findIndex(Q=>Q.indexInProfileGroup===_);v!==-1&&(E=v-1)}break}}if(E!=null&&E>=0&&E {c.length>0&&(h(c[0].indexInProfileGroup),g(!0))},[h,c]);let p=K(y=>{u&&y&&(y.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),g(!1))},[u,g]),C=K(y=>{f.current=y,p(y)},[f,p]);return m("div",{className:j(o.profileSelectOuter)},m("div",{className:j(o.caret)}),m("div",{className:j(o.profileSelectBox)},m("div",{className:j(o.filterInputContainer)},m("input",{type:"text",className:j(o.filterInput),ref:A,placeholder:"Filter...",value:i,onInput:s,onKeyDown:I,onKeyUp:b_,onKeyPress:b_})),m("div",{className:j(o.profileSelectScrolling)},c.map(({profile:y,matchedRanges:E,indexInProfileGroup:v},Q)=>{let N,L=v===n,S=v===_;return L&&S?N=C:L?N=f:S&&(N=p),m(ym,{setHoveredProfileIndex:h,indexInProfileGroup:v,indexInFilteredListView:Q,hovered:v==_,selected:v===n,profile:y,profileCount:t.length,nodeRef:N,matchedRanges:E,setProfileIndexToView:r,closeProfileSelect:e})}),c.length===0?m("div",{className:j(o.profileRow)},'No results match filter "',i,'"'):null)))}var x_=10,N_=pe(t=>ge.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:t.altFgPrimaryColor,background:t.altBgSecondaryColor,borderRadius:5,padding:5,":focus":{border:"none",outline:"none"},"::selection":{color:t.altFgPrimaryColor,background:t.selectionPrimaryColor}},caret:{width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:"5px solid black"},highlighted:{background:t.selectionSecondaryColor},padding:{height:x_,background:t.altBgPrimaryColor},profileRow:{height:18,border:"1px solid transparent",textAlign:"left",paddingLeft:10,paddingRight:10,background:t.altBgPrimaryColor,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer"},profileRowHovered:{border:`1px solid ${t.selectionPrimaryColor}`},profileRowSelected:{background:t.selectionPrimaryColor},profileRowEven:{background:t.altBgSecondaryColor},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${20-2*x_}px), ${20*20}px)`,overflow:"auto","::-webkit-scrollbar":{background:t.altBgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.altFgSecondaryColor,borderRadius:20,border:`3px solid ${t.altBgPrimaryColor}`,":hover":{background:t.altBgPrimaryColor}}},profileSelectBox:{width:"100%",paddingBottom:10,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor},profileSelectOuter:{width:"100%",maxWidth:480,margin:"0 auto",position:"relative",zIndex:1,alignItems:"center",display:"flex",flexDirection:"column"},profileIndex:{textAlign:"right",display:"inline-block",color:t.altFgSecondaryColor},profileIndexSelected:{color:t.altFgPrimaryColor}}));W();function Yi(t,e){return K(()=>t(e),[t,e])}function Bm(t){let e=uo(V()),n=Yi(ln.set,0),a=Yi(ln.set,1),r=Yi(ln.set,2);return t.activeProfileState?m("div",{className:j(e.toolbarLeft)},m("div",{className:j(e.toolbarTab,t.viewMode===0&&e.toolbarTabActive),onClick:n},m("span",{className:j(e.emoji)},"\u{1F570}"),"Time Order"),m("div",{className:j(e.toolbarTab,t.viewMode===1&&e.toolbarTabActive),onClick:a},m("span",{className:j(e.emoji)},"\u2B05\uFE0F"),"Left Heavy"),m("div",{className:j(e.toolbarTab,t.viewMode===2&&e.toolbarTabActive),onClick:r},m("span",{className:j(e.emoji)},"\u{1F96A}"),"Sandwich")):null}var jm=(()=>{let t=null;return e=>{let n=e?.profiles.map(a=>a.profile)||null;return(t===null||n!=null&&!Ir(t,n))&&(t=n),t}})();function Qm(t){let e=uo(V()),{activeProfileState:n,profileGroup:a}=t,r=jm(a),[o,i]=Ge(!1),l=K(()=>{i(!0)},[i]),s=K(()=>{i(!1)},[i]);return Xe(()=>{let A=c=>{c.key==="t"&&(c.preventDefault(),i(!0))};return window.addEventListener("keypress",A),()=>{window.removeEventListener("keypress",A)}},[i]),Xe(()=>{let A=c=>{c.key==="t"&&(c.preventDefault(),i(!0))};return window.addEventListener("keypress",A),()=>{window.removeEventListener("keypress",A)}},[i]),n&&a&&r?a.profiles.length===1?m(rt,null,n.profile.getName()):m("div",{className:j(e.toolbarCenter),onMouseLeave:s},m("span",{onMouseOver:l},n.profile.getName()," ",m("span",{className:j(e.toolbarProfileIndex)},"(",n.index+1,"/",a.profiles.length,")")),m("div",{style:{display:o?"block":"none"}},m(S_,{setProfileIndexToView:t.setProfileIndexToView,indexToView:a.indexToView,profiles:r,closeProfileSelect:s,visible:o}))):m(rt,null,"\u{1F52C}speedscope")}function wm(t){let e=uo(V()),n=q(yn),a=m("div",{className:j(e.toolbarTab),onClick:t.saveFile},m("span",{className:j(e.emoji)},"\u2934\uFE0F"),"Export"),r=m("div",{className:j(e.toolbarTab),onClick:t.browseForFile},m("span",{className:j(e.emoji)},"\u2935\uFE0F"),"Import"),o=m("div",{className:j(e.toolbarTab),onClick:yn.cycleToNextColorScheme},m("span",{className:j(e.emoji)},"\u{1F3A8}"),m("span",{className:j(e.toolbarTabColorSchemeToggle)},Es(n))),i=m("div",{className:j(e.toolbarTab)},m("a",{href:"https://github.com/jlfwong/speedscope#usage",className:j(e.noLinkStyle),target:"_blank"},m("span",{className:j(e.emoji)},"\u2753"),"Help"));return m("div",{className:j(e.toolbarRight)},t.activeProfileState&&a,r,o,i)}function k_(t){let e=uo(V());return m("div",{className:j(e.toolbar)},m(Bm,{...t}),m(Qm,{...t}),m(wm,{...t}))}var uo=pe(t=>ge.create({toolbar:{height:20,flexShrink:0,background:t.altBgPrimaryColor,color:t.altFgPrimaryColor,textAlign:"center",fontFamily:'"Source Code Pro", Courier, monospace',fontSize:12,lineHeight:"18px",userSelect:"none"},toolbarLeft:{position:"absolute",height:20,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:20},toolbarRight:{height:20,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:t.altFgSecondaryColor},toolbarTab:{background:t.altBgSecondaryColor,marginTop:2,height:18,lineHeight:"18px",paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},toolbarTabActive:{background:t.selectionPrimaryColor,":hover":{background:t.selectionPrimaryColor}},toolbarTabColorSchemeToggle:{display:"inline-block",textAlign:"center",minWidth:"50px"},emoji:{display:"inline-block",verticalAlign:"middle",paddingTop:"0px",marginRight:"0.3em"},noLinkStyle:{textDecoration:"none",color:"inherit"}}));W();var Vm=Promise.resolve().then(()=>_e(Al())),Ym=!1;async function nh(t,e){let n=await Vm,a=null,r=null;try{r=JSON.parse(t),a=new n.SourceMapConsumer(r)}catch{return null}let o=[];a.eachMapping(function(l){o.push({...l,generatedColumn:l.generatedColumn+1,originalColumn:l.originalColumn+1})},{},n.SourceMapConsumer.GENERATED_ORDER);let i=e.replace(/\.[^/]*$/,"");return l=>{let s=!1;if((r?.file&&r?.file===l.file||("/"+l.file?.replace(/\.[^/]*$/,"")).endsWith("/"+i))&&(s=!0),!s||l.line==null||l.col==null)return null;let A=KA(o,h=>h.generatedLine>l.line?!0:h.generatedLine =l.col);if(A===-1)A=o.length-1;else{if(A===0)return null;A--}let c=o[A],_={};if(c.name!=null)_.name=c.name;else if(c.source!=null){let h=a?.sourceContentFor(c.source,!0);if(h){let I=h.split(` +`)[c.originalLine-1];if(I){let u=/\w+/.exec(I.substr(c.originalColumn-1));u&&(_.name=u[0])}}}switch(_.name){case"constructor":{_.name=l.name+" constructor";break}case"function":{_.name=l.name;break}case"const":case"export":{_.name=l.name;break}}return _.name&&l.name.includes(_.name)&&(_.name=l.name),c.source!=null&&(_.file=c.source,_.line=c.originalLine,_.col=c.originalColumn),Ym&&(console.groupCollapsed(`Remapping "${l.name}" -> "${_.name}"`),console.log("before",{...l}),console.log("item @ index",c),console.log("item @ index + 1",o[A+1]),console.log("after",_),console.groupEnd()),_}}W();var rh=({items:t,axis:e,renderItems:n,className:a,initialIndexInView:r})=>{let[o,i]=Ge(null),[l,s]=Ge(0),A=on(null),c=e==="x"?"width":"height",_=e==="x"?"left":"top",h=e==="x"?"scrollLeft":"scrollTop",f=r?t.reduce((v,Q,N)=>N {v?requestAnimationFrame(()=>{i(v.getBoundingClientRect()[c]),I.current!=null&&(v.scrollTo({[_]:I.current}),I.current=null)}):i(null),A.current=v},[i,c,_]),g=ne(()=>{if(A.current==null||o==null||l==null)return null;let v=l-o/4,Q=l+o+o/4,N=0,L=0,S=0;for(;S =v)break}let w=S;for(;S =Q)break}let M=Math.min(S,t.length-1);return{firstVisibleIndex:w,lastVisibleIndex:M,invisiblePrefixSize:L}},[o,l,t]),p=ne(()=>t.reduce((v,Q)=>v+Q.size,0),[t]),C=K(()=>{A.current!=null&&s(A.current[h])},[h]);Xe(()=>{let v=()=>{A.current!=null&&i(A.current.getBoundingClientRect()[c])};return window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[c]);let y=ne(()=>g?n(g.firstVisibleIndex,g.lastVisibleIndex):null,[n,g]),E=ne(()=>m("div",{style:{height:p}},m("div",{style:{transform:`translateY(${g?.invisiblePrefixSize||0}px)`}},y)),[g,y,p]);return m("div",{className:a,ref:u,onScroll:C},E)};function ah(t){let e=yo(V());return m("div",{className:j(e.hBarDisplay)},m("div",{className:j(e.hBarDisplayFilled),style:{width:`${t.perc}%`}}))}function sl(t){let e=V(),n=yo(e),{activeDirection:a}=t,r=a===0?e.fgPrimaryColor:e.fgSecondaryColor,o=a===1?e.fgPrimaryColor:e.fgSecondaryColor;return m("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:j(n.sortIcon)},m("path",{d:"M0 4L4 0L8 4H0Z",fill:r}),m("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:o}))}function $m(t,e,n){let a=[],r=0;for(let o of e)a.push(t.slice(r,o[0])),a.push(m("span",{className:n},t.slice(o[0],o[1]))),r=o[1];return a.push(t.slice(r)),m("span",null,a)}var Zm=({frame:t,matchedRanges:e,profile:n,index:a,selectedFrame:r,setSelectedFrame:o,getCSSColorForFrame:i})=>{let l=yo(V()),s=t.getTotalWeight(),A=t.getSelfWeight(),c=100*s/n.getTotalNonIdleWeight(),_=100*A/n.getTotalNonIdleWeight(),h=t===r;return m("tr",{key:`${a}`,onClick:o.bind(null,t),className:j(l.tableRow,a%2==0&&l.tableRowEven,h&&l.tableRowSelected)},m("td",{className:j(l.numericCell)},n.formatValue(s)," (",jt(c),")",m(ah,{perc:c})),m("td",{className:j(l.numericCell)},n.formatValue(A)," (",jt(_),")",m(ah,{perc:_})),m("td",{title:t.file,className:j(l.textCell)},m(_o,{color:i(t)}),e?$m(t.name,e,j(l.matched,h&&l.matchedSelected)):t.name))},Xm=fe(({profile:t,sortMethod:e,setSortMethod:n,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:o,searchQuery:i,searchIsActive:l})=>{let s=yo(V()),A=K((g,p)=>{if(p.preventDefault(),e.field==g)n({field:g,direction:e.direction===0?1:0});else switch(g){case 0:{n({field:g,direction:0});break}case 1:{n({field:g,direction:1});break}case 2:{n({field:g,direction:1});break}}},[e,n]),c=ot(kr),_=K((g,p)=>{if(!c)return null;let C=[];for(let y=g;y<=p;y++){let E=c.rowList[y],v=c.getSearchMatchForFrame(E);C.push(Zm({frame:E,matchedRanges:v??null,index:y,profile:t,selectedFrame:a,setSelectedFrame:r,getCSSColorForFrame:o}))}return C.length===0&&(l?C.push(m("tr",null,m("td",{className:j(s.emptyState)},'No symbol names match query "',i,'".'))):C.push(m("tr",null,m("td",{className:j(s.emptyState)},"No symbols found.")))),m("table",{className:j(s.tableView)},C)},[c,t,a,r,o,l,i,s.emptyState,s.tableView]),h=ne(()=>c==null?[]:c.rowList.map(g=>({size:20})),[c]),f=K(g=>A(2,g),[A]),I=K(g=>A(1,g),[A]),u=K(g=>A(0,g),[A]);return m("div",{className:j(Ee.vbox,s.profileTableView)},m("table",{className:j(s.tableView)},m("thead",{className:j(s.tableHeader)},m("tr",null,m("th",{className:j(s.numericCell),onClick:f},m(sl,{activeDirection:e.field===2?e.direction:null}),"Total"),m("th",{className:j(s.numericCell),onClick:I},m(sl,{activeDirection:e.field===1?e.direction:null}),"Self"),m("th",{className:j(s.textCell),onClick:u},m(sl,{activeDirection:e.field===0?e.direction:null}),"Symbol Name")))),m(rh,{axis:"y",items:h,className:j(s.scrollView),renderItems:_,initialIndexInView:a==null?null:c?.getIndexForFrame(a)}))}),yo=pe(t=>ge.create({profileTableView:{background:t.bgPrimaryColor,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden",flexGrow:1,"::-webkit-scrollbar":{background:t.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:t.fgSecondaryColor,borderRadius:20,border:`3px solid ${t.bgPrimaryColor}`,":hover":{background:t.fgPrimaryColor}}},tableView:{width:"100%",fontSize:10,background:t.bgPrimaryColor},tableHeader:{borderBottom:`2px solid ${t.bgSecondaryColor}`,textAlign:"left",color:t.fgPrimaryColor,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:20/4},tableRow:{background:t.bgPrimaryColor,height:20},tableRowEven:{background:t.bgSecondaryColor},tableRowSelected:{background:t.selectionPrimaryColor,color:t.altFgPrimaryColor},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:20,width:6*20,minWidth:6*20},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:ue.fromCSSHex(t.weightColor).withAlpha(.2).toCSS(),bottom:2,height:2,width:`calc(100% - ${2*20}px)`,right:20},hBarDisplayFilled:{height:"100%",position:"absolute",background:t.weightColor,right:0},matched:{borderBottom:`2px solid ${t.fgPrimaryColor}`},matchedSelected:{borderColor:t.altFgPrimaryColor},emptyState:{textAlign:"center",fontWeight:"bold"}})),oh=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e;if(!n)throw new Error("profile missing");let r=q(Er),o=V(),{callerCallee:i}=a,l=i?i.selectedFrame:null,s=Ut(n),A=Mt({theme:o,frameToColorBucket:s}),c=K(f=>{Fe.setSelectedFrame(f)},[]),_=q(Pn),h=q(On);return m(Xm,{profile:n,selectedFrame:l,getCSSColorForFrame:A,sortMethod:r,setSelectedFrame:c,setSortMethod:Er.set,searchIsActive:_,searchQuery:h})});W();W();var nr=class extends ut{constructor(){super(...arguments);this.setConfigSpaceViewportRect=n=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(n))};this.setLogicalSpaceViewportSize=n=>{this.props.setLogicalSpaceViewportSize(n)};this.transformViewport=n=>{this.setConfigSpaceViewportRect(n.transformRect(this.props.configSpaceViewportRect))};this.container=null;this.containerRef=n=>{this.container=n||null};this.setNodeHover=n=>{this.props.setNodeHover(n)}}clampViewportToFlamegraph(n){let{flamechart:a,renderInverted:r}=this.props;return a.getClampedConfigSpaceViewportRect({configSpaceViewportRect:n,renderInverted:r})}formatValue(n){let a=this.props.flamechart.getTotalWeight(),r=100*n/a,o=jt(r);return`${this.props.flamechart.formatValue(n)} (${o})`}renderTooltip(){if(!this.container)return null;let{hover:n}=this.props;if(!n)return null;let{width:a,height:r,left:o,top:i}=this.container.getBoundingClientRect(),l=new B(n.event.clientX-o,n.event.clientY-i),s=eI(this.props.theme),A=n.node.frame;return m(go,{containerSize:new B(a,r),offset:l},m("span",{className:j(s.hoverCount)},this.formatValue(n.node.getTotalWeight()))," ",A.name,A.file?m("div",null,A.file,":",A.line):void 0)}render(){return m("div",{className:j(Ee.fillY,Ee.fillX,Ee.vbox),ref:this.containerRef},m(Yn,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:Jn,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,renderInverted:this.props.renderInverted,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:null}),this.renderTooltip())}},eI=pe(t=>ge.create({hoverCount:{color:t.weightColor}}));var tI=Oe(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getInvertedProfileForCallersOf(e);return n?a.getProfileWithRecursionFlattened():a}),nI=Oe(({invertedCallerProfile:t,getColorBucketForFrame:e})=>new Vt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),rI=qn({inverted:!0}),ih=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=q(Kt),o=q(In),i=V();if(!n)throw new Error("profile missing");if(!o)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:s}=l,A=Ut(n),c=an(A),_=Mt({theme:i,frameToColorBucket:A}),h=Jt({theme:i,canvas:o}),f=nI({invertedCallerProfile:tI({profile:n,frame:s,flattenRecursion:r}),getColorBucketForFrame:c}),I=rI({canvasContext:h,flamechart:f});return m(nr,{theme:i,renderInverted:!0,flamechart:f,flamechartRenderer:I,canvasContext:h,getCSSColorForFrame:_,...Wn("SANDWICH_INVERTED_CALLERS"),...l.invertedCallerFlamegraph,setSelectedNode:Jn})});W();var aI=Oe(({profile:t,frame:e,flattenRecursion:n})=>{let a=t.getProfileForCalleesOf(e);return n?a.getProfileWithRecursionFlattened():a}),oI=Oe(({calleeProfile:t,getColorBucketForFrame:e})=>new Vt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),iI=qn(),lh=fe(t=>{let{activeProfileState:e}=t,{profile:n,sandwichViewState:a}=e,r=q(Kt),o=q(In),i=V();if(!n)throw new Error("profile missing");if(!o)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:s}=l,A=Ut(n),c=an(A),_=Mt({theme:i,frameToColorBucket:A}),h=Jt({theme:i,canvas:o}),f=oI({calleeProfile:aI({profile:n,frame:s,flattenRecursion:r}),getColorBucketForFrame:c}),I=iI({canvasContext:h,flamechart:f});return m(nr,{theme:i,renderInverted:!1,flamechart:f,flamechartRenderer:I,canvasContext:h,getCSSColorForFrame:_,...Wn("SANDWICH_CALLEES"),...l.calleeFlamegraph,setSelectedNode:Jn})});var Ah=fe(()=>{let t=ot(kr),e=t!=null?t.rowList:null,n=t?.selectedFrame!=null?t.getIndexForFrame(t.selectedFrame):null,a=e!=null?e.length:null,{selectPrev:r,selectNext:o}=ne(()=>e==null||a==null||a===0||t==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let i=n==null?a-1:n-1;i<0&&(i=a-1),t.setSelectedFrame(e[i])},selectNext:()=>{let i=n==null?0:n+1;i>=a&&(i=0),t.setSelectedFrame(e[i])}},[n,e,a,t]);return m(no,{resultIndex:n,numResults:a,selectPrev:r,selectNext:o})});W();var cl=class extends ut{constructor(){super(...arguments);this.setSelectedFrame=n=>{this.props.setSelectedFrame(n)};this.onWindowKeyPress=n=>{n.key==="Escape"&&this.setSelectedFrame(null)}}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let n=lI(this.props.theme),{selectedFrame:a}=this.props,r=null;return a&&(r=m("div",{className:j(Ee.fillY,n.callersAndCallees,Ee.vbox)},m("div",{className:j(Ee.hbox,n.panZoomViewWraper)},m("div",{className:j(n.flamechartLabelParent)},m("div",{className:j(n.flamechartLabel)},"Callers")),m(ih,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),m("div",{className:j(n.divider)}),m("div",{className:j(Ee.hbox,n.panZoomViewWraper)},m("div",{className:j(n.flamechartLabelParent,n.flamechartLabelParentBottom)},m("div",{className:j(n.flamechartLabel,n.flamechartLabelBottom)},"Callees")),m(lh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),m("div",{className:j(Ee.hbox,Ee.fillY)},m("div",{className:j(n.tableView)},m(oh,{activeProfileState:this.props.activeProfileState}),m(Ah,null)),r)}},lI=pe(t=>ge.create({tableView:{position:"relative",flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:12,width:12*1.2,borderRight:`1px solid ${t.fgSecondaryColor}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:12*1.2,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`2px solid ${t.fgSecondaryColor}`},divider:{height:2,background:t.fgSecondaryColor}})),kr=Et(null),sh=fe(t=>{let{activeProfileState:e,glCanvas:n}=t,{sandwichViewState:a,index:r}=e,{callerCallee:o}=a,i=V(),l=K(g=>{Fe.setSelectedFrame(g)},[]),s=e.profile,A=q(Er),c=ot(En),_=o?o.selectedFrame:null,h=ne(()=>{let g=[];switch(s.forEachFrame(p=>{c&&!c.getMatchForFrame(p)||g.push(p)}),A.field){case 0:{Ue(g,p=>p.name.toLowerCase());break}case 1:{Ue(g,p=>p.getSelfWeight());break}case 2:{Ue(g,p=>p.getTotalWeight());break}}return A.direction===1&&g.reverse(),g},[s,c,A]),f=ne(()=>{let g=new Map;for(let p=0;p {let C=g.get(p);return C??null}},[h]),I=ne(()=>g=>c==null?null:c.getMatchForFrame(g),[c]),u={rowList:h,selectedFrame:_,setSelectedFrame:l,getIndexForFrame:f,getSearchMatchForFrame:I};return m(kr.Provider,{value:u},m(cl,{theme:i,activeProfileState:e,glCanvas:n,setSelectedFrame:l,selectedFrame:_,profileIndex:r}))});var ur=Promise.resolve().then(()=>(qu(),Wu));ur.then(()=>{});Promise.resolve().then(()=>(Fi(),Ri)).then(()=>{});Promise.resolve().then(()=>_e(Al())).then(()=>{});async function Zu(t,e){return(await ur).importProfileGroupFromText(t,e)}async function iE(t,e){return(await ur).importProfileGroupFromBase64(t,e)}async function lE(t,e){return(await ur).importProfilesFromArrayBuffer(t,e)}async function AE(t){return(await ur).importProfilesFromFile(t)}async function sE(t){return(await ur).importFromFileSystemDirectoryEntry(t)}var cE=$u();function _E(t){return t!=null&&t.isDirectory}var EA=class extends ut{constructor(){super(...arguments);this.canvas=null;this.ref=n=>{n instanceof HTMLCanvasElement?this.canvas=n:this.canvas=null,this.props.setGLCanvas(this.canvas)};this.container=null;this.containerRef=n=>{n instanceof HTMLElement?this.container=n:this.container=null};this.maybeResize=()=>{if(!this.container||!this.props.canvasContext)return;let{width:n,height:a}=this.container.getBoundingClientRect(),r=n,o=a,i=n*window.devicePixelRatio,l=a*window.devicePixelRatio;this.props.canvasContext.gl.resize(i,l,r,o)};this.onWindowResize=()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()}}componentWillReceiveProps(n){this.props.canvasContext!==n.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),n.canvasContext&&(n.canvasContext.addBeforeFrameHandler(this.maybeResize),n.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){let n=Xu(this.props.theme);return m("div",{ref:this.containerRef,className:j(n.glCanvasView)},m("canvas",{ref:this.ref,width:1,height:1}))}},$o=class extends ut{constructor(){super(...arguments);this.loadExample=()=>{this.loadProfile(async()=>{let n="perf-vertx-stacks-01-collapsed-all.txt",a=await fetch(cE).then(r=>r.text());return await Zu(n,a)})};this.onDrop=n=>{if(this.props.setDragActive(!1),n.preventDefault(),!n.dataTransfer)return;let a=n.dataTransfer.items[0];if("webkitGetAsEntry"in a){let o=a.webkitGetAsEntry();if(o&&_E(o)&&o.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");let i=o;this.loadProfile(async()=>await sE(i));return}}let r=n.dataTransfer.files.item(0);r&&this.loadFromFile(r)};this.onDragOver=n=>{this.props.setDragActive(!0),n.preventDefault()};this.onDragLeave=n=>{this.props.setDragActive(!1),n.preventDefault()};this.onWindowKeyPress=async n=>{if(n.key==="1")this.props.setViewMode(0);else if(n.key==="2")this.props.setViewMode(1);else if(n.key==="3")this.props.setViewMode(2);else if(n.key==="r"){let{flattenRecursion:a}=this.props;this.props.setFlattenRecursion(!a)}else if(n.key==="n"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index+1)}else if(n.key==="p"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index-1)}};this.saveFile=()=>{if(this.props.profileGroup){let{name:n,indexToView:a,profiles:r}=this.props.profileGroup,o={name:n,indexToView:a,profiles:r.map(i=>i.profile)};__(o)}};this.browseForFile=()=>{let n=document.createElement("input");n.type="file",n.addEventListener("change",this.onFileSelect),n.click()};this.onWindowKeyDown=async n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)?(n.preventDefault(),this.saveFile()):n.key==="o"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),this.browseForFile())};this.onDocumentPaste=n=>{if(document.activeElement!=null&&document.activeElement.nodeName==="INPUT")return;n.preventDefault(),n.stopPropagation();let a=n.clipboardData;if(!a)return;let r=a.getData("text");this.loadProfile(async()=>await Zu("From Clipboard",r))};this.onFileSelect=n=>{let a=n.target.files.item(0);a&&this.loadFromFile(a)}}async loadProfile(n){if(this.props.setError(!1),this.props.setLoading(!0),await new Promise(r=>setTimeout(r,0)),!this.props.glCanvas)return;console.time("import");let a=null;try{a=await n()}catch(r){console.log("Failed to load format",r),this.props.setError(!0);return}if(a==null){alert("Unrecognized format! See documentation about supported formats."),this.props.setLoading(!1);return}else if(a.profiles.length===0){alert("Successfully imported profile, but it's empty!"),this.props.setLoading(!1);return}this.props.hashParams.title&&(a={...a,name:this.props.hashParams.title}),document.title=`${a.name} - speedscope`,this.props.hashParams.viewMode&&this.props.setViewMode(this.props.hashParams.viewMode);for(let r of a.profiles)await r.demangle();for(let r of a.profiles){let o=this.props.hashParams.title||r.getName();r.setName(o)}console.timeEnd("import"),this.props.setProfileGroup(a),this.props.setLoading(!1)}getStyle(){return Xu(this.props.theme)}loadFromFile(n){this.loadProfile(async()=>{let a=await AE(n);if(a){for(let r of a.profiles)r.getName()||r.setName(n.name);return a}if(this.props.profileGroup&&this.props.activeProfileState){let r=new FileReader,o=new Promise(c=>{r.addEventListener("loadend",()=>{if(typeof r.result!="string")throw new Error("Expected reader.result to be a string");c(r.result)})});r.readAsText(n);let i=await o,l=null,s=r_(i);s&&(console.log("Importing as emscripten symbol map"),l=s);let A=await nh(i,n.name);if(!l&&A&&(console.log("Importing as JavaScript source map"),l=A),l!=null)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(c=>{let _=c.profile.shallowClone();return _.remapSymbols(l),_})}}return null})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keypress",this.onWindowKeyPress),document.addEventListener("paste",this.onDocumentPaste),this.maybeLoadHashParamProfile()}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keypress",this.onWindowKeyPress),document.removeEventListener("paste",this.onDocumentPaste)}async maybeLoadHashParamProfile(){let{profileURL:n}=this.props.hashParams;if(n){if(!ja){alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);return}this.loadProfile(async()=>{let a=await fetch(n),r=new URL(n,window.location.href).pathname;return r.includes("/")&&(r=r.slice(r.lastIndexOf("/")+1)),await lE(r,await a.arrayBuffer())})}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(r,o)=>{this.loadProfile(()=>iE(r,o))}};let a=document.createElement("script");a.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(a)}}renderLanding(){let n=this.getStyle();return m("div",{className:j(n.landingContainer)},m("div",{className:j(n.landingMessage)},m("p",{className:j(n.landingP)},"\u{1F44B} Hi there! Welcome to \u{1F52C}speedscope, an interactive"," ",m("a",{className:j(n.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),ja?m("p",{className:j(n.landingP)},"Drag and drop a profile file onto this window to get started, click the big blue button below to browse for a profile to explore, or"," ",m("a",{tabIndex:0,className:j(n.link),onClick:this.loadExample},"click here")," ","to load an example profile."):m("p",{className:j(n.landingP)},"Drag and drop a profile file onto this window to get started, or click the big blue button below to browse for a profile to explore."),m("div",{className:j(n.browseButtonContainer)},m("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:j(n.hide)}),m("label",{for:"file",className:j(n.browseButton),tabIndex:0},"Browse")),m("p",{className:j(n.landingP)},"See the"," ",m("a",{className:j(n.link),href:"https://github.com/jlfwong/speedscope#usage",target:"_blank"},"documentation")," ","for information about supported file formats, keyboard shortcuts, and how to navigate around the profile."),m("p",{className:j(n.landingP)},"speedscope is open source. Please"," ",m("a",{className:j(n.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){let n=this.getStyle();return m("div",{className:j(n.error)},m("div",null,"\u{1F63F} Something went wrong."),m("div",null,"Check the JS console for more details."))}renderLoadingBar(){let n=this.getStyle();return m("div",{className:j(n.loading)})}renderContent(){let{viewMode:n,activeProfileState:a,error:r,loading:o,glCanvas:i}=this.props;if(r)return this.renderError();if(o)return this.renderLoadingBar();if(!a||!i)return this.renderLanding();switch(n){case 0:return m(y_,{activeProfileState:a,glCanvas:i});case 1:return m(v_,{activeProfileState:a,glCanvas:i});case 2:return m(sh,{activeProfileState:a,glCanvas:i})}}render(){let n=this.getStyle();return m("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:j(n.root,this.props.dragActive&&n.dragTargetRoot)},m(EA,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),m(k_,{saveFile:this.saveFile,browseForFile:this.browseForFile,...this.props}),m("div",{className:j(n.contentContainer)},this.renderContent()),this.props.dragActive&&m("div",{className:j(n.dragTarget)}))}},Xu=pe(t=>ge.create({glCanvasView:{position:"absolute",width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},loading:{height:3,marginBottom:-3,background:t.selectionPrimaryColor,transformOrigin:"0% 50%",animationName:[{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}}],animationTimingFunction:"cubic-bezier(0, 1, 0, 1)",animationDuration:"30s"},root:{width:"100vw",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative",fontFamily:'"Source Code Pro", Courier, monospace',lineHeight:"20px",color:t.fgPrimaryColor},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${t.selectionPrimaryColor}`,pointerEvents:"none"},contentContainer:{position:"relative",display:"flex",overflow:"hidden",flexDirection:"column",flex:1},landingContainer:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},landingMessage:{maxWidth:600},landingP:{marginBottom:16},hide:{display:"none"},browseButtonContainer:{display:"flex",alignItems:"center",justifyContent:"center"},browseButton:{marginBottom:16,height:72,flex:1,maxWidth:256,textAlign:"center",fontSize:36,lineHeight:"72px",background:t.selectionPrimaryColor,color:t.altFgPrimaryColor,transition:"all 0.07s ease-in",":hover":{background:t.selectionSecondaryColor}},link:{color:t.selectionPrimaryColor,cursor:"pointer",textDecoration:"none",transition:"all 0.07s ease-in",":hover":{color:t.selectionSecondaryColor}}}));var ef=fe(()=>{let t=q(In),e=V(),n=ne(()=>t?Jt({theme:e,canvas:t}):null,[e,t]);return m(t_,null,m($o,{activeProfileState:Qa(),canvasContext:n,setGLCanvas:In.set,setLoading:mi.set,setError:Ii.set,setProfileGroup:Fe.setProfileGroup,setDragActive:Ci.set,setViewMode:ln.set,setFlattenRecursion:Kt.set,setProfileIndexToView:Fe.setProfileIndexToView,profileGroup:q(Fe),theme:e,flattenRecursion:q(Kt),viewMode:q(ln),hashParams:q(hs),glCanvas:t,dragActive:q(Ci),loading:q(mi),error:q(Ii)}))});console.log(`speedscope v${Li().version}`);ai(m(Bs,null,m(ef,null)),document.body,document.body.lastElementChild||void 0);})(); +//# sourceMappingURL=speedscope-CAEVGCWN.js.map diff --git a/deps/speedscope/speedscope-W5HZ7E66.js b/deps/speedscope/speedscope-W5HZ7E66.js deleted file mode 100644 index 1524fb09..00000000 --- a/deps/speedscope/speedscope-W5HZ7E66.js +++ /dev/null @@ -1,196 +0,0 @@ -"use strict";(()=>{var P0=Object.create;var Di=Object.defineProperty;var D0=Object.getOwnPropertyDescriptor;var z0=Object.getOwnPropertyNames;var V0=Object.getPrototypeOf,J0=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ps=(t,e)=>{for(var r in e)Di(t,r,{get:e[r],enumerable:!0})},U0=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of z0(e))!J0.call(t,n)&&n!==r&&Di(t,n,{get:()=>e[n],enumerable:!(a=D0(e,n))||a.enumerable});return t};var se=(t,e,r)=>(r=t!=null?P0(V0(t)):{},U0(e||!t||!t.__esModule?Di(r,"default",{value:t,enumerable:!0}):r,t));function Z(t){return t[t.length-1]||null}function Ie(t,e){function r(a,n){let i=e(a),o=e(n);return i o?1:0}t.sort(r)}function Ce(t,e,r){return t.has(e)||t.set(e,r(e)),t.get(e)}function Zn(t,e,r){return t.has(e)?t.get(e):r(e)}function Ue(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*As(t,e){for(let r of t)yield e(r)}function Ns(t,e){for(let r of t)e(r)}function Ut(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function vt(t){let e=`${t.toFixed(0)}%`;return t===100?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function Y0(t){return t-Math.floor(t)}function Qn(t){return 2*Math.abs(Y0(t)-.5)-1}function Es(t,e,r,a,n=1){for(console.assert(!isNaN(n)&&!isNaN(a));;){if(e-t<=n)return[t,e];let i=(e+t)/2;r(i){let a;return e==null?(a=t(r),e={args:r,result:a},a):(hn(e.args,r)||(e.args=r,e.result=t(r)),e.result)}}function Tr(t){let e=null;return r=>{let a;return e==null?(a=t(r),e={args:r,result:a},a):(e.args===r||(e.args=r,e.result=t(r)),e.result)}}function Z0(t){let e=null;return()=>(e==null&&(e={result:t()}),e.result)}function Hs(t){let e=Q0();if(t.length%4!==0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);let r=t.length/4,a;t.length>=4&&t.charAt(t.length-1)==="="?t.charAt(t.length-2)==="="?a=r*3-2:a=r*3-1:a=r*3;let n=new Uint8Array(a),i=0;for(let o=0;o >4,s!=="="&&(n[i++]=(f&15)<<4|v>>2),c!=="="&&(n[i++]=(v&7)<<6|b)}if(i!==a)throw new Error(`Expected to decode ${a} bytes, but only decoded ${i})`);return n}var pt,Q0,$=ie(()=>{"use strict";pt=class{constructor(){this.map=new Map}getOrInsert(e){let r=e.key,a=this.map.get(r);return a||(this.map.set(r,e),e)}forEach(e){this.map.forEach(e)}[Symbol.iterator](){return this.map.values()}};Q0=Z0(()=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let r=0;r {"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.default=kp;var xp=/-webkit-|-moz-|-ms-/;function kp(t){return typeof t=="string"&&xp.test(t)}u_.exports=ga.default});var p_=E((ya,d_)=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.default=Hp;var Ap=_r(),Np=Ep(Ap);function Ep(t){return t&&t.__esModule?t:{default:t}}var Tp=["-webkit-","-moz-",""];function Hp(t,e){if(typeof e=="string"&&!(0,Np.default)(e)&&e.indexOf("calc(")>-1)return Tp.map(function(r){return e.replace(/calc\(/g,r+"calc(")})}d_.exports=ya.default});var m_=E((ba,v_)=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.default=Mp;var Rp=_r(),Lp=Ip(Rp);function Ip(t){return t&&t.__esModule?t:{default:t}}var Fp=["-webkit-",""];function Mp(t,e){if(typeof e=="string"&&!(0,Lp.default)(e)&&e.indexOf("cross-fade(")>-1)return Fp.map(function(r){return e.replace(/cross-fade\(/g,r+"cross-fade(")})}v_.exports=ba.default});var y_=E((Sa,g_)=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.default=Pp;var Op=["-webkit-","-moz-",""],Bp={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function Pp(t,e){if(t==="cursor"&&Bp.hasOwnProperty(e))return Op.map(function(r){return r+e})}g_.exports=Sa.default});var S_=E((ja,b_)=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.default=Up;var Dp=_r(),zp=Vp(Dp);function Vp(t){return t&&t.__esModule?t:{default:t}}var Jp=["-webkit-",""];function Up(t,e){if(typeof e=="string"&&!(0,zp.default)(e)&&e.indexOf("filter(")>-1)return Jp.map(function(r){return e.replace(/filter\(/g,r+"filter(")})}b_.exports=ja.default});var w_=E((Ca,C_)=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.default=Kp;var j_={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function Kp(t,e){if(t==="display"&&j_.hasOwnProperty(e))return j_[e]}C_.exports=Ca.default});var A_=E((wa,k_)=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.default=Wp;var $p={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},x_={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function Wp(t,e,r){x_.hasOwnProperty(t)&&(r[x_[t]]=$p[e]||e)}k_.exports=wa.default});var T_=E((xa,E_)=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.default=qp;var Gp={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},N_={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function qp(t,e,r){t==="flexDirection"&&typeof e=="string"&&(e.indexOf("column")>-1?r.WebkitBoxOrient="vertical":r.WebkitBoxOrient="horizontal",e.indexOf("reverse")>-1?r.WebkitBoxDirection="reverse":r.WebkitBoxDirection="normal"),N_.hasOwnProperty(t)&&(r[N_[t]]=Gp[e]||e)}E_.exports=xa.default});var R_=E((ka,H_)=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.default=tv;var Xp=_r(),Yp=Zp(Xp);function Zp(t){return t&&t.__esModule?t:{default:t}}var Qp=["-webkit-","-moz-",""],ev=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function tv(t,e){if(typeof e=="string"&&!(0,Yp.default)(e)&&ev.test(e))return Qp.map(function(r){return r+e})}H_.exports=ka.default});var I_=E((Aa,L_)=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.default=ov;var rv=_r(),nv=av(rv);function av(t){return t&&t.__esModule?t:{default:t}}var iv=["-webkit-",""];function ov(t,e){if(typeof e=="string"&&!(0,nv.default)(e)&&e.indexOf("image-set(")>-1)return iv.map(function(r){return e.replace(/image-set\(/g,r+"image-set(")})}L_.exports=Aa.default});var M_=E((Na,F_)=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.default=lv;function lv(t,e){if(t==="position"&&e==="sticky")return["-webkit-sticky","sticky"]}F_.exports=Na.default});var B_=E((Ea,O_)=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.default=hv;var sv=["-webkit-","-moz-",""],_v={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},cv={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function hv(t,e){if(_v.hasOwnProperty(t)&&cv.hasOwnProperty(e))return sv.map(function(r){return r+e})}O_.exports=Ea.default});var D_=E((OS,P_)=>{"use strict";var fv=/[A-Z]/g,uv=/^ms-/,ho={};function dv(t){return t in ho?ho[t]:ho[t]=t.replace(fv,"-$&").toLowerCase().replace(uv,"-ms-")}P_.exports=dv});var V_=E((Ta,z_)=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.default=gv;var pv=D_(),vv=mv(pv);function mv(t){return t&&t.__esModule?t:{default:t}}function gv(t){return(0,vv.default)(t)}z_.exports=Ta.default});var fo=E((Ha,J_)=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.default=yv;function yv(t){return t.charAt(0).toUpperCase()+t.slice(1)}J_.exports=Ha.default});var $_=E((Ra,K_)=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.default=Nv;var bv=V_(),Sv=uo(bv),jv=_r(),Cv=uo(jv),wv=fo(),U_=uo(wv);function uo(t){return t&&t.__esModule?t:{default:t}}var xv={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},kv={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function Av(t,e){if((0,Cv.default)(t))return t;for(var r=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),a=0,n=r.length;a -1&&_!=="order")for(var s=e[l],c=0,h=s.length;c -1)return i;var o=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(l){return!/-webkit-|-ms-/.test(l)}).join(",");return t.indexOf("Moz")>-1?o:(r["Webkit"+(0,U_.default)(t)]=i,r["Moz"+(0,U_.default)(t)]=o,n)}}K_.exports=Ra.default});var G_=E((BS,W_)=>{"use strict";function Ev(t){for(var e=5381,r=t.length;r;)e=e*33^t.charCodeAt(--r);return e>>>0}W_.exports=Ev});var X_=E((La,q_)=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.default=Lv;var Tv=fo(),Hv=Rv(Tv);function Rv(t){return t&&t.__esModule?t:{default:t}}function Lv(t,e,r){if(t.hasOwnProperty(e)){for(var a={},n=t[e],i=(0,Hv.default)(e),o=Object.keys(r),l=0;l {"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.default=Iv;function Iv(t,e,r,a,n){for(var i=0,o=t.length;i {"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=Fv;function Q_(t,e){t.indexOf(e)===-1&&t.push(e)}function Fv(t,e){if(Array.isArray(e))for(var r=0,a=e.length;r{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default=Mv;function Mv(t){return t instanceof Object&&!Array.isArray(t)}rc.exports=Ma.default});var oc=E((Ba,ic)=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.default=Uv;var Ov=X_(),Bv=Oa(Ov),Pv=Z_(),ac=Oa(Pv),Dv=tc(),zv=Oa(Dv),Vv=nc(),Jv=Oa(Vv);function Oa(t){return t&&t.__esModule?t:{default:t}}function Uv(t){var e=t.prefixMap,r=t.plugins;function a(n){for(var i in n){var o=n[i];if((0,Jv.default)(o))n[i]=a(o);else if(Array.isArray(o)){for(var l=[],_=0,s=o.length;_ 0&&(n[i]=l)}else{var h=(0,ac.default)(r,i,o,n,e);h&&(n[i]=h),n=(0,Bv.default)(e,i,n)}}return n}return a}ic.exports=Ba.default});var uc=E((PS,fc)=>{"use strict";fc.exports=po;function po(t){yt.length||(Pa(),_c=!0),yt[yt.length]=t}var yt=[],_c=!1,Pa,gt=0,Kv=1024;function lc(){for(;gtKv){for(var e=0,r=yt.length-gt;e {"use strict";var dc=uc(),Da=[],vo=[],Wv=dc.makeRequestCallFromTimer(Gv);function Gv(){if(vo.length)throw vo.shift()}vc.exports=mo;function mo(t){var e;Da.length?e=Da.pop():e=new pc,e.task=t,dc(e)}function pc(){this.task=null}pc.prototype.call=function(){try{this.task.call()}catch(t){mo.onerror?mo.onerror(t):(vo.push(t),Wv())}finally{this.task=null,Da[Da.length]=this}}});var It,Y,Pe,He=ie(()=>{"use strict";$();It=class{constructor(){this.unit="none"}format(e){return e.toLocaleString()}},Y=class{constructor(e){this.unit=e;e==="nanoseconds"?this.multiplier=1e-9:e==="microseconds"?this.multiplier=1e-6:e==="milliseconds"?this.multiplier=.001:this.multiplier=1}formatUnsigned(e){let r=e*this.multiplier;if(r/60>=1){let a=Math.floor(r/60),n=Math.floor(r-a*60).toString();return`${a}:${Ut(n,2)}`}return r/1>=1?`${r.toFixed(2)}s`:r/.001>=1?`${(r/.001).toFixed(2)}ms`:r/1e-6>=1?`${(r/1e-6).toFixed(2)}\xB5s`:`${(r/1e-9).toFixed(2)}ns`}format(e){return`${e<0?"-":""}${this.formatUnsigned(Math.abs(e))}`}},Pe=class{constructor(){this.unit="bytes"}format(e){return e<1024?`${e.toFixed(0)} B`:(e/=1024,e<1024?`${e.toFixed(2)} KB`:(e/=1024,e<1024?`${e.toFixed(2)} MB`:(e/=1024,`${e.toFixed(2)} GB`)))}}});var Co={};ps(Co,{demangleCpp:()=>Hm});function Hm(t){if(t.startsWith("__Z")){let e=$c.get(t);e!==void 0||(jo||(jo=new Function("exports",Rm)()),e=jo(t.slice(1)),e=e==="(null)"?t:e,$c.set(t,e)),t=e}return t}var jo,$c,Rm,wo=ie(()=>{"use strict";$c=new Map;Rm=` -return function(){function r(r){eval.call(null,r)}function a(r){throw print(r+":\\n"+(new Error).stack),ke=!0,"Assertion: "+r}function e(r,e){r||a("Assertion failed: "+e)}function i(r,a,i,v){function t(r,a){if("string"==a){var e=Oe;return le.stackAlloc(r.length+1),A(r,e),e}return r}function f(r,a){return"string"==a?s(r):r}try{func=ce.Module["_"+r]}catch(r){}e(func,"Cannot call unknown function "+r+" (perhaps LLVM optimizations or closure removed it?)");var _=0,n=v?v.map(function(r){return t(r,i[_++])}):[];return f(func.apply(null,n),a)}function v(r,a,e){return function(){return i(r,a,e,Array.prototype.slice.call(arguments))}}function t(r,e,i,v){switch(i=i||"i8","*"===i[i.length-1]&&(i="i32"),i){case"i1":Ae[r]=e;break;case"i8":Ae[r]=e;break;case"i16":ye[r>>1]=e;break;case"i32":Se[r>>2]=e;break;case"i64":Se[r>>2]=e;break;case"float":Ce[r>>2]=e;break;case"double":ze[0]=e,Se[r>>2]=xe[0],Se[r+4>>2]=xe[1];break;default:a("invalid type for setValue: "+i)}}function f(r,e,i){switch(e=e||"i8","*"===e[e.length-1]&&(e="i32"),e){case"i1":return Ae[r];case"i8":return Ae[r];case"i16":return ye[r>>1];case"i32":return Se[r>>2];case"i64":return Se[r>>2];case"float":return Ce[r>>2];case"double":return xe[0]=Se[r>>2],xe[1]=Se[r+4>>2],ze[0];default:a("invalid type for setValue: "+e)}return null}function _(r,a,e){var i,v;"number"==typeof r?(i=!0,v=r):(i=!1,v=r.length);var f="string"==typeof a?a:null,_=[Jr,le.stackAlloc,le.staticAlloc][void 0===e?we:e](Math.max(v,f?1:a.length));if(i)return Fa(_,0,v),_;for(var s,n=0;n >12<<12}function l(){for(;Le<=Ie;)Le=o(2*Le);var r=Ae,a=new ArrayBuffer(Le);Ae=new Int8Array(a),ye=new Int16Array(a),Se=new Int32Array(a),ge=new Uint8Array(a),me=new Uint16Array(a),Me=new Uint32Array(a),Ce=new Float32Array(a),Re=new Float64Array(a),Ae.set(r)}function b(r){for(;r.length>0;){var a=r.shift(),e=a.func;"number"==typeof e&&(e=pe[e]),e(void 0===a.arg?null:a.arg)}}function k(){b(Ve)}function u(){b(Be),be.print()}function c(r,a){return Array.prototype.slice.call(Ae.subarray(r,r+a))}function h(r,a){for(var e=new Uint8Array(a),i=0;i255&&(v&=255),e.push(v),i+=1}return a||e.push(0),e}function E(r){for(var a=[],e=0;e 255&&(i&=255),a.push(String.fromCharCode(i))}return a.join("")}function A(r,a,e){for(var i=0;i 255&&(v&=255),Ae[a+i]=v,i+=1}e||(Ae[a+i]=0)}function g(r,a,e,i){return r>=0?r:a<=32?2*Math.abs(1< =v&&(a<=32||r>v)&&(r=-2*v+r),r}function m(r,a,e){if(0==(0|r)|0==(0|a)|0==(0|e))var i=0;else{Se[r>>2]=0,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function S(r,a,e){if(0==(0|r)|(0|a)<0|0==(0|e))var i=0;else{Se[r>>2]=41,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function M(r,a,e){if(0==(0|r)|0==(0|e))var i=0;else{Se[r>>2]=6,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function C(r,a,e){if(0==(0|r)|0==(0|e))var i=0;else{Se[r>>2]=7,Se[r+4>>2]=a,Se[r+8>>2]=e;var i=1}var i;return i}function R(r,a){var e,i=0==(0|a);do if(i)var v=0;else{var e=(r+32|0)>>2,t=Se[e];if((0|t)>=(0|Se[r+36>>2])){var v=0;break}var f=(t<<2)+Se[r+28>>2]|0;Se[f>>2]=a;var _=Se[e]+1|0;Se[e]=_;var v=1}while(0);var v;return v}function T(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=i+1|0;Se[e]=v;var t=Ae[i]<<24>>24==95;do if(t){var f=i+2|0;if(Se[e]=f,Ae[v]<<24>>24!=90){var _=0;break}var s=O(r,a),_=s}else var _=0;while(0);var _;return _}function O(r,a){var e=r+12|0,i=Ae[Se[e>>2]];r:do if(i<<24>>24==71||i<<24>>24==84)var v=Tr(r),t=v;else{var f=Ar(r),_=0==(0|f)|0==(0|a);do if(!_){if(0!=(1&Se[r+8>>2]|0))break;var s=Me[f>>2],n=(s-25|0)>>>0<3;a:do if(n)for(var o=f;;){var o,l=Me[o+4>>2],b=Me[l>>2];if((b-25|0)>>>0>=3){var k=l,u=b;break a}var o=l}else var k=f,u=s;while(0);var u,k;if(2!=(0|u)){var t=k;break r}var c=k+8|0,h=Me[c>>2],d=(Se[h>>2]-25|0)>>>0<3;a:do if(d)for(var w=h;;){var w,p=Me[w+4>>2];if((Se[p>>2]-25|0)>>>0>=3){var E=p;break a}var w=p}else var E=h;while(0);var E;Se[c>>2]=E;var t=k;break r}while(0);var A=Ae[Se[e>>2]];if(A<<24>>24==0||A<<24>>24==69){var t=f;break}var g=Or(f),y=Sr(r,g),m=D(r,3,f,y),t=m}while(0);var t;return t}function N(r){var a,e,i=Oe;Oe+=4;var v=i,e=v>>2,a=(r+12|0)>>2,t=Me[a],f=Ae[t],_=f<<24>>24;r:do if(f<<24>>24==114||f<<24>>24==86||f<<24>>24==75){var s=I(r,v,0);if(0==(0|s)){var n=0;break}var o=N(r);Se[s>>2]=o;var l=Se[e],b=R(r,l);if(0==(0|b)){var n=0;break}var n=Se[e]}else{do{if(97==(0|_)||98==(0|_)||99==(0|_)||100==(0|_)||101==(0|_)||102==(0|_)||103==(0|_)||104==(0|_)||105==(0|_)||106==(0|_)||108==(0|_)||109==(0|_)||110==(0|_)||111==(0|_)||115==(0|_)||116==(0|_)||118==(0|_)||119==(0|_)||120==(0|_)||121==(0|_)||122==(0|_)){var k=ai+20*(_-97)|0,u=P(r,k);Se[e]=u;var c=r+48|0,h=Se[c>>2]+Se[Se[u+4>>2]+4>>2]|0;Se[c>>2]=h;var d=Se[a]+1|0;Se[a]=d;var n=u;break r}if(117==(0|_)){Se[a]=t+1|0;var w=L(r),p=D(r,34,w,0);Se[e]=p;var E=p}else if(70==(0|_)){var A=F(r);Se[e]=A;var E=A}else if(48==(0|_)||49==(0|_)||50==(0|_)||51==(0|_)||52==(0|_)||53==(0|_)||54==(0|_)||55==(0|_)||56==(0|_)||57==(0|_)||78==(0|_)||90==(0|_)){var g=X(r);Se[e]=g;var E=g}else if(65==(0|_)){var y=j(r);Se[e]=y;var E=y}else if(77==(0|_)){var m=U(r);Se[e]=m;var E=m}else if(84==(0|_)){var S=x(r);if(Se[e]=S,Ae[Se[a]]<<24>>24!=73){var E=S;break}var M=R(r,S);if(0==(0|M)){var n=0;break r}var C=Se[e],T=z(r),O=D(r,4,C,T);Se[e]=O;var E=O}else if(83==(0|_)){var B=ge[t+1|0];if((B-48&255&255)<10|B<<24>>24==95|(B-65&255&255)<26){var H=V(r,0);if(Se[e]=H,Ae[Se[a]]<<24>>24!=73){var n=H;break r}var K=z(r),Y=D(r,4,H,K);Se[e]=Y;var E=Y}else{var G=X(r);if(Se[e]=G,0==(0|G)){var E=0;break}if(21==(0|Se[G>>2])){var n=G;break r}var E=G}}else if(80==(0|_)){Se[a]=t+1|0;var W=N(r),Z=D(r,29,W,0);Se[e]=Z;var E=Z}else if(82==(0|_)){Se[a]=t+1|0;var Q=N(r),q=D(r,30,Q,0);Se[e]=q;var E=q}else if(67==(0|_)){Se[a]=t+1|0;var $=N(r),J=D(r,31,$,0);Se[e]=J;var E=J}else if(71==(0|_)){Se[a]=t+1|0;var rr=N(r),ar=D(r,32,rr,0);Se[e]=ar;var E=ar}else{if(85!=(0|_)){var n=0;break r}Se[a]=t+1|0;var er=L(r);Se[e]=er;var ir=N(r),vr=Se[e],tr=D(r,28,ir,vr);Se[e]=tr;var E=tr}}while(0);var E,fr=R(r,E);if(0==(0|fr)){var n=0;break}var n=Se[e]}while(0);var n;return Oe=i,n}function I(r,a,e){for(var i,v=r+12|0,t=0!=(0|e),f=t?25:22,i=(r+48|0)>>2,_=t?26:23,s=t?27:24,n=a;;){var n,o=Se[v>>2],l=Ae[o];if(l<<24>>24!=114&&l<<24>>24!=86&&l<<24>>24!=75){var b=n;break}var k=o+1|0;if(Se[v>>2]=k,l<<24>>24==114){var u=Se[i]+9|0;Se[i]=u;var c=f}else if(l<<24>>24==86){var h=Se[i]+9|0;Se[i]=h;var c=_}else{var d=Se[i]+6|0;Se[i]=d;var c=s}var c,w=D(r,c,0,0);if(Se[n>>2]=w,0==(0|w)){var b=0;break}var n=w+4|0}var b;return b}function P(r,a){var e=0==(0|a);do if(e)var i=0;else{var v=J(r);if(0==(0|v)){var i=0;break}Se[v>>2]=33,Se[v+4>>2]=a;var i=v}while(0);var i;return i}function D(r,a,e,i){var v,t;do{if(1==(0|a)||2==(0|a)||3==(0|a)||4==(0|a)||10==(0|a)||28==(0|a)||37==(0|a)||43==(0|a)||44==(0|a)||45==(0|a)||46==(0|a)||47==(0|a)||48==(0|a)||49==(0|a)||50==(0|a)){if(0==(0|e)|0==(0|i)){var f=0;t=7;break}t=5;break}if(8==(0|a)||9==(0|a)||11==(0|a)||12==(0|a)||13==(0|a)||14==(0|a)||15==(0|a)||16==(0|a)||17==(0|a)||18==(0|a)||19==(0|a)||20==(0|a)||29==(0|a)||30==(0|a)||31==(0|a)||32==(0|a)||34==(0|a)||38==(0|a)||39==(0|a)||42==(0|a)){if(0==(0|e)){var f=0;t=7;break}t=5;break}if(36==(0|a)){if(0==(0|i)){var f=0;t=7;break}t=5;break}if(35==(0|a)||22==(0|a)||23==(0|a)||24==(0|a)||25==(0|a)||26==(0|a)||27==(0|a))t=5;else{var f=0;t=7}}while(0);do if(5==t){var _=J(r),v=_>>2;if(0==(0|_)){var f=0;break}Se[v]=a,Se[v+1]=e,Se[v+2]=i;var f=_}while(0);var f;return f}function L(r){var a=sr(r);if((0|a)<1)var e=0;else{var i=Rr(r,a);Se[r+44>>2]=i;var e=i}var e;return e}function F(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;if(Se[a]=i,Ae[e]<<24>>24==70){if(Ae[i]<<24>>24==89){var v=e+2|0;Se[a]=v}var t=Sr(r,1),f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==69?t:0,n=s}else var n=0;var n;return n}function X(r){var a=Ar(r);return a}function j(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==65;do if(v){var t=Ae[i];if(t<<24>>24==95)var f=0;else if((t-48&255&255)<10){for(var _=i;;){var _,s=_+1|0;if(Se[a]=s,(Ae[s]-48&255&255)>=10)break;var _=s}var n=s-i|0,o=lr(r,i,n);if(0==(0|o)){var l=0;break}var f=o}else{var b=nr(r);if(0==(0|b)){var l=0;break}var f=b}var f,k=Se[a],u=k+1|0;if(Se[a]=u,Ae[k]<<24>>24!=95){var l=0;break}var c=N(r),h=D(r,36,f,c),l=h}else var l=0;while(0);var l;return l}function U(r){var a=Oe;Oe+=4;var e=a,i=r+12|0,v=Se[i>>2],t=v+1|0;Se[i>>2]=t;var f=Ae[v]<<24>>24==77;r:do if(f){var _=N(r),s=I(r,e,1);if(0==(0|s)){var n=0;break}var o=N(r);Se[s>>2]=o;var l=(0|s)==(0|e);do if(!l){if(35==(0|Se[o>>2]))break;var b=Se[e>>2],k=R(r,b);if(0==(0|k)){var n=0;break r}}while(0);var u=Se[e>>2],c=D(r,37,_,u),n=c}else var n=0;while(0);var n;return Oe=a,n}function x(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==84;do if(v){if(Ae[i]<<24>>24==95)var t=0,f=i;else{var _=sr(r);if((0|_)<0){var s=0;break}var t=_+1|0,f=Se[a]}var f,t;if(Se[a]=f+1|0,Ae[f]<<24>>24!=95){var s=0;break}var n=r+40|0,o=Se[n>>2]+1|0;Se[n>>2]=o;var l=Er(r,t),s=l}else var s=0;while(0);var s;return s}function z(r){var a,e=Oe;Oe+=4;var i=e,v=r+44|0,t=Se[v>>2],a=(r+12|0)>>2,f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==73;r:do if(s){Se[i>>2]=0;for(var n=i;;){var n,o=_r(r);if(0==(0|o)){var l=0;break r}var b=D(r,39,o,0);if(Se[n>>2]=b,0==(0|b)){var l=0;break r}var k=Se[a];if(Ae[k]<<24>>24==69)break;var n=b+8|0}var u=k+1|0;Se[a]=u,Se[v>>2]=t;var l=Se[i>>2]}else var l=0;while(0);var l;return Oe=e,l}function V(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=i+1|0;Se[e]=v;var t=Ae[i]<<24>>24==83;r:do if(t){var f=i+2|0;Se[e]=f;var _=ge[v];if(_<<24>>24==95)var s=0;else{if(!((_-48&255&255)<10|(_-65&255&255)<26)){var n=8&Se[r+8>>2],o=n>>>3,l=0!=(0|n)|0==(0|a);do if(l)var b=o;else{if((Ae[f]-67&255&255)>=2){var b=o;break}var b=1}while(0);for(var b,k=0|ei;;){var k;if(k>>>0>=(ei+196|0)>>>0){var u=0;break r}if(_<<24>>24==Ae[0|k]<<24>>24)break;var k=k+28|0}var c=Se[k+20>>2];if(0!=(0|c)){var h=Se[k+24>>2],d=fr(r,c,h);Se[r+44>>2]=d}if(0==(0|b))var w=k+8|0,p=k+4|0;else var w=k+16|0,p=k+12|0;var p,w,E=Se[w>>2],A=Se[p>>2],g=r+48|0,y=Se[g>>2]+E|0;Se[g>>2]=y;var m=fr(r,A,E),u=m;break}for(var S=_,M=0,C=f;;){var C,M,S;if((S-48&255&255)<10)var R=36*M-48|0;else{if((S-65&255&255)>=26){var u=0;break r}var R=36*M-55|0}var R,T=(S<<24>>24)+R|0;if((0|T)<0){var u=0;break r}var O=C+1|0;Se[e]=O;var N=ge[C];if(N<<24>>24==95)break;var S=N,M=T,C=O}var s=T+1|0}var s;if((0|s)>=(0|Se[r+32>>2])){var u=0;break}var I=r+40|0,P=Se[I>>2]+1|0;Se[I>>2]=P;var u=Se[Se[r+28>>2]+(s<<2)>>2]}else var u=0;while(0);var u;return u}function B(r,a,e,i){var v,t,f,_,s=Oe;Oe+=28;var n,o=s,_=o>>2;Se[_]=r;var l=e+1|0,f=(o+12|0)>>2;Se[f]=l;var b=Jr(l),t=(o+4|0)>>2;if(Se[t]=b,0==(0|b))var k=0,u=1;else{var v=(o+8|0)>>2;Se[v]=0,Se[_+4]=0,Se[_+5]=0;var c=o+24|0;Se[c>>2]=0,H(o,a);var h=Me[t],d=0==(0|h);do{if(!d){var w=Me[v];if(w>>>0>=Me[f]>>>0){n=5;break}Se[v]=w+1|0,Ae[h+w|0]=0,n=6;break}n=5}while(0);5==n&&Y(o,0);var p=Se[t],E=0==(0|p)?Se[c>>2]:Se[f],k=p,u=E}var u,k;return Se[i>>2]=u,Oe=s,k}function H(r,a){var e,i,v,t,f,_,s,n,o,l,b,k,u,c,h,d,w,p,E,A,g,y,m,S,M,C,R,T,O,N,I,P,D,L,F,X,j,U,x,z,V,B,K,G,W,J,vr,tr,fr,_r,sr,nr,or,lr,br,kr,ur,cr,hr,dr,wr,pr=a>>2,Er=r>>2,Ar=Oe;Oe+=184;var gr,yr=Ar,wr=yr>>2,mr=Ar+64,dr=mr>>2,Sr=Ar+72,Mr=Ar+88,Cr=Ar+104,hr=Cr>>2,Rr=Ar+168,Tr=0==(0|a);r:do if(Tr)Z(r);else{var cr=(r+4|0)>>2,Or=Me[cr];if(0==(0|Or))break;var Nr=0|a,Ir=Me[Nr>>2];a:do{if(0==(0|Ir)){if(0!=(4&Se[Er]|0)){var Pr=Se[pr+1],Dr=Se[pr+2];q(r,Pr,Dr);break r}var ur=(r+8|0)>>2,Lr=Me[ur],Fr=a+8|0,Xr=Me[Fr>>2];if((Xr+Lr|0)>>>0>Me[Er+3]>>>0){var jr=Se[pr+1];Q(r,jr,Xr);break r}var Ur=Or+Lr|0,xr=Se[pr+1];Pa(Ur,xr,Xr,1);var zr=Se[ur]+Se[Fr>>2]|0;Se[ur]=zr;break r}if(1==(0|Ir)||2==(0|Ir)){var Vr=Se[pr+1];H(r,Vr);var Br=0==(4&Se[Er]|0),Hr=Me[cr],Kr=0!=(0|Hr);e:do if(Br){do if(Kr){var kr=(r+8|0)>>2,Yr=Me[kr];if((Yr+2|0)>>>0>Me[Er+3]>>>0)break;var Gr=Hr+Yr|0;oe=14906,Ae[Gr]=255&oe,oe>>=8,Ae[Gr+1]=255&oe;var Wr=Se[kr]+2|0;Se[kr]=Wr;break e}while(0);Q(r,0|He.__str120,2)}else{do if(Kr){var Zr=r+8|0,Qr=Me[Zr>>2];if(Qr>>>0>=Me[Er+3]>>>0)break;Se[Zr>>2]=Qr+1|0,Ae[Hr+Qr|0]=46;break e}while(0);Y(r,46)}while(0);var qr=Se[pr+2];H(r,qr);break r}if(3==(0|Ir)){for(var br=(r+20|0)>>2,$r=Me[br],lr=(r+16|0)>>2,Jr=a,ra=0,aa=$r;;){var aa,ra,Jr,ea=Me[Jr+4>>2];if(0==(0|ea)){var ia=ra,va=0;gr=33;break}if(ra>>>0>3){Z(r);break r}var ta=(ra<<4)+yr|0;Se[ta>>2]=aa,Se[br]=ta,Se[((ra<<4)+4>>2)+wr]=ea,Se[((ra<<4)+8>>2)+wr]=0;var fa=Me[lr];Se[((ra<<4)+12>>2)+wr]=fa;var _a=ra+1|0,sa=0|ea,na=Me[sa>>2];if((na-25|0)>>>0>=3){gr=25;break}var Jr=ea,ra=_a,aa=ta}e:do if(25==gr){if(4==(0|na)){Se[dr]=fa,Se[lr]=mr,Se[dr+1]=ea;var oa=Se[sa>>2],la=mr}else var oa=na,la=fa;var la,oa;if(2!=(0|oa)){var ia=_a,va=sa;break}for(var ba=_a,ka=ea+8|0;;){var ka,ba,ua=Me[ka>>2];if((Se[ua>>2]-25|0)>>>0>=3){var ia=ba,va=sa;break e}if(ba>>>0>3)break;var ca=(ba<<4)+yr|0,ha=ba-1|0,da=(ha<<4)+yr|0,or=ca>>2,nr=da>>2;Se[or]=Se[nr],Se[or+1]=Se[nr+1],Se[or+2]=Se[nr+2],Se[or+3]=Se[nr+3],Se[ca>>2]=da,Se[br]=ca,Se[((ha<<4)+4>>2)+wr]=ua,Se[((ha<<4)+8>>2)+wr]=0,Se[((ha<<4)+12>>2)+wr]=la;var ba=ba+1|0,ka=ua+4|0}Z(r);break r}while(0);var va,ia,wa=Se[pr+2];if(H(r,wa),4==(0|Se[va>>2])){var pa=Se[dr];Se[lr]=pa}var Ea=0==(0|ia);e:do if(!Ea)for(var Aa=r+8|0,ga=r+12|0,ya=ia;;){var ya,ma=ya-1|0;if(0==(0|Se[((ma<<4)+8>>2)+wr])){var Sa=Me[cr],Ma=0==(0|Sa);do{if(!Ma){var Ca=Me[Aa>>2];if(Ca>>>0>=Me[ga>>2]>>>0){gr=41;break}Se[Aa>>2]=Ca+1|0,Ae[Sa+Ca|0]=32,gr=42;break}gr=41}while(0);41==gr&&Y(r,32);var Ra=Se[((ma<<4)+4>>2)+wr];$(r,Ra)}if(0==(0|ma))break e;var ya=ma}while(0);Se[br]=$r;break r}if(4==(0|Ir)){var sr=(r+20|0)>>2,Ta=Se[sr];Se[sr]=0;var Oa=Se[pr+1];H(r,Oa);var Na=Me[cr],Ia=0==(0|Na);do{if(!Ia){var _r=(r+8|0)>>2,Da=Me[_r],La=0==(0|Da);do if(!La){if(Ae[Na+(Da-1)|0]<<24>>24!=60)break;Da>>>0 >>0?(Se[_r]=Da+1|0,Ae[Na+Da|0]=32):Y(r,32)}while(0);var Fa=Me[cr];if(0==(0|Fa)){gr=54;break}var Xa=Me[_r];if(Xa>>>0>=Me[Er+3]>>>0){gr=54;break}Se[_r]=Xa+1|0,Ae[Fa+Xa|0]=60,gr=55;break}gr=54}while(0);54==gr&&Y(r,60);var ja=Se[pr+2];H(r,ja);var Ua=Me[cr],xa=0==(0|Ua);do{if(!xa){var fr=(r+8|0)>>2,za=Me[fr],Va=0==(0|za);do if(!Va){if(Ae[Ua+(za-1)|0]<<24>>24!=62)break;za>>>0 >>0?(Se[fr]=za+1|0,Ae[Ua+za|0]=32):Y(r,32)}while(0);var Ba=Me[cr];if(0==(0|Ba)){gr=64;break}var Ha=Me[fr];if(Ha>>>0>=Me[Er+3]>>>0){gr=64;break}Se[fr]=Ha+1|0,Ae[Ba+Ha|0]=62,gr=65;break}gr=64}while(0);64==gr&&Y(r,62),Se[sr]=Ta;break r}if(5==(0|Ir)){var tr=(r+16|0)>>2,Ka=Me[tr];if(0==(0|Ka)){Z(r);break r}for(var Ya=Se[pr+1],Ga=Se[Ka+4>>2];;){var Ga,Ya,Wa=Se[Ga+8>>2];if(0==(0|Wa))break;if(39!=(0|Se[Wa>>2])){Z(r);break r}if((0|Ya)<1){if(0!=(0|Ya))break;var Za=Se[Ka>>2];Se[tr]=Za;var Qa=Se[Wa+4>>2];H(r,Qa),Se[tr]=Ka;break r}var Ya=Ya-1|0,Ga=Wa}Z(r);break r}if(6==(0|Ir)){var qa=Se[pr+2];H(r,qa);break r}if(7==(0|Ir)){var $a=r+8|0,Ja=Me[$a>>2];Ja>>>0 >>0?(Se[$a>>2]=Ja+1|0,Ae[Or+Ja|0]=126):Y(r,126);var re=Se[pr+2];H(r,re);break r}if(8==(0|Ir)){var vr=(r+8|0)>>2,ae=Me[vr];if((ae+11|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str121,11);else{for(var ee=Or+ae|0,ie=0|He.__str121,ve=ee,te=ie+11;ie >2,se=Me[J];if((se+8|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str122,8);else{var ne=Or+se|0,le=0|ne;oe=542397526,Ae[le]=255&oe,oe>>=8,Ae[le+1]=255&oe,oe>>=8,Ae[le+2]=255&oe,oe>>=8,Ae[le+3]=255&oe;var be=ne+4|0;oe=544370534,Ae[be]=255&oe,oe>>=8,Ae[be+1]=255&oe,oe>>=8,Ae[be+2]=255&oe,oe>>=8,Ae[be+3]=255&oe;var ke=Se[J]+8|0;Se[J]=ke}var ue=Se[pr+1];H(r,ue);break r}if(10==(0|Ir)){var W=(r+8|0)>>2,ce=Me[W],he=r+12|0;if((ce+24|0)>>>0>Me[he>>2]>>>0)Q(r,0|He.__str123,24);else{var de=Or+ce|0;Pa(de,0|He.__str123,24,1);var we=Se[W]+24|0;Se[W]=we}var pe=Se[pr+1];H(r,pe);var Ee=Me[cr],ge=0==(0|Ee);do{if(!ge){var ye=Me[W];if((ye+4|0)>>>0>Me[he>>2]>>>0){gr=96;break}var me=Ee+ye|0;oe=762210605,Ae[me]=255&oe,oe>>=8,Ae[me+1]=255&oe,oe>>=8,Ae[me+2]=255&oe,oe>>=8,Ae[me+3]=255&oe;var Ce=Se[W]+4|0;Se[W]=Ce,gr=97;break}gr=96}while(0);96==gr&&Q(r,0|He.__str124,4);var Re=Se[pr+2];H(r,Re);break r}if(11==(0|Ir)){var G=(r+8|0)>>2,Te=Me[G];if((Te+13|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str125,13);else{for(var Ne=Or+Te|0,ie=0|He.__str125,ve=Ne,te=ie+13;ie >2,De=Me[K];if((De+18|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str126,18);else{for(var Le=Or+De|0,ie=0|He.__str126,ve=Le,te=ie+18;ie >2,je=Me[B];if((je+16|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str127,16);else{for(var Ue=Or+je|0,ie=0|He.__str127,ve=Ue,te=ie+16;ie >2,Ve=Me[V];if((Ve+21|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str128,21);else{var Be=Or+Ve|0;Pa(Be,0|He.__str128,21,1);var Ke=Se[V]+21|0;Se[V]=Ke}var Ye=Se[pr+1];H(r,Ye);break r}if(15==(0|Ir)){var z=(r+8|0)>>2,Ge=Me[z];if((Ge+17|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str129,17);else{for(var We=Or+Ge|0,ie=0|He.__str129,ve=We,te=ie+17;ie >2,qe=Me[x];if((qe+26|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str130,26);else{var $e=Or+qe|0;Pa($e,0|He.__str130,26,1);var Je=Se[x]+26|0;Se[x]=Je}var ri=Se[pr+1];H(r,ri);break r}if(17==(0|Ir)){var U=(r+8|0)>>2,ai=Me[U];if((ai+15|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str131,15);else{for(var ei=Or+ai|0,ie=0|He.__str131,ve=ei,te=ie+15;ie >2,ti=Me[j];if((ti+19|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str132,19);else{for(var fi=Or+ti|0,ie=0|He.__str132,ve=fi,te=ie+19;ie >2,ni=Me[X];if((ni+24|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str133,24);else{var oi=Or+ni|0;Pa(oi,0|He.__str133,24,1);var li=Se[X]+24|0;Se[X]=li}var bi=Se[pr+1];H(r,bi);break r}if(20==(0|Ir)){var F=(r+8|0)>>2,ki=Me[F];if((ki+17|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str134,17);else{for(var ui=Or+ki|0,ie=0|He.__str134,ve=ui,te=ie+17;ie >2,di=Me[L],wi=a+8|0,pi=Me[wi>>2];if((pi+di|0)>>>0>Me[Er+3]>>>0){var Ei=Se[pr+1];Q(r,Ei,pi);break r}var Ai=Or+di|0,gi=Se[pr+1];Pa(Ai,gi,pi,1);var yi=Se[L]+Se[wi>>2]|0;Se[L]=yi;break r}if(22==(0|Ir)||23==(0|Ir)||24==(0|Ir)){for(var mi=r+20|0;;){var mi,Si=Me[mi>>2];if(0==(0|Si))break a;if(0==(0|Se[Si+8>>2])){var Mi=Me[Se[Si+4>>2]>>2];if((Mi-22|0)>>>0>=3)break a;if((0|Mi)==(0|Ir))break}var mi=0|Si}var Ci=Se[pr+1];H(r,Ci);break r}if(25!=(0|Ir)&&26!=(0|Ir)&&27!=(0|Ir)&&28!=(0|Ir)&&29!=(0|Ir)&&30!=(0|Ir)&&31!=(0|Ir)&&32!=(0|Ir)){if(33==(0|Ir)){var D=(r+8|0)>>2,Ri=Me[D],P=(a+4|0)>>2,I=Me[P]>>2;if(0==(4&Se[Er]|0)){var Ti=Me[I+1];if((Ti+Ri|0)>>>0>Me[Er+3]>>>0){var Oi=Se[I];Q(r,Oi,Ti);break r}var Ni=Or+Ri|0,Ii=Se[I];Pa(Ni,Ii,Ti,1);var Pi=Se[D]+Se[Se[P]+4>>2]|0;Se[D]=Pi;break r}var Di=Me[I+3];if((Di+Ri|0)>>>0>Me[Er+3]>>>0){var Li=Se[I+2];Q(r,Li,Di);break r}var Fi=Or+Ri|0,Xi=Se[I+2];Pa(Fi,Xi,Di,1);var ji=Se[D]+Se[Se[P]+12>>2]|0;Se[D]=ji;break r}if(34==(0|Ir)){var Ui=Se[pr+1];H(r,Ui);break r}if(35==(0|Ir)){var N=(0|r)>>2;if(0!=(32&Se[N]|0)){var xi=Se[Er+5];rr(r,a,xi)}var zi=a+4|0,Vi=0==(0|Se[zi>>2]);e:do if(!Vi){var O=(r+20|0)>>2,Bi=Se[O],Hi=0|Mr;Se[Hi>>2]=Bi,Se[O]=Mr,Se[Mr+4>>2]=a;var Ki=Mr+8|0;Se[Ki>>2]=0;var Yi=Se[Er+4];Se[Mr+12>>2]=Yi;var Gi=Se[zi>>2];H(r,Gi);var Wi=Se[Hi>>2];if(Se[O]=Wi,0!=(0|Se[Ki>>2]))break r;if(0!=(32&Se[N]|0))break;var Zi=Me[cr],Qi=0==(0|Zi);do if(!Qi){var qi=r+8|0,$i=Me[qi>>2];if($i>>>0>=Me[Er+3]>>>0)break;Se[qi>>2]=$i+1|0,Ae[Zi+$i|0]=32;break e}while(0);Y(r,32)}while(0);if(0!=(32&Se[N]|0))break r;var Ji=Se[Er+5];rr(r,a,Ji);break r}if(36==(0|Ir)){var T=(r+20|0)>>2,rv=Me[T],av=0|Cr;Se[hr]=rv,Se[T]=av,Se[hr+1]=a;var ev=Cr+8|0;Se[ev>>2]=0;var iv=Se[Er+4];Se[hr+3]=iv;for(var vv=rv,tv=1;;){var tv,vv;if(0==(0|vv))break;if((Se[Se[vv+4>>2]>>2]-22|0)>>>0>=3)break;var fv=vv+8|0;if(0==(0|Se[fv>>2])){if(tv>>>0>3){Z(r);break r}var _v=(tv<<4)+Cr|0,R=_v>>2,C=vv>>2;Se[R]=Se[C],Se[R+1]=Se[C+1],Se[R+2]=Se[C+2],Se[R+3]=Se[C+3];var sv=Se[T];Se[_v>>2]=sv,Se[T]=_v,Se[fv>>2]=1;var nv=tv+1|0}else var nv=tv;var nv,vv=Se[vv>>2],tv=nv}var ov=Se[pr+2];if(H(r,ov),Se[T]=rv,0!=(0|Se[ev>>2]))break r;if(tv>>>0>1){for(var lv=tv;;){var lv,bv=lv-1|0,kv=Se[((bv<<4)+4>>2)+hr];if($(r,kv),bv>>>0<=1)break;var lv=bv}var uv=Se[T]}else var uv=rv;var uv;ar(r,a,uv);break r}if(37==(0|Ir)){var M=(r+20|0)>>2,cv=Se[M],hv=0|Rr;Se[hv>>2]=cv,Se[M]=Rr,Se[Rr+4>>2]=a;var dv=Rr+8|0;Se[dv>>2]=0;var wv=Se[Er+4];Se[Rr+12>>2]=wv;var pv=a+4|0,Ev=Se[pr+2];H(r,Ev);var Av=0==(0|Se[dv>>2]);e:do if(Av){var gv=Me[cr],yv=0==(0|gv);do{if(!yv){var mv=r+8|0,Sv=Me[mv>>2];if(Sv>>>0>=Me[Er+3]>>>0){gr=187;break}Se[mv>>2]=Sv+1|0,Ae[gv+Sv|0]=32,gr=188;break}gr=187}while(0);187==gr&&Y(r,32);var Mv=Se[pv>>2];H(r,Mv);var Cv=Me[cr],Rv=0==(0|Cv);do if(!Rv){var S=(r+8|0)>>2,Tv=Me[S];if((Tv+3|0)>>>0>Me[Er+3]>>>0)break;var Ov=Cv+Tv|0;Ae[Ov]=Ae[0|He.__str135],Ae[Ov+1]=Ae[(0|He.__str135)+1],Ae[Ov+2]=Ae[(0|He.__str135)+2];var Nv=Se[S]+3|0;Se[S]=Nv;break e}while(0);Q(r,0|He.__str135,3)}while(0);var Iv=Se[hv>>2];Se[M]=Iv;break r}if(38==(0|Ir)||39==(0|Ir)){var Pv=Se[pr+1];H(r,Pv);var Dv=a+8|0;if(0==(0|Se[Dv>>2]))break r;var Lv=Me[cr],Fv=0==(0|Lv);do{if(!Fv){var m=(r+8|0)>>2,Xv=Me[m];if((Xv+2|0)>>>0>Me[Er+3]>>>0){gr=197;break}var jv=Lv+Xv|0;oe=8236,Ae[jv]=255&oe,oe>>=8,Ae[jv+1]=255&oe;var Uv=Se[m]+2|0;Se[m]=Uv,gr=198;break}gr=197}while(0);197==gr&&Q(r,0|He.__str136,2);var xv=Se[Dv>>2];H(r,xv);break r}if(40==(0|Ir)){var y=(r+8|0)>>2,zv=Me[y],g=(r+12|0)>>2;if((zv+8|0)>>>0>Me[g]>>>0)Q(r,0|He.__str137,8);else{var Vv=Or+zv|0,le=0|Vv;oe=1919250543,Ae[le]=255&oe,oe>>=8,Ae[le+1]=255&oe,oe>>=8,Ae[le+2]=255&oe,oe>>=8,Ae[le+3]=255&oe;var be=Vv+4|0;oe=1919906913,Ae[be]=255&oe,oe>>=8,Ae[be+1]=255&oe,oe>>=8,Ae[be+2]=255&oe,oe>>=8,Ae[be+3]=255&oe;var Bv=Se[y]+8|0;Se[y]=Bv}var A=(a+4|0)>>2,Hv=(Ae[Se[Se[A]+4>>2]]-97&255&255)<26;e:do if(Hv){var Kv=Me[cr],Yv=0==(0|Kv);do if(!Yv){var Gv=Me[y];if(Gv>>>0>=Me[g]>>>0)break;Se[y]=Gv+1|0,Ae[Kv+Gv|0]=32;break e}while(0);Y(r,32)}while(0);var Wv=Me[cr],Zv=0==(0|Wv);do{if(!Zv){var Qv=Me[y],qv=Me[A],$v=Me[qv+8>>2];if(($v+Qv|0)>>>0>Me[g]>>>0){var Jv=qv,rt=$v;break}var at=Wv+Qv|0,et=Se[qv+4>>2];Pa(at,et,$v,1);var it=Se[y]+Se[Se[A]+8>>2]|0;Se[y]=it;break r}var vt=Me[A],Jv=vt,rt=Se[vt+8>>2]}while(0);var rt,Jv,tt=Se[Jv+4>>2];Q(r,tt,rt);break r}if(41==(0|Ir)){var E=(r+8|0)>>2,ft=Me[E];if((ft+9|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str10180,9);else{for(var _t=Or+ft|0,ie=0|He.__str10180,ve=_t,te=ie+9;ie >2,ot=Me[p];if((ot+9|0)>>>0>Me[Er+3]>>>0)Q(r,0|He.__str10180,9);else{for(var lt=Or+ot|0,ie=0|He.__str10180,ve=lt,te=ie+9;ie >2],ct=42==(0|Se[ut>>2]);e:do if(ct){var w=(r+8|0)>>2,ht=Me[w],dt=r+12|0;ht>>>0 >2]>>>0?(Se[w]=ht+1|0,Ae[Or+ht|0]=40):Y(r,40);var wt=Se[kt>>2];er(r,wt);var pt=Me[cr],Et=0==(0|pt);do if(!Et){var At=Me[w];if(At>>>0>=Me[dt>>2]>>>0)break;Se[w]=At+1|0,Ae[pt+At|0]=41;break e}while(0);Y(r,41)}else ir(r,ut);while(0);var gt=Me[cr],yt=0==(0|gt);do{if(!yt){var mt=r+8|0,St=Me[mt>>2];if(St>>>0>=Me[Er+3]>>>0){gr=232;break}Se[mt>>2]=St+1|0,Ae[gt+St|0]=40,gr=233;break}gr=232}while(0);232==gr&&Y(r,40);var Mt=Se[pr+2];H(r,Mt);var Ct=Me[cr],Rt=0==(0|Ct);do if(!Rt){var Tt=r+8|0,Ot=Me[Tt>>2];if(Ot>>>0>=Me[Er+3]>>>0)break;Se[Tt>>2]=Ot+1|0,Ae[Ct+Ot|0]=41;break r}while(0);Y(r,41);break r}if(44==(0|Ir)){var d=(a+8|0)>>2;if(45==(0|Se[Se[d]>>2])){var h=(a+4|0)>>2,Nt=Se[h],It=40==(0|Se[Nt>>2]);do if(It){var Pt=Se[Nt+4>>2];if(1!=(0|Se[Pt+8>>2]))break;if(Ae[Se[Pt+4>>2]]<<24>>24!=62)break;var Dt=r+8|0,Lt=Me[Dt>>2];Lt>>>0 >>0?(Se[Dt>>2]=Lt+1|0,Ae[Or+Lt|0]=40):Y(r,40)}while(0);var Ft=Me[cr],Xt=0==(0|Ft);do{if(!Xt){var jt=r+8|0,Ut=Me[jt>>2];if(Ut>>>0>=Me[Er+3]>>>0){gr=248;break}Se[jt>>2]=Ut+1|0,Ae[Ft+Ut|0]=40,gr=249;break}gr=248}while(0);248==gr&&Y(r,40);var xt=Se[Se[d]+4>>2];H(r,xt);var zt=Me[cr],Vt=0==(0|zt);do{if(!Vt){var c=(r+8|0)>>2,Bt=Me[c];if((Bt+2|0)>>>0>Me[Er+3]>>>0){gr=252;break}var Ht=zt+Bt|0;oe=8233,Ae[Ht]=255&oe,oe>>=8,Ae[Ht+1]=255&oe;var Kt=Se[c]+2|0;Se[c]=Kt,gr=253;break}gr=252}while(0);252==gr&&Q(r,0|He.__str139,2);var Yt=Se[h];ir(r,Yt);var Gt=Me[cr],Wt=0==(0|Gt);do{if(!Wt){var u=(r+8|0)>>2,Zt=Me[u];if((Zt+2|0)>>>0>Me[Er+3]>>>0){gr=256;break}var Qt=Gt+Zt|0;oe=10272,Ae[Qt]=255&oe,oe>>=8,Ae[Qt+1]=255&oe;var qt=Se[u]+2|0;Se[u]=qt,gr=257;break}gr=256}while(0);256==gr&&Q(r,0|He.__str140,2);var $t=Se[Se[d]+8>>2];H(r,$t);var Jt=Me[cr],rf=0==(0|Jt);do{if(!rf){var af=r+8|0,ef=Me[af>>2];if(ef>>>0>=Me[Er+3]>>>0){gr=260;break}Se[af>>2]=ef+1|0,Ae[Jt+ef|0]=41,gr=261;break}gr=260}while(0);260==gr&&Y(r,41);var vf=Se[h];if(40!=(0|Se[vf>>2]))break r;var tf=Se[vf+4>>2];if(1!=(0|Se[tf+8>>2]))break r;if(Ae[Se[tf+4>>2]]<<24>>24!=62)break r;var ff=Me[cr],_f=0==(0|ff);do if(!_f){var sf=r+8|0,nf=Me[sf>>2];if(nf>>>0>=Me[Er+3]>>>0)break;Se[sf>>2]=nf+1|0,Ae[ff+nf|0]=41;break r}while(0);Y(r,41);break r}Z(r);break r}if(45==(0|Ir)){Z(r);break r}if(46==(0|Ir)){var of=a+4|0,k=(a+8|0)>>2,lf=Se[k],bf=47==(0|Se[lf>>2]);do if(bf){if(48!=(0|Se[Se[lf+8>>2]>>2]))break;var b=(r+8|0)>>2,kf=Me[b],l=(r+12|0)>>2;kf>>>0 >>0?(Se[b]=kf+1|0,Ae[Or+kf|0]=40):Y(r,40);var uf=Se[Se[k]+4>>2];H(r,uf);var cf=Me[cr],hf=0==(0|cf);do{if(!hf){var df=Me[b];if((df+2|0)>>>0>Me[l]>>>0){gr=278;break}var wf=cf+df|0;oe=8233,Ae[wf]=255&oe,oe>>=8,Ae[wf+1]=255&oe;var pf=Se[b]+2|0;Se[b]=pf,gr=279;break}gr=278}while(0);278==gr&&Q(r,0|He.__str139,2);var Ef=Se[of>>2];ir(r,Ef);var Af=Me[cr],gf=0==(0|Af);do{if(!gf){var yf=Me[b];if((yf+2|0)>>>0>Me[l]>>>0){gr=282;break}var mf=Af+yf|0;oe=10272,Ae[mf]=255&oe,oe>>=8,Ae[mf+1]=255&oe;var Sf=Se[b]+2|0;Se[b]=Sf,gr=283;break}gr=282}while(0);282==gr&&Q(r,0|He.__str140,2);var Mf=Se[Se[Se[k]+8>>2]+4>>2];H(r,Mf);var Cf=Me[cr],Rf=0==(0|Cf);do{if(!Rf){var Tf=Me[b];if((Tf+5|0)>>>0>Me[l]>>>0){gr=286;break}var Of=Cf+Tf|0;Ae[Of]=Ae[0|He.__str141],Ae[Of+1]=Ae[(0|He.__str141)+1],Ae[Of+2]=Ae[(0|He.__str141)+2],Ae[Of+3]=Ae[(0|He.__str141)+3],Ae[Of+4]=Ae[(0|He.__str141)+4];var Nf=Se[b]+5|0;Se[b]=Nf,gr=287;break}gr=286}while(0);286==gr&&Q(r,0|He.__str141,5);var If=Se[Se[Se[k]+8>>2]+8>>2];H(r,If);var Pf=Me[cr],Df=0==(0|Pf);do if(!Df){var Lf=Me[b];if(Lf>>>0>=Me[l]>>>0)break;Se[b]=Lf+1|0,Ae[Pf+Lf|0]=41;break r}while(0);Y(r,41);break r}while(0);Z(r);break r}if(47==(0|Ir)||48==(0|Ir)){Z(r);break r}if(49==(0|Ir)||50==(0|Ir)){var Ff=a+4|0,Xf=Se[Ff>>2],jf=33==(0|Se[Xf>>2]);do{if(jf){var Uf=Me[Se[Xf+4>>2]+16>>2];if(1==(0|Uf)||2==(0|Uf)||3==(0|Uf)||4==(0|Uf)||5==(0|Uf)||6==(0|Uf)){var xf=a+8|0;if(0!=(0|Se[Se[xf>>2]>>2])){var zf=Uf;break}if(50==(0|Ir)){var Vf=r+8|0,Bf=Me[Vf>>2];Bf>>>0 >>0?(Se[Vf>>2]=Bf+1|0,Ae[Or+Bf|0]=45):Y(r,45)}var Hf=Se[xf>>2];if(H(r,Hf),2==(0|Uf)){var Kf=Me[cr],Yf=0==(0|Kf);do if(!Yf){var Gf=r+8|0,Wf=Me[Gf>>2];if(Wf>>>0>=Me[Er+3]>>>0)break;Se[Gf>>2]=Wf+1|0,Ae[Kf+Wf|0]=117;break r}while(0);Y(r,117);break r}if(3==(0|Uf)){var Zf=Me[cr],Qf=0==(0|Zf);do if(!Qf){var qf=r+8|0,$f=Me[qf>>2];if($f>>>0>=Me[Er+3]>>>0)break;Se[qf>>2]=$f+1|0,Ae[Zf+$f|0]=108;break r}while(0);Y(r,108);break r}if(4==(0|Uf)){var Jf=Me[cr],r_=0==(0|Jf);do if(!r_){var o=(r+8|0)>>2,a_=Me[o];if((a_+2|0)>>>0>Me[Er+3]>>>0)break;var e_=Jf+a_|0;oe=27765,Ae[e_]=255&oe,oe>>=8,Ae[e_+1]=255&oe;var i_=Se[o]+2|0;Se[o]=i_;break r}while(0);Q(r,0|He.__str142,2);break r}if(5==(0|Uf)){var v_=Me[cr],t_=0==(0|v_);do if(!t_){var n=(r+8|0)>>2,f_=Me[n];if((f_+2|0)>>>0>Me[Er+3]>>>0)break;var __=v_+f_|0;oe=27756,Ae[__]=255&oe,oe>>=8,Ae[__+1]=255&oe;var s_=Se[n]+2|0;Se[n]=s_;break r}while(0);Q(r,0|He.__str143,2);break r}if(6==(0|Uf)){var n_=Me[cr],o_=0==(0|n_);do if(!o_){var s=(r+8|0)>>2,l_=Me[s];if((l_+3|0)>>>0>Me[Er+3]>>>0)break;var b_=n_+l_|0;Ae[b_]=Ae[0|He.__str144],Ae[b_+1]=Ae[(0|He.__str144)+1],Ae[b_+2]=Ae[(0|He.__str144)+2];var k_=Se[s]+3|0;Se[s]=k_;break r}while(0);Q(r,0|He.__str144,3);break r}break r}if(7==(0|Uf)){var _=Se[pr+2]>>2;if(0!=(0|Se[_])){var zf=7;break}if(!(1==(0|Se[_+2])&49==(0|Ir))){var zf=Uf;break}var u_=Ae[Se[_+1]]<<24>>24;if(48==(0|u_)){var f=(r+8|0)>>2,c_=Me[f];if((c_+5|0)>>>0>Me[Er+3]>>>0){Q(r,0|He.__str145,5);break r}var h_=Or+c_|0;Ae[h_]=Ae[0|He.__str145],Ae[h_+1]=Ae[(0|He.__str145)+1],Ae[h_+2]=Ae[(0|He.__str145)+2],Ae[h_+3]=Ae[(0|He.__str145)+3],Ae[h_+4]=Ae[(0|He.__str145)+4];var d_=Se[f]+5|0;Se[f]=d_;break r}if(49==(0|u_)){var t=(r+8|0)>>2,w_=Me[t];if((w_+4|0)>>>0>Me[Er+3]>>>0){Q(r,0|He.__str146,4);break r}var p_=Or+w_|0;oe=1702195828,Ae[p_]=255&oe,oe>>=8,Ae[p_+1]=255&oe,oe>>=8,Ae[p_+2]=255&oe,oe>>=8,Ae[p_+3]=255&oe;var E_=Se[t]+4|0;Se[t]=E_;break r}var zf=Uf;break}var zf=Uf;break}var zf=0}while(0);var zf,v=(r+8|0)>>2,A_=Me[v],i=(r+12|0)>>2;A_>>>0 >>0?(Se[v]=A_+1|0,Ae[Or+A_|0]=40):Y(r,40);var g_=Se[Ff>>2];H(r,g_);var y_=Me[cr],m_=0==(0|y_);do{if(!m_){var S_=Me[v];if(S_>>>0>=Me[i]>>>0){gr=335;break}Se[v]=S_+1|0,Ae[y_+S_|0]=41,gr=336;break}gr=335}while(0);335==gr&&Y(r,41);var M_=50==(0|Se[Nr>>2]);e:do if(M_){var C_=Me[cr],R_=0==(0|C_);do if(!R_){var T_=Me[v];if(T_>>>0>=Me[i]>>>0)break;Se[v]=T_+1|0,Ae[C_+T_|0]=45;break e}while(0);Y(r,45)}while(0);if(8==(0|zf)){var O_=Me[cr],N_=0==(0|O_);do{if(!N_){var I_=Me[v];if(I_>>>0>=Me[i]>>>0){gr=345;break}Se[v]=I_+1|0,Ae[O_+I_|0]=91,gr=346;break}gr=345}while(0);345==gr&&Y(r,91);var P_=Se[pr+2];H(r,P_);var D_=Me[cr],L_=0==(0|D_);do if(!L_){var F_=Me[v];if(F_>>>0>=Me[i]>>>0)break;Se[v]=F_+1|0,Ae[D_+F_|0]=93;break r}while(0);Y(r,93);break r}var X_=Se[pr+2];H(r,X_);break r}Z(r);break r}}while(0);var e=(r+20|0)>>2,j_=Se[e],U_=0|Sr;Se[U_>>2]=j_,Se[e]=Sr,Se[Sr+4>>2]=a;var x_=Sr+8|0;Se[x_>>2]=0;var z_=Se[Er+4];Se[Sr+12>>2]=z_;var V_=Se[pr+1];H(r,V_),0==(0|Se[x_>>2])&&$(r,a);var B_=Se[U_>>2];Se[e]=B_}while(0);Oe=Ar}function K(r,a,e,i){var v=i>>2;Se[v]=r,Se[v+1]=r+e|0,Se[v+2]=a,Se[v+3]=r,Se[v+6]=e<<1,Se[v+5]=0,Se[v+9]=e,Se[v+8]=0,Se[v+10]=0,Se[v+11]=0,Se[v+12]=0}function Y(r,a){var e,i=r+4|0,v=Me[i>>2],t=0==(0|v);do if(!t){var e=(r+8|0)>>2,f=Me[e];if(f>>>0 >2]>>>0)var _=v,s=f;else{tr(r,1);var n=Me[i>>2];if(0==(0|n))break;var _=n,s=Se[e]}var s,_;Ae[_+s|0]=255&a;var o=Se[e]+1|0;Se[e]=o}while(0)}function G(r,a,e,i){var v,t=i>>2,f=Oe;Oe+=4;var _=f,v=_>>2,s=0==(0|r);do if(s){if(0==(0|i)){var n=0;break}Se[t]=-3;var n=0}else{var o=0==(0|e);if(0!=(0|a)&o){if(0==(0|i)){var n=0;break}Se[t]=-3;var n=0}else{var l=W(r,_);if(0==(0|l)){if(0==(0|i)){var n=0;break}if(1==(0|Se[v])){Se[t]=-1;var n=0}else{Se[t]=-2;var n=0}}else{var b=0==(0|a);do if(b){if(o){var k=l;break}var u=Se[v];Se[e>>2]=u;var k=l}else{var c=Ca(l);if(c>>>0 >2]>>>0){Ra(a,l);va(l);var k=a}else{va(a);var h=Se[v];Se[e>>2]=h;var k=l}}while(0);var k;if(0==(0|i)){var n=k;break}Se[t]=0;var n=k}}}while(0);var n;return Oe=f,n}function W(r,a){var e,i=Oe;Oe+=52;var v,t=i,e=t>>2;Se[a>>2]=0;var f=Ca(r),_=Ae[r]<<24>>24==95;do{if(_){if(Ae[r+1|0]<<24>>24==90){var s=0;v=13;break}v=3;break}v=3}while(0);do if(3==v){var n=Na(r,0|He.__str117,8);if(0!=(0|n)){var s=1;v=13;break}var o=Ae[r+8|0];if(o<<24>>24!=46&&o<<24>>24!=95&&o<<24>>24!=36){var s=1;v=13;break}var l=r+9|0,b=Ae[l];if(b<<24>>24!=68&&b<<24>>24!=73){ -var s=1;v=13;break}if(Ae[r+10|0]<<24>>24!=95){var s=1;v=13;break}var k=f+29|0,u=Jr(k);if(0==(0|u)){Se[a>>2]=1;var c=0;v=19;break}Ae[l]<<24>>24==73?Pa(u,0|He.__str118,30,1):Pa(u,0|He.__str119,29,1);var h=r+11|0,c=(Ia(u,h),u);v=19;break}while(0);if(13==v){var s;K(r,17,f,t);var d=Se[e+6],w=Ta(),p=Oe;Oe+=12*d,Oe=Oe+3>>2<<2;var E=Oe;if(Oe+=4*Se[e+9],Oe=Oe+3>>2<<2,Se[e+4]=p,Se[e+7]=E,s)var A=N(t),g=A;else var y=T(t,1),g=y;var g,m=Ae[Se[e+3]]<<24>>24==0?g:0,S=Se[e+12]+f+10*Se[e+10]|0;if(0==(0|m))var M=0;else var C=S/8+S|0,R=B(17,m,C,a),M=R;var M;Oa(w);var c=M}var c;return Oe=i,c}function Z(r){var a=r+4|0,e=Se[a>>2];va(e),Se[a>>2]=0}function Q(r,a,e){var i,v=r+4|0,t=Me[v>>2],f=0==(0|t);do if(!f){var i=(r+8|0)>>2,_=Me[i];if((_+e|0)>>>0>Me[r+12>>2]>>>0){tr(r,e);var s=Me[v>>2];if(0==(0|s))break;var n=s,o=Se[i]}else var n=t,o=_;var o,n;Pa(n+o|0,a,e,1);var l=Se[i]+e|0;Se[i]=l}while(0)}function q(r,a,e){var i,v,t=a+e|0,f=(0|e)>0;r:do if(f)for(var _=t,s=r+4|0,i=(r+8|0)>>2,n=r+12|0,o=a;;){var o,l=(_-o|0)>3;a:do{if(l){if(Ae[o]<<24>>24!=95){v=21;break}if(Ae[o+1|0]<<24>>24!=95){v=21;break}if(Ae[o+2|0]<<24>>24!=85){v=21;break}for(var b=o+3|0,k=0;;){var k,b;if(b>>>0>=t>>>0){v=21;break a}var u=ge[b],c=u<<24>>24;if((u-48&255&255)<10)var h=c-48|0;else if((u-65&255&255)<6)var h=c-55|0;else{if((u-97&255&255)>=6)break;var h=c-87|0}var h,b=b+1|0,k=(k<<4)+h|0}if(!(u<<24>>24==95&k>>>0<256)){v=21;break}var d=Me[s>>2],w=0==(0|d);do if(!w){var p=Me[i];if(p>>>0>=Me[n>>2]>>>0)break;Se[i]=p+1|0,Ae[d+p|0]=255&k;var E=b;v=25;break a}while(0);Y(r,k);var E=b;v=25;break}v=21}while(0);a:do if(21==v){var A=Me[s>>2],g=0==(0|A);do if(!g){var y=Me[i];if(y>>>0>=Me[n>>2]>>>0)break;var m=Ae[o];Se[i]=y+1|0,Ae[A+y|0]=m;var E=o;break a}while(0);var S=Ae[o]<<24>>24;Y(r,S);var E=o}while(0);var E,M=E+1|0;if(M>>>0>=t>>>0)break r;var o=M}while(0)}function $(r,a){var e,i,v,t,f,_,s,n=r>>2,o=Se[a>>2];r:do if(22==(0|o)||25==(0|o)){var l=Me[n+1],b=0==(0|l);do if(!b){var _=(r+8|0)>>2,k=Me[_];if((k+9|0)>>>0>Me[n+3]>>>0)break;for(var u=l+k|0,c=0|He.__str147,h=u,d=c+9;c >2,A=Me[f];if((A+9|0)>>>0>Me[n+3]>>>0)break;for(var g=p+A|0,c=0|He.__str148,h=g,d=c+9;c >2,M=Me[t];if((M+6|0)>>>0>Me[n+3]>>>0)break;var C=m+M|0;Ae[C]=Ae[0|He.__str149],Ae[C+1]=Ae[(0|He.__str149)+1],Ae[C+2]=Ae[(0|He.__str149)+2],Ae[C+3]=Ae[(0|He.__str149)+3],Ae[C+4]=Ae[(0|He.__str149)+4],Ae[C+5]=Ae[(0|He.__str149)+5];var R=Se[t]+6|0;Se[t]=R;break r}while(0);Q(r,0|He.__str149,6)}else if(28==(0|o)){var T=Me[n+1],O=0==(0|T);do{if(!O){var N=r+8|0,I=Me[N>>2];if(I>>>0>=Me[n+3]>>>0){s=17;break}Se[N>>2]=I+1|0,Ae[T+I|0]=32,s=18;break}s=17}while(0);17==s&&Y(r,32);var P=Se[a+8>>2];H(r,P)}else if(29==(0|o)){if(0!=(4&Se[n]|0))break;var D=Me[n+1],L=0==(0|D);do if(!L){var F=r+8|0,X=Me[F>>2];if(X>>>0>=Me[n+3]>>>0)break;Se[F>>2]=X+1|0,Ae[D+X|0]=42;break r}while(0);Y(r,42)}else if(30==(0|o)){var j=Me[n+1],U=0==(0|j);do if(!U){var x=r+8|0,z=Me[x>>2];if(z>>>0>=Me[n+3]>>>0)break;Se[x>>2]=z+1|0,Ae[j+z|0]=38;break r}while(0);Y(r,38)}else if(31==(0|o)){var V=Me[n+1],B=0==(0|V);do if(!B){var v=(r+8|0)>>2,K=Me[v];if((K+8|0)>>>0>Me[n+3]>>>0)break;var G=V+K|0,W=0|G;oe=1886220131,Ae[W]=255&oe,oe>>=8,Ae[W+1]=255&oe,oe>>=8,Ae[W+2]=255&oe,oe>>=8,Ae[W+3]=255&oe;var Z=G+4|0;oe=544761196,Ae[Z]=255&oe,oe>>=8,Ae[Z+1]=255&oe,oe>>=8,Ae[Z+2]=255&oe,oe>>=8,Ae[Z+3]=255&oe;var q=Se[v]+8|0;Se[v]=q;break r}while(0);Q(r,0|He.__str150,8)}else if(32==(0|o)){var $=Me[n+1],J=0==(0|$);do if(!J){var i=(r+8|0)>>2,rr=Me[i];if((rr+10|0)>>>0>Me[n+3]>>>0)break;for(var ar=$+rr|0,c=0|He.__str151,h=ar,d=c+10;c >2],tr=0==(0|vr);do{if(!tr){var fr=r+8|0,_r=Me[fr>>2];if(0!=(0|_r)&&Ae[vr+(_r-1)|0]<<24>>24==40){s=42;break}if(_r>>>0>=Me[n+3]>>>0){s=41;break}Se[fr>>2]=_r+1|0,Ae[vr+_r|0]=32,s=42;break}s=41}while(0);41==s&&Y(r,32);var sr=Se[a+4>>2];H(r,sr);var nr=Me[ir>>2],or=0==(0|nr);do if(!or){var e=(r+8|0)>>2,lr=Me[e];if((lr+3|0)>>>0>Me[n+3]>>>0)break;var br=nr+lr|0;Ae[br]=Ae[0|He.__str135],Ae[br+1]=Ae[(0|He.__str135)+1],Ae[br+2]=Ae[(0|He.__str135)+2];var kr=Se[e]+3|0;Se[e]=kr;break r}while(0);Q(r,0|He.__str135,3)}else if(3==(0|o)){var ur=Se[a+4>>2];H(r,ur)}else H(r,a);while(0)}function J(r){var a=r+20|0,e=Se[a>>2];if((0|e)<(0|Se[r+24>>2])){var i=Se[r+16>>2]+12*e|0,v=e+1|0;Se[a>>2]=v;var t=i}else var t=0;var t;return t}function rr(r,a,e){var i,v,t,f,_=r>>2,s=e,t=s>>2,n=0;r:for(;;){var n,s,o=0==(0|s);do if(!o){if(0!=(0|Se[t+2]))break;var l=Se[Se[t+1]>>2];if(29==(0|l)||30==(0|l)){f=9;break r}if(22==(0|l)||23==(0|l)||24==(0|l)||28==(0|l)||31==(0|l)||32==(0|l)||37==(0|l)){var b=Se[_+1];f=12;break r}var s=Se[t],t=s>>2,n=1;continue r}while(0);if(0!=(0|Se[a+4>>2])&0==(0|n)){f=9;break}var k=0,u=r+4|0,v=u>>2;f=22;break}do if(9==f){var c=Se[_+1];if(0==(0|c)){f=17;break}var h=Se[_+2];if(0==(0|h)){var d=c;f=13;break}var w=Ae[c+(h-1)|0];if(w<<24>>24==40||w<<24>>24==42){f=18;break}var b=c;f=12;break}while(0);do if(12==f){var b;if(0==(0|b)){f=17;break}var d=b;f=13;break}while(0);do if(13==f){var d,p=r+8|0,E=Me[p>>2];if(0!=(0|E)&&Ae[d+(E-1)|0]<<24>>24==32){f=18;break}if(E>>>0>=Me[_+3]>>>0){f=17;break}Se[p>>2]=E+1|0,Ae[d+E|0]=32,f=18;break}while(0);do if(17==f){Y(r,32),f=18;break}while(0);r:do if(18==f){var A=r+4|0,g=Me[A>>2],y=0==(0|g);do if(!y){var m=r+8|0,S=Me[m>>2];if(S>>>0>=Me[_+3]>>>0)break;Se[m>>2]=S+1|0,Ae[g+S|0]=40;var k=1,u=A,v=u>>2;break r}while(0);Y(r,40);var k=1,u=A,v=u>>2}while(0);var u,k,i=(r+20|0)>>2,M=Se[i];Se[i]=0,vr(r,e,0);r:do if(k){var C=Me[v],R=0==(0|C);do if(!R){var T=r+8|0,O=Me[T>>2];if(O>>>0>=Me[_+3]>>>0)break;Se[T>>2]=O+1|0,Ae[C+O|0]=41;break r}while(0);Y(r,41)}while(0);var N=Me[v],I=0==(0|N);do{if(!I){var P=r+8|0,D=Me[P>>2];if(D>>>0>=Me[_+3]>>>0){f=30;break}Se[P>>2]=D+1|0,Ae[N+D|0]=40,f=31;break}f=30}while(0);30==f&&Y(r,40);var L=Se[a+8>>2];0!=(0|L)&&H(r,L);var F=Me[v],X=0==(0|F);do{if(!X){var j=r+8|0,U=Me[j>>2];if(U>>>0>=Me[_+3]>>>0){f=36;break}Se[j>>2]=U+1|0,Ae[F+U|0]=41,f=37;break}f=36}while(0);36==f&&Y(r,41),vr(r,e,1),Se[i]=M}function ar(r,a,e){var i,v,t,f=r>>2,_=0==(0|e);do{if(!_){var s=e,v=s>>2;r:for(;;){var s;if(0==(0|s)){var n=1;t=14;break}if(0==(0|Se[v+2])){var o=36==(0|Se[Se[v+1]>>2]),l=1&o^1;if(o){var n=l;t=14;break}var b=r+4|0,k=Me[b>>2],u=0==(0|k);do{if(!u){var i=(r+8|0)>>2,c=Me[i];if((c+2|0)>>>0>Me[f+3]>>>0){t=9;break}var h=k+c|0;oe=10272,Ae[h]=255&oe,oe>>=8,Ae[h+1]=255&oe;var d=Se[i]+2|0;Se[i]=d,vr(r,e,0),t=10;break}t=9}while(0);9==t&&(Q(r,0|He.__str140,2),vr(r,e,0));var w=Me[b>>2],p=0==(0|w);do if(!p){var E=r+8|0,A=Me[E>>2];if(A>>>0>=Me[f+3]>>>0)break;Se[E>>2]=A+1|0,Ae[w+A|0]=41;var g=l;t=15;break r}while(0);Y(r,41);var g=l;t=15;break}var s=Se[v],v=s>>2}if(14==t){var n;vr(r,e,0);var g=n}var g;if(0!=(0|g)){t=17;break}var y=r+4|0;t=21;break}t=17}while(0);r:do if(17==t){var m=r+4|0,S=Me[m>>2],M=0==(0|S);do if(!M){var C=r+8|0,R=Me[C>>2];if(R>>>0>=Me[f+3]>>>0)break;Se[C>>2]=R+1|0,Ae[S+R|0]=32;var y=m;break r}while(0);Y(r,32);var y=m}while(0);var y,T=Me[y>>2],O=0==(0|T);do{if(!O){var N=r+8|0,I=Me[N>>2];if(I>>>0>=Me[f+3]>>>0){t=24;break}Se[N>>2]=I+1|0,Ae[T+I|0]=91,t=25;break}t=24}while(0);24==t&&Y(r,91);var P=Se[a+4>>2];0!=(0|P)&&H(r,P);var D=Me[y>>2],L=0==(0|D);do{if(!L){var F=r+8|0,X=Me[F>>2];if(X>>>0>=Me[f+3]>>>0){t=30;break}Se[F>>2]=X+1|0,Ae[D+X|0]=93,t=31;break}t=30}while(0);30==t&&Y(r,93)}function er(r,a){var e,i,v,t,f,_,s=Oe;Oe+=8;var n,o=s,_=(a+4|0)>>2,l=Se[_];if(4==(0|Se[l>>2])){var f=(r+20|0)>>2,b=Se[f];Se[f]=0;var t=(r+16|0)>>2,k=Se[t],u=0|o;Se[u>>2]=k,Se[t]=o;var c=Se[_];Se[o+4>>2]=c;var h=Se[c+4>>2];H(r,h);var d=Se[u>>2];Se[t]=d;var v=(r+4|0)>>2,w=Me[v],p=0==(0|w);do{if(!p){var i=(r+8|0)>>2,E=Me[i],A=0==(0|E);do if(!A){if(Ae[w+(E-1)|0]<<24>>24!=60)break;E>>>0 >2]>>>0?(Se[i]=E+1|0,Ae[w+E|0]=32):Y(r,32)}while(0);var g=Me[v];if(0==(0|g)){n=12;break}var y=Me[i];if(y>>>0>=Me[r+12>>2]>>>0){n=12;break}Se[i]=y+1|0,Ae[g+y|0]=60,n=13;break}n=12}while(0);12==n&&Y(r,60);var m=Se[Se[_]+8>>2];H(r,m);var S=Me[v],M=0==(0|S);do{if(!M){var e=(r+8|0)>>2,C=Me[e],R=0==(0|C);do if(!R){if(Ae[S+(C-1)|0]<<24>>24!=62)break;C>>>0 >2]>>>0?(Se[e]=C+1|0,Ae[S+C|0]=32):Y(r,32)}while(0);var T=Me[v];if(0==(0|T)){n=22;break}var O=Me[e];if(O>>>0>=Me[r+12>>2]>>>0){n=22;break}Se[e]=O+1|0,Ae[T+O|0]=62,n=23;break}n=22}while(0);22==n&&Y(r,62),Se[f]=b}else H(r,l);Oe=s}function ir(r,a){var e,i=40==(0|Se[a>>2]);r:do if(i){var v=Me[r+4>>2],t=0==(0|v);do{if(!t){var e=(r+8|0)>>2,f=Me[e],_=a+4|0,s=Me[_>>2],n=Me[s+8>>2];if((n+f|0)>>>0>Me[r+12>>2]>>>0){var o=s,l=n;break}var b=v+f|0,k=Se[s+4>>2];Pa(b,k,n,1);var u=Se[e]+Se[Se[_>>2]+8>>2]|0;Se[e]=u;break r}var c=Me[a+4>>2],o=c,l=Se[c+8>>2]}while(0);var l,o,h=Se[o+4>>2];Q(r,h,l)}else H(r,a);while(0)}function vr(r,a,e){var i,v,t,f,_,f=(r+4|0)>>2,s=0==(0|e),t=(r+16|0)>>2;r:do if(s)for(var n=a;;){var n;if(0==(0|n)){_=29;break r}if(0==(0|Se[f])){_=29;break r}var o=n+8|0,l=0==(0|Se[o>>2]);do if(l){var b=n+4|0;if((Se[Se[b>>2]>>2]-25|0)>>>0<3)break;Se[o>>2]=1;var k=Me[t],u=Se[n+12>>2];Se[t]=u;var c=Me[b>>2],h=Se[c>>2];if(35==(0|h)){var d=n,w=k,p=c;_=14;break r}if(36==(0|h)){var E=n,A=k,g=c;_=15;break r}if(2==(0|h)){var y=k,m=b;_=16;break r}$(r,c),Se[t]=k}while(0);var n=Se[n>>2]}else for(var S=a;;){var S;if(0==(0|S)){_=29;break r}if(0==(0|Se[f])){_=29;break r}var M=S+8|0;if(0==(0|Se[M>>2])){Se[M>>2]=1;var C=Me[t],R=Se[S+12>>2];Se[t]=R;var T=S+4|0,O=Me[T>>2],N=Se[O>>2];if(35==(0|N)){var d=S,w=C,p=O;_=14;break r}if(36==(0|N)){var E=S,A=C,g=O;_=15;break r}if(2==(0|N)){var y=C,m=T;_=16;break r}$(r,O),Se[t]=C}var S=Se[S>>2]}while(0);if(14==_){var p,w,d,I=Se[d>>2];rr(r,p,I),Se[t]=w}else if(15==_){var g,A,E,P=Se[E>>2];ar(r,g,P),Se[t]=A}else if(16==_){var m,y,v=(r+20|0)>>2,D=Se[v];Se[v]=0;var L=Se[Se[m>>2]+4>>2];H(r,L),Se[v]=D;var F=0==(4&Se[r>>2]|0),X=Me[f],j=0!=(0|X);r:do if(F){do if(j){var i=(r+8|0)>>2,U=Me[i];if((U+2|0)>>>0>Me[r+12>>2]>>>0)break;var x=X+U|0;oe=14906,Ae[x]=255&oe,oe>>=8,Ae[x+1]=255&oe;var z=Se[i]+2|0;Se[i]=z;break r}while(0);Q(r,0|He.__str120,2)}else{do if(j){var V=r+8|0,B=Me[V>>2];if(B>>>0>=Me[r+12>>2]>>>0)break;Se[V>>2]=B+1|0,Ae[X+B|0]=46;break r}while(0);Y(r,46)}while(0);var K=Me[Se[m>>2]+8>>2],G=(Se[K>>2]-25|0)>>>0<3;r:do if(G)for(var W=K;;){var W,Z=Me[W+4>>2];if((Se[Z>>2]-25|0)>>>0>=3){var q=Z;break r}var W=Z}else var q=K;while(0);var q;H(r,q),Se[t]=y}}function tr(r,a){var e,e=(r+4|0)>>2,i=Se[e],v=0==(0|i);r:do if(!v){for(var t=Se[r+8>>2]+a|0,f=r+12|0,_=Se[f>>2],s=i;;){var s,_;if(t>>>0<=_>>>0)break r;var n=_<<1,o=fa(s,n);if(0==(0|o))break;Se[e]=o,Se[f>>2]=n;var _=n,s=o}var l=Se[e];va(l),Se[e]=0,Se[r+24>>2]=1}while(0)}function fr(r,a,e){var i,v=J(r),i=v>>2;return 0!=(0|v)&&(Se[i]=21,Se[i+1]=a,Se[i+2]=e),v}function _r(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e]<<24>>24;if(88==(0|i)){var v=e+1|0;Se[a]=v;var t=nr(r),f=Se[a],_=f+1|0;Se[a]=_;var s=Ae[f]<<24>>24==69?t:0,n=s}else if(76==(0|i))var o=or(r),n=o;else var l=N(r),n=l;var n;return n}function sr(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e];if(i<<24>>24==110){var v=e+1|0;Se[a]=v;var t=1,f=Ae[v],_=v}else var t=0,f=i,_=e;var _,f,t,s=(f-48&255&255)<10;r:do if(s)for(var n=f,o=0,l=_;;){var l,o,n,b=(n<<24>>24)-48+10*o|0,k=l+1|0;Se[a]=k;var u=ge[k];if((u-48&255&255)>=10){var c=b;break r}var n=u,o=b,l=k}else var c=0;while(0);var c,h=0==(0|t)?c:0|-c;return h}function nr(r){var a,e,a=(r+12|0)>>2,i=Se[a],v=Ae[i];do{if(v<<24>>24==76){var t=or(r),f=t;e=21;break}if(v<<24>>24==84){var _=x(r),f=_;e=21;break}if(v<<24>>24==115){if(Ae[i+1|0]<<24>>24!=114){e=8;break}var s=i+2|0;Se[a]=s;var n=N(r),o=br(r);if(Ae[Se[a]]<<24>>24==73){var l=z(r),b=D(r,4,o,l),k=D(r,1,n,b),f=k;e=21;break}var u=D(r,1,n,o),f=u;e=21;break}e=8}while(0);r:do if(8==e){var c=kr(r);if(0==(0|c)){var f=0;break}var h=0|c,d=Se[h>>2],w=40==(0|d);do{if(w){var p=c+4|0,E=r+48|0,A=Se[Se[p>>2]+8>>2]-2+Se[E>>2]|0;Se[E>>2]=A;var g=Se[h>>2];if(40!=(0|g)){var y=g;e=13;break}var m=Se[p>>2],S=Se[m>>2],M=Da(S,0|He.__str90);if(0!=(0|M)){var C=m;e=15;break}var R=N(r),T=D(r,43,c,R),f=T;break r}var y=d;e=13}while(0);do if(13==e){var y;if(40==(0|y)){var C=Se[c+4>>2];e=15;break}if(41==(0|y)){var O=c+4|0;e=17;break}if(42==(0|y)){e=18;break}var f=0;break r}while(0);do if(15==e){var C,O=C+12|0;e=17;break}while(0);do if(17==e){var O,I=Se[O>>2];if(1==(0|I))break;if(2==(0|I)){var P=nr(r),L=nr(r),F=D(r,45,P,L),X=D(r,44,c,F);return X}if(3==(0|I)){var j=nr(r),U=nr(r),V=nr(r),B=D(r,48,U,V),H=D(r,47,j,B),K=D(r,46,c,H);return K}var f=0;break r}while(0);var Y=nr(r),G=D(r,43,c,Y);return G}while(0);var f;return f}function or(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==76;r:do if(v){if(Ae[i]<<24>>24==95)var t=T(r,0),f=t;else{var _=N(r);if(0==(0|_)){var s=0;break}var n=33==(0|Se[_>>2]);do if(n){var o=Se[_+4>>2];if(0==(0|Se[o+16>>2]))break;var l=r+48|0,b=Se[l>>2]-Se[o+4>>2]|0;Se[l>>2]=b}while(0);var k=Se[a];if(Ae[k]<<24>>24==110){var u=k+1|0;Se[a]=u;var c=50,h=u}else var c=49,h=k;for(var h,c,d=h;;){var d,w=Ae[d];if(w<<24>>24==69)break;if(w<<24>>24==0){var s=0;break r}var p=d+1|0;Se[a]=p;var d=p}var E=lr(r,h,d-h|0),A=D(r,c,_,E),f=A}var f,g=Se[a],y=g+1|0;Se[a]=y;var m=Ae[g]<<24>>24==69?f:0,s=m}else var s=0;while(0);var s;return s}function lr(r,a,e){var i=J(r),v=m(i,a,e),t=0==(0|v)?0:i;return t}function br(r){var a=r+12|0,e=Me[a>>2],i=ge[e],v=(i-48&255&255)<10;do if(v)var t=L(r),f=t;else if((i-97&255&255)<26){var _=kr(r);if(0==(0|_)){var f=0;break}if(40!=(0|Se[_>>2])){var f=_;break}var s=r+48|0,n=Se[Se[_+4>>2]+8>>2]+Se[s>>2]+7|0;Se[s>>2]=n;var f=_}else if(i<<24>>24==67||i<<24>>24==68)var o=hr(r),f=o;else{if(i<<24>>24!=76){var f=0;break}Se[a>>2]=e+1|0;var l=L(r);if(0==(0|l)){var f=0;break}var b=dr(r),k=0==(0|b)?0:l,f=k}while(0);var f;return f}function kr(r){var a,e,a=(r+12|0)>>2,i=Se[a],v=i+1|0;Se[a]=v;var t=ge[i],f=i+2|0;Se[a]=f;var _=ge[v];do{if(t<<24>>24==118){if((_-48&255&255)>=10){var s=49,n=0;e=6;break}var o=(_<<24>>24)-48|0,l=L(r),b=ur(r,o,l),k=b;e=14;break}if(t<<24>>24==99){if(_<<24>>24!=118){var s=49,n=0;e=6;break}var u=N(r),c=D(r,42,u,0),k=c;e=14;break}var s=49,n=0;e=6}while(0);r:do if(6==e){for(;;){var n,s,h=(s-n)/2+n|0,d=(h<<4)+ri|0,w=Se[d>>2],p=Ae[w],E=t<<24>>24==p<<24>>24;if(E&&_<<24>>24==Ae[w+1|0]<<24>>24)break;var A=t<<24>>24 >24;do if(A)var g=h,y=n;else{if(E&&_<<24>>24
>24){var g=h,y=n;break}var g=s,y=h+1|0}while(0);var y,g;if((0|y)==(0|g)){var k=0;break r}var s=g,n=y}var m=cr(r,d),k=m}while(0);var k;return k}function ur(r,a,e){var i=J(r),v=S(i,a,e),t=0==(0|v)?0:i;return t}function cr(r,a){var e=J(r);return 0!=(0|e)&&(Se[e>>2]=40,Se[e+4>>2]=a),e}function hr(r){var a,e,i=Se[r+44>>2],e=i>>2,v=0==(0|i);do if(!v){var t=Se[e];if(0==(0|t)){var f=r+48|0,_=Se[f>>2]+Se[e+2]|0;Se[f>>2]=_}else{if(21!=(0|t))break;var s=r+48|0,n=Se[s>>2]+Se[e+2]|0;Se[s>>2]=n}}while(0);var a=(r+12|0)>>2,o=Se[a],l=o+1|0;Se[a]=l;var b=Ae[o]<<24>>24;do if(67==(0|b)){var k=o+2|0;Se[a]=k;var u=Ae[l]<<24>>24;if(49==(0|u))var c=1;else if(50==(0|u))var c=2;else{if(51!=(0|u)){var h=0;break}var c=3}var c,d=wr(r,c,i),h=d}else if(68==(0|b)){var w=o+2|0;Se[a]=w;var p=Ae[l]<<24>>24;if(48==(0|p))var E=1;else if(49==(0|p))var E=2;else{if(50!=(0|p)){var h=0;break}var E=3}var E,A=pr(r,E,i),h=A}else var h=0;while(0);var h;return h}function dr(r){var a=r+12|0,e=Se[a>>2];if(Ae[e]<<24>>24==95){var i=e+1|0;Se[a>>2]=i;var v=sr(r),t=v>>>31^1}else var t=1;var t;return t}function wr(r,a,e){var i=J(r),v=M(i,a,e),t=0==(0|v)?0:i;return t}function pr(r,a,e){var i=J(r),v=C(i,a,e),t=0==(0|v)?0:i;return t}function Er(r,a){var e=J(r);return 0!=(0|e)&&(Se[e>>2]=5,Se[e+4>>2]=a),e}function Ar(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e]<<24>>24;do if(78==(0|i))var v=gr(r),t=v;else if(90==(0|i))var f=yr(r),t=f;else if(76==(0|i))var _=br(r),t=_;else if(83==(0|i)){if(Ae[e+1|0]<<24>>24==116){var s=e+2|0;Se[a]=s;var n=lr(r,0|He.__str152,3),o=br(r),l=D(r,1,n,o),b=r+48|0,k=Se[b>>2]+3|0;Se[b>>2]=k;var u=0,c=l}else var h=V(r,0),u=1,c=h;var c,u;if(Ae[Se[a]]<<24>>24!=73){var t=c;break}if(0==(0|u)){var d=R(r,c);if(0==(0|d)){var t=0;break}}var w=z(r),p=D(r,4,c,w),t=p}else{var E=br(r);if(Ae[Se[a]]<<24>>24!=73){var t=E;break}var A=R(r,E);if(0==(0|A)){var t=0;break}var g=z(r),y=D(r,4,E,g),t=y}while(0);var t;return t}function gr(r){var a,e=Oe;Oe+=4;var i=e,a=(r+12|0)>>2,v=Se[a],t=v+1|0;Se[a]=t;var f=Ae[v]<<24>>24==78;do if(f){var _=I(r,i,1);if(0==(0|_)){var s=0;break}var n=mr(r);if(Se[_>>2]=n,0==(0|n)){var s=0;break}var o=Se[a],l=o+1|0;if(Se[a]=l,Ae[o]<<24>>24!=69){var s=0;break}var s=Se[i>>2]}else var s=0;while(0);var s;return Oe=e,s}function yr(r){var a,a=(r+12|0)>>2,e=Se[a],i=e+1|0;Se[a]=i;var v=Ae[e]<<24>>24==90;do if(v){var t=O(r,0),f=Se[a],_=f+1|0;if(Se[a]=_,Ae[f]<<24>>24!=69){var s=0;break}if(Ae[_]<<24>>24==115){var n=f+2|0;Se[a]=n;var o=dr(r);if(0==(0|o)){var s=0;break}var l=lr(r,0|He.__str168,14),b=D(r,2,t,l),s=b}else{var k=Ar(r),u=dr(r);if(0==(0|u)){var s=0;break}var c=D(r,2,t,k),s=c}}else var s=0;while(0);var s;return s}function mr(r){var a,e=r+12|0,i=0;r:for(;;){var i,v=ge[Se[e>>2]];if(v<<24>>24==0){var t=0;break}var f=(v-48&255&255)<10|(v-97&255&255)<26;do{if(!f){if(v<<24>>24==76||v<<24>>24==68||v<<24>>24==67){a=5;break}if(v<<24>>24==83){var _=V(r,1),s=_;a=10;break}if(v<<24>>24==73){if(0==(0|i)){var t=0;break r}var n=z(r),o=4,l=n;a=11;break}if(v<<24>>24==84){var b=x(r),s=b;a=10;break}if(v<<24>>24==69){var t=i;break r}var t=0;break r}a=5}while(0);do if(5==a){var k=br(r),s=k;a=10;break}while(0);do if(10==a){var s;if(0==(0|i)){var u=s;a=12;break}var o=1,l=s;a=11;break}while(0);if(11==a)var l,o,c=D(r,o,i,l),u=c;var u;if(v<<24>>24!=83)if(Ae[Se[e>>2]]<<24>>24!=69){var h=R(r,u);if(0==(0|h)){var t=0;break}var i=u}else var i=u;else var i=u}var t;return t}function Sr(r,a){var e,i,v=Oe;Oe+=4;var t=v,i=t>>2,e=(r+12|0)>>2,f=Se[e];if(Ae[f]<<24>>24==74){var _=f+1|0;Se[e]=_;var s=1}else var s=a;var s;Se[i]=0;var n=s,o=0,l=t;r:for(;;)for(var l,o,n,b=n,k=o;;){var k,b,u=Ae[Se[e]];if(u<<24>>24==0||u<<24>>24==69){var c=Se[i];if(0==(0|c)){var h=0;break r}var d=0==(0|Se[c+8>>2]);do if(d){var w=Se[c+4>>2];if(33!=(0|Se[w>>2])){var p=c;break}var E=Se[w+4>>2];if(9!=(0|Se[E+16>>2])){var p=c;break}var A=r+48|0,g=Se[A>>2]-Se[E+4>>2]|0;Se[A>>2]=g,Se[i]=0;var p=0}else var p=c;while(0);var p,y=D(r,35,k,p),h=y;break r}var m=N(r);if(0==(0|m)){var h=0;break r}if(0==(0|b)){var S=D(r,38,m,0);if(Se[l>>2]=S,0==(0|S)){var h=0;break r}var n=0,o=k,l=S+8|0;continue r}var b=0,k=m}var h;return Oe=v,h}function Mr(r){for(var a=r;;){var a;if(0==(0|a)){var e=0;break}var i=Se[a>>2];if(1!=(0|i)&&2!=(0|i)){if(6==(0|i)||7==(0|i)||42==(0|i)){var e=1;break}var e=0;break}var a=Se[a+8>>2]}var e;return e}function Cr(r){var a=r>>2;Se[a+3]=0,Se[a+2]=0,Se[a+1]=0,Se[a]=0,Se[a+4]=0}function Rr(r,a){var e,e=(r+12|0)>>2,i=Se[e],v=(Se[r+4>>2]-i|0)<(0|a);r:do if(v)var t=0;else{var f=i+a|0;Se[e]=f;var _=0==(4&Se[r+8>>2]|0);do if(!_){if(Ae[f]<<24>>24!=36)break;var s=a+(i+1)|0;Se[e]=s}while(0);var n=(0|a)>9;do if(n){var o=La(i,0|He.__str117,8);if(0!=(0|o))break;var l=Ae[i+8|0];if(l<<24>>24!=46&&l<<24>>24!=95&&l<<24>>24!=36)break;if(Ae[i+9|0]<<24>>24!=78)break;var b=r+48|0,k=22-a+Se[b>>2]|0;Se[b>>2]=k;var u=lr(r,0|He.__str169,21),t=u;break r}while(0);var c=lr(r,i,a),t=c}while(0);var t;return t}function Tr(r){var a,e,e=(r+48|0)>>2,i=Se[e],v=i+20|0;Se[e]=v;var a=(r+12|0)>>2,t=Se[a],f=t+1|0;Se[a]=f;var _=Ae[t];do if(_<<24>>24==84){var s=t+2|0;Se[a]=s;var n=Ae[f]<<24>>24;if(86==(0|n)){var o=i+15|0;Se[e]=o;var l=N(r),b=D(r,8,l,0),k=b}else if(84==(0|n)){var u=i+10|0;Se[e]=u;var c=N(r),h=D(r,9,c,0),k=h}else if(73==(0|n))var d=N(r),w=D(r,11,d,0),k=w;else if(83==(0|n))var p=N(r),E=D(r,12,p,0),k=E;else if(104==(0|n)){var A=Nr(r,104);if(0==(0|A)){var k=0;break}var g=O(r,0),y=D(r,14,g,0),k=y}else if(118==(0|n)){var m=Nr(r,118);if(0==(0|m)){var k=0;break}var S=O(r,0),M=D(r,15,S,0),k=M}else if(99==(0|n)){var C=Nr(r,0);if(0==(0|C)){var k=0;break}var R=Nr(r,0);if(0==(0|R)){var k=0;break}var T=O(r,0),I=D(r,16,T,0),k=I}else if(67==(0|n)){var P=N(r),L=sr(r);if((0|L)<0){var k=0;break}var F=Se[a],X=F+1|0;if(Se[a]=X,Ae[F]<<24>>24!=95){var k=0;break}var j=N(r),U=Se[e]+5|0;Se[e]=U;var x=D(r,10,j,P),k=x}else if(70==(0|n))var z=N(r),V=D(r,13,z,0),k=V;else{if(74!=(0|n)){var k=0;break}var B=N(r),H=D(r,17,B,0),k=H}}else if(_<<24>>24==71){var K=t+2|0;Se[a]=K;var Y=Ae[f]<<24>>24;if(86==(0|Y))var G=Ar(r),W=D(r,18,G,0),k=W;else if(82==(0|Y))var Z=Ar(r),Q=D(r,19,Z,0),k=Q;else{if(65!=(0|Y)){var k=0;break}var q=O(r,0),$=D(r,20,q,0),k=$}}else var k=0;while(0);var k;return k}function Or(r){for(var a,e=r,a=e>>2;;){var e;if(0==(0|e)){var i=0;break}var v=Se[a];if(4==(0|v)){var t=Se[a+1],f=Mr(t),i=0==(0|f)&1;break}if(25!=(0|v)&&26!=(0|v)&&27!=(0|v)){var i=0;break}var e=Se[a+1],a=e>>2}var i;return i}function Nr(r,a){var e;if(0==(0|a)){var i=r+12|0,v=Se[i>>2],t=v+1|0;Se[i>>2]=t;var f=Ae[v]<<24>>24}else var f=a;var f;do{if(104==(0|f)){var _=(sr(r),r+12|0);e=7;break}if(118==(0|f)){var s=(sr(r),r+12|0),n=Se[s>>2],o=n+1|0;if(Se[s>>2]=o,Ae[n]<<24>>24!=95){var l=0;e=8;break}var _=(sr(r),s);e=7;break}var l=0;e=8}while(0);if(7==e){var _,b=Se[_>>2],k=b+1|0;Se[_>>2]=k;var l=Ae[b]<<24>>24==95&1}var l;return l}function Ir(r){var a,e,i=r>>2,v=Oe;Oe+=56;var t,f=v,_=v+8,s=v+16,n=v+36,e=(0|r)>>2,o=Se[e],l=0==(8192&o|0);r:do{if(l){var a=(r+12|0)>>2,b=Se[a];if(Ae[b]<<24>>24!=63){var k=0;t=111;break}var u=b+1|0;Se[a]=u;var c=Ae[u];do if(c<<24>>24==63){if(Ae[b+2|0]<<24>>24==36){var h=b+3|0;if(Ae[h]<<24>>24!=63){var d=5;t=90;break}Se[a]=h;var w=6,p=h}else var w=0,p=u;var p,w,E=p+1|0;Se[a]=E;var A=Ae[E]<<24>>24;do if(48==(0|A)){var g=1;t=81}else{if(49==(0|A)){var g=2;t=81;break}if(50!=(0|A)){if(51==(0|A)){var y=0|He.__str2172,m=E;t=82;break}if(52==(0|A)){var y=0|He.__str3173,m=E;t=82;break}if(53==(0|A)){var y=0|He.__str4174,m=E;t=82;break}if(54==(0|A)){var y=0|He.__str5175,m=E;t=82;break}if(55==(0|A)){var y=0|He.__str6176,m=E;t=82;break}if(56==(0|A)){var y=0|He.__str7177,m=E;t=82;break}if(57==(0|A)){var y=0|He.__str8178,m=E;t=82;break}if(65==(0|A)){var y=0|He.__str9179,m=E;t=82;break}if(66==(0|A)){Se[a]=p+2|0;var S=0|He.__str10180,M=3;t=88;break}if(67==(0|A)){var y=0|He.__str11181,m=E;t=82;break}if(68==(0|A)){var y=0|He.__str12182,m=E;t=82;break}if(69==(0|A)){var y=0|He.__str13183,m=E;t=82;break}if(70==(0|A)){var y=0|He.__str14184,m=E;t=82;break}if(71==(0|A)){var y=0|He.__str15185,m=E;t=82;break}if(72==(0|A)){var y=0|He.__str16186,m=E;t=82;break}if(73==(0|A)){var y=0|He.__str17187,m=E;t=82;break}if(74==(0|A)){var y=0|He.__str18188,m=E;t=82;break}if(75==(0|A)){var y=0|He.__str19189,m=E;t=82;break}if(76==(0|A)){var y=0|He.__str20190,m=E;t=82;break}if(77==(0|A)){var y=0|He.__str21191,m=E;t=82;break}if(78==(0|A)){var y=0|He.__str22192,m=E;t=82;break}if(79==(0|A)){var y=0|He.__str23193,m=E;t=82;break}if(80==(0|A)){var y=0|He.__str24194,m=E;t=82;break}if(81==(0|A)){var y=0|He.__str25195,m=E;t=82;break}if(82==(0|A)){var y=0|He.__str26196,m=E;t=82;break}if(83==(0|A)){var y=0|He.__str27197,m=E;t=82;break}if(84==(0|A)){var y=0|He.__str28198,m=E;t=82;break}if(85==(0|A)){var y=0|He.__str29199,m=E;t=82;break}if(86==(0|A)){var y=0|He.__str30200,m=E;t=82;break}if(87==(0|A)){var y=0|He.__str31201,m=E;t=82;break}if(88==(0|A)){var y=0|He.__str32202,m=E;t=82;break}if(89==(0|A)){var y=0|He.__str33203,m=E;t=82;break}if(90==(0|A)){var y=0|He.__str34204,m=E;t=82;break}if(95==(0|A)){var C=p+2|0;Se[a]=C;var R=Ae[C]<<24>>24;if(48==(0|R)){var y=0|He.__str35205,m=C;t=82;break}if(49==(0|R)){var y=0|He.__str36206,m=C;t=82;break}if(50==(0|R)){var y=0|He.__str37207,m=C;t=82;break}if(51==(0|R)){var y=0|He.__str38208,m=C;t=82;break}if(52==(0|R)){var y=0|He.__str39209,m=C;t=82;break}if(53==(0|R)){var y=0|He.__str40210,m=C;t=82;break}if(54==(0|R)){var y=0|He.__str41211,m=C;t=82;break}if(55==(0|R)){var y=0|He.__str42212,m=C;t=82;break}if(56==(0|R)){var y=0|He.__str43213,m=C;t=82;break}if(57==(0|R)){var y=0|He.__str44214,m=C;t=82;break}if(65==(0|R)){var y=0|He.__str45215,m=C;t=82;break}if(66==(0|R)){var y=0|He.__str46216,m=C;t=82;break}if(67==(0|R)){Se[a]=p+3|0;var T=0|He.__str47217;t=84;break}if(68==(0|R)){var y=0|He.__str48218,m=C;t=82;break}if(69==(0|R)){var y=0|He.__str49219,m=C;t=82;break}if(70==(0|R)){var y=0|He.__str50220,m=C;t=82;break}if(71==(0|R)){var y=0|He.__str51221,m=C;t=82;break}if(72==(0|R)){var y=0|He.__str52222,m=C;t=82;break}if(73==(0|R)){var y=0|He.__str53223,m=C;t=82;break}if(74==(0|R)){var y=0|He.__str54224,m=C;t=82;break}if(75==(0|R)){var y=0|He.__str55225,m=C;t=82;break}if(76==(0|R)){var y=0|He.__str56226,m=C;t=82;break}if(77==(0|R)){var y=0|He.__str57227,m=C;t=82;break}if(78==(0|R)){var y=0|He.__str58228,m=C;t=82;break}if(79==(0|R)){var y=0|He.__str59229,m=C;t=82;break}if(82==(0|R)){var O=4|o;Se[e]=O;var N=p+3|0;Se[a]=N;var I=Ae[N]<<24>>24;if(48==(0|I)){Se[a]=p+4|0,Cr(s);var P=(Pr(r,_,s,0),Se[_>>2]),D=Se[_+4>>2],L=Dr(r,0|He.__str60230,(ne=Oe,Oe+=8,Se[ne>>2]=P,Se[ne+4>>2]=D,ne)),F=Se[a]-1|0;Se[a]=F;var y=L,m=F;t=82;break}if(49==(0|I)){Se[a]=p+4|0;var X=Lr(r),j=Lr(r),U=Lr(r),x=Lr(r),z=Se[a]-1|0;Se[a]=z;var V=Dr(r,0|He.__str61231,(ne=Oe,Oe+=16,Se[ne>>2]=X,Se[ne+4>>2]=j,Se[ne+8>>2]=U,Se[ne+12>>2]=x,ne)),y=V,m=Se[a];t=82;break}if(50==(0|I)){var y=0|He.__str62232,m=N;t=82;break}if(51==(0|I)){var y=0|He.__str63233,m=N;t=82;break}if(52==(0|I)){var y=0|He.__str64234,m=N;t=82;break}var y=0,m=N;t=82;break}if(83==(0|R)){var y=0|He.__str65235,m=C;t=82;break}if(84==(0|R)){var y=0|He.__str66236,m=C;t=82;break}if(85==(0|R)){var y=0|He.__str67237,m=C;t=82;break}if(86==(0|R)){var y=0|He.__str68238,m=C;t=82;break}if(88==(0|R)){var y=0|He.__str69239,m=C;t=82;break}if(89==(0|R)){var y=0|He.__str70240,m=C;t=82;break}var k=0;t=111;break r}var k=0;t=111;break r}var y=0|He.__str1171,m=E;t=82}while(0);do{if(81==t){var g;Se[a]=p+2|0;var B=g;t=83;break}if(82==t){var m,y;if(Se[a]=m+1|0,1==(0|w)||2==(0|w)){var B=w;t=83;break}if(4==(0|w)){var T=y;t=84;break}if(6!=(0|w)){var S=y,M=w;t=88;break}Cr(n);var H=Xr(r,n,0,60,62);if(0==(0|H))var K=y;else var Y=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=y,Se[ne+4>>2]=H,ne)),K=Y;var K;Se[i+6]=0;var S=K,M=w;t=88;break}}while(0);if(83==t){var B,G=r+40|0,W=Fr(r,0|He._symbol_demangle_dashed_null,-1,G);if(0==(0|W)){var k=0;t=111;break r}var d=B;t=90;break}if(84==t){var T;Se[i+4]=T;var Z=1,Q=T;t=109;break r}if(88==t){var M,S,q=r+40|0,$=Fr(r,S,-1,q);if(0==(0|$)){var k=0;t=111;break r}var d=M;t=90;break}}else{if(c<<24>>24==36){var J=b+2|0;Se[a]=J;var rr=jr(r);Se[i+4]=rr;var ar=0!=(0|rr)&1;t=107;break}var d=0;t=90}while(0);if(90==t){var d,er=Me[a],ir=Ae[er]<<24>>24;if(64==(0|ir))Se[a]=er+1|0;else if(36==(0|ir))t=93;else{var vr=zr(r);if(0==(0|vr)){var k=-1;t=111;break}}if(5==(0|d)){var tr=r+20|0,fr=Se[tr>>2]+1|0;Se[tr>>2]=fr}else if(1==(0|d)||2==(0|d)){if(Me[i+11]>>>0<2){var k=-1;t=111;break}var _r=r+56|0,sr=Me[_r>>2],nr=Se[sr+4>>2];if(1==(0|d))Se[sr>>2]=nr;else{var or=Dr(r,0|He.__str71241,(ne=Oe,Oe+=4,Se[ne>>2]=nr,ne)),lr=Se[_r>>2];Se[lr>>2]=or}var br=4|Se[e];Se[e]=br}else if(3==(0|d)){var kr=Se[e]&-5;Se[e]=kr}var ur=ge[Se[a]];if((ur-48&255&255)<10)var cr=Vr(r),ar=cr;else if((ur-65&255&255)<26)var hr=Br(r,3==(0|d)&1),ar=hr;else{if(ur<<24>>24!=36){var k=-1;t=111;break}var dr=Hr(r),ar=dr}}var ar;if(0==(0|ar)){var k=-1;t=111;break}var Z=ar,Q=Se[i+4];t=109;break}var wr=Pr(r,f,0,0);if(0==(0|wr)){var k=-1;t=111;break}var pr=Se[f>>2],Er=Se[f+4>>2],Ar=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=pr,Se[ne+4>>2]=Er,ne));Se[i+4]=Ar;var Z=1,Q=Ar;t=109;break}while(0);do if(109==t){var Q,Z;if(0!=(0|Q)){var k=Z;break}Xa(0|He.__str72242,1499,0|He.___func___symbol_demangle,0|He.__str73243);var k=Z}while(0);var k;return Oe=v,k}function Pr(r,a,e,i){var v,t,f,_=Oe;Oe+=24;var s=_,n=_+4,o=_+8,l=_+16,b=_+20;0==(0|a)&&Xa(0|He.__str72242,829,0|He.___func___demangle_datatype,0|He.__str121291);var f=(a+4|0)>>2;Se[f]=0;var t=(0|a)>>2;Se[t]=0;var v=(r+12|0)>>2,k=Me[v],u=k+1|0;Se[v]=u;var c=Ae[k],h=c<<24>>24;do if(95==(0|h)){Se[v]=k+2|0;var d=Ae[u],w=Zr(d);Se[t]=w}else if(67==(0|h)||68==(0|h)||69==(0|h)||70==(0|h)||71==(0|h)||72==(0|h)||73==(0|h)||74==(0|h)||75==(0|h)||77==(0|h)||78==(0|h)||79==(0|h)||88==(0|h)||90==(0|h)){var p=Qr(c);Se[t]=p}else if(84==(0|h)||85==(0|h)||86==(0|h)||89==(0|h)){var E=qr(r);if(0==(0|E))break;var A=0==(32768&Se[r>>2]|0);do if(A)if(84==(0|h))var g=0|He.__str122292;else if(85==(0|h))var g=0|He.__str123293;else if(86==(0|h))var g=0|He.__str124294;else{if(89!=(0|h)){var g=0;break}var g=0|He.__str125295}else var g=0;while(0);var g,y=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=g,Se[ne+4>>2]=E,ne));Se[t]=y}else if(63==(0|h))if(0==(0|i))$r(a,r,e,63,0);else{var m=Lr(r);if(0==(0|m))break;var S=Dr(r,0|He.__str126296,(ne=Oe,Oe+=4,Se[ne>>2]=m,ne));Se[t]=S}else if(65==(0|h)||66==(0|h))$r(a,r,e,c,i);else if(81==(0|h)||82==(0|h)||83==(0|h)){var M=0==(0|i)?80:c;$r(a,r,e,M,i)}else if(80==(0|h))if(((Ae[u]<<24>>24)-48|0)>>>0<10){var C=k+2|0;if(Se[v]=C,Ae[u]<<24>>24!=54)break;var R=r+44|0,T=Se[R>>2];Se[v]=k+3|0;var O=Ae[C],N=Se[r>>2]&-17,I=Ur(O,s,n,N);if(0==(0|I))break;var P=Pr(r,o,e,0);if(0==(0|P))break;var D=Xr(r,e,1,40,41);if(0==(0|D))break;Se[R>>2]=T;var L=Se[o>>2],F=Se[o+4>>2],X=Se[s>>2],j=Dr(r,0|He.__str127297,(ne=Oe,Oe+=12,Se[ne>>2]=L,Se[ne+4>>2]=F,Se[ne+8>>2]=X,ne));Se[t]=j;var U=Dr(r,0|He.__str128298,(ne=Oe,Oe+=4,Se[ne>>2]=D,ne));Se[f]=U}else $r(a,r,e,80,i);else if(87==(0|h)){if(Ae[u]<<24>>24!=52)break;Se[v]=k+2|0;var x=qr(r);if(0==(0|x))break;if(0==(32768&Se[r>>2]|0)){var z=Dr(r,0|He.__str129299,(ne=Oe,Oe+=4,Se[ne>>2]=x,ne));Se[t]=z}else Se[t]=x}else if(48==(0|h)||49==(0|h)||50==(0|h)||51==(0|h)||52==(0|h)||53==(0|h)||54==(0|h)||55==(0|h)||56==(0|h)||57==(0|h)){var V=h<<1,B=V-96|0,H=Yr(e,B);Se[t]=H;var K=V-95|0,Y=Yr(e,K);Se[f]=Y}else if(36==(0|h)){var G=k+2|0;Se[v]=G;var W=Ae[u]<<24>>24;if(48==(0|W)){var Z=Lr(r);Se[t]=Z}else if(68==(0|W)){var Q=Lr(r);if(0==(0|Q))break;var q=Dr(r,0|He.__str130300,(ne=Oe,Oe+=4,Se[ne>>2]=Q,ne));Se[t]=q}else if(70==(0|W)){var $=Lr(r);if(0==(0|$))break;var J=Lr(r);if(0==(0|J))break;var rr=Dr(r,0|He.__str131301,(ne=Oe,Oe+=8,Se[ne>>2]=$,Se[ne+4>>2]=J,ne));Se[t]=rr}else if(71==(0|W)){var ar=Lr(r);if(0==(0|ar))break;var er=Lr(r);if(0==(0|er))break;var ir=Lr(r);if(0==(0|ir))break;var vr=Dr(r,0|He.__str132302,(ne=Oe,Oe+=12,Se[ne>>2]=ar,Se[ne+4>>2]=er,Se[ne+8>>2]=ir,ne));Se[t]=vr}else if(81==(0|W)){var tr=Lr(r);if(0==(0|tr))break;var fr=Dr(r,0|He.__str133303,(ne=Oe,Oe+=4,Se[ne>>2]=tr,ne));Se[t]=fr}else{if(36!=(0|W))break;if(Ae[G]<<24>>24!=67)break;Se[v]=k+3|0;var _r=xr(r,l,b);if(0==(0|_r))break;var sr=Pr(r,a,e,i);if(0==(0|sr))break;var nr=Se[t],or=Se[l>>2],lr=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=nr,Se[ne+4>>2]=or,ne));Se[t]=lr}}while(0);var br=0!=(0|Se[t])&1;return Oe=_,br}function Dr(r,a){var e,i=Oe;Oe+=4;var v=i,e=v>>2,t=v;Se[t>>2]=arguments[Dr.length];var f=1,_=0;r:for(;;){var _,f,s=Ae[a+_|0];do{if(s<<24>>24==0)break r;if(s<<24>>24==37){var n=_+1|0,o=Ae[a+n|0]<<24>>24;if(115==(0|o)){var l=Se[e],b=l,k=l+4|0;Se[e]=k;var u=Se[b>>2];if(0==(0|u)){var c=f,h=n;break}var d=Ca(u),c=d+f|0,h=n;break}if(99==(0|o)){var w=Se[e]+4|0;Se[e]=w;var c=f+1|0,h=n;break}if(37==(0|o))var p=n;else var p=_;var p,c=f+1|0,h=p}else var c=f+1|0,h=_}while(0);var h,c,f=c,_=h+1|0}var E=Wr(r,f);if(0==(0|E))var A=0;else{Se[t>>2]=arguments[Dr.length];var g=E,y=0;r:for(;;){var y,g,m=Ae[a+y|0];do{if(m<<24>>24==0)break r;if(m<<24>>24==37){var S=y+1|0,M=Ae[a+S|0]<<24>>24;if(115==(0|M)){var C=Se[e],R=C,T=C+4|0;Se[e]=T;var O=Se[R>>2];if(0==(0|O)){var N=g,I=S;break}var P=Ca(O);Pa(g,O,P,1);var N=g+P|0,I=S;break}if(99==(0|M)){var D=Se[e],L=D,F=D+4|0;Se[e]=F,Ae[g]=255&Se[L>>2];var N=g+1|0,I=S;break}if(37==(0|M))var X=S;else var X=y;var X;Ae[g]=37;var N=g+1|0,I=X}else{Ae[g]=m;var N=g+1|0,I=y}}while(0);var I,N,g=N,y=I+1|0}Ae[g]=0;var A=E}var A;return Oe=i,A}function Lr(r){var a,a=(r+12|0)>>2,e=Se[a],i=Ae[e];if(i<<24>>24==63){var v=e+1|0;Se[a]=v;var t=1,f=v,_=Ae[v]}else var t=0,f=e,_=i;var _,f,t,s=(_-48&255&255)<9;do if(s){var n=Wr(r,3),o=0!=(0|t);o&&(Ae[n]=45);var l=Ae[Se[a]]+1&255;Ae[n+t|0]=l;var b=o?2:1; -Ae[n+b|0]=0;var k=Se[a]+1|0;Se[a]=k;var u=n}else if(_<<24>>24==57){var c=Wr(r,4),h=0!=(0|t);h&&(Ae[c]=45),Ae[c+t|0]=49;var d=h?2:1;Ae[c+d|0]=48;var w=h?3:2;Ae[c+w|0]=0;var p=Se[a]+1|0;Se[a]=p;var u=c}else{if((_-65&255&255)>=16){var u=0;break}for(var E=0,A=f;;){var A,E,g=A+1|0;Se[a]=g;var y=(Ae[A]<<24>>24)+((E<<4)-65)|0,m=ge[g];if((m-65&255&255)>=16)break;var E=y,A=g}if(m<<24>>24!=64){var u=0;break}var S=Wr(r,17),M=0!=(0|t)?0|He.__str119289:0|ii,C=(za(S,0|He.__str118288,(ne=Oe,Oe+=8,Se[ne>>2]=M,Se[ne+4>>2]=y,ne)),Se[a]+1|0);Se[a]=C;var u=S}while(0);var u;return u}function Fr(r,a,e,i){var v,t,f,_;0==(0|a)&&Xa(0|He.__str72242,212,0|He.___func___str_array_push,0|He.__str115285),0==(0|i)&&Xa(0|He.__str72242,213,0|He.___func___str_array_push,0|He.__str116286);var f=(i+12|0)>>2,s=Me[f],n=0==(0|s);do{if(n){Se[f]=32;var o=Wr(r,128);if(0==(0|o)){var l=0;_=17;break}Se[i+16>>2]=o,_=11;break}if(Me[i+8>>2]>>>0 >>0){_=11;break}var b=s<<3,k=Wr(r,b);if(0==(0|k)){var l=0;_=17;break}var u=k,c=i+16|0,h=Se[c>>2],d=Se[f]<<2;Pa(k,h,d,1);var w=Se[f]<<1;Se[f]=w,Se[c>>2]=u,_=11;break}while(0);do if(11==_){if((0|e)==-1)var p=Ca(a),E=p;else var E=e;var E,A=ja(a),g=E+1|0,y=Wr(r,g),t=(i+4|0)>>2,v=(i+16|0)>>2,m=(Se[t]<<2)+Se[v]|0;Se[m>>2]=y;var S=Se[Se[v]+(Se[t]<<2)>>2];if(0==(0|S)){Xa(0|He.__str72242,233,0|He.___func___str_array_push,0|He.__str117287);var M=Se[Se[v]+(Se[t]<<2)>>2]}else var M=S;var M;Pa(M,A,E,1),va(A),Ae[Se[Se[v]+(Se[t]<<2)>>2]+g|0]=0;var C=Se[t]+1|0;Se[t]=C;var R=i+8|0;if(C>>>0>2]>>>0){var l=1;break}Se[R>>2]=C;var l=1}while(0);var l;return l}function Xr(r,a,e,i,v){var t,f,_=Oe;Oe+=28;var s,n=_,o=_+8;Cr(o);var f=(r+12|0)>>2,l=0==(0|e),t=(0|n)>>2,b=n+4|0;r:do if(l)for(;;){var k=Se[f],u=Ae[k];if(u<<24>>24==0){s=12;break r}if(u<<24>>24==64){var c=k;s=7;break r}var h=Pr(r,n,a,1);if(0==(0|h)){var d=0;s=25;break r}var w=Se[t],p=Se[b>>2],E=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=w,Se[ne+4>>2]=p,ne)),A=Fr(r,E,-1,o);if(0==(0|A)){var d=0;s=25;break r}var g=Se[t],y=Da(g,0|He.__str110280);if(0==(0|y)){s=12;break r}}else for(;;){var m=Se[f],S=Ae[m];if(S<<24>>24==0){s=12;break r}if(S<<24>>24==64){var c=m;s=7;break r}var M=Pr(r,n,a,1);if(0==(0|M)){var d=0;s=25;break r}var C=Se[t],R=Da(C,0|He.__str84254);if(0==(0|R)){s=13;break r}var T=Se[b>>2],O=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=C,Se[ne+4>>2]=T,ne)),N=Fr(r,O,-1,o);if(0==(0|N)){var d=0;s=25;break r}var I=Se[t],P=Da(I,0|He.__str110280);if(0==(0|P)){s=12;break r}}while(0);do if(7==s){var c;Se[f]=c+1|0,s=12;break}while(0);do if(12==s){if(l){s=14;break}s=13;break}while(0);do if(13==s){var D=Se[f],L=D+1|0;if(Se[f]=L,Ae[D]<<24>>24==90){s=14;break}var d=0;s=25;break}while(0);r:do if(14==s){var F=o+4|0,X=Me[F>>2];do{if(0!=(0|X)){if(1==(0|X)){var j=o+16|0,U=Se[Se[j>>2]>>2],x=Da(U,0|He.__str84254);if(0==(0|x)){s=17;break}var z=j;s=20;break}var V=o+16|0;if(X>>>0<=1){var z=V;s=20;break}for(var B=0,H=1;;){var H,B,K=Se[Se[V>>2]+(H<<2)>>2],Y=Dr(r,0|He.__str112282,(ne=Oe,Oe+=8,Se[ne>>2]=B,Se[ne+4>>2]=K,ne)),G=H+1|0;if(G>>>0>=Me[F>>2]>>>0)break;var B=Y,H=G}if(0==(0|Y)){var z=V;s=20;break}var W=Y,Z=Y;s=21;break}s=17}while(0);if(17==s){var Q=i<<24>>24,q=v<<24>>24,$=Dr(r,0|He.__str111281,(ne=Oe,Oe+=8,Se[ne>>2]=Q,Se[ne+4>>2]=q,ne)),d=$;break}if(20==s)var z,W=Se[Se[z>>2]>>2],Z=0;var Z,W,J=v<<24>>24,rr=v<<24>>24==62;do if(rr){var ar=Ca(W);if(Ae[W+(ar-1)|0]<<24>>24!=62)break;var er=i<<24>>24,ir=Se[Se[o+16>>2]>>2],vr=Dr(r,0|He.__str113283,(ne=Oe,Oe+=16,Se[ne>>2]=er,Se[ne+4>>2]=ir,Se[ne+8>>2]=Z,Se[ne+12>>2]=J,ne)),d=vr;break r}while(0);var tr=i<<24>>24,fr=Se[Se[o+16>>2]>>2],_r=Dr(r,0|He.__str114284,(ne=Oe,Oe+=16,Se[ne>>2]=tr,Se[ne+4>>2]=fr,Se[ne+8>>2]=Z,Se[ne+12>>2]=J,ne)),d=_r}while(0);var d;return Oe=_,d}function jr(r){var a,e=Oe;Oe+=20;var i=e,v=r+24|0,t=Se[v>>2],a=(r+20|0)>>2,f=Se[a],_=r+44|0,s=Se[_>>2];Se[a]=t;var n=Kr(r);if(0==(0|n))var o=0;else{Cr(i);var l=Xr(r,i,0,60,62);if(0==(0|l))var b=n;else var k=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=n,Se[ne+4>>2]=l,ne)),b=k;var b;Se[v>>2]=t,Se[a]=f,Se[_>>2]=s;var o=b}var o;return Oe=e,o}function Ur(r,a,e,i){var v,t=a>>2;Se[e>>2]=0,Se[t]=0;var f=0==(18&i|0);do{if(f){var _=r<<24>>24,s=1==((_-65)%2|0);if(0==(1&i|0)){if(s?Se[e>>2]=0|He.__str95265:v=14,65==(0|_)||66==(0|_)){Se[t]=0|He.__str96266,v=21;break}if(67==(0|_)||68==(0|_)){Se[t]=0|He.__str97267,v=21;break}if(69==(0|_)||70==(0|_)){Se[t]=0|He.__str98268,v=21;break}if(71==(0|_)||72==(0|_)){Se[t]=0|He.__str99269,v=21;break}if(73==(0|_)||74==(0|_)){Se[t]=0|He.__str100270,v=21;break}if(75==(0|_)||76==(0|_)){v=21;break}if(77==(0|_)){Se[t]=0|He.__str101271,v=21;break}var n=0;v=22;break}if(s?Se[e>>2]=0|He.__str88258:v=5,65==(0|_)||66==(0|_)){Se[t]=0|He.__str89259,v=21;break}if(67==(0|_)||68==(0|_)){Se[t]=0|He.__str90260,v=21;break}if(69==(0|_)||70==(0|_)){Se[t]=0|He.__str91261,v=21;break}if(71==(0|_)||72==(0|_)){Se[t]=0|He.__str92262,v=21;break}if(73==(0|_)||74==(0|_)){Se[t]=0|He.__str93263,v=21;break}if(75==(0|_)||76==(0|_)){v=21;break}if(77==(0|_)){Se[t]=0|He.__str94264,v=21;break}var n=0;v=22;break}v=21}while(0);if(21==v)var n=1;var n;return n}function xr(r,a,e){var i;Se[e>>2]=0;var i=(r+12|0)>>2,v=Se[i];if(Ae[v]<<24>>24==69){Se[e>>2]=0|He.__str102272;var t=Se[i]+1|0;Se[i]=t;var f=t}else var f=v;var f;Se[i]=f+1|0;var _=Ae[f]<<24>>24;if(65==(0|_)){Se[a>>2]=0;var s=1}else if(66==(0|_)){Se[a>>2]=0|He.__str103273;var s=1}else if(67==(0|_)){Se[a>>2]=0|He.__str104274;var s=1}else if(68==(0|_)){Se[a>>2]=0|He.__str105275;var s=1}else var s=0;var s;return s}function zr(r){var a,e,a=(r+12|0)>>2,i=r+40|0,v=r+20|0,t=0|i,f=r+44|0,_=r+48|0,s=r+52|0,n=r+56|0,o=r+20|0,l=r+24|0,b=r+16|0,k=0;r:for(;;){var k,u=Se[a],c=Ae[u];if(c<<24>>24==64){var h=u+1|0;Se[a]=h;var d=1;break}var w=c<<24>>24;do{if(0==(0|w)){var d=0;break r}if(48==(0|w)||49==(0|w)||50==(0|w)||51==(0|w)||52==(0|w)||53==(0|w)||54==(0|w)||55==(0|w)||56==(0|w)||57==(0|w)){var p=u+1|0;Se[a]=p;var E=(Ae[u]<<24>>24)-48|0,A=Yr(v,E),g=A;e=14;break}if(63==(0|w)){var y=u+1|0;Se[a]=y;var m=Ae[y]<<24>>24;if(36==(0|m)){var S=u+2|0;Se[a]=S;var M=jr(r);if(0==(0|M)){var d=0;break r}var C=Fr(r,M,-1,v);if(0==(0|C)){var d=0;break r}var R=M;e=15;break}if(63==(0|m)){var T=Se[t>>2],O=Se[f>>2],N=Se[_>>2],I=Se[s>>2],P=Se[n>>2],D=Se[o>>2],L=Se[l>>2];Cr(i);var F=Ir(r);if(0==(0|F))var X=k;else var j=Se[b>>2],U=Dr(r,0|He.__str109279,(ne=Oe,Oe+=4,Se[ne>>2]=j,ne)),X=U;var X;Se[o>>2]=D,Se[l>>2]=L,Se[t>>2]=T,Se[f>>2]=O,Se[_>>2]=N,Se[s>>2]=I,Se[n>>2]=P;var g=X;e=14;break}var x=Lr(r);if(0==(0|x)){var d=0;break r}var z=Dr(r,0|He.__str109279,(ne=Oe,Oe+=4,Se[ne>>2]=x,ne)),g=z;e=14;break}var V=Kr(r),g=V;e=14;break}while(0);if(14==e){var g;if(0==(0|g)){var d=0;break}var R=g}var R,B=Fr(r,R,-1,i);if(0==(0|B)){var d=0;break}var k=R}var d;return d}function Vr(r){var a,e,i,v=Oe;Oe+=36;var t,f=v,i=f>>2,_=v+4,s=v+8,e=s>>2,n=v+16;Se[i]=0;var o=0|r,l=Se[o>>2],b=0==(128&l|0),k=r+12|0;do if(b){var u=Ae[Se[k>>2]]<<24>>24;if(48==(0|u))var c=0|He.__str76246,h=k,a=h>>2;else if(49==(0|u))var c=0|He.__str77247,h=k,a=h>>2;else{if(50!=(0|u)){var c=0,h=k,a=h>>2;break}var c=0|He.__str78248,h=k,a=h>>2}}else var c=0,h=k,a=h>>2;while(0);var h,c,d=0==(512&l|0);do if(d){if((Ae[Se[a]]-48&255&255)>=3){var w=0;break}var w=0|He.__str79249}else var w=0;while(0);var w,p=Gr(r,0),E=Se[a],A=E+1|0;Se[a]=A;var g=Ae[E]<<24>>24;do{if(48==(0|g)||49==(0|g)||50==(0|g)||51==(0|g)||52==(0|g)||53==(0|g)){var y=r+44|0,m=Se[y>>2];Cr(n);var S=Pr(r,s,n,0);if(0==(0|S)){var M=0;t=28;break}var C=xr(r,f,_);if(0==(0|C)){var M=0;t=28;break}var R=Se[i],T=0==(0|R),O=Se[_>>2];do if(T)Se[i]=O;else{if(0==(0|O))break;var N=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=R,Se[ne+4>>2]=O,ne));Se[i]=N}while(0);Se[y>>2]=m,t=22;break}if(54==(0|g)||55==(0|g)){var I=s+4|0;Se[I>>2]=0,Se[e]=0;var P=xr(r,f,_);if(0==(0|P)){var M=0;t=28;break}if(Ae[Se[a]]<<24>>24==64){t=22;break}var D=qr(r);if(0==(0|D)){var M=0;t=28;break}var L=Dr(r,0|He.__str107277,(ne=Oe,Oe+=4,Se[ne>>2]=D,ne));Se[I>>2]=L,t=22;break}if(56==(0|g)||57==(0|g)){Se[e+1]=0,Se[e]=0,Se[i]=0,t=22;break}var M=0;t=28}while(0);if(22==t){var F=0==(4096&Se[o>>2]|0);do{if(F){var X=Se[e],j=Se[i];if(0==(0|j)){var U=X;t=26;break}var x=0!=(0|X)?0|He.__str87257:0,z=0|He.__str87257,V=j,B=x,H=X;t=27;break}Se[i]=0,Se[e+1]=0,Se[e]=0;var U=0;t=26;break}while(0);if(26==t)var U,K=0!=(0|U)?0|He.__str87257:0,z=K,V=0,B=0,H=U;var H,B,V,z,Y=Se[e+1],G=Dr(r,0|He.__str108278,(ne=Oe,Oe+=32,Se[ne>>2]=c,Se[ne+4>>2]=w,Se[ne+8>>2]=H,Se[ne+12>>2]=B,Se[ne+16>>2]=V,Se[ne+20>>2]=z,Se[ne+24>>2]=p,Se[ne+28>>2]=Y,ne));Se[r+16>>2]=G;var M=1}var M;return Oe=v,M}function Br(r,a){var e,i,v,t,f=Oe;Oe+=44;var _,s=f,t=s>>2,n=f+8,o=f+12,v=o>>2,l=f+16,b=f+20,k=f+40;Se[v]=0;var i=(r+12|0)>>2,u=Se[i],c=u+1|0;Se[i]=c;var h=ge[u],d=h<<24>>24,w=(h-65&255&255)>25;r:do if(w)var p=0;else{var e=(0|r)>>2,E=Me[e],A=0==(128&E|0),g=d-65|0;do if(A){var y=g/8|0;if(0==(0|y))var m=0|He.__str76246,S=g;else if(1==(0|y))var m=0|He.__str77247,S=g;else{if(2!=(0|y)){var m=0,S=g;break}var m=0|He.__str78248,S=g}}else var m=0,S=g;while(0);var S,m,M=0==(512&E|0)&h<<24>>24<89,C=(0|S)%8;do if(M)if(2==(0|C)||3==(0|C))var R=m,T=0|He.__str79249;else if(4==(0|C)||5==(0|C))var R=m,T=0|He.__str80250;else{if(6!=(0|C)&&7!=(0|C)){var R=m,T=0;break}var O=Dr(r,0|He.__str81251,(ne=Oe,Oe+=4,Se[ne>>2]=m,ne)),R=O,T=0|He.__str80250}else var R=m,T=0;while(0);var T,R,N=Gr(r,0),I=6==(0|C);do{if(!I){if(7==((d-56)%8|0)){_=14;break}var P=N;_=15;break}_=14}while(0);if(14==_)var D=Lr(r),L=Dr(r,0|He.__str82252,(ne=Oe,Oe+=8,Se[ne>>2]=N,Se[ne+4>>2]=D,ne)),P=L;var P,F=h<<24>>24>88;do if(F)var X=0;else{if((C-2|0)>>>0<2){var X=0;break}var j=xr(r,o,k);if(0==(0|j)){var p=0;break r}var U=Me[v],x=Se[k>>2];if(0==(0|U)&0==(0|x)){var X=0;break}var z=Dr(r,0|He.__str83253,(ne=Oe,Oe+=8,Se[ne>>2]=U,Se[ne+4>>2]=x,ne));Se[v]=z;var X=z}while(0);var X,V=Se[i],B=V+1|0;Se[i]=B;var H=Ae[V],K=Se[e],Y=Ur(H,n,l,K);if(0==(0|Y)){var p=0;break}Cr(b);var G=Se[i];if(Ae[G]<<24>>24==64){Se[t]=0|He.__str84254,Se[t+1]=0;var W=G+1|0;Se[i]=W}else{var Z=Pr(r,s,b,0);if(0==(0|Z)){var p=0;break}}if(0!=(4&Se[e]|0)&&(Se[t+1]=0,Se[t]=0),0==(0|a))var Q=P;else{var q=0|s,$=Se[q>>2],J=s+4|0,rr=Se[J>>2],ar=Dr(r,0|He.__str85255,(ne=Oe,Oe+=12,Se[ne>>2]=P,Se[ne+4>>2]=$,Se[ne+8>>2]=rr,ne));Se[J>>2]=0,Se[q>>2]=0;var Q=ar}var Q,er=r+44|0,ir=Se[er>>2],vr=Xr(r,b,1,40,41);if(0==(0|vr)){var p=0;break}if(0==(4096&Se[e]|0))var tr=vr,fr=X;else{Se[v]=0;var tr=0,fr=0}var fr,tr;Se[er>>2]=ir;var _r=Se[t],sr=Se[t+1];if(0==(0|_r))var nr=0;else var or=0!=(0|sr)?0:0|He.__str87257,nr=or;var nr,lr=Se[n>>2],br=0!=(0|lr)?0|He.__str87257:0,kr=Se[l>>2],ur=Dr(r,0|He.__str86256,(ne=Oe,Oe+=44,Se[ne>>2]=R,Se[ne+4>>2]=T,Se[ne+8>>2]=_r,Se[ne+12>>2]=nr,Se[ne+16>>2]=lr,Se[ne+20>>2]=br,Se[ne+24>>2]=kr,Se[ne+28>>2]=Q,Se[ne+32>>2]=tr,Se[ne+36>>2]=fr,Se[ne+40>>2]=sr,ne));Se[r+16>>2]=ur;var p=1}while(0);var p;return Oe=f,p}function Hr(r){var a,a=(r+12|0)>>2,e=Se[a];if(Ae[e]<<24>>24==36)var i=e;else{Xa(0|He.__str72242,1252,0|He.___func___handle_template,0|He.__str74244);var i=Se[a]}var i;Se[a]=i+1|0;var v=Kr(r),t=0==(0|v);do if(t)var f=0;else{var _=Xr(r,0,0,60,62);if(0==(0|_)){var f=0;break}var s=Dr(r,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=v,Se[ne+4>>2]=_,ne));Se[r+16>>2]=s;var f=1}while(0);var f;return f}function Kr(r){for(var a,a=(r+12|0)>>2,e=Me[a],i=e,v=Ae[e];;){var v,i;if(!((v-65&255&255)<26|(v-97&255&255)<26|(v-48&255&255)<10)&&v<<24>>24!=95&&v<<24>>24!=36){var t=0;break}var f=i+1|0;Se[a]=f;var _=ge[f];if(_<<24>>24==64){Se[a]=i+2|0;var s=f-e|0,n=r+20|0,o=Fr(r,e,s,n);if(0==(0|o)){var t=0;break}var l=Se[r+24>>2]-1-Se[n>>2]|0,b=Yr(n,l),t=b;break}var i=f,v=_}var t;return t}function Yr(r,a){0==(0|r)&&Xa(0|He.__str72242,263,0|He.___func___str_array_get_ref,0|He.__str75245);var e=Se[r>>2]+a|0;if(e>>>0 >2]>>>0)var i=Se[Se[r+16>>2]+(e<<2)>>2];else var i=0;var i;return i}function Gr(r,a){var e,e=(r+44|0)>>2,i=Me[e];if(i>>>0>a>>>0){for(var v=r+56|0,t=a,f=0,_=Se[v>>2],s=i;;){var s,_,f,t,n=Me[_+(t<<2)>>2];if(0==(0|n)){Xa(0|He.__str72242,680,0|He.___func___get_class_string,0|He.__str106276);var o=Se[v>>2],l=o,b=Se[o+(t<<2)>>2],k=Se[e]}else var l=_,b=n,k=s;var k,b,l,u=Ca(b),c=u+(f+2)|0,h=t+1|0;if(h>>>0>=k>>>0)break;var t=h,f=c,_=l,s=k}var d=c-1|0}else var d=-1;var d,w=Wr(r,d);if(0==(0|w))var p=0;else{var E=Se[e]-1|0,A=(0|E)<(0|a);r:do if(A)var g=0;else for(var y=r+56|0,m=0,S=E;;){var S,m,M=Se[Se[y>>2]+(S<<2)>>2],C=Ca(M),R=w+m|0;Pa(R,M,C,1);var T=C+m|0;if((0|S)>(0|a)){var O=T+1|0;Ae[w+T|0]=58;var N=T+2|0;Ae[w+O|0]=58;var I=N}else var I=T;var I,P=S-1|0;if((0|P)<(0|a)){var g=I;break r}var m=I,S=P}while(0);var g;Ae[w+g|0]=0;var p=w}var p;return p}function Wr(r,a){var e,i=a>>>0>1020;do if(i){var v=Se[r+4>>2],t=a+4|0,f=pe[v](t);if(0==(0|f)){var _=0;break}var s=r+60|0,n=Se[s>>2],o=f;Se[o>>2]=n,Se[s>>2]=f,Se[r+64>>2]=0;var _=f+4|0}else{var e=(r+64|0)>>2,l=Me[e];if(l>>>0>>0){var b=Se[r+4>>2],k=pe[b](1024);if(0==(0|k)){var _=0;break}var u=r+60|0,c=Se[u>>2],h=k;Se[h>>2]=c,Se[u>>2]=k,Se[e]=1020;var d=1020,w=k}else var d=l,w=Se[r+60>>2];var w,d;Se[e]=d-a|0;var _=w+(1024-d)|0}while(0);var _;return _}function Zr(r){var a=r<<24>>24;if(68==(0|a))var e=0|He.__str157327;else if(69==(0|a))var e=0|He.__str158328;else if(70==(0|a))var e=0|He.__str159329;else if(71==(0|a))var e=0|He.__str160330;else if(72==(0|a))var e=0|He.__str161331;else if(73==(0|a))var e=0|He.__str162332;else if(74==(0|a))var e=0|He.__str163333;else if(75==(0|a))var e=0|He.__str164334;else if(76==(0|a))var e=0|He.__str165335;else if(77==(0|a))var e=0|He.__str166336;else if(78==(0|a))var e=0|He.__str167337;else if(87==(0|a))var e=0|He.__str168338;else var e=0;var e;return e}function Qr(r){var a=r<<24>>24;if(67==(0|a))var e=0|He.__str145315;else if(68==(0|a))var e=0|He.__str146316;else if(69==(0|a))var e=0|He.__str147317;else if(70==(0|a))var e=0|He.__str148318;else if(71==(0|a))var e=0|He.__str149319;else if(72==(0|a))var e=0|He.__str150320;else if(73==(0|a))var e=0|He.__str151321;else if(74==(0|a))var e=0|He.__str152322;else if(75==(0|a))var e=0|He.__str153323;else if(77==(0|a))var e=0|He.__str154324;else if(78==(0|a))var e=0|He.__str155325;else if(79==(0|a))var e=0|He.__str156326;else if(88==(0|a))var e=0|He.__str84254;else if(90==(0|a))var e=0|He.__str110280;else var e=0;var e;return e}function qr(r){var a=r+44|0,e=Se[a>>2],i=zr(r);if(0==(0|i))var v=0;else var t=Gr(r,e),v=t;var v;return Se[a>>2]=e,v}function $r(r,a,e,i,v){var t,f,_,s=Oe;Oe+=16;var n,o=s,_=o>>2,l=s+4,b=s+8,f=b>>2;Se[l>>2]=0|ii;var t=(a+12|0)>>2,k=Se[t];if(Ae[k]<<24>>24==69){Se[l>>2]=0|He.__str134304;var u=k+1|0;Se[t]=u;var c=0|He.__str134304}else var c=0|ii;var c,h=i<<24>>24;do{if(65==(0|h)){var d=Dr(a,0|He.__str135305,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=d;n=10;break}if(66==(0|h)){var p=Dr(a,0|He.__str136306,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=p;n=10;break}if(80==(0|h)){var E=Dr(a,0|He.__str137307,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=E;n=10;break}if(81==(0|h)){var A=Dr(a,0|He.__str138308,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=A;n=10;break}if(82==(0|h)){var g=Dr(a,0|He.__str139309,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=g;n=10;break}if(83==(0|h)){var y=Dr(a,0|He.__str140310,(ne=Oe,Oe+=4,Se[ne>>2]=c,ne)),w=y;n=10;break}if(63==(0|h)){var w=0|ii;n=10}else n=31}while(0);r:do if(10==n){var w,m=xr(a,o,l);if(0==(0|m))break;var S=a+44|0,M=Se[S>>2],C=Se[t],R=Ae[C]<<24>>24==89;a:do if(R){var T=C+1|0;Se[t]=T;var O=Lr(a);if(0==(0|O))break r;var N=Ha(O),I=Ae[w]<<24>>24==32,P=Se[_],D=0==(0|P);do{if(I){if(!D){n=17;break}var L=w+1|0;n=18;break}if(D){var L=w;n=18;break}n=17;break}while(0);if(17==n){var F=Dr(a,0|He.__str141311,(ne=Oe,Oe+=8,Se[ne>>2]=P,Se[ne+4>>2]=w,ne));Se[_]=0;var X=F}else if(18==n)var L,j=Dr(a,0|He.__str142312,(ne=Oe,Oe+=4,Se[ne>>2]=L,ne)),X=j;var X;if(0==(0|N)){var U=X;break}for(var x=X,z=N;;){var z,x,V=z-1|0,B=Lr(a),H=Dr(a,0|He.__str143313,(ne=Oe,Oe+=8,Se[ne>>2]=x,Se[ne+4>>2]=B,ne));if(0==(0|V)){var U=H;break a}var x=H,z=V}}else var U=w;while(0);var U,K=Pr(a,b,e,0);if(0==(0|K))break;var Y=Se[_];if(0==(0|Y)){var G=0==(0|v);do if(G){if(Ae[U]<<24>>24==0){var W=U;break}var Z=U+1|0;if(Ae[Z]<<24>>24!=42){var W=U;break}var Q=Se[f],q=Ca(Q);if(Ae[Q+(q-1)|0]<<24>>24!=42){var W=U;break}var W=Z}else var W=U;while(0);var W,$=Se[f],J=Dr(a,0|He.__str170,(ne=Oe,Oe+=8,Se[ne>>2]=$,Se[ne+4>>2]=W,ne));Se[r>>2]=J}else{var rr=Se[f],ar=Dr(a,0|He.__str144314,(ne=Oe,Oe+=12,Se[ne>>2]=rr,Se[ne+4>>2]=Y,Se[ne+8>>2]=U,ne));Se[r>>2]=ar}var er=Se[f+1];Se[r+4>>2]=er,Se[S>>2]=M}while(0);Oe=s}function Jr(r){var a,e=r>>>0<245;do{if(e){if(r>>>0<11)var i=16;else var i=r+11&-8;var i,v=i>>>3,t=Me[vi>>2],f=t>>>(v>>>0);if(0!=(3&f|0)){var _=(1&f^1)+v|0,s=_<<1,n=(s<<2)+vi+40|0,o=(s+2<<2)+vi+40|0,l=Me[o>>2],b=l+8|0,k=Me[b>>2];if((0|n)==(0|k))Se[vi>>2]=t&(1<<_^-1);else{if(k>>>0 >2]>>>0)throw Ka(),"Reached an unreachable!";Se[o>>2]=k,Se[k+12>>2]=n}var u=_<<3;Se[l+4>>2]=3|u;var c=l+(4|u)|0,h=1|Se[c>>2];Se[c>>2]=h;var d=b;a=38;break}if(i>>>0<=Me[vi+8>>2]>>>0){var w=i;a=30;break}if(0!=(0|f)){var p=2< >>12&16,y=A>>>(g>>>0),m=y>>>5&8,S=y>>>(m>>>0),M=S>>>2&4,C=S>>>(M>>>0),R=C>>>1&2,T=C>>>(R>>>0),O=T>>>1&1,N=(m|g|M|R|O)+(T>>>(O>>>0))|0,I=N<<1,P=(I<<2)+vi+40|0,D=(I+2<<2)+vi+40|0,L=Me[D>>2],F=L+8|0,X=Me[F>>2];if((0|P)==(0|X))Se[vi>>2]=t&(1< >>0 >2]>>>0)throw Ka(),"Reached an unreachable!";Se[D>>2]=X,Se[X+12>>2]=P}var j=N<<3,U=j-i|0;Se[L+4>>2]=3|i;var x=L,z=x+i|0;Se[x+(4|i)>>2]=1|U,Se[x+j>>2]=U;var V=Me[vi+8>>2];if(0!=(0|V)){var B=Se[vi+20>>2],H=V>>>2&1073741822,K=(H<<2)+vi+40|0,Y=Me[vi>>2],G=1<<(V>>>3),W=0==(Y&G|0);do{if(!W){var Z=(H+2<<2)+vi+40|0,Q=Me[Z>>2];if(Q>>>0>=Me[vi+16>>2]>>>0){var q=Q,$=Z;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Y|G;var q=K,$=(H+2<<2)+vi+40|0}while(0);var $,q;Se[$>>2]=B,Se[q+12>>2]=B;var J=B+8|0;Se[J>>2]=q;var rr=B+12|0;Se[rr>>2]=K}Se[vi+8>>2]=U,Se[vi+20>>2]=z;var d=F;a=38;break}if(0==(0|Se[vi+4>>2])){var w=i;a=30;break}var ar=ra(i);if(0==(0|ar)){var w=i;a=30;break}var d=ar;a=38;break}if(r>>>0>4294967231){var w=-1;a=30;break}var er=r+11&-8;if(0==(0|Se[vi+4>>2])){var w=er;a=30;break}var ir=ea(er);if(0==(0|ir)){var w=er;a=30;break}var d=ir;a=38;break}while(0);if(30==a){var w,vr=Me[vi+8>>2];if(w>>>0>vr>>>0){var tr=Me[vi+12>>2];if(w>>>0 >>0){var fr=tr-w|0;Se[vi+12>>2]=fr;var _r=Me[vi+24>>2],sr=_r;Se[vi+24>>2]=sr+w|0,Se[w+(sr+4)>>2]=1|fr,Se[_r+4>>2]=3|w;var d=_r+8|0}else var nr=aa(w),d=nr}else{var or=vr-w|0,lr=Me[vi+20>>2];if(or>>>0>15){var br=lr;Se[vi+20>>2]=br+w|0,Se[vi+8>>2]=or,Se[w+(br+4)>>2]=1|or,Se[br+vr>>2]=or,Se[lr+4>>2]=3|w}else{Se[vi+8>>2]=0,Se[vi+20>>2]=0,Se[lr+4>>2]=3|vr;var kr=vr+(lr+4)|0,ur=1|Se[kr>>2];Se[kr>>2]=ur}var d=lr+8|0}}var d;return d}function ra(r){var a,e,i,v=Se[vi+4>>2],t=(v&-v)-1|0,f=t>>>12&16,_=t>>>(f>>>0),s=_>>>5&8,n=_>>>(s>>>0),o=n>>>2&4,l=n>>>(o>>>0),b=l>>>1&2,k=l>>>(b>>>0),u=k>>>1&1,c=Me[vi+((s|f|o|b|u)+(k>>>(u>>>0))<<2)+304>>2],h=c,e=h>>2,d=(Se[c+4>>2]&-8)-r|0;r:for(;;)for(var d,h,w=h;;){var w,p=Se[w+16>>2];if(0==(0|p)){var E=Se[w+20>>2];if(0==(0|E))break r;var A=E}else var A=p;var A,g=(Se[A+4>>2]&-8)-r|0;if(g>>>0 >>0){var h=A,e=h>>2,d=g;continue r}var w=A}var y=h,m=Me[vi+16>>2],S=y>>>0 >>0;do if(!S){var M=y+r|0,C=M;if(y>>>0>=M>>>0)break;var R=Me[e+6],T=Me[e+3],O=(0|T)==(0|h);do if(O){var N=h+20|0,I=Se[N>>2];if(0==(0|I)){var P=h+16|0,D=Se[P>>2];if(0==(0|D)){var L=0,a=L>>2;break}var F=P,X=D}else{var F=N,X=I;i=14}for(;;){var X,F,j=X+20|0,U=Se[j>>2];if(0==(0|U)){var x=X+16|0,z=Me[x>>2];if(0==(0|z))break;var F=x,X=z}else var F=j,X=U}if(F>>>0 >>0)throw Ka(),"Reached an unreachable!";Se[F>>2]=0;var L=X,a=L>>2}else{var V=Me[e+2];if(V>>>0 >>0)throw Ka(),"Reached an unreachable!";Se[V+12>>2]=T,Se[T+8>>2]=V;var L=T,a=L>>2}while(0);var L,B=0==(0|R);r:do if(!B){var H=h+28|0,K=(Se[H>>2]<<2)+vi+304|0,Y=(0|h)==(0|Se[K>>2]);do{if(Y){if(Se[K>>2]=L,0!=(0|L))break;var G=Se[vi+4>>2]&(1< >2]^-1);Se[vi+4>>2]=G;break r}if(R>>>0 >2]>>>0)throw Ka(),"Reached an unreachable!";var W=R+16|0;if((0|Se[W>>2])==(0|h)?Se[W>>2]=L:Se[R+20>>2]=L,0==(0|L))break r}while(0);if(L>>>0 >2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=R;var Z=Me[e+4];if(0!=(0|Z)){if(Z>>>0 >2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=Z,Se[Z+24>>2]=L}var Q=Me[e+5];if(0==(0|Q))break;if(Q>>>0