197 lines
537 KiB
JavaScript
197 lines
537 KiB
JavaScript
|
"use strict";(()=>{var P0=Object.create;var Di=Object.defineProperty;var D0=Object.getOwnPropertyDescriptor;var z0=Object.getOwnPropertyNames;var V0=Object.getPrototypeOf,J0=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ps=(t,e)=>{for(var r in e)Di(t,r,{get:e[r],enumerable:!0})},U0=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of z0(e))!J0.call(t,n)&&n!==r&&Di(t,n,{get:()=>e[n],enumerable:!(a=D0(e,n))||a.enumerable});return t};var se=(t,e,r)=>(r=t!=null?P0(V0(t)):{},U0(e||!t||!t.__esModule?Di(r,"default",{value:t,enumerable:!0}):r,t));function Z(t){return t[t.length-1]||null}function Ie(t,e){function r(a,n){let i=e(a),o=e(n);return i<o?-1:i>o?1:0}t.sort(r)}function Ce(t,e,r){return t.has(e)||t.set(e,r(e)),t.get(e)}function Zn(t,e,r){return t.has(e)?t.get(e):r(e)}function Ue(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}function*As(t,e){for(let r of t)yield e(r)}function Ns(t,e){for(let r of t)e(r)}function Ut(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function vt(t){let e=`${t.toFixed(0)}%`;return t===100?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function Y0(t){return t-Math.floor(t)}function Qn(t){return 2*Math.abs(Y0(t)-.5)-1}function Es(t,e,r,a,n=1){for(console.assert(!isNaN(n)&&!isNaN(a));;){if(e-t<=n)return[t,e];let i=(e+t)/2;r(i)<a?t=i:e=i}}function Ts(t,e){if(t.length===0)return-1;let r=0,a=t.length-1;for(;a!==r;){let n=Math.floor((r+a)/2);e(t[n])?a=n:r=n+1}return e(t[a])?a:-1}function Er(...t){}function hn(t,e){for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(t[r]!==e[r])return!1;return!0}function Oe(t){let e=null;return r=>{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<r;o++){let l=t.charAt(o*4+0),_=t.charAt(o*4+1),s=t.charAt(o*4+2),c=t.charAt(o*4+3),h=e.get(l),f=e.get(_),v=e.get(s),b=e.get(c);if(h==null||f==null||v==null||b==null)throw new Error(`Invalid quartet at indices ${o*4} .. ${o*4+3}: ${t.substring(o*4,o*4+3)}`);n[i++]=h<<2|f>>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<t.length;r++)e.set(t.charAt(r),r);return e.set("=",-1),e})});var _r=E((ga,u_)=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.default=kp;var xp=/-webkit-|-moz-|-ms-/;function kp(t){return typeof t=="string"&&xp.test(t)}u_.exports=ga.default});var p_=E((ya,d_)=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.default=Hp;var Ap=_r(),Np=Ep(Ap);function Ep(t){return t&&t.__esModule?t:{default:t}}var Tp=["-webkit-","-moz-",""];function Hp(t,e){if(typeof e=="string"&&!(0,Np.default)(e)&&e.indexOf("calc(")>-1)return Tp.map(function(r){return e.replace(/calc\(/g,r+"calc(")})}d_.exports=ya.default});var m_=E((ba,v_)=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.default=Mp;var Rp=_r(),Lp=Ip(Rp);function Ip(t){return t&&t.__esModule?t:{default:t}}var Fp=["-webkit-",""];function Mp(t,e){if(typeof e=="string"&&!(0,Lp.default)(e)&&e.indexOf("cross-fade(")>-1)return Fp.map(function(r){
|
||
|
return 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<v;){var o=r[n];"function"==typeof o&&(o=le.getFunctionIndex(o)),s=f||a[n],0!==s?("i64"==s&&(s="i32"),t(_+n,o,s),n+=le.getNativeTypeSize(s)):n++}return _}function s(r,a){for(var e,i="undefined"==typeof a,v="",t=0,f=String.fromCharCode(0);;){if(e=String.fromCharCode(ge[r+t]),i&&e==f)break;if(v+=e,t+=1,!i&&t==a)break}return v}function n(r){for(var a="",e=0;e<r.length;e++)a+=String.fromCharCode(r[e]);return a}function o(r){return r+4095>>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;i<a;++i)e[i]=Ae[r+i];return e.buffer}function d(r){for(var a=0;Ae[r+a];)a++;return a}function w(r,a){var e=d(r);a&&e++;var i=c(r,e);return a&&(i[e-1]=0),i}function p(r,a){for(var e=[],i=0;i<r.length;){var v=r.charCodeAt(i);v>255&&(v&=255),e.push(v),i+=1}return a||e.push(0),e}function E(r){for(var a=[],e=0;e<r.length;e++){var i=r[e];i>255&&(i&=255),a.push(String.fromCharCode(i))}return a.join("")}function A(r,a,e){for(var i=0;i<r.length;){var v=r.charCodeAt(i);v>255&&(v&=255),Ae[a+i]=v,i+=1}e||(Ae[a+i]=0)}function g(r,a,e,i){return r>=0?r:a<=32?2*Math.abs(1<<a-1)+r:Math.pow(2,a)+r}function y(r,a,e,i){if(r<=0)return r;var v=a<=32?Math.abs(1<<a-1):Math.pow(2,a-1);return r>=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 _}fu
|
||
|
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<d;c++,h++)Ae[h]=Ae[c];var w=Se[_]+9|0;Se[_]=w;break r}while(0);Q(r,0|He.__str147,9)}else if(23==(0|o)||26==(0|o)){var p=Me[n+1],E=0==(0|p);do if(!E){var f=(r+8|0)>>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<d;c++,h++)Ae[h]=Ae[c];var y=Se[f]+9|0;Se[f]=y;break r}while(0);Q(r,0|He.__str148,9)}else if(24==(0|o)||27==(0|o)){var m=Me[n+1],S=0==(0|m);do if(!S){var t=(r+8|0)>>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<d;c++,h++)Ae[h]=Ae[c];var er=Se[i]+10|0;Se[i]=er;break r}while(0);Q(r,0|He.__str151,10)}else if(37==(0|o)){var ir=r+4|0,vr=Me[ir>>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+
|
||
|
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<s>>>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<Me[R>>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)
|
||
|
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<<Se[Lr>>2]^-1);Se[vi+4>>2]=jr;break e}if(Er>>>0<Me[vi+16>>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<Me[vi+16>>2]>>>0)throw Ka(),"Reached an unreachable!";Se[a+6]=Er;var xr=Me[f+(s+2)];if(0!=(0|xr)){if(xr>>>0<Me[vi+16>>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<Me[vi+16>>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<<ea,fa=(va+520192|0)>>>16&4,_a=va<<fa,sa=(_a+245760|0)>>>16&2,na=14-(fa|ea|sa)+(_a<<sa>>>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<<aa,ka=0==(la&ba|0);e:do if(ka){var ua=la|ba;Se[vi+4>>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<<ca,da=Se[oa>>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<Ea>>>0;do if(!Aa){if(pa>>>0<Ea>>>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 v
|
||
|
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(
|
||
|
He.__str165335=_([95,95,105,110,116,49,50,56,0],"i8",we),He.__str166336=_([117,110,115,105,103,110,101,100,32,95,95,105,110,116,49,50,56,0],"i8",we),He.__str167337=_([98,111,111,108,0],"i8",we),He.__str168338=_([119,99,104,97,114,95,116,0],"i8",we),vi=_(468,["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0],we),ti=_(24,"i32",we),He.__str339=_([109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0],"i8",we),He.__str1340=_([115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0],"i8",we),He.__str2341=_([105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0],"i8",we),fi=_([ue],"i8",we),_i=_(1,"void ()*",we),si=_([0,0,0,0,0,0,0,0,6,0,0,0,8,0,0,0,10,0,0,0],["*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0],we),_(1,"void*",we),He.__str3342=_([115,116,100,58,58,98,97,100,95,97,108,108,111,99,0],"i8",we),ni=_([0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,14,0,0,0],["*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0],we),_(1,"void*",we),He.__str14343=_([98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0],"i8",we),He.__ZTSSt9bad_alloc=_([83,116,57,98,97,100,95,97,108,108,111,99,0],"i8",we),bi=_(12,"*",we),He.__ZTSSt20bad_array_new_length=_([83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0],"i8",we),ki=_(12,"*",we),Se[ri>>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,
|
||
|
`});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=n
|
||
|
`;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;r<t.length;r++)if(!/\s/.exec(String.fromCharCode(t[r]))){e=r;break}if(t[e]===91&&t[t.length-1]!==93){let r=t.length;for(;r>0&&/\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<e.byteLength/Ni;i++){let o=i*Ni,l=new Uint8Array(e,o,Math.min(e.byteLength-o,Ni)),_=n.decode(l,{stream:!0});this.chunks.push(_)}}else{console.warn("This browser does not support TextDecoder. Decoding text as ASCII."),this.chunks.push("");for(let n=0;n<r.length;n++)this.chunks[this.chunks.length-1]+=String.fromCharCode(r[n]),this.chunks[this.chunks.length-1]|0,this.chunks[this.chunks.length-1].length>=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<n.length;i++)i===0?r+=n[i]:(yield r,r=n[i])}yield r};return{[Symbol.iterator]:e.bind(this)}}firstChunk(){return this.chunks[0]||""}parseAsJSON(){return this.chunks.length===1?$u(this.chunks[0]):zy(this.byteArray)}},Ol=class{constructor(e){this.s=e}splitLines(){return this.s.split(`
|
||
|
`)}firstChunk(){return this.s}parseAsJSON(){return $u(this.s)}},Ei=class{constructor(e,r){this.fileName=e;this.contents=r}async name(){return this.fileName}async readAsArrayBuffer(){return new ArrayBuffer(0)}async readAsText(){return new Ol(this.contents)}},Jt=class t{constructor(e,r){this.namePromise=e;this.uncompressedData=r.then(async a=>{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;i<r.length;i++)a.set(i,r[i]);let n=[];for(let i of e){let o={};for(let l=0;l<i.length;l++)o[a.get(l)]=i[l];n.push(o)}return n}function Jy(t){if("Bytes Used"in t){let e=t["Bytes Used"],r=/\s*(\d+(?:[.]\d+)?) (\w+)\s+(?:\d+(?:[.]\d+))%/.exec(e);if(!r)return 0;let a=parseInt(r[1],10),n=r[2];switch(n){case"Bytes":return a;case"KB":return 1024*a;case"MB":return 1024*1024*a;case"GB":return 1024*1024*1024*a}throw new Error(`Unrecognized units ${n}`)}if("Weight"in t||"Running Time"in t){let e=t.Weight||t["Running Time"],r=/\s*(\d+(?:[.]\d+)?) ?(\w+)\s+(?:\d+(?:[.]\d+))%/.exec(e);if(!r)return 0;let a=parseInt(r[1],10),n=r[2];switch(n){case"ms":return a;case"s":return 1e3*a;case"min":return 60*1e3*a;case"cycles":return a;case"Kc":return 1e3*a;case"Mc":return 1e3*1e3*a;case"Gc":return 1e3*1e3*1e3*a}throw new Error(`Unrecognized units ${n}`)}return-1}function zl(t){let e=new de,r=Vy(t),a=[],n=0,i=r[0]["Symbol Names"]?r[0]["Symbol Names"].lastIndexOf(" ")+1:0;for(let o of r){let l=o["Symbol Name"]||o["Symbol Names"]?.slice(i);if(!l)continue;let _=l.trim(),s=l.length-_.length;if(a.length-s<0)throw new Error("Invalid format");let c=[];for(;s<a.length;){let f=a.pop();c.push(f)}for(let f of c)n=Math.max(n,f.endValue),e.leaveFrame(f,n);let h={key:`${o["Source Path"]||""}:${_}`,name:_,file:o["Source Path"],endValue:n+Jy(o)};e.enterFrame(h,n),a.push(h)}for(;a.length>0;){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
|
||
|
uniform mat3 configSpaceToNDC;
|
||
|
|
||
|
attribute vec2 configSpacePos;
|
||
|
attribute vec3 color;
|
||
|
varying vec3 vColor;
|
||
|
|
||
|
void main() {
|
||
|
vColor = color;
|
||
|
vec2 position = (configSpaceToNDC * vec3(configSpacePos, 1)).xy;
|
||
|
gl_Position = vec4(position, 1, 1);
|
||
|
}
|
||
|
`,ap=`
|
||
|
precision mediump float;
|
||
|
varying vec3 vColor;
|
||
|
|
||
|
void main() {
|
||
|
gl_FragColor = vec4(vColor.rgb, 1);
|
||
|
}
|
||
|
`,or=class{constructor(e){this.gl=e;this.rects=[];this.colors=[];this.buffer=null}getRectCount(){return this.rects.length}getBuffer(){if(this.buffer)return this.buffer;let e=[[0,0],[1,0],[0,1],[1,0],[0,1],[1,1]],r=new Uint8Array(aa.stride*e.length*this.rects.length),a=new Float32Array(r.buffer),n=0;for(let i=0;i<this.rects.length;i++){let o=this.rects[i],l=this.colors[i];for(let _ of e)a[n++]=o.origin.x+_[0]*o.size.x,a[n++]=o.origin.y+_[1]*o.size.y,a[n++]=l.r,a[n++]=l.g,a[n++]=l.b}if(n!==a.length)throw new Error("Buffer expected to be full but wasn't");return this.buffer=this.gl.createVertexBuffer(r.length),this.buffer.upload(r),this.buffer}addRect(e,r){this.rects.push(e),this.colors.push(r),this.buffer&&(this.buffer.free(),this.buffer=null)}free(){this.buffer&&(this.buffer.free(),this.buffer=null)}},na=class{constructor(e){this.gl=e;this.material=e.createMaterial(aa,np,ap)}render(e){mt(this.material,"configSpaceToNDC",(()=>{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()<this.rowCache.getCapacity()){let r=this.rowCache.getSize();return this.rowCache.insert(e,r),r}else{let[,r]=this.rowCache.removeLRU();return this.rowCache.insert(e,r),r}}writeToAtlasIfNeeded(e,r){ra(this.gl,this.renderTarget,()=>{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<e.length;i++)n.set(e[i].key,Math.floor(255*i/e.length));return n});var Hr,Xe,Is,fn=0,Zi=[],Fs=P.__r,Ms=P.diffed,Os=P.__c,Bs=P.unmount;function un(t,e){P.__h&&P.__h(Xe,t,fn||e),fn=0;var r=Xe.__H||(Xe.__H={__:[],__h:[]});return t>=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);
|
||
|
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<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,r,a){return r&&t(e.prototype,r),a&&t(e,a),e}}();function Zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var gc=typeof Map<"u",yo=function(){fu
|
||
|
`);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;_<l;_++){let s=[],c=o.inverted?l-1-_:_,h=1/0,f=-1/0,v=new or(this.gl),b=0,p=a.getLayers()[_];for(let d=0;d<p.length;d++){let m=p[d];v.getRectCount()>=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.setCo
|
||
|
`)[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<n?j+k.size:j,0):0,b=$t(v),p=D(j=>{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<t.length;T++){let _e=t[T];if(O=H,H+=_e.size,H>=j)break}let A=T;for(;T<t.length;T++){let _e=t[T];if(H+=_e.size,H>=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,_.tableV
|
||
|
//# sourceMappingURL=speedscope-W5HZ7E66.js.map
|