"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 io?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(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;e255&&(i&=255),a.push(String.fromCharCode(i))}return a.join("")}function A(r,a,e){for(var i=0;i255&&(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>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=Q,Se[Q+24>>2]=L}while(0);if(d>>>0<16){var q=d+r|0;Se[e+1]=3|q;var $=q+(y+4)|0,J=1|Se[$>>2];Se[$>>2]=J}else{Se[e+1]=3|r,Se[r+(y+4)>>2]=1|d,Se[y+d+r>>2]=d;var rr=Me[vi+8>>2];if(0!=(0|rr)){var ar=Me[vi+20>>2],er=rr>>>2&1073741822,ir=(er<<2)+vi+40|0,vr=Me[vi>>2],tr=1<<(rr>>>3),fr=0==(vr&tr|0);do{if(!fr){var _r=(er+2<<2)+vi+40|0,sr=Me[_r>>2];if(sr>>>0>=Me[vi+16>>2]>>>0){var nr=sr,or=_r;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=vr|tr;var nr=ir,or=(er+2<<2)+vi+40|0}while(0);var or,nr;Se[or>>2]=ar,Se[nr+12>>2]=ar,Se[ar+8>>2]=nr,Se[ar+12>>2]=ir}Se[vi+8>>2]=d,Se[vi+20>>2]=C}return h+8|0}while(0);throw Ka(),"Reached an unreachable!"}function aa(r){var a,e;0==(0|Se[ti>>2])&&ba();var i=0==(4&Se[vi+440>>2]|0);do{if(i){var v=Se[vi+24>>2],t=0==(0|v);do{if(!t){var f=v,_=ua(f);if(0==(0|_)){e=6;break}var s=Se[ti+8>>2],n=r+47-Se[vi+12>>2]+s&-s;if(n>>>0>=2147483647){e=14;break}var o=re(n);if((0|o)==(Se[_>>2]+Se[_+4>>2]|0)){var l=o,b=n,k=o;e=13;break}var u=o,c=n;e=15;break}e=6}while(0);do if(6==e){var h=re(0);if((0|h)==-1){e=14;break}var d=Se[ti+8>>2],w=d+(r+47)&-d,p=h,E=Se[ti+4>>2],A=E-1|0;if(0==(A&p|0))var g=w;else var g=w-p+(A+p&-E)|0;var g;if(g>>>0>=2147483647){e=14;break}var y=re(g);if((0|y)==(0|h)){var l=h,b=g,k=y;e=13;break}var u=y,c=g;e=15;break}while(0);if(13==e){var k,b,l;if((0|l)!=-1){var m=b,S=l;e=26;break}var u=k,c=b}else if(14==e){var M=4|Se[vi+440>>2];Se[vi+440>>2]=M,e=23;break}var c,u,C=0|-c,R=(0|u)!=-1&c>>>0<2147483647;do{if(R){if(c>>>0>=(r+48|0)>>>0){var T=c;e=21;break}var O=Se[ti+8>>2],N=r+47-c+O&-O;if(N>>>0>=2147483647){var T=c;e=21;break}var I=re(N);if((0|I)==-1){re(C);e=22;break}var T=N+c|0;e=21;break}var T=c;e=21}while(0);if(21==e){var T;if((0|u)!=-1){var m=T,S=u;e=26;break}}var P=4|Se[vi+440>>2];Se[vi+440>>2]=P,e=23;break}e=23}while(0);do if(23==e){var D=Se[ti+8>>2],L=D+(r+47)&-D;if(L>>>0>=2147483647){e=49;break}var F=re(L),X=re(0);if(!((0|X)!=-1&(0|F)!=-1&F>>>0>>0)){e=49;break}var j=X-F|0;if(j>>>0<=(r+40|0)>>>0|(0|F)==-1){e=49;break}var m=j,S=F;e=26;break}while(0);r:do if(26==e){var S,m,U=Se[vi+432>>2]+m|0;Se[vi+432>>2]=U,U>>>0>Me[vi+436>>2]>>>0&&(Se[vi+436>>2]=U);var x=Me[vi+24>>2],z=0==(0|x);a:do if(z){var V=Me[vi+16>>2];0==(0|V)|S>>>0>>0&&(Se[vi+16>>2]=S),Se[vi+444>>2]=S,Se[vi+448>>2]=m,Se[vi+456>>2]=0;var B=Se[ti>>2];Se[vi+36>>2]=B,Se[vi+32>>2]=-1,ha(),ca(S,m-40|0)}else{for(var H=vi+444|0,a=H>>2;;){var H;if(0==(0|H))break;var K=Me[a],Y=H+4|0,G=Me[Y>>2],W=K+G|0;if((0|S)==(0|W)){if(0!=(8&Se[a+3]|0))break;var Z=x;if(!(Z>>>0>=K>>>0&Z>>>0>>0))break;Se[Y>>2]=G+m|0;var Q=Se[vi+24>>2],q=Se[vi+12>>2]+m|0;ca(Q,q);break a}var H=Se[a+2],a=H>>2}S>>>0>2]>>>0&&(Se[vi+16>>2]=S);for(var $=S+m|0,J=vi+444|0;;){var J;if(0==(0|J))break;var rr=0|J,ar=Me[rr>>2];if((0|ar)==(0|$)){if(0!=(8&Se[J+12>>2]|0))break;Se[rr>>2]=S;var er=J+4|0,ir=Se[er>>2]+m|0;Se[er>>2]=ir;var vr=da(S,ar,r),tr=vr;e=50;break r}var J=Se[J+8>>2]}Ma(S,m)}while(0);var fr=Me[vi+12>>2];if(fr>>>0<=r>>>0){e=49;break}var _r=fr-r|0;Se[vi+12>>2]=_r;var sr=Me[vi+24>>2],nr=sr;Se[vi+24>>2]=nr+r|0,Se[r+(nr+4)>>2]=1|_r,Se[sr+4>>2]=3|r;var tr=sr+8|0;e=50;break}while(0);if(49==e){var or=Je();Se[or>>2]=12;var tr=0}var tr;return tr}function ea(r){var a,e,i,v,t,f,_=r>>2,s=0|-r,n=r>>>8,o=0==(0|n);do if(o)var l=0;else{if(r>>>0>16777215){var l=31;break}var b=(n+1048320|0)>>>16&8,k=n<>>16&4,c=k<>>16&2,d=14-(u|b|h)+(c<>>15)|0,l=r>>>((d+7|0)>>>0)&1|d<<1}while(0);var l,w=Me[vi+(l<<2)+304>>2],p=0==(0|w);r:do if(p)var E=0,A=s,g=0;else{if(31==(0|l))var y=0;else var y=25-(l>>>1)|0;for(var y,m=0,S=s,M=w,t=M>>2,C=r<>>0>>0){if((0|T)==(0|r)){var E=M,A=O,g=M;break r}var N=M,I=O}else var N=m,I=S;var I,N,P=Me[t+5],D=Me[((C>>>31<<2)+16>>2)+t],L=0==(0|P)|(0|P)==(0|D)?R:P;if(0==(0|D)){var E=N,A=I,g=L;break r}var m=N,S=I,M=D,t=M>>2,C=C<<1,R=L}}while(0);var g,A,E,F=0==(0|g)&0==(0|E);do if(F){var X=2<>2]&(X|-X);if(0==(0|j)){var U=g;break}var x=(j&-j)-1|0,z=x>>>12&16,V=x>>>(z>>>0),B=V>>>5&8,H=V>>>(B>>>0),K=H>>>2&4,Y=H>>>(K>>>0),G=Y>>>1&2,W=Y>>>(G>>>0),Z=W>>>1&1,U=Se[vi+((B|z|K|G|Z)+(W>>>(Z>>>0))<<2)+304>>2]}else var U=g;while(0);var U,Q=0==(0|U);r:do if(Q)var q=A,$=E,v=$>>2;else for(var J=U,i=J>>2,rr=A,ar=E;;){var ar,rr,J,er=(Se[i+1]&-8)-r|0,ir=er>>>0>>0,vr=ir?er:rr,tr=ir?J:ar,fr=Me[i+4];if(0==(0|fr)){var _r=Me[i+5];if(0==(0|_r)){var q=vr,$=tr,v=$>>2;break r}var J=_r,i=J>>2,rr=vr,ar=tr}else var J=fr,i=J>>2,rr=vr,ar=tr}while(0);var $,q,sr=0==(0|$);r:do{if(!sr){if(q>>>0>=(Se[vi+8>>2]-r|0)>>>0){var nr=0;break}var or=$,e=or>>2,lr=Me[vi+16>>2],br=or>>>0>>0;do if(!br){var kr=or+r|0,ur=kr;if(or>>>0>=kr>>>0)break;var cr=Me[v+6],hr=Me[v+3],dr=(0|hr)==(0|$);do if(dr){var wr=$+20|0,pr=Se[wr>>2];if(0==(0|pr)){var Er=$+16|0,Ar=Se[Er>>2];if(0==(0|Ar)){var gr=0,a=gr>>2;break}var yr=Er,mr=Ar}else{var yr=wr,mr=pr;f=28}for(;;){var mr,yr,Sr=mr+20|0,Mr=Se[Sr>>2];if(0==(0|Mr)){var Cr=mr+16|0,Rr=Me[Cr>>2];if(0==(0|Rr))break;var yr=Cr,mr=Rr}else var yr=Sr,mr=Mr}if(yr>>>0>>0)throw Ka(),"Reached an unreachable!";Se[yr>>2]=0;var gr=mr,a=gr>>2}else{var Tr=Me[v+2];if(Tr>>>0>>0)throw Ka(),"Reached an unreachable!";Se[Tr+12>>2]=hr,Se[hr+8>>2]=Tr;var gr=hr,a=gr>>2}while(0);var gr,Or=0==(0|cr);a:do if(!Or){var Nr=$+28|0,Ir=(Se[Nr>>2]<<2)+vi+304|0,Pr=(0|$)==(0|Se[Ir>>2]);do{if(Pr){if(Se[Ir>>2]=gr,0!=(0|gr))break;var Dr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=Dr;break a}if(cr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var Lr=cr+16|0;if((0|Se[Lr>>2])==(0|$)?Se[Lr>>2]=gr:Se[cr+20>>2]=gr,0==(0|gr))break a}while(0);if(gr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=cr;var Fr=Me[v+4];if(0!=(0|Fr)){if(Fr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=Fr,Se[Fr+24>>2]=gr}var Xr=Me[v+5];if(0==(0|Xr))break;if(Xr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=Xr,Se[Xr+24>>2]=gr}while(0);var jr=q>>>0<16;a:do if(jr){var Ur=q+r|0;Se[v+1]=3|Ur;var xr=Ur+(or+4)|0,zr=1|Se[xr>>2];Se[xr>>2]=zr}else if(Se[v+1]=3|r,Se[_+(e+1)]=1|q,Se[(q>>2)+e+_]=q,q>>>0<256){var Vr=q>>>2&1073741822,Br=(Vr<<2)+vi+40|0,Hr=Me[vi>>2],Kr=1<<(q>>>3),Yr=0==(Hr&Kr|0);do{if(!Yr){var Gr=(Vr+2<<2)+vi+40|0,Wr=Me[Gr>>2];if(Wr>>>0>=Me[vi+16>>2]>>>0){var Zr=Wr,Qr=Gr;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Hr|Kr;var Zr=Br,Qr=(Vr+2<<2)+vi+40|0}while(0);var Qr,Zr;Se[Qr>>2]=ur,Se[Zr+12>>2]=ur,Se[_+(e+2)]=Zr,Se[_+(e+3)]=Br}else{var qr=kr,$r=q>>>8,Jr=0==(0|$r);do if(Jr)var ra=0;else{if(q>>>0>16777215){var ra=31;break}var aa=($r+1048320|0)>>>16&8,ea=$r<>>16&4,va=ea<>>16&2,fa=14-(ia|aa|ta)+(va<>>15)|0,ra=q>>>((fa+7|0)>>>0)&1|fa<<1}while(0);var ra,_a=(ra<<2)+vi+304|0;Se[_+(e+7)]=ra;var sa=r+(or+16)|0;Se[_+(e+5)]=0,Se[sa>>2]=0;var na=Se[vi+4>>2],oa=1<>2]=la,Se[_a>>2]=qr,Se[_+(e+6)]=_a,Se[_+(e+3)]=qr,Se[_+(e+2)]=qr}else{if(31==(0|ra))var ba=0;else var ba=25-(ra>>>1)|0;for(var ba,ka=q<>2];;){var ua,ka;if((Se[ua+4>>2]&-8|0)==(0|q)){var ca=ua+8|0,ha=Me[ca>>2],da=Me[vi+16>>2],wa=ua>>>0>>0;do if(!wa){if(ha>>>0>>0)break;Se[ha+12>>2]=qr,Se[ca>>2]=qr,Se[_+(e+2)]=ha,Se[_+(e+3)]=ua,Se[_+(e+6)]=0;break a}while(0);throw Ka(),"Reached an unreachable!"}var pa=(ka>>>31<<2)+ua+16|0,Ea=Me[pa>>2];if(0==(0|Ea)){if(pa>>>0>=Me[vi+16>>2]>>>0){Se[pa>>2]=qr,Se[_+(e+6)]=ua,Se[_+(e+3)]=qr,Se[_+(e+2)]=qr;break a}throw Ka(),"Reached an unreachable!"}var ka=ka<<1,ua=Ea}}}while(0);var nr=$+8|0;break r}while(0);throw Ka(),"Reached an unreachable!"}var nr=0}while(0);var nr;return nr}function ia(r){var a;0==(0|Se[ti>>2])&&ba();var e=r>>>0<4294967232;r:do if(e){var i=Me[vi+24>>2];if(0==(0|i)){var v=0;break}var t=Me[vi+12>>2],f=t>>>0>(r+40|0)>>>0;do if(f){var _=Me[ti+8>>2],s=-40-r-1+t+_|0,n=Math.floor((s>>>0)/(_>>>0)),o=(n-1)*_|0,l=i,b=ua(l);if(0!=(8&Se[b+12>>2]|0))break;var k=re(0),a=(b+4|0)>>2;if((0|k)!=(Se[b>>2]+Se[a]|0))break;var u=o>>>0>2147483646?-2147483648-_|0:o,c=0|-u,h=re(c),d=re(0);if(!((0|h)!=-1&d>>>0>>0))break;var w=k-d|0;if((0|k)==(0|d))break;var p=Se[a]-w|0;Se[a]=p;var E=Se[vi+432>>2]-w|0;Se[vi+432>>2]=E;var A=Se[vi+24>>2],g=Se[vi+12>>2]-w|0;ca(A,g);var v=(0|k)!=(0|d);break r}while(0);if(Me[vi+12>>2]>>>0<=Me[vi+28>>2]>>>0){var v=0;break}Se[vi+28>>2]=-1;var v=0}else var v=0;while(0);var v;return 1&v}function va(r){var a,e,i,v,t,f,_,s=r>>2,n=0==(0|r);r:do if(!n){var o=r-8|0,l=o,b=Me[vi+16>>2],k=o>>>0>>0;a:do if(!k){var u=Me[r-4>>2],c=3&u;if(1==(0|c))break;var h=u&-8,f=h>>2,d=r+(h-8)|0,w=d,p=0==(1&u|0);e:do if(p){var E=Me[o>>2];if(0==(0|c))break r;var A=-8-E|0,t=A>>2,g=r+A|0,y=g,m=E+h|0;if(g>>>0>>0)break a;if((0|y)==(0|Se[vi+20>>2])){var v=(r+(h-4)|0)>>2;if(3!=(3&Se[v]|0)){var S=y,i=S>>2,M=m;break}Se[vi+8>>2]=m;var C=Se[v]&-2;Se[v]=C,Se[t+(s+1)]=1|m,Se[d>>2]=m;break r}if(E>>>0<256){var R=Me[t+(s+2)],T=Me[t+(s+3)];if((0|R)!=(0|T)){var O=((E>>>2&1073741822)<<2)+vi+40|0,N=(0|R)!=(0|O)&R>>>0>>0;do if(!N){if(!((0|T)==(0|O)|T>>>0>=b>>>0))break;Se[R+12>>2]=T,Se[T+8>>2]=R;var S=y,i=S>>2,M=m;break e}while(0);throw Ka(),"Reached an unreachable!"}var I=Se[vi>>2]&(1<<(E>>>3)^-1);Se[vi>>2]=I;var S=y,i=S>>2,M=m}else{var P=g,D=Me[t+(s+6)],L=Me[t+(s+3)],F=(0|L)==(0|P);do if(F){var X=A+(r+20)|0,j=Se[X>>2];if(0==(0|j)){var U=A+(r+16)|0,x=Se[U>>2];if(0==(0|x)){var z=0,e=z>>2;break}var V=U,B=x}else{var V=X,B=j;_=21}for(;;){var B,V,H=B+20|0,K=Se[H>>2];if(0==(0|K)){var Y=B+16|0,G=Me[Y>>2];if(0==(0|G))break;var V=Y,B=G}else var V=H,B=K}if(V>>>0>>0)throw Ka(),"Reached an unreachable!";Se[V>>2]=0;var z=B,e=z>>2}else{var W=Me[t+(s+2)];if(W>>>0>>0)throw Ka(),"Reached an unreachable!";Se[W+12>>2]=L,Se[L+8>>2]=W;var z=L,e=z>>2}while(0);var z;if(0==(0|D)){var S=y,i=S>>2,M=m;break}var Z=A+(r+28)|0,Q=(Se[Z>>2]<<2)+vi+304|0,q=(0|P)==(0|Se[Q>>2]);do{if(q){if(Se[Q>>2]=z,0!=(0|z))break;var $=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=$;var S=y,i=S>>2,M=m;break e}if(D>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var J=D+16|0;if((0|Se[J>>2])==(0|P)?Se[J>>2]=z:Se[D+20>>2]=z,0==(0|z)){var S=y,i=S>>2,M=m;break e}}while(0);if(z>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+6]=D;var rr=Me[t+(s+4)];if(0!=(0|rr)){if(rr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+4]=rr,Se[rr+24>>2]=z}var ar=Me[t+(s+5)];if(0==(0|ar)){var S=y,i=S>>2,M=m;break}if(ar>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[e+5]=ar,Se[ar+24>>2]=z;var S=y,i=S>>2,M=m}}else var S=l,i=S>>2,M=h;while(0);var M,S,er=S;if(er>>>0>=d>>>0)break;var ir=r+(h-4)|0,vr=Me[ir>>2];if(0==(1&vr|0))break;var tr=0==(2&vr|0);do{if(tr){if((0|w)==(0|Se[vi+24>>2])){var fr=Se[vi+12>>2]+M|0;Se[vi+12>>2]=fr,Se[vi+24>>2]=S;var _r=1|fr;if(Se[i+1]=_r,(0|S)==(0|Se[vi+20>>2])&&(Se[vi+20>>2]=0,Se[vi+8>>2]=0),fr>>>0<=Me[vi+28>>2]>>>0)break r;ia(0);break r}if((0|w)==(0|Se[vi+20>>2])){var sr=Se[vi+8>>2]+M|0;Se[vi+8>>2]=sr,Se[vi+20>>2]=S;var nr=1|sr;Se[i+1]=nr;var or=er+sr|0;Se[or>>2]=sr;break r}var lr=(vr&-8)+M|0,br=vr>>>3,kr=vr>>>0<256;e:do if(kr){var ur=Me[s+f],cr=Me[((4|h)>>2)+s];if((0|ur)!=(0|cr)){var hr=((vr>>>2&1073741822)<<2)+vi+40|0,dr=(0|ur)==(0|hr);do{if(!dr){if(ur>>>0>2]>>>0){_=66;break}_=63;break}_=63}while(0);do if(63==_){if((0|cr)!=(0|hr)&&cr>>>0>2]>>>0)break;Se[ur+12>>2]=cr,Se[cr+8>>2]=ur;break e}while(0);throw Ka(),"Reached an unreachable!"}var wr=Se[vi>>2]&(1<>2]=wr}else{var pr=d,Er=Me[f+(s+4)],Ar=Me[((4|h)>>2)+s],gr=(0|Ar)==(0|pr);do if(gr){var yr=h+(r+12)|0,mr=Se[yr>>2];if(0==(0|mr)){var Sr=h+(r+8)|0,Mr=Se[Sr>>2];if(0==(0|Mr)){var Cr=0,a=Cr>>2;break}var Rr=Sr,Tr=Mr}else{var Rr=yr,Tr=mr;_=73}for(;;){var Tr,Rr,Or=Tr+20|0,Nr=Se[Or>>2];if(0==(0|Nr)){var Ir=Tr+16|0,Pr=Me[Ir>>2];if(0==(0|Pr))break;var Rr=Ir,Tr=Pr}else var Rr=Or,Tr=Nr}if(Rr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Rr>>2]=0;var Cr=Tr,a=Cr>>2}else{var Dr=Me[s+f];if(Dr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Dr+12>>2]=Ar, Se[Ar+8>>2]=Dr;var Cr=Ar,a=Cr>>2}while(0);var Cr;if(0==(0|Er))break;var Lr=h+(r+20)|0,Fr=(Se[Lr>>2]<<2)+vi+304|0,Xr=(0|pr)==(0|Se[Fr>>2]);do{if(Xr){if(Se[Fr>>2]=Cr,0!=(0|Cr))break;var jr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=jr;break e}if(Er>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var Ur=Er+16|0;if((0|Se[Ur>>2])==(0|pr)?Se[Ur>>2]=Cr:Se[Er+20>>2]=Cr,0==(0|Cr))break e}while(0);if(Cr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=Er;var xr=Me[f+(s+2)];if(0!=(0|xr)){if(xr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+4]=xr,Se[xr+24>>2]=Cr}var zr=Me[f+(s+3)];if(0==(0|zr))break;if(zr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+5]=zr,Se[zr+24>>2]=Cr}while(0);if(Se[i+1]=1|lr,Se[er+lr>>2]=lr,(0|S)!=(0|Se[vi+20>>2])){var Vr=lr;break}Se[vi+8>>2]=lr;break r}Se[ir>>2]=vr&-2,Se[i+1]=1|M,Se[er+M>>2]=M;var Vr=M}while(0);var Vr;if(Vr>>>0<256){var Br=Vr>>>2&1073741822,Hr=(Br<<2)+vi+40|0,Kr=Me[vi>>2],Yr=1<<(Vr>>>3),Gr=0==(Kr&Yr|0);do{if(!Gr){var Wr=(Br+2<<2)+vi+40|0,Zr=Me[Wr>>2];if(Zr>>>0>=Me[vi+16>>2]>>>0){var Qr=Zr,qr=Wr;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=Kr|Yr;var Qr=Hr,qr=(Br+2<<2)+vi+40|0}while(0);var qr,Qr;Se[qr>>2]=S,Se[Qr+12>>2]=S,Se[i+2]=Qr,Se[i+3]=Hr;break r}var $r=S,Jr=Vr>>>8,ra=0==(0|Jr);do if(ra)var aa=0;else{if(Vr>>>0>16777215){var aa=31;break}var ea=(Jr+1048320|0)>>>16&8,va=Jr<>>16&4,_a=va<>>16&2,na=14-(fa|ea|sa)+(_a<>>15)|0,aa=Vr>>>((na+7|0)>>>0)&1|na<<1}while(0);var aa,oa=(aa<<2)+vi+304|0;Se[i+7]=aa,Se[i+5]=0,Se[i+4]=0;var la=Se[vi+4>>2],ba=1<>2]=ua,Se[oa>>2]=$r,Se[i+6]=oa,Se[i+3]=S,Se[i+2]=S}else{if(31==(0|aa))var ca=0;else var ca=25-(aa>>>1)|0;for(var ca,ha=Vr<>2];;){var da,ha;if((Se[da+4>>2]&-8|0)==(0|Vr)){var wa=da+8|0,pa=Me[wa>>2],Ea=Me[vi+16>>2],Aa=da>>>0>>0;do if(!Aa){if(pa>>>0>>0)break;Se[pa+12>>2]=$r,Se[wa>>2]=$r,Se[i+2]=pa,Se[i+3]=da,Se[i+6]=0;break e}while(0);throw Ka(),"Reached an unreachable!"}var ga=(ha>>>31<<2)+da+16|0,ya=Me[ga>>2];if(0==(0|ya)){if(ga>>>0>=Me[vi+16>>2]>>>0){Se[ga>>2]=$r,Se[i+6]=da,Se[i+3]=S,Se[i+2]=S;break e}throw Ka(),"Reached an unreachable!"}var ha=ha<<1,da=ya}}while(0);var ma=Se[vi+32>>2]-1|0;if(Se[vi+32>>2]=ma,0!=(0|ma))break r;ta();break r}while(0);throw Ka(),"Reached an unreachable!"}while(0)}function ta(){var r=Se[vi+452>>2],a=0==(0|r);r:do if(!a)for(var e=r;;){var e,i=Se[e+8>>2];if(0==(0|i))break r;var e=i}while(0);Se[vi+32>>2]=-1}function fa(r,a){if(0==(0|r))var e=Jr(a),i=e;else var v=la(r,a),i=v;var i;return i}function _a(r,a){var e,i=r>>>0<9;do if(i)var v=Jr(a),t=v;else{var f=r>>>0<16?16:r,_=0==(f-1&f|0);r:do if(_)var s=f;else{if(f>>>0<=16){var s=16;break}for(var n=16;;){var n,o=n<<1;if(o>>>0>=f>>>0){var s=o;break r}var n=o}}while(0);var s;if((-64-s|0)>>>0>a>>>0){if(a>>>0<11)var l=16;else var l=a+11&-8;var l,b=Jr(l+(s+12)|0);if(0==(0|b)){var t=0;break}var k=b-8|0;if(0==((b>>>0)%(s>>>0)|0))var u=k,c=0;else{var h=b+(s-1)&-s,d=h-8|0,w=k;if((d-w|0)>>>0>15)var p=d;else var p=h+(s-8)|0;var p,E=p-w|0,e=(b-4|0)>>2,A=Se[e],g=(A&-8)-E|0;if(0==(3&A|0)){var y=Se[k>>2]+E|0;Se[p>>2]=y,Se[p+4>>2]=g;var u=p,c=0}else{var m=p+4|0,S=g|1&Se[m>>2]|2;Se[m>>2]=S;var M=g+(p+4)|0,C=1|Se[M>>2];Se[M>>2]=C;var R=E|1&Se[e]|2;Se[e]=R;var T=b+(E-4)|0,O=1|Se[T>>2];Se[T>>2]=O;var u=p,c=b}}var c,u,N=u+4|0,I=Me[N>>2],P=0==(3&I|0);do if(P)var D=0;else{var L=I&-8;if(L>>>0<=(l+16|0)>>>0){var D=0;break}var F=L-l|0;Se[N>>2]=l|1&I|2,Se[u+(4|l)>>2]=3|F;var X=u+(4|L)|0,j=1|Se[X>>2];Se[X>>2]=j;var D=l+(u+8)|0}while(0);var D;0!=(0|c)&&va(c),0!=(0|D)&&va(D);var t=u+8|0}else{var U=Je();Se[U>>2]=12;var t=0}}while(0);var t;return t}function sa(r,a,e,i){var v,t;0==(0|Se[ti>>2])&&ba();var f=0==(0|i),_=0==(0|r);do{if(f){if(_){var s=Jr(0),n=s;t=30;break}var o=r<<2;if(o>>>0<11){var l=0,b=16;t=9;break}var l=0,b=o+11&-8;t=9;break}if(_){var n=i;t=30;break}var l=i,b=0;t=9;break}while(0);do if(9==t){var b,l,k=0==(1&e|0);r:do if(k){if(_){var u=0,c=0;break}for(var h=0,d=0;;){var d,h,w=Me[a+(d<<2)>>2];if(w>>>0<11)var p=16;else var p=w+11&-8;var p,E=p+h|0,A=d+1|0;if((0|A)==(0|r)){var u=0,c=E;break r}var h=E,d=A}}else{var g=Me[a>>2];if(g>>>0<11)var y=16;else var y=g+11&-8;var y,u=y,c=y*r|0}while(0);var c,u,m=Jr(b-4+c|0);if(0==(0|m)){var n=0;break}var S=m-8|0,M=Se[m-4>>2]&-8;if(0!=(2&e|0)){var C=-4-b+M|0;Fa(m,0,C,1)}if(0==(0|l)){var R=m+c|0,T=M-c|3;Se[m+(c-4)>>2]=T;var O=R,v=O>>2,N=c}else var O=l,v=O>>2,N=M;var N,O;Se[v]=m;var I=r-1|0,P=0==(0|I);r:do if(P)var D=S,L=N;else if(0==(0|u))for(var F=S,X=N,j=0;;){var j,X,F,U=Me[a+(j<<2)>>2];if(U>>>0<11)var x=16;else var x=U+11&-8;var x,z=X-x|0;Se[F+4>>2]=3|x;var V=F+x|0,B=j+1|0;if(Se[(B<<2>>2)+v]=x+(F+8)|0,(0|B)==(0|I)){var D=V,L=z;break r}var F=V,X=z,j=B}else for(var H=3|u,K=u+8|0,Y=S,G=N,W=0;;){var W,G,Y,Z=G-u|0;Se[Y+4>>2]=H;var Q=Y+u|0,q=W+1|0;if(Se[(q<<2>>2)+v]=Y+K|0,(0|q)==(0|I)){var D=Q,L=Z;break r}var Y=Q,G=Z,W=q}while(0);var L,D;Se[D+4>>2]=3|L;var n=O}while(0);var n;return n}function na(r){var a=r>>2;0==(0|Se[ti>>2])&&ba();var e=Me[vi+24>>2];if(0==(0|e))var i=0,v=0,t=0,f=0,_=0,s=0,n=0;else{for(var o=Me[vi+12>>2],l=o+40|0,b=vi+444|0,k=l,u=l,c=1;;){var c,u,k,b,h=Me[b>>2],d=h+8|0;if(0==(7&d|0))var w=0;else var w=7&-d;for(var w,p=b+4|0,E=h+w|0,A=c,g=u,y=k;;){var y,g,A,E;if(E>>>0>>0)break;if(E>>>0>=(h+Se[p>>2]|0)>>>0|(0|E)==(0|e))break;var m=Se[E+4>>2];if(7==(0|m))break;var S=m&-8,M=S+y|0;if(1==(3&m|0))var C=A+1|0,R=S+g|0;else var C=A,R=g;var R,C,E=E+S|0,A=C,g=R,y=M}var T=Me[b+8>>2];if(0==(0|T))break;var b=T,k=y,u=g,c=A}var O=Se[vi+432>>2],i=y,v=A,t=o,f=g,_=O-y|0,s=Se[vi+436>>2],n=O-g|0}var n,s,_,f,t,v,i;Se[a]=i,Se[a+1]=v,Se[a+2]=0,Se[a+3]=0,Se[a+4]=_,Se[a+5]=s,Se[a+6]=0,Se[a+7]=n,Se[a+8]=f,Se[a+9]=t}function oa(){0==(0|Se[ti>>2])&&ba();var r=Me[vi+24>>2],a=0==(0|r);r:do if(a)var e=0,i=0,v=0;else for(var t=Se[vi+436>>2],f=Me[vi+432>>2],_=vi+444|0,s=f-40-Se[vi+12>>2]|0;;){var s,_,n=Me[_>>2],o=n+8|0;if(0==(7&o|0))var l=0;else var l=7&-o;for(var l,b=_+4|0,k=n+l|0,u=s;;){var u,k;if(k>>>0>>0)break;if(k>>>0>=(n+Se[b>>2]|0)>>>0|(0|k)==(0|r))break;var c=Se[k+4>>2];if(7==(0|c))break;var h=c&-8,d=1==(3&c|0)?h:0,w=u-d|0,k=k+h|0,u=w}var p=Me[_+8>>2];if(0==(0|p)){var e=t,i=f,v=u;break r}var _=p,s=u}while(0);var v,i,e,E=Se[Se[qe>>2]+12>>2],A=(Qa(E,0|He.__str339,(ne=Oe,Oe+=4,Se[ne>>2]=e,ne)),Se[Se[qe>>2]+12>>2]),g=(Qa(A,0|He.__str1340,(ne=Oe,Oe+=4,Se[ne>>2]=i,ne)),Se[Se[qe>>2]+12>>2]);Qa(g,0|He.__str2341,(ne=Oe,Oe+=4,Se[ne>>2]=v,ne))}function la(r,a){var e,i,v,t=a>>>0>4294967231;r:do{if(!t){var f=r-8|0,_=f,i=(r-4|0)>>2,s=Me[i],n=s&-8,o=n-8|0,l=r+o|0,b=f>>>0>2]>>>0;do if(!b){var k=3&s;if(!(1!=(0|k)&(0|o)>-8))break;var e=(r+(n-4)|0)>>2;if(0==(1&Se[e]|0))break;if(a>>>0<11)var u=16;else var u=a+11&-8;var u,c=0==(0|k);do{if(c){var h=ka(_,u),d=0,w=h;v=17;break}if(n>>>0>>0){if((0|l)!=(0|Se[vi+24>>2])){v=21;break}var p=Se[vi+12>>2]+n|0;if(p>>>0<=u>>>0){v=21;break}var E=p-u|0,A=r+(u-8)|0;Se[i]=u|1&s|2;var g=1|E;Se[r+(u-4)>>2]=g,Se[vi+24>>2]=A,Se[vi+12>>2]=E;var d=0,w=_;v=17;break}var y=n-u|0;if(y>>>0<=15){var d=0,w=_;v=17;break}Se[i]=u|1&s|2,Se[r+(u-4)>>2]=3|y;var m=1|Se[e];Se[e]=m;var d=r+u|0,w=_;v=17;break}while(0);do if(17==v){var w,d;if(0==(0|w))break;0!=(0|d)&&va(d);var S=w+8|0;break r}while(0);var M=Jr(a);if(0==(0|M)){var S=0;break r}var C=0==(3&Se[i]|0)?8:4,R=n-C|0,T=R>>>0>>0?R:a;Pa(M,r,T,1),va(r);var S=M;break r}while(0);throw Ka(),"Reached an unreachable!"}var O=Je();Se[O>>2]=12;var S=0}while(0);var S;return S}function ba(){if(0==(0|Se[ti>>2])){var r=qa(8);if(0!=(r-1&r|0))throw Ka(),"Reached an unreachable!";Se[ti+8>>2]=r,Se[ti+4>>2]=r,Se[ti+12>>2]=-1,Se[ti+16>>2]=2097152,Se[ti+20>>2]=0,Se[vi+440>>2]=0;var a=$a(0);Se[ti>>2]=a&-16^1431655768}}function ka(r,a){var e=Se[r+4>>2]&-8,i=a>>>0<256;do if(i)var v=0;else{if(e>>>0>=(a+4|0)>>>0&&(e-a|0)>>>0<=Se[ti+8>>2]<<1>>>0){var v=r;break}var v=0}while(0);var v;return v}function ua(r){for(var a,e=vi+444|0,a=e>>2;;){var e,i=Me[a];if(i>>>0<=r>>>0&&(i+Se[a+1]|0)>>>0>r>>>0){var v=e;break}var t=Me[a+2];if(0==(0|t)){var v=0;break}var e=t,a=e>>2}var v;return v}function ca(r,a){var e=r,i=r+8|0;if(0==(7&i|0))var v=0;else var v=7&-i;var v,t=a-v|0;Se[vi+24>>2]=e+v|0,Se[vi+12>>2]=t,Se[v+(e+4)>>2]=1|t,Se[a+(e+4)>>2]=40;var f=Se[ti+16>>2];Se[vi+28>>2]=f}function ha(){for(var r=0;;){var r,a=r<<1,e=(a<<2)+vi+40|0;Se[vi+(a+3<<2)+40>>2]=e,Se[vi+(a+2<<2)+40>>2]=e;var i=r+1|0;if(32==(0|i))break;var r=i}}function da(r,a,e){var i,v,t,f,_=a>>2,s=r>>2,n=r+8|0;if(0==(7&n|0))var o=0;else var o=7&-n;var o,l=a+8|0;if(0==(7&l|0))var b=0,t=b>>2;else var b=7&-l,t=b>>2;var b,k=a+b|0,u=k,c=o+e|0,v=c>>2,h=r+c|0,d=h,w=k-(r+o)-e|0;Se[(o+4>>2)+s]=3|e;var p=(0|u)==(0|Se[vi+24>>2]);r:do if(p){var E=Se[vi+12>>2]+w|0;Se[vi+12>>2]=E,Se[vi+24>>2]=d;var A=1|E;Se[v+(s+1)]=A}else if((0|u)==(0|Se[vi+20>>2])){var g=Se[vi+8>>2]+w|0;Se[vi+8>>2]=g,Se[vi+20>>2]=d;var y=1|g;Se[v+(s+1)]=y;var m=r+g+c|0;Se[m>>2]=g}else{var S=Me[t+(_+1)];if(1==(3&S|0)){var M=S&-8,C=S>>>3,R=S>>>0<256;a:do if(R){var T=Me[((8|b)>>2)+_],O=Me[t+(_+3)];if((0|T)!=(0|O)){var N=((S>>>2&1073741822)<<2)+vi+40|0,I=(0|T)==(0|N);do{if(!I){if(T>>>0>2]>>>0){f=18;break}f=15;break}f=15}while(0);do if(15==f){if((0|O)!=(0|N)&&O>>>0>2]>>>0)break;Se[T+12>>2]=O,Se[O+8>>2]=T;break a}while(0);throw Ka(),"Reached an unreachable!"}var P=Se[vi>>2]&(1<>2]=P}else{var D=k,L=Me[((24|b)>>2)+_],F=Me[t+(_+3)],X=(0|F)==(0|D);do if(X){var j=16|b,U=j+(a+4)|0,x=Se[U>>2];if(0==(0|x)){var z=a+j|0,V=Se[z>>2];if(0==(0|V)){var B=0,i=B>>2;break}var H=z,K=V}else{var H=U,K=x;f=25}for(;;){var K,H,Y=K+20|0,G=Se[Y>>2];if(0==(0|G)){var W=K+16|0,Z=Me[W>>2];if(0==(0|Z))break;var H=W,K=Z}else var H=Y,K=G}if(H>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[H>>2]=0;var B=K,i=B>>2}else{var Q=Me[((8|b)>>2)+_];if(Q>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[Q+12>>2]=F,Se[F+8>>2]=Q;var B=F,i=B>>2}while(0);var B;if(0==(0|L))break;var q=b+(a+28)|0,$=(Se[q>>2]<<2)+vi+304|0,J=(0|D)==(0|Se[$>>2]);do{if(J){if(Se[$>>2]=B,0!=(0|B))break;var rr=Se[vi+4>>2]&(1<>2]^-1);Se[vi+4>>2]=rr;break a}if(L>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";var ar=L+16|0;if((0|Se[ar>>2])==(0|D)?Se[ar>>2]=B:Se[L+20>>2]=B,0==(0|B))break a}while(0);if(B>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+6]=L;var er=16|b,ir=Me[(er>>2)+_];if(0!=(0|ir)){if(ir>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+4]=ir,Se[ir+24>>2]=B}var vr=Me[(er+4>>2)+_];if(0==(0|vr))break;if(vr>>>0>2]>>>0)throw Ka(),"Reached an unreachable!";Se[i+5]=vr,Se[vr+24>>2]=B}while(0);var tr=a+(M|b)|0,fr=M+w|0}else var tr=u,fr=w;var fr,tr,_r=tr+4|0,sr=Se[_r>>2]&-2;if(Se[_r>>2]=sr,Se[v+(s+1)]=1|fr,Se[(fr>>2)+s+v]=fr,fr>>>0<256){var nr=fr>>>2&1073741822,or=(nr<<2)+vi+40|0,lr=Me[vi>>2],br=1<<(fr>>>3),kr=0==(lr&br|0);do{if(!kr){var ur=(nr+2<<2)+vi+40|0,cr=Me[ur>>2];if(cr>>>0>=Me[vi+16>>2]>>>0){var hr=cr,dr=ur;break}throw Ka(),"Reached an unreachable!"}Se[vi>>2]=lr|br;var hr=or,dr=(nr+2<<2)+vi+40|0}while(0);var dr,hr;Se[dr>>2]=d,Se[hr+12>>2]=d,Se[v+(s+2)]=hr,Se[v+(s+3)]=or}else{var wr=h,pr=fr>>>8,Er=0==(0|pr);do if(Er)var Ar=0;else{if(fr>>>0>16777215){var Ar=31;break}var gr=(pr+1048320|0)>>>16&8,yr=pr<>>16&4,Sr=yr<>>16&2,Cr=14-(mr|gr|Mr)+(Sr<>>15)|0,Ar=fr>>>((Cr+7|0)>>>0)&1|Cr<<1}while(0);var Ar,Rr=(Ar<<2)+vi+304|0;Se[v+(s+7)]=Ar;var Tr=c+(r+16)|0;Se[v+(s+5)]=0,Se[Tr>>2]=0;var Or=Se[vi+4>>2],Nr=1<>2]=Ir,Se[Rr>>2]=wr,Se[v+(s+6)]=Rr,Se[v+(s+3)]=wr,Se[v+(s+2)]=wr}else{if(31==(0|Ar))var Pr=0;else var Pr=25-(Ar>>>1)|0;for(var Pr,Dr=fr<>2];;){var Lr,Dr;if((Se[Lr+4>>2]&-8|0)==(0|fr)){var Fr=Lr+8|0,Xr=Me[Fr>>2],jr=Me[vi+16>>2],Ur=Lr>>>0>>0;do if(!Ur){if(Xr>>>0>>0)break;Se[Xr+12>>2]=wr,Se[Fr>>2]=wr,Se[v+(s+2)]=Xr,Se[v+(s+3)]=Lr,Se[v+(s+6)]=0;break r}while(0);throw Ka(),"Reached an unreachable!"}var xr=(Dr>>>31<<2)+Lr+16|0,zr=Me[xr>>2];if(0==(0|zr)){if(xr>>>0>=Me[vi+16>>2]>>>0){Se[xr>>2]=wr,Se[v+(s+6)]=Lr,Se[v+(s+3)]=wr,Se[v+(s+2)]=wr;break r}throw Ka(),"Reached an unreachable!"}var Dr=Dr<<1,Lr=zr}}}}while(0);return r+(8|o)|0}function wa(r){return 0|He.__str3342}function pa(r){return 0|He.__str14343}function Ea(r){Se[r>>2]=si+8|0}function Aa(r){0!=(0|r)&&va(r)}function ga(r){ya(r);var a=r;Aa(a)}function ya(r){var a=0|r;Ye(a)}function ma(r){var a=0|r;Ea(a),Se[r>>2]=ni+8|0}function Sa(r){var a=0|r;ya(a);var e=r;Aa(e)}function Ma(r,a){var e,i,v=Me[vi+24>>2],i=v>>2,t=v,f=ua(t),_=Se[f>>2],s=Se[f+4>>2],n=_+s|0,o=_+(s-39)|0;if(0==(7&o|0))var l=0;else var l=7&-o;var l,b=_+(s-47)+l|0,k=b>>>0<(v+16|0)>>>0?t:b,u=k+8|0,e=u>>2,c=u,h=r,d=a-40|0;ca(h,d);var w=k+4|0;Se[w>>2]=27,Se[e]=Se[vi+444>>2],Se[e+1]=Se[vi+448>>2],Se[e+2]=Se[vi+452>>2],Se[e+3]=Se[vi+456>>2],Se[vi+444>>2]=r,Se[vi+448>>2]=a,Se[vi+456>>2]=0,Se[vi+452>>2]=c;var p=k+28|0;Se[p>>2]=7;var E=(k+32|0)>>>0>>0;r:do if(E)for(var A=p;;){var A,g=A+4|0;if(Se[g>>2]=7,(A+8|0)>>>0>=n>>>0)break r;var A=g}while(0);var y=(0|k)==(0|t);r:do if(!y){var m=k-v|0,S=t+m|0,M=m+(t+4)|0,C=Se[M>>2]&-2;Se[M>>2]=C;var R=1|m;Se[i+1]=R;var T=S;if(Se[T>>2]=m,m>>>0<256){var O=m>>>2&1073741822,N=(O<<2)+vi+40|0,I=Me[vi>>2],P=1<<(m>>>3),D=0==(I&P|0);do{if(!D){var L=(O+2<<2)+vi+40|0,F=Me[L>>2];if(F>>>0>=Me[vi+16>>2]>>>0){var X=F,j=L;break}throw Ka(),"Reached an unreachable!"}var U=I|P;Se[vi>>2]=U;var X=N,j=(O+2<<2)+vi+40|0}while(0);var j,X;Se[j>>2]=v,Se[X+12>>2]=v,Se[i+2]=X,Se[i+3]=N}else{var x=v,z=m>>>8,V=0==(0|z);do if(V)var B=0;else{if(m>>>0>16777215){var B=31;break}var H=(z+1048320|0)>>>16&8,K=z<>>16&4,G=K<>>16&2,Z=14-(Y|H|W)+(G<>>15)|0,B=m>>>((Z+7|0)>>>0)&1|Z<<1}while(0);var B,Q=(B<<2)+vi+304|0;Se[i+7]=B,Se[i+5]=0,Se[i+4]=0;var q=Se[vi+4>>2],$=1<>2]=J,Se[Q>>2]=x,Se[i+6]=Q,Se[i+3]=v,Se[i+2]=v}else{if(31==(0|B))var rr=0;else var rr=25-(B>>>1)|0;for(var rr,ar=m<>2];;){var er,ar;if((Se[er+4>>2]&-8|0)==(0|m)){var ir=er+8|0,vr=Me[ir>>2],tr=Me[vi+16>>2],fr=er>>>0>>0;do if(!fr){if(vr>>>0>>0)break;Se[vr+12>>2]=x,Se[ir>>2]=x,Se[i+2]=vr,Se[i+3]=er,Se[i+6]=0;break r}while(0);throw Ka(),"Reached an unreachable!"}var _r=(ar>>>31<<2)+er+16|0,sr=Me[_r>>2];if(0==(0|sr)){if(_r>>>0>=Me[vi+16>>2]>>>0){Se[_r>>2]=x,Se[i+6]=er,Se[i+3]=v,Se[i+2]=v;break r}throw Ka(),"Reached an unreachable!"}var ar=ar<<1,er=sr}}}}while(0)}function Ca(r){return d(r)}function Ra(r,a){var e=0;do Ae[r+e]=Ae[a+e],e++;while(0!=Ae[a+e-1]);return r}function Ta(){var r=Ta;return r.LLVM_SAVEDSTACKS||(r.LLVM_SAVEDSTACKS=[]),r.LLVM_SAVEDSTACKS.push(le.stackSave()),r.LLVM_SAVEDSTACKS.length-1}function Oa(r){var a=Ta,e=a.LLVM_SAVEDSTACKS[r];a.LLVM_SAVEDSTACKS.splice(r,1),le.stackRestore(e)}function Na(r,a,e){for(var i=0;it?1:-1;i++}return 0}function Ia(r,a){var e=Ca(r),i=0;do Ae[r+e+i]=Ae[a+i],i++;while(0!=Ae[a+i-1]);return r}function Pa(r,a,e,i){if(e>=20&&a%2==r%2)if(a%4==r%4){for(var v=a+e;a%4;)Ae[r++]=Ae[a++];for(var t=a>>2,f=r>>2,_=v>>2;t<_;)Se[f++]=Se[t++];for(a=t<<2,r=f<<2;a>1,n=r>>1,o=v>>1;st?1:-1}return 0}function Fa(r,a,e,i){if(e>=20){for(var v=r+e;r%4;)Ae[r++]=a;a<0&&(a+=256);for(var t=r>>2,f=v>>2,_=a|a<<8|a<<16|a<<24;t>2],xe[1]=Se[a+_+4>>2],e=ze[0]):"i64"==r?e=[Se[a+_>>2],Se[a+_+4>>2]]:(r="i32",e=Se[a+_>>2]),_+=le.getNativeFieldSize(r),e}for(var i,v,t,f=r,_=0,s=[];;){var n=f;if(i=Ae[f],0===i)break;if(v=Ae[f+1],i=="%".charCodeAt(0)){var o=!1,l=!1,b=!1,k=!1;r:for(;;){switch(v){case"+".charCodeAt(0):o=!0;break;case"-".charCodeAt(0):l=!0;break;case"#".charCodeAt(0):b=!0;break;case"0".charCodeAt(0):if(k)break r;k=!0;break;default:break r}f++,v=Ae[f+1]}var u=0;if(v=="*".charCodeAt(0))u=e("i32"),f++,v=Ae[f+1];else for(;v>="0".charCodeAt(0)&&v<="9".charCodeAt(0);)u=10*u+(v-"0".charCodeAt(0)),f++,v=Ae[f+1];var c=!1;if(v==".".charCodeAt(0)){var h=0;if(c=!0,f++,v=Ae[f+1],v=="*".charCodeAt(0))h=e("i32"),f++;else for(;;){var d=Ae[f+1];if(d<"0".charCodeAt(0)||d>"9".charCodeAt(0))break;h=10*h+(d-"0".charCodeAt(0)),f++}v=Ae[f+1]}else var h=6;var E;switch(String.fromCharCode(v)){case"h":var A=Ae[f+2];A=="h".charCodeAt(0)?(f++,E=1):E=2;break;case"l":var A=Ae[f+2];A=="l".charCodeAt(0)?(f++,E=8):E=4;break;case"L":case"q":case"j":E=8;break;case"z":case"t":case"I":E=4;break;default:E=null}if(E&&f++,v=Ae[f+1],["d","i","u","o","x","X","p"].indexOf(String.fromCharCode(v))!=-1){var m=v=="d".charCodeAt(0)||v=="i".charCodeAt(0);E=E||4;var t=e("i"+8*E);if(8==E&&(t=le.makeBigInt(t[0],t[1],v=="u".charCodeAt(0))),E<=4){var S=Math.pow(256,E)-1;t=(m?y:g)(t&S,8*E)}var M,C=Math.abs(t),R="";if(v=="d".charCodeAt(0)||v=="i".charCodeAt(0))M=y(t,8*E,1).toString(10);else if(v=="u".charCodeAt(0))M=g(t,8*E,1).toString(10),t=Math.abs(t);else if(v=="o".charCodeAt(0))M=(b?"0":"")+C.toString(8);else if(v=="x".charCodeAt(0)||v=="X".charCodeAt(0)){if(R=b?"0x":"",t<0){t=-t,M=(C-1).toString(16);for(var T=[],O=0;OP&&P>=-4?(v=(v=="g".charCodeAt(0)?"f":"F").charCodeAt(0),h-=P+1):(v=(v=="g".charCodeAt(0)?"e":"E").charCodeAt(0),h--),I=Math.min(h,20)}v=="e".charCodeAt(0)||v=="E".charCodeAt(0)?(M=t.toExponential(I),/[eE][-+]\\d$/.test(M)&&(M=M.slice(0,-1)+"0"+M.slice(-1))):v!="f".charCodeAt(0)&&v!="F".charCodeAt(0)||(M=t.toFixed(I));var D=M.split("e");if(N&&!b)for(;D[0].length>1&&D[0].indexOf(".")!=-1&&("0"==D[0].slice(-1)||"."==D[0].slice(-1));)D[0]=D[0].slice(0,-1);else for(b&&M.indexOf(".")==-1&&(D[0]+=".");h>I++;)D[0]+="0";M=D[0]+(D.length>1?"e"+D[1]:""),v=="E".charCodeAt(0)&&(M=M.toUpperCase()),o&&t>=0&&(M="+"+M)}else M=(t<0?"-":"")+"inf",k=!1;for(;M.lengthh&&(L=L.slice(0,h))):L=p("(null)",!0),!l)for(;L.length0;)s.push(" ".charCodeAt(0));l||s.push(e("i8"))}else if(v=="n".charCodeAt(0)){var X=e("i32*");Se[X>>2]=s.length}else if(v=="%".charCodeAt(0))s.push(i);else for(var O=n;O="0".charCodeAt(0)&&r<="9".charCodeAt(0)}function Ha(r){for(var a;(a=Ae[r])&&Va(a);)r++;if(!a||!Ba(a))return 0;for(var e=r;(a=Ae[e])&&Ba(a);)e++;return Math.floor(Number(s(r).substr(0,e-r)))}function Ka(r){throw ke=!0,"ABORT: "+r+", at "+(new Error).stack}function Ya(r){return Ya.ret||(Ya.ret=_([0],"i32",we)),Se[Ya.ret>>2]=r,r}function Ga(r,a,e,i){var v=$e.streams[r];if(!v||v.object.isDevice)return Ya(Ge.EBADF),-1;if(v.isWrite){if(v.object.isFolder)return Ya(Ge.EISDIR),-1;if(e<0||i<0)return Ya(Ge.EINVAL),-1;for(var t=v.object.contents;t.length>2]=a),a}function Ja(){return Ya.ret}function re(r){var a=re;a.called||(Ie=o(Ie),a.called=!0);var e=Ie;return 0!=r&&le.staticAlloc(r),e}function ae(){return Se[ae.buf>>2]}function ee(r){r=r||Module.arguments,k();var a=null;return Module._main&&(a=Module.callMain(r),Module.noExitRuntime||u()),a}var ie=[],ve=false,te="object"==typeof window,fe="function"==typeof importScripts,_e=!te&&!ve&&!fe;if(ve){print=function(r){process.stdout.write(r+"\\n")},printErr=function(r){process.stderr.write(r+"\\n")};var se=require("fs");read=function(r){var a=se.readFileSync(r).toString();return a||"/"==r[0]||(r=__dirname.split("/").slice(0,-1).join("/")+"/src/"+r,a=se.readFileSync(r).toString()),a},load=function(a){r(read(a))},ie=process.argv.slice(2)}else if(_e)this.read||(this.read=function(r){snarf(r)}),"undefined"!=typeof scriptArgs?ie=scriptArgs:"undefined"!=typeof arguments&&(ie=arguments);else if(te)this.print=printErr=function(r){console.log(r)},this.read=function(r){var a=new XMLHttpRequest;return a.open("GET",r,!1),a.send(null),a.responseText},this.arguments&&(ie=arguments);else{if(!fe)throw"Unknown runtime environment. Where are we?";this.load=importScripts}"undefined"==typeof load&&"undefined"!=typeof read&&(this.load=function(a){r(read(a))}),"undefined"==typeof printErr&&(this.printErr=function(){}),"undefined"==typeof print&&(this.print=printErr);try{this.Module=Module}catch(r){this.Module=Module={}}Module.arguments||(Module.arguments=ie),Module.print&&(print=Module.print);var ne,oe,le={stackSave:function(){return Oe},stackRestore:function(r){Oe=r},forceAlign:function(r,a){if(a=a||4,1==a)return r;if(isNumber(r)&&isNumber(a))return Math.ceil(r/a)*a;if(isNumber(a)&&isPowerOfTwo(a)){var e=log2(a);return"(((("+r+")+"+(a-1)+")>>"+e+")<<"+e+")"}return"Math.ceil(("+r+")/"+a+")*"+a},isNumberType:function(r){return r in le.INT_TYPES||r in le.FLOAT_TYPES},isPointerType:function(r){return"*"==r[r.length-1]},isStructType:function(r){return!isPointerType(r)&&(!!/^\\[\\d+\\ x\\ (.*)\\]/.test(r)||(!!/?/.test(r)||"%"==r[0]))},INT_TYPES:{i1:0,i8:0,i16:0,i32:0,i64:0},FLOAT_TYPES:{float:0,double:0},bitshift64:function(r,e,i,v){var t=Math.pow(2,v)-1;if(v<32)switch(i){case"shl":return[r<>>32-v];case"ashr":return[(r>>>v|(e&t)<<32-v)>>0>>>0,e>>v>>>0];case"lshr":return[(r>>>v|(e&t)<<32-v)>>>0,e>>>v]}else if(32==v)switch(i){case"shl":return[0,r];case"ashr":return[e,(0|e)<0?t:0];case"lshr":return[e,0]}else switch(i){case"shl":return[0,r<>v-32>>>0,(0|e)<0?t:0];case"lshr":return[e>>>v-32,0]}a("unknown bitshift64 op: "+[value,i,v])},or64:function(r,a){var e=0|r|(0|a),i=4294967296*(Math.round(r/4294967296)|Math.round(a/4294967296));return e+i},and64:function(r,a){var e=(0|r)&(0|a),i=4294967296*(Math.round(r/4294967296)&Math.round(a/4294967296));return e+i},xor64:function(r,a){var e=(0|r)^(0|a),i=4294967296*(Math.round(r/4294967296)^Math.round(a/4294967296));return e+i},getNativeTypeSize:function(r,a){if(1==le.QUANTUM_SIZE)return 1;var i={"%i1":1,"%i8":1,"%i16":2,"%i32":4,"%i64":8,"%float":4,"%double":8}["%"+r];if(!i)if("*"==r[r.length-1])i=le.QUANTUM_SIZE;else if("i"==r[0]){var v=parseInt(r.substr(1));e(v%8==0),i=v/8}return i},getNativeFieldSize:function(r){return Math.max(le.getNativeTypeSize(r),le.QUANTUM_SIZE)},dedup:function(r,a){var e={};return a?r.filter(function(r){return!e[r[a]]&&(e[r[a]]=!0,!0)}):r.filter(function(r){return!e[r]&&(e[r]=!0,!0)})},set:function(){for(var r="object"==typeof arguments[0]?arguments[0]:arguments,a={},e=0;e=0&&a.push(f-e),e=f,f}),r.flatSize=le.alignMemory(r.flatSize,r.alignSize),0==a.length?r.flatFactor=r.flatSize:1==le.dedup(a).length&&(r.flatFactor=a[0]),r.needsFlattening=1!=r.flatFactor,r.flatIndexes},generateStructInfo:function(r,a,i){var v,t;if(a){if(i=i||0,v=("undefined"==typeof Types?le.typeInfo:Types.types)[a],!v)return null;e(v.fields.length===r.length,"Number of named fields must match the type for "+a),t=v.flatIndexes}else{var v={fields:r.map(function(r){return r[0]})};t=le.calculateStructAlignment(v)}var f={__size__:v.flatSize};return a?r.forEach(function(r,a){if("string"==typeof r)f[r]=t[a]+i;else{var e;for(var _ in r)e=_;f[e]=le.generateStructInfo(r[e],v.fields[a],t[a])}}):r.forEach(function(r,a){f[r[1]]=t[a]}),f},stackAlloc:function(r){var a=Oe;return Oe+=r,Oe=Oe+3>>2<<2,a},staticAlloc:function(r){var a=Ie;return Ie+=r,Ie=Ie+3>>2<<2,Ie>=Le&&l(),a},alignMemory:function(r,a){var e=r=Math.ceil(r/(a?a:4))*(a?a:4);return e},makeBigInt:function(r,a,e){var i=e?(r>>>0)+4294967296*(a>>>0):(r>>>0)+4294967296*(0|a);return i},QUANTUM_SIZE:4,__dummy__:0},be={MAX_ALLOWED:0,corrections:0,sigs:{},note:function(r,e,i){e||(this.corrections++,this.corrections>=this.MAX_ALLOWED&&a("\\n\\nToo many corrections!"))},print:function(){}},ke=!1,ue=0,ce=this;Module.ccall=i,Module.setValue=t,Module.getValue=f;var he=0,de=1,we=2;Module.ALLOC_NORMAL=he,Module.ALLOC_STACK=de,Module.ALLOC_STATIC=we,Module.allocate=_,Module.Pointer_stringify=s,Module.Array_stringify=n;var pe,Ee,Ae,ge,ye,me,Se,Me,Ce,Re,Te,Oe,Ne,Ie,Pe=4096,De=Module.TOTAL_STACK||5242880,Le=Module.TOTAL_MEMORY||10485760;Module.FAST_MEMORY||2097152;e(!!(Int32Array&&Float64Array&&new Int32Array(1).subarray&&new Int32Array(1).set),"Cannot fallback to non-typed array case: Code is too specialized");var Fe=new ArrayBuffer(Le);Ae=new Int8Array(Fe),ye=new Int16Array(Fe),Se=new Int32Array(Fe),ge=new Uint8Array(Fe),me=new Uint16Array(Fe),Me=new Uint32Array(Fe),Ce=new Float32Array(Fe),Re=new Float64Array(Fe),Se[0]=255,e(255===ge[0]&&0===ge[3],"Typed arrays 2 must be run on a little-endian system");var Xe=p("(null)");Ie=Xe.length;for(var je=0;je>2)),ze=(Ce.subarray(Ue>>2),Re.subarray(Ue>>3));Ne=Ue+8,Ie=o(Ne);var Ve=[],Be=[];Module.Array_copy=c,Module.TypedArray_copy=h,Module.String_len=d,Module.String_copy=w,Module.intArrayFromString=p,Module.intArrayToString=E,Module.writeStringToMemory=A;var He=[],Ke=0;O.X=1,N.X=1,V.X=1,H.X=1,G.X=1,W.X=1,q.X=1,$.X=1,rr.X=1,ar.X=1,er.X=1,vr.X=1,nr.X=1,or.X=1,kr.X=1,hr.X=1,Ar.X=1,Sr.X=1,Tr.X=1,Ir.X=1,Pr.X=1,Dr.X=1,Lr.X=1,Fr.X=1,Xr.X=1,zr.X=1,Vr.X=1,Br.X=1,Gr.X=1,$r.X=1,Module._malloc=Jr,Jr.X=1,ra.X=1,aa.X=1,ea.X=1,ia.X=1,Module._free=va,va.X=1,_a.X=1,sa.X=1,na.X=1,oa.X=1,la.X=1,da.X=1,Ma.X=1;var Ye,Ge={E2BIG:7,EACCES:13,EADDRINUSE:98,EADDRNOTAVAIL:99,EAFNOSUPPORT:97,EAGAIN:11,EALREADY:114,EBADF:9,EBADMSG:74,EBUSY:16,ECANCELED:125,ECHILD:10,ECONNABORTED:103,ECONNREFUSED:111,ECONNRESET:104,EDEADLK:35,EDESTADDRREQ:89,EDOM:33,EDQUOT:122,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:113,EIDRM:43,EILSEQ:84,EINPROGRESS:115,EINTR:4,EINVAL:22,EIO:5,EISCONN:106,EISDIR:21,ELOOP:40,EMFILE:24,EMLINK:31,EMSGSIZE:90,EMULTIHOP:72,ENAMETOOLONG:36,ENETDOWN:100,ENETRESET:102,ENETUNREACH:101,ENFILE:23,ENOBUFS:105,ENODATA:61,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:37,ENOLINK:67,ENOMEM:12,ENOMSG:42,ENOPROTOOPT:92,ENOSPC:28,ENOSR:63,ENOSTR:60,ENOSYS:38,ENOTCONN:107,ENOTDIR:20,ENOTEMPTY:39,ENOTRECOVERABLE:131,ENOTSOCK:88,ENOTSUP:95,ENOTTY:25,ENXIO:6,EOVERFLOW:75,EOWNERDEAD:130,EPERM:1,EPIPE:32,EPROTO:71,EPROTONOSUPPORT:93,EPROTOTYPE:91,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:116,ETIME:62,ETIMEDOUT:110,ETXTBSY:26,EWOULDBLOCK:11,EXDEV:18},We=0,Ze=0,Qe=0,qe=0,$e={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:!0,absolutePath:function(r,a){if("string"!=typeof r)return null;void 0===a&&(a=$e.currentPath),r&&"/"==r[0]&&(a="");for(var e=a+"/"+r,i=e.split("/").reverse(),v=[""];i.length;){var t=i.pop();""==t||"."==t||(".."==t?v.length>1&&v.pop():v.push(t))}return 1==v.length?"/":v.join("/")},analyzePath:function(r,a,e){var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};if(r=$e.absolutePath(r),"/"==r)i.isRoot=!0,i.exists=i.parentExists=!0,i.name="/",i.path=i.parentPath="/",i.object=i.parentObject=$e.root;else if(null!==r){e=e||0,r=r.slice(1).split("/");for(var v=$e.root,t=[""];r.length;){1==r.length&&v.isFolder&&(i.parentExists=!0,i.parentPath=1==t.length?"/":t.join("/"),i.parentObject=v,i.name=r[0]);var f=r.shift();if(!v.isFolder){i.error=Ge.ENOTDIR;break}if(!v.read){i.error=Ge.EACCES;break}if(!v.contents.hasOwnProperty(f)){i.error=Ge.ENOENT;break}if(v=v.contents[f],v.link&&(!a||0!=r.length)){if(e>40){i.error=Ge.ELOOP;break}var _=$e.absolutePath(v.link,t.join("/"));return $e.analyzePath([_].concat(r).join("/"),a,e+1)}t.push(f),0==r.length&&(i.exists=!0,i.path=t.join("/"),i.object=v)}return i}return i},findObject:function(r,a){$e.ensureRoot();var e=$e.analyzePath(r,a);return e.exists?e.object:(Ya(e.error),null)},createObject:function(r,a,e,i,v){if(r||(r="/"),"string"==typeof r&&(r=$e.findObject(r)),!r)throw Ya(Ge.EACCES),new Error("Parent path must exist.");if(!r.isFolder)throw Ya(Ge.ENOTDIR), new Error("Parent must be a folder.");if(!r.write&&!$e.ignorePermissions)throw Ya(Ge.EACCES),new Error("Parent folder must be writeable.");if(!a||"."==a||".."==a)throw Ya(Ge.ENOENT),new Error("Name must not be empty.");if(r.contents.hasOwnProperty(a))throw Ya(Ge.EEXIST),new Error("Can't overwrite object.");r.contents[a]={read:void 0===i||i,write:void 0!==v&&v,timestamp:Date.now(),inodeNumber:$e.nextInode++};for(var t in e)e.hasOwnProperty(t)&&(r.contents[a][t]=e[t]);return r.contents[a]},createFolder:function(r,a,e,i){var v={isFolder:!0,isDevice:!1,contents:{}};return $e.createObject(r,a,v,e,i)},createPath:function(r,a,e,i){var v=$e.findObject(r);if(null===v)throw new Error("Invalid parent.");for(a=a.split("/").reverse();a.length;){var t=a.pop();t&&(v.contents.hasOwnProperty(t)||$e.createFolder(v,t,e,i),v=v.contents[t])}return v},createFile:function(r,a,e,i,v){return e.isFolder=!1,$e.createObject(r,a,e,i,v)},createDataFile:function(r,a,e,i,v){if("string"==typeof e){for(var t=new Array(e.length),f=0,_=e.length;f<_;++f)t[f]=e.charCodeAt(f);e=t}var s={isDevice:!1,contents:e};return $e.createFile(r,a,s,i,v)},createLazyFile:function(r,a,e,i,v){var t={isDevice:!1,url:e};return $e.createFile(r,a,t,i,v)},createLink:function(r,a,e,i,v){var t={isDevice:!1,link:e};return $e.createFile(r,a,t,i,v)},createDevice:function(r,a,e,i){if(!e&&!i)throw new Error("A device must have at least one callback defined.");var v={isDevice:!0,input:e,output:i};return $e.createFile(r,a,v,Boolean(e),Boolean(i))},forceLoadFile:function(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;var a=!0;if("undefined"!=typeof XMLHttpRequest)e("Cannot do synchronous binary XHRs in modern browsers. Use --embed-file or --preload-file in emcc");else{if("undefined"==typeof read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=p(read(r.url),!0)}catch(r){a=!1}}return a||Ya(Ge.EIO),a},ensureRoot:function(){$e.root||($e.root={read:!0,write:!0,isFolder:!0,isDevice:!1,timestamp:Date.now(),inodeNumber:1,contents:{}})},init:function(r,a,i){function v(r){null===r||r==="\\n".charCodeAt(0)?(a.printer(a.buffer.join("")),a.buffer=[]):a.buffer.push(String.fromCharCode(r))}e(!$e.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),$e.init.initialized=!0,$e.ensureRoot(),r=r||Module.stdin,a=a||Module.stdout,i=i||Module.stderr;var t=!0,f=!0,s=!0;r||(t=!1,r=function(){if(!r.cache||!r.cache.length){var a;"undefined"!=typeof window&&"function"==typeof window.prompt?a=window.prompt("Input: "):"function"==typeof readline&&(a=readline()),a||(a=""),r.cache=p(a+"\\n",!0)}return r.cache.shift()}),a||(f=!1,a=v),a.printer||(a.printer=print),a.buffer||(a.buffer=[]),i||(s=!1,i=v),i.printer||(i.printer=print),i.buffer||(i.buffer=[]),$e.createFolder("/","tmp",!0,!0);var n=$e.createFolder("/","dev",!0,!0),o=$e.createDevice(n,"stdin",r),l=$e.createDevice(n,"stdout",null,a),b=$e.createDevice(n,"stderr",null,i);$e.createDevice(n,"tty",r,a),$e.streams[1]={path:"/dev/stdin",object:o,position:0,isRead:!0,isWrite:!1,isAppend:!1,isTerminal:!t,error:!1,eof:!1,ungotten:[]},$e.streams[2]={path:"/dev/stdout",object:l,position:0,isRead:!1,isWrite:!0,isAppend:!1,isTerminal:!f,error:!1,eof:!1,ungotten:[]},$e.streams[3]={path:"/dev/stderr",object:b,position:0,isRead:!1,isWrite:!0,isAppend:!1,isTerminal:!s,error:!1,eof:!1,ungotten:[]},We=_([1],"void*",we),Ze=_([2],"void*",we),Qe=_([3],"void*",we),$e.createPath("/","dev/shm/tmp",!0,!0),$e.streams[We]=$e.streams[1],$e.streams[Ze]=$e.streams[2],$e.streams[Qe]=$e.streams[3],qe=_([_([0,0,0,0,We,0,0,0,Ze,0,0,0,Qe,0,0,0],"void*",we)],"void*",we)},quit:function(){$e.init.initialized&&($e.streams[2]&&$e.streams[2].object.output.buffer.length>0&&$e.streams[2].object.output("\\n".charCodeAt(0)),$e.streams[3]&&$e.streams[3].object.output.buffer.length>0&&$e.streams[3].object.output("\\n".charCodeAt(0)))}},Je=Ja;Ve.unshift({func:function(){$e.ignorePermissions=!1,$e.init.initialized||$e.init()}}),Be.push({func:function(){$e.quit()}}),Ya(0),ae.buf=_(12,"void*",we),Module.callMain=function(r){function a(){for(var r=0;r<3;r++)i.push(0)}var e=r.length+1,i=[_(p("/bin/this.program"),"i8",we)];a();for(var v=0;v>2]=0|He.__str,Se[ri+4>>2]=0|He.__str1,Se[ri+16>>2]=0|He.__str2,Se[ri+20>>2]=0|He.__str3,Se[ri+32>>2]=0|He.__str4,Se[ri+36>>2]=0|He.__str5,Se[ri+48>>2]=0|He.__str6,Se[ri+52>>2]=0|He.__str7,Se[ri+64>>2]=0|He.__str8,Se[ri+68>>2]=0|He.__str7,Se[ri+80>>2]=0|He.__str9,Se[ri+84>>2]=0|He.__str10,Se[ri+96>>2]=0|He.__str11,Se[ri+100>>2]=0|He.__str12,Se[ri+112>>2]=0|He.__str13,Se[ri+116>>2]=0|He.__str14,Se[ri+128>>2]=0|He.__str15,Se[ri+132>>2]=0|He.__str16,Se[ri+144>>2]=0|He.__str17,Se[ri+148>>2]=0|He.__str18,Se[ri+160>>2]=0|He.__str19,Se[ri+164>>2]=0|He.__str20,Se[ri+176>>2]=0|He.__str21,Se[ri+180>>2]=0|He.__str22,Se[ri+192>>2]=0|He.__str23,Se[ri+196>>2]=0|He.__str24,Se[ri+208>>2]=0|He.__str25,Se[ri+212>>2]=0|He.__str26,Se[ri+224>>2]=0|He.__str27,Se[ri+228>>2]=0|He.__str28,Se[ri+240>>2]=0|He.__str29,Se[ri+244>>2]=0|He.__str30,Se[ri+256>>2]=0|He.__str31,Se[ri+260>>2]=0|He.__str32,Se[ri+272>>2]=0|He.__str33,Se[ri+276>>2]=0|He.__str34,Se[ri+288>>2]=0|He.__str35,Se[ri+292>>2]=0|He.__str36,Se[ri+304>>2]=0|He.__str37,Se[ri+308>>2]=0|He.__str38,Se[ri+320>>2]=0|He.__str39,Se[ri+324>>2]=0|He.__str40,Se[ri+336>>2]=0|He.__str41,Se[ri+340>>2]=0|He.__str42,Se[ri+352>>2]=0|He.__str43,Se[ri+356>>2]=0|He.__str44,Se[ri+368>>2]=0|He.__str45,Se[ri+372>>2]=0|He.__str46,Se[ri+384>>2]=0|He.__str47,Se[ri+388>>2]=0|He.__str48,Se[ri+400>>2]=0|He.__str49,Se[ri+404>>2]=0|He.__str119289,Se[ri+416>>2]=0|He.__str51,Se[ri+420>>2]=0|He.__str20,Se[ri+432>>2]=0|He.__str52,Se[ri+436>>2]=0|He.__str53,Se[ri+448>>2]=0|He.__str54,Se[ri+452>>2]=0|He.__str55,Se[ri+464>>2]=0|He.__str56,Se[ri+468>>2]=0|He.__str57,Se[ri+480>>2]=0|He.__str58,Se[ri+484>>2]=0|He.__str119289,Se[ri+496>>2]=0|He.__str59,Se[ri+500>>2]=0|He.__str60,Se[ri+512>>2]=0|He.__str61,Se[ri+516>>2]=0|He.__str62,Se[ri+528>>2]=0|He.__str63,Se[ri+532>>2]=0|He.__str64,Se[ri+544>>2]=0|He.__str65,Se[ri+548>>2]=0|He.__str66,Se[ri+560>>2]=0|He.__str67,Se[ri+564>>2]=0|He.__str68,Se[ri+576>>2]=0|He.__str69,Se[ri+580>>2]=0|He.__str70,Se[ri+592>>2]=0|He.__str71,Se[ri+596>>2]=0|He.__str72,Se[ri+608>>2]=0|He.__str73,Se[ri+612>>2]=0|He.__str74,Se[ri+624>>2]=0|He.__str75,Se[ri+628>>2]=0|He.__str76,Se[ri+640>>2]=0|He.__str77,Se[ri+644>>2]=0|He.__str72,Se[ri+656>>2]=0|He.__str78,Se[ri+660>>2]=0|He.__str79,Se[ri+672>>2]=0|He.__str80,Se[ri+676>>2]=0|He.__str81,Se[ri+688>>2]=0|He.__str82,Se[ri+692>>2]=0|He.__str83,Se[ri+704>>2]=0|He.__str84,Se[ri+708>>2]=0|He.__str85,Se[ri+720>>2]=0|He.__str86,Se[ri+724>>2]=0|He.__str87,Se[ri+736>>2]=0|He.__str88,Se[ri+740>>2]=0|He.__str89,Se[ri+752>>2]=0|He.__str90,Se[ri+756>>2]=0|He.__str91,Se[ri+768>>2]=0|He.__str92,Se[ri+772>>2]=0|He.__str91,Se[ai>>2]=0|He.__str145315,Se[ai+8>>2]=0|He.__str145315,Se[ai+20>>2]=0|He.__str167337,Se[ai+28>>2]=0|He.__str95,Se[ai+40>>2]=0|He.__str146316,Se[ai+48>>2]=0|He.__str97,Se[ai+60>>2]=0|He.__str155325,Se[ai+68>>2]=0|He.__str155325,Se[ai+80>>2]=0|He.__str156326,Se[ai+88>>2]=0|He.__str156326,Se[ai+100>>2]=0|He.__str154324,Se[ai+108>>2]=0|He.__str154324,Se[ai+120>>2]=0|He.__str101,Se[ai+128>>2]=0|He.__str101,Se[ai+140>>2]=0|He.__str147317,Se[ai+148>>2]=0|He.__str147317,Se[ai+160>>2]=0|He.__str150320,Se[ai+168>>2]=0|He.__str150320,Se[ai+180>>2]=0|He.__str151321,Se[ai+188>>2]=0|He.__str105,Se[ai+220>>2]=0|He.__str152322,Se[ai+228>>2]=0|He.__str152322,Se[ai+240>>2]=0|He.__str153323,Se[ai+248>>2]=0|He.__str153323,Se[ai+260>>2]=0|He.__str165335,Se[ai+268>>2]=0|He.__str165335,Se[ai+280>>2]=0|He.__str166336,Se[ai+288>>2]=0|He.__str166336,Se[ai+360>>2]=0|He.__str148318,Se[ai+368>>2]=0|He.__str148318,Se[ai+380>>2]=0|He.__str149319,Se[ai+388>>2]=0|He.__str149319,Se[ai+420>>2]=0|He.__str84254,Se[ai+428>>2]=0|He.__str84254,Se[ai+440>>2]=0|He.__str168338,Se[ai+448>>2]=0|He.__str146316,Se[ai+460>>2]=0|He.__str114,Se[ai+468>>2]=0|He.__str152322,Se[ai+480>>2]=0|He.__str115,Se[ai+488>>2]=0|He.__str115,Se[ai+500>>2]=0|He.__str110280,Se[ai+508>>2]=0|He.__str110280,Se[ei+4>>2]=0|He.__str152,Se[ei+12>>2]=0|He.__str152,Se[ei+32>>2]=0|He.__str153,Se[ei+40>>2]=0|He.__str153,Se[ei+48>>2]=0|He.__str154,Se[ei+60>>2]=0|He.__str155,Se[ei+68>>2]=0|He.__str155,Se[ei+76>>2]=0|He.__str156,Se[ei+88>>2]=0|He.__str157,Se[ei+96>>2]=0|He.__str158,Se[ei+104>>2]=0|He.__str156,Se[ei+116>>2]=0|He.__str159,Se[ei+124>>2]=0|He.__str160,Se[ei+132>>2]=0|He.__str161,Se[ei+144>>2]=0|He.__str162,Se[ei+152>>2]=0|He.__str163,Se[ei+160>>2]=0|He.__str164,Se[ei+172>>2]=0|He.__str165,Se[ei+180>>2]=0|He.__str166,Se[ei+188>>2]=0|He.__str167,Se[si+4>>2]=bi,Se[ni+4>>2]=ki,oi=_([2,0,0,0,0],["i8*",0,0,0,0],we),Se[bi>>2]=oi+8|0,Se[bi+4>>2]=0|He.__ZTSSt9bad_alloc,Se[bi+8>>2]=li,Se[ki>>2]=oi+8|0,Se[ki+4>>2]=0|He.__ZTSSt20bad_array_new_length,Se[ki+8>>2]=bi,ui=16,ci=6,hi=18,di=6,wi=6,pe=[0,0,Jr,0,va,0,ya,0,ga,0,wa,0,Sa,0,pa,0,Ea,0,ma,0],Module.FUNCTION_TABLE=pe,Module.run=ee,Module.preRun&&Module.preRun(),0==Ke){ee()}Module.postRun&&Module.postRun(),Module.___cxa_demangle=G;var pi=v("__cxa_demangle","string",["string","string","number","number"]);return function(r){return pi(r,"",1,0)}}(); `});var Lm,$a,ue,Mr,Wa,ne,de,Re=ie(()=>{"use strict";$();He();Lm=Promise.resolve().then(()=>(wo(),Co)),$a=class{constructor(){this.selfWeight=0;this.totalWeight=0}getSelfWeight(){return this.selfWeight}getTotalWeight(){return this.totalWeight}addToTotalWeight(e){this.totalWeight+=e}addToSelfWeight(e){this.selfWeight+=e}overwriteWeightWith(e){this.selfWeight=e.selfWeight,this.totalWeight=e.totalWeight}},ue=class t extends $a{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static{this.root=new t({key:"(speedscope root)",name:"(speedscope root)"})}static getOrInsert(e,r){return e.getOrInsert(new t(r))}},Mr=class extends $a{constructor(r,a){super();this.frame=r;this.parent=a;this.children=[];this.frozen=!1}isRoot(){return this.frame===ue.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}},Wa=class t{constructor(e=0){this.name="";this.frames=new pt;this.appendOrderCalltreeRoot=new Mr(ue.root,null);this.groupedCalltreeRoot=new Mr(ue.root,null);this.samples=[];this.weights=[];this.valueFormatter=new It;this.totalNonIdleWeight=null;this.totalWeight=e}getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}shallowClone(){let e=new t(this.totalWeight);return Object.assign(e,this),e}formatValue(e){return this.valueFormatter.format(e)}setValueFormatter(e){this.valueFormatter=e}getWeightUnit(){return this.valueFormatter.unit}getName(){return this.name}setName(e){this.name=e}getTotalWeight(){return this.totalWeight}getTotalNonIdleWeight(){return this.totalNonIdleWeight===null&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,r)=>e+r.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){function e(r){r.children.sort((a,n)=>-(a.getTotalWeight()-n.getTotalWeight())),r.children.forEach(e)}e(this.groupedCalltreeRoot)}forEachCallGrouped(e,r){function a(n,i){n.frame!==ue.root&&e(n,i);let o=0;n.children.forEach(function(l){a(l,i+o),o+=l.getTotalWeight()}),n.frame!==ue.root&&r(n,i+n.getTotalWeight())}a(this.groupedCalltreeRoot,0)}forEachCall(e,r){let a=[],n=0,i=0;for(let o of this.samples){let l=null;for(l=o;l&&l.frame!=ue.root&&a.indexOf(l)===-1;l=l.parent);for(;a.length>0&&Z(a)!=l;){let s=a.pop();r(s,n)}let _=[];for(let s=o;s&&s.frame!=ue.root&&s!=l;s=s.parent)_.push(s);_.reverse();for(let s of _)e(s,n);a=a.concat(_),n+=this.weights[i++]}for(let o=a.length-1;o>=0;o--)r(a[o],n)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){let e=new de,r=[],a=new Set;function n(l,_){a.has(l.frame)?r.push(null):(a.add(l.frame),r.push(l),e.enterFrame(l.frame,_))}function i(l,_){let s=r.pop();s&&(a.delete(s.frame),e.leaveFrame(s.frame,_))}this.forEachCall(n,i);let o=e.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,this.forEachFrame(l=>{o.frames.getOrInsert(l).overwriteWeightWith(l)}),o}getInvertedProfileForCallersOf(e){let r=ue.getOrInsert(this.frames,e),a=new ne,n=[];function i(l){if(l.frame===r)n.push(l);else for(let _ of l.children)i(_)}i(this.appendOrderCalltreeRoot);for(let l of n){let _=[];for(let s=l;s!=null&&s.frame!==ue.root;s=s.parent)_.push(s.frame);a.appendSampleWithWeight(_,l.getTotalWeight())}let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}getProfileForCalleesOf(e){let r=ue.getOrInsert(this.frames,e),a=new ne;function n(l){let _=[];function s(c){_.push(c.frame),a.appendSampleWithWeight(_,c.getSelfWeight());for(let h of c.children)s(h);_.pop()}s(l)}function i(l){if(l.frame===r)n(l);else for(let _ of l.children)i(_)}i(this.appendOrderCalltreeRoot);let o=a.build();return o.name=this.name,o.valueFormatter=this.valueFormatter,o}async demangle(){let e=null;for(let r of this.frames)r.name.startsWith("__Z")&&(e||(e=(await Lm).demangleCpp),r.name=e(r.name))}remapSymbols(e){for(let r of this.frames){let a=e(r);if(a==null)continue;let{name:n,file:i,line:o,col:l}=a;n!=null&&(r.name=n),i!=null&&(r.file=i),o!=null&&(r.line=o),l!=null&&(r.col=l)}}},ne=class extends Wa{constructor(){super(...arguments);this.pendingSample=null}_appendSample(r,a,n){if(isNaN(a))throw new Error("invalid weight");let i=n?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,o=new Set;for(let l of r){let _=n?Z(i.children):i.children.find(s=>s.frame===l);if(_&&!_.isFrozen()&&_.frame==l)i=_;else{let s=i;i=new Mr(l,i),s.children.push(i)}i.addToTotalWeight(a),o.add(i.frame)}if(i.addToSelfWeight(a),n)for(let l of i.children)l.freeze();if(n){i.frame.addToSelfWeight(a);for(let l of o)l.addToTotalWeight(a);i===Z(this.samples)?this.weights[this.weights.length-1]+=a:(this.samples.push(i),this.weights.push(a))}}appendSampleWithWeight(r,a){if(a===0)return;if(a<0)throw new Error("Samples must have positive weights");let n=r.map(i=>ue.getOrInsert(this.frames,i));this._appendSample(n,a,!0),this._appendSample(n,a,!1)}appendSampleWithTimestamp(r,a){if(this.pendingSample){if(a0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new It))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((r,a)=>r+a,0)),this.sortGroupedCallTree(),this}},de=class extends Wa{constructor(){super(...arguments);this.appendOrderStack=[this.appendOrderCalltreeRoot];this.groupedOrderStack=[this.groupedCalltreeRoot];this.framesInStack=new Map;this.stack=[];this.lastValue=0}addWeightsToFrames(r){let a=r-this.lastValue;for(let i of this.framesInStack.keys())i.addToTotalWeight(a);let n=Z(this.stack);n&&n.addToSelfWeight(a)}addWeightsToNodes(r,a){let n=r-this.lastValue;for(let o of a)o.addToTotalWeight(n);let i=Z(a);i&&i.addToSelfWeight(n)}_enterFrame(r,a,n){let i=n?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(a,i);let o=Z(i);if(o){if(n){let s=a-this.lastValue;if(s>0)this.samples.push(o),this.weights.push(a-this.lastValue);else if(s<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}let l=n?Z(o.children):o.children.find(s=>s.frame===r),_;l&&!l.isFrozen()&&l.frame==r?_=l:(_=new Mr(r,o),o.children.push(_)),i.push(_)}}enterFrame(r,a){let n=ue.getOrInsert(this.frames,r);this.addWeightsToFrames(a),this._enterFrame(n,a,!0),this._enterFrame(n,a,!1),this.stack.push(n);let i=this.framesInStack.get(n)||0;this.framesInStack.set(n,i+1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(r,a,n){let i=n?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(a,i),n){let o=this.appendOrderStack.pop();if(o==null)throw new Error(`Trying to leave ${r.key} when stack is empty`);if(this.lastValue==null)throw new Error(`Trying to leave a ${r.key} before any have been entered`);if(o.freeze(),o.frame.key!==r.key)throw new Error(`Tried to leave frame "${r.name}" while frame "${o.frame.name}" was at the top at ${a}`);let l=a-this.lastValue;if(l>0)this.samples.push(o),this.weights.push(a-this.lastValue);else if(l<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${a}`)}else this.groupedOrderStack.pop()}leaveFrame(r,a){let n=ue.getOrInsert(this.frames,r);this.addWeightsToFrames(a),this._leaveFrame(n,a,!0),this._leaveFrame(n,a,!1),this.stack.pop();let i=this.framesInStack.get(n);i!=null&&(i===1?this.framesInStack.delete(n):this.framesInStack.set(n,i-1),this.lastValue=a,this.totalWeight=Math.max(this.totalWeight,this.lastValue))}build(){if(this.appendOrderStack.length>1||this.groupedOrderStack.length>1)throw new Error("Tried to complete profile construction with a non-empty stack");return this.sortGroupedCallTree(),this}}});var Ft,Wc=ie(()=>{"use strict";(r=>{let t;(i=>(i.EVENTED="evented",i.SAMPLED="sampled"))(t=r.ProfileType||={});let e;(i=>(i.OPEN_FRAME="O",i.CLOSE_FRAME="C"))(e=r.EventType||={})})(Ft||={})});var xo=E((yj,Im)=>{Im.exports={name:"speedscope",version:"1.21.2",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.js"},scripts:{deploy:"./scripts/deploy.sh",prepack:'./scripts/prepack.sh --outdir "$(pwd)/dist/release" --protocol file',prettier:"prettier --write 'src/**/*.ts' 'src/**/*.tsx'",lint:"eslint 'src/**/*.ts' 'src/**/*.tsx'",jest:"./scripts/test-setup.sh && jest --runInBand",coverage:"npm run jest -- --coverage",typecheck:"tsc --noEmit",test:"./scripts/ci.sh",serve:"tsx scripts/dev-server.ts"},files:["bin/cli.js","dist/release/**","!*.map"],browserslist:["last 2 Chrome versions","last 2 Firefox versions"],author:"",license:"MIT",devDependencies:{"@types/jest":"22.2.3","@types/jszip":"3.1.4","@types/node":"14.0.1","@types/pako":"1.0.0","@typescript-eslint/eslint-plugin":"6.16.0","@typescript-eslint/parser":"6.16.0",acorn:"7.2.0",aphrodite:"2.1.0",esbuild:"0.24.2",eslint:"8.0.0","eslint-plugin-prettier":"5.1.2","eslint-plugin-react-hooks":"4.6.0",jest:"24.3.0",jsverify:"0.8.3",jszip:"3.1.5",pako:"1.0.6",preact:"10.4.1",prettier:"3.1.1",protobufjs:"6.8.8","source-map":"0.6.1","ts-jest":"24.3.0",tsx:"4.19.2",typescript:"5.3.3","typescript-json-schema":"0.42.0","uglify-es":"3.2.2","uint8array-json-parser":"0.0.2"},jest:{transform:{"^.+\\.tsx?$":"ts-jest"},setupFilesAfterEnv:["./src/jest-setup.js"],testRegex:"\\.test\\.tsx?$",collectCoverageFrom:["**/*.{ts,tsx}","!**/*.d.{ts,tsx}"],moduleFileExtensions:["ts","tsx","js","jsx","json"]},dependencies:{open:"7.2.0"}}});function Fm(t){let e=[],r=new Map;function a(i){let o=r.get(i);if(o==null){let l={name:i.name};i.file!=null&&(l.file=i.file),i.line!=null&&(l.line=i.line),i.col!=null&&(l.col=i.col),o=e.length,r.set(i,o),e.push(l)}return o}let n={exporter:`speedscope@${xo().version}`,name:t.name,activeProfileIndex:t.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:e},profiles:[]};for(let i of t.profiles)n.profiles.push(Mm(i,a));return n}function Mm(t,e){let r={type:Ft.ProfileType.EVENTED,name:t.getName(),unit:t.getWeightUnit(),startValue:0,endValue:t.getTotalWeight(),events:[]},a=(i,o)=>{r.events.push({type:Ft.EventType.OPEN_FRAME,frame:e(i.frame),at:o})},n=(i,o)=>{r.events.push({type:Ft.EventType.CLOSE_FRAME,frame:e(i.frame),at:o})};return t.forEachCall(a,n),r}function Om(t,e){function r(i){let{name:o,unit:l}=t;switch(l){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":i.setValueFormatter(new Y(l));break;case"bytes":i.setValueFormatter(new Pe);break;case"none":i.setValueFormatter(new It);break}i.setName(o)}function a(i){let{startValue:o,endValue:l,events:_}=i,s=new de(l-o);r(s);let c=e.map((h,f)=>({key:f,...h}));for(let h of _)switch(h.type){case Ft.EventType.OPEN_FRAME:{s.enterFrame(c[h.frame],h.at-o);break}case Ft.EventType.CLOSE_FRAME:{s.leaveFrame(c[h.frame],h.at-o);break}}return s.build()}function n(i){let{startValue:o,endValue:l,samples:_,weights:s}=i,c=new ne(l-o);r(c);let h=e.map((f,v)=>({key:v,...f}));if(_.length!==s.length)throw new Error(`Expected samples.length (${_.length}) to equal weights.length (${s.length})`);for(let f=0;f<_.length;f++){let v=_[f],b=s[f];c.appendSampleWithWeight(v.map(p=>h[p]),b)}return c.build()}switch(t.type){case Ft.ProfileType.EVENTED:return a(t);case Ft.ProfileType.SAMPLED:return n(t)}}function ko(t){return{name:t.name||t.profiles[0].name||"profile",indexToView:t.activeProfileIndex||0,profiles:t.profiles.map(e=>Om(e,t.shared.frames))}}function Gc(t){let e=Fm(t),r=new Blob([JSON.stringify(e)],{type:"text/json"}),n=`${(e.name?e.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",n);let i=document.createElement("a");i.download=n,i.href=window.URL.createObjectURL(r),i.dataset.downloadurl=["text/json",i.download,i.href].join(":"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}var Ao=ie(()=>{"use strict";Re();He();Wc()});var mh=E(Bo=>{var vh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Bo.encode=function(t){if(0<=t&&t{var gh=mh(),Po=5,yh=1<>1;return e?-r:r}Do.encode=function(e){var r="",a,n=h1(e);do a=n&bh,n>>>=Po,n>0&&(a|=Sh),r+=gh.encode(a);while(n>0);return r};Do.decode=function(e,r,a){var n=e.length,i=0,o=0,l,_;do{if(r>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(_=gh.decode(e.charCodeAt(r++)),_===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));l=!!(_&Sh),_&=bh,i=i+(_<{function u1(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Le.getArg=u1;var jh=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,d1=/^data:.+\,.+$/;function bn(t){var e=t.match(jh);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Le.urlParse=bn;function Dr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Le.urlGenerate=Dr;function Vo(t){var e=t,r=bn(t);if(r){if(!r.path)return t;e=r.path}for(var a=Le.isAbsolute(e),n=e.split(/\/+/),i,o=0,l=n.length-1;l>=0;l--)i=n[l],i==="."?n.splice(l,1):i===".."?o++:o>0&&(i===""?(n.splice(l+1,o),o=0):(n.splice(l,2),o--));return e=n.join("/"),e===""&&(e=a?"/":"."),r?(r.path=e,Dr(r)):e}Le.normalize=Vo;function Ch(t,e){t===""&&(t="."),e===""&&(e=".");var r=bn(e),a=bn(t);if(a&&(t=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),Dr(r);if(r||e.match(d1))return e;if(a&&!a.host&&!a.path)return a.host=e,Dr(a);var n=e.charAt(0)==="/"?e:Vo(t.replace(/\/+$/,"")+"/"+e);return a?(a.path=n,Dr(a)):n}Le.join=Ch;Le.isAbsolute=function(t){return t.charAt(0)==="/"||jh.test(t)};function p1(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var a=t.lastIndexOf("/");if(a<0||(t=t.slice(0,a),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Le.relative=p1;var wh=function(){var t=Object.create(null);return!("__proto__"in t)}();function xh(t){return t}function v1(t){return kh(t)?"$"+t:t}Le.toSetString=wh?xh:v1;function m1(t){return kh(t)?t.slice(1):t}Le.fromSetString=wh?xh:m1;function kh(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function g1(t,e,r){var a=zr(t.source,e.source);return a!==0||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0||r)||(a=t.generatedColumn-e.generatedColumn,a!==0)||(a=t.generatedLine-e.generatedLine,a!==0)?a:zr(t.name,e.name)}Le.compareByOriginalPositions=g1;function y1(t,e,r){var a=t.generatedLine-e.generatedLine;return a!==0||(a=t.generatedColumn-e.generatedColumn,a!==0||r)||(a=zr(t.source,e.source),a!==0)||(a=t.originalLine-e.originalLine,a!==0)||(a=t.originalColumn-e.originalColumn,a!==0)?a:zr(t.name,e.name)}Le.compareByGeneratedPositionsDeflated=y1;function zr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function b1(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=zr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:zr(t.name,e.name)}Le.compareByGeneratedPositionsInflated=b1;function S1(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Le.parseSourceMapInput=S1;function j1(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var a=bn(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var n=a.path.lastIndexOf("/");n>=0&&(a.path=a.path.substring(0,n+1))}e=Ch(Dr(a),e)}return Vo(e)}Le.computeSourceURL=j1});var Ko=E(Ah=>{var Jo=Vr(),Uo=Object.prototype.hasOwnProperty,fr=typeof Map<"u";function Bt(){this._array=[],this._set=fr?new Map:Object.create(null)}Bt.fromArray=function(e,r){for(var a=new Bt,n=0,i=e.length;n=0)return r}else{var a=Jo.toSetString(e);if(Uo.call(this._set,a))return this._set[a]}throw new Error('"'+e+'" is not in the set.')};Bt.prototype.at=function(e){if(e>=0&&e{var Nh=Vr();function C1(t,e){var r=t.generatedLine,a=e.generatedLine,n=t.generatedColumn,i=e.generatedColumn;return a>r||a==r&&i>=n||Nh.compareByGeneratedPositionsInflated(t,e)<=0}function ai(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ai.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};ai.prototype.add=function(e){C1(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};ai.prototype.toArray=function(){return this._sorted||(this._array.sort(Nh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Eh.MappingList=ai});var $o=E(Hh=>{var Sn=zo(),pe=Vr(),ii=Ko().ArraySet,w1=Th().MappingList;function Qe(t){t||(t={}),this._file=pe.getArg(t,"file",null),this._sourceRoot=pe.getArg(t,"sourceRoot",null),this._skipValidation=pe.getArg(t,"skipValidation",!1),this._sources=new ii,this._names=new ii,this._mappings=new w1,this._sourcesContents=null}Qe.prototype._version=3;Qe.fromSourceMap=function(e){var r=e.sourceRoot,a=new Qe({file:e.file,sourceRoot:r});return e.eachMapping(function(n){var i={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(i.source=n.source,r!=null&&(i.source=pe.relative(r,i.source)),i.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(i.name=n.name)),a.addMapping(i)}),e.sources.forEach(function(n){var i=n;r!==null&&(i=pe.relative(r,n)),a._sources.has(i)||a._sources.add(i);var o=e.sourceContentFor(n);o!=null&&a.setSourceContent(n,o)}),a};Qe.prototype.addMapping=function(e){var r=pe.getArg(e,"generated"),a=pe.getArg(e,"original",null),n=pe.getArg(e,"source",null),i=pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,a,n,i),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:a!=null&&a.line,originalColumn:a!=null&&a.column,source:n,name:i})};Qe.prototype.setSourceContent=function(e,r){var a=e;this._sourceRoot!=null&&(a=pe.relative(this._sourceRoot,a)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[pe.toSetString(a)]=r):this._sourcesContents&&(delete this._sourcesContents[pe.toSetString(a)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Qe.prototype.applySourceMap=function(e,r,a){var n=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}var i=this._sourceRoot;i!=null&&(n=pe.relative(i,n));var o=new ii,l=new ii;this._mappings.unsortedForEach(function(_){if(_.source===n&&_.originalLine!=null){var s=e.originalPositionFor({line:_.originalLine,column:_.originalColumn});s.source!=null&&(_.source=s.source,a!=null&&(_.source=pe.join(a,_.source)),i!=null&&(_.source=pe.relative(i,_.source)),_.originalLine=s.line,_.originalColumn=s.column,s.name!=null&&(_.name=s.name))}var c=_.source;c!=null&&!o.has(c)&&o.add(c);var h=_.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=o,this._names=l,e.sources.forEach(function(_){var s=e.sourceContentFor(_);s!=null&&(a!=null&&(_=pe.join(a,_)),i!=null&&(_=pe.relative(i,_)),this.setSourceContent(_,s))},this)};Qe.prototype._validateMapping=function(e,r,a,n){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!a&&!n)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&a)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:a,original:r,name:n}))}};Qe.prototype._serializeMappings=function(){for(var e=0,r=1,a=0,n=0,i=0,o=0,l="",_,s,c,h,f=this._mappings.toArray(),v=0,b=f.length;v0){if(!pe.compareByGeneratedPositionsInflated(s,f[v-1]))continue;_+=","}_+=Sn.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(h=this._sources.indexOf(s.source),_+=Sn.encode(h-o),o=h,_+=Sn.encode(s.originalLine-1-n),n=s.originalLine-1,_+=Sn.encode(s.originalColumn-a),a=s.originalColumn,s.name!=null&&(c=this._names.indexOf(s.name),_+=Sn.encode(c-i),i=c)),l+=_}return l};Qe.prototype._generateSourcesContent=function(e,r){return e.map(function(a){if(!this._sourcesContents)return null;r!=null&&(a=pe.relative(r,a));var n=pe.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Qe.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Qe.prototype.toString=function(){return JSON.stringify(this.toJSON())};Hh.SourceMapGenerator=Qe});var Rh=E(ur=>{ur.GREATEST_LOWER_BOUND=1;ur.LEAST_UPPER_BOUND=2;function Wo(t,e,r,a,n,i){var o=Math.floor((e-t)/2)+t,l=n(r,a[o],!0);return l===0?o:l>0?e-o>1?Wo(o,e,r,a,n,i):i==ur.LEAST_UPPER_BOUND?e1?Wo(t,o,r,a,n,i):i==ur.LEAST_UPPER_BOUND?o:t<0?-1:t}ur.search=function(e,r,a,n){if(r.length===0)return-1;var i=Wo(-1,r.length,e,r,a,n||ur.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&a(r[i],r[i-1],!0)===0;)--i;return i}});var Ih=E(Lh=>{function Go(t,e,r){var a=t[e];t[e]=t[r],t[r]=a}function x1(t,e){return Math.round(t+Math.random()*(e-t))}function qo(t,e,r,a){if(r{var L=Vr(),Xo=Rh(),Jr=Ko().ArraySet,k1=zo(),jn=Ih().quickSort;function re(t,e){var r=t;return typeof t=="string"&&(r=L.parseSourceMapInput(t)),r.sections!=null?new st(r,e):new ke(r,e)}re.fromSourceMap=function(t,e){return ke.fromSourceMap(t,e)};re.prototype._version=3;re.prototype.__generatedMappings=null;Object.defineProperty(re.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});re.prototype.__originalMappings=null;Object.defineProperty(re.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});re.prototype._charIsMappingSeparator=function(e,r){var a=e.charAt(r);return a===";"||a===","};re.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};re.GENERATED_ORDER=1;re.ORIGINAL_ORDER=2;re.GREATEST_LOWER_BOUND=1;re.LEAST_UPPER_BOUND=2;re.prototype.eachMapping=function(e,r,a){var n=r||null,i=a||re.GENERATED_ORDER,o;switch(i){case re.GENERATED_ORDER:o=this._generatedMappings;break;case re.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;o.map(function(_){var s=_.source===null?null:this._sources.at(_.source);return s=L.computeSourceURL(l,s,this._sourceMapURL),{source:s,generatedLine:_.generatedLine,generatedColumn:_.generatedColumn,originalLine:_.originalLine,originalColumn:_.originalColumn,name:_.name===null?null:this._names.at(_.name)}},this).forEach(e,n)};re.prototype.allGeneratedPositionsFor=function(e){var r=L.getArg(e,"line"),a={source:L.getArg(e,"source"),originalLine:r,originalColumn:L.getArg(e,"column",0)};if(a.source=this._findSourceIndex(a.source),a.source<0)return[];var n=[],i=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",L.compareByOriginalPositions,Xo.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(e.column===void 0)for(var l=o.originalLine;o&&o.originalLine===l;)n.push({line:L.getArg(o,"generatedLine",null),column:L.getArg(o,"generatedColumn",null),lastColumn:L.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var _=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==_;)n.push({line:L.getArg(o,"generatedLine",null),column:L.getArg(o,"generatedColumn",null),lastColumn:L.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return n};oi.SourceMapConsumer=re;function ke(t,e){var r=t;typeof t=="string"&&(r=L.parseSourceMapInput(t));var a=L.getArg(r,"version"),n=L.getArg(r,"sources"),i=L.getArg(r,"names",[]),o=L.getArg(r,"sourceRoot",null),l=L.getArg(r,"sourcesContent",null),_=L.getArg(r,"mappings"),s=L.getArg(r,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);o&&(o=L.normalize(o)),n=n.map(String).map(L.normalize).map(function(c){return o&&L.isAbsolute(o)&&L.isAbsolute(c)?L.relative(o,c):c}),this._names=Jr.fromArray(i.map(String),!0),this._sources=Jr.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(c){return L.computeSourceURL(o,c,e)}),this.sourceRoot=o,this.sourcesContent=l,this._mappings=_,this._sourceMapURL=e,this.file=s}ke.prototype=Object.create(re.prototype);ke.prototype.consumer=re;ke.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=L.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r1&&(p.source=l+m[1],l+=m[1],p.originalLine=i+m[2],i=p.originalLine,p.originalLine+=1,p.originalColumn=o+m[3],o=p.originalColumn,m.length>4&&(p.name=_+m[4],_+=m[4])),b.push(p),typeof p.originalLine=="number"&&v.push(p)}jn(b,L.compareByGeneratedPositionsDeflated),this.__generatedMappings=b,jn(v,L.compareByOriginalPositions),this.__originalMappings=v};ke.prototype._findMapping=function(e,r,a,n,i,o){if(e[a]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[a]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return Xo.search(e,r,i,o)};ke.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[a];if(n.generatedLine===r.generatedLine){var i=L.getArg(n,"source",null);i!==null&&(i=this._sources.at(i),i=L.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=L.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:L.getArg(n,"originalLine",null),column:L.getArg(n,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ke.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ke.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var a=this._findSourceIndex(e);if(a>=0)return this.sourcesContent[a];var n=e;this.sourceRoot!=null&&(n=L.relative(this.sourceRoot,n));var i;if(this.sourceRoot!=null&&(i=L.urlParse(this.sourceRoot))){var o=n.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(r)return null;throw new Error('"'+n+'" is not in the SourceMap.')};ke.prototype.generatedPositionFor=function(e){var r=L.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var a={source:r,originalLine:L.getArg(e,"line"),originalColumn:L.getArg(e,"column")},n=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",L.compareByOriginalPositions,L.getArg(e,"bias",re.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===a.source)return{line:L.getArg(i,"generatedLine",null),column:L.getArg(i,"generatedColumn",null),lastColumn:L.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};oi.BasicSourceMapConsumer=ke;function st(t,e){var r=t;typeof t=="string"&&(r=L.parseSourceMapInput(t));var a=L.getArg(r,"version"),n=L.getArg(r,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new Jr,this._names=new Jr;var i={line:-1,column:0};this._sections=n.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var l=L.getArg(o,"offset"),_=L.getArg(l,"line"),s=L.getArg(l,"column");if(_{var A1=$o().SourceMapGenerator,li=Vr(),N1=/(\r?\n)/,E1=10,Ur="$$$isSourceNode$$$";function $e(t,e,r,a,n){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=n??null,this[Ur]=!0,a!=null&&this.add(a)}$e.fromStringWithSourceMap=function(e,r,a){var n=new $e,i=e.split(N1),o=0,l=function(){var f=b(),v=b()||"";return f+v;function b(){return o=0;r--)this.prepend(e[r]);else if(e[Ur]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};$e.prototype.walk=function(e){for(var r,a=0,n=this.children.length;a0){for(r=[],a=0;a{si.SourceMapGenerator=$o().SourceMapGenerator;si.SourceMapConsumer=Mh().SourceMapConsumer;si.SourceNode=Bh().SourceNode});function K1(t){let e=[];function r(a){e.push({id:a.id,callFrame:{columnNumber:0,functionName:a.functionName,lineNumber:a.lineNumber,scriptId:a.scriptId,url:a.url},hitCount:a.hitCount,children:a.children.map(n=>n.id)}),a.children.forEach(r)}return r(t),e}function $1(t,e){return t.map((r,a)=>{let n=a===0?e*1e6:t[a-1];return r-n})}function Wh(t){return{samples:t.samples,startTime:t.startTime*1e6,endTime:t.endTime*1e6,nodes:K1(t.head),timeDeltas:$1(t.timestamps,t.startTime)}}var Gh=ie(()=>{"use strict"});function tl(t){if(!Array.isArray(t)||t.length<1)return!1;let e=t[0];return!(!("pid"in e&&"tid"in e&&"ph"in e&&"cat"in e)||!t.find(r=>r.name==="CpuProfile"||r.name==="Profile"||r.name==="ProfileChunk"))}function Xh(t){return"traceEvents"in t?tl(t.traceEvents):!1}function wn(t,e){let r=new Map,a=new Map,n=new Map;Ie(t,i=>i.ts);for(let i of t){if(i.name==="CpuProfile"){let o=`${i.pid}:${i.tid}`,l=i.id||o;r.set(l,i.args.data.cpuProfile),a.set(l,o)}if(i.name==="Profile"){let o=`${i.pid}:${i.tid}`;r.set(i.id||o,{startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[],...i.args.data}),i.id&&a.set(i.id,`${i.pid}:${i.tid}`)}if(i.name==="thread_name"&&n.set(`${i.pid}:${i.tid}`,i.args.name),i.name==="ProfileChunk"){let o=`${i.pid}:${i.tid}`,l=r.get(i.id||o);if(l){let _=i.args.data;_.cpuProfile&&(_.cpuProfile.nodes&&(l.nodes=l.nodes.concat(_.cpuProfile.nodes)),_.cpuProfile.samples&&(l.samples=l.samples.concat(_.cpuProfile.samples))),_.timeDeltas&&(l.timeDeltas=l.timeDeltas.concat(_.timeDeltas)),_.startTime!=null&&(l.startTime=_.startTime),_.endTime!=null&&(l.endTime=_.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${i.id||o}`)}}if(r.size>0){let i=[],o=0;return Ns(r.keys(),l=>{let _=null,s=a.get(l);s&&(_=n.get(s)||null);let c=ci(r.get(l));_&&r.size>1?(c.setName(`${e} - ${_}`),_==="CrRendererMain"&&(o=i.length)):c.setName(`${e}`),i.push(c)}),{name:e,indexToView:o,profiles:i}}else throw new Error("Could not find CPU profile in Timeline")}function el(t){return Ce(W1,t,e=>{let r=e.url,a=e.lineNumber;a!=null&&a++;let n=e.columnNumber;n!=null&&n++;let i=e.functionName||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)");return{key:`${i}:${r}:${a}:${n}`,name:i,file:r,line:a,col:n}})}function G1(t){let{functionName:e,url:r}=t;return r==="native dummy.js"?!0:e==="(root)"||e==="(idle)"}function qh(t){return t==="(garbage collector)"||t==="(program)"}function ci(t){let e=new de(t.endTime-t.startTime),r=new Map;for(let s of t.nodes)r.set(s.id,s);for(let s of t.nodes)if(typeof s.parent=="number"&&(s.parent=r.get(s.parent)),!!s.children)for(let c of s.children){let h=r.get(c);h&&(h.parent=s)}let a=[],n=[],i=t.timeDeltas[0],o=i,l=NaN;for(let s=0;s0&&Z(_)!=v;){let p=_.pop(),d=el(p.callFrame);e.leaveFrame(d,c)}let b=[];for(let p=f;p&&p!=v&&!G1(p.callFrame);p=qh(p.callFrame.functionName)?Z(_):p.parent||null)b.push(p);b.reverse();for(let p of b)e.enterFrame(el(p.callFrame),c);_=_.concat(b)}for(let s=_.length-1;s>=0;s--)e.leaveFrame(el(_[s].callFrame),Z(n));return e.setValueFormatter(new Y("microseconds")),e.build()}function Yh(t){return ci(Wh(t))}var W1,Zh=ie(()=>{"use strict";Re();$();He();Gh();W1=new Map});function rl(t){let{frames:e,mode:r,raw:a,raw_timestamp_deltas:n,interval:i}=t,o=new ne;o.setValueFormatter(new Y("microseconds"));let l=0,_=[];for(let s=0;s{"use strict";Re();He()});var Pt=E(Fe=>{"use strict";var q1=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function X1(t,e){return Object.prototype.hasOwnProperty.call(t,e)}Fe.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var a in r)X1(r,a)&&(t[a]=r[a])}}return t};Fe.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var Y1={arraySet:function(t,e,r,a,n){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+a),n);return}for(var i=0;i{"use strict";var Q1=Pt(),eg=4,ef=0,tf=1,tg=2;function Wr(t){for(var e=t.length;--e>=0;)t[e]=0}var rg=0,sf=1,ng=2,ag=3,ig=258,_l=29,Tn=256,kn=Tn+1+_l,$r=30,cl=19,_f=2*kn+1,dr=15,nl=16,og=7,hl=256,cf=16,hf=17,ff=18,ll=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],hi=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],lg=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],uf=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],sg=512,Dt=new Array((kn+2)*2);Wr(Dt);var xn=new Array($r*2);Wr(xn);var An=new Array(sg);Wr(An);var Nn=new Array(ig-ag+1);Wr(Nn);var fl=new Array(_l);Wr(fl);var fi=new Array($r);Wr(fi);function al(t,e,r,a,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=a,this.max_length=n,this.has_stree=t&&t.length}var df,pf,vf;function il(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function mf(t){return t<256?An[t]:An[256+(t>>>7)]}function En(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function De(t,e,r){t.bi_valid>nl-r?(t.bi_buf|=e<>nl-t.bi_valid,t.bi_valid+=r-nl):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function _g(t){t.bi_valid===16?(En(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function cg(t,e){var r=e.dyn_tree,a=e.max_code,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,_=e.stat_desc.max_length,s,c,h,f,v,b,p=0;for(f=0;f<=dr;f++)t.bl_count[f]=0;for(r[t.heap[t.heap_max]*2+1]=0,s=t.heap_max+1;s<_f;s++)c=t.heap[s],f=r[r[c*2+1]*2+1]+1,f>_&&(f=_,p++),r[c*2+1]=f,!(c>a)&&(t.bl_count[f]++,v=0,c>=l&&(v=o[c-l]),b=r[c*2],t.opt_len+=b*(f+v),i&&(t.static_len+=b*(n[c*2+1]+v)));if(p!==0){do{for(f=_-1;t.bl_count[f]===0;)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[_]--,p-=2}while(p>0);for(f=_;f!==0;f--)for(c=t.bl_count[f];c!==0;)h=t.heap[--s],!(h>a)&&(r[h*2+1]!==f&&(t.opt_len+=(f-r[h*2+1])*r[h*2],r[h*2+1]=f),c--)}}function yf(t,e,r){var a=new Array(dr+1),n=0,i,o;for(i=1;i<=dr;i++)a[i]=n=n+r[i-1]<<1;for(o=0;o<=e;o++){var l=t[o*2+1];l!==0&&(t[o*2]=gf(a[l]++,l))}}function hg(){var t,e,r,a,n,i=new Array(dr+1);for(r=0,a=0;a<_l-1;a++)for(fl[a]=r,t=0;t<1<>=7;a<$r;a++)for(fi[a]=n<<7,t=0;t<1<8?En(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function fg(t,e,r,a){Sf(t),a&&(En(t,r),En(t,~r)),Q1.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function rf(t,e,r,a){var n=e*2,i=r*2;return t[n]>1;o>=1;o--)ol(t,r,o);s=i;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ol(t,r,1),l=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=l,r[s*2]=r[o*2]+r[l*2],t.depth[s]=(t.depth[o]>=t.depth[l]?t.depth[o]:t.depth[l])+1,r[o*2+1]=r[l*2+1]=s,t.heap[1]=s++,ol(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],cg(t,e),yf(r,_,t.bl_count)}function af(t,e,r){var a,n=-1,i,o=e[0*2+1],l=0,_=7,s=4;for(o===0&&(_=138,s=3),e[(r+1)*2+1]=65535,a=0;a<=r;a++)i=o,o=e[(a+1)*2+1],!(++l<_&&i===o)&&(l=3&&t.bl_tree[uf[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function dg(t,e,r,a){var n;for(De(t,e-257,5),De(t,r-1,5),De(t,a-4,4),n=0;n>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return ef;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return tf;for(r=32;r0?(t.strm.data_type===tg&&(t.strm.data_type=pg(t)),sl(t,t.l_desc),sl(t,t.d_desc),o=ug(t),n=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=n&&(n=i)):n=i=r+5,r+4<=n&&e!==-1?jf(t,e,r,a):t.strategy===eg||i===n?(De(t,(sf<<1)+(a?1:0),3),nf(t,Dt,xn)):(De(t,(ng<<1)+(a?1:0),3),dg(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),nf(t,t.dyn_ltree,t.dyn_dtree)),bf(t),a&&Sf(t)}function yg(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(Nn[r]+Tn+1)*2]++,t.dyn_dtree[mf(e)*2]++),t.last_lit===t.lit_bufsize-1}Gr._tr_init=vg;Gr._tr_stored_block=jf;Gr._tr_flush_block=gg;Gr._tr_tally=yg;Gr._tr_align=mg});var ul=E((Yk,wf)=>{"use strict";function bg(t,e,r,a){for(var n=t&65535|0,i=t>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+e[a++]|0,i=i+n|0;while(--o);n%=65521,i%=65521}return n|i<<16|0}wf.exports=bg});var dl=E((Zk,xf)=>{"use strict";function Sg(){for(var t,e=[],r=0;r<256;r++){t=r;for(var a=0;a<8;a++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var jg=Sg();function Cg(t,e,r,a){var n=jg,i=a+r;t^=-1;for(var o=a;o>>8^n[(t^e[o])&255];return t^-1}xf.exports=Cg});var ui=E((Qk,kf)=>{"use strict";kf.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Ff=E(wt=>{"use strict";var Me=Pt(),et=Cf(),Tf=ul(),Gt=dl(),wg=ui(),gr=0,xg=1,kg=3,Qt=4,Af=5,Ct=0,Nf=1,tt=-2,Ag=-3,pl=-5,Ng=-1,Eg=1,di=2,Tg=3,Hg=4,Rg=0,Lg=2,gi=8,Ig=9,Fg=15,Mg=8,Og=29,Bg=256,ml=Bg+1+Og,Pg=30,Dg=19,zg=2*ml+1,Vg=15,K=3,Yt=258,_t=Yt+K+1,Jg=32,yi=42,gl=69,pi=73,vi=91,mi=103,pr=113,Rn=666,ye=1,Ln=2,vr=3,Yr=4,Ug=3;function Zt(t,e){return t.msg=wg[e],e}function Ef(t){return(t<<1)-(t>4?9:0)}function Xt(t){for(var e=t.length;--e>=0;)t[e]=0}function qt(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(Me.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Ae(t,e){et._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,qt(t.strm)}function G(t,e){t.pending_buf[t.pending++]=e}function Hn(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function Kg(t,e,r,a){var n=t.avail_in;return n>a&&(n=a),n===0?0:(t.avail_in-=n,Me.arraySet(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=Tf(t.adler,e,n,r):t.state.wrap===2&&(t.adler=Gt(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function Hf(t,e){var r=t.max_chain_length,a=t.strstart,n,i,o=t.prev_length,l=t.nice_match,_=t.strstart>t.w_size-_t?t.strstart-(t.w_size-_t):0,s=t.window,c=t.w_mask,h=t.prev,f=t.strstart+Yt,v=s[a+o-1],b=s[a+o];t.prev_length>=t.good_match&&(r>>=2),l>t.lookahead&&(l=t.lookahead);do if(n=e,!(s[n+o]!==b||s[n+o-1]!==v||s[n]!==s[a]||s[++n]!==s[a+1])){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&ao){if(t.match_start=e,o=i,i>=l)break;v=s[a+o-1],b=s[a+o]}}while((e=h[e&c])>_&&--r!==0);return o<=t.lookahead?o:t.lookahead}function mr(t){var e=t.w_size,r,a,n,i,o;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-_t)){Me.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,a=t.hash_size,r=a;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--a);a=e,r=a;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--a);i+=e}if(t.strm.avail_in===0)break;if(a=Kg(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=K)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(mr(t),t.lookahead===0&&e===gr)return ye;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var a=t.block_start+r;if((t.strstart===0||t.strstart>=a)&&(t.lookahead=t.strstart-a,t.strstart=a,Ae(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-_t&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):(t.strstart>t.block_start&&(Ae(t,!1),t.strm.avail_out===0),ye)}function vl(t,e){for(var r,a;;){if(t.lookahead<_t){if(mr(t),t.lookahead<_t&&e===gr)return ye;if(t.lookahead===0)break}if(r=0,t.lookahead>=K&&(t.ins_h=(t.ins_h<=K)if(a=et._tr_tally(t,t.strstart-t.match_start,t.match_length-K),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=K){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=K&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=K-1)),t.prev_length>=K&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-K,a=et._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-K),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=K&&t.strstart>0&&(n=t.strstart-1,a=o[n],a===o[++n]&&a===o[++n]&&a===o[++n])){i=t.strstart+Yt;do;while(a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=K?(r=et._tr_tally(t,1,t.match_length-K),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=et._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?ye:Ln}function Gg(t,e){for(var r;;){if(t.lookahead===0&&(mr(t),t.lookahead===0)){if(e===gr)return ye;break}if(t.match_length=0,r=et._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Ae(t,!1),t.strm.avail_out===0))return ye}return t.insert=0,e===Qt?(Ae(t,!0),t.strm.avail_out===0?vr:Yr):t.last_lit&&(Ae(t,!1),t.strm.avail_out===0)?ye:Ln}function jt(t,e,r,a,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=a,this.func=n}var Xr;Xr=[new jt(0,0,0,0,$g),new jt(4,4,8,4,vl),new jt(4,5,16,8,vl),new jt(4,6,32,32,vl),new jt(4,4,16,16,qr),new jt(8,16,32,32,qr),new jt(8,16,128,128,qr),new jt(8,32,128,256,qr),new jt(32,128,258,1024,qr),new jt(32,258,258,4096,qr)];function qg(t){t.window_size=2*t.w_size,Xt(t.head),t.max_lazy_match=Xr[t.level].max_lazy,t.good_match=Xr[t.level].good_length,t.nice_match=Xr[t.level].nice_length,t.max_chain_length=Xr[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=K-1,t.match_available=0,t.ins_h=0}function Xg(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=gi,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Me.Buf16(zg*2),this.dyn_dtree=new Me.Buf16((2*Pg+1)*2),this.bl_tree=new Me.Buf16((2*Dg+1)*2),Xt(this.dyn_ltree),Xt(this.dyn_dtree),Xt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Me.Buf16(Vg+1),this.heap=new Me.Buf16(2*ml+1),Xt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Me.Buf16(2*ml+1),Xt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Rf(t){var e;return!t||!t.state?Zt(t,tt):(t.total_in=t.total_out=0,t.data_type=Lg,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?yi:pr,t.adler=e.wrap===2?0:1,e.last_flush=gr,et._tr_init(e),Ct)}function Lf(t){var e=Rf(t);return e===Ct&&qg(t.state),e}function Yg(t,e){return!t||!t.state||t.state.wrap!==2?tt:(t.state.gzhead=e,Ct)}function If(t,e,r,a,n,i){if(!t)return tt;var o=1;if(e===Ng&&(e=6),a<0?(o=0,a=-a):a>15&&(o=2,a-=16),n<1||n>Ig||r!==gi||a<8||a>15||e<0||e>9||i<0||i>Hg)return Zt(t,tt);a===8&&(a=9);var l=new Xg;return t.state=l,l.strm=t,l.wrap=o,l.gzhead=null,l.w_bits=a,l.w_size=1<Af||e<0)return t?Zt(t,tt):tt;if(a=t.state,!t.output||!t.input&&t.avail_in!==0||a.status===Rn&&e!==Qt)return Zt(t,t.avail_out===0?pl:tt);if(a.strm=t,r=a.last_flush,a.last_flush=e,a.status===yi)if(a.wrap===2)t.adler=0,G(a,31),G(a,139),G(a,8),a.gzhead?(G(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),G(a,a.gzhead.time&255),G(a,a.gzhead.time>>8&255),G(a,a.gzhead.time>>16&255),G(a,a.gzhead.time>>24&255),G(a,a.level===9?2:a.strategy>=di||a.level<2?4:0),G(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(G(a,a.gzhead.extra.length&255),G(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=Gt(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=gl):(G(a,0),G(a,0),G(a,0),G(a,0),G(a,0),G(a,a.level===9?2:a.strategy>=di||a.level<2?4:0),G(a,Ug),a.status=pr);else{var o=gi+(a.w_bits-8<<4)<<8,l=-1;a.strategy>=di||a.level<2?l=0:a.level<6?l=1:a.level===6?l=2:l=3,o|=l<<6,a.strstart!==0&&(o|=Jg),o+=31-o%31,a.status=pr,Hn(a,o),a.strstart!==0&&(Hn(a,t.adler>>>16),Hn(a,t.adler&65535)),t.adler=1}if(a.status===gl)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size));)G(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=pi)}else a.status=pi;if(a.status===pi)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size)){i=1;break}a.gzindexn&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),i===0&&(a.gzindex=0,a.status=vi)}else a.status=vi;if(a.status===vi)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),qt(t),n=a.pending,a.pending===a.pending_buf_size)){i=1;break}a.gzindexn&&(t.adler=Gt(t.adler,a.pending_buf,a.pending-n,n)),i===0&&(a.status=mi)}else a.status=mi;if(a.status===mi&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&qt(t),a.pending+2<=a.pending_buf_size&&(G(a,t.adler&255),G(a,t.adler>>8&255),t.adler=0,a.status=pr)):a.status=pr),a.pending!==0){if(qt(t),t.avail_out===0)return a.last_flush=-1,Ct}else if(t.avail_in===0&&Ef(e)<=Ef(r)&&e!==Qt)return Zt(t,pl);if(a.status===Rn&&t.avail_in!==0)return Zt(t,pl);if(t.avail_in!==0||a.lookahead!==0||e!==gr&&a.status!==Rn){var _=a.strategy===di?Gg(a,e):a.strategy===Tg?Wg(a,e):Xr[a.level].func(a,e);if((_===vr||_===Yr)&&(a.status=Rn),_===ye||_===vr)return t.avail_out===0&&(a.last_flush=-1),Ct;if(_===Ln&&(e===xg?et._tr_align(a):e!==Af&&(et._tr_stored_block(a,0,0,!1),e===kg&&(Xt(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),qt(t),t.avail_out===0))return a.last_flush=-1,Ct}return e!==Qt?Ct:a.wrap<=0?Nf:(a.wrap===2?(G(a,t.adler&255),G(a,t.adler>>8&255),G(a,t.adler>>16&255),G(a,t.adler>>24&255),G(a,t.total_in&255),G(a,t.total_in>>8&255),G(a,t.total_in>>16&255),G(a,t.total_in>>24&255)):(Hn(a,t.adler>>>16),Hn(a,t.adler&65535)),qt(t),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?Ct:Nf)}function ey(t){var e;return!t||!t.state?tt:(e=t.state.status,e!==yi&&e!==gl&&e!==pi&&e!==vi&&e!==mi&&e!==pr&&e!==Rn?Zt(t,tt):(t.state=null,e===pr?Zt(t,Ag):Ct))}function ty(t,e){var r=e.length,a,n,i,o,l,_,s,c;if(!t||!t.state||(a=t.state,o=a.wrap,o===2||o===1&&a.status!==yi||a.lookahead))return tt;for(o===1&&(t.adler=Tf(t.adler,e,r,0)),a.wrap=0,r>=a.w_size&&(o===0&&(Xt(a.head),a.strstart=0,a.block_start=0,a.insert=0),c=new Me.Buf8(a.w_size),Me.arraySet(c,e,r-a.w_size,a.w_size,0),e=c,r=a.w_size),l=t.avail_in,_=t.next_in,s=t.input,t.avail_in=r,t.next_in=0,t.input=e,mr(a);a.lookahead>=K;){n=a.strstart,i=a.lookahead-(K-1);do a.ins_h=(a.ins_h<{"use strict";var bi=Pt(),Mf=!0,Of=!0;try{String.fromCharCode.apply(null,[0])}catch{Mf=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Of=!1}var In=new bi.Buf8(256);for(zt=0;zt<256;zt++)In[zt]=zt>=252?6:zt>=248?5:zt>=240?4:zt>=224?3:zt>=192?2:1;var zt;In[254]=In[254]=1;Zr.string2buf=function(t){var e,r,a,n,i,o=t.length,l=0;for(n=0;n>>6,e[i++]=128|r&63):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|r&63):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|r&63);return e};function Bf(t,e){if(e<65537&&(t.subarray&&Of||!t.subarray&&Mf))return String.fromCharCode.apply(null,bi.shrinkBuf(t,e));for(var r="",a=0;a4){l[a++]=65533,r+=i-1;continue}for(n&=i===2?31:i===3?15:7;i>1&&r1){l[a++]=65533;continue}n<65536?l[a++]=n:(n-=65536,l[a++]=55296|n>>10&1023,l[a++]=56320|n&1023)}return Bf(l,a)};Zr.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+In[t[r]]>e?r:e}});var bl=E((r4,Pf)=>{"use strict";function ry(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Pf.exports=ry});var Jf=E(On=>{"use strict";var Fn=Ff(),Mn=Pt(),jl=yl(),Cl=ui(),ny=bl(),Vf=Object.prototype.toString,ay=0,Sl=4,Qr=0,Df=1,zf=2,iy=-1,oy=0,ly=8;function yr(t){if(!(this instanceof yr))return new yr(t);this.options=Mn.assign({level:iy,method:ly,chunkSize:16384,windowBits:15,memLevel:8,strategy:oy,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ny,this.strm.avail_out=0;var r=Fn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Qr)throw new Error(Cl[r]);if(e.header&&Fn.deflateSetHeader(this.strm,e.header),e.dictionary){var a;if(typeof e.dictionary=="string"?a=jl.string2buf(e.dictionary):Vf.call(e.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(e.dictionary):a=e.dictionary,r=Fn.deflateSetDictionary(this.strm,a),r!==Qr)throw new Error(Cl[r]);this._dict_set=!0}}yr.prototype.push=function(t,e){var r=this.strm,a=this.options.chunkSize,n,i;if(this.ended)return!1;i=e===~~e?e:e===!0?Sl:ay,typeof t=="string"?r.input=jl.string2buf(t):Vf.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Mn.Buf8(a),r.next_out=0,r.avail_out=a),n=Fn.deflate(r,i),n!==Df&&n!==Qr)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(i===Sl||i===zf))&&(this.options.to==="string"?this.onData(jl.buf2binstring(Mn.shrinkBuf(r.output,r.next_out))):this.onData(Mn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==Df);return i===Sl?(n=Fn.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qr):(i===zf&&(this.onEnd(Qr),r.avail_out=0),!0)};yr.prototype.onData=function(t){this.chunks.push(t)};yr.prototype.onEnd=function(t){t===Qr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function wl(t,e){var r=new yr(e);if(r.push(t,!0),r.err)throw r.msg||Cl[r.err];return r.result}function sy(t,e){return e=e||{},e.raw=!0,wl(t,e)}function _y(t,e){return e=e||{},e.gzip=!0,wl(t,e)}On.Deflate=yr;On.deflate=wl;On.deflateRaw=sy;On.gzip=_y});var Kf=E((a4,Uf)=>{"use strict";var Si=30,cy=12;Uf.exports=function(e,r){var a,n,i,o,l,_,s,c,h,f,v,b,p,d,m,y,S,w,j,k,H,O,T,A,B;a=e.state,n=e.next_in,A=e.input,i=n+(e.avail_in-5),o=e.next_out,B=e.output,l=o-(r-e.avail_out),_=o+(e.avail_out-257),s=a.dmax,c=a.wsize,h=a.whave,f=a.wnext,v=a.window,b=a.hold,p=a.bits,d=a.lencode,m=a.distcode,y=(1<>>24,b>>>=j,p-=j,j=w>>>16&255,j===0)B[o++]=w&65535;else if(j&16){k=w&65535,j&=15,j&&(p>>=j,p-=j),p<15&&(b+=A[n++]<>>24,b>>>=j,p-=j,j=w>>>16&255,j&16){if(H=w&65535,j&=15,ps){e.msg="invalid distance too far back",a.mode=Si;break e}if(b>>>=j,p-=j,j=o-l,H>j){if(j=H-j,j>h&&a.sane){e.msg="invalid distance too far back",a.mode=Si;break e}if(O=0,T=v,f===0){if(O+=c-j,j2;)B[o++]=T[O++],B[o++]=T[O++],B[o++]=T[O++],k-=3;k&&(B[o++]=T[O++],k>1&&(B[o++]=T[O++]))}else{O=o-H;do B[o++]=B[O++],B[o++]=B[O++],B[o++]=B[O++],k-=3;while(k>2);k&&(B[o++]=B[O++],k>1&&(B[o++]=B[O++]))}}else if(j&64){e.msg="invalid distance code",a.mode=Si;break e}else{w=m[(w&65535)+(b&(1<>3,n-=k,p-=k<<3,b&=(1<{"use strict";var $f=Pt(),en=15,Wf=852,Gf=592,qf=0,xl=1,Xf=2,hy=[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],fy=[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],uy=[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],dy=[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];Yf.exports=function(e,r,a,n,i,o,l,_){var s=_.bits,c=0,h=0,f=0,v=0,b=0,p=0,d=0,m=0,y=0,S=0,w,j,k,H,O,T=null,A=0,B,_e=new $f.Buf16(en+1),on=new $f.Buf16(en+1),Ar=null,ln=0,Nr,nr,ar;for(c=0;c<=en;c++)_e[c]=0;for(h=0;h=1&&_e[v]===0;v--);if(b>v&&(b=v),v===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,_.bits=1,0;for(f=1;f0&&(e===qf||v!==1))return-1;for(on[1]=0,c=1;cWf||e===Xf&&y>Gf)return 1;for(;;){Nr=c-d,l[h]B?(nr=Ar[ln+l[h]],ar=T[A+l[h]]):(nr=96,ar=0),w=1<>d)+j]=Nr<<24|nr<<16|ar|0;while(j!==0);for(w=1<>=1;if(w!==0?(S&=w-1,S+=w):S=0,h++,--_e[c]===0){if(c===v)break;c=r[a+l[h]]}if(c>b&&(S&H)!==k){for(d===0&&(d=b),O+=f,p=c-d,m=1<Wf||e===Xf&&y>Gf)return 1;k=S&H,i[k]=b<<24|p<<16|O-o|0}}return S!==0&&(i[O+S]=c-d<<24|64<<16|0),_.bits=b,0}});var Lu=E(ct=>{"use strict";var We=Pt(),Hl=ul(),xt=dl(),py=Kf(),Bn=Zf(),vy=0,wu=1,xu=2,Qf=4,my=5,ji=6,br=0,gy=1,yy=2,rt=-2,ku=-3,Rl=-4,by=-5,eu=8,Au=1,tu=2,ru=3,nu=4,au=5,iu=6,ou=7,lu=8,su=9,_u=10,xi=11,Vt=12,kl=13,cu=14,Al=15,hu=16,fu=17,uu=18,du=19,Ci=20,wi=21,pu=22,vu=23,mu=24,gu=25,yu=26,Nl=27,bu=28,Su=29,ae=30,Ll=31,Sy=32,jy=852,Cy=592,wy=15,xy=wy;function ju(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function ky(){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 We.Buf16(320),this.work=new We.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Nu(t){var e;return!t||!t.state?rt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Au,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new We.Buf32(jy),e.distcode=e.distdyn=new We.Buf32(Cy),e.sane=1,e.back=-1,br)}function Eu(t){var e;return!t||!t.state?rt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Nu(t))}function Tu(t,e){var r,a;return!t||!t.state||(a=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?rt:(a.window!==null&&a.wbits!==e&&(a.window=null),a.wrap=r,a.wbits=e,Eu(t))}function Hu(t,e){var r,a;return t?(a=new ky,t.state=a,a.window=null,r=Tu(t,e),r!==br&&(t.state=null),r):rt}function Ay(t){return Hu(t,xy)}var Cu=!0,El,Tl;function Ny(t){if(Cu){var e;for(El=new We.Buf32(512),Tl=new We.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(Bn(wu,t.lens,0,288,El,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Bn(xu,t.lens,0,32,Tl,0,t.work,{bits:5}),Cu=!1}t.lencode=El,t.lenbits=9,t.distcode=Tl,t.distbits=5}function Ru(t,e,r,a){var n,i=t.state;return i.window===null&&(i.wsize=1<=i.wsize?(We.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>a&&(n=a),We.arraySet(i.window,e,r-a,n,i.wnext),a-=n,a?(We.arraySet(i.window,e,r-a,a,0),i.wnext=a,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=xt(r.check,T,2,0),s=0,c=0,r.mode=tu;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){t.msg="incorrect header check",r.mode=ae;break}if((s&15)!==eu){t.msg="unknown compression method",r.mode=ae;break}if(s>>>=4,c-=4,H=(s&15)+8,r.wbits===0)r.wbits=H;else if(H>r.wbits){t.msg="invalid window size",r.mode=ae;break}r.dmax=1<>8&1),r.flags&512&&(T[0]=s&255,T[1]=s>>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0,r.mode=ru;case ru:for(;c<32;){if(l===0)break e;l--,s+=a[i++]<>>8&255,T[2]=s>>>16&255,T[3]=s>>>24&255,r.check=xt(r.check,T,4,0)),s=0,c=0,r.mode=nu;case nu:for(;c<16;){if(l===0)break e;l--,s+=a[i++]<>8),r.flags&512&&(T[0]=s&255,T[1]=s>>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0,r.mode=au;case au:if(r.flags&1024){for(;c<16;){if(l===0)break e;l--,s+=a[i++]<>>8&255,r.check=xt(r.check,T,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=iu;case iu:if(r.flags&1024&&(v=r.length,v>l&&(v=l),v&&(r.head&&(H=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),We.arraySet(r.head.extra,a,i,v,H)),r.flags&512&&(r.check=xt(r.check,a,v,i)),l-=v,i+=v,r.length-=v),r.length))break e;r.length=0,r.mode=ou;case ou:if(r.flags&2048){if(l===0)break e;v=0;do H=a[i+v++],r.head&&H&&r.length<65536&&(r.head.name+=String.fromCharCode(H));while(H&&v>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Vt;break;case _u:for(;c<32;){if(l===0)break e;l--,s+=a[i++]<>>=c&7,c-=c&7,r.mode=Nl;break}for(;c<3;){if(l===0)break e;l--,s+=a[i++]<>>=1,c-=1,s&3){case 0:r.mode=cu;break;case 1:if(Ny(r),r.mode=Ci,e===ji){s>>>=2,c-=2;break e}break;case 2:r.mode=fu;break;case 3:t.msg="invalid block type",r.mode=ae}s>>>=2,c-=2;break;case cu:for(s>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,s+=a[i++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=ae;break}if(r.length=s&65535,s=0,c=0,r.mode=Al,e===ji)break e;case Al:r.mode=hu;case hu:if(v=r.length,v){if(v>l&&(v=l),v>_&&(v=_),v===0)break e;We.arraySet(n,a,i,v,o),l-=v,i+=v,_-=v,o+=v,r.length-=v;break}r.mode=Vt;break;case fu:for(;c<14;){if(l===0)break e;l--,s+=a[i++]<>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ae;break}r.have=0,r.mode=uu;case uu:for(;r.have>>=3,c-=3}for(;r.have<19;)r.lens[_e[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},O=Bn(vy,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,O){t.msg="invalid code lengths set",r.mode=ae;break}r.have=0,r.mode=du;case du:for(;r.have>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=m,c-=m,r.lens[r.have++]=S;else{if(S===16){for(B=m+2;c>>=m,c-=m,r.have===0){t.msg="invalid bit length repeat",r.mode=ae;break}H=r.lens[r.have-1],v=3+(s&3),s>>>=2,c-=2}else if(S===17){for(B=m+3;c>>=m,c-=m,H=0,v=3+(s&7),s>>>=3,c-=3}else{for(B=m+7;c>>=m,c-=m,H=0,v=11+(s&127),s>>>=7,c-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ae;break}for(;v--;)r.lens[r.have++]=H}}if(r.mode===ae)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=ae;break}if(r.lenbits=9,A={bits:r.lenbits},O=Bn(wu,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,O){t.msg="invalid literal/lengths set",r.mode=ae;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},O=Bn(xu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,O){t.msg="invalid distances set",r.mode=ae;break}if(r.mode=Ci,e===ji)break e;case Ci:r.mode=wi;case wi:if(l>=6&&_>=258){t.next_out=o,t.avail_out=_,t.next_in=i,t.avail_in=l,r.hold=s,r.bits=c,py(t,f),o=t.next_out,n=t.output,_=t.avail_out,i=t.next_in,a=t.input,l=t.avail_in,s=r.hold,c=r.bits,r.mode===Vt&&(r.back=-1);break}for(r.back=0;d=r.lencode[s&(1<>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>w)],m=d>>>24,y=d>>>16&255,S=d&65535,!(w+m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=w,c-=w,r.back+=w}if(s>>>=m,c-=m,r.back+=m,r.length=S,y===0){r.mode=yu;break}if(y&32){r.back=-1,r.mode=Vt;break}if(y&64){t.msg="invalid literal/length code",r.mode=ae;break}r.extra=y&15,r.mode=pu;case pu:if(r.extra){for(B=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=vu;case vu:for(;d=r.distcode[s&(1<>>24,y=d>>>16&255,S=d&65535,!(m<=c);){if(l===0)break e;l--,s+=a[i++]<>w)],m=d>>>24,y=d>>>16&255,S=d&65535,!(w+m<=c);){if(l===0)break e;l--,s+=a[i++]<>>=w,c-=w,r.back+=w}if(s>>>=m,c-=m,r.back+=m,y&64){t.msg="invalid distance code",r.mode=ae;break}r.offset=S,r.extra=y&15,r.mode=mu;case mu:if(r.extra){for(B=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ae;break}r.mode=gu;case gu:if(_===0)break e;if(v=f-_,r.offset>v){if(v=r.offset-v,v>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ae;break}v>r.wnext?(v-=r.wnext,b=r.wsize-v):b=r.wnext-v,v>r.length&&(v=r.length),p=r.window}else p=n,b=o-r.offset,v=r.length;v>_&&(v=_),_-=v,r.length-=v;do n[o++]=p[b++];while(--v);r.length===0&&(r.mode=wi);break;case yu:if(_===0)break e;n[o++]=r.length,_--,r.mode=wi;break;case Nl:if(r.wrap){for(;c<32;){if(l===0)break e;l--,s|=a[i++]<{"use strict";Iu.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 Mu=E((s4,Fu)=>{"use strict";function Ly(){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}Fu.exports=Ly});var Pu=E(zn=>{"use strict";var Pn=Lu(),Dn=Pt(),ki=yl(),ve=Il(),Bu=ui(),Iy=bl(),Fy=Mu(),Ou=Object.prototype.toString;function Sr(t){if(!(this instanceof Sr))return new Sr(t);this.options=Dn.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 Iy,this.strm.avail_out=0;var r=Pn.inflateInit2(this.strm,e.windowBits);if(r!==ve.Z_OK)throw new Error(Bu[r]);this.header=new Fy,Pn.inflateGetHeader(this.strm,this.header)}Sr.prototype.push=function(t,e){var r=this.strm,a=this.options.chunkSize,n=this.options.dictionary,i,o,l,_,s,c,h=!1;if(this.ended)return!1;o=e===~~e?e:e===!0?ve.Z_FINISH:ve.Z_NO_FLUSH,typeof t=="string"?r.input=ki.binstring2buf(t):Ou.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Dn.Buf8(a),r.next_out=0,r.avail_out=a),i=Pn.inflate(r,ve.Z_NO_FLUSH),i===ve.Z_NEED_DICT&&n&&(typeof n=="string"?c=ki.string2buf(n):Ou.call(n)==="[object ArrayBuffer]"?c=new Uint8Array(n):c=n,i=Pn.inflateSetDictionary(this.strm,c)),i===ve.Z_BUF_ERROR&&h===!0&&(i=ve.Z_OK,h=!1),i!==ve.Z_STREAM_END&&i!==ve.Z_OK)return this.onEnd(i),this.ended=!0,!1;r.next_out&&(r.avail_out===0||i===ve.Z_STREAM_END||r.avail_in===0&&(o===ve.Z_FINISH||o===ve.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=ki.utf8border(r.output,r.next_out),_=r.next_out-l,s=ki.buf2string(r.output,l),r.next_out=_,r.avail_out=a-_,_&&Dn.arraySet(r.output,r.output,l,_,0),this.onData(s)):this.onData(Dn.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(h=!0)}while((r.avail_in>0||r.avail_out===0)&&i!==ve.Z_STREAM_END);return i===ve.Z_STREAM_END&&(o=ve.Z_FINISH),o===ve.Z_FINISH?(i=Pn.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ve.Z_OK):(o===ve.Z_SYNC_FLUSH&&(this.onEnd(ve.Z_OK),r.avail_out=0),!0)};Sr.prototype.onData=function(t){this.chunks.push(t)};Sr.prototype.onEnd=function(t){t===ve.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Dn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Fl(t,e){var r=new Sr(e);if(r.push(t,!0),r.err)throw r.msg||Bu[r.err];return r.result}function My(t,e){return e=e||{},e.raw=!0,Fl(t,e)}zn.Inflate=Sr;zn.inflate=Fl;zn.inflateRaw=My;zn.ungzip=Fl});var Vu=E((c4,zu)=>{"use strict";var Oy=Pt().assign,By=Jf(),Py=Pu(),Dy=Il(),Du={};Oy(Du,By,Py,Dy);zu.exports=Du});var Ju=E(Ai=>{(function(t){var e=String.fromCharCode;function r(a,n,i){for(var o=a[n],l=1,_=0,s=0;s=32&&o<=126?"Unexpected character "+e(o)+" in JSON at position "+n+" (line "+l+", column "+_+")":"Unexpected byte 0x"+o.toString(16)+" in JSON at position "+n+" (line "+l+", column "+_+")"))}t.JSON_parse=function(a){if(!(a instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var n=[],i=[],o=[],l=a.length,_=null,s=0,c,h=0;h=l&&r(a,l),f=a[h++],f!==34;)if(f===92)switch(a[h++]){case 34:v+='"';break;case 47:v+="/";break;case 92:v+="\\";break;case 98:v+="\b";break;case 102:v+="\f";break;case 110:v+=` `;break;case 114:v+="\r";break;case 116:v+=" ";break;case 117:{for(var p=0,d=0;d<4;d++)f=a[h++],p<<=4,f>=48&&f<=57?p|=f-48:f>=97&&f<=102?p|=f+-87:f>=65&&f<=70?p|=f+-55:r(a,--h);v+=e(p);break}default:r(a,--h);break}else if(f<=127)v+=e(f);else if((f&224)===192)v+=e((f&31)<<6|a[h++]&63);else if((f&240)===224)v+=e((f&15)<<12|(a[h++]&63)<<6|a[h++]&63);else if((f&248)==240){var m=(f&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63;m>65535&&(m-=65536,v+=e(m>>10&1023|55296),m=56320|m&1023),v+=e(m)}v[0];break}case 91:{v=[],n.push(_),i.push(c),o.push(s),_=null,c=v,s=1;continue}case 123:{v={},n.push(_),i.push(c),o.push(s),_=null,c=v,s=2;continue}case 93:{s!==1&&r(a,--h),v=c,_=n.pop(),c=i.pop(),s=o.pop();break}case 125:{s!==2&&r(a,--h),v=c,_=n.pop(),c=i.pop(),s=o.pop();break}default:r(a,--h)}for(f=a[h];f<=32;)f=a[++h];switch(s){case 0:{if(h===l)return v;break}case 1:{if(c.push(v),f===44){h++;continue}if(f===93)continue;break}case 2:{if(_===null){if(_=v,f===58){h++;continue}}else{if(c[_]=v,_=null,f===44){h++;continue}if(f===125)continue}break}}break}}r(a,h)}})(Ai)});function $u(t){return t=t.trim(),t[0]==="["&&(t=t.replace(/,\s*$/,""),t[t.length-1]!=="]"&&(t+="]")),JSON.parse(t)}function zy(t){let e=0;for(let r=0;r0&&/\s/.exec(String.fromCharCode(t[r-1]));)r--;if(String.fromCharCode(t[r-1])===","&&r--,String.fromCharCode(t[r-1])!=="]"){let a=new Uint8Array(r+1);a.set(t.subarray(0,r)),a[r]=93,t=a}}return(0,Ku.JSON_parse)(t)}var Uu,Ku,Ni,Ml,Ol,Ei,Jt,Bl=ie(()=>{"use strict";Uu=se(Vu()),Ku=se(Ju()),Ni=1<<27;Ml=class{constructor(e){this.chunks=[];let r=this.byteArray=new Uint8Array(e),a="utf-8";if(r.length>2&&(r[0]===255&&r[1]===254?a="utf-16le":r[0]===254&&r[1]===255&&(a="utf-16be")),typeof TextDecoder<"u"){let n=new TextDecoder(a);for(let i=0;i=Ni&&this.chunks.push("")}}splitLines(){let e=function*(){let r="";for(let a of this.chunks){let n=a.split(` `);for(let i=0;i{try{return Uu.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 Ml(e)}static fromFile(e){let r=new Promise(a=>{let n=new FileReader;n.addEventListener("loadend",()=>{if(!(n.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");a(n.result)}),n.readAsArrayBuffer(e)});return new t(Promise.resolve(e.name),r)}static fromArrayBuffer(e,r){return new t(Promise.resolve(e),Promise.resolve(r))}}});function Vy(t){let e=[...t.splitLines()].map(i=>i.split(" ")),r=e.shift();if(!r)return[];let a=new Map;for(let i=0;i0;){let o=a.pop();n=Math.max(n,o.endValue),e.leaveFrame(o,n)}return"Bytes Used"in r[0]?e.setValueFormatter(new Pe):("Weight"in r[0]||"Running Time"in r[0])&&e.setValueFormatter(new Y("milliseconds")),e.build()}async function Gu(t){let e={name:t.name,files:new Map,subdirectories:new Map},r=await new Promise((a,n)=>{t.createReader().readEntries(i=>{a(i)},n)});for(let a of r)if(a.isDirectory){let n=await Gu(a);e.subdirectories.set(n.name,n)}else{let n=await new Promise((i,o)=>{a.file(i,o)});e.files.set(n.name,n)}return e}function Ti(t){return Jt.fromFile(t).readAsArrayBuffer()}function Uy(t){return Jt.fromFile(t).readAsText()}function Ky(t,e){let r=Ue(t.subdirectories,"corespace"),a=Ue(r.subdirectories,`run${e}`);return Ue(a.subdirectories,"core")}async function $y(t){let e=Ue(t.subdirectories,"stores");for(let r of e.subdirectories.values()){let a=r.files.get("schema.xml");if(!a)continue;let n=await Uy(a);if(!/name="time-profile"/.exec(n.firstChunk()))continue;let i=new Vn(await Ti(Ue(r.files,"bulkstore")));i.readUint32(),i.readUint32(),i.readUint32();let o=i.readUint32(),l=i.readUint32();i.seek(o);let _=[];for(;;){let s=i.readUint48();if(s===0)break;let c=i.readUint32();i.skip(l-6-4-4);let h=i.readUint32();_.push({timestamp:s,threadID:c,backtraceID:h})}return _}throw new Error("Could not find sample list")}async function Wy(t,e){let r=Ue(e.subdirectories,"uniquing"),a=Ue(r.subdirectories,"arrayUniquer"),n=Ue(a.files,"integeruniquer.index"),i=Ue(a.files,"integeruniquer.data"),o=new Vn(await Ti(n)),l=new Vn(await Ti(i));o.seek(32);let _=[];for(;o.hasMore();){let s=o.readUint32()+o.readUint32()*1048576;if(s===0)continue;l.seek(s);let c=l.readUint32(),h=[];for(;c--;)h.push(l.readUint64());_.push(h)}return _}async function Gy(t){let e=Ue(t.files,"form.template"),r=Yy(await Ti(e)),a=r["com.apple.xray.owner.template.version"],n=1;"com.apple.xray.owner.template"in r&&(n=r["com.apple.xray.owner.template"].get("_selectedRunNumber"));let i=r.$1;"stubInfoByUUID"in r&&(i=Array.from(r.stubInfoByUUID.keys())[0]);let o=r["com.apple.xray.run.data"],l=[];for(let _ of o.runNumbers){let s=Ue(o.runData,_),c=Ue(s,"symbolsByPid"),h=new Map;for(let f of c.values()){for(let v of f.symbols){if(!v)continue;let{sourcePath:b,symbolName:p,addressToLine:d}=v;for(let m of d.keys())Ce(h,m,()=>{let y=p||`0x${Ut(m.toString(16),16)}`,S={key:`${b}:${y}`,name:y};return b&&(S.file=b),S})}l.push({number:_,addressToFrameMap:h})}}return{version:a,instrument:i,selectedRunNumber:n,runs:l}}async function qu(t){let e=await Gu(t),{version:r,runs:a,instrument:n,selectedRunNumber:i}=await Gy(e);if(n!=="com.apple.xray.instrument-type.coresampler2")throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${n}`);console.log("version: ",r),console.log("Importing time profile");let o=[],l=0;for(let _ of a){let{addressToFrameMap:s,number:c}=_,h=await qy({fileName:t.name,tree:e,addressToFrameMap:s,runNumber:c});_.number===i&&(l=o.length+h.indexToView),o.push(...h.profiles)}return{name:t.name,indexToView:l,profiles:o}}async function qy(t){let{fileName:e,tree:r,addressToFrameMap:a,runNumber:n}=t,i=Ky(r,n),o=await $y(i),l=await Wy(o,i),_=new Map;for(let h of o)_.set(h.threadID,Zn(_,h.threadID,()=>0)+1);let s=Array.from(_.entries());Ie(s,h=>-h[1]);let c=s.map(h=>h[0]);return{name:e,indexToView:0,profiles:c.map(h=>Xy({threadID:h,fileName:e,arrays:l,addressToFrameMap:a,samples:o}))}}function Xy(t){let{fileName:e,addressToFrameMap:r,arrays:a,threadID:n,samples:i}=t,o=new Map;i=i.filter(c=>c.threadID===n);let l=new ne(Z(i).timestamp);l.setName(`${e} - thread ${n}`);function _(c,h){let f=r.get(c);if(f)h.push(f);else if(c in a)for(let v of a[c])_(v,h);else{let v={key:c,name:`0x${Ut(c.toString(16),16)}`};r.set(c,v),h.push(v)}}let s=null;for(let c of i){let h=Ce(o,c.backtraceID,f=>{let v=[];return _(f,v),v.reverse(),v});if(s===null&&(l.appendSampleWithWeight([],c.timestamp),s=c.timestamp),c.timestamp{switch(n){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{let o=Object.create(null);o.symbolName=i.$0,o.sourcePath=i.$1,o.addressToLine=new Map;for(let l=3;;l+=2){let _=i["$"+l],s=i["$"+(l+1)];if(_==null||s==null)break;o.addressToLine.set(_,s)}return o}case"PFTOwnerData":{let o=Object.create(null);return o.ownerName=i.$0,o.ownerPath=i.$1,o}case"PFTPersistentSymbols":{let o=Object.create(null),l=i.$4;o.threadNames=i.$3,o.symbols=[];for(let _=1;_r){if(t.$version!==1e5||t.$archiver!=="NSKeyedArchiver"||!Pl(t.$top)||!Wu(t.$objects))throw new Error("Invalid keyed archive");t.$objects[0]==="$null"&&(t.$objects[0]=null);for(let a=0;a{if(a instanceof Jn)return t.$objects[a.index];if(Wu(a))for(let n=0;na){if(Pl(e)&&e.$class){let a=Qy(t,e.$class).$classname;switch(a){case"NSDecimalNumberPlaceholder":{let l=e["NS.length"],_=e["NS.exponent"],s=e["NS.mantissa.bo"],c=e["NS.negative"],h=new Uint16Array(new Uint8Array(e["NS.mantissa"]).buffer),f=0;for(let v=0;v>8|(b&255)<<8),f+=b*Math.pow(65536,v)}return f*=Math.pow(10,_),c?-f:f}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"]?Zy(e["NS.bytes"]):(console.warn(`Unexpected ${a} format: `,e),null);case"NSArray":case"NSMutableArray":if("NS.objects"in e)return e["NS.objects"];let n=[];for(;;){let l="NS.object."+n.length;if(!(l in e))break;n.push(e[l])}return n;case"_NSKeyedCoderOldStyleArray":{let l=e["NS.count"],_=[];for(let s=0;s{"use strict";Re();$();He();Bl();Vn=class{constructor(e){this.bytePos=0;this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePosthis.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)}};Jn=class{constructor(e){this.index=e}};Dl=class{constructor(e){this.view=e;this.referenceSize=0;this.objects=[];this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,r=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let a=this.view.getUint32(e+12,!1),n=this.view.getUint32(e+20,!1),i=this.view.getUint32(e+28,!1);for(let o=0;o>4){case 0:return this.parseSingleton(e,a);case 1:return this.parseInteger(e,1<({key:o,name:o})),duration:parseInt(i,10)})}return e}function Vl(t){let e=n2(t),r=e.reduce((n,i)=>n+i.duration,0),a=new ne(r);if(e.length===0)return null;for(let n of e)a.appendSampleWithWeight(n.stack,n.duration);return a.build()}var Yu=ie(()=>{"use strict";Re()});function Zu(t){let e=t.profile,r=e.threads.length===1?e.threads[0]:e.threads.filter(l=>l.name==="GeckoMain")[0],a=new Map;function n(l){let _=l[0],s=[];for(;_!=null;){let c=r.stackTable.data[_],[h,f]=c;s.push(f),_=h}return s.reverse(),s.map(c=>{let h=r.frameTable.data[c],f=r.stringTable[h[0]],v=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(f);return!v||v[2].startsWith("resource:")||v[2]==="self-hosted"||v[2].startsWith("self-hosted:")?null:Ce(a,f,()=>({key:f,name:v[1],file:v[2],line:v[3]?parseInt(v[3]):void 0,col:v[4]?parseInt(v[4])+1:void 0}))}).filter(c=>c!=null)}let i=new de(t.duration),o=[];for(let l of r.samples.data){let _=n(l),s=l[1],c=-1;for(let h=0;hc;h--)i.leaveFrame(o[h],s);for(let h=c+1;h<_.length;h++)i.enterFrame(_[h],s);o=_}return i.setValueFormatter(new Y("milliseconds")),i.build()}var Qu=ie(()=>{"use strict";Re();$();He()});function a2(t,e){if(!t||!t.type)return{key:"(unknown type)",name:"(unknown type)"};let r=t.name;switch(t.type){case"CPP":{let a=r.match(/[tT] ([^(<]*)/);a&&(r=`(c++) ${a[1]}`);break}case"SHARED_LIB":r="(LIB) "+r;break;case"JS":{let a=r.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(a){let n=a[2],i=parseInt(a[3],10),o=parseInt(a[4],10),l=a[1].length>0?a[1]:n?`(anonymous ${n.split("/").pop()}:${i})`:"(anonymous)";return{key:r,name:l,file:n.length>0?n:"(unknown file)",line:i,col:o}}break}case"CODE":{switch(t.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":r="(IC) "+r;break;case"BytecodeHandler":r="(bytecode) ~"+r;break;case"Stub":r="(stub) "+r;break;case"Builtin":r="(builtin) "+r;break;case"RegExp":r="(regexp) "+r;break}break}default:{r=`(${t.type}) ${r}`;break}}return{key:r,name:r}}function Jl(t){let e=new ne,r=new Map;function a(i){return Ce(r,i,o=>{let l=t.code[o];return a2(l,t)})}let n=0;Ie(t.ticks,i=>i.tm);for(let i of t.ticks){let o=[];for(let l=i.s.length-2;l>=0;l-=2){let _=i.s[l];if(_!==-1){if(_>t.code.length){o.push({key:_,name:`0x${_.toString(16)}`});continue}o.push(a(_))}}e.appendSampleWithWeight(o,i.tm-n),n=i.tm}return e.setValueFormatter(new Y("microseconds")),e.build()}var ed=ie(()=>{"use strict";Re();$();He()});function*i2(t){let e=[];for(let r of t.splitLines())r===""?(yield td(e),e=[]):e.push(r);e.length>0&&(yield td(e))}function td(t){let e=t.filter(l=>!/^\s*#/.exec(l)),r={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},a=e.shift();if(!a)return null;let n=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(a);if(!n)return null;r.command=n[1],n[3]?(r.processID=parseInt(n[2],10),r.threadID=parseInt(n[3],10)):r.threadID=parseInt(n[2],10);let i=/\s+(\d+\.\d+):\s+/.exec(a);i&&(r.time=parseFloat(i[1]));let o=/(\S+):\s*$/.exec(a);o&&(r.eventType=o[1]);for(let l of e){let _=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(l);if(!_)continue;let[,s,c,h]=_;c=c.replace(/\+0x[\da-f]+$/,""),r.stack.push({address:`0x${s}`,symbolName:c,file:h})}return r.stack.reverse(),r}function Ul(t){let e=new Map,r=null;for(let a of i2(t)){if(a==null||r!=null&&r!=a.eventType||a.time==null)continue;r=a.eventType;let n=[];a.command&&n.push(a.command),a.processID&&n.push(`pid: ${a.processID}`),a.threadID&&n.push(`tid: ${a.threadID}`);let i=n.join(" ");Ce(e,i,()=>{let _=new ne;return _.setName(i),_.setValueFormatter(new Y("seconds")),_}).appendSampleWithTimestamp(a.stack.map(({symbolName:_,file:s})=>({key:`${_} (${s})`,name:_==="[unknown]"?`??? (${s})`:_,file:s})),a.time)}return e.size===0?null:{name:e.size===1?Array.from(e.keys())[0]:"",indexToView:0,profiles:Array.from(As(e.values(),a=>a.build()))}}var rd=ie(()=>{"use strict";Re();$();He()});function Kl(t,e,r,a,n){if(t.ticks===0&&t.entries===0&&t.alloc===0&&t.children.length===0)return e;let i=e,o=a.get(t.id);r.enterFrame(o,i);for(let l of t.children)i=Kl(l,i,r,a,n);return i+=n(t),r.leaveFrame(o,i),i}function nd(t){let e=new Map;for(let n of t.cost_centres){let i={key:n.id,name:`${n.module}.${n.label}`};n.src_loc.startsWith("<")||(i.file=n.src_loc),e.set(n.id,i)}let r=new de(t.total_ticks);Kl(t.profile,0,r,e,n=>n.ticks),r.setValueFormatter(new Y("milliseconds")),r.setName(`${t.program} time`);let a=new de(t.total_ticks);return Kl(t.profile,0,a,e,n=>n.alloc),a.setValueFormatter(new Pe),a.setName(`${t.program} allocation`),{name:t.program,indexToView:0,profiles:[r.build(),a.build()]}}var ad=ie(()=>{"use strict";Re();He()});function o2(t){return t.map(({name:e,url:r,line:a,column:n})=>({key:`${e}:${r}:${a}:${n}`,file:r,line:a,col:n,name:e||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)")})).reverse()}function $l(t){t.version!==1&&console.warn(`Unknown Safari profile version ${t.version}... Might be incompatible.`);let{recording:e}=t,{sampleStackTraces:r,sampleDurations:a}=e,n=r.length;if(n<1)return console.warn("Empty profile"),null;let i=r[n-1].timestamp-r[0].timestamp+a[0],o=new ne(i),l=Number.MAX_VALUE;return r.forEach((_,s)=>{let c=_.timestamp,h=a[s],v=c-h-l;v>.002&&o.appendSampleWithWeight([],v),o.appendSampleWithWeight(o2(_.stackFrames),h),l=c}),o.setValueFormatter(new Y("seconds")),o.setName(e.displayName),o.build()}var id=ie(()=>{"use strict";Re();He()});var ld=E((Q4,od)=>{"use strict";od.exports=l2;function l2(t,e){for(var r=new Array(arguments.length-1),a=0,n=2,i=!0;n{"use strict";var Hi=cd;Hi.length=function(e){var r=e.length;if(!r)return 0;for(var a=0;--r%4>1&&e.charAt(r)==="=";)++a;return Math.ceil(e.length*3)/4-a};var tn=new Array(64),_d=new Array(123);for(ht=0;ht<64;)_d[tn[ht]=ht<26?ht+65:ht<52?ht+71:ht<62?ht-4:ht-59|43]=ht++;var ht;Hi.encode=function(e,r,a){for(var n=null,i=[],o=0,l=0,_;r>2],_=(s&3)<<4,l=1;break;case 1:i[o++]=tn[_|s>>4],_=(s&15)<<2,l=2;break;case 2:i[o++]=tn[_|s>>6],i[o++]=tn[s&63],l=0;break}o>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,i)),o=0)}return l&&(i[o++]=tn[_],i[o++]=61,l===1&&(i[o++]=61)),n?(o&&n.push(String.fromCharCode.apply(String,i.slice(0,o))),n.join("")):String.fromCharCode.apply(String,i.slice(0,o))};var sd="invalid encoding";Hi.decode=function(e,r,a){for(var n=a,i=0,o,l=0;l1)break;if((_=_d[_])===void 0)throw Error(sd);switch(i){case 0:o=_,i=1;break;case 1:r[a++]=o<<2|(_&48)>>4,o=_,i=2;break;case 2:r[a++]=(o&15)<<4|(_&60)>>2,o=_,i=3;break;case 3:r[a++]=(o&3)<<6|_,i=0;break}}if(i===1)throw Error(sd);return a-n};Hi.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var ud=E((tA,fd)=>{"use strict";fd.exports=Ri;function Ri(){this._listeners={}}Ri.prototype.on=function(e,r,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:r,ctx:a||this}),this};Ri.prototype.off=function(e,r){if(e===void 0)this._listeners={};else if(r===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],n=0;n{"use strict";yd.exports=dd(dd);function dd(t){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),a=r[3]===128;function n(_,s,c){e[0]=_,s[c]=r[0],s[c+1]=r[1],s[c+2]=r[2],s[c+3]=r[3]}function i(_,s,c){e[0]=_,s[c]=r[3],s[c+1]=r[2],s[c+2]=r[1],s[c+3]=r[0]}t.writeFloatLE=a?n:i,t.writeFloatBE=a?i:n;function o(_,s){return r[0]=_[s],r[1]=_[s+1],r[2]=_[s+2],r[3]=_[s+3],e[0]}function l(_,s){return r[3]=_[s],r[2]=_[s+1],r[1]=_[s+2],r[0]=_[s+3],e[0]}t.readFloatLE=a?o:l,t.readFloatBE=a?l:o}():function(){function e(a,n,i,o){var l=n<0?1:0;if(l&&(n=-n),n===0)a(1/n>0?0:2147483648,i,o);else if(isNaN(n))a(2143289344,i,o);else if(n>34028234663852886e22)a((l<<31|2139095040)>>>0,i,o);else if(n<11754943508222875e-54)a((l<<31|Math.round(n/1401298464324817e-60))>>>0,i,o);else{var _=Math.floor(Math.log(n)/Math.LN2),s=Math.round(n*Math.pow(2,-_)*8388608)&8388607;a((l<<31|_+127<<23|s)>>>0,i,o)}}t.writeFloatLE=e.bind(null,pd),t.writeFloatBE=e.bind(null,vd);function r(a,n,i){var o=a(n,i),l=(o>>31)*2+1,_=o>>>23&255,s=o&8388607;return _===255?s?NaN:l*(1/0):_===0?l*1401298464324817e-60*s:l*Math.pow(2,_-150)*(s+8388608)}t.readFloatLE=r.bind(null,md),t.readFloatBE=r.bind(null,gd)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),a=r[7]===128;function n(_,s,c){e[0]=_,s[c]=r[0],s[c+1]=r[1],s[c+2]=r[2],s[c+3]=r[3],s[c+4]=r[4],s[c+5]=r[5],s[c+6]=r[6],s[c+7]=r[7]}function i(_,s,c){e[0]=_,s[c]=r[7],s[c+1]=r[6],s[c+2]=r[5],s[c+3]=r[4],s[c+4]=r[3],s[c+5]=r[2],s[c+6]=r[1],s[c+7]=r[0]}t.writeDoubleLE=a?n:i,t.writeDoubleBE=a?i:n;function o(_,s){return r[0]=_[s],r[1]=_[s+1],r[2]=_[s+2],r[3]=_[s+3],r[4]=_[s+4],r[5]=_[s+5],r[6]=_[s+6],r[7]=_[s+7],e[0]}function l(_,s){return r[7]=_[s],r[6]=_[s+1],r[5]=_[s+2],r[4]=_[s+3],r[3]=_[s+4],r[2]=_[s+5],r[1]=_[s+6],r[0]=_[s+7],e[0]}t.readDoubleLE=a?o:l,t.readDoubleBE=a?l:o}():function(){function e(a,n,i,o,l,_){var s=o<0?1:0;if(s&&(o=-o),o===0)a(0,l,_+n),a(1/o>0?0:2147483648,l,_+i);else if(isNaN(o))a(0,l,_+n),a(2146959360,l,_+i);else if(o>17976931348623157e292)a(0,l,_+n),a((s<<31|2146435072)>>>0,l,_+i);else{var c;if(o<22250738585072014e-324)c=o/5e-324,a(c>>>0,l,_+n),a((s<<31|c/4294967296)>>>0,l,_+i);else{var h=Math.floor(Math.log(o)/Math.LN2);h===1024&&(h=1023),c=o*Math.pow(2,-h),a(c*4503599627370496>>>0,l,_+n),a((s<<31|h+1023<<20|c*1048576&1048575)>>>0,l,_+i)}}}t.writeDoubleLE=e.bind(null,pd,0,4),t.writeDoubleBE=e.bind(null,vd,4,0);function r(a,n,i,o,l){var _=a(o,l+n),s=a(o,l+i),c=(s>>31)*2+1,h=s>>>20&2047,f=4294967296*(s&1048575)+_;return h===2047?f?NaN:c*(1/0):h===0?c*5e-324*f:c*Math.pow(2,h-1075)*(f+4503599627370496)}t.readDoubleLE=r.bind(null,md,0,4),t.readDoubleBE=r.bind(null,gd,4,0)}(),t}function pd(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function vd(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=t&255}function md(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function gd(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var Sd=E((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 Cd=E(jd=>{"use strict";var Wl=jd;Wl.length=function(e){for(var r=0,a=0,n=0;n191&&_<224?o[l++]=(_&31)<<6|e[r++]&63:_>239&&_<365?(_=((_&7)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,o[l++]=55296+(_>>10),o[l++]=56320+(_&1023)):o[l++]=(_&15)<<12|(e[r++]&63)<<6|e[r++]&63,l>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),l=0);return i?(l&&i.push(String.fromCharCode.apply(String,o.slice(0,l))),i.join("")):String.fromCharCode.apply(String,o.slice(0,l))};Wl.write=function(e,r,a){for(var n=a,i,o,l=0;l>6|192,r[a++]=i&63|128):(i&64512)===55296&&((o=e.charCodeAt(l+1))&64512)===56320?(i=65536+((i&1023)<<10)+(o&1023),++l,r[a++]=i>>18|240,r[a++]=i>>12&63|128,r[a++]=i>>6&63|128,r[a++]=i&63|128):(r[a++]=i>>12|224,r[a++]=i>>6&63|128,r[a++]=i&63|128);return a-n}});var xd=E((aA,wd)=>{"use strict";wd.exports=s2;function s2(t,e,r){var a=r||8192,n=a>>>1,i=null,o=a;return function(_){if(_<1||_>n)return t(_);o+_>a&&(i=t(a),o=0);var s=e.call(i,o,o+=_);return o&7&&(o=(o|7)+1),s}}});var Ad=E((iA,kd)=>{"use strict";kd.exports=Se;var Un=tr();function Se(t,e){this.lo=t>>>0,this.hi=e>>>0}var jr=Se.zero=new Se(0,0);jr.toNumber=function(){return 0};jr.zzEncode=jr.zzDecode=function(){return this};jr.length=function(){return 1};var _2=Se.zeroHash="\0\0\0\0\0\0\0\0";Se.fromNumber=function(e){if(e===0)return jr;var r=e<0;r&&(e=-e);var a=e>>>0,n=(e-a)/4294967296>>>0;return r&&(n=~n>>>0,a=~a>>>0,++a>4294967295&&(a=0,++n>4294967295&&(n=0))),new Se(a,n)};Se.from=function(e){if(typeof e=="number")return Se.fromNumber(e);if(Un.isString(e))if(Un.Long)e=Un.Long.fromString(e);else return Se.fromNumber(parseInt(e,10));return e.low||e.high?new Se(e.low>>>0,e.high>>>0):jr};Se.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var r=~this.lo+1>>>0,a=~this.hi>>>0;return r||(a=a+1>>>0),-(r+a*4294967296)}return this.lo+this.hi*4294967296};Se.prototype.toLong=function(e){return Un.Long?new Un.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var er=String.prototype.charCodeAt;Se.fromHash=function(e){return e===_2?jr:new Se((er.call(e,0)|er.call(e,1)<<8|er.call(e,2)<<16|er.call(e,3)<<24)>>>0,(er.call(e,4)|er.call(e,5)<<8|er.call(e,6)<<16|er.call(e,7)<<24)>>>0)};Se.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)};Se.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};Se.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};Se.prototype.length=function(){var e=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?r===0?e<16384?e<128?1:2:e<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:a<128?9:10}});var tr=E(Gl=>{"use strict";var M=Gl;M.asPromise=ld();M.base64=hd();M.EventEmitter=ud();M.float=bd();M.inquire=Sd();M.utf8=Cd();M.pool=xd();M.LongBits=Ad();M.global=typeof window<"u"&&window||typeof global<"u"&&global||typeof self<"u"&&self||Gl;M.emptyArray=Object.freeze?Object.freeze([]):[];M.emptyObject=Object.freeze?Object.freeze({}):{};M.isNode=!!(M.global.process&&M.global.process.versions&&M.global.process.versions.node);M.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};M.isString=function(e){return typeof e=="string"||e instanceof String};M.isObject=function(e){return e&&typeof e=="object"};M.isset=M.isSet=function(e,r){var a=e[r];return a!=null&&e.hasOwnProperty(r)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};M.Buffer=function(){try{var t=M.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}}();M._Buffer_from=null;M._Buffer_allocUnsafe=null;M.newBuffer=function(e){return typeof e=="number"?M.Buffer?M._Buffer_allocUnsafe(e):new M.Array(e):M.Buffer?M._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};M.Array=typeof Uint8Array<"u"?Uint8Array:Array;M.Long=M.global.dcodeIO&&M.global.dcodeIO.Long||M.global.Long||M.inquire("long");M.key2Re=/^true|false|0|1$/;M.key32Re=/^-?(?:0|[1-9][0-9]*)$/;M.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;M.longToHash=function(e){return e?M.LongBits.from(e).toHash():M.LongBits.zeroHash};M.longFromHash=function(e,r){var a=M.LongBits.fromHash(e);return M.Long?M.Long.fromBits(a.lo,a.hi,r):a.toNumber(!!r)};function Nd(t,e,r){for(var a=Object.keys(e),n=0;n-1;--i)if(r[n[i]]===1&&this[n[i]]!==void 0&&this[n[i]]!==null)return n[i]}};M.oneOfSetter=function(e){return function(r){for(var a=0;a{"use strict";Ld.exports=q;var nt=tr(),Rd,Li=nt.LongBits,Td=nt.base64,Hd=nt.utf8;function Kn(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function Xl(){}function c2(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function q(){this.len=0,this.head=new Kn(Xl,0,0),this.tail=this.head,this.states=null}q.create=nt.Buffer?function(){return(q.create=function(){return new Rd})()}:function(){return new q};q.alloc=function(e){return new nt.Array(e)};nt.Array!==Array&&(q.alloc=nt.pool(q.alloc,nt.Array.prototype.subarray));q.prototype._push=function(e,r,a){return this.tail=this.tail.next=new Kn(e,r,a),this.len+=r,this};function Yl(t,e,r){e[r]=t&255}function h2(t,e,r){for(;t>127;)e[r++]=t&127|128,t>>>=7;e[r]=t}function Zl(t,e){this.len=t,this.next=void 0,this.val=e}Zl.prototype=Object.create(Kn.prototype);Zl.prototype.fn=h2;q.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Zl((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};q.prototype.int32=function(e){return e<0?this._push(Ql,10,Li.fromNumber(e)):this.uint32(e)};q.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Ql(t,e,r){for(;t.hi;)e[r++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=t.lo&127|128,t.lo=t.lo>>>7;e[r++]=t.lo}q.prototype.uint64=function(e){var r=Li.from(e);return this._push(Ql,r.length(),r)};q.prototype.int64=q.prototype.uint64;q.prototype.sint64=function(e){var r=Li.from(e).zzEncode();return this._push(Ql,r.length(),r)};q.prototype.bool=function(e){return this._push(Yl,1,e?1:0)};function ql(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}q.prototype.fixed32=function(e){return this._push(ql,4,e>>>0)};q.prototype.sfixed32=q.prototype.fixed32;q.prototype.fixed64=function(e){var r=Li.from(e);return this._push(ql,4,r.lo)._push(ql,4,r.hi)};q.prototype.sfixed64=q.prototype.fixed64;q.prototype.float=function(e){return this._push(nt.float.writeFloatLE,4,e)};q.prototype.double=function(e){return this._push(nt.float.writeDoubleLE,8,e)};var f2=nt.Array.prototype.set?function(e,r,a){r.set(e,a)}:function(e,r,a){for(var n=0;n>>0;if(!r)return this._push(Yl,1,0);if(nt.isString(e)){var a=q.alloc(r=Td.length(e));Td.decode(e,a,0),e=a}return this.uint32(r)._push(f2,r,e)};q.prototype.string=function(e){var r=Hd.length(e);return r?this.uint32(r)._push(Hd.write,r,e):this._push(Yl,1,0)};q.prototype.fork=function(){return this.states=new c2(this),this.head=this.tail=new Kn(Xl,0,0),this.len=0,this};q.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 Kn(Xl,0,0),this.len=0),this};q.prototype.ldelim=function(){var e=this.head,r=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=r,this.len+=a),this};q.prototype.finish=function(){for(var e=this.head.next,r=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,r,a),a+=e.len,e=e.next;return r};q._configure=function(t){Rd=t}});var Md=E((sA,Fd)=>{"use strict";Fd.exports=Cr;var Id=es();(Cr.prototype=Object.create(Id.prototype)).constructor=Cr;var $n=tr(),Ii=$n.Buffer;function Cr(){Id.call(this)}Cr.alloc=function(e){return(Cr.alloc=$n._Buffer_allocUnsafe)(e)};var u2=Ii&&Ii.prototype instanceof Uint8Array&&Ii.prototype.set.name==="set"?function(e,r,a){r.set(e,a)}:function(e,r,a){if(e.copy)e.copy(r,a,0,e.length);else for(var n=0;n>>0;return this.uint32(r),r&&this._push(u2,r,e),this};function d2(t,e,r){t.length<40?$n.utf8.write(t,e,r):e.utf8Write(t,r)}Cr.prototype.string=function(e){var r=Ii.byteLength(e);return this.uint32(r),r&&this._push(d2,r,e),this}});var rs=E((_A,zd)=>{"use strict";zd.exports=me;var kt=tr(),Pd,Dd=kt.LongBits,p2=kt.utf8;function ft(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function me(t){this.buf=t,this.pos=0,this.len=t.length}var Od=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new me(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new me(e);throw Error("illegal buffer")};me.create=kt.Buffer?function(e){return(me.create=function(a){return kt.Buffer.isBuffer(a)?new Pd(a):Od(a)})(e)}:Od;me.prototype._slice=kt.Array.prototype.subarray||kt.Array.prototype.slice;me.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,ft(this,10);return e}}();me.prototype.int32=function(){return this.uint32()|0};me.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function ts(){var t=new Dd(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 ft(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 ft(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}me.prototype.bool=function(){return this.uint32()!==0};function Fi(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}me.prototype.fixed32=function(){if(this.pos+4>this.len)throw ft(this,4);return Fi(this.buf,this.pos+=4)};me.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ft(this,4);return Fi(this.buf,this.pos+=4)|0};function Bd(){if(this.pos+8>this.len)throw ft(this,8);return new Dd(Fi(this.buf,this.pos+=4),Fi(this.buf,this.pos+=4))}me.prototype.float=function(){if(this.pos+4>this.len)throw ft(this,4);var e=kt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};me.prototype.double=function(){if(this.pos+8>this.len)throw ft(this,4);var e=kt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};me.prototype.bytes=function(){var e=this.uint32(),r=this.pos,a=this.pos+e;if(a>this.len)throw ft(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(r,a):r===a?new this.buf.constructor(0):this._slice.call(this.buf,r,a)};me.prototype.string=function(){var e=this.bytes();return p2.read(e,0,e.length)};me.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw ft(this,e);this.pos+=e}else do if(this.pos>=this.len)throw ft(this);while(this.buf[this.pos++]&128);return this};me.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};me._configure=function(t){Pd=t;var e=kt.Long?"toLong":"toNumber";kt.merge(me.prototype,{int64:function(){return ts.call(this)[e](!1)},uint64:function(){return ts.call(this)[e](!0)},sint64:function(){return ts.call(this).zzDecode()[e](!1)},fixed64:function(){return Bd.call(this)[e](!0)},sfixed64:function(){return Bd.call(this)[e](!1)}})}});var Kd=E((cA,Ud)=>{"use strict";Ud.exports=Wn;var Jd=rs();(Wn.prototype=Object.create(Jd.prototype)).constructor=Wn;var Vd=tr();function Wn(t){Jd.call(this,t)}Vd.Buffer&&(Wn.prototype._slice=Vd.Buffer.prototype.slice);Wn.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}});var Wd=E((hA,$d)=>{"use strict";$d.exports=Gn;var ns=tr();(Gn.prototype=Object.create(ns.EventEmitter.prototype)).constructor=Gn;function Gn(t,e,r){if(typeof t!="function")throw TypeError("rpcImpl must be a function");ns.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}Gn.prototype.rpcCall=function t(e,r,a,n,i){if(!n)throw TypeError("request must be specified");var o=this;if(!i)return ns.asPromise(t,o,e,r,a,n);if(!o.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return o.rpcImpl(e,r[o.requestDelimited?"encodeDelimited":"encode"](n).finish(),function(_,s){if(_)return o.emit("error",_,e),i(_);if(s===null){o.end(!0);return}if(!(s instanceof a))try{s=a[o.responseDelimited?"decodeDelimited":"decode"](s)}catch(c){return o.emit("error",c,e),i(c)}return o.emit("data",s,e),i(null,s)})}catch(l){o.emit("error",l,e),setTimeout(function(){i(l)},0);return}};Gn.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var qd=E(Gd=>{"use strict";var v2=Gd;v2.Service=Wd()});var Yd=E((uA,Xd)=>{"use strict";Xd.exports={}});var e0=E(Qd=>{"use strict";var ze=Qd;ze.build="minimal";ze.Writer=es();ze.BufferWriter=Md();ze.Reader=rs();ze.BufferReader=Kd();ze.util=tr();ze.rpc=qd();ze.roots=Yd();ze.configure=Zd;function Zd(){ze.Reader._configure(ze.BufferReader),ze.util._configure()}ze.Writer._configure(ze.BufferWriter);Zd()});var r0=E((pA,t0)=>{"use strict";t0.exports=e0()});var a0=E((vA,n0)=>{"use strict";var Ge=r0(),X=Ge.Reader,rr=Ge.Writer,u=Ge.util,R=Ge.roots.default||(Ge.roots.default={});R.perftools=function(){var t={};return t.profiles=function(){var e={};return e.Profile=function(){function r(a){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.sampleType&&l.sampleType.length||(l.sampleType=[]),l.sampleType.push(R.perftools.profiles.ValueType.decode(n,n.uint32()));break;case 2:l.sample&&l.sample.length||(l.sample=[]),l.sample.push(R.perftools.profiles.Sample.decode(n,n.uint32()));break;case 3:l.mapping&&l.mapping.length||(l.mapping=[]),l.mapping.push(R.perftools.profiles.Mapping.decode(n,n.uint32()));break;case 4:l.location&&l.location.length||(l.location=[]),l.location.push(R.perftools.profiles.Location.decode(n,n.uint32()));break;case 5:l.function&&l.function.length||(l.function=[]),l.function.push(R.perftools.profiles.Function.decode(n,n.uint32()));break;case 6:l.stringTable&&l.stringTable.length||(l.stringTable=[]),l.stringTable.push(n.string());break;case 7:l.dropFrames=n.int64();break;case 8:l.keepFrames=n.int64();break;case 9:l.timeNanos=n.int64();break;case 10:l.durationNanos=n.int64();break;case 11:l.periodType=R.perftools.profiles.ValueType.decode(n,n.uint32());break;case 12:l.period=n.int64();break;case 13:if(l.comment&&l.comment.length||(l.comment=[]),(_&7)===2)for(var s=n.uint32()+n.pos;n.pos>>0,n.dropFrames.high>>>0).toNumber())),n.keepFrames!=null&&(u.Long?(i.keepFrames=u.Long.fromValue(n.keepFrames)).unsigned=!1:typeof n.keepFrames=="string"?i.keepFrames=parseInt(n.keepFrames,10):typeof n.keepFrames=="number"?i.keepFrames=n.keepFrames:typeof n.keepFrames=="object"&&(i.keepFrames=new u.LongBits(n.keepFrames.low>>>0,n.keepFrames.high>>>0).toNumber())),n.timeNanos!=null&&(u.Long?(i.timeNanos=u.Long.fromValue(n.timeNanos)).unsigned=!1:typeof n.timeNanos=="string"?i.timeNanos=parseInt(n.timeNanos,10):typeof n.timeNanos=="number"?i.timeNanos=n.timeNanos:typeof n.timeNanos=="object"&&(i.timeNanos=new u.LongBits(n.timeNanos.low>>>0,n.timeNanos.high>>>0).toNumber())),n.durationNanos!=null&&(u.Long?(i.durationNanos=u.Long.fromValue(n.durationNanos)).unsigned=!1:typeof n.durationNanos=="string"?i.durationNanos=parseInt(n.durationNanos,10):typeof n.durationNanos=="number"?i.durationNanos=n.durationNanos:typeof n.durationNanos=="object"&&(i.durationNanos=new u.LongBits(n.durationNanos.low>>>0,n.durationNanos.high>>>0).toNumber())),n.periodType!=null){if(typeof n.periodType!="object")throw TypeError(".perftools.profiles.Profile.periodType: object expected");i.periodType=R.perftools.profiles.ValueType.fromObject(n.periodType)}if(n.period!=null&&(u.Long?(i.period=u.Long.fromValue(n.period)).unsigned=!1:typeof n.period=="string"?i.period=parseInt(n.period,10):typeof n.period=="number"?i.period=n.period:typeof n.period=="object"&&(i.period=new u.LongBits(n.period.low>>>0,n.period.high>>>0).toNumber())),n.comment){if(!Array.isArray(n.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");i.comment=[];for(var o=0;o>>0,n.comment[o].high>>>0).toNumber())}return n.defaultSampleType!=null&&(u.Long?(i.defaultSampleType=u.Long.fromValue(n.defaultSampleType)).unsigned=!1:typeof n.defaultSampleType=="string"?i.defaultSampleType=parseInt(n.defaultSampleType,10):typeof n.defaultSampleType=="number"?i.defaultSampleType=n.defaultSampleType:typeof n.defaultSampleType=="object"&&(i.defaultSampleType=new u.LongBits(n.defaultSampleType.low>>>0,n.defaultSampleType.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if((i.arrays||i.defaults)&&(o.sampleType=[],o.sample=[],o.mapping=[],o.location=[],o.function=[],o.stringTable=[],o.comment=[]),i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.dropFrames=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.dropFrames=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.keepFrames=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.keepFrames=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.timeNanos=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.timeNanos=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.durationNanos=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.durationNanos=i.longs===String?"0":0;if(o.periodType=null,u.Long){var l=new u.Long(0,0,!1);o.period=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.period=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.defaultSampleType=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.defaultSampleType=i.longs===String?"0":0}if(n.sampleType&&n.sampleType.length){o.sampleType=[];for(var _=0;_>>0,n.dropFrames.high>>>0).toNumber():n.dropFrames),n.keepFrames!=null&&n.hasOwnProperty("keepFrames")&&(typeof n.keepFrames=="number"?o.keepFrames=i.longs===String?String(n.keepFrames):n.keepFrames:o.keepFrames=i.longs===String?u.Long.prototype.toString.call(n.keepFrames):i.longs===Number?new u.LongBits(n.keepFrames.low>>>0,n.keepFrames.high>>>0).toNumber():n.keepFrames),n.timeNanos!=null&&n.hasOwnProperty("timeNanos")&&(typeof n.timeNanos=="number"?o.timeNanos=i.longs===String?String(n.timeNanos):n.timeNanos:o.timeNanos=i.longs===String?u.Long.prototype.toString.call(n.timeNanos):i.longs===Number?new u.LongBits(n.timeNanos.low>>>0,n.timeNanos.high>>>0).toNumber():n.timeNanos),n.durationNanos!=null&&n.hasOwnProperty("durationNanos")&&(typeof n.durationNanos=="number"?o.durationNanos=i.longs===String?String(n.durationNanos):n.durationNanos:o.durationNanos=i.longs===String?u.Long.prototype.toString.call(n.durationNanos):i.longs===Number?new u.LongBits(n.durationNanos.low>>>0,n.durationNanos.high>>>0).toNumber():n.durationNanos),n.periodType!=null&&n.hasOwnProperty("periodType")&&(o.periodType=R.perftools.profiles.ValueType.toObject(n.periodType,i)),n.period!=null&&n.hasOwnProperty("period")&&(typeof n.period=="number"?o.period=i.longs===String?String(n.period):n.period:o.period=i.longs===String?u.Long.prototype.toString.call(n.period):i.longs===Number?new u.LongBits(n.period.low>>>0,n.period.high>>>0).toNumber():n.period),n.comment&&n.comment.length){o.comment=[];for(var _=0;_>>0,n.comment[_].high>>>0).toNumber():n.comment[_]}return n.defaultSampleType!=null&&n.hasOwnProperty("defaultSampleType")&&(typeof n.defaultSampleType=="number"?o.defaultSampleType=i.longs===String?String(n.defaultSampleType):n.defaultSampleType:o.defaultSampleType=i.longs===String?u.Long.prototype.toString.call(n.defaultSampleType):i.longs===Number?new u.LongBits(n.defaultSampleType.low>>>0,n.defaultSampleType.high>>>0).toNumber():n.defaultSampleType),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.ValueType=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.type=n.int64();break;case 2:l.unit=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.type!=null&&n.hasOwnProperty("type")&&!u.isInteger(n.type)&&!(n.type&&u.isInteger(n.type.low)&&u.isInteger(n.type.high))?"type: integer|Long expected":n.unit!=null&&n.hasOwnProperty("unit")&&!u.isInteger(n.unit)&&!(n.unit&&u.isInteger(n.unit.low)&&u.isInteger(n.unit.high))?"unit: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.ValueType)return n;var i=new R.perftools.profiles.ValueType;return n.type!=null&&(u.Long?(i.type=u.Long.fromValue(n.type)).unsigned=!1:typeof n.type=="string"?i.type=parseInt(n.type,10):typeof n.type=="number"?i.type=n.type:typeof n.type=="object"&&(i.type=new u.LongBits(n.type.low>>>0,n.type.high>>>0).toNumber())),n.unit!=null&&(u.Long?(i.unit=u.Long.fromValue(n.unit)).unsigned=!1:typeof n.unit=="string"?i.unit=parseInt(n.unit,10):typeof n.unit=="number"?i.unit=n.unit:typeof n.unit=="object"&&(i.unit=new u.LongBits(n.unit.low>>>0,n.unit.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.type=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.type=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.unit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.unit=i.longs===String?"0":0}return n.type!=null&&n.hasOwnProperty("type")&&(typeof n.type=="number"?o.type=i.longs===String?String(n.type):n.type:o.type=i.longs===String?u.Long.prototype.toString.call(n.type):i.longs===Number?new u.LongBits(n.type.low>>>0,n.type.high>>>0).toNumber():n.type),n.unit!=null&&n.hasOwnProperty("unit")&&(typeof n.unit=="number"?o.unit=i.longs===String?String(n.unit):n.unit:o.unit=i.longs===String?u.Long.prototype.toString.call(n.unit):i.longs===Number?new u.LongBits(n.unit.low>>>0,n.unit.high>>>0).toNumber():n.unit),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Sample=function(){function r(a){if(this.locationId=[],this.value=[],this.label=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:if(l.locationId&&l.locationId.length||(l.locationId=[]),(_&7)===2)for(var s=n.uint32()+n.pos;n.pos>>0,n.locationId[o].high>>>0).toNumber(!0))}if(n.value){if(!Array.isArray(n.value))throw TypeError(".perftools.profiles.Sample.value: array expected");i.value=[];for(var o=0;o>>0,n.value[o].high>>>0).toNumber())}if(n.label){if(!Array.isArray(n.label))throw TypeError(".perftools.profiles.Sample.label: array expected");i.label=[];for(var o=0;o>>0,n.locationId[l].high>>>0).toNumber(!0):n.locationId[l]}if(n.value&&n.value.length){o.value=[];for(var l=0;l>>0,n.value[l].high>>>0).toNumber():n.value[l]}if(n.label&&n.label.length){o.label=[];for(var l=0;l>>3){case 1:l.key=n.int64();break;case 2:l.str=n.int64();break;case 3:l.num=n.int64();break;case 4:l.numUnit=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.key!=null&&n.hasOwnProperty("key")&&!u.isInteger(n.key)&&!(n.key&&u.isInteger(n.key.low)&&u.isInteger(n.key.high))?"key: integer|Long expected":n.str!=null&&n.hasOwnProperty("str")&&!u.isInteger(n.str)&&!(n.str&&u.isInteger(n.str.low)&&u.isInteger(n.str.high))?"str: integer|Long expected":n.num!=null&&n.hasOwnProperty("num")&&!u.isInteger(n.num)&&!(n.num&&u.isInteger(n.num.low)&&u.isInteger(n.num.high))?"num: integer|Long expected":n.numUnit!=null&&n.hasOwnProperty("numUnit")&&!u.isInteger(n.numUnit)&&!(n.numUnit&&u.isInteger(n.numUnit.low)&&u.isInteger(n.numUnit.high))?"numUnit: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Label)return n;var i=new R.perftools.profiles.Label;return n.key!=null&&(u.Long?(i.key=u.Long.fromValue(n.key)).unsigned=!1:typeof n.key=="string"?i.key=parseInt(n.key,10):typeof n.key=="number"?i.key=n.key:typeof n.key=="object"&&(i.key=new u.LongBits(n.key.low>>>0,n.key.high>>>0).toNumber())),n.str!=null&&(u.Long?(i.str=u.Long.fromValue(n.str)).unsigned=!1:typeof n.str=="string"?i.str=parseInt(n.str,10):typeof n.str=="number"?i.str=n.str:typeof n.str=="object"&&(i.str=new u.LongBits(n.str.low>>>0,n.str.high>>>0).toNumber())),n.num!=null&&(u.Long?(i.num=u.Long.fromValue(n.num)).unsigned=!1:typeof n.num=="string"?i.num=parseInt(n.num,10):typeof n.num=="number"?i.num=n.num:typeof n.num=="object"&&(i.num=new u.LongBits(n.num.low>>>0,n.num.high>>>0).toNumber())),n.numUnit!=null&&(u.Long?(i.numUnit=u.Long.fromValue(n.numUnit)).unsigned=!1:typeof n.numUnit=="string"?i.numUnit=parseInt(n.numUnit,10):typeof n.numUnit=="number"?i.numUnit=n.numUnit:typeof n.numUnit=="object"&&(i.numUnit=new u.LongBits(n.numUnit.low>>>0,n.numUnit.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!1);o.key=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.key=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.str=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.str=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.num=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.num=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.numUnit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.numUnit=i.longs===String?"0":0}return n.key!=null&&n.hasOwnProperty("key")&&(typeof n.key=="number"?o.key=i.longs===String?String(n.key):n.key:o.key=i.longs===String?u.Long.prototype.toString.call(n.key):i.longs===Number?new u.LongBits(n.key.low>>>0,n.key.high>>>0).toNumber():n.key),n.str!=null&&n.hasOwnProperty("str")&&(typeof n.str=="number"?o.str=i.longs===String?String(n.str):n.str:o.str=i.longs===String?u.Long.prototype.toString.call(n.str):i.longs===Number?new u.LongBits(n.str.low>>>0,n.str.high>>>0).toNumber():n.str),n.num!=null&&n.hasOwnProperty("num")&&(typeof n.num=="number"?o.num=i.longs===String?String(n.num):n.num:o.num=i.longs===String?u.Long.prototype.toString.call(n.num):i.longs===Number?new u.LongBits(n.num.low>>>0,n.num.high>>>0).toNumber():n.num),n.numUnit!=null&&n.hasOwnProperty("numUnit")&&(typeof n.numUnit=="number"?o.numUnit=i.longs===String?String(n.numUnit):n.numUnit:o.numUnit=i.longs===String?u.Long.prototype.toString.call(n.numUnit):i.longs===Number?new u.LongBits(n.numUnit.low>>>0,n.numUnit.high>>>0).toNumber():n.numUnit),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Mapping=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.memoryStart=n.uint64();break;case 3:l.memoryLimit=n.uint64();break;case 4:l.fileOffset=n.uint64();break;case 5:l.filename=n.int64();break;case 6:l.buildId=n.int64();break;case 7:l.hasFunctions=n.bool();break;case 8:l.hasFilenames=n.bool();break;case 9:l.hasLineNumbers=n.bool();break;case 10:l.hasInlineFrames=n.bool();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high))?"id: integer|Long expected":n.memoryStart!=null&&n.hasOwnProperty("memoryStart")&&!u.isInteger(n.memoryStart)&&!(n.memoryStart&&u.isInteger(n.memoryStart.low)&&u.isInteger(n.memoryStart.high))?"memoryStart: integer|Long expected":n.memoryLimit!=null&&n.hasOwnProperty("memoryLimit")&&!u.isInteger(n.memoryLimit)&&!(n.memoryLimit&&u.isInteger(n.memoryLimit.low)&&u.isInteger(n.memoryLimit.high))?"memoryLimit: integer|Long expected":n.fileOffset!=null&&n.hasOwnProperty("fileOffset")&&!u.isInteger(n.fileOffset)&&!(n.fileOffset&&u.isInteger(n.fileOffset.low)&&u.isInteger(n.fileOffset.high))?"fileOffset: integer|Long expected":n.filename!=null&&n.hasOwnProperty("filename")&&!u.isInteger(n.filename)&&!(n.filename&&u.isInteger(n.filename.low)&&u.isInteger(n.filename.high))?"filename: integer|Long expected":n.buildId!=null&&n.hasOwnProperty("buildId")&&!u.isInteger(n.buildId)&&!(n.buildId&&u.isInteger(n.buildId.low)&&u.isInteger(n.buildId.high))?"buildId: integer|Long expected":n.hasFunctions!=null&&n.hasOwnProperty("hasFunctions")&&typeof n.hasFunctions!="boolean"?"hasFunctions: boolean expected":n.hasFilenames!=null&&n.hasOwnProperty("hasFilenames")&&typeof n.hasFilenames!="boolean"?"hasFilenames: boolean expected":n.hasLineNumbers!=null&&n.hasOwnProperty("hasLineNumbers")&&typeof n.hasLineNumbers!="boolean"?"hasLineNumbers: boolean expected":n.hasInlineFrames!=null&&n.hasOwnProperty("hasInlineFrames")&&typeof n.hasInlineFrames!="boolean"?"hasInlineFrames: boolean expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Mapping)return n;var i=new R.perftools.profiles.Mapping;return n.id!=null&&(u.Long?(i.id=u.Long.fromValue(n.id)).unsigned=!0:typeof n.id=="string"?i.id=parseInt(n.id,10):typeof n.id=="number"?i.id=n.id:typeof n.id=="object"&&(i.id=new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0))),n.memoryStart!=null&&(u.Long?(i.memoryStart=u.Long.fromValue(n.memoryStart)).unsigned=!0:typeof n.memoryStart=="string"?i.memoryStart=parseInt(n.memoryStart,10):typeof n.memoryStart=="number"?i.memoryStart=n.memoryStart:typeof n.memoryStart=="object"&&(i.memoryStart=new u.LongBits(n.memoryStart.low>>>0,n.memoryStart.high>>>0).toNumber(!0))),n.memoryLimit!=null&&(u.Long?(i.memoryLimit=u.Long.fromValue(n.memoryLimit)).unsigned=!0:typeof n.memoryLimit=="string"?i.memoryLimit=parseInt(n.memoryLimit,10):typeof n.memoryLimit=="number"?i.memoryLimit=n.memoryLimit:typeof n.memoryLimit=="object"&&(i.memoryLimit=new u.LongBits(n.memoryLimit.low>>>0,n.memoryLimit.high>>>0).toNumber(!0))),n.fileOffset!=null&&(u.Long?(i.fileOffset=u.Long.fromValue(n.fileOffset)).unsigned=!0:typeof n.fileOffset=="string"?i.fileOffset=parseInt(n.fileOffset,10):typeof n.fileOffset=="number"?i.fileOffset=n.fileOffset:typeof n.fileOffset=="object"&&(i.fileOffset=new u.LongBits(n.fileOffset.low>>>0,n.fileOffset.high>>>0).toNumber(!0))),n.filename!=null&&(u.Long?(i.filename=u.Long.fromValue(n.filename)).unsigned=!1:typeof n.filename=="string"?i.filename=parseInt(n.filename,10):typeof n.filename=="number"?i.filename=n.filename:typeof n.filename=="object"&&(i.filename=new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber())),n.buildId!=null&&(u.Long?(i.buildId=u.Long.fromValue(n.buildId)).unsigned=!1:typeof n.buildId=="string"?i.buildId=parseInt(n.buildId,10):typeof n.buildId=="number"?i.buildId=n.buildId:typeof n.buildId=="object"&&(i.buildId=new u.LongBits(n.buildId.low>>>0,n.buildId.high>>>0).toNumber())),n.hasFunctions!=null&&(i.hasFunctions=!!n.hasFunctions),n.hasFilenames!=null&&(i.hasFilenames=!!n.hasFilenames),n.hasLineNumbers!=null&&(i.hasLineNumbers=!!n.hasLineNumbers),n.hasInlineFrames!=null&&(i.hasInlineFrames=!!n.hasInlineFrames),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.id=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.id=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.memoryStart=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.memoryStart=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.memoryLimit=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.memoryLimit=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!0);o.fileOffset=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.fileOffset=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.filename=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.filename=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.buildId=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.buildId=i.longs===String?"0":0;o.hasFunctions=!1,o.hasFilenames=!1,o.hasLineNumbers=!1,o.hasInlineFrames=!1}return n.id!=null&&n.hasOwnProperty("id")&&(typeof n.id=="number"?o.id=i.longs===String?String(n.id):n.id:o.id=i.longs===String?u.Long.prototype.toString.call(n.id):i.longs===Number?new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0):n.id),n.memoryStart!=null&&n.hasOwnProperty("memoryStart")&&(typeof n.memoryStart=="number"?o.memoryStart=i.longs===String?String(n.memoryStart):n.memoryStart:o.memoryStart=i.longs===String?u.Long.prototype.toString.call(n.memoryStart):i.longs===Number?new u.LongBits(n.memoryStart.low>>>0,n.memoryStart.high>>>0).toNumber(!0):n.memoryStart),n.memoryLimit!=null&&n.hasOwnProperty("memoryLimit")&&(typeof n.memoryLimit=="number"?o.memoryLimit=i.longs===String?String(n.memoryLimit):n.memoryLimit:o.memoryLimit=i.longs===String?u.Long.prototype.toString.call(n.memoryLimit):i.longs===Number?new u.LongBits(n.memoryLimit.low>>>0,n.memoryLimit.high>>>0).toNumber(!0):n.memoryLimit),n.fileOffset!=null&&n.hasOwnProperty("fileOffset")&&(typeof n.fileOffset=="number"?o.fileOffset=i.longs===String?String(n.fileOffset):n.fileOffset:o.fileOffset=i.longs===String?u.Long.prototype.toString.call(n.fileOffset):i.longs===Number?new u.LongBits(n.fileOffset.low>>>0,n.fileOffset.high>>>0).toNumber(!0):n.fileOffset),n.filename!=null&&n.hasOwnProperty("filename")&&(typeof n.filename=="number"?o.filename=i.longs===String?String(n.filename):n.filename:o.filename=i.longs===String?u.Long.prototype.toString.call(n.filename):i.longs===Number?new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber():n.filename),n.buildId!=null&&n.hasOwnProperty("buildId")&&(typeof n.buildId=="number"?o.buildId=i.longs===String?String(n.buildId):n.buildId:o.buildId=i.longs===String?u.Long.prototype.toString.call(n.buildId):i.longs===Number?new u.LongBits(n.buildId.low>>>0,n.buildId.high>>>0).toNumber():n.buildId),n.hasFunctions!=null&&n.hasOwnProperty("hasFunctions")&&(o.hasFunctions=n.hasFunctions),n.hasFilenames!=null&&n.hasOwnProperty("hasFilenames")&&(o.hasFilenames=n.hasFilenames),n.hasLineNumbers!=null&&n.hasOwnProperty("hasLineNumbers")&&(o.hasLineNumbers=n.hasLineNumbers),n.hasInlineFrames!=null&&n.hasOwnProperty("hasInlineFrames")&&(o.hasInlineFrames=n.hasInlineFrames),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Location=function(){function r(a){if(this.line=[],a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.mappingId=n.uint64();break;case 3:l.address=n.uint64();break;case 4:l.line&&l.line.length||(l.line=[]),l.line.push(R.perftools.profiles.Line.decode(n,n.uint32()));break;case 5:l.isFolded=n.bool();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high)))return"id: integer|Long expected";if(n.mappingId!=null&&n.hasOwnProperty("mappingId")&&!u.isInteger(n.mappingId)&&!(n.mappingId&&u.isInteger(n.mappingId.low)&&u.isInteger(n.mappingId.high)))return"mappingId: integer|Long expected";if(n.address!=null&&n.hasOwnProperty("address")&&!u.isInteger(n.address)&&!(n.address&&u.isInteger(n.address.low)&&u.isInteger(n.address.high)))return"address: integer|Long expected";if(n.line!=null&&n.hasOwnProperty("line")){if(!Array.isArray(n.line))return"line: array expected";for(var i=0;i>>0,n.id.high>>>0).toNumber(!0))),n.mappingId!=null&&(u.Long?(i.mappingId=u.Long.fromValue(n.mappingId)).unsigned=!0:typeof n.mappingId=="string"?i.mappingId=parseInt(n.mappingId,10):typeof n.mappingId=="number"?i.mappingId=n.mappingId:typeof n.mappingId=="object"&&(i.mappingId=new u.LongBits(n.mappingId.low>>>0,n.mappingId.high>>>0).toNumber(!0))),n.address!=null&&(u.Long?(i.address=u.Long.fromValue(n.address)).unsigned=!0:typeof n.address=="string"?i.address=parseInt(n.address,10):typeof n.address=="number"?i.address=n.address:typeof n.address=="object"&&(i.address=new u.LongBits(n.address.low>>>0,n.address.high>>>0).toNumber(!0))),n.line){if(!Array.isArray(n.line))throw TypeError(".perftools.profiles.Location.line: array expected");i.line=[];for(var o=0;o>>0,n.id.high>>>0).toNumber(!0):n.id),n.mappingId!=null&&n.hasOwnProperty("mappingId")&&(typeof n.mappingId=="number"?o.mappingId=i.longs===String?String(n.mappingId):n.mappingId:o.mappingId=i.longs===String?u.Long.prototype.toString.call(n.mappingId):i.longs===Number?new u.LongBits(n.mappingId.low>>>0,n.mappingId.high>>>0).toNumber(!0):n.mappingId),n.address!=null&&n.hasOwnProperty("address")&&(typeof n.address=="number"?o.address=i.longs===String?String(n.address):n.address:o.address=i.longs===String?u.Long.prototype.toString.call(n.address):i.longs===Number?new u.LongBits(n.address.low>>>0,n.address.high>>>0).toNumber(!0):n.address),n.line&&n.line.length){o.line=[];for(var _=0;_>>3){case 1:l.functionId=n.uint64();break;case 2:l.line=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.functionId!=null&&n.hasOwnProperty("functionId")&&!u.isInteger(n.functionId)&&!(n.functionId&&u.isInteger(n.functionId.low)&&u.isInteger(n.functionId.high))?"functionId: integer|Long expected":n.line!=null&&n.hasOwnProperty("line")&&!u.isInteger(n.line)&&!(n.line&&u.isInteger(n.line.low)&&u.isInteger(n.line.high))?"line: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Line)return n;var i=new R.perftools.profiles.Line;return n.functionId!=null&&(u.Long?(i.functionId=u.Long.fromValue(n.functionId)).unsigned=!0:typeof n.functionId=="string"?i.functionId=parseInt(n.functionId,10):typeof n.functionId=="number"?i.functionId=n.functionId:typeof n.functionId=="object"&&(i.functionId=new u.LongBits(n.functionId.low>>>0,n.functionId.high>>>0).toNumber(!0))),n.line!=null&&(u.Long?(i.line=u.Long.fromValue(n.line)).unsigned=!1:typeof n.line=="string"?i.line=parseInt(n.line,10):typeof n.line=="number"?i.line=n.line:typeof n.line=="object"&&(i.line=new u.LongBits(n.line.low>>>0,n.line.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.functionId=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.functionId=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.line=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.line=i.longs===String?"0":0}return n.functionId!=null&&n.hasOwnProperty("functionId")&&(typeof n.functionId=="number"?o.functionId=i.longs===String?String(n.functionId):n.functionId:o.functionId=i.longs===String?u.Long.prototype.toString.call(n.functionId):i.longs===Number?new u.LongBits(n.functionId.low>>>0,n.functionId.high>>>0).toNumber(!0):n.functionId),n.line!=null&&n.hasOwnProperty("line")&&(typeof n.line=="number"?o.line=i.longs===String?String(n.line):n.line:o.line=i.longs===String?u.Long.prototype.toString.call(n.line):i.longs===Number?new u.LongBits(n.line.low>>>0,n.line.high>>>0).toNumber():n.line),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e.Function=function(){function r(a){if(a)for(var n=Object.keys(a),i=0;i>>3){case 1:l.id=n.uint64();break;case 2:l.name=n.int64();break;case 3:l.systemName=n.int64();break;case 4:l.filename=n.int64();break;case 5:l.startLine=n.int64();break;default:n.skipType(_&7);break}}return l},r.decodeDelimited=function(n){return n instanceof X||(n=new X(n)),this.decode(n,n.uint32())},r.verify=function(n){return typeof n!="object"||n===null?"object expected":n.id!=null&&n.hasOwnProperty("id")&&!u.isInteger(n.id)&&!(n.id&&u.isInteger(n.id.low)&&u.isInteger(n.id.high))?"id: integer|Long expected":n.name!=null&&n.hasOwnProperty("name")&&!u.isInteger(n.name)&&!(n.name&&u.isInteger(n.name.low)&&u.isInteger(n.name.high))?"name: integer|Long expected":n.systemName!=null&&n.hasOwnProperty("systemName")&&!u.isInteger(n.systemName)&&!(n.systemName&&u.isInteger(n.systemName.low)&&u.isInteger(n.systemName.high))?"systemName: integer|Long expected":n.filename!=null&&n.hasOwnProperty("filename")&&!u.isInteger(n.filename)&&!(n.filename&&u.isInteger(n.filename.low)&&u.isInteger(n.filename.high))?"filename: integer|Long expected":n.startLine!=null&&n.hasOwnProperty("startLine")&&!u.isInteger(n.startLine)&&!(n.startLine&&u.isInteger(n.startLine.low)&&u.isInteger(n.startLine.high))?"startLine: integer|Long expected":null},r.fromObject=function(n){if(n instanceof R.perftools.profiles.Function)return n;var i=new R.perftools.profiles.Function;return n.id!=null&&(u.Long?(i.id=u.Long.fromValue(n.id)).unsigned=!0:typeof n.id=="string"?i.id=parseInt(n.id,10):typeof n.id=="number"?i.id=n.id:typeof n.id=="object"&&(i.id=new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0))),n.name!=null&&(u.Long?(i.name=u.Long.fromValue(n.name)).unsigned=!1:typeof n.name=="string"?i.name=parseInt(n.name,10):typeof n.name=="number"?i.name=n.name:typeof n.name=="object"&&(i.name=new u.LongBits(n.name.low>>>0,n.name.high>>>0).toNumber())),n.systemName!=null&&(u.Long?(i.systemName=u.Long.fromValue(n.systemName)).unsigned=!1:typeof n.systemName=="string"?i.systemName=parseInt(n.systemName,10):typeof n.systemName=="number"?i.systemName=n.systemName:typeof n.systemName=="object"&&(i.systemName=new u.LongBits(n.systemName.low>>>0,n.systemName.high>>>0).toNumber())),n.filename!=null&&(u.Long?(i.filename=u.Long.fromValue(n.filename)).unsigned=!1:typeof n.filename=="string"?i.filename=parseInt(n.filename,10):typeof n.filename=="number"?i.filename=n.filename:typeof n.filename=="object"&&(i.filename=new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber())),n.startLine!=null&&(u.Long?(i.startLine=u.Long.fromValue(n.startLine)).unsigned=!1:typeof n.startLine=="string"?i.startLine=parseInt(n.startLine,10):typeof n.startLine=="number"?i.startLine=n.startLine:typeof n.startLine=="object"&&(i.startLine=new u.LongBits(n.startLine.low>>>0,n.startLine.high>>>0).toNumber())),i},r.toObject=function(n,i){i||(i={});var o={};if(i.defaults){if(u.Long){var l=new u.Long(0,0,!0);o.id=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.id=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.name=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.name=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.systemName=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.systemName=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.filename=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.filename=i.longs===String?"0":0;if(u.Long){var l=new u.Long(0,0,!1);o.startLine=i.longs===String?l.toString():i.longs===Number?l.toNumber():l}else o.startLine=i.longs===String?"0":0}return n.id!=null&&n.hasOwnProperty("id")&&(typeof n.id=="number"?o.id=i.longs===String?String(n.id):n.id:o.id=i.longs===String?u.Long.prototype.toString.call(n.id):i.longs===Number?new u.LongBits(n.id.low>>>0,n.id.high>>>0).toNumber(!0):n.id),n.name!=null&&n.hasOwnProperty("name")&&(typeof n.name=="number"?o.name=i.longs===String?String(n.name):n.name:o.name=i.longs===String?u.Long.prototype.toString.call(n.name):i.longs===Number?new u.LongBits(n.name.low>>>0,n.name.high>>>0).toNumber():n.name),n.systemName!=null&&n.hasOwnProperty("systemName")&&(typeof n.systemName=="number"?o.systemName=i.longs===String?String(n.systemName):n.systemName:o.systemName=i.longs===String?u.Long.prototype.toString.call(n.systemName):i.longs===Number?new u.LongBits(n.systemName.low>>>0,n.systemName.high>>>0).toNumber():n.systemName),n.filename!=null&&n.hasOwnProperty("filename")&&(typeof n.filename=="number"?o.filename=i.longs===String?String(n.filename):n.filename:o.filename=i.longs===String?u.Long.prototype.toString.call(n.filename):i.longs===Number?new u.LongBits(n.filename.low>>>0,n.filename.high>>>0).toNumber():n.filename),n.startLine!=null&&n.hasOwnProperty("startLine")&&(typeof n.startLine=="number"?o.startLine=i.longs===String?String(n.startLine):n.startLine:o.startLine=i.longs===String?u.Long.prototype.toString.call(n.startLine):i.longs===Number?new u.LongBits(n.startLine.low>>>0,n.startLine.high>>>0).toNumber():n.startLine),o},r.prototype.toJSON=function(){return this.constructor.toObject(this,Ge.util.toJSONOptions)},r}(),e}(),t}();n0.exports=R});var p0=E((mA,d0)=>{d0.exports=ee;var at=null;try{at=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 ee(t,e,r){this.low=t|0,this.high=e|0,this.unsigned=!!r}ee.prototype.__isLong__;Object.defineProperty(ee.prototype,"__isLong__",{value:!0});function Je(t){return(t&&t.__isLong__)===!0}ee.isLong=Je;var i0={},o0={};function xr(t,e){var r,a,n;return e?(t>>>=0,(n=0<=t&&t<256)&&(a=o0[t],a)?a:(r=te(t,(t|0)<0?-1:0,!0),n&&(o0[t]=r),r)):(t|=0,(n=-128<=t&&t<128)&&(a=i0[t],a)?a:(r=te(t,t<0?-1:0,!1),n&&(i0[t]=r),r))}ee.fromInt=xr;function it(t,e){if(isNaN(t))return e?wr:ot;if(e){if(t<0)return wr;if(t>=c0)return u0}else{if(t<=-s0)return Ve;if(t+1>=s0)return f0}return t<0?it(-t,e).neg():te(t%nn|0,t/nn|0,e)}ee.fromNumber=it;function te(t,e,r){return new ee(t,e,r)}ee.fromBits=te;var Mi=Math.pow;function is(t,e,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return ot;if(typeof e=="number"?(r=e,e=!1):e=!!e,r=r||10,r<2||360)throw Error("interior hyphen");if(a===0)return is(t.substring(1),e,r).neg();for(var n=it(Mi(r,8)),i=ot,o=0;o>>0:this.low};N.toNumber=function(){return this.unsigned?(this.high>>>0)*nn+(this.low>>>0):this.high*nn+(this.low>>>0)};N.toString=function(e){if(e=e||10,e<2||36>>0,c=s.toString(e);if(o=_,o.isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}};N.getHighBits=function(){return this.high};N.getHighBitsUnsigned=function(){return this.high>>>0};N.getLowBits=function(){return this.low};N.getLowBitsUnsigned=function(){return this.low>>>0};N.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ve)?64:this.neg().getNumBitsAbs();for(var e=this.high!=0?this.high:this.low,r=31;r>0&&!(e&1<=0};N.isOdd=function(){return(this.low&1)===1};N.isEven=function(){return(this.low&1)===0};N.equals=function(e){return Je(e)||(e=ut(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low};N.eq=N.equals;N.notEquals=function(e){return!this.eq(e)};N.neq=N.notEquals;N.ne=N.notEquals;N.lessThan=function(e){return this.comp(e)<0};N.lt=N.lessThan;N.lessThanOrEqual=function(e){return this.comp(e)<=0};N.lte=N.lessThanOrEqual;N.le=N.lessThanOrEqual;N.greaterThan=function(e){return this.comp(e)>0};N.gt=N.greaterThan;N.greaterThanOrEqual=function(e){return this.comp(e)>=0};N.gte=N.greaterThanOrEqual;N.ge=N.greaterThanOrEqual;N.compare=function(e){if(Je(e)||(e=ut(e)),this.eq(e))return 0;var r=this.isNegative(),a=e.isNegative();return r&&!a?-1:!r&&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};N.comp=N.compare;N.negate=function(){return!this.unsigned&&this.eq(Ve)?Ve:this.not().add(rn)};N.neg=N.negate;N.add=function(e){Je(e)||(e=ut(e));var r=this.high>>>16,a=this.high&65535,n=this.low>>>16,i=this.low&65535,o=e.high>>>16,l=e.high&65535,_=e.low>>>16,s=e.low&65535,c=0,h=0,f=0,v=0;return v+=i+s,f+=v>>>16,v&=65535,f+=n+_,h+=f>>>16,f&=65535,h+=a+l,c+=h>>>16,h&=65535,c+=r+o,c&=65535,te(f<<16|v,c<<16|h,this.unsigned)};N.subtract=function(e){return Je(e)||(e=ut(e)),this.add(e.neg())};N.sub=N.subtract;N.multiply=function(e){if(this.isZero())return ot;if(Je(e)||(e=ut(e)),at){var r=at.mul(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}if(e.isZero())return ot;if(this.eq(Ve))return e.isOdd()?Ve:ot;if(e.eq(Ve))return this.isOdd()?Ve:ot;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(_0)&&e.lt(_0))return it(this.toNumber()*e.toNumber(),this.unsigned);var a=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,l=e.high>>>16,_=e.high&65535,s=e.low>>>16,c=e.low&65535,h=0,f=0,v=0,b=0;return b+=o*c,v+=b>>>16,b&=65535,v+=i*c,f+=v>>>16,v&=65535,v+=o*s,f+=v>>>16,v&=65535,f+=n*c,h+=f>>>16,f&=65535,f+=i*s,h+=f>>>16,f&=65535,f+=o*_,h+=f>>>16,f&=65535,h+=a*c+n*s+i*_+o*l,h&=65535,te(v<<16|b,h<<16|f,this.unsigned)};N.mul=N.multiply;N.divide=function(e){if(Je(e)||(e=ut(e)),e.isZero())throw Error("division by zero");if(at){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?at.div_u:at.div_s)(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?wr:ot;var a,n,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return wr;if(e.gt(this.shru(1)))return h0;i=wr}else{if(this.eq(Ve)){if(e.eq(rn)||e.eq(as))return Ve;if(e.eq(Ve))return rn;var o=this.shr(1);return a=o.div(e).shl(1),a.eq(ot)?e.isNegative()?rn:as:(n=this.sub(e.mul(a)),i=a.add(n.div(e)),i)}else if(e.eq(Ve))return this.unsigned?wr:ot;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();i=ot}for(n=this;n.gte(e);){a=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(a)/Math.LN2),_=l<=48?1:Mi(2,l-48),s=it(a),c=s.mul(e);c.isNegative()||c.gt(n);)a-=_,s=it(a,this.unsigned),c=s.mul(e);s.isZero()&&(s=rn),i=i.add(s),n=n.sub(c)}return i};N.div=N.divide;N.modulo=function(e){if(Je(e)||(e=ut(e)),at){var r=(this.unsigned?at.rem_u:at.rem_s)(this.low,this.high,e.low,e.high);return te(r,at.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))};N.mod=N.modulo;N.rem=N.modulo;N.not=function(){return te(~this.low,~this.high,this.unsigned)};N.and=function(e){return Je(e)||(e=ut(e)),te(this.low&e.low,this.high&e.high,this.unsigned)};N.or=function(e){return Je(e)||(e=ut(e)),te(this.low|e.low,this.high|e.high,this.unsigned)};N.xor=function(e){return Je(e)||(e=ut(e)),te(this.low^e.low,this.high^e.high,this.unsigned)};N.shiftLeft=function(e){return Je(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?te(this.low<>>32-e,this.unsigned):te(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):te(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};N.shr=N.shiftRight;N.shiftRightUnsigned=function(e){if(Je(e)&&(e=e.toInt()),e&=63,e===0)return this;var r=this.high;if(e<32){var a=this.low;return te(a>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?te(r,0,this.unsigned):te(r>>>e-32,0,this.unsigned)};N.shru=N.shiftRightUnsigned;N.shr_u=N.shiftRightUnsigned;N.toSigned=function(){return this.unsigned?te(this.low,this.high,!1):this};N.toUnsigned=function(){return this.unsigned?this:te(this.low,this.high,!0)};N.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()};N.toBytesLE=function(){var e=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};N.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};ee.fromBytes=function(e,r,a){return a?ee.fromBytesLE(e,r):ee.fromBytesBE(e,r)};ee.fromBytesLE=function(e,r){return new ee(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)};ee.fromBytesBE=function(e,r){return new ee(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)}});function g2(t){let e=t.defaultSampleType,r=t.sampleType,a=r.length-1;if(!e||!+e)return a;let n=r.findIndex(i=>i.type===e);return n===-1?a:n}function g0(t){if(t.byteLength===0)return null;let e;try{e=v0.perftools.profiles.Profile.decode(new Uint8Array(t))}catch{return null}function r(f){return typeof f=="number"?f:f.low}function a(f){return e.stringTable[r(f)]||null}let n=new Map;function i(f){let{name:v,filename:b,startLine:p}=f,d=v!=null&&a(v)||"(unknown)",m=b!=null?a(b):null,y=p!=null?+p:null,w={key:`${d}:${m}:${y}`,name:d};return m!=null&&(w.file=m),y!=null&&(w.line=y),w}for(let f of e.function)if(f.id){let v=i(f);v!=null&&n.set(r(f.id),v)}function o(f){let{line:v}=f;if(v==null)return null;let b=Z(v);if(b==null)return null;if(b.functionId){let p=n.get(r(b.functionId)),d=b.line instanceof m0.default?b.line.toNumber():b.line;return d&&d>0&&p!=null&&(p.line=d),p||null}else return null}let l=new Map;for(let f of e.location)if(f.id!=null){let v=o(f);v&&l.set(r(f.id),v)}let _=e.sampleType.map(f=>({type:f.type&&a(f.type)||"samples",unit:f.unit&&a(f.unit)||"count"})),s=g2(e);if(s<0||s>=_.length)return null;let c=_[s],h=new ne;switch(c.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":h.setValueFormatter(new Y(c.unit));break;case"bytes":h.setValueFormatter(new Pe);break}for(let f of e.sample){let v=f.locationId?f.locationId.map(p=>l.get(r(p))):[];if(v.reverse(),f.value==null||f.value.length<=s)return null;let b=f.value[s];h.appendSampleWithWeight(v.filter(p=>p!=null),+b)}return h.build()}var v0,m0,y0=ie(()=>{"use strict";v0=se(a0());Re();$();He();m0=se(p0())});function b2(t){return Ce(y2,t,e=>{let r=e.url,a=e.lineNumber,n=e.columnNumber,i=e.functionName||(r?`(anonymous ${r.split("/").pop()}:${a})`:"(anonymous)");return{key:`${i}:${r}:${a}:${n}`,name:i,file:r,line:a,col:n}})}function os(t){let e=new Map,r=0,a=(_,s)=>{_.id=r++,e.set(_.id,_),s&&(_.parent=s.id),_.children.forEach(c=>a(c,_))};a(t.head);let n=_=>{if(_.children.length===0)return _.selfSize||0;let s=_.children.reduce((c,h)=>(c+=n(h),c),_.selfSize);return _.totalSize=s,s},i=n(t.head),o=[];for(let _ of e.values()){let s=[];for(s.push(_);_.parent!==void 0;){let c=e.get(_.parent);if(c===void 0)break;s.unshift(c),_=c}o.push(s)}let l=new ne(i);for(let _ of o){let s=_[_.length-1];l.appendSampleWithWeight(_.map(c=>b2(c.callFrame)),s.selfSize)}return l.setValueFormatter(new Pe),l.build()}var y2,b0=ie(()=>{"use strict";Re();$();He();y2=new Map});function Oi(t,e){return`${Ut(""+t,10)}:${Ut(""+e,10)}`}function S0(t){let e=new Map;for(let r of t)Ce(e,Oi(Number(r.pid),Number(r.tid)),()=>[]).push(r);return e}function j2(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 r=t[0],a=e[0],n=r.ts,i=a.ts;return n0){let o=Number.MAX_SAFE_INTEGER;for(let l of t)o=Math.min(o,l.ts);for(let l of t)l.ts-=o}let a=[];for(let o of t)switch(o.ph){case"B":{e.push(o);break}case"E":{r.push(o);break}case"X":{a.push(o);break}default:return o}function n(o){return o.dur??o.tdur??0}a.sort((o,l)=>{if(o.tsl.ts)return 1;let _=n(o),s=n(l);return _>s?-1:_l.ts?1:0}return e.sort(i),r.sort(i),[e,r]}function w2(t){let e=[];for(let r of t)switch(r.ph){case"B":case"E":case"X":e.push(r)}return e}function j0(t){let e=new Map;for(let r of t)r.ph==="M"&&r.name==="process_name"&&r.args&&r.args.name&&e.set(r.pid,r.args.name);return e}function C0(t){let e=new Map;for(let r of t)r.ph==="M"&&r.name==="thread_name"&&r.args&&r.args.name&&e.set(Oi(r.pid,r.tid),r.args.name);return e}function w0(t){return`${t.name||"(unnamed)"}`}function ss(t){let e=w0(t);return t.args&&(e+=` ${JSON.stringify(t.args)}`),e}function kr(t,e="UNKNOWN"){if(e==="HERMES"){let a=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:w0(t),key:a,file:t.args.url,line:t.args.line,col:t.args.column}}let r=ss(t);return{name:r,key:r}}function x0(t,e,r,a){return t!=null&&e!=null?`${t} (pid ${r}), ${e} (tid ${a})`:t!=null?`${t} (pid ${r}, tid ${a})`:e!=null?`${e} (pid ${r}, tid ${a})`:`pid ${r}, tid ${a}`}function x2(t,e){let r=j0(t),a=C0(t),n=new Map;return e.forEach(i=>{if(i.length===0)return;let o=Number(i[0].pid),l=Number(i[0].tid),_=Oi(o,l),s=r.get(o),c=a.get(_),h=x0(s,c,o,l);n.set(_,h)}),n}function k2(t,e){let r=j0(t),a=C0(t),n=new Map;return e.forEach(i=>{if(i.length===0)return;let{pid:o,tid:l}=i[0],_=Oi(o,l),s=r.get(o),c=a.get(_),h=x0(s,c,o,l);n.set(_,h)}),n}function A2(t,e,r="UNKNOWN"){let[a,n]=C2(t),i=new de;i.setValueFormatter(new Y("microseconds")),i.setName(e);let o=[],l=s=>{o.push(s),i.enterFrame(kr(s,r),s.ts)},_=s=>{let c=Z(o);if(c==null){console.warn(`Tried to end frame "${kr(s,r).key}", but the stack was empty. Doing nothing instead.`);return}let h=kr(s,r),f=kr(c,r);if(s.name!==c.name){console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${f.key}" was on the top of the stack. Doing nothing instead.`);return}h.key!==f.key&&console.warn(`ts=${s.ts}: Tried to end "${h.key}" when "${f.key}" was on the top of the stack. Ending ${f.key} instead.`),o.pop(),i.leaveFrame(f,s.ts)};for(;a.length>0||n.length>0;){let s=j2(a,n);switch(s){case"B":{l(a.shift());break}case"E":{let h=Z(o);if(h!=null){let v=kr(h,r),b=!1;for(let p=1;pn[0].ts)break;let m=kr(d,r);if(v.key===m.key){let y=n[0];n[0]=n[p],n[p]=y,b=!0;break}}if(!b)for(let p=1;pn[0].ts)break;if(d.name===h.name){let m=n[0];n[0]=n[p],n[p]=m,b=!0;break}}}let f=n.shift();_(f);break}default:return s}}for(let s=o.length-1;s>=0;s--){let c=kr(o[s],r);console.warn(`Frame "${c.key}" was still open at end of profile. Closing automatically.`),i.leaveFrame(c,i.getTotalWeight())}return i.build()}function N2(t){let e=[],r=Number(t[0].ts);return t.forEach((a,n)=>{if(n===0)return;let i=Number(a.ts)-r;r=Number(a.ts),e.push(i)}),e.push(0),e}function E2({name:t,category:e}){return{key:`${t}:${e}`,name:t}}function T2(t,e){let r=[],a=e;for(;a;){let n=t[a];if(!n)throw new Error(`Could not find frame for id ${a}`);r.push(E2(n)),a=n.parent}return r.reverse()}function H2(t,e,r){let a=new ne;a.setValueFormatter(new Y("microseconds")),a.setName(r);let n=N2(e);return e.forEach((i,o)=>{let l=n[o],_=T2(t.stackFrames,i.sf);a.appendSampleWithWeight(_,l)}),a.build()}function ls(t,e="UNKNOWN"){let r=w2(t),a=S0(r),n=k2(t,a),i=[];return n.forEach((o,l)=>{let _=a.get(l);if(!_)throw new Error(`Could not find events for key: ${_}`);i.push([l,A2(_,o,e)])}),Ie(i,o=>o[0]),{name:"",indexToView:0,profiles:i.map(o=>o[1])}}function R2(t){let e=S0(t.samples),r=x2(t.traceEvents,e),a=[];return r.forEach((n,i)=>{let o=e.get(i);if(!o)throw new Error(`Could not find samples for key: ${o}`);o.length!==0&&a.push([i,H2(t,o,n)])}),Ie(a,n=>n[0]),{name:"",indexToView:0,profiles:a.map(n=>n[1])}}function qn(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 L2(t){return t?S2.every(e=>e in t):!1}function I2(t){return qn(t)?L2(t[0].args):!1}function k0(t){return"traceEvents"in t?qn(t.traceEvents):!1}function F2(t){return"traceEvents"in t&&"stackFrames"in t&&"samples"in t&&qn(t.traceEvents)}function A0(t){return k0(t)||qn(t)}function N0(t){return F2(t)?R2(t):k0(t)?ls(t.traceEvents):I2(t)?ls(t,"HERMES"):qn(t)?ls(t):t}var S2,E0=ie(()=>{"use strict";$();Re();He();S2=["line","column","name","category","url","params","allocatedCategory","allocatedName"]});function hs(t,e){return new cs(t,e).parse()}var _s,cs,T0=ie(()=>{"use strict";Re();$();He();_s=class{constructor(e,r){this.fileName=e;this.fieldName=r;this.frameSet=new pt;this.totalWeights=new Map;this.childrenTotalWeights=new Map}getOrInsertFrame(e){return ue.getOrInsert(this.frameSet,e)}addToTotalWeight(e,r){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+r):this.totalWeights.set(e,r)}addSelfWeight(e,r){this.addToTotalWeight(this.getOrInsertFrame(e),r)}addChildWithTotalWeight(e,r,a){let n=this.getOrInsertFrame(e),i=this.getOrInsertFrame(r),o=Ce(this.childrenTotalWeights,n,l=>new Map);o.has(i)?o.set(i,o.get(i)+a):o.set(i,a),this.addToTotalWeight(n,a)}toProfile(){let e=new de,r=1;this.fieldName==="Time_(10ns)"?(e.setName(`${this.fileName} -- Time`),r=10,e.setValueFormatter(new Y("nanoseconds"))):this.fieldName=="Memory_(bytes)"?(e.setName(`${this.fileName} -- Memory`),e.setValueFormatter(new Pe)):e.setName(`${this.fileName} -- ${this.fieldName}`);let a=0,n=new Set,i=0;for(let[_,s]of this.totalWeights)i=Math.max(i,s);let o=(_,s)=>{if(n.has(_)||s<1e-4*i)return;let c=Zn(this.totalWeights,_,()=>0);if(c===0)return;let h=s;e.enterFrame(_,Math.round(a*r)),n.add(_);for(let[f,v]of this.childrenTotalWeights.get(_)||[]){let b=s*(v/c),p=a;o(f,b);let d=a-p;h-=d}n.delete(_),a+=h,e.leaveFrame(_,Math.round(a*r))},l=new Set(this.frameSet);for(let[_,s]of this.childrenTotalWeights)for(let[c,h]of s)l.delete(c);for(let _ of l)o(_,this.totalWeights.get(_));return e.build()}},cs=class{constructor(e,r){this.importedFileName=r;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.lineNume.toProfile())}:null}frameInfo(){let e=this.filename||"(unknown)",r=this.functionName||"(unknown)";return{key:`${e}:${r}`,name:r,file:e}}calleeFrameInfo(){let e=this.calleeFilename||this.filename||"(unknown)",r=this.calleeFunctionName||"(unknown)";return{key:`${e}:${r}`,name:r,file:e}}parseHeaderLine(e){let r=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!r)return!1;if(r[1]!=="events")return!0;let a=r[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(n=>new _s(this.importedFileName,n)),!0}parseAssignmentLine(e){let r=/^(\w+)=\s*(.*)$/.exec(e);if(!r)return!1;let a=r[1],n=r[2];switch(a){case"fe":case"fi":{this.parseNameWithCompression(n,this.savedFileNames);break}case"fl":{this.filename=this.parseNameWithCompression(n,this.savedFileNames);break}case"fn":{this.functionName=this.parseNameWithCompression(n,this.savedFunctionNames);break}case"cfi":case"cfl":{this.calleeFilename=this.parseNameWithCompression(n,this.savedFileNames);break}case"cfn":{this.calleeFunctionName=this.parseNameWithCompression(n,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,r){{let a=/^\((\d+)\)\s*(.+)$/.exec(e);if(a){let n=a[1],i=a[2];if(n in r)throw new Error(`Redefinition of name with id: ${n}. Original value was "${r[n]}". Tried to redefine as "${i}" on line ${this.lineNum}.`);return r[n]=i,i}}{let a=/^\((\d+)\)$/.exec(e);if(a){let n=a[1];if(!(n in r))throw new Error(`Tried to use name with id ${n} on line ${this.lineNum} before it was defined.`);return r[n]}}return e}parseCostLine(e,r){let a=e.split(/\s+/),n=[];for(let o=0;o!/^$|^Log closed$|log opened/.exec(m)),a=-1,n=d(r[0]);if(n===null)throw Error;a=n.at;let i=Z(r);if(i===null)throw Error;let o=d(i);if(o===null)throw Error;let l=o.at,_=new pt,s=[],c=0,h,f=-1;function v(m,y,S){function w(k,H){s.push(H),e.enterFrame(ue.getOrInsert(_,{name:H,key:H}),k),c=k}f>-1&&(f=-1,h===S&&f>=c&&v(m,f,`QUEUE ${S}`));let j=`STACK ${m}`;[...s].reverse().find(k=>k.startsWith("STACK "))!==j&&(s.length===1&&b(c),w(y,j)),w(y,S)}function b(m){let y=s.pop();if(y===void 0)throw Error("Tried to leave frame when nothing was on stack.");e.leaveFrame(ue.getOrInsert(_,{name:y,key:y}),m);let S=Z(s);S!==null&&S.startsWith("QUEUE ")&&(b(m),S=Z(s)),s.length>1&&S!==null&&S.startsWith("STACK ")&&b(m),c=m}function p(m,y,S){Z(s)===S?b(y):c===0?(console.log(`Tried to leave frame "${S}" which was never entered. Assuming it has been running since the start.`),v(m,0,S),b(y)):console.log(`Tried to leave frame "${S}" which was never entered. Other events have happened since the start, ignoring line.`)}function d(m){if(m===void 0)throw Error("Probably tried to import empty file.");let y=m.split(":");return y.length<3?null:a!==-1?{at:parseInt(y[0])-a,event:y[1],stackInt:parseInt(y[2]),name:y[5]}:{at:parseInt(y[0]),event:y[1],stackInt:parseInt(y[2]),name:y[5]}}for(r.forEach((m,y,S)=>{let w=d(m);if(w!==null){if(w.event==="PUSH"){v(w.stackInt,w.at,w.name),y+=1;let j=d(S[y]);for(;j!==null&&j.at===w.at;)j.name===w.name&&j.stackInt===w.stackInt&&j.event==="POP"?(p(j.stackInt,j.at,j.name),S.splice(y,1),j=null):(y+=1,y0;)b(l);return e.build()}var R0=ie(()=>{"use strict";Re();$();He()});var L0={};ps(L0,{importFromFileSystemDirectoryEntry:()=>z2,importProfileGroupFromBase64:()=>O2,importProfileGroupFromText:()=>M2,importProfilesFromArrayBuffer:()=>P2,importProfilesFromFile:()=>B2});async function M2(t,e){return await Bi(new Ei(t,e))}async function O2(t,e){return await Bi(Jt.fromArrayBuffer(t,Hs(e).buffer))}async function B2(t){return Bi(Jt.fromFile(t))}async function P2(t,e){return Bi(Jt.fromArrayBuffer(t,e))}async function Bi(t){let e=await t.name(),r=await D2(t);if(r){r.name||(r.name=e);for(let a of r.profiles)a&&!a.getName()&&a.setName(e);return r}return null}function Ne(t){return t?{name:t.getName(),indexToView:0,profiles:[t]}:null}async function D2(t){let e=await t.name(),r=await t.readAsArrayBuffer();{let i=g0(r);if(i)return console.log("Importing as protobuf encoded pprof file"),Ne(i)}let a=await t.readAsText();if(e.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),ko(a.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline Object"),wn(a.parseAsJSON().traceEvents,e);if(e.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(e))return console.log("Importing as Chrome Timeline"),wn(a.parseAsJSON(),e);if(e.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),Ne(rl(a.parseAsJSON()));if(e.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),Ne(zl(a));if(e.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),Ul(a);if(e.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),Ne(Vl(a));if(e.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),Ne(Jl(a.parseAsJSON()));if(e.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),Ne(os(a.parseAsJSON()));if(e.endsWith("-recording.json"))return console.log("Importing as Safari profile"),Ne($l(a.parseAsJSON()));if(e.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),hs(a,e);let n;try{n=a.parseAsJSON()}catch{}if(n){if(n.$schema==="https://www.speedscope.app/file-format-schema.json")return console.log("Importing as speedscope json file"),ko(n);if(n.systemHost&&n.systemHost.name=="Firefox")return console.log("Importing as Firefox profile"),Ne(Zu(n));if(tl(n))return console.log("Importing as Chrome Timeline"),wn(n,e);if(Xh(n))return console.log("Importing as Chrome Timeline Object"),wn(n.traceEvents,e);if("nodes"in n&&"samples"in n&&"timeDeltas"in n)return console.log("Importing as Chrome CPU Profile"),Ne(ci(n));if(A0(n))return console.log("Importing as Trace Event Format profile"),N0(n);if("head"in n&&"samples"in n&&"timestamps"in n)return console.log("Importing as Chrome CPU Profile (old format)"),Ne(Yh(n));if("mode"in n&&"frames"in n&&"raw_timestamp_deltas"in n)return console.log("Importing as stackprof profile"),Ne(rl(n));if("code"in n&&"functions"in n&&"ticks"in n)return console.log("Importing as --prof-process v8 log"),Ne(Jl(n));if("head"in n&&"selfSize"in n.head)return console.log("Importing as Chrome Heap Profile"),Ne(os(n));if("rts_arguments"in n&&"initial_capabilities"in n)return console.log("Importing as Haskell GHC JSON Profile"),nd(n);if("recording"in n&&"sampleStackTraces"in n.recording)return console.log("Importing as Safari profile"),Ne($l(n))}else{if(/^# callgrind format/.exec(a.firstChunk())||/^events:/m.exec(a.firstChunk())&&/^fn=/m.exec(a.firstChunk()))return console.log("Importing as Callgrind profile"),hs(a,e);if(/^[\w \t\(\)]*\tSymbol Name/.exec(a.firstChunk()))return console.log("Importing as Instruments.app deep copy"),Ne(zl(a));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(a.firstChunk()))return console.log("Importing as Papyrus profile"),Ne(H0(a));let i=Ul(a);if(i)return console.log("Importing from linux perf script output"),i;let o=Vl(a);if(o)return console.log("Importing as collapsed stack format"),Ne(o)}return null}async function z2(t){return qu(t)}var I0=ie(()=>{"use strict";Zh();Qh();Xu();Yu();Qu();Ao();ed();rd();ad();id();Bl();y0();$();b0();E0();T0();R0()});var F0=E((uN,V2)=>{V2.exports="./perf-vertx-stacks-01-collapsed-all-ZNUIGAJL.txt"});var P,K0,sn,Vi,ys,vs,bs,Ss,At={},Ji=[],$0=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function ir(t,e){for(var r in e)t[r]=e[r];return t}function js(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,r){var a,n=arguments,i={};for(a in e)a!=="key"&&a!=="ref"&&(i[a]=e[a]);if(arguments.length>3)for(r=[r],a=3;a=this.capacity;)this.map.delete(this.list.pop().data);let n=this.list.prepend(new Wi(e));this.map.set(e,{value:r,listNode:n})}getOrInsert(e,r){let a=this.get(e);return a==null&&(a=r(e),this.insert(e,a)),a}removeLRU(){let e=this.list.pop();if(!e)return null;let r=e.data,a=this.map.get(r).value;return this.map.delete(r),[r,a]}clear(){this.list=new ea,this.map=new Map}};function we(t,e,r){return tr?r:t}var C=class t{constructor(e,r){this.x=e;this.y=r}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,r=1e-9){return Math.abs(this.x-e.x)=0&&e<=31),t.TEXTURE0+e}var J;(v=>{class t{constructor(p=0,d=0,m=0,y=0){this.x=p;this.y=d;this.width=m;this.height=y}set(p,d,m,y){this.x=p,this.y=d,this.width=m,this.height=y}equals(p){return this.x===p.x&&this.y===p.y&&this.width===p.width&&this.height===p.height}}v.Rect=t;class e{constructor(p,d,m,y){this.redF=p;this.greenF=d;this.blueF=m;this.alphaF=y}equals(p){return this.redF===p.redF&&this.greenF===p.greenF&&this.blueF===p.blueF&&this.alphaF===p.alphaF}static{this.TRANSPARENT=new e(0,0,0,0)}}v.Color=e;let r;(A=>(A[A.ZERO=0]="ZERO",A[A.ONE=1]="ONE",A[A.SOURCE_COLOR=2]="SOURCE_COLOR",A[A.TARGET_COLOR=3]="TARGET_COLOR",A[A.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",A[A.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",A[A.SOURCE_ALPHA=6]="SOURCE_ALPHA",A[A.TARGET_ALPHA=7]="TARGET_ALPHA",A[A.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",A[A.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",A[A.CONSTANT=10]="CONSTANT",A[A.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"))(r=v.BlendOperation||={});let a;(d=>(d[d.TRIANGLES=0]="TRIANGLES",d[d.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"))(a=v.Primitive||={});class n{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(p){this.resizeEventHandlers.add(p)}removeAfterResizeEventHandler(p){this.resizeEventHandlers.delete(p)}}v.Context=n;let i;(d=>(d[d.FLOAT=0]="FLOAT",d[d.BYTE=1]="BYTE"))(i=v.AttributeType||={});function o(b){return b==0?4:1}v.attributeByteLength=o;class l{constructor(p,d,m,y){this.name=p;this.type=d;this.count=m;this.byteOffset=y}}v.Attribute=l;class _{constructor(){this._attributes=[];this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(p,d,m){return this.attributes.push(new l(p,d,m,this.stride)),this._stride+=m*o(d),this}}v.VertexFormat=_;class s{uploadFloat32Array(p){this.upload(new Uint8Array(p.buffer),0)}uploadFloats(p){this.uploadFloat32Array(new Float32Array(p))}}v.VertexBuffer=s;let c;(d=>(d[d.NEAREST=0]="NEAREST",d[d.LINEAR=1]="LINEAR"))(c=v.PixelFilter||={});let h;(d=>(d[d.REPEAT=0]="REPEAT",d[d.CLAMP=1]="CLAMP"))(h=v.PixelWrap||={});class f{constructor(p,d,m){this.minFilter=p;this.magFilter=d;this.wrap=m}static{this.LINEAR_CLAMP=new f(1,1,1)}static{this.LINEAR_MIN_NEAREST_MAG_CLAMP=new f(1,0,1)}static{this.NEAREST_CLAMP=new f(0,0,1)}}v.TextureFormat=f})(J||={});var qi;(v=>{class t extends J.Context{constructor(d=document.createElement("canvas")){super();this._attributeCount=0;this._blendOperations=0;this._contextResetHandlers=[];this._currentClearColor=J.Color.TRANSPARENT;this._currentRenderTarget=null;this._defaultViewport=new J.Rect;this._forceStateUpdate=!0;this._generation=1;this._height=0;this._oldBlendOperations=0;this._oldRenderTarget=null;this._oldViewport=new J.Rect;this._width=0;this.handleWebglContextRestored=()=>{this._attributeCount=0,this._currentClearColor=J.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let d of this._contextResetHandlers)d()};this.ANGLE_instanced_arrays=null;this.ANGLE_instanced_arrays_generation=-1;let m=d.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(m==null)throw new Error("Setup failure");this._gl=m;let y=d.style;d.width=0,d.height=0,y.width=y.height="0",d.addEventListener("webglcontextlost",S=>{S.preventDefault()}),d.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(d){ep(this._contextResetHandlers,d)}removeContextResetHandler(d){tp(this._contextResetHandlers,d)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(d,m){this._blendOperations=t._packBlendModes(d,m)}setViewport(d,m,y,S){(this._currentRenderTarget!=null?this._currentRenderTarget.viewport:this._defaultViewport).set(d,m,y,S)}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(d,m,y){this._updateRenderTargetAndViewport(),s.from(m).prepare(),c.from(y).prepare(),this._updateFormat(m.format),this._updateBlendState(),this._gl.drawArrays(d==0?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(y.byteCount/m.format.stride)),this._forceStateUpdate=!1}resize(d,m,y,S){let w=this._gl.canvas,j=w.getBoundingClientRect();if(this._width===d&&this._height===m&&j.width===y&&j.height===S)return;let k=w.style;w.width=d,w.height=m,k.width=`${y}px`,k.height=`${S}px`,this.setViewport(0,0,d,m),this._width=d,this._height=m,this.resizeEventHandlers.forEach(H=>H())}clear(d){this._updateRenderTargetAndViewport(),this._updateBlendState(),d.equals(this._currentClearColor)||(this._gl.clearColor(d.redF,d.greenF,d.blueF,d.alphaF),this._currentClearColor=d),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(d){this._currentRenderTarget=f.from(d)}createMaterial(d,m,y){let S=new s(this,d,m,y);return S.program,S}createVertexBuffer(d){return V(d>0&&d%4==0),new c(this,d)}createTexture(d,m,y,S){return new h(this,d,m,y,S)}createRenderTarget(d){return new f(this,h.from(d))}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 d=this._currentRenderTarget,m=d!=null?d.viewport:this._defaultViewport,y=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=d)&&(y.bindFramebuffer(y.FRAMEBUFFER,d?d.framebuffer:null),this._oldRenderTarget=d),(this._forceStateUpdate||!this._oldViewport.equals(m))&&(y.viewport(m.x,this.renderTargetHeightInPixels-m.y-m.height,m.width,m.height),this._oldViewport.set(m.x,m.y,m.width,m.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let d=this._gl,m=this._blendOperations,y=this._oldBlendOperations,S=m&15,w=m>>4;V(S in this._blendOperationMap),V(w in this._blendOperationMap),m==t.COPY_BLEND_OPERATIONS?d.disable(d.BLEND):((this._forceStateUpdate||y==t.COPY_BLEND_OPERATIONS)&&d.enable(d.BLEND),d.blendFunc(this._blendOperationMap[S],this._blendOperationMap[w])),this._oldBlendOperations=m}}_updateFormat(d){let m=this._gl,y=d.attributes,S=y.length;for(let w=0;wS;)this._attributeCount--,m.disableVertexAttribArray(this._attributeCount);this._attributeCount=S}getWebGLInfo(){let d=this.gl.getExtension("WEBGL_debug_renderer_info"),m=d?this.gl.getParameter(d.UNMASKED_RENDERER_WEBGL):null,y=d?this.gl.getParameter(d.UNMASKED_VENDOR_WEBGL):null,S=this.gl.getParameter(this.gl.VERSION);return{renderer:m,vendor:y,version:S}}static from(d){return V(d==null||d instanceof t),d}static _packBlendModes(d,m){return d|m<<4}static{this.COPY_BLEND_OPERATIONS=t._packBlendModes(1,0)}}v.Context=t;class e{constructor(p,d,m=0,y=null,S=!0){this._material=p;this._name=d;this._generation=m;this._location=y;this._isDirty=S}get location(){let p=t.from(this._material.context);if(this._generation!=p.generation&&(this._location=p.gl.getUniformLocation(this._material.program,this._name),this._generation=p.generation,!Gi)){let d=this._material.program,m=p.gl;for(let y=0,S=m.getProgramParameter(d,m.ACTIVE_UNIFORMS);y0&&this._texture.height>0?this._texture.texture:null)}}class s{constructor(p,d,m,y,S={},w=[],j=0,k=null){this._context=p;this._format=d;this._vertexSource=m;this._fragmentSource=y;this._uniformsMap=S;this._uniformsList=w;this._generation=j;this._program=k}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(p,d){let m=this._uniformsMap[p]||null;m==null&&(m=new r(this,p),this._uniformsMap[p]=m,this._uniformsList.push(m)),V(m instanceof r),m.set(d)}setUniformInt(p,d){let m=this._uniformsMap[p]||null;m==null&&(m=new a(this,p),this._uniformsMap[p]=m,this._uniformsList.push(m)),V(m instanceof a),m.set(d)}setUniformVec2(p,d,m){let y=this._uniformsMap[p]||null;y==null&&(y=new n(this,p),this._uniformsMap[p]=y,this._uniformsList.push(y)),V(y instanceof n),y.set(d,m)}setUniformVec3(p,d,m,y){let S=this._uniformsMap[p]||null;S==null&&(S=new i(this,p),this._uniformsMap[p]=S,this._uniformsList.push(S)),V(S instanceof i),S.set(d,m,y)}setUniformVec4(p,d,m,y,S){let w=this._uniformsMap[p]||null;w==null&&(w=new o(this,p),this._uniformsMap[p]=w,this._uniformsList.push(w)),V(w instanceof o),w.set(d,m,y,S)}setUniformMat3(p,d,m,y,S,w,j,k,H,O){let T=this._uniformsMap[p]||null;T==null&&(T=new l(this,p),this._uniformsMap[p]=T,this._uniformsList.push(T)),V(T instanceof l),T.set(d,m,y,S,w,j,k,H,O)}setUniformSampler(p,d,m){let y=this._uniformsMap[p]||null;y==null&&(y=new _(this,p),this._uniformsMap[p]=y,this._uniformsList.push(y)),V(y instanceof _),y.set(d,m)}get program(){let p=this._context.gl;if(this._generation!=this._context.generation){this._program=p.createProgram(),this._compileShader(p,p.VERTEX_SHADER,this.vertexSource),this._compileShader(p,p.FRAGMENT_SHADER,this.fragmentSource);let d=this.format.attributes;for(let m=0;m=0),V(0<=d&&d+y<=this._byteCount),V(0<=m&&m+y<=this._byteCount),this._bytes&&d!=m&&y!=0&&(this._bytes.set(this._bytes.subarray(d,this._byteCount),m),this._growDirtyRegion(Math.min(d,m),Math.max(d,m)+y))}upload(d,m=0){V(0<=m&&m+d.length<=this._byteCount),V(this._bytes!=null),this._bytes.set(d,m),this._growDirtyRegion(m,m+d.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let d=this._context.gl;this._generation!==this._context.generation&&(this._buffer=d.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),d.bindBuffer(d.ARRAY_BUFFER,this._buffer),this._isDirty&&(d.bufferData(d.ARRAY_BUFFER,this._byteCount,d.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin{let r=z.betweenRects(e.configSpaceSrcRect,e.physicalSpaceDstRect),a=new C(this.gl.viewport.width,this.gl.viewport.height);return z.withTranslation(new C(-1,1)).times(z.withScale(new C(2,-2).dividedByPointwise(a))).times(r)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLES,this.material,e.batch.getBuffer())}};var ce=class t{constructor(e=0,r=0,a=0,n=1){this.r=e;this.g=r;this.b=a;this.a=n}static fromLumaChromaHue(e,r,a){let n=a/60,i=r*(1-Math.abs(n%2-1)),[o,l,_]=n<1?[r,i,0]:n<2?[i,r,0]:n<3?[0,r,i]:n<4?[0,i,r]:n<5?[i,0,r]:[r,0,i],s=e-(.3*o+.59*l+.11*_);return new t(we(o+s,0,1),we(l+s,0,1),we(_+s,0,1),1)}static fromCSSHex(e){if(e.length!==7||e[0]!=="#")throw new Error(`Invalid color input ${e}`);let r=parseInt(e.substr(1,2),16)/255,a=parseInt(e.substr(3,2),16)/255,n=parseInt(e.substr(5,2),16)/255;if(r<0||r>1||a<0||a>1||n<0||n>1)throw new Error(`Invalid color input ${e}`);return new t(r,a,n)}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 ia=class{constructor(e,r,a){this.gl=e;this.rectangleBatchRenderer=r;this.textureRenderer=a;this.texture=e.createTexture(J.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=e.createRenderTarget(this.texture),this.rowCache=new ta(this.texture.height),this.clearLineBatch=new or(e),this.clearLineBatch.addRect(I.unit,new ce(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 n=this.rowCache.get(a);if(n!=null)continue;n=this.allocateLine(a);let i=new I(new C(0,n),new C(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:I.unit,physicalSpaceDstRect:i}),r(i,a)}})}renderViaAtlas(e,r){let a=this.rowCache.get(e);if(a==null)return!1;let n=new I(new C(0,a),new C(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:n,dstRect:r}),!0}};var ip=` 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); } `,op=` precision mediump float; varying vec2 vUv; uniform sampler2D texture; void main() { gl_FragColor = texture2D(texture, vUv); } `,oa=class{constructor(e){this.gl=e;let r=new J.VertexFormat;r.add("position",J.AttributeType.FLOAT,2),r.add("uv",J.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]}],n=[];for(let i of a)n.push(i.pos[0]),n.push(i.pos[1]),n.push(i.uv[0]),n.push(i.uv[1]);this.buffer=e.createVertexBuffer(r.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(n).buffer)),this.material=e.createMaterial(r,ip,op)}render(e){this.material.setUniformSampler("texture",e.texture,0),mt(this.material,"uvTransform",(()=>{let{srcRect:r,texture:a}=e,i=z.withTranslation(new C(0,1)).times(z.withScale(new C(1,-1))).times(z.betweenRects(new I(C.zero,new C(a.width,a.height)),I.unit)).transformRect(r);return z.betweenRects(I.unit,i)})()),mt(this.material,"positionTransform",(()=>{let{dstRect:r}=e,{viewport:a}=this.gl,n=new C(a.width,a.height),o=z.withScale(new C(1,-1)).times(z.betweenRects(new I(C.zero,n),I.NDC)).transformRect(r);return z.betweenRects(I.NDC,o)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var Yi=new J.VertexFormat;Yi.add("position",J.AttributeType.FLOAT,2);var lp=` attribute vec2 position; void main() { gl_Position = vec4(position, 0, 1); } `,sp=t=>{let{r:e,g:r,b:a}=ce.fromCSSHex(t.fgSecondaryColor),n=`${e.toFixed(1)}, ${r.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(${n}, 0.8); } else { // Outside viewport rectangle gl_FragColor = vec4(${n}, 0.5); } } `},la=class{constructor(e,r){this.gl=e;let a=[[-1,1],[1,1],[-1,-1],[1,-1]],n=[];for(let i of a)n.push(i[0]),n.push(i[1]);this.buffer=e.createVertexBuffer(Yi.stride*a.length),this.buffer.upload(new Uint8Array(new Float32Array(n).buffer)),this.material=e.createMaterial(Yi,lp,sp(r))}render(e){mt(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),Xi(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),Xi(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);let r=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",r.x,r.y),this.material.setUniformVec2("physicalSize",r.width,r.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(J.BlendOperation.SOURCE_ALPHA,J.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var sa=new J.VertexFormat;sa.add("position",J.AttributeType.FLOAT,2);sa.add("uv",J.AttributeType.FLOAT,2);var _p=` 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); } `,cp=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); } } `,_a=class{constructor(e,r){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]}],n=[];for(let i of a)n.push(i.pos[0]),n.push(i.pos[1]),n.push(i.uv[0]),n.push(i.uv[1]);this.buffer=e.createVertexBuffer(sa.stride*a.length),this.buffer.uploadFloats(n),this.material=e.createMaterial(sa,_p,cp(r.colorForBucketGLSL))}render(e){let{srcRect:r,rectInfoTexture:a}=e,i=z.withTranslation(new C(0,1)).times(z.withScale(new C(1,-1))).times(z.betweenRects(new I(C.zero,new C(a.width,a.height)),I.unit)).transformRect(r),o=z.betweenRects(I.unit,i),{dstRect:l}=e,_=new C(this.gl.viewport.width,this.gl.viewport.height),c=z.withScale(new C(1,-1)).times(z.betweenRects(new I(C.zero,_),I.NDC)).transformRect(l),h=z.betweenRects(I.NDC,c),f=C.unit.dividedByPointwise(new C(e.rectInfoTexture.width,e.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",e.rectInfoTexture,0),mt(this.material,"uvTransform",o),this.material.setUniformFloat("renderOutlines",e.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",f.x,f.y),mt(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(J.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}};var ca=class{constructor(e,r){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=ce.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new J.Color(e.r,e.g,e.b,e.a));for(let r of this.beforeFrameHandlers)r()};this.gl=new qi.Context(e),this.rectangleBatchRenderer=new na(this.gl),this.textureRenderer=new oa(this.gl),this.viewportRectangleRenderer=new la(this.gl,r),this.flamechartColorPassRenderer=new _a(this.gl,r),this.theme=r,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,r){let{origin:a,size:n}=e,i=this.gl.viewport;this.gl.setViewport(a.x,a.y,n.x,n.y),r();let{x:o,y:l,width:_,height:s}=i;this.gl.setViewport(o,l,_,s)}renderBehind(e,r){let a=e.getBoundingClientRect(),n=new I(new C(a.left*window.devicePixelRatio,a.top*window.devicePixelRatio),new C(a.width*window.devicePixelRatio,a.height*window.devicePixelRatio));this.setViewport(n,r)}};var Kt=Tr(t=>e=>t.get(e.key)||0),Nt=Oe(({theme:t,frameToColorBucket:e})=>{let r=Kt(e);return a=>{let n=r(a)/255;return t.colorForBucket(n).toCSS()}}),Et=Oe(({theme:t,canvas:e})=>new ca(e,t)),Rs=Tr(t=>new ia(t.gl,t.rectangleBatchRenderer,t.textureRenderer)),Ls=Oe(({profile:t,flattenRecursion:e})=>e?t.getProfileWithRecursionFlattened():t),Tt=Tr(t=>{let e=[];t.forEachFrame(i=>e.push(i));function r(i){return(i.file||"")+i.name}function a(i,o){return r(i)>r(o)?1:-1}e.sort(a);let n=new Map;for(let i=0;i=r.__.length&&r.__.push({}),r.__[t]}function Be(t){return fn=1,Ps(Ds,t)}function Ps(t,e,r){var a=un(Hr++,2);return a.__c||(a.__c=Xe,a.__=[r?r(e):Ds(void 0,e),function(n){var i=t(a.__[0],n);a.__[0]!==i&&(a.__[0]=i,a.__c.setState({}))}]),a.__}function Ke(t,e){var r=un(Hr++,3);!P.__s&&ro(r.__H,e)&&(r.__=t,r.__H=e,Xe.__H.__h.push(r))}function to(t,e){var r=un(Hr++,4);!P.__s&&ro(r.__H,e)&&(r.__=t,r.__H=e,Xe.__h.push(r))}function $t(t){return fn=5,Q(function(){return{current:t}},[])}function Q(t,e){var r=un(Hr++,7);return ro(r.__H,e)?(r.__H=e,r.__h=t,r.__=t()):r.__}function D(t,e){return fn=8,Q(function(){return t},e)}function Ye(t){var e=Xe.context[t.__c],r=un(Hr++,9);return r.__c=t,e?(r.__==null&&(r.__=!0,e.sub(Xe)),e.props.value):t.__}function hp(){Zi.some(function(t){if(t.__P)try{t.__H.__h.forEach(Qi),t.__H.__h.forEach(eo),t.__H.__h=[]}catch(e){return t.__H.__h=[],P.__e(e,t.__v),!0}}),Zi=[]}function Qi(t){t.t&&t.t()}function eo(t){var e=t.__();typeof e=="function"&&(t.t=e)}function ro(t,e){return!t||e.some(function(r,a){return r!==t[a]})}function Ds(t,e){return typeof e=="function"?e(t):e}P.__r=function(t){Fs&&Fs(t),Hr=0,(Xe=t.__c).__H&&(Xe.__H.__h.forEach(Qi),Xe.__H.__h.forEach(eo),Xe.__H.__h=[])},P.diffed=function(t){Ms&&Ms(t);var e=t.__c;if(e){var r=e.__H;r&&r.__h.length&&(Zi.push(e)!==1&&Is===P.requestAnimationFrame||((Is=P.requestAnimationFrame)||function(a){var n,i=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(a)},o=setTimeout(i,100);typeof window<"u"&&(n=requestAnimationFrame(i))})(hp))}},P.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Qi),r.__h=r.__h.filter(function(a){return!a.__||eo(a)})}catch(a){e.some(function(n){n.__h&&(n.__h=[])}),e=[],P.__e(a,r.__v)}}),Os&&Os(t,e)},P.unmount=function(t){Bs&&Bs(t);var e=t.__c;if(e){var r=e.__H;if(r)try{r.__.forEach(function(a){return a.t&&a.t()})}catch(a){P.__e(a,e.__v)}}};function Gs(t,e){for(var r in e)t[r]=e[r];return t}function ao(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}var qb=function(t){var e,r;function a(n){var i;return(i=t.call(this,n)||this).isPureReactComponent=!0,i}return r=t,(e=a).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,a.prototype.shouldComponentUpdate=function(n,i){return ao(this.props,n)||ao(this.state,i)},a}(je);function he(t,e){function r(n){var i=this.props.ref,o=i==n.ref;return!o&&i&&(i.call?i(null):i.current=null),e?!e(this.props,n)||!o:ao(this.props,n)}function a(n){return this.shouldComponentUpdate=r,g(t,Gs({},n))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var zs=P.__b;P.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),zs&&zs(t)};var up=P.__e;function qs(t){return t&&((t=Gs({},t)).__c=null,t.__k=t.__k&&t.__k.map(qs)),t}function Vs(){this.__u=0,this.o=null,this.__b=null}function Xs(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function ha(){this.i=null,this.l=null}P.__e=function(t,e,r){if(t.then){for(var a,n=e;n=n.__;)if((a=n.__c)&&a.__c)return a.__c(t,e.__c)}up(t,e,r)},(Vs.prototype=new je).__c=function(t,e){var r=this;r.o==null&&(r.o=[]),r.o.push(e);var a=Xs(r.__v),n=!1,i=function(){n||(n=!0,a?a(o):o())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var o=function(){var l;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});l=r.o.pop();)l.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),t.then(i,i)},Vs.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=qs(this.__b),this.__b=null),[g(je,null,e.u?null:t.children),e.u&&t.fallback]};var Js=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]r()))}get(){return this.state}subscribe(e){this.observers.push(e)}unsubscribe(e){let r=this.observers.indexOf(e);r!==-1&&this.observers.splice(r,1)}};function W(t){let[e,r]=Be(t.get());return to(()=>{r(t.get());function a(){r(t.get())}return t.subscribe(a),()=>{t.unsubscribe(a)}},[t]),e}function pp(t){switch(t){case"time-ordered":return 0;case"left-heavy":return 1;case"sandwich":return 2;default:return null}}function Ys(t=window.location.hash){try{if(!t.startsWith("#"))return{};let e=t.substr(1).split("&"),r={};for(let a of e){let[n,i]=a.split("=");if(i=decodeURIComponent(i),n==="profileURL")r.profileURL=i;else if(n==="title")r.title=i;else if(n==="localProfilePath")r.localProfilePath=i;else if(n==="view"){let o=pp(i);o!==null?r.viewMode=o:console.error(`Ignoring invalid view specifier: ${i}`)}}return r}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}$();var fa={hover:null,selectedNode:null,configSpaceViewportRect:I.empty,logicalSpaceViewportSize:C.zero},ua=class extends xe{constructor(){super(...arguments);this.setProfileGroup=r=>{this.set({name:r.name,indexToView:r.indexToView,profiles:r.profiles.map(a=>({profile:a,chronoViewState:fa,leftHeavyViewState:fa,sandwichViewState:{callerCallee:null}}))})};this.setProfileIndexToView=r=>{this.state!=null&&(r=we(r,0,this.state.profiles.length-1),this.set({...this.state,indexToView:r}))};this.setSelectedFrame=r=>{this.state==null||this.getActiveProfile()==null||this.updateActiveSandwichViewState(n=>r==null?{callerCallee:null}:{callerCallee:{invertedCallerFlamegraph:fa,calleeFlamegraph:fa,selectedFrame:r}})}}set(r){let a=this.state;a!=null&&r!=null&&hn(a,r)||super.set(r)}getActiveProfile(){return this.state==null?null:this.state.profiles[this.state?.indexToView]||null}updateActiveProfileState(r){if(this.state==null)return;let{indexToView:a,profiles:n}=this.state;this.set({...this.state,profiles:n.map((i,o)=>o!=a?i:r(i))})}updateActiveSandwichViewState(r){this.updateActiveProfileState(a=>({...a,sandwichViewState:r(a.sandwichViewState)}))}updateFlamechartState(r,a){switch(r){case"CHRONO":{this.updateActiveProfileState(n=>({...n,chronoViewState:a(n.chronoViewState)}));break}case"LEFT_HEAVY":{this.updateActiveProfileState(n=>({...n,leftHeavyViewState:a(n.leftHeavyViewState)}));break}case"SANDWICH_CALLEES":{this.updateActiveSandwichViewState(n=>({...n,callerCallee:n.callerCallee==null?null:{...n.callerCallee,calleeFlamegraph:a(n.callerCallee.calleeFlamegraph)}}));break}case"SANDWICH_INVERTED_CALLERS":{this.updateActiveSandwichViewState(n=>({...n,callerCallee:n.callerCallee==null?null:{...n.callerCallee,invertedCallerFlamegraph:a(n.callerCallee.invertedCallerFlamegraph)}}));break}}}setFlamechartHoveredNode(r,a){this.updateFlamechartState(r,n=>({...n,hover:a}))}setSelectedNode(r,a){this.updateFlamechartState(r,n=>({...n,selectedNode:a}))}setConfigSpaceViewportRect(r,a){this.updateFlamechartState(r,n=>({...n,configSpaceViewportRect:a}))}setLogicalSpaceViewportSize(r,a){this.updateFlamechartState(r,n=>({...n,logicalSpaceViewportSize:a}))}clearHoverNode(){this.setFlamechartHoveredNode("CHRONO",null),this.setFlamechartHoveredNode("LEFT_HEAVY",null),this.setFlamechartHoveredNode("SANDWICH_CALLEES",null),this.setFlamechartHoveredNode("SANDWICH_INVERTED_CALLERS",null)}};var Ht=new xe(!1,"flattenRecursion"),Rr=new xe(!1,"searchIsActive"),Lr=new xe("","searchQueryAtom"),Wt=new xe(0,"viewMode"),Ee=new ua(null,"profileGroup");Wt.subscribe(()=>{Ee.clearHoverNode()});var Qs=Ys(),e_=new xe(Qs,"hashParams"),lr=new xe(null,"glCanvas"),oo=new xe(!1,"dragActive"),Zs=window.location.protocol,da=Zs==="http:"||Zs==="https:",vp=da&&Qs.profileURL!=null,lo=new xe(vp,"loading"),so=new xe(!1,"error");var dn=new xe({field:1,direction:1},"tableSortMethod");function pa(){let t=W(Ht),e=W(Ee);if(!e||e.indexToView>=e.profiles.length)return null;let r=e.indexToView,a=e.profiles[r];return{...e.profiles[e.indexToView],profile:Ls({profile:a.profile,flattenRecursion:t}),index:e.indexToView}}var va="speedscope-color-scheme";function mp(){let t=window.localStorage&&window.localStorage[va];return t==="DARK"?1:t==="LIGHT"?2:0}function gp(){return matchMedia("(prefers-color-scheme: dark)")}function yp(t){if(gp().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 _o=class extends xe{constructor(){super(...arguments);this.cycleToNextColorScheme=()=>{this.set(yp(this.get()))}}},sr=new _o(mp(),"colorScheme");sr.subscribe(()=>{let t=sr.get();switch(t){case 1:{window.localStorage[va]="DARK";break}case 2:{window.localStorage[va]="LIGHT";break}case 0:{delete window.localStorage[va];break}default:return t}return t});$();$();var t_=.2,r_=.1,n_=.2,a_=.1,bp=t=>{let e=Qn(30*t),r=360*(.9*t),a=t_+r_*e,n=n_-a_*e;return ce.fromLumaChromaHue(n,a,r)},Sp=` vec3 colorForBucket(float t) { float x = triangle(30.0 * t); float H = 360.0 * (0.9 * t); float C = ${t_.toFixed(1)} + ${r_.toFixed(1)} * x; float L = ${n_.toFixed(1)} - ${a_.toFixed(1)} * x; return hcl2rgb(H, C, L); } `,co={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:bp,colorForBucketGLSL:Sp};$();var i_=.25,o_=.2,l_=.8,s_=.15,jp=t=>{let e=Qn(30*t),r=360*(.9*t),a=i_+o_*e,n=l_-s_*e;return ce.fromLumaChromaHue(n,a,r)},Cp=` vec3 colorForBucket(float t) { float x = triangle(30.0 * t); float H = 360.0 * (0.9 * t); float C = ${i_.toFixed(1)} + ${o_.toFixed(1)} * x; float L = ${l_.toFixed(1)} - ${s_.toFixed(1)} * x; return hcl2rgb(H, C, L); } `,ma={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:jp,colorForBucketGLSL:Cp};var c_=dt(ma);function U(){return Ye(c_)}function fe(t){return Tr(t)}function __(){return matchMedia("(prefers-color-scheme: dark)")}function h_(t){switch(t){case 0:return"System";case 1:return"Dark";case 2:return"Light"}}function wp(t,e){switch(t){case 0:return e?co:ma;case 1:return co;case 2:return ma}}function f_(t){let[e,r]=Be(()=>__().matches),a=D(o=>{r(o.matches)},[r]);Ke(()=>{let o=__();return o.addEventListener("change",a),()=>{o.removeEventListener("change",a)}},[a]);let n=W(sr),i=wp(n,e);return g(c_.Provider,{value:i,children:t.children})}var Sc=se(p_()),jc=se(m_()),Cc=se(y_()),wc=se(S_()),xc=se(w_()),kc=se(A_()),Ac=se(T_()),Nc=se(R_()),Ec=se(I_()),Tc=se(M_()),Hc=se(B_()),Rc=se($_()),Lc=se(G_()),Ic=se(oc()),Fc=se(mc()),F=["Webkit"],go=["Moz"],oe=["ms"],Te=["Webkit","Moz"],be=["Webkit","ms"],pn=["Webkit","Moz","ms"],qv={plugins:[Sc.default,jc.default,Cc.default,wc.default,xc.default,kc.default,Ac.default,Nc.default,Ec.default,Tc.default,Hc.default,Rc.default],prefixMap:{transform:be,transformOrigin:be,transformOriginX:be,transformOriginY:be,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:Te,userSelect:pn,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:Te,textDecorationSkip:Te,textDecorationLine:Te,textDecorationColor:Te,filter:F,fontFeatureSettings:Te,breakAfter:pn,breakBefore:pn,breakInside:pn,columnCount:Te,columnFill:Te,columnGap:Te,columnRule:Te,columnRuleColor:Te,columnRuleStyle:Te,columnRuleWidth:Te,columns:Te,columnSpan:Te,columnWidth:Te,writingMode:be,flex:be,flexBasis:F,flexDirection:be,flexGrow:F,flexFlow:be,flexShrink:F,flexWrap:be,alignContent:F,alignItems:F,alignSelf:F,justifyContent:F,order:F,transitionDelay:F,transitionDuration:F,transitionProperty:F,transitionTimingFunction:F,backdropFilter:F,scrollSnapType:be,scrollSnapPointsX:be,scrollSnapPointsY:be,scrollSnapDestination:be,scrollSnapCoordinate:be,shapeImageThreshold:F,shapeImageMargin:F,shapeImageOutside:F,hyphens:pn,flowInto:be,flowFrom:be,regionFragment:be,boxSizing:go,textAlignLast:go,tabSize:go,wrapFlow:oe,wrapThrough:oe,wrapMargin:oe,touchAction:oe,gridTemplateColumns:oe,gridTemplateRows:oe,gridTemplateAreas:oe,gridTemplate:oe,gridAutoColumns:oe,gridAutoRows:oe,gridAutoFlow:oe,grid:oe,gridRowStart:oe,gridColumnStart:oe,gridRowEnd:oe,gridRow:oe,gridColumn:oe,gridColumnEnd:oe,gridColumnGap:oe,gridRowGap:oe,gridArea:oe,gridGap:oe,textSizeAdjust:be,borderImage:F,borderImageOutset:F,borderImageRepeat:F,borderImageSlice:F,borderImageSource:F,borderImageWidth:F}},Xv=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},Yv=function(){function t(e,r){for(var a=0;a"u"?"undefined":Xv(a))==="object"){for(var l=this.elements.hasOwnProperty(r)?this.elements[r]:new t,_=Object.keys(a),s=0;s<_.length;s+=1)l.set(_[s],a[_[s]],n);this.elements[r]=l;return}this.elements[r]=a}return e}()},{key:"get",value:function(){function e(r){return this.elements[r]}return e}()},{key:"has",value:function(){function e(r){return this.elements.hasOwnProperty(r)}return e}()},{key:"addStyleType",value:function(){function e(r){var a=this;if(gc&&r instanceof Map||r instanceof t)r.forEach(function(o,l){a.set(l,o,!0)});else for(var n=Object.keys(r),i=0;i"u"?"undefined":bc(e))==="object"?(Bc(e.src,"@font-face",[e],!1),'"'+String(e.fontFamily)+'"'):e}return t}(),animationName:function(){function t(e,r){if(Array.isArray(e))return e.map(function(i){return t(i,r)}).join(",");if((typeof e>"u"?"undefined":bc(e))==="object"){var a="keyframe_"+String(im(e)),n="@keyframes "+a+"{";return e instanceof yo?e.forEach(function(i,o){n+=bo(o,[i],r,So,!1).join("")}):Object.keys(e).forEach(function(i){n+=bo(i,[e[i]],r,So,!1).join("")}),n+="}",Oc(a,[n]),a}else return e}return t}()},Ir={},Va=[],Fr=!1,Oc=function(e,r){var a;if(!Ir[e]){if(!Fr){if(typeof document>"u")throw new Error("Cannot automatically buffer without a document");Fr=!0,(0,Fc.default)(gm)}(a=Va).push.apply(a,um(r)),Ir[e]=!0}},Bc=function(e,r,a,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];if(!Ir[e]){var o=bo(r,a,i,So,n);Oc(e,o)}},pm=function(){Va=[],Ir={},Fr=!1,Ze=null};var vm=function(){if(Fr)throw new Error("Cannot buffer while already buffering");Fr=!0},Pc=function(){Fr=!1;var e=Va;return Va=[],e},mm=function(){return Pc().join("")},gm=function(){var e=Pc();e.length>0&&dm(e)},ym=function(){return Object.keys(Ir)},bm=function(e){e.forEach(function(r){Ir[r]=!0})},Sm=function t(e,r,a,n){for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:[];bm(e)}return t}()},km=typeof window<"u"?null:{renderStatic:function(){function t(e){pm(),vm();var r=e(),a=mm();return{html:r,css:{content:a,renderedClassNames:ym()}}}return t}()},Am=null;function zc(t,e){return{StyleSheet:Object.assign({},xm,{extend:function(){function r(a){var n=a.map(function(i){return i.selectorHandler}).filter(function(i){return i});return zc(t,e.concat(n))}return r}()}),StyleSheetServer:km,StyleSheetTestUtils:Am,minify:function(){function r(a){Dc=a?vn:Cm}return r}(),css:function(){function r(){for(var a=arguments.length,n=Array(a),i=0;i{let a=Em(r.name,this.searchQuery);this.matches.set(r,a.length===0?null:a)})),this.matches.get(e)||null}},Ua=class{constructor(e,r){this.flamechart=e;this.profileResults=r;this.matches=null}getResults(){if(this.matches==null){let e=[],r=new Map,a=(i,o)=>{let{node:l}=i;if(this.profileResults.getMatchForFrame(l.frame)){let _=new I(new C(i.start,o),new C(i.end-i.start,1));r.set(l,e.length),e.push({configSpaceBounds:_,node:l})}i.children.forEach(_=>{a(_,o+1)})},n=this.flamechart.getLayers();n.length>0&&n[0].forEach(i=>a(i,0)),this.matches={matches:e,indexForNode:r}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){let r=this.getResults().indexForNode.get(e);return r===void 0?null:r}at(e){let r=this.getResults().matches;if(e<0||e>=r.length)throw new Error(`Index ${e} out of bounds in list of ${r.length} matches.`);return r[e]}};function Vc(t){t.stopPropagation()}var cr=dt(null),Jc=({children:t})=>{let e=pa(),r=e?e.profile:null,a=W(Rr),n=W(Lr),i=Q(()=>!r||!a||n.length===0?null:new Ja(r,n),[a,n,r]);return g(cr.Provider,{value:i},t)},Ka=he(({numResults:t,resultIndex:e,selectNext:r,selectPrev:a})=>{let n=U(),i=Tm(n),o=W(Rr),l=W(Lr),_=Lr.set,s=Rr.set,c=D(p=>{let d=p.target.value;_(d)},[_]),h=$t(null),f=D(()=>s(!1),[s]),v=D(p=>{p.shiftKey?a():r()},[a,r]),b=D(p=>{p.stopPropagation(),p.key==="Escape"&&s(!1),p.key==="Enter"&&v(p),p.key=="f"&&(p.metaKey||p.ctrlKey)&&(h.current&&h.current.select(),p.preventDefault())},[s,v]);return Ke(()=>{let p=d=>{d.key=="f"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),h.current?h.current.select():(s(!0),requestAnimationFrame(()=>{h.current&&h.current.select()})))};return window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}},[s]),o?g("div",{className:x(i.searchView)},g("span",{className:x(i.icon)},"\u{1F50D}"),g("span",{className:x(i.inputContainer)},g("input",{className:x(i.input),value:l,onInput:c,onKeyDown:b,onKeyUp:Vc,onKeyPress:Vc,ref:h})),t!=null&&g(qe,null,g("span",{className:x(i.resultCount)},e==null?"?":e+1,"/",t),g("button",{className:x(i.icon,i.button),onClick:a},"\u2B05\uFE0F"),g("button",{className:x(i.icon,i.button),onClick:r},"\u27A1\uFE0F")),g("svg",{className:x(i.icon),onClick:f,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:n.altFgSecondaryColor}))):null}),Tm=fe(t=>le.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 Uc(t){return t.replace(/\\([a-fA-F0-9]{2})/g,(e,r)=>{let a=parseInt(r,16);return String.fromCharCode(a)})}function Kc(t){let e=t.split(` `);if(!e.length||(e[e.length-1]===""&&e.pop(),!e.length))return null;let r=new Map,a=/^(\d+):(.+)$/,n=/^([\$\w]+):([\$\w-]+)$/;for(let i of e){let o=a.exec(i);if(o){r.set(`wasm-function[${o[1]}]`,Uc(o[2]));continue}let l=n.exec(i);if(l){r.set(l[1],Uc(l[2]));continue}return null}return i=>r.has(i.name)?{name:r.get(i.name)}:null}Ao();$();var Mt=class{constructor(e){this.source=e;this.layers=[];this.totalWeight=0;this.minFrameWidth=1;let r=[],a=(i,o)=>{let l=Z(r),_={node:i,parent:l,children:[],start:o,end:o};l&&l.children.push(_),r.push(_)};this.minFrameWidth=1/0;let n=(i,o)=>{console.assert(r.length>0);let l=r.pop();if(l.end=o,l.end-l.start===0)return;let _=r.length;for(;this.layers.length<=_;)this.layers.push([]);this.layers[_].push(l),this.minFrameWidth=Math.min(this.minFrameWidth,l.end-l.start)};this.totalWeight=e.getTotalWeight(),e.forEachCall(a,n),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 r=this.getTotalWeight(),a=Math.pow(2,40),n=we(3*this.getMinFrameWidth(),r/a,r);return we(e,n,r)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:r}){let a=new C(this.getTotalWeight(),this.getLayers().length),n=this.getClampedViewportWidth(e.size.x),i=e.size.withX(n),o=C.clamp(e.origin,new C(0,r?0:-1),C.max(C.zero,a.minus(i).plus(new C(0,1))));return new I(o,e.size.withX(n))}};$();var Bm=1e4,Ga=class{constructor(e,r,a){this.batch=e;this.bounds=r;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,r){this.bounds.hasIntersectionWith(e)&&r(this)}},No=class{constructor(e){this.children=e;this.rectCount=0;if(e.length===0)throw new Error("Empty interior node");let r=1/0,a=-1/0,n=1/0,i=-1/0;for(let o of e){this.rectCount+=o.getRectCount();let l=o.getBounds();r=Math.min(r,l.left()),a=Math.max(a,l.right()),n=Math.min(n,l.top()),i=Math.max(i,l.bottom())}this.bounds=new I(new C(r,n),new C(a-r,i-n))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,r){if(this.bounds.hasIntersectionWith(e))for(let a of this.children)a.forEachLeafNodeWithinBounds(e,r)}},qa=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,r){return e.getOrInsert(new t(r))}},Xa=class{constructor(e,r,a,n,i,o={inverted:!1}){this.gl=e;this.rowAtlas=r;this.flamechart=a;this.rectangleBatchRenderer=n;this.colorPassRenderer=i;this.options=o;this.layers=[];this.rectInfoTexture=null;this.rectInfoRenderTarget=null;this.atlasKeys=new pt;let l=a.getLayers().length;for(let _=0;_=Bm&&(s.push(new Ga(v,new I(new C(h,c),new C(f-h,1)),b)),h=1/0,f=-1/0,v=new or(this.gl));let y=new I(new C(m.start,c),new C(m.end-m.start,1));h=Math.min(h,y.left()),f=Math.max(f,y.right());let S=new ce((1+d%255)/256,(1+_%255)/256,(1+this.flamechart.getColorBucketForFrame(m.node.frame))/256);v.addRect(y,S),b++}v.getRectCount()>0&&s.push(new Ga(v,new I(new C(h,c),new C(f-h,1)),b)),this.layers.push(new No(s))}}getRectInfoTexture(e,r){if(this.rectInfoTexture){let a=this.rectInfoTexture;(a.width!=e||a.height!=r)&&a.resize(e,r)}else this.rectInfoTexture=this.gl.createTexture(J.TextureFormat.NEAREST_CLAMP,e,r);return this.rectInfoTexture}getRectInfoRenderTarget(e,r){let a=this.getRectInfoTexture(e,r);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:r,zoomLevel:a,index:n}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,a),l=this.flamechart.getLayers().length,_=this.options.inverted?l-1-r:r;return new I(new C(o*n,_),new C(o,1))}render(e){let{configSpaceSrcRect:r,physicalSpaceDstRect:a}=e,n=[],i=z.betweenRects(r,a);if(r.isEmpty())return;let o=0;for(;;){let S=qa.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:o,index:0}),w=this.configSpaceBoundsForKey(S);if(i.transformRect(w).width(){let j=this.configSpaceBoundsForKey(w);this.layers[w.stackDepth].forEachLeafNodeWithinBounds(j,k=>{this.rectangleBatchRenderer.render({batch:k.getBatch(),configSpaceSrcRect:j,physicalSpaceDstRect:S})})});let m=this.getRectInfoRenderTarget(a.width(),a.height());ra(this.gl,m,()=>{this.gl.clear(new J.Color(0,0,0,0));let S=new I(C.zero,new C(this.gl.viewport.width,this.gl.viewport.height)),w=z.betweenRects(r,S);for(let j of p){let k=this.configSpaceBoundsForKey(j);this.rowAtlas.renderViaAtlas(j,w.transformRect(k))}for(let j of d){let k=this.configSpaceBoundsForKey(j),H=w.transformRect(k);this.layers[j.stackDepth].forEachLeafNodeWithinBounds(k,O=>{this.rectangleBatchRenderer.render({batch:O.getBatch(),configSpaceSrcRect:k,physicalSpaceDstRect:H})})}});let y=this.getRectInfoTexture(a.width(),a.height());this.colorPassRenderer.render({rectInfoTexture:y,srcRect:new I(C.zero,new C(y.width,y.height)),dstRect:a,renderOutlines:e.renderOutlines})}};$();$();var bt=fe(t=>le.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%"}}));$();var To="\u2026",Ya=new Map,qc=-1;function Ot(t,e){return window.devicePixelRatio!==qc&&(Ya.clear(),qc=window.devicePixelRatio),Ya.has(e)||Ya.set(e,t.measureText(e).width),Ya.get(e)}function Eo(t,e){if(t.length<=e)return{trimmedString:t,trimmedLength:t.length,prefixLength:t.length,suffixLength:0,originalString:t,originalLength:t.length};let r=Math.floor(e/2),a=e-r-1,n=t.substring(0,r),i=t.substring(t.length-a,t.length),o=n+To+i;return{trimmedString:o,trimmedLength:o.length,prefixLength:n.length,suffixLength:i.length,originalString:t,originalLength:t.length}}function Yc(t,e,r){if(Ot(t,e)<=r)return Eo(e,e.length);let[a]=Es(0,e.length,n=>Ot(t,Eo(e,Math.floor(n)).trimmedString),r);return Eo(e,Math.floor(a))}function Xc(t,e){return e{this.container=r||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=r=>{if(r.preventDefault(),this.frameHadWheelEvent=!0,(r.metaKey||r.ctrlKey)&&this.interactionLock!=="pan"){let n=1+r.deltaY/100;r.ctrlKey&&(n=1+r.deltaY/40),n=we(n,.1,10),this.zoom(n)}else this.interactionLock!=="zoom"&&this.pan(new C(r.deltaX,r.deltaY));this.renderCanvas()};this.dragStartConfigSpaceMouse=null;this.dragConfigSpaceViewportOffset=null;this.draggingMode=null;this.onMouseDown=r=>{let a=this.configSpaceMouse(r);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=r=>{if(!this.dragStartConfigSpaceMouse)return;let a=this.configSpaceMouse(r);if(a){if(this.updateCursor(a),a=new I(new C(0,0),this.configSpaceSize()).closestPointTo(a),this.draggingMode===0){let n=this.dragStartConfigSpaceMouse,i=a;if(!n||!i)return;let o=Math.min(n.x,i.x),_=Math.max(n.x,i.x)-o,s=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new I(new C(o,i.y-s/2),new C(_,s)))}else if(this.draggingMode===1){if(!this.dragConfigSpaceViewportOffset)return;let n=a.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(n))}}};this.updateCursor=r=>{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(r)?(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=r=>{let a=this.configSpaceMouse(r);a&&this.updateCursor(a)};this.onWindowMouseUp=r=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);let a=this.configSpaceMouse(r);a&&this.updateCursor(a)};this.overlayCanvasRef=r=>{r?(this.overlayCanvas=r,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}}physicalViewSize(){return new C(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return bt(this.props.theme)}minimapOrigin(){return new C(0,20*window.devicePixelRatio)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){let r=this.minimapOrigin();return z.betweenRects(new I(new C(0,0),this.configSpaceSize()),new I(r,this.physicalViewSize().minus(r)))}logicalToPhysicalViewSpace(){return z.withScale(new C(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new z;let r=this.container.getBoundingClientRect();return z.withTranslation(new C(-r.left,-r.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new I(new C(0,0),this.configSpaceSize()),physicalSpaceDstRect:new I(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){let r=this.overlayCtx;if(!r)return;let a=this.physicalViewSize();r.clearRect(0,0,a.x,a.y);let n=this.configSpaceToPhysicalViewSpace(),i=0,o=this.configSpaceSize().x,_=(this.configSpaceToPhysicalViewSpace().inverted()||new z).times(this.logicalToPhysicalViewSpace()).transformVector(new C(200,1)).x,s=20*window.devicePixelRatio,c=10*window.devicePixelRatio,h=(s-c)/2;r.font=`${c}px/${s}px "Source Code Pro", Courier, monospace`,r.textBaseline="top";let v=Math.pow(10,Math.floor(Math.log10(_)));_/v>5?v*=5:_/v>2&&(v*=2);let b=this.props.theme;{r.fillStyle=ce.fromCSSHex(b.bgPrimaryColor).withAlpha(.8).toCSS(),r.fillRect(0,0,a.x,s),r.textBaseline="top";for(let p=Math.ceil(i/v)*v;ple.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${t.fgSecondaryColor}`,width:8,height:8}}));function Qc(t){let e=bt(U()),r=t.formatter(t.selectedTotal),a=t.formatter(t.selectedSelf),n=100*t.selectedTotal/t.grandTotal,i=100*t.selectedSelf/t.grandTotal;return g("div",{className:x(e.statsTable)},g("div",{className:x(t.cellStyle,e.statsTableCell,e.statsTableHeader)},t.title),g("div",{className:x(t.cellStyle,e.statsTableCell)},"Total"),g("div",{className:x(t.cellStyle,e.statsTableCell)},"Self"),g("div",{className:x(t.cellStyle,e.statsTableCell)},r),g("div",{className:x(t.cellStyle,e.statsTableCell)},a),g("div",{className:x(t.cellStyle,e.statsTableCell)},vt(n),g("div",{className:x(e.barDisplay),style:{height:`${n}%`}})),g("div",{className:x(t.cellStyle,e.statsTableCell)},vt(i),g("div",{className:x(e.barDisplay),style:{height:`${i}%`}})))}function Dm(t){let e=bt(U()),r=[],a=t.node;for(;a&&!a.isRoot();a=a.parent){let n=[],{frame:i}=a;if(n.push(g(ei,{color:t.getFrameColor(i)})),r.length&&n.push(g("span",{className:x(e.stackFileLine)},"> ")),n.push(i.name),i.file){let o=i.file;i.line!=null&&(o+=`:${i.line}`,i.col!=null&&(o+=`:${i.col}`)),n.push(g("span",{className:x(e.stackFileLine)}," (",o,")"))}r.push(g("div",{className:x(e.stackLine)},n))}return g("div",{className:x(e.stackTraceView)},g("div",{className:x(e.stackTraceViewPadding)},r))}function eh(t){let e=bt(U()),{flamechart:r,selectedNode:a}=t,{frame:n}=a;return g("div",{className:x(e.detailView)},g(Qc,{title:"This Instance",cellStyle:e.thisInstanceCell,grandTotal:r.getTotalWeight(),selectedTotal:a.getTotalWeight(),selectedSelf:a.getSelfWeight(),formatter:r.formatValue.bind(r)}),g(Qc,{title:"All Instances",cellStyle:e.allInstancesCell,grandTotal:r.getTotalWeight(),selectedTotal:n.getTotalWeight(),selectedSelf:n.getSelfWeight(),formatter:r.formatValue.bind(r)}),g(Dm,{node:a,getFrameColor:t.getCSSColorForFrame}))}var gn=class{constructor(){this.argsBatch=[]}text(e){this.argsBatch.push(e)}fill(e,r){if(this.argsBatch.length!==0){e.fillStyle=r;for(let a of this.argsBatch)e.fillText(a.text,a.x,a.y);this.argsBatch=[]}}},hr=class{constructor(){this.argsBatch=[]}rect(e){this.argsBatch.push(e)}drawPath(e){e.beginPath();for(let r of this.argsBatch)e.rect(r.x,r.y,r.w,r.h);e.closePath(),this.argsBatch=[]}fill(e,r){this.argsBatch.length!==0&&(e.fillStyle=r,this.drawPath(e),e.fill())}stroke(e,r,a){this.argsBatch.length!==0&&(e.strokeStyle=r,e.lineWidth=a,this.drawPath(e),e.stroke())}};var Or=class extends je{constructor(){super(...arguments);this.container=null;this.containerRef=r=>{this.container=r||null};this.overlayCanvas=null;this.overlayCtx=null;this.hoveredLabel=null;this.overlayCanvasRef=r=>{r?(this.overlayCanvas=r,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=r=>{this.mouseDownPos=this.lastDragPos=new C(r.offsetX,r.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)};this.onMouseDrag=r=>{if(!this.lastDragPos)return;let a=new C(r.offsetX,r.offsetY);this.pan(this.lastDragPos.minus(a)),this.lastDragPos=a,this.hoveredLabel&&this.props.onNodeHover(null)};this.onDblClick=r=>{if(this.hoveredLabel){let a=this.hoveredLabel.configSpaceBounds,n=new I(a.origin.minus(new C(0,1)),a.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(n)}};this.onClick=r=>{let a=new C(r.offsetX,r.offsetY),n=this.mouseDownPos;this.mouseDownPos=null,!(n&&a.minus(n).length()>5)&&(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))};this.onWindowMouseUp=r=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)};this.onMouseMove=r=>{if(this.updateCursor(),this.lastDragPos){r.preventDefault(),this.onMouseDrag(r);return}let a=new C(r.offsetX,r.offsetY),n=this.logicalToPhysicalViewSpace().transformPosition(a),i=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(n);if(!i)return;let o=(_,s=0)=>{let c=_.end-_.start,h=this.props.renderInverted?this.configSpaceSize().y-1-s:s,f=new I(new C(_.start,h),new C(c,1));if(i.xf.right())return null;f.contains(i)&&(this.hoveredLabel={configSpaceBounds:f,node:_.node});for(let v of _.children)o(v,s+1)};(()=>{this.hoveredLabel=null})();for(let _ of this.props.flamechart.getLayers()[0]||[])o(_);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:r}):this.props.onNodeHover(null),this.renderCanvas()};this.onMouseLeave=r=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()};this.onWheel=r=>{r.preventDefault(),this.frameHadWheelEvent=!0;let a=r.metaKey||r.ctrlKey,n=r.deltaY,i=r.deltaX;if(r.deltaMode===r.DOM_DELTA_LINE&&(n*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,i*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),a&&this.interactionLock!=="pan"){let o=1+n/100;r.ctrlKey&&(o=1+n/40),o=we(o,.1,10),this.zoom(new C(r.offsetX,r.offsetY),o)}else this.interactionLock!=="zoom"&&this.pan(new C(i,n));this.renderCanvas()};this.onWindowKeyPress=r=>{if(!this.container)return;let{width:a,height:n}=this.container.getBoundingClientRect();r.key==="="||r.key==="+"?(this.zoom(new C(a/2,n/2),.5),r.preventDefault()):(r.key==="-"||r.key==="_")&&(this.zoom(new C(a/2,n/2),2),r.preventDefault()),!(r.ctrlKey||r.shiftKey||r.metaKey)&&(r.key==="0"?this.zoom(new C(a/2,n/2),1e9):r.key==="ArrowRight"||r.code==="KeyD"?this.pan(new C(100,0)):r.key==="ArrowLeft"||r.code==="KeyA"?this.pan(new C(-100,0)):r.key==="ArrowUp"||r.code==="KeyW"?this.pan(new C(0,-100)):r.key==="ArrowDown"||r.code==="KeyS"?this.pan(new C(0,100)):r.key==="Escape"&&(this.props.onNodeSelect(null),this.renderCanvas()))}}getStyle(){return bt(this.props.theme)}setConfigSpaceViewportRect(r){this.props.setConfigSpaceViewportRect(r)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new C(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){let r=this.physicalViewSize().y,a=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(a{let H=j.end-j.start,O=this.props.renderInverted?this.configSpaceSize().y-1-k:k,T=new I(new C(j.start,O),new C(H,1));if(!(H<_)&&!(T.left()>this.props.configSpaceViewportRect.right())&&!(T.right()this.props.configSpaceViewportRect.bottom())return;if(T.hasIntersectionWith(this.props.configSpaceViewportRect)){let A=a.transformRect(T);if(A.left()<0&&(A=A.withOrigin(A.origin.withX(0)).withSize(A.size.withX(A.size.x+A.left()))),A.right()>o.x&&(A=A.withSize(A.size.withX(o.x-A.left()))),A.width()>l){let B=this.props.searchResults?.getMatchForFrame(j.node.frame),_e=Yc(r,j.node.frame.name,A.width()-2*s);if(B){let Ar=Zc(_e,B),ln=0,Nr=A.left()+s,nr=(i-n)/2-2;for(let[ar,us]of Ar){Nr+=Ot(r,_e.trimmedString.substring(ln,ar));let ds=Ot(r,_e.trimmedString.substring(ar,us));f.rect({x:Nr,y:A.top()+nr,w:ds,h:i-2*nr}),Nr+=ds,ln=us}}(this.props.searchResults!=null&&!B?h:c).text({text:_e.trimmedString,x:A.left()+s,y:Math.round(A.bottom()-(i-n)/2)})}}for(let A of j.children)d(A,k+1)}},m=2*window.devicePixelRatio;r.strokeStyle=this.props.theme.selectionSecondaryColor;let y=(a.inverseTransformVector(new C(1,0))||new C(0,0)).x,S=(j,k=0)=>{if(!this.props.selectedNode&&this.props.searchResults==null)return;let H=j.end-j.start,O=this.props.renderInverted?this.configSpaceSize().y-1-k:k,T=new I(new C(j.start,O),new C(H,1));if(!(Hthis.props.configSpaceViewportRect.right())&&!(T.right()this.props.configSpaceViewportRect.bottom())){if(T.hasIntersectionWith(this.props.configSpaceViewportRect)){if(this.props.searchResults?.getMatchForFrame(j.node.frame)){let A=a.transformRect(T);p.rect({x:Math.round(A.left()+m/2),y:Math.round(A.top()+m/2),w:Math.round(Math.max(0,A.width()-m)),h:Math.round(Math.max(0,A.height()-m))})}if(this.props.selectedNode!=null&&j.node.frame===this.props.selectedNode.frame){let A=j.node===this.props.selectedNode?v:b,B=a.transformRect(T);A.rect({x:Math.round(B.left()+1+m/2),y:Math.round(B.top()+1+m/2),w:Math.round(Math.max(0,B.width()-2-m)),h:Math.round(Math.max(0,B.height()-2-m))})}}for(let A of j.children)S(A,k+1)}};for(let j of this.props.flamechart.getLayers()[0]||[])S(j);for(let j of this.props.flamechart.getLayers()[0]||[])d(j);let w=this.props.theme;if(p.fill(r,w.searchMatchPrimaryColor),f.fill(r,w.searchMatchSecondaryColor),h.fill(r,w.fgSecondaryColor),c.fill(r,this.props.searchResults!=null?w.searchMatchTextColor:w.fgPrimaryColor),b.stroke(r,w.selectionSecondaryColor,m),v.stroke(r,w.selectionPrimaryColor,m),this.hoveredLabel){let j=w.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(j=w.selectionPrimaryColor),r.lineWidth=2*devicePixelRatio,r.strokeStyle=j;let k=a.transformRect(this.hoveredLabel.configSpaceBounds);r.strokeRect(Math.round(k.left()),Math.round(k.top()),Math.round(Math.max(0,k.width())),Math.round(Math.max(0,k.height())))}this.renderTimeIndicators()}renderTimeIndicators(){let r=this.overlayCtx;if(!r)return;let a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,n=this.physicalViewSize(),i=this.configSpaceToPhysicalViewSpace(),o=10*window.devicePixelRatio,l=(a-o)/2,_=this.props.configSpaceViewportRect.left(),s=this.props.configSpaceViewportRect.right(),h=(this.configSpaceToPhysicalViewSpace().inverted()||new z).times(this.logicalToPhysicalViewSpace()).transformVector(new C(200,1)).x,v=Math.pow(10,Math.floor(Math.log10(h)));h/v>5?v*=5:h/v>2&&(v*=2);let b=this.props.theme;{let p=this.props.renderInverted?n.y-a:0;r.fillStyle=ce.fromCSSHex(b.bgPrimaryColor).withAlpha(.8).toCSS(),r.fillRect(0,p,n.x,a),r.textBaseline="top";for(let d=Math.ceil(_/v)*v;d{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(r){this.interactionLock="pan";let a=this.logicalToPhysicalViewSpace().transformVector(r),n=this.configSpaceToPhysicalViewSpace().inverseTransformVector(a);this.hoveredLabel&&this.props.onNodeHover(null),n&&this.props.transformViewport(z.withTranslation(n))}zoom(r,a){this.interactionLock="zoom";let n=this.logicalToPhysicalViewSpace().transformPosition(r),i=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(n);if(!i)return;let o=z.withTranslation(i.times(-1)).scaledBy(new C(a,1)).translatedBy(i);this.props.transformViewport(o)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(r){this.props.flamechart!==r.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==r.searchResults?this.renderCanvas():this.props.selectedNode!==r.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==r.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==r.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),r.canvasContext&&(r.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),r.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 r=this.getStyle();return g("div",{className:x(r.panZoomView,ge.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},g("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:x(r.fill)}))}};function ri(t){let e=Vm(U()),{containerSize:r,offset:a}=t,n=r.x,i=r.y,o=7,l=D(_=>{if(!_)return;let s=_.getBoundingClientRect(),c=a.x+o;c+s.width>n-1&&(c=n-s.width-1,c<1&&(c=1)),_.style.left=`${c}px`;let h=a.y+o;h+s.height>i-1&&(h=a.y-s.height-1,h<1&&(h=1)),_.style.top=`${h}px`},[n,i,a.x,a.y]);return g("div",{className:x(e.hoverTip),ref:l},g("div",{className:x(e.hoverTipRow)},t.children))}var ti=2,Vm=fe(t=>le.create({hoverTip:{position:"absolute",background:t.bgPrimaryColor,border:"1px solid black",maxWidth:900,paddingTop:ti,paddingBottom:ti,pointerEvents:"none",userSelect:"none",fontSize:10,fontFamily:'"Source Code Pro", Courier, monospace',zIndex:2},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:ti,paddingRight:ti,maxWidth:900}}));var th=dt(null),Ho=({flamechart:t,selectedNode:e,setSelectedNode:r,configSpaceViewportRect:a,setConfigSpaceViewportRect:n,children:i})=>{let o=Ye(cr),l=Q(()=>o==null?null:new Ua(t,o),[t,o]);return g(th.Provider,{value:{results:l,flamechart:t,selectedNode:e,setSelectedNode:r,configSpaceViewportRect:a,setConfigSpaceViewportRect:n}},i)},rh=he(()=>{let t=Ye(th),e=t==null?null:t.results,r=t==null?null:t.selectedNode,a=t==null?null:t.setSelectedNode,n=t==null?null:t.configSpaceViewportRect,i=t==null?null:t.setConfigSpaceViewportRect,o=t==null?null:t.flamechart,l=e==null?null:e.count(),_=Q(()=>e==null||r==null?null:e.indexOf(r),[e,r]),s=D(f=>{if(!a||!o||!n||!i)return;let v=f.configSpaceBounds,b=new I(v.origin.minus(new C(0,1)),v.size.withY(n.height()));a(f.node),i(o.getClampedConfigSpaceViewportRect({configSpaceViewportRect:b}))},[n,i,a,o]),{selectPrev:c,selectNext:h}=Q(()=>l==null||l===0||e==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!e?.at||l==null||l===0)return;let f=_==null?l-1:_-1;f<0&&(f=l-1);let v=e.at(f);s(v)},selectNext:()=>{if(!e?.at||l==null||l===0)return;let f=_==null?0:_+1;f>=l&&(f=0);let v=e.at(f);s(v)}},[l,_,e,s]);return g(Ka,{resultIndex:_,numResults:l,selectPrev:c,selectNext:h})});var lt=class extends je{};var yn=class extends lt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=r=>{let a=150/20,n=this.configSpaceSize(),i=this.props.flamechart.getClampedViewportWidth(r.size.x),o=r.size.withX(i),l=C.clamp(r.origin,new C(0,-1),C.max(C.zero,n.minus(o).plus(new C(0,a+1))));this.props.setConfigSpaceViewportRect(new I(l,r.size.withX(i)))};this.setLogicalSpaceViewportSize=r=>{this.props.setLogicalSpaceViewportSize(r)};this.transformViewport=r=>{let a=r.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(a)};this.onNodeHover=r=>{this.props.setNodeHover(r)};this.onNodeClick=r=>{this.props.setSelectedNode(r)};this.container=null;this.containerRef=r=>{this.container=r||null}}getStyle(){return bt(this.props.theme)}configSpaceSize(){return new C(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(r){let a=this.props.flamechart.getTotalWeight(),n=100*r/a,i=vt(n);return`${this.props.flamechart.formatValue(r)} (${i})`}renderTooltip(){if(!this.container)return null;let{hover:r}=this.props;if(!r)return null;let{width:a,height:n,left:i,top:o}=this.container.getBoundingClientRect(),l=new C(r.event.clientX-i,r.event.clientY-o),_=r.node.frame,s=this.getStyle();return g(ri,{containerSize:new C(a,n),offset:l},g("span",{className:x(s.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",_.name,_.file?g("div",null,_.file,":",_.line):void 0)}render(){let r=this.getStyle();return g("div",{className:x(r.fill,ge.vbox),ref:this.containerRef},g(Za,{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}),g(cr.Consumer,null,a=>g(qe,null,g(Or,{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}),g(rh,null))),this.renderTooltip(),this.props.selectedNode&&g(eh,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}};function Br(t){return{setNodeHover:D(e=>{Ee.setFlamechartHoveredNode(t,e)},[t]),setLogicalSpaceViewportSize:D(e=>{Ee.setLogicalSpaceViewportSize(t,e)},[t]),setConfigSpaceViewportRect:D(e=>{Ee.setConfigSpaceViewportRect(t,e)},[t]),setSelectedNode:D(e=>{Ee.setSelectedNode(t,e)},[t])}}var Jm=Oe(({profile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalWeight.bind(t),forEachCall:t.forEachCall.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),Pr=t=>Oe(({canvasContext:e,flamechart:r})=>new Xa(e.gl,Rs(e),r,e.rectangleBatchRenderer,e.flamechartColorPassRenderer,t)),Um=Pr(),ah=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{profile:a,chronoViewState:n}=e,i=U(),o=Et({theme:i,canvas:r}),l=Tt(a),_=Kt(l),s=Nt({theme:i,frameToColorBucket:l}),c=Jm({profile:a,getColorBucketForFrame:_}),h=Um({canvasContext:o,flamechart:c}),f=Br("CHRONO");return g(Ho,{flamechart:c,selectedNode:n.selectedNode,setSelectedNode:f.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:f.setConfigSpaceViewportRect},g(yn,{theme:i,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...n,...f}))}),Km=Oe(({profile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),$m=Pr(),ih=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{profile:a,leftHeavyViewState:n}=e,i=U(),o=Et({theme:i,canvas:r}),l=Tt(a),_=Kt(l),s=Nt({theme:i,frameToColorBucket:l}),c=Km({profile:a,getColorBucketForFrame:_}),h=$m({canvasContext:o,flamechart:c}),f=Br("LEFT_HEAVY");return g(Ho,{flamechart:c,selectedNode:n.selectedNode,setSelectedNode:f.setSelectedNode,configSpaceViewportRect:n.configSpaceViewportRect,setConfigSpaceViewportRect:f.setConfigSpaceViewportRect},g(yn,{theme:i,renderInverted:!1,flamechart:c,flamechartRenderer:h,canvasContext:o,getCSSColorForFrame:s,...n,...f}))});function lh(t,e){return Xm(t,e)}var Ro=97,sh=122,_h=65,Wm=90,Gm=48,qm=57;function oh(t){let e=t.charCodeAt(0);return Ro<=e&&e<=sh?1:_h<=e&&e<=Wm?2:Gm<=e&&e<=qm?3:0}function Lo(t,e){if(t===e)return!0;let r=e.charCodeAt(0);return Ro<=r&&r<=sh?t.charCodeAt(0)===r-Ro+_h:!1}function Xm(t,e){if(e.length==0)return{matchedRanges:[],score:0};let r=0,a=-1,n=-1,i=t.length,o=e.length;for(let l=0;l=a;l--){let _=t[l],s=e[r];if(Lo(_,s)&&(r--,r<0))return a=l,r1(t,e,a,n)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}var Io=16,ch=-3,Fo=-1,Mo=Io/2,Ym=Io/2,Zm=Mo+Fo,Qm=-(ch+Fo),e1=2;function t1(t,e){return t===0&&e!==0?Mo:t===1&&e==2||t!==3&&e==3?Zm:e===0?Ym:0}function r1(t,e,r,a){let n=0,i=0,o=!1,l=0,_=0,s=new Array(e.length),c=0;r>0&&(c=oh(t[r-1]));for(let f=r;f{l(),t(_)},[l,t,_]),v=D(y=>{e(_)},[e,_]),b=r.getName(),p=1+Math.floor(Math.log10(i)),d=x(h.highlighted),m=Q(()=>n1(b,s,d),[b,s,d]);return g("div",{ref:o,onMouseUp:f,onMouseEnter:v,title:b,className:x(h.profileRow,c%2===0&&h.profileRowEven,a&&h.profileRowSelected,n&&h.profileRowHovered)},g("span",{className:x(h.profileIndex,a&&h.profileIndexSelected),style:{width:p+"em"}},_+1,":")," ",m)}function hh(t){t.stopPropagation()}function i1(t,e){let r=[];for(let a=0;a-a.score),r}function uh({profiles:t,closeProfileSelect:e,indexToView:r,visible:a,setProfileIndexToView:n}){let i=dh(U()),[o,l]=Be(""),_=D(S=>{let w=S.target.value;l(w)},[l]),s=D(S=>{S&&(a?S.select():S.blur())},[a]),c=Q(()=>i1(t,o),[t,o]),[h,f]=Be(0),v=$t(null);Ke(()=>{a&&(f(null),v.current!==null&&v.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[a]);let b=D(S=>{S.stopPropagation();let w=null;switch(S.key){case"Enter":{h!=null&&(e(),n(h));break}case"Escape":{e();break}case"ArrowDown":{if(S.preventDefault(),w=0,h!=null){let j=c.findIndex(k=>k.indexInProfileGroup===h);j!==-1&&(w=j+1)}break}case"ArrowUp":{if(S.preventDefault(),w=c.length-1,h!=null){let j=c.findIndex(k=>k.indexInProfileGroup===h);j!==-1&&(w=j-1)}break}}if(w!=null&&w>=0&&w{c.length>0&&(f(c[0].indexInProfileGroup),d(!0))},[f,c]);let m=D(S=>{p&&S&&(S.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),d(!1))},[p,d]),y=D(S=>{v.current=S,m(S)},[v,m]);return g("div",{className:x(i.profileSelectOuter)},g("div",{className:x(i.caret)}),g("div",{className:x(i.profileSelectBox)},g("div",{className:x(i.filterInputContainer)},g("input",{type:"text",className:x(i.filterInput),ref:s,placeholder:"Filter...",value:o,onInput:_,onKeyDown:b,onKeyUp:hh,onKeyPress:hh})),g("div",{className:x(i.profileSelectScrolling)},c.map(({profile:S,matchedRanges:w,indexInProfileGroup:j},k)=>{let H,O=j===r,T=j===h;return O&&T?H=y:O?H=v:T&&(H=m),g(a1,{setHoveredProfileIndex:f,indexInProfileGroup:j,indexInFilteredListView:k,hovered:j==h,selected:j===r,profile:S,profileCount:t.length,nodeRef:H,matchedRanges:w,setProfileIndexToView:n,closeProfileSelect:e})}),c.length===0?g("div",{className:x(i.profileRow)},'No results match filter "',o,'"'):null)))}var fh=10,dh=fe(t=>le.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:fh,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*fh}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}}));$();function Oo(t,e){return D(()=>t(e),[t,e])}function l1(t){let e=ni(U()),r=Oo(Wt.set,0),a=Oo(Wt.set,1),n=Oo(Wt.set,2);return t.activeProfileState?g("div",{className:x(e.toolbarLeft)},g("div",{className:x(e.toolbarTab,t.viewMode===0&&e.toolbarTabActive),onClick:r},g("span",{className:x(e.emoji)},"\u{1F570}"),"Time Order"),g("div",{className:x(e.toolbarTab,t.viewMode===1&&e.toolbarTabActive),onClick:a},g("span",{className:x(e.emoji)},"\u2B05\uFE0F"),"Left Heavy"),g("div",{className:x(e.toolbarTab,t.viewMode===2&&e.toolbarTabActive),onClick:n},g("span",{className:x(e.emoji)},"\u{1F96A}"),"Sandwich")):null}var s1=(()=>{let t=null;return e=>{let r=e?.profiles.map(a=>a.profile)||null;return(t===null||r!=null&&!hn(t,r))&&(t=r),t}})();function _1(t){let e=ni(U()),{activeProfileState:r,profileGroup:a}=t,n=s1(a),[i,o]=Be(!1),l=D(()=>{o(!0)},[o]),_=D(()=>{o(!1)},[o]);return Ke(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),Ke(()=>{let s=c=>{c.key==="t"&&(c.preventDefault(),o(!0))};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}},[o]),r&&a&&n?a.profiles.length===1?g(qe,null,r.profile.getName()):g("div",{className:x(e.toolbarCenter),onMouseLeave:_},g("span",{onMouseOver:l},r.profile.getName()," ",g("span",{className:x(e.toolbarProfileIndex)},"(",r.index+1,"/",a.profiles.length,")")),g("div",{style:{display:i?"block":"none"}},g(uh,{setProfileIndexToView:t.setProfileIndexToView,indexToView:a.indexToView,profiles:n,closeProfileSelect:_,visible:i}))):g(qe,null,"\u{1F52C}speedscope")}function c1(t){let e=ni(U()),r=W(sr),a=g("div",{className:x(e.toolbarTab),onClick:t.saveFile},g("span",{className:x(e.emoji)},"\u2934\uFE0F"),"Export"),n=g("div",{className:x(e.toolbarTab),onClick:t.browseForFile},g("span",{className:x(e.emoji)},"\u2935\uFE0F"),"Import"),i=g("div",{className:x(e.toolbarTab),onClick:sr.cycleToNextColorScheme},g("span",{className:x(e.emoji)},"\u{1F3A8}"),g("span",{className:x(e.toolbarTabColorSchemeToggle)},h_(r))),o=g("div",{className:x(e.toolbarTab)},g("a",{href:"https://github.com/jlfwong/speedscope#usage",className:x(e.noLinkStyle),target:"_blank"},g("span",{className:x(e.emoji)},"\u2753"),"Help"));return g("div",{className:x(e.toolbarRight)},t.activeProfileState&&a,n,i,o)}function ph(t){let e=ni(U());return g("div",{className:x(e.toolbar)},g(l1,{...t}),g(_1,{...t}),g(c1,{...t}))}var ni=fe(t=>le.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"}}));$();var T1=Promise.resolve().then(()=>se(Yo())),H1=!1;async function Ph(t,e){let r=await T1,a=null,n=null;try{n=JSON.parse(t),a=new r.SourceMapConsumer(n)}catch{return null}let i=[];a.eachMapping(function(l){i.push({...l,generatedColumn:l.generatedColumn+1,originalColumn:l.originalColumn+1})},{},r.SourceMapConsumer.GENERATED_ORDER);let o=e.replace(/\.[^/]*$/,"");return l=>{let _=!1;if((n?.file&&n?.file===l.file||("/"+l.file?.replace(/\.[^/]*$/,"")).endsWith("/"+o))&&(_=!0),!_||l.line==null||l.col==null)return null;let s=Ts(i,f=>f.generatedLine>l.line?!0:f.generatedLine=l.col);if(s===-1)s=i.length-1;else{if(s===0)return null;s--}let c=i[s],h={};if(c.name!=null)h.name=c.name;else if(c.source!=null){let f=a?.sourceContentFor(c.source,!0);if(f){let b=f.split(` `)[c.originalLine-1];if(b){let p=/\w+/.exec(b.substr(c.originalColumn-1));p&&(h.name=p[0])}}}switch(h.name){case"constructor":{h.name=l.name+" constructor";break}case"function":{h.name=l.name;break}case"const":case"export":{h.name=l.name;break}}return h.name&&l.name.includes(h.name)&&(h.name=l.name),c.source!=null&&(h.file=c.source,h.line=c.originalLine,h.col=c.originalColumn),H1&&(console.groupCollapsed(`Remapping "${l.name}" -> "${h.name}"`),console.log("before",{...l}),console.log("item @ index",c),console.log("item @ index + 1",i[s+1]),console.log("after",h),console.groupEnd()),h}}$();var Dh=({items:t,axis:e,renderItems:r,className:a,initialIndexInView:n})=>{let[i,o]=Be(null),[l,_]=Be(0),s=$t(null),c=e==="x"?"width":"height",h=e==="x"?"left":"top",f=e==="x"?"scrollLeft":"scrollTop",v=n?t.reduce((j,k,H)=>H{j?requestAnimationFrame(()=>{o(j.getBoundingClientRect()[c]),b.current!=null&&(j.scrollTo({[h]:b.current}),b.current=null)}):o(null),s.current=j},[o,c,h]),d=Q(()=>{if(s.current==null||i==null||l==null)return null;let j=l-i/4,k=l+i+i/4,H=0,O=0,T=0;for(;T=j)break}let A=T;for(;T=k)break}let B=Math.min(T,t.length-1);return{firstVisibleIndex:A,lastVisibleIndex:B,invisiblePrefixSize:O}},[i,l,t]),m=Q(()=>t.reduce((j,k)=>j+k.size,0),[t]),y=D(()=>{s.current!=null&&_(s.current[f])},[f]);Ke(()=>{let j=()=>{s.current!=null&&o(s.current.getBoundingClientRect()[c])};return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[c]);let S=Q(()=>d?r(d.firstVisibleIndex,d.lastVisibleIndex):null,[r,d]),w=Q(()=>g("div",{style:{height:m}},g("div",{style:{transform:`translateY(${d?.invisiblePrefixSize||0}px)`}},S)),[d,S,m]);return g("div",{className:a,ref:p,onScroll:y},w)};function zh(t){let e=_i(U());return g("div",{className:x(e.hBarDisplay)},g("div",{className:x(e.hBarDisplayFilled),style:{width:`${t.perc}%`}}))}function Zo(t){let e=U(),r=_i(e),{activeDirection:a}=t,n=a===0?e.fgPrimaryColor:e.fgSecondaryColor,i=a===1?e.fgPrimaryColor:e.fgSecondaryColor;return g("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:x(r.sortIcon)},g("path",{d:"M0 4L4 0L8 4H0Z",fill:n}),g("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:i}))}function I1(t,e,r){let a=[],n=0;for(let i of e)a.push(t.slice(n,i[0])),a.push(g("span",{className:r},t.slice(i[0],i[1]))),n=i[1];return a.push(t.slice(n)),g("span",null,a)}var F1=({frame:t,matchedRanges:e,profile:r,index:a,selectedFrame:n,setSelectedFrame:i,getCSSColorForFrame:o})=>{let l=_i(U()),_=t.getTotalWeight(),s=t.getSelfWeight(),c=100*_/r.getTotalNonIdleWeight(),h=100*s/r.getTotalNonIdleWeight(),f=t===n;return g("tr",{key:`${a}`,onClick:i.bind(null,t),className:x(l.tableRow,a%2==0&&l.tableRowEven,f&&l.tableRowSelected)},g("td",{className:x(l.numericCell)},r.formatValue(_)," (",vt(c),")",g(zh,{perc:c})),g("td",{className:x(l.numericCell)},r.formatValue(s)," (",vt(h),")",g(zh,{perc:h})),g("td",{title:t.file,className:x(l.textCell)},g(ei,{color:o(t)}),e?I1(t.name,e,x(l.matched,f&&l.matchedSelected)):t.name))},M1=he(({profile:t,sortMethod:e,setSortMethod:r,selectedFrame:a,setSelectedFrame:n,getCSSColorForFrame:i,searchQuery:o,searchIsActive:l})=>{let _=_i(U()),s=D((d,m)=>{if(m.preventDefault(),e.field==d)r({field:d,direction:e.direction===0?1:0});else switch(d){case 0:{r({field:d,direction:0});break}case 1:{r({field:d,direction:1});break}case 2:{r({field:d,direction:1});break}}},[e,r]),c=Ye(Cn),h=D((d,m)=>{if(!c)return null;let y=[];for(let S=d;S<=m;S++){let w=c.rowList[S],j=c.getSearchMatchForFrame(w);y.push(F1({frame:w,matchedRanges:j??null,index:S,profile:t,selectedFrame:a,setSelectedFrame:n,getCSSColorForFrame:i}))}return y.length===0&&(l?y.push(g("tr",null,g("td",{className:x(_.emptyState)},'No symbol names match query "',o,'".'))):y.push(g("tr",null,g("td",{className:x(_.emptyState)},"No symbols found.")))),g("table",{className:x(_.tableView)},y)},[c,t,a,n,i,l,o,_.emptyState,_.tableView]),f=Q(()=>c==null?[]:c.rowList.map(d=>({size:20})),[c]),v=D(d=>s(2,d),[s]),b=D(d=>s(1,d),[s]),p=D(d=>s(0,d),[s]);return g("div",{className:x(ge.vbox,_.profileTableView)},g("table",{className:x(_.tableView)},g("thead",{className:x(_.tableHeader)},g("tr",null,g("th",{className:x(_.numericCell),onClick:v},g(Zo,{activeDirection:e.field===2?e.direction:null}),"Total"),g("th",{className:x(_.numericCell),onClick:b},g(Zo,{activeDirection:e.field===1?e.direction:null}),"Self"),g("th",{className:x(_.textCell),onClick:p},g(Zo,{activeDirection:e.field===0?e.direction:null}),"Symbol Name")))),g(Dh,{axis:"y",items:f,className:x(_.scrollView),renderItems:h,initialIndexInView:a==null?null:c?.getIndexForFrame(a)}))}),_i=fe(t=>le.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:ce.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"}})),Vh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e;if(!r)throw new Error("profile missing");let n=W(dn),i=U(),{callerCallee:o}=a,l=o?o.selectedFrame:null,_=Tt(r),s=Nt({theme:i,frameToColorBucket:_}),c=D(v=>{Ee.setSelectedFrame(v)},[]),h=W(Rr),f=W(Lr);return g(M1,{profile:r,selectedFrame:l,getCSSColorForFrame:s,sortMethod:n,setSelectedFrame:c,setSortMethod:dn.set,searchIsActive:h,searchQuery:f})});$();$();var Kr=class extends lt{constructor(){super(...arguments);this.setConfigSpaceViewportRect=r=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(r))};this.setLogicalSpaceViewportSize=r=>{this.props.setLogicalSpaceViewportSize(r)};this.transformViewport=r=>{this.setConfigSpaceViewportRect(r.transformRect(this.props.configSpaceViewportRect))};this.container=null;this.containerRef=r=>{this.container=r||null};this.setNodeHover=r=>{this.props.setNodeHover(r)}}clampViewportToFlamegraph(r){let{flamechart:a,renderInverted:n}=this.props;return a.getClampedConfigSpaceViewportRect({configSpaceViewportRect:r,renderInverted:n})}formatValue(r){let a=this.props.flamechart.getTotalWeight(),n=100*r/a,i=vt(n);return`${this.props.flamechart.formatValue(r)} (${i})`}renderTooltip(){if(!this.container)return null;let{hover:r}=this.props;if(!r)return null;let{width:a,height:n,left:i,top:o}=this.container.getBoundingClientRect(),l=new C(r.event.clientX-i,r.event.clientY-o),_=O1(this.props.theme),s=r.node.frame;return g(ri,{containerSize:new C(a,n),offset:l},g("span",{className:x(_.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",s.name,s.file?g("div",null,s.file,":",s.line):void 0)}render(){return g("div",{className:x(ge.fillY,ge.fillX,ge.vbox),ref:this.containerRef},g(Or,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:Er,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())}},O1=fe(t=>le.create({hoverCount:{color:t.weightColor}}));var B1=Oe(({profile:t,frame:e,flattenRecursion:r})=>{let a=t.getInvertedProfileForCallersOf(e);return r?a.getProfileWithRecursionFlattened():a}),P1=Oe(({invertedCallerProfile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),D1=Pr({inverted:!0}),Jh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e,n=W(Ht),i=W(lr),o=U();if(!r)throw new Error("profile missing");if(!i)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:_}=l,s=Tt(r),c=Kt(s),h=Nt({theme:o,frameToColorBucket:s}),f=Et({theme:o,canvas:i}),v=P1({invertedCallerProfile:B1({profile:r,frame:_,flattenRecursion:n}),getColorBucketForFrame:c}),b=D1({canvasContext:f,flamechart:v});return g(Kr,{theme:o,renderInverted:!0,flamechart:v,flamechartRenderer:b,canvasContext:f,getCSSColorForFrame:h,...Br("SANDWICH_INVERTED_CALLERS"),...l.invertedCallerFlamegraph,setSelectedNode:Er})});$();var z1=Oe(({profile:t,frame:e,flattenRecursion:r})=>{let a=t.getProfileForCalleesOf(e);return r?a.getProfileWithRecursionFlattened():a}),V1=Oe(({calleeProfile:t,getColorBucketForFrame:e})=>new Mt({getTotalWeight:t.getTotalNonIdleWeight.bind(t),forEachCall:t.forEachCallGrouped.bind(t),formatValue:t.formatValue.bind(t),getColorBucketForFrame:e})),J1=Pr(),Uh=he(t=>{let{activeProfileState:e}=t,{profile:r,sandwichViewState:a}=e,n=W(Ht),i=W(lr),o=U();if(!r)throw new Error("profile missing");if(!i)throw new Error("glCanvas missing");let{callerCallee:l}=a;if(!l)throw new Error("callerCallee missing");let{selectedFrame:_}=l,s=Tt(r),c=Kt(s),h=Nt({theme:o,frameToColorBucket:s}),f=Et({theme:o,canvas:i}),v=V1({calleeProfile:z1({profile:r,frame:_,flattenRecursion:n}),getColorBucketForFrame:c}),b=J1({canvasContext:f,flamechart:v});return g(Kr,{theme:o,renderInverted:!1,flamechart:v,flamechartRenderer:b,canvasContext:f,getCSSColorForFrame:h,...Br("SANDWICH_CALLEES"),...l.calleeFlamegraph,setSelectedNode:Er})});var Kh=he(()=>{let t=Ye(Cn),e=t!=null?t.rowList:null,r=t?.selectedFrame!=null?t.getIndexForFrame(t.selectedFrame):null,a=e!=null?e.length:null,{selectPrev:n,selectNext:i}=Q(()=>e==null||a==null||a===0||t==null?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let o=r==null?a-1:r-1;o<0&&(o=a-1),t.setSelectedFrame(e[o])},selectNext:()=>{let o=r==null?0:r+1;o>=a&&(o=0),t.setSelectedFrame(e[o])}},[r,e,a,t]);return g(Ka,{resultIndex:r,numResults:a,selectPrev:n,selectNext:i})});$();var Qo=class extends lt{constructor(){super(...arguments);this.setSelectedFrame=r=>{this.props.setSelectedFrame(r)};this.onWindowKeyPress=r=>{r.key==="Escape"&&this.setSelectedFrame(null)}}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){let r=U1(this.props.theme),{selectedFrame:a}=this.props,n=null;return a&&(n=g("div",{className:x(ge.fillY,r.callersAndCallees,ge.vbox)},g("div",{className:x(ge.hbox,r.panZoomViewWraper)},g("div",{className:x(r.flamechartLabelParent)},g("div",{className:x(r.flamechartLabel)},"Callers")),g(Jh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),g("div",{className:x(r.divider)}),g("div",{className:x(ge.hbox,r.panZoomViewWraper)},g("div",{className:x(r.flamechartLabelParent,r.flamechartLabelParentBottom)},g("div",{className:x(r.flamechartLabel,r.flamechartLabelBottom)},"Callees")),g(Uh,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),g("div",{className:x(ge.hbox,ge.fillY)},g("div",{className:x(r.tableView)},g(Vh,{activeProfileState:this.props.activeProfileState}),g(Kh,null)),n)}},U1=fe(t=>le.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}})),Cn=dt(null),$h=he(t=>{let{activeProfileState:e,glCanvas:r}=t,{sandwichViewState:a,index:n}=e,{callerCallee:i}=a,o=U(),l=D(d=>{Ee.setSelectedFrame(d)},[]),_=e.profile,s=W(dn),c=Ye(cr),h=i?i.selectedFrame:null,f=Q(()=>{let d=[];switch(_.forEachFrame(m=>{c&&!c.getMatchForFrame(m)||d.push(m)}),s.field){case 0:{Ie(d,m=>m.name.toLowerCase());break}case 1:{Ie(d,m=>m.getSelfWeight());break}case 2:{Ie(d,m=>m.getTotalWeight());break}}return s.direction===1&&d.reverse(),d},[_,c,s]),v=Q(()=>{let d=new Map;for(let m=0;m{let y=d.get(m);return y??null}},[f]),b=Q(()=>d=>c==null?null:c.getMatchForFrame(d),[c]),p={rowList:f,selectedFrame:h,setSelectedFrame:l,getIndexForFrame:v,getSearchMatchForFrame:b};return g(Cn.Provider,{value:p},g(Qo,{theme:o,activeProfileState:e,glCanvas:r,setSelectedFrame:l,selectedFrame:h,profileIndex:n}))});var an=Promise.resolve().then(()=>(I0(),L0));an.then(()=>{});Promise.resolve().then(()=>(wo(),Co)).then(()=>{});Promise.resolve().then(()=>se(Yo())).then(()=>{});async function M0(t,e){return(await an).importProfileGroupFromText(t,e)}async function J2(t,e){return(await an).importProfileGroupFromBase64(t,e)}async function U2(t,e){return(await an).importProfilesFromArrayBuffer(t,e)}async function K2(t){return(await an).importProfilesFromFile(t)}async function $2(t){return(await an).importFromFileSystemDirectoryEntry(t)}var W2=F0();function G2(t){return t!=null&&t.isDirectory}var fs=class extends lt{constructor(){super(...arguments);this.canvas=null;this.ref=r=>{r instanceof HTMLCanvasElement?this.canvas=r:this.canvas=null,this.props.setGLCanvas(this.canvas)};this.container=null;this.containerRef=r=>{r instanceof HTMLElement?this.container=r:this.container=null};this.maybeResize=()=>{if(!this.container||!this.props.canvasContext)return;let{width:r,height:a}=this.container.getBoundingClientRect(),n=r,i=a,o=r*window.devicePixelRatio,l=a*window.devicePixelRatio;this.props.canvasContext.gl.resize(o,l,n,i)};this.onWindowResize=()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()}}componentWillReceiveProps(r){this.props.canvasContext!==r.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),r.canvasContext&&(r.canvasContext.addBeforeFrameHandler(this.maybeResize),r.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 r=O0(this.props.theme);return g("div",{ref:this.containerRef,className:x(r.glCanvasView)},g("canvas",{ref:this.ref,width:1,height:1}))}},Pi=class extends lt{constructor(){super(...arguments);this.loadExample=()=>{this.loadProfile(async()=>{let r="perf-vertx-stacks-01-collapsed-all.txt",a=await fetch(W2).then(n=>n.text());return await M0(r,a)})};this.onDrop=r=>{if(this.props.setDragActive(!1),r.preventDefault(),!r.dataTransfer)return;let a=r.dataTransfer.items[0];if("webkitGetAsEntry"in a){let i=a.webkitGetAsEntry();if(i&&G2(i)&&i.name.endsWith(".trace")){console.log("Importing as Instruments.app .trace file");let o=i;this.loadProfile(async()=>await $2(o));return}}let n=r.dataTransfer.files.item(0);n&&this.loadFromFile(n)};this.onDragOver=r=>{this.props.setDragActive(!0),r.preventDefault()};this.onDragLeave=r=>{this.props.setDragActive(!1),r.preventDefault()};this.onWindowKeyPress=async r=>{if(r.key==="1")this.props.setViewMode(0);else if(r.key==="2")this.props.setViewMode(1);else if(r.key==="3")this.props.setViewMode(2);else if(r.key==="r"){let{flattenRecursion:a}=this.props;this.props.setFlattenRecursion(!a)}else if(r.key==="n"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index+1)}else if(r.key==="p"){let{activeProfileState:a}=this.props;a&&this.props.setProfileIndexToView(a.index-1)}};this.saveFile=()=>{if(this.props.profileGroup){let{name:r,indexToView:a,profiles:n}=this.props.profileGroup,i={name:r,indexToView:a,profiles:n.map(o=>o.profile)};Gc(i)}};this.browseForFile=()=>{let r=document.createElement("input");r.type="file",r.addEventListener("change",this.onFileSelect),r.click()};this.onWindowKeyDown=async r=>{r.key==="s"&&(r.ctrlKey||r.metaKey)?(r.preventDefault(),this.saveFile()):r.key==="o"&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),this.browseForFile())};this.onDocumentPaste=r=>{if(document.activeElement!=null&&document.activeElement.nodeName==="INPUT")return;r.preventDefault(),r.stopPropagation();let a=r.clipboardData;if(!a)return;let n=a.getData("text");this.loadProfile(async()=>await M0("From Clipboard",n))};this.onFileSelect=r=>{let a=r.target.files.item(0);a&&this.loadFromFile(a)}}async loadProfile(r){if(this.props.setError(!1),this.props.setLoading(!0),await new Promise(n=>setTimeout(n,0)),!this.props.glCanvas)return;console.time("import");let a=null;try{a=await r()}catch(n){console.log("Failed to load format",n),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 n of a.profiles)await n.demangle();for(let n of a.profiles){let i=this.props.hashParams.title||n.getName();n.setName(i)}console.timeEnd("import"),this.props.setProfileGroup(a),this.props.setLoading(!1)}getStyle(){return O0(this.props.theme)}loadFromFile(r){this.loadProfile(async()=>{let a=await K2(r);if(a){for(let n of a.profiles)n.getName()||n.setName(r.name);return a}if(this.props.profileGroup&&this.props.activeProfileState){let n=new FileReader,i=new Promise(c=>{n.addEventListener("loadend",()=>{if(typeof n.result!="string")throw new Error("Expected reader.result to be a string");c(n.result)})});n.readAsText(r);let o=await i,l=null,_=Kc(o);_&&(console.log("Importing as emscripten symbol map"),l=_);let s=await Ph(o,r.name);if(!l&&s&&(console.log("Importing as JavaScript source map"),l=s),l!=null)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(c=>{let h=c.profile.shallowClone();return h.remapSymbols(l),h})}}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:r}=this.props.hashParams;if(r){if(!da){alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);return}this.loadProfile(async()=>{let a=await fetch(r),n=new URL(r,window.location.href).pathname;return n.includes("/")&&(n=n.slice(n.lastIndexOf("/")+1)),await U2(n,await a.arrayBuffer())})}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(n,i)=>{this.loadProfile(()=>J2(n,i))}};let a=document.createElement("script");a.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(a)}}renderLanding(){let r=this.getStyle();return g("div",{className:x(r.landingContainer)},g("div",{className:x(r.landingMessage)},g("p",{className:x(r.landingP)},"\u{1F44B} Hi there! Welcome to \u{1F52C}speedscope, an interactive"," ",g("a",{className:x(r.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),da?g("p",{className:x(r.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"," ",g("a",{tabIndex:0,className:x(r.link),onClick:this.loadExample},"click here")," ","to load an example profile."):g("p",{className:x(r.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."),g("div",{className:x(r.browseButtonContainer)},g("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:x(r.hide)}),g("label",{for:"file",className:x(r.browseButton),tabIndex:0},"Browse")),g("p",{className:x(r.landingP)},"See the"," ",g("a",{className:x(r.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."),g("p",{className:x(r.landingP)},"speedscope is open source. Please"," ",g("a",{className:x(r.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){let r=this.getStyle();return g("div",{className:x(r.error)},g("div",null,"\u{1F63F} Something went wrong."),g("div",null,"Check the JS console for more details."))}renderLoadingBar(){let r=this.getStyle();return g("div",{className:x(r.loading)})}renderContent(){let{viewMode:r,activeProfileState:a,error:n,loading:i,glCanvas:o}=this.props;if(n)return this.renderError();if(i)return this.renderLoadingBar();if(!a||!o)return this.renderLanding();switch(r){case 0:return g(ah,{activeProfileState:a,glCanvas:o});case 1:return g(ih,{activeProfileState:a,glCanvas:o});case 2:return g($h,{activeProfileState:a,glCanvas:o})}}render(){let r=this.getStyle();return g("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:x(r.root,this.props.dragActive&&r.dragTargetRoot)},g(fs,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),g(ph,{saveFile:this.saveFile,browseForFile:this.browseForFile,...this.props}),g("div",{className:x(r.contentContainer)},this.renderContent()),this.props.dragActive&&g("div",{className:x(r.dragTarget)}))}},O0=fe(t=>le.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 B0=he(()=>{let t=W(lr),e=U(),r=Q(()=>t?Et({theme:e,canvas:t}):null,[e,t]);return g(Jc,null,g(Pi,{activeProfileState:pa(),canvasContext:r,setGLCanvas:lr.set,setLoading:lo.set,setError:so.set,setProfileGroup:Ee.setProfileGroup,setDragActive:oo.set,setViewMode:Wt.set,setFlattenRecursion:Ht.set,setProfileIndexToView:Ee.setProfileIndexToView,profileGroup:W(Ee),theme:e,flattenRecursion:W(Ht),viewMode:W(Wt),hashParams:W(e_),glCanvas:t,dragActive:W(oo),loading:W(lo),error:W(so)}))});console.log(`speedscope v${xo().version}`);$i(g(f_,null,g(B0,null)),document.body,document.body.lastElementChild||void 0);})(); //# sourceMappingURL=speedscope-W5HZ7E66.js.map