diff --git a/T1.nii.gz b/T1.nii.gz new file mode 100644 index 0000000..a41d409 Binary files /dev/null and b/T1.nii.gz differ diff --git a/assets/favicon-ncJxyKwd.ico b/assets/favicon-ncJxyKwd.ico new file mode 100644 index 0000000..5c06951 Binary files /dev/null and b/assets/favicon-ncJxyKwd.ico differ diff --git a/assets/index-Bat-Wlze.css b/assets/index-Bat-Wlze.css new file mode 100644 index 0000000..a404330 --- /dev/null +++ b/assets/index-Bat-Wlze.css @@ -0,0 +1 @@ +html{height:auto;min-height:100%;margin:0}body{display:flex;flex-direction:column;margin:0;min-height:100%;width:100%;position:absolute;font-family:system-ui,Arial,Helvetica,sans-serif;-webkit-user-select:none;user-select:none;color:#fff;background:#202020}header{margin:10px}main{flex:1;background:#000;position:relative}footer{margin:10px}canvas{position:absolute;cursor:crosshair}canvas:focus{outline:0px}div{display:table-row}.dropdown{float:left;overflow:hidden}.dropdown .dropbtn{font-size:16px;border:none;outline:none;color:#fff;padding:12px;background-color:#202020;font-family:inherit;margin:0}.dropdown:hover .dropbtn{background-color:#9a9}.dropdown-content{display:none;position:absolute;background-color:#303030;min-width:160px;border-radius:5px;box-shadow:0 8px 16px #0003;z-index:1}.dropdown-content a{float:none;color:#fff;padding:12px 16px;text-decoration:none;display:block;text-align:left;line-height:6px}.dropdown-content a:hover{background-color:#aba}.dropdown:hover .dropdown-content{display:block}.dropdown-item-checked:before{position:absolute;left:.2rem;content:"•";font-weight:600}.divider{border-top:1px solid grey}.vertical-divider{border-left:1px solid grey;height:40px}.help-text{margin:auto;max-width:150px;padding:0 10px}.slidecontainer{padding:10px;white-space:normal;word-break:break-word;display:flex;align-items:center;flex:0 0 auto}.loading-circle{display:inline-block;width:20px;height:20px;border:3px solid rgba(255,255,255,.3);border-radius:50%;border-top-color:#fff;animation:spin 1s ease-in-out infinite;margin-left:10px;vertical-align:middle}@keyframes spin{to{transform:rotate(360deg)}}.hidden{display:none}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#f0f8ff;margin-top:60px}.command-line{text-align:center;margin:10px auto auto}.command-line input{width:350px}.niimath-instructions{color:#fff;font-size:20px;font-family:Roboto,sans-serif;margin-top:20px}.niimath-instructions a:link{color:#f0f8ff}.niimath-instructions a:visited{color:#add8e6} diff --git a/assets/index-BiARc0UP.js b/assets/index-BiARc0UP.js new file mode 100644 index 0000000..3284db5 --- /dev/null +++ b/assets/index-BiARc0UP.js @@ -0,0 +1,1828 @@ +var Hp=Object.defineProperty;var Yp=(C,u,h)=>u in C?Hp(C,u,{enumerable:!0,configurable:!0,writable:!0,value:h}):C[u]=h;var $0=(C,u,h)=>Yp(C,typeof u!="symbol"?u+"":u,h);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))g(S);new MutationObserver(S=>{for(const v of S)if(v.type==="childList")for(const w of v.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&g(w)}).observe(document,{childList:!0,subtree:!0});function h(S){const v={};return S.integrity&&(v.integrity=S.integrity),S.referrerPolicy&&(v.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?v.credentials="include":S.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function g(S){if(S.ep)return;S.ep=!0;const v=h(S);fetch(S.href,v)}})();var EPSILON=1e-6,ARRAY_TYPE=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var C=0,u=arguments.length;u--;)C+=arguments[u]*arguments[u];return Math.sqrt(C)});function create$4(){var C=new ARRAY_TYPE(9);return ARRAY_TYPE!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C}function fromValues$4(C,u,h,g,S,v,w,I,_){var P=new ARRAY_TYPE(9);return P[0]=C,P[1]=u,P[2]=h,P[3]=g,P[4]=S,P[5]=v,P[6]=w,P[7]=I,P[8]=_,P}function multiply$1(C,u,h){var g=u[0],S=u[1],v=u[2],w=u[3],I=u[4],_=u[5],P=u[6],L=u[7],d=u[8],k=h[0],e=h[1],N=h[2],B=h[3],Q=h[4],i0=h[5],j=h[6],H=h[7],y=h[8];return C[0]=k*g+e*w+N*P,C[1]=k*S+e*I+N*L,C[2]=k*v+e*_+N*d,C[3]=B*g+Q*w+i0*P,C[4]=B*S+Q*I+i0*L,C[5]=B*v+Q*_+i0*d,C[6]=j*g+H*w+y*P,C[7]=j*S+H*I+y*L,C[8]=j*v+H*_+y*d,C}function create$3(){var C=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=0,C[12]=0,C[13]=0,C[14]=0),C[0]=1,C[5]=1,C[10]=1,C[15]=1,C}function clone$2(C){var u=new ARRAY_TYPE(16);return u[0]=C[0],u[1]=C[1],u[2]=C[2],u[3]=C[3],u[4]=C[4],u[5]=C[5],u[6]=C[6],u[7]=C[7],u[8]=C[8],u[9]=C[9],u[10]=C[10],u[11]=C[11],u[12]=C[12],u[13]=C[13],u[14]=C[14],u[15]=C[15],u}function copy$1(C,u){return C[0]=u[0],C[1]=u[1],C[2]=u[2],C[3]=u[3],C[4]=u[4],C[5]=u[5],C[6]=u[6],C[7]=u[7],C[8]=u[8],C[9]=u[9],C[10]=u[10],C[11]=u[11],C[12]=u[12],C[13]=u[13],C[14]=u[14],C[15]=u[15],C}function fromValues$3(C,u,h,g,S,v,w,I,_,P,L,d,k,e,N,B){var Q=new ARRAY_TYPE(16);return Q[0]=C,Q[1]=u,Q[2]=h,Q[3]=g,Q[4]=S,Q[5]=v,Q[6]=w,Q[7]=I,Q[8]=_,Q[9]=P,Q[10]=L,Q[11]=d,Q[12]=k,Q[13]=e,Q[14]=N,Q[15]=B,Q}function identity(C){return C[0]=1,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=1,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=1,C[11]=0,C[12]=0,C[13]=0,C[14]=0,C[15]=1,C}function transpose(C,u){if(C===u){var h=u[1],g=u[2],S=u[3],v=u[6],w=u[7],I=u[11];C[1]=u[4],C[2]=u[8],C[3]=u[12],C[4]=h,C[6]=u[9],C[7]=u[13],C[8]=g,C[9]=v,C[11]=u[14],C[12]=S,C[13]=w,C[14]=I}else C[0]=u[0],C[1]=u[4],C[2]=u[8],C[3]=u[12],C[4]=u[1],C[5]=u[5],C[6]=u[9],C[7]=u[13],C[8]=u[2],C[9]=u[6],C[10]=u[10],C[11]=u[14],C[12]=u[3],C[13]=u[7],C[14]=u[11],C[15]=u[15];return C}function invert(C,u){var h=u[0],g=u[1],S=u[2],v=u[3],w=u[4],I=u[5],_=u[6],P=u[7],L=u[8],d=u[9],k=u[10],e=u[11],N=u[12],B=u[13],Q=u[14],i0=u[15],j=h*I-g*w,H=h*_-S*w,y=h*P-v*w,Y=g*_-S*I,G=g*P-v*I,Z=S*P-v*_,e0=L*B-d*N,z=L*Q-k*N,f=L*i0-e*N,f0=d*Q-k*B,o0=d*i0-e*B,c0=k*i0-e*Q,m0=j*c0-H*o0+y*f0+Y*f-G*z+Z*e0;return m0?(m0=1/m0,C[0]=(I*c0-_*o0+P*f0)*m0,C[1]=(S*o0-g*c0-v*f0)*m0,C[2]=(B*Z-Q*G+i0*Y)*m0,C[3]=(k*G-d*Z-e*Y)*m0,C[4]=(_*f-w*c0-P*z)*m0,C[5]=(h*c0-S*f+v*z)*m0,C[6]=(Q*y-N*Z-i0*H)*m0,C[7]=(L*Z-k*y+e*H)*m0,C[8]=(w*o0-I*f+P*e0)*m0,C[9]=(g*f-h*o0-v*e0)*m0,C[10]=(N*G-B*y+i0*j)*m0,C[11]=(d*y-L*G-e*j)*m0,C[12]=(I*z-w*f0-_*e0)*m0,C[13]=(h*f0-g*z+S*e0)*m0,C[14]=(B*H-N*Y-Q*j)*m0,C[15]=(L*Y-d*H+k*j)*m0,C):null}function multiply(C,u,h){var g=u[0],S=u[1],v=u[2],w=u[3],I=u[4],_=u[5],P=u[6],L=u[7],d=u[8],k=u[9],e=u[10],N=u[11],B=u[12],Q=u[13],i0=u[14],j=u[15],H=h[0],y=h[1],Y=h[2],G=h[3];return C[0]=H*g+y*I+Y*d+G*B,C[1]=H*S+y*_+Y*k+G*Q,C[2]=H*v+y*P+Y*e+G*i0,C[3]=H*w+y*L+Y*N+G*j,H=h[4],y=h[5],Y=h[6],G=h[7],C[4]=H*g+y*I+Y*d+G*B,C[5]=H*S+y*_+Y*k+G*Q,C[6]=H*v+y*P+Y*e+G*i0,C[7]=H*w+y*L+Y*N+G*j,H=h[8],y=h[9],Y=h[10],G=h[11],C[8]=H*g+y*I+Y*d+G*B,C[9]=H*S+y*_+Y*k+G*Q,C[10]=H*v+y*P+Y*e+G*i0,C[11]=H*w+y*L+Y*N+G*j,H=h[12],y=h[13],Y=h[14],G=h[15],C[12]=H*g+y*I+Y*d+G*B,C[13]=H*S+y*_+Y*k+G*Q,C[14]=H*v+y*P+Y*e+G*i0,C[15]=H*w+y*L+Y*N+G*j,C}function translate(C,u,h){var g=h[0],S=h[1],v=h[2],w,I,_,P,L,d,k,e,N,B,Q,i0;return u===C?(C[12]=u[0]*g+u[4]*S+u[8]*v+u[12],C[13]=u[1]*g+u[5]*S+u[9]*v+u[13],C[14]=u[2]*g+u[6]*S+u[10]*v+u[14],C[15]=u[3]*g+u[7]*S+u[11]*v+u[15]):(w=u[0],I=u[1],_=u[2],P=u[3],L=u[4],d=u[5],k=u[6],e=u[7],N=u[8],B=u[9],Q=u[10],i0=u[11],C[0]=w,C[1]=I,C[2]=_,C[3]=P,C[4]=L,C[5]=d,C[6]=k,C[7]=e,C[8]=N,C[9]=B,C[10]=Q,C[11]=i0,C[12]=w*g+L*S+N*v+u[12],C[13]=I*g+d*S+B*v+u[13],C[14]=_*g+k*S+Q*v+u[14],C[15]=P*g+e*S+i0*v+u[15]),C}function scale$3(C,u,h){var g=h[0],S=h[1],v=h[2];return C[0]=u[0]*g,C[1]=u[1]*g,C[2]=u[2]*g,C[3]=u[3]*g,C[4]=u[4]*S,C[5]=u[5]*S,C[6]=u[6]*S,C[7]=u[7]*S,C[8]=u[8]*v,C[9]=u[9]*v,C[10]=u[10]*v,C[11]=u[11]*v,C[12]=u[12],C[13]=u[13],C[14]=u[14],C[15]=u[15],C}function rotateX(C,u,h){var g=Math.sin(h),S=Math.cos(h),v=u[4],w=u[5],I=u[6],_=u[7],P=u[8],L=u[9],d=u[10],k=u[11];return u!==C&&(C[0]=u[0],C[1]=u[1],C[2]=u[2],C[3]=u[3],C[12]=u[12],C[13]=u[13],C[14]=u[14],C[15]=u[15]),C[4]=v*S+P*g,C[5]=w*S+L*g,C[6]=I*S+d*g,C[7]=_*S+k*g,C[8]=P*S-v*g,C[9]=L*S-w*g,C[10]=d*S-I*g,C[11]=k*S-_*g,C}function rotateZ(C,u,h){var g=Math.sin(h),S=Math.cos(h),v=u[0],w=u[1],I=u[2],_=u[3],P=u[4],L=u[5],d=u[6],k=u[7];return u!==C&&(C[8]=u[8],C[9]=u[9],C[10]=u[10],C[11]=u[11],C[12]=u[12],C[13]=u[13],C[14]=u[14],C[15]=u[15]),C[0]=v*S+P*g,C[1]=w*S+L*g,C[2]=I*S+d*g,C[3]=_*S+k*g,C[4]=P*S-v*g,C[5]=L*S-w*g,C[6]=d*S-I*g,C[7]=k*S-_*g,C}function fromRotation(C,u,h){var g=h[0],S=h[1],v=h[2],w=Math.hypot(g,S,v),I,_,P;return w0&&(v=1/Math.sqrt(v)),C[0]=u[0]*v,C[1]=u[1]*v,C[2]=u[2]*v,C}function dot(C,u){return C[0]*u[0]+C[1]*u[1]+C[2]*u[2]}function cross(C,u,h){var g=u[0],S=u[1],v=u[2],w=h[0],I=h[1],_=h[2];return C[0]=S*_-v*I,C[1]=v*w-g*_,C[2]=g*I-S*w,C}function lerp(C,u,h,g){var S=u[0],v=u[1],w=u[2];return C[0]=S+g*(h[0]-S),C[1]=v+g*(h[1]-v),C[2]=w+g*(h[2]-w),C}function transformMat3(C,u,h){var g=u[0],S=u[1],v=u[2];return C[0]=g*h[0]+S*h[3]+v*h[6],C[1]=g*h[1]+S*h[4]+v*h[7],C[2]=g*h[2]+S*h[5]+v*h[8],C}function angle(C,u){var h=C[0],g=C[1],S=C[2],v=u[0],w=u[1],I=u[2],_=Math.sqrt(h*h+g*g+S*S),P=Math.sqrt(v*v+w*w+I*I),L=_*P,d=L&&dot(C,u)/L;return Math.acos(Math.min(Math.max(d,-1),1))}var sub$1=subtract$1,len=length$1;(function(){var C=create$2();return function(u,h,g,S,v,w){var I,_;for(h||(h=3),g||(g=0),S?_=Math.min(S*h+g,u.length):_=u.length,I=g;I<_;I+=h)C[0]=u[I],C[1]=u[I+1],C[2]=u[I+2],v(C,C,w),u[I]=C[0],u[I+1]=C[1],u[I+2]=C[2];return u}})();function create$1(){var C=new ARRAY_TYPE(4);return ARRAY_TYPE!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0,C[3]=0),C}function clone(C){var u=new ARRAY_TYPE(4);return u[0]=C[0],u[1]=C[1],u[2]=C[2],u[3]=C[3],u}function fromValues$1(C,u,h,g){var S=new ARRAY_TYPE(4);return S[0]=C,S[1]=u,S[2]=h,S[3]=g,S}function add(C,u,h){return C[0]=u[0]+h[0],C[1]=u[1]+h[1],C[2]=u[2]+h[2],C[3]=u[3]+h[3],C}function subtract(C,u,h){return C[0]=u[0]-h[0],C[1]=u[1]-h[1],C[2]=u[2]-h[2],C[3]=u[3]-h[3],C}function scale$1(C,u,h){return C[0]=u[0]*h,C[1]=u[1]*h,C[2]=u[2]*h,C[3]=u[3]*h,C}function transformMat4(C,u,h){var g=u[0],S=u[1],v=u[2],w=u[3];return C[0]=h[0]*g+h[4]*S+h[8]*v+h[12]*w,C[1]=h[1]*g+h[5]*S+h[9]*v+h[13]*w,C[2]=h[2]*g+h[6]*S+h[10]*v+h[14]*w,C[3]=h[3]*g+h[7]*S+h[11]*v+h[15]*w,C}var sub=subtract;(function(){var C=create$1();return function(u,h,g,S,v,w){var I,_;for(h||(h=4),g||(g=0),S?_=Math.min(S*h+g,u.length):_=u.length,I=g;I<_;I+=h)C[0]=u[I],C[1]=u[I+1],C[2]=u[I+2],C[3]=u[I+3],v(C,C,w),u[I]=C[0],u[I+1]=C[1],u[I+2]=C[2],u[I+3]=C[3];return u}})();function create(){var C=new ARRAY_TYPE(2);return ARRAY_TYPE!=Float32Array&&(C[0]=0,C[1]=0),C}function fromValues(C,u){var h=new ARRAY_TYPE(2);return h[0]=C,h[1]=u,h}function scale(C,u,h){return C[0]=u[0]*h,C[1]=u[1]*h,C}function length(C){var u=C[0],h=C[1];return Math.hypot(u,h)}function normalize(C,u){var h=u[0],g=u[1],S=h*h+g*g;return S>0&&(S=1/Math.sqrt(S)),C[0]=u[0]*S,C[1]=u[1]*S,C}(function(){var C=create();return function(u,h,g,S,v,w){var I,_;for(h||(h=2),g||(g=0),S?_=Math.min(S*h+g,u.length):_=u.length,I=g;I<_;I+=h)C[0]=u[I],C[1]=u[I+1],v(C,C,w),u[I]=C[0],u[I+1]=C[1];return u}})();var IDX=256,HEX=[],BUFFER;for(;IDX--;)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var C=0,u,h="";if(!BUFFER||IDX+16>256){for(BUFFER=Array(C=256);C--;)BUFFER[C]=256*Math.random()|0;C=IDX=0}for(;C<16;C++)u=BUFFER[IDX+C],C==6?h+=HEX[u&15|64]:C==8?h+=HEX[u&63|128]:h+=HEX[u],C&1&&C>1&&C<11&&(h+="-");return IDX++,h}var ch2$1={},wk=function(C,u,h,g,S){var v=new Worker(ch2$1[u]||(ch2$1[u]=URL.createObjectURL(new Blob([C+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return v.onmessage=function(w){var I=w.data,_=I.$e$;if(_){var P=new Error(_[0]);P.code=_[1],P.stack=_[2],S(P,null)}else S(null,I)},v.postMessage(h,g),v},u8$1=Uint8Array,u16$1=Uint16Array,i32$1=Int32Array,fleb$1=new u8$1([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,0,0,0]),fdeb$1=new u8$1([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,0,0]),clim$1=new u8$1([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb$1=function(C,u){for(var h=new u16$1(31),g=0;g<31;++g)h[g]=u+=1<>1|(i$1&21845)<<1;x$1=(x$1&52428)>>2|(x$1&13107)<<2,x$1=(x$1&61680)>>4|(x$1&3855)<<4,rev$1[i$1]=((x$1&65280)>>8|(x$1&255)<<8)>>1}var hMap$1=function(C,u,h){for(var g=C.length,S=0,v=new u16$1(u);S>_]=P}else for(I=new u16$1(g),S=0;S>15-C[S]);return I},flt$1=new u8$1(288);for(var i$1=0;i$1<144;++i$1)flt$1[i$1]=8;for(var i$1=144;i$1<256;++i$1)flt$1[i$1]=9;for(var i$1=256;i$1<280;++i$1)flt$1[i$1]=7;for(var i$1=280;i$1<288;++i$1)flt$1[i$1]=8;var fdt$1=new u8$1(32);for(var i$1=0;i$1<32;++i$1)fdt$1[i$1]=5;var flm$1=hMap$1(flt$1,9,0),flrm$1=hMap$1(flt$1,9,1),fdm$1=hMap$1(fdt$1,5,0),fdrm$1=hMap$1(fdt$1,5,1),max$1=function(C){for(var u=C[0],h=1;hu&&(u=C[h]);return u},bits$1=function(C,u,h){var g=u/8|0;return(C[g]|C[g+1]<<8)>>(u&7)&h},bits16$1=function(C,u){var h=u/8|0;return(C[h]|C[h+1]<<8|C[h+2]<<16)>>(u&7)},shft$1=function(C){return(C+7)/8|0},slc$1=function(C,u,h){return(u==null||u<0)&&(u=0),(h==null||h>C.length)&&(h=C.length),new u8$1(C.subarray(u,h))},ec$1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err$1=function(C,u,h){var g=new Error(u||ec$1[C]);if(g.code=C,Error.captureStackTrace&&Error.captureStackTrace(g,err$1),!h)throw g;return g},inflt$1=function(C,u,h,g){var S=C.length,v=g?g.length:0;if(!S||u.f&&!u.l)return h||new u8$1(0);var w=!h,I=w||u.i!=2,_=u.i;w&&(h=new u8$1(S*3));var P=function(qe){var be=h.length;if(qe>be){var J0=new u8$1(Math.max(be*2,qe));J0.set(h),h=J0}},L=u.f||0,d=u.p||0,k=u.b||0,e=u.l,N=u.d,B=u.m,Q=u.n,i0=S*8;do{if(!e){L=bits$1(C,d,1);var j=bits$1(C,d+1,3);if(d+=3,j)if(j==1)e=flrm$1,N=fdrm$1,B=9,Q=5;else if(j==2){var G=bits$1(C,d,31)+257,Z=bits$1(C,d+10,15)+4,e0=G+bits$1(C,d+5,31)+1;d+=14;for(var z=new u8$1(e0),f=new u8$1(19),f0=0;f0>4;if(H<16)z[f0++]=H;else{var g0=0,x0=0;for(H==16?(x0=3+bits$1(C,d,3),d+=2,g0=z[f0-1]):H==17?(x0=3+bits$1(C,d,7),d+=3):H==18&&(x0=11+bits$1(C,d,127),d+=7);x0--;)z[f0++]=g0}}var T0=z.subarray(0,G),M0=z.subarray(G);B=max$1(T0),Q=max$1(M0),e=hMap$1(T0,B,1),N=hMap$1(M0,Q,1)}else err$1(1);else{var H=shft$1(d)+4,y=C[H-4]|C[H-3]<<8,Y=H+y;if(Y>S){_&&err$1(0);break}I&&P(k+y),h.set(C.subarray(H,Y),k),u.b=k+=y,u.p=d=Y*8,u.f=L;continue}if(d>i0){_&&err$1(0);break}}I&&P(k+131072);for(var ee=(1<>4;if(d+=g0&15,d>i0){_&&err$1(0);break}if(g0||err$1(2),Oe<256)h[k++]=Oe;else if(Oe==256){Fe=d,e=null;break}else{var ke=Oe-254;if(Oe>264){var f0=Oe-257,D0=fleb$1[f0];ke=bits$1(C,d,(1<>4;Ve||err$1(3),d+=Ve&15;var M0=fd$1[Ge];if(Ge>3){var D0=fdeb$1[Ge];M0+=bits16$1(C,d)&(1<i0){_&&err$1(0);break}I&&P(k+131072);var ti=k+ke;if(k>8},wbits16$1=function(C,u,h){h<<=u&7;var g=u/8|0;C[g]|=h,C[g+1]|=h>>8,C[g+2]|=h>>16},hTree$1=function(C,u){for(var h=[],g=0;gk&&(k=v[g].s);var e=new u16$1(k+1),N=ln$1(h[L-1],e,0);if(N>u){var g=0,B=0,Q=N-u,i0=1<u)B+=i0-(1<>=Q;B>0;){var H=v[g].s;e[H]=0&&B;--g){var y=v[g].s;e[y]==u&&(--e[y],++B)}N=u}return{t:new u8$1(e),l:N}},ln$1=function(C,u,h){return C.s==-1?Math.max(ln$1(C.l,u,h+1),ln$1(C.r,u,h+1)):u[C.s]=h},lc$1=function(C){for(var u=C.length;u&&!C[--u];);for(var h=new u16$1(++u),g=0,S=C[0],v=1,w=function(_){h[g++]=_},I=1;I<=u;++I)if(C[I]==S&&I!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=C[I]}return{c:h.subarray(0,g),n:u}},clen$1=function(C,u){for(var h=0,g=0;g>8,C[S+2]=C[S]^255,C[S+3]=C[S+1]^255;for(var v=0;v4&&!f[clim$1[o0-1]];--o0);var c0=P+5<<3,m0=clen$1(S,flt$1)+clen$1(v,fdt$1)+w,v0=clen$1(S,k)+clen$1(v,B)+w+14+3*o0+clen$1(Z,f)+2*Z[16]+3*Z[17]+7*Z[18];if(_>=0&&c0<=m0&&c0<=v0)return wfblk$1(u,L,C.subarray(_,_+P));var g0,x0,T0,M0;if(wbits$1(u,L,1+(v015&&(wbits$1(u,L,Oe[e0]>>5&127),L+=Oe[e0]>>12)}}else g0=flm$1,x0=flt$1,T0=fdm$1,M0=fdt$1;for(var e0=0;e0255){var ke=D0>>18&31;wbits16$1(u,L,g0[ke+257]),L+=x0[ke+257],ke>7&&(wbits$1(u,L,D0>>23&31),L+=fleb$1[ke]);var Ve=D0&31;wbits16$1(u,L,T0[Ve]),L+=M0[Ve],Ve>3&&(wbits16$1(u,L,D0>>5&8191),L+=fdeb$1[Ve])}else wbits16$1(u,L,g0[D0]),L+=x0[D0]}return wbits16$1(u,L,g0[256]),L+x0[256]},deo$1=new i32$1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et$1=new u8$1(0),dflt$1=function(C,u,h,g,S,v){var w=v.z||C.length,I=new u8$1(g+w+5*(1+Math.ceil(w/7e3))+S),_=I.subarray(g,I.length-S),P=v.l,L=(v.r||0)&7;if(u){L&&(_[0]=v.r>>3);for(var d=deo$1[u-1],k=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(g0>423||!P)){L=wblk$1(C,_,0,y,Y,G,e0,f,o0,z-o0,L),f=Z=e0=0,o0=z;for(var x0=0;x0<286;++x0)Y[x0]=0;for(var x0=0;x0<30;++x0)G[x0]=0}var T0=2,M0=0,ee=e,re=m0-v0&32767;if(g0>2&&c0==H(z-re))for(var Fe=Math.min(k,g0)-1,Oe=Math.min(32767,z),ke=Math.min(258,g0);re<=Oe&&--ee&&m0!=v0;){if(C[z+T0]==C[z+T0-re]){for(var D0=0;D0T0){if(T0=D0,M0=re,D0>Fe)break;for(var Ve=Math.min(re,D0-2),Ge=0,x0=0;x0Ge&&(Ge=ri,v0=ti)}}}m0=v0,v0=B[m0],re+=m0-v0&32767}if(M0){y[f++]=268435456|revfl$1[T0]<<18|revfd$1[M0];var qe=revfl$1[T0]&31,be=revfd$1[M0]&31;e0+=fleb$1[qe]+fdeb$1[be],++Y[257+qe],++G[be],f0=z+T0,++Z}else y[f++]=C[z],++Y[C[z]]}}for(z=Math.max(z,f0);z=w&&(_[L/8|0]=P,J0=w),L=wfblk$1(_,L+1,C.subarray(z,J0))}v.i=w}return slc$1(I,0,g+shft$1(L)+S)},crct$1=function(){for(var C=new Int32Array(256),u=0;u<256;++u){for(var h=u,g=9;--g;)h=(h&1&&-306674912)^h>>>1;C[u]=h}return C}(),crc$1=function(){var C=-1;return{p:function(u){for(var h=C,g=0;g>>8;C=h},d:function(){return~C}}},dopt$1=function(C,u,h,g,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8$1(v.length+C.length);w.set(v),w.set(C,v.length),C=w,S.w=v.length}return dflt$1(C,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(C.length)))*1.5):20:12+u.mem,h,g,S)},mrg$1=function(C,u){var h={};for(var g in C)h[g]=C[g];for(var g in u)h[g]=u[g];return h},wcln$1=function(C,u,h){for(var g=C(),S=C.toString(),v=S.slice(S.indexOf("[")+1,S.lastIndexOf("]")).replace(/\s+/g,"").split(","),w=0;w>>0},b8$1=function(C,u){return b4$1(C,u)+b4$1(C,u+4)*4294967296},wbytes$1=function(C,u,h){for(;h;++u)C[u]=h,h>>>=8},gzh$1=function(C,u){var h=u.filename;if(C[0]=31,C[1]=139,C[2]=8,C[8]=u.level<2?4:u.level==9?2:0,C[9]=3,u.mtime!=0&&wbytes$1(C,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),h){C[3]=8;for(var g=0;g<=h.length;++g)C[g+10]=h.charCodeAt(g)}},gzs$1=function(C){(C[0]!=31||C[1]!=139||C[2]!=8)&&err$1(6,"invalid gzip data");var u=C[3],h=10;u&4&&(h+=(C[10]|C[11]<<8)+2);for(var g=(u>>3&1)+(u>>4&1);g>0;g-=!C[h++]);return h+(u&2)},gzl$1=function(C){var u=C.length;return(C[u-4]|C[u-3]<<8|C[u-2]<<16|C[u-1]<<24)>>>0},gzhl$1=function(C){return 10+(C.filename?C.filename.length+1:0)},zls$1=function(C,u){return((C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31)&&err$1(6,"invalid zlib data"),(C[1]>>5&1)==+!u&&err$1(6,"invalid zlib data: "+(C[1]&32?"need":"unexpected")+" dictionary"),(C[1]>>3&4)+2};function StrmOpt$1(C,u){return typeof C=="function"&&(u=C,C={}),this.ondata=u,C}function deflateSync$1(C,u){return dopt$1(C,u||{},0,0)}var Inflate$1=function(){function C(u,h){typeof u=="function"&&(h=u,u={}),this.ondata=h;var g=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:g?g.length:0},this.o=new u8$1(32768),this.p=new u8$1(0),g&&this.o.set(g)}return C.prototype.e=function(u){if(this.ondata||err$1(5),this.d&&err$1(4),!this.p.length)this.p=u;else if(u.length){var h=new u8$1(this.p.length+u.length);h.set(this.p),h.set(u,this.p.length),this.p=h}},C.prototype.c=function(u){this.s.i=+(this.d=u||!1);var h=this.s.b,g=inflt$1(this.p,this.s,this.o);this.ondata(slc$1(g,h,this.s.b),this.d),this.o=slc$1(g,this.s.b-32768),this.s.b=this.o.length,this.p=slc$1(this.p,this.s.p/8|0),this.s.p&=7},C.prototype.push=function(u,h){this.e(u),this.c(h)},C}();function inflate$3(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err$1(7),cbify$1(C,u,[bInflt$1],function(g){return pbf$1(inflateSync$1(g.data[0],gopt$1(g.data[1])))},1,h)}function inflateSync$1(C,u){return inflt$1(C,{i:2},u&&u.out,u&&u.dictionary)}function gzip$1(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err$1(7),cbify$1(C,u,[bDflt$1,gze$1,function(){return[gzipSync$1]}],function(g){return pbf$1(gzipSync$1(g.data[0],g.data[1]))},2,h)}function gzipSync$1(C,u){u||(u={});var h=crc$1(),g=C.length;h.p(C);var S=dopt$1(C,u,gzhl$1(u),8),v=S.length;return gzh$1(S,u),wbytes$1(S,v-8,h.d()),wbytes$1(S,v-4,g),S}var Gunzip$1=function(){function C(u,h){this.v=1,this.r=0,Inflate$1.call(this,u,h)}return C.prototype.push=function(u,h){if(Inflate$1.prototype.e.call(this,u),this.r+=u.length,this.v){var g=this.p.subarray(this.v-1),S=g.length>3?gzs$1(g):4;if(S>g.length){if(!h)return}else this.v>1&&this.onmember&&this.onmember(this.r-g.length);this.p=g.subarray(S),this.v=0}Inflate$1.prototype.c.call(this,h),this.s.f&&!this.s.l&&!h&&(this.v=shft$1(this.s.p)+9,this.s={i:0},this.o=new u8$1(0),this.push(new u8$1(0),h))},C}();function gunzip$1(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err$1(7),cbify$1(C,u,[bInflt$1,guze$1,function(){return[gunzipSync$1]}],function(g){return pbf$1(gunzipSync$1(g.data[0],g.data[1]))},3,h)}function gunzipSync$1(C,u){var h=gzs$1(C);return h+8>C.length&&err$1(6,"invalid gzip data"),inflt$1(C.subarray(h,-8),{i:2},u&&u.out||new u8$1(gzl$1(C)),u&&u.dictionary)}var Unzlib$1=function(){function C(u,h){Inflate$1.call(this,u,h),this.v=u&&u.dictionary?2:1}return C.prototype.push=function(u,h){if(Inflate$1.prototype.e.call(this,u),this.v){if(this.p.length<6&&!h)return;this.p=this.p.subarray(zls$1(this.p,this.v-1)),this.v=0}h&&(this.p.length<4&&err$1(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate$1.prototype.c.call(this,h)},C}();function unzlib$1(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err$1(7),cbify$1(C,u,[bInflt$1,zule$1,function(){return[unzlibSync$1]}],function(g){return pbf$1(unzlibSync$1(g.data[0],gopt$1(g.data[1])))},5,h)}function unzlibSync$1(C,u){return inflt$1(C.subarray(zls$1(C,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}var Decompress$1=function(){function C(u,h){this.o=StrmOpt$1.call(this,u,h)||{},this.G=Gunzip$1,this.I=Inflate$1,this.Z=Unzlib$1}return C.prototype.i=function(){var u=this;this.s.ondata=function(h,g){u.ondata(h,g)}},C.prototype.push=function(u,h){if(this.ondata||err$1(5),this.s)this.s.push(u,h);else{if(this.p&&this.p.length){var g=new u8$1(this.p.length+u.length);g.set(this.p),g.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,h),this.p=null)}},C}();function decompress$1(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err$1(7),C[0]==31&&C[1]==139&&C[2]==8?gunzip$1(C,u,h):(C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31?inflate$3(C,u,h):unzlib$1(C,u,h)}function decompressSync$1(C,u){return C[0]==31&&C[1]==139&&C[2]==8?gunzipSync$1(C,u):(C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31?inflateSync$1(C,u):unzlibSync$1(C,u)}var te$1=typeof TextEncoder<"u"&&new TextEncoder,td$1=typeof TextDecoder<"u"&&new TextDecoder,tds$1=0;try{td$1.decode(et$1,{stream:!0}),tds$1=1}catch{}var dutf8$1=function(C){for(var u="",h=0;;){var g=C[h++],S=(g>127)+(g>223)+(g>239);if(h+S>C.length)return{s:u,r:slc$1(C,h-1)};S?S==3?(g=((g&15)<<18|(C[h++]&63)<<12|(C[h++]&63)<<6|C[h++]&63)-65536,u+=String.fromCharCode(55296|g>>10,56320|g&1023)):S&1?u+=String.fromCharCode((g&31)<<6|C[h++]&63):u+=String.fromCharCode((g&15)<<12|(C[h++]&63)<<6|C[h++]&63):u+=String.fromCharCode(g)}};function strToU8$1(C,u){var h;if(te$1)return te$1.encode(C);for(var g=C.length,S=new u8$1(C.length+(C.length>>1)),v=0,w=function(P){S[v++]=P},h=0;hS.length){var I=new u8$1(v+8+(g-h<<1));I.set(S),S=I}var _=C.charCodeAt(h);_<128||u?w(_):_<2048?(w(192|_>>6),w(128|_&63)):_>55295&&_<57344?(_=65536+(_&1047552)|C.charCodeAt(++h)&1023,w(240|_>>18),w(128|_>>12&63),w(128|_>>6&63),w(128|_&63)):(w(224|_>>12),w(128|_>>6&63),w(128|_&63))}return slc$1(S,0,v)}function strFromU8$1(C,u){if(u){for(var h="",g=0;g65558)&&err$1(13);var S=b2$1(C,g+8);if(!S)return{};var v=b4$1(C,g+16),w=v==4294967295||S==65535;if(w){var I=b4$1(C,g-12);w=b4$1(C,I)==101075792,w&&(S=b4$1(C,I+32),v=b4$1(C,I+48))}for(var _=u&&u.filter,P=0;P{const h=(S,v)=>(C.set(v,S),S),g=S=>{if(C.has(S))return C.get(S);const[v,w]=u[S];switch(v){case PRIMITIVE:case VOID:return h(w,S);case ARRAY:{const I=h([],S);for(const _ of w)I.push(g(_));return I}case OBJECT:{const I=h({},S);for(const[_,P]of w)I[g(_)]=g(P);return I}case DATE:return h(new Date(w),S);case REGEXP:{const{source:I,flags:_}=w;return h(new RegExp(I,_),S)}case MAP:{const I=h(new Map,S);for(const[_,P]of w)I.set(g(_),g(P));return I}case SET:{const I=h(new Set,S);for(const _ of w)I.add(g(_));return I}case ERROR:{const{name:I,message:_}=w;return h(new env[I](_),S)}case BIGINT:return h(BigInt(w),S);case"BigInt":return h(Object(BigInt(w)),S)}return h(new env[v](w),S)};return g},deserialize=C=>deserializer(new Map,C)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=C=>{const u=typeof C;if(u!=="object"||!C)return[PRIMITIVE,u];const h=toString.call(C).slice(8,-1);switch(h){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY]}return h.includes("Array")?[ARRAY,h]:h.includes("Error")?[ERROR,h]:[OBJECT,h]},shouldSkip=([C,u])=>C===PRIMITIVE&&(u==="function"||u==="symbol"),serializer=(C,u,h,g)=>{const S=(w,I)=>{const _=g.push(w)-1;return h.set(I,_),_},v=w=>{if(h.has(w))return h.get(w);let[I,_]=typeOf(w);switch(I){case PRIMITIVE:{let L=w;switch(_){case"bigint":I=BIGINT,L=w.toString();break;case"function":case"symbol":if(C)throw new TypeError("unable to serialize "+_);L=null;break;case"undefined":return S([VOID],w)}return S([I,L],w)}case ARRAY:{if(_)return S([_,[...w]],w);const L=[],d=S([I,L],w);for(const k of w)L.push(v(k));return d}case OBJECT:{if(_)switch(_){case"BigInt":return S([_,w.toString()],w);case"Boolean":case"Number":case"String":return S([_,w.valueOf()],w)}if(u&&"toJSON"in w)return v(w.toJSON());const L=[],d=S([I,L],w);for(const k of keys(w))(C||!shouldSkip(typeOf(w[k])))&&L.push([v(k),v(w[k])]);return d}case DATE:return S([I,w.toISOString()],w);case REGEXP:{const{source:L,flags:d}=w;return S([I,{source:L,flags:d}],w)}case MAP:{const L=[],d=S([I,L],w);for(const[k,e]of w)(C||!(shouldSkip(typeOf(k))||shouldSkip(typeOf(e))))&&L.push([v(k),v(e)]);return d}case SET:{const L=[],d=S([I,L],w);for(const k of w)(C||!shouldSkip(typeOf(k)))&&L.push(v(k));return d}}const{message:P}=w;return S([I,{name:_,message:P}],w)};return v},serialize=(C,{json:u,lossy:h}={})=>{const g=[];return serializer(!(u||h),!!u,new Map,g)(C),g};var nifti={},browser={},ch2={},node_worker_1={};node_worker_1.default=function(C,u,h,g,S){var v=new Worker(ch2[u]||(ch2[u]=URL.createObjectURL(new Blob([C+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return v.onmessage=function(w){var I=w.data,_=I.$e$;if(_){var P=new Error(_[0]);P.code=_[1],P.stack=_[2],S(P,null)}else S(null,I)},v.postMessage(h,g),v};var u8=Uint8Array,u16=Uint16Array,i32=Int32Array,fleb=new u8([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,0,0,0]),fdeb=new u8([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,0,0]),clim=new u8([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb=function(C,u){for(var h=new u16(31),g=0;g<31;++g)h[g]=u+=1<>1|(i&21845)<<1;x=(x&52428)>>2|(x&13107)<<2,x=(x&61680)>>4|(x&3855)<<4,rev[i]=((x&65280)>>8|(x&255)<<8)>>1}var hMap=function(C,u,h){for(var g=C.length,S=0,v=new u16(u);S>_]=P}else for(I=new u16(g),S=0;S>15-C[S]);return I},flt=new u8(288);for(var i=0;i<144;++i)flt[i]=8;for(var i=144;i<256;++i)flt[i]=9;for(var i=256;i<280;++i)flt[i]=7;for(var i=280;i<288;++i)flt[i]=8;var fdt=new u8(32);for(var i=0;i<32;++i)fdt[i]=5;var flm=hMap(flt,9,0),flrm=hMap(flt,9,1),fdm=hMap(fdt,5,0),fdrm=hMap(fdt,5,1),max=function(C){for(var u=C[0],h=1;hu&&(u=C[h]);return u},bits=function(C,u,h){var g=u/8|0;return(C[g]|C[g+1]<<8)>>(u&7)&h},bits16=function(C,u){var h=u/8|0;return(C[h]|C[h+1]<<8|C[h+2]<<16)>>(u&7)},shft=function(C){return(C+7)/8|0},slc=function(C,u,h){return(u==null||u<0)&&(u=0),(h==null||h>C.length)&&(h=C.length),new u8(C.subarray(u,h))};browser.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(C,u,h){var g=new Error(u||ec[C]);if(g.code=C,Error.captureStackTrace&&Error.captureStackTrace(g,err),!h)throw g;return g},inflt=function(C,u,h,g){var S=C.length,v=g?g.length:0;if(!S||u.f&&!u.l)return h||new u8(0);var w=!h,I=w||u.i!=2,_=u.i;w&&(h=new u8(S*3));var P=function(qe){var be=h.length;if(qe>be){var J0=new u8(Math.max(be*2,qe));J0.set(h),h=J0}},L=u.f||0,d=u.p||0,k=u.b||0,e=u.l,N=u.d,B=u.m,Q=u.n,i0=S*8;do{if(!e){L=bits(C,d,1);var j=bits(C,d+1,3);if(d+=3,j)if(j==1)e=flrm,N=fdrm,B=9,Q=5;else if(j==2){var G=bits(C,d,31)+257,Z=bits(C,d+10,15)+4,e0=G+bits(C,d+5,31)+1;d+=14;for(var z=new u8(e0),f=new u8(19),f0=0;f0>4;if(H<16)z[f0++]=H;else{var g0=0,x0=0;for(H==16?(x0=3+bits(C,d,3),d+=2,g0=z[f0-1]):H==17?(x0=3+bits(C,d,7),d+=3):H==18&&(x0=11+bits(C,d,127),d+=7);x0--;)z[f0++]=g0}}var T0=z.subarray(0,G),M0=z.subarray(G);B=max(T0),Q=max(M0),e=hMap(T0,B,1),N=hMap(M0,Q,1)}else err(1);else{var H=shft(d)+4,y=C[H-4]|C[H-3]<<8,Y=H+y;if(Y>S){_&&err(0);break}I&&P(k+y),h.set(C.subarray(H,Y),k),u.b=k+=y,u.p=d=Y*8,u.f=L;continue}if(d>i0){_&&err(0);break}}I&&P(k+131072);for(var ee=(1<>4;if(d+=g0&15,d>i0){_&&err(0);break}if(g0||err(2),Oe<256)h[k++]=Oe;else if(Oe==256){Fe=d,e=null;break}else{var ke=Oe-254;if(Oe>264){var f0=Oe-257,D0=fleb[f0];ke=bits(C,d,(1<>4;Ve||err(3),d+=Ve&15;var M0=fd[Ge];if(Ge>3){var D0=fdeb[Ge];M0+=bits16(C,d)&(1<i0){_&&err(0);break}I&&P(k+131072);var ti=k+ke;if(k>8},wbits16=function(C,u,h){h<<=u&7;var g=u/8|0;C[g]|=h,C[g+1]|=h>>8,C[g+2]|=h>>16},hTree=function(C,u){for(var h=[],g=0;gk&&(k=v[g].s);var e=new u16(k+1),N=ln(h[L-1],e,0);if(N>u){var g=0,B=0,Q=N-u,i0=1<u)B+=i0-(1<>=Q;B>0;){var H=v[g].s;e[H]=0&&B;--g){var y=v[g].s;e[y]==u&&(--e[y],++B)}N=u}return{t:new u8(e),l:N}},ln=function(C,u,h){return C.s==-1?Math.max(ln(C.l,u,h+1),ln(C.r,u,h+1)):u[C.s]=h},lc=function(C){for(var u=C.length;u&&!C[--u];);for(var h=new u16(++u),g=0,S=C[0],v=1,w=function(_){h[g++]=_},I=1;I<=u;++I)if(C[I]==S&&I!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=C[I]}return{c:h.subarray(0,g),n:u}},clen=function(C,u){for(var h=0,g=0;g>8,C[S+2]=C[S]^255,C[S+3]=C[S+1]^255;for(var v=0;v4&&!f[clim[o0-1]];--o0);var c0=P+5<<3,m0=clen(S,flt)+clen(v,fdt)+w,v0=clen(S,k)+clen(v,B)+w+14+3*o0+clen(Z,f)+2*Z[16]+3*Z[17]+7*Z[18];if(_>=0&&c0<=m0&&c0<=v0)return wfblk(u,L,C.subarray(_,_+P));var g0,x0,T0,M0;if(wbits(u,L,1+(v015&&(wbits(u,L,Oe[e0]>>5&127),L+=Oe[e0]>>12)}}else g0=flm,x0=flt,T0=fdm,M0=fdt;for(var e0=0;e0255){var ke=D0>>18&31;wbits16(u,L,g0[ke+257]),L+=x0[ke+257],ke>7&&(wbits(u,L,D0>>23&31),L+=fleb[ke]);var Ve=D0&31;wbits16(u,L,T0[Ve]),L+=M0[Ve],Ve>3&&(wbits16(u,L,D0>>5&8191),L+=fdeb[Ve])}else wbits16(u,L,g0[D0]),L+=x0[D0]}return wbits16(u,L,g0[256]),L+x0[256]},deo=new i32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et=new u8(0),dflt=function(C,u,h,g,S,v){var w=v.z||C.length,I=new u8(g+w+5*(1+Math.ceil(w/7e3))+S),_=I.subarray(g,I.length-S),P=v.l,L=(v.r||0)&7;if(u){L&&(_[0]=v.r>>3);for(var d=deo[u-1],k=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(g0>423||!P)){L=wblk(C,_,0,y,Y,G,e0,f,o0,z-o0,L),f=Z=e0=0,o0=z;for(var x0=0;x0<286;++x0)Y[x0]=0;for(var x0=0;x0<30;++x0)G[x0]=0}var T0=2,M0=0,ee=e,re=m0-v0&32767;if(g0>2&&c0==H(z-re))for(var Fe=Math.min(k,g0)-1,Oe=Math.min(32767,z),ke=Math.min(258,g0);re<=Oe&&--ee&&m0!=v0;){if(C[z+T0]==C[z+T0-re]){for(var D0=0;D0T0){if(T0=D0,M0=re,D0>Fe)break;for(var Ve=Math.min(re,D0-2),Ge=0,x0=0;x0Ge&&(Ge=ri,v0=ti)}}}m0=v0,v0=B[m0],re+=m0-v0&32767}if(M0){y[f++]=268435456|revfl[T0]<<18|revfd[M0];var qe=revfl[T0]&31,be=revfd[M0]&31;e0+=fleb[qe]+fdeb[be],++Y[257+qe],++G[be],f0=z+T0,++Z}else y[f++]=C[z],++Y[C[z]]}}for(z=Math.max(z,f0);z=w&&(_[L/8|0]=P,J0=w),L=wfblk(_,L+1,C.subarray(z,J0))}v.i=w}return slc(I,0,g+shft(L)+S)},crct=function(){for(var C=new Int32Array(256),u=0;u<256;++u){for(var h=u,g=9;--g;)h=(h&1&&-306674912)^h>>>1;C[u]=h}return C}(),crc=function(){var C=-1;return{p:function(u){for(var h=C,g=0;g>>8;C=h},d:function(){return~C}}},adler=function(){var C=1,u=0;return{p:function(h){for(var g=C,S=u,v=h.length|0,w=0;w!=v;){for(var I=Math.min(w+2655,v);w>16),S=(S&65535)+15*(S>>16)}C=g,u=S},d:function(){return C%=65521,u%=65521,(C&255)<<24|(C&65280)<<8|(u&255)<<8|u>>8}}},dopt=function(C,u,h,g,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8(v.length+C.length);w.set(v),w.set(C,v.length),C=w,S.w=v.length}return dflt(C,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(C.length)))*1.5):20:12+u.mem,h,g,S)},mrg=function(C,u){var h={};for(var g in C)h[g]=C[g];for(var g in u)h[g]=u[g];return h},wcln=function(C,u,h){for(var g=C(),S=C.toString(),v=S.slice(S.indexOf("[")+1,S.lastIndexOf("]")).replace(/\s+/g,"").split(","),w=0;w>>0},b8=function(C,u){return b4(C,u)+b4(C,u+4)*4294967296},wbytes=function(C,u,h){for(;h;++u)C[u]=h,h>>>=8},gzh=function(C,u){var h=u.filename;if(C[0]=31,C[1]=139,C[2]=8,C[8]=u.level<2?4:u.level==9?2:0,C[9]=3,u.mtime!=0&&wbytes(C,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),h){C[3]=8;for(var g=0;g<=h.length;++g)C[g+10]=h.charCodeAt(g)}},gzs=function(C){(C[0]!=31||C[1]!=139||C[2]!=8)&&err(6,"invalid gzip data");var u=C[3],h=10;u&4&&(h+=(C[10]|C[11]<<8)+2);for(var g=(u>>3&1)+(u>>4&1);g>0;g-=!C[h++]);return h+(u&2)},gzl=function(C){var u=C.length;return(C[u-4]|C[u-3]<<8|C[u-2]<<16|C[u-1]<<24)>>>0},gzhl=function(C){return 10+(C.filename?C.filename.length+1:0)},zlh=function(C,u){var h=u.level,g=h==0?0:h<6?1:h==9?3:2;if(C[0]=120,C[1]=g<<6|(u.dictionary&&32),C[1]|=31-(C[0]<<8|C[1])%31,u.dictionary){var S=adler();S.p(u.dictionary),wbytes(C,2,S.d())}},zls=function(C,u){return((C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31)&&err(6,"invalid zlib data"),(C[1]>>5&1)==+!u&&err(6,"invalid zlib data: "+(C[1]&32?"need":"unexpected")+" dictionary"),(C[1]>>3&4)+2};function StrmOpt(C,u){return typeof C=="function"&&(u=C,C={}),this.ondata=u,C}var Deflate=function(){function C(u,h){if(typeof u=="function"&&(h=u,u={}),this.ondata=h,this.o=u||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new u8(98304),this.o.dictionary){var g=this.o.dictionary.subarray(-32768);this.b.set(g,32768-g.length),this.s.i=32768-g.length}}return C.prototype.p=function(u,h){this.ondata(dopt(u,this.o,0,0,this.s),h)},C.prototype.push=function(u,h){this.ondata||err(5),this.s.l&&err(4);var g=u.length+this.s.z;if(g>this.b.length){if(g>2*this.b.length-32768){var S=new u8(g&-32768);S.set(this.b.subarray(0,this.s.z)),this.b=S}var v=this.b.length-this.s.z;this.b.set(u.subarray(0,v),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(u.subarray(v),32768),this.s.z=u.length-v+32768,this.s.i=32766,this.s.w=32768}else this.b.set(u,this.s.z),this.s.z+=u.length;this.s.l=h&1,(this.s.z>this.s.w+8191||h)&&(this.p(this.b,h||!1),this.s.w=this.s.i,this.s.i-=2)},C.prototype.flush=function(){this.ondata||err(5),this.s.l&&err(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},C}();browser.Deflate=Deflate;var AsyncDeflate=function(){function C(u,h){astrmify([bDflt,function(){return[astrm,Deflate]}],this,StrmOpt.call(this,u,h),function(g){var S=new Deflate(g.data);onmessage=astrm(S)},6,1)}return C}();browser.AsyncDeflate=AsyncDeflate;function deflate$2(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bDflt],function(g){return pbf(deflateSync(g.data[0],g.data[1]))},0,h)}browser.deflate=deflate$2;function deflateSync(C,u){return dopt(C,u||{},0,0)}browser.deflateSync=deflateSync;var Inflate=function(){function C(u,h){typeof u=="function"&&(h=u,u={}),this.ondata=h;var g=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:g?g.length:0},this.o=new u8(32768),this.p=new u8(0),g&&this.o.set(g)}return C.prototype.e=function(u){if(this.ondata||err(5),this.d&&err(4),!this.p.length)this.p=u;else if(u.length){var h=new u8(this.p.length+u.length);h.set(this.p),h.set(u,this.p.length),this.p=h}},C.prototype.c=function(u){this.s.i=+(this.d=u||!1);var h=this.s.b,g=inflt(this.p,this.s,this.o);this.ondata(slc(g,h,this.s.b),this.d),this.o=slc(g,this.s.b-32768),this.s.b=this.o.length,this.p=slc(this.p,this.s.p/8|0),this.s.p&=7},C.prototype.push=function(u,h){this.e(u),this.c(h)},C}();browser.Inflate=Inflate;var AsyncInflate=function(){function C(u,h){astrmify([bInflt,function(){return[astrm,Inflate]}],this,StrmOpt.call(this,u,h),function(g){var S=new Inflate(g.data);onmessage=astrm(S)},7,0)}return C}();browser.AsyncInflate=AsyncInflate;function inflate$2(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bInflt],function(g){return pbf(inflateSync(g.data[0],gopt(g.data[1])))},1,h)}browser.inflate=inflate$2;function inflateSync(C,u){return inflt(C,{i:2},u&&u.out,u&&u.dictionary)}browser.inflateSync=inflateSync;var Gzip=function(){function C(u,h){this.c=crc(),this.l=0,this.v=1,Deflate.call(this,u,h)}return C.prototype.push=function(u,h){this.c.p(u),this.l+=u.length,Deflate.prototype.push.call(this,u,h)},C.prototype.p=function(u,h){var g=dopt(u,this.o,this.v&&gzhl(this.o),h&&8,this.s);this.v&&(gzh(g,this.o),this.v=0),h&&(wbytes(g,g.length-8,this.c.d()),wbytes(g,g.length-4,this.l)),this.ondata(g,h)},C.prototype.flush=function(){Deflate.prototype.flush.call(this)},C}();browser.Gzip=Gzip;browser.Compress=Gzip;var AsyncGzip=function(){function C(u,h){astrmify([bDflt,gze,function(){return[astrm,Deflate,Gzip]}],this,StrmOpt.call(this,u,h),function(g){var S=new Gzip(g.data);onmessage=astrm(S)},8,1)}return C}();browser.AsyncGzip=AsyncGzip;browser.AsyncCompress=AsyncGzip;function gzip(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bDflt,gze,function(){return[gzipSync]}],function(g){return pbf(gzipSync(g.data[0],g.data[1]))},2,h)}browser.gzip=gzip;browser.compress=gzip;function gzipSync(C,u){u||(u={});var h=crc(),g=C.length;h.p(C);var S=dopt(C,u,gzhl(u),8),v=S.length;return gzh(S,u),wbytes(S,v-8,h.d()),wbytes(S,v-4,g),S}browser.gzipSync=gzipSync;browser.compressSync=gzipSync;var Gunzip=function(){function C(u,h){this.v=1,this.r=0,Inflate.call(this,u,h)}return C.prototype.push=function(u,h){if(Inflate.prototype.e.call(this,u),this.r+=u.length,this.v){var g=this.p.subarray(this.v-1),S=g.length>3?gzs(g):4;if(S>g.length){if(!h)return}else this.v>1&&this.onmember&&this.onmember(this.r-g.length);this.p=g.subarray(S),this.v=0}Inflate.prototype.c.call(this,h),this.s.f&&!this.s.l&&!h&&(this.v=shft(this.s.p)+9,this.s={i:0},this.o=new u8(0),this.push(new u8(0),h))},C}();browser.Gunzip=Gunzip;var AsyncGunzip=function(){function C(u,h){var g=this;astrmify([bInflt,guze,function(){return[astrm,Inflate,Gunzip]}],this,StrmOpt.call(this,u,h),function(S){var v=new Gunzip(S.data);v.onmember=function(w){return postMessage(w)},onmessage=astrm(v)},9,0,function(S){return g.onmember&&g.onmember(S)})}return C}();browser.AsyncGunzip=AsyncGunzip;function gunzip(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bInflt,guze,function(){return[gunzipSync]}],function(g){return pbf(gunzipSync(g.data[0],g.data[1]))},3,h)}browser.gunzip=gunzip;function gunzipSync(C,u){var h=gzs(C);return h+8>C.length&&err(6,"invalid gzip data"),inflt(C.subarray(h,-8),{i:2},u&&u.out||new u8(gzl(C)),u&&u.dictionary)}browser.gunzipSync=gunzipSync;var Zlib=function(){function C(u,h){this.c=adler(),this.v=1,Deflate.call(this,u,h)}return C.prototype.push=function(u,h){this.c.p(u),Deflate.prototype.push.call(this,u,h)},C.prototype.p=function(u,h){var g=dopt(u,this.o,this.v&&(this.o.dictionary?6:2),h&&4,this.s);this.v&&(zlh(g,this.o),this.v=0),h&&wbytes(g,g.length-4,this.c.d()),this.ondata(g,h)},C.prototype.flush=function(){Deflate.prototype.flush.call(this)},C}();browser.Zlib=Zlib;var AsyncZlib=function(){function C(u,h){astrmify([bDflt,zle,function(){return[astrm,Deflate,Zlib]}],this,StrmOpt.call(this,u,h),function(g){var S=new Zlib(g.data);onmessage=astrm(S)},10,1)}return C}();browser.AsyncZlib=AsyncZlib;function zlib(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bDflt,zle,function(){return[zlibSync]}],function(g){return pbf(zlibSync(g.data[0],g.data[1]))},4,h)}browser.zlib=zlib;function zlibSync(C,u){u||(u={});var h=adler();h.p(C);var g=dopt(C,u,u.dictionary?6:2,4);return zlh(g,u),wbytes(g,g.length-4,h.d()),g}browser.zlibSync=zlibSync;var Unzlib=function(){function C(u,h){Inflate.call(this,u,h),this.v=u&&u.dictionary?2:1}return C.prototype.push=function(u,h){if(Inflate.prototype.e.call(this,u),this.v){if(this.p.length<6&&!h)return;this.p=this.p.subarray(zls(this.p,this.v-1)),this.v=0}h&&(this.p.length<4&&err(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate.prototype.c.call(this,h)},C}();browser.Unzlib=Unzlib;var AsyncUnzlib=function(){function C(u,h){astrmify([bInflt,zule,function(){return[astrm,Inflate,Unzlib]}],this,StrmOpt.call(this,u,h),function(g){var S=new Unzlib(g.data);onmessage=astrm(S)},11,0)}return C}();browser.AsyncUnzlib=AsyncUnzlib;function unzlib(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),cbify(C,u,[bInflt,zule,function(){return[unzlibSync]}],function(g){return pbf(unzlibSync(g.data[0],gopt(g.data[1])))},5,h)}browser.unzlib=unzlib;function unzlibSync(C,u){return inflt(C.subarray(zls(C,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}browser.unzlibSync=unzlibSync;var Decompress=function(){function C(u,h){this.o=StrmOpt.call(this,u,h)||{},this.G=Gunzip,this.I=Inflate,this.Z=Unzlib}return C.prototype.i=function(){var u=this;this.s.ondata=function(h,g){u.ondata(h,g)}},C.prototype.push=function(u,h){if(this.ondata||err(5),this.s)this.s.push(u,h);else{if(this.p&&this.p.length){var g=new u8(this.p.length+u.length);g.set(this.p),g.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,h),this.p=null)}},C}();browser.Decompress=Decompress;var AsyncDecompress=function(){function C(u,h){Decompress.call(this,u,h),this.queuedSize=0,this.G=AsyncGunzip,this.I=AsyncInflate,this.Z=AsyncUnzlib}return C.prototype.i=function(){var u=this;this.s.ondata=function(h,g,S){u.ondata(h,g,S)},this.s.ondrain=function(h){u.queuedSize-=h,u.ondrain&&u.ondrain(h)}},C.prototype.push=function(u,h){this.queuedSize+=u.length,Decompress.prototype.push.call(this,u,h)},C}();browser.AsyncDecompress=AsyncDecompress;function decompress(C,u,h){return h||(h=u,u={}),typeof h!="function"&&err(7),C[0]==31&&C[1]==139&&C[2]==8?gunzip(C,u,h):(C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31?inflate$2(C,u,h):unzlib(C,u,h)}browser.decompress=decompress;function decompressSync(C,u){return C[0]==31&&C[1]==139&&C[2]==8?gunzipSync(C,u):(C[0]&15)!=8||C[0]>>4>7||(C[0]<<8|C[1])%31?inflateSync(C,u):unzlibSync(C,u)}browser.decompressSync=decompressSync;var fltn=function(C,u,h,g){for(var S in C){var v=C[S],w=u+S,I=g;Array.isArray(v)&&(I=mrg(g,v[1]),v=v[0]),v instanceof u8?h[w]=[v,I]:(h[w+="/"]=[new u8(0),I],fltn(v,w,h,g))}},te=typeof TextEncoder<"u"&&new TextEncoder,td=typeof TextDecoder<"u"&&new TextDecoder,tds=0;try{td.decode(et,{stream:!0}),tds=1}catch{}var dutf8=function(C){for(var u="",h=0;;){var g=C[h++],S=(g>127)+(g>223)+(g>239);if(h+S>C.length)return{s:u,r:slc(C,h-1)};S?S==3?(g=((g&15)<<18|(C[h++]&63)<<12|(C[h++]&63)<<6|C[h++]&63)-65536,u+=String.fromCharCode(55296|g>>10,56320|g&1023)):S&1?u+=String.fromCharCode((g&31)<<6|C[h++]&63):u+=String.fromCharCode((g&15)<<12|(C[h++]&63)<<6|C[h++]&63):u+=String.fromCharCode(g)}},DecodeUTF8=function(){function C(u){this.ondata=u,tds?this.t=new TextDecoder:this.p=et}return C.prototype.push=function(u,h){if(this.ondata||err(5),h=!!h,this.t){this.ondata(this.t.decode(u,{stream:!0}),h),h&&(this.t.decode().length&&err(8),this.t=null);return}this.p||err(4);var g=new u8(this.p.length+u.length);g.set(this.p),g.set(u,this.p.length);var S=dutf8(g),v=S.s,w=S.r;h?(w.length&&err(8),this.p=null):this.p=w,this.ondata(v,h)},C}();browser.DecodeUTF8=DecodeUTF8;var EncodeUTF8=function(){function C(u){this.ondata=u}return C.prototype.push=function(u,h){this.ondata||err(5),this.d&&err(4),this.ondata(strToU8(u),this.d=h||!1)},C}();browser.EncodeUTF8=EncodeUTF8;function strToU8(C,u){if(u){for(var h=new u8(C.length),g=0;g>1)),w=0,I=function(L){v[w++]=L},g=0;gv.length){var _=new u8(w+8+(S-g<<1));_.set(v),v=_}var P=C.charCodeAt(g);P<128||u?I(P):P<2048?(I(192|P>>6),I(128|P&63)):P>55295&&P<57344?(P=65536+(P&1047552)|C.charCodeAt(++g)&1023,I(240|P>>18),I(128|P>>12&63),I(128|P>>6&63),I(128|P&63)):(I(224|P>>12),I(128|P>>6&63),I(128|P&63))}return slc(v,0,w)}browser.strToU8=strToU8;function strFromU8(C,u){if(u){for(var h="",g=0;g65535&&err(9),u+=g+4}return u},wzh=function(C,u,h,g,S,v,w,I){var _=g.length,P=h.extra,L=I&&I.length,d=exfl(P);wbytes(C,u,w!=null?33639248:67324752),u+=4,w!=null&&(C[u++]=20,C[u++]=h.os),C[u]=20,u+=2,C[u++]=h.flag<<1|(v<0&&8),C[u++]=S&&8,C[u++]=h.compression&255,C[u++]=h.compression>>8;var k=new Date(h.mtime==null?Date.now():h.mtime),e=k.getFullYear()-1980;if((e<0||e>119)&&err(10),wbytes(C,u,e<<25|k.getMonth()+1<<21|k.getDate()<<16|k.getHours()<<11|k.getMinutes()<<5|k.getSeconds()>>1),u+=4,v!=-1&&(wbytes(C,u,h.crc),wbytes(C,u+4,v<0?-v-2:v),wbytes(C,u+8,h.size)),wbytes(C,u+12,_),wbytes(C,u+14,d),u+=16,w!=null&&(wbytes(C,u,L),wbytes(C,u+6,h.attrs),wbytes(C,u+10,w),u+=14),C.set(g,u),u+=_,d)for(var N in P){var B=P[N],Q=B.length;wbytes(C,u,+N),wbytes(C,u+2,Q),C.set(B,u+4),u+=4+Q}return L&&(C.set(I,u),u+=L),u},wzf=function(C,u,h,g,S){wbytes(C,u,101010256),wbytes(C,u+8,h),wbytes(C,u+10,h),wbytes(C,u+12,g),wbytes(C,u+16,S)},ZipPassThrough=function(){function C(u){this.filename=u,this.c=crc(),this.size=0,this.compression=0}return C.prototype.process=function(u,h){this.ondata(null,u,h)},C.prototype.push=function(u,h){this.ondata||err(5),this.c.p(u),this.size+=u.length,h&&(this.crc=this.c.d()),this.process(u,h||!1)},C}();browser.ZipPassThrough=ZipPassThrough;var ZipDeflate=function(){function C(u,h){var g=this;h||(h={}),ZipPassThrough.call(this,u),this.d=new Deflate(h,function(S,v){g.ondata(null,S,v)}),this.compression=8,this.flag=dbf(h.level)}return C.prototype.process=function(u,h){try{this.d.push(u,h)}catch(g){this.ondata(g,null,h)}},C.prototype.push=function(u,h){ZipPassThrough.prototype.push.call(this,u,h)},C}();browser.ZipDeflate=ZipDeflate;var AsyncZipDeflate=function(){function C(u,h){var g=this;h||(h={}),ZipPassThrough.call(this,u),this.d=new AsyncDeflate(h,function(S,v,w){g.ondata(S,v,w)}),this.compression=8,this.flag=dbf(h.level),this.terminate=this.d.terminate}return C.prototype.process=function(u,h){this.d.push(u,h)},C.prototype.push=function(u,h){ZipPassThrough.prototype.push.call(this,u,h)},C}();browser.AsyncZipDeflate=AsyncZipDeflate;var Zip=function(){function C(u){this.ondata=u,this.u=[],this.d=1}return C.prototype.add=function(u){var h=this;if(this.ondata||err(5),this.d&2)this.ondata(err(4+(this.d&1)*8,0,1),null,!1);else{var g=strToU8(u.filename),S=g.length,v=u.comment,w=v&&strToU8(v),I=S!=u.filename.length||w&&v.length!=w.length,_=S+exfl(u.extra)+30;S>65535&&this.ondata(err(11,0,1),null,!1);var P=new u8(_);wzh(P,0,u,g,I,-1);var L=[P],d=function(){for(var Q=0,i0=L;Q65535&&m0(err(11,0,1),null),!c0)m0(null,H);else if(G<16e4)try{m0(null,deflateSync(H,y))}catch(v0){m0(v0,null)}else L.push(deflate$2(H,y,m0))},B=0;B<_;++B)N(B);return d}browser.zip=zip;function zipSync(C,u){u||(u={});var h={},g=[];fltn(C,"",h,u);var S=0,v=0;for(var w in h){var I=h[w],_=I[0],P=I[1],L=P.level==0?0:8,d=strToU8(w),k=d.length,e=P.comment,N=e&&strToU8(e),B=N&&N.length,Q=exfl(P.extra);k>65535&&err(11);var i0=L?deflateSync(_,P):_,j=i0.length,H=crc();H.p(_),g.push(mrg(P,{size:_.length,crc:H.d(),c:i0,f:d,m:N,u:k!=w.length||N&&e.length!=B,o:S,compression:L})),S+=30+k+Q+j,v+=76+2*(k+Q)+(B||0)+j}for(var y=new u8(v+22),Y=S,G=v-S,Z=0;Z0){var S=Math.min(this.c,u.length),v=u.subarray(0,S);if(this.c-=S,this.d?this.d.push(v,!this.c):this.k[0].push(v),u=u.subarray(S),u.length)return this.push(u,h)}else{var w=0,I=0,_=void 0,P=void 0;this.p.length?u.length?(P=new u8(this.p.length+u.length),P.set(this.p),P.set(u,this.p.length)):P=this.p:P=u;for(var L=P.length,d=this.c,k=d&&this.d,e=function(){var i0,j=b4(P,I);if(j==67324752){w=1,_=I,N.d=null,N.c=0;var H=b2(P,I+6),y=b2(P,I+8),Y=H&2048,G=H&8,Z=b2(P,I+26),e0=b2(P,I+28);if(L>I+30+Z+e0){var z=[];N.k.unshift(z),w=2;var f=b4(P,I+18),f0=b4(P,I+22),o0=strFromU8(P.subarray(I+30,I+=30+Z),!Y);f==4294967295?(i0=G?[-2]:z64e(P,I),f=i0[0],f0=i0[1]):G&&(f=-1),I+=e0,N.c=f;var c0,m0={name:o0,compression:y,start:function(){if(m0.ondata||err(5),!f)m0.ondata(null,et,!0);else{var v0=g.o[y];v0||m0.ondata(err(14,"unknown compression type "+y,1),null,!1),c0=f<0?new v0(o0):new v0(o0,f,f0),c0.ondata=function(M0,ee,re){m0.ondata(M0,ee,re)};for(var g0=0,x0=z;g0=0&&(m0.size=f,m0.originalSize=f0),N.onfile(m0)}return"break"}else if(d){if(j==134695760)return _=I+=12+(d==-2&&8),w=3,N.c=0,"break";if(j==33639248)return _=I-=4,w=3,N.c=0,"break"}},N=this;I65558)return w(err(13,0,1),null),S;var _=b2(C,I+8);if(_){var P=_,L=b4(C,I+16),d=L==4294967295||P==65535;if(d){var k=b4(C,I-12);d=b4(C,k)==101075792,d&&(P=_=b4(C,k+32),L=b4(C,k+48))}for(var e=u&&u.filter,N=function(Q){var i0=zh(C,L,d),j=i0[0],H=i0[1],y=i0[2],Y=i0[3],G=i0[4],Z=i0[5],e0=slzh(C,Z);L=G;var z=function(f0,o0){f0?(S(),w(f0,null)):(o0&&(v[Y]=o0),--_||w(null,v))};if(!e||e({name:Y,size:H,originalSize:y,compression:j}))if(!j)z(null,slc(C,e0,e0+H));else if(j==8){var f=C.subarray(e0,e0+H);if(y<524288||H>.8*y)try{z(null,inflateSync(f,{out:new u8(y)}))}catch(f0){z(f0,null)}else g.push(inflate$2(f,{size:y},z))}else z(err(14,"unknown compression type "+j,1),null);else z(null,null)},B=0;B65558)&&err(13);var S=b2(C,g+8);if(!S)return{};var v=b4(C,g+16),w=v==4294967295||S==65535;if(w){var I=b4(C,g-12);w=b4(C,I)==101075792,w&&(S=b4(C,I+32),v=b4(C,I+48))}for(var _=u&&u.filter,P=0;P=0;S--)w=w*256+v[S];return w}static getExtensionsAt(u,h,g,S){let v=[],w=h;for(;wS&&(I=!I,_=Ki.getIntAt(u,w,I),_+w>S))throw new Error("This does not appear to be a valid NIFTI extension");if(_%16!=0)throw new Error("This does not appear to be a NIFTI extension");let P=Ki.getIntAt(u,w+4,I),L=u.buffer.slice(w+8,w+_);console.log("extensionByteIndex: "+(w+8)+" esize: "+_),console.log(L);let d=new nifti_extension_1.NIFTIEXTENSION(_,P,L,I);v.push(d),w+=_}return v}static toArrayBuffer(u){var h,g,S;for(h=new ArrayBuffer(u.length),g=new Uint8Array(h),S=0;S>>1:u>>>1;h[g]=u}return h}static crc32(u){Ki.crcTable||(Ki.crcTable=Ki.makeCRCTable());const h=Ki.crcTable;let g=-1;for(var S=0;S>>8^h[(g^u.getUint8(S))&255];return(g^-1)>>>0}};$0(Ki,"crcTable",null),$0(Ki,"GUNZIP_MAGIC_COOKIE1",31),$0(Ki,"GUNZIP_MAGIC_COOKIE2",139),$0(Ki,"getByteAt",function(u,h){return u.getInt8(h)}),$0(Ki,"getShortAt",function(u,h,g){return u.getInt16(h,g)});let Utils=Ki;utilities$1.Utils=Utils;Object.defineProperty(nifti1,"__esModule",{value:!0});nifti1.NIFTI1=void 0;const utilities_1$1=utilities$1,Ue=class Ue{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_a",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"qfac",1);$0(this,"quatern_R");$0(this,"magic","0");$0(this,"isHDR",!1);$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"extensions",[]);$0(this,"getDatatypeCodeString",function(u){return u===Ue.TYPE_UINT8?"1-Byte Unsigned Integer":u===Ue.TYPE_INT16?"2-Byte Signed Integer":u===Ue.TYPE_INT32?"4-Byte Signed Integer":u===Ue.TYPE_FLOAT32?"4-Byte Float":u===Ue.TYPE_FLOAT64?"8-Byte Float":u===Ue.TYPE_RGB24?"RGB":u===Ue.TYPE_INT8?"1-Byte Signed Integer":u===Ue.TYPE_UINT16?"2-Byte Unsigned Integer":u===Ue.TYPE_UINT32?"4-Byte Unsigned Integer":u===Ue.TYPE_INT64?"8-Byte Signed Integer":u===Ue.TYPE_UINT64?"8-Byte Unsigned Integer":"Unknown"});$0(this,"getTransformCodeString",function(u){return u===Ue.XFORM_SCANNER_ANAT?"Scanner":u===Ue.XFORM_ALIGNED_ANAT?"Aligned":u===Ue.XFORM_TALAIRACH?"Talairach":u===Ue.XFORM_MNI_152?"MNI":"Unknown"});$0(this,"getUnitsCodeString",function(u){return u===Ue.UNITS_METER?"Meters":u===Ue.UNITS_MM?"Millimeters":u===Ue.UNITS_MICRON?"Microns":u===Ue.UNITS_SEC?"Seconds":u===Ue.UNITS_MSEC?"Milliseconds":u===Ue.UNITS_USEC?"Microseconds":u===Ue.UNITS_HZ?"Hz":u===Ue.UNITS_PPM?"PPM":u===Ue.UNITS_RADS?"Rads":"Unknown"});$0(this,"nifti_mat33_mul",function(u,h){var g=[[0,0,0],[0,0,0],[0,0,0]],S,v;for(S=0;S<3;S+=1)for(v=0;v<3;v+=1)g[S][v]=u[S][0]*h[0][v]+u[S][1]*h[1][v]+u[S][2]*h[2][v];return g});$0(this,"nifti_mat33_determ",function(u){var h,g,S,v,w,I,_,P,L;return h=u[0][0],g=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],I=u[1][2],_=u[2][0],P=u[2][1],L=u[2][2],h*w*L-h*P*I-v*g*L+v*P*S+_*g*I-_*w*S})}readHeader(u){var h=new DataView(u),g=utilities_1$1.Utils.getIntAt(h,0,this.littleEndian),S,v,w,I;if(g!==Ue.MAGIC_COOKIE&&(this.littleEndian=!0,g=utilities_1$1.Utils.getIntAt(h,0,this.littleEndian)),g!==Ue.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.dim_info=utilities_1$1.Utils.getByteAt(h,39),S=0;S<8;S+=1)I=40+S*2,this.dims[S]=utilities_1$1.Utils.getShortAt(h,I,this.littleEndian);for(this.intent_p1=utilities_1$1.Utils.getFloatAt(h,56,this.littleEndian),this.intent_p2=utilities_1$1.Utils.getFloatAt(h,60,this.littleEndian),this.intent_p3=utilities_1$1.Utils.getFloatAt(h,64,this.littleEndian),this.intent_code=utilities_1$1.Utils.getShortAt(h,68,this.littleEndian),this.datatypeCode=utilities_1$1.Utils.getShortAt(h,70,this.littleEndian),this.numBitsPerVoxel=utilities_1$1.Utils.getShortAt(h,72,this.littleEndian),this.slice_start=utilities_1$1.Utils.getShortAt(h,74,this.littleEndian),S=0;S<8;S+=1)I=76+S*4,this.pixDims[S]=utilities_1$1.Utils.getFloatAt(h,I,this.littleEndian);if(this.vox_offset=utilities_1$1.Utils.getFloatAt(h,108,this.littleEndian),this.scl_slope=utilities_1$1.Utils.getFloatAt(h,112,this.littleEndian),this.scl_inter=utilities_1$1.Utils.getFloatAt(h,116,this.littleEndian),this.slice_end=utilities_1$1.Utils.getShortAt(h,120,this.littleEndian),this.slice_code=utilities_1$1.Utils.getByteAt(h,122),this.xyzt_units=utilities_1$1.Utils.getByteAt(h,123),this.cal_max=utilities_1$1.Utils.getFloatAt(h,124,this.littleEndian),this.cal_min=utilities_1$1.Utils.getFloatAt(h,128,this.littleEndian),this.slice_duration=utilities_1$1.Utils.getFloatAt(h,132,this.littleEndian),this.toffset=utilities_1$1.Utils.getFloatAt(h,136,this.littleEndian),this.description=utilities_1$1.Utils.getStringAt(h,148,228),this.aux_file=utilities_1$1.Utils.getStringAt(h,228,252),this.qform_code=utilities_1$1.Utils.getShortAt(h,252,this.littleEndian),this.sform_code=utilities_1$1.Utils.getShortAt(h,254,this.littleEndian),this.quatern_b=utilities_1$1.Utils.getFloatAt(h,256,this.littleEndian),this.quatern_c=utilities_1$1.Utils.getFloatAt(h,260,this.littleEndian),this.quatern_d=utilities_1$1.Utils.getFloatAt(h,264,this.littleEndian),this.quatern_a=Math.sqrt(1-(Math.pow(this.quatern_b,2)+Math.pow(this.quatern_c,2)+Math.pow(this.quatern_d,2))),this.qoffset_x=utilities_1$1.Utils.getFloatAt(h,268,this.littleEndian),this.qoffset_y=utilities_1$1.Utils.getFloatAt(h,272,this.littleEndian),this.qoffset_z=utilities_1$1.Utils.getFloatAt(h,276,this.littleEndian),this.qform_code<1&&this.sform_code<1&&(this.affine[0][0]=this.pixDims[1],this.affine[1][1]=this.pixDims[2],this.affine[2][2]=this.pixDims[3]),this.qform_code>0&&this.sform_code0)for(v=0;v<3;v+=1)for(w=0;w<4;w+=1)I=280+(v*4+w)*4,this.affine[v][w]=utilities_1$1.Utils.getFloatAt(h,I,this.littleEndian);if(this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.intent_name=utilities_1$1.Utils.getStringAt(h,328,344),this.magic=utilities_1$1.Utils.getStringAt(h,344,348),this.isHDR=this.magic===String.fromCharCode.apply(null,Ue.MAGIC_NUMBER2),h.byteLength>Ue.MAGIC_COOKIE){this.extensionFlag[0]=utilities_1$1.Utils.getByteAt(h,348),this.extensionFlag[1]=utilities_1$1.Utils.getByteAt(h,349),this.extensionFlag[2]=utilities_1$1.Utils.getByteAt(h,350),this.extensionFlag[3]=utilities_1$1.Utils.getByteAt(h,351);let _=!0;!this.isHDR&&this.vox_offset<=352&&(_=!1),h.byteLength<=368&&(_=!1),_&&this.extensionFlag[0]&&(this.extensions=utilities_1$1.Utils.getExtensionsAt(h,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode)}}toFormattedString(){var u=utilities_1$1.Utils.formatNumber,h="";return h+="Dim Info = "+this.dim_info+` +`,h+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+` +`,h+="Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+` +`,h+="Intent Code = "+this.intent_code+` +`,h+="Datatype = "+this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+`) +`,h+="Bits Per Voxel = "+this.numBitsPerVoxel+` +`,h+="Slice Start = "+this.slice_start+` +`,h+="Voxel Dimensions (1-8): "+u(this.pixDims[0])+", "+u(this.pixDims[1])+", "+u(this.pixDims[2])+", "+u(this.pixDims[3])+", "+u(this.pixDims[4])+", "+u(this.pixDims[5])+", "+u(this.pixDims[6])+", "+u(this.pixDims[7])+` +`,h+="Image Offset = "+this.vox_offset+` +`,h+="Data Scale: Slope = "+u(this.scl_slope)+" Intercept = "+u(this.scl_inter)+` +`,h+="Slice End = "+this.slice_end+` +`,h+="Slice Code = "+this.slice_code+` +`,h+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(Ue.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(Ue.TEMPORAL_UNITS_MASK&this.xyzt_units)+`) +`,h+="Display Range: Max = "+u(this.cal_max)+" Min = "+u(this.cal_min)+` +`,h+="Slice Duration = "+this.slice_duration+` +`,h+="Time Axis Shift = "+this.toffset+` +`,h+='Description: "'+this.description+`" +`,h+='Auxiliary File: "'+this.aux_file+`" +`,h+="Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code)+`) +`,h+="S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code)+`) +`,h+="Quaternion Parameters: b = "+u(this.quatern_b)+" c = "+u(this.quatern_c)+" d = "+u(this.quatern_d)+` +`,h+="Quaternion Offsets: x = "+this.qoffset_x+" y = "+this.qoffset_y+" z = "+this.qoffset_z+` +`,h+="S-Form Parameters X: "+u(this.affine[0][0])+", "+u(this.affine[0][1])+", "+u(this.affine[0][2])+", "+u(this.affine[0][3])+` +`,h+="S-Form Parameters Y: "+u(this.affine[1][0])+", "+u(this.affine[1][1])+", "+u(this.affine[1][2])+", "+u(this.affine[1][3])+` +`,h+="S-Form Parameters Z: "+u(this.affine[2][0])+", "+u(this.affine[2][1])+", "+u(this.affine[2][2])+", "+u(this.affine[2][3])+` +`,h+='Intent Name: "'+this.intent_name+`" +`,this.extensionFlag[0]&&(h+="Extension: Size = "+this.extensionSize+" Code = "+this.extensionCode+` +`),h}getQformMat(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])}convertNiftiQFormToNiftiSForm(u,h,g,S,v,w,I,_,P,L){var d=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],k,e=u,N=h,B=g,Q,i0,j;return d[3][0]=d[3][1]=d[3][2]=0,d[3][3]=1,k=1-(e*e+N*N+B*B),k<1e-7?(k=1/Math.sqrt(e*e+N*N+B*B),e*=k,N*=k,B*=k,k=0):k=Math.sqrt(k),Q=I>0?I:1,i0=_>0?_:1,j=P>0?P:1,L<0&&(j=-j),d[0][0]=(k*k+e*e-N*N-B*B)*Q,d[0][1]=2*(e*N-k*B)*i0,d[0][2]=2*(e*B+k*N)*j,d[1][0]=2*(e*N+k*B)*Q,d[1][1]=(k*k+N*N-e*e-B*B)*i0,d[1][2]=2*(N*B-k*e)*j,d[2][0]=2*(e*B-k*N)*Q,d[2][1]=2*(N*B+k*e)*i0,d[2][2]=(k*k+B*B-N*N-e*e)*j,d[0][3]=S,d[1][3]=v,d[2][3]=w,d}convertNiftiSFormToNEMA(u){var h,g,S,v,w,I,_,P,L,d,k,e,N,B,Q,i0,j,H,y,Y,G,Z,e0,z,f,f0,o0,c0,m0,v0,g0,x0,T0,M0;if(Q=0,o0=[[0,0,0],[0,0,0],[0,0,0]],c0=[[0,0,0],[0,0,0],[0,0,0]],h=u[0][0],g=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],I=u[1][2],_=u[2][0],P=u[2][1],L=u[2][2],d=Math.sqrt(h*h+v*v+_*_),d===0||(h/=d,v/=d,_/=d,d=Math.sqrt(g*g+w*w+P*P),d===0))return null;if(g/=d,w/=d,P/=d,d=h*g+v*w+_*P,Math.abs(d)>1e-4){if(g-=d*h,w-=d*v,P-=d*_,d=Math.sqrt(g*g+w*w+P*P),d===0)return null;g/=d,w/=d,P/=d}if(d=Math.sqrt(S*S+I*I+L*L),d===0?(S=v*P-_*w,I=_*g-P*h,L=h*w-v*g):(S/=d,I/=d,L/=d),d=h*S+v*I+_*L,Math.abs(d)>1e-4){if(S-=d*h,I-=d*v,L-=d*_,d=Math.sqrt(S*S+I*I+L*L),d===0)return null;S/=d,I/=d,L/=d}if(d=g*S+w*I+P*L,Math.abs(d)>1e-4){if(S-=d*g,I-=d*w,L-=d*P,d=Math.sqrt(S*S+I*I+L*L),d===0)return null;S/=d,I/=d,L/=d}if(o0[0][0]=h,o0[0][1]=g,o0[0][2]=S,o0[1][0]=v,o0[1][1]=w,o0[1][2]=I,o0[2][0]=_,o0[2][1]=P,o0[2][2]=L,k=this.nifti_mat33_determ(o0),k===0)return null;for(f0=-666,y=Z=e0=z=1,Y=2,G=3,N=1;N<=3;N+=1)for(B=1;B<=3;B+=1)if(N!==B){for(Q=1;Q<=3;Q+=1)if(!(N===Q||B===Q))for(c0[0][0]=c0[0][1]=c0[0][2]=c0[1][0]=c0[1][1]=c0[1][2]=c0[2][0]=c0[2][1]=c0[2][2]=0,i0=-1;i0<=1;i0+=2)for(j=-1;j<=1;j+=2)for(H=-1;H<=1;H+=2)c0[0][N-1]=i0,c0[1][B-1]=j,c0[2][Q-1]=H,e=this.nifti_mat33_determ(c0),e*k>0&&(f=this.nifti_mat33_mul(c0,o0),d=f[0][0]+f[1][1]+f[2][2],d>f0&&(f0=d,y=N,Y=B,G=Q,Z=i0,e0=j,z=H))}switch(m0=v0=g0=x0=T0=M0="",y*Z){case 1:m0="X",x0="+";break;case-1:m0="X",x0="-";break;case 2:m0="Y",x0="+";break;case-2:m0="Y",x0="-";break;case 3:m0="Z",x0="+";break;case-3:m0="Z",x0="-";break}switch(Y*e0){case 1:v0="X",T0="+";break;case-1:v0="X",T0="-";break;case 2:v0="Y",T0="+";break;case-2:v0="Y",T0="-";break;case 3:v0="Z",T0="+";break;case-3:v0="Z",T0="-";break}switch(G*z){case 1:g0="X",M0="+";break;case-1:g0="X",M0="-";break;case 2:g0="Y",M0="+";break;case-2:g0="Y",M0="-";break;case 3:g0="Z",M0="+";break;case-3:g0="Z",M0="-";break}return m0+v0+g0+x0+T0+M0}getExtensionLocation(){return Ue.MAGIC_COOKIE+4}getExtensionSize(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation(),this.littleEndian)}getExtensionCode(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation()+4,this.littleEndian)}addExtension(u,h=-1){h==-1?this.extensions.push(u):this.extensions.splice(h,0,u),this.vox_offset+=u.esize}removeExtension(u){let h=this.extensions[u];h&&(this.vox_offset-=h.esize),this.extensions.splice(u,1)}toArrayBuffer(u=!1){let S=352;if(u)for(let _ of this.extensions)S+=_.esize;let v=new Uint8Array(S),w=new DataView(v.buffer);w.setInt32(0,348,this.littleEndian),w.setUint8(39,this.dim_info);for(let _=0;_<8;_++)w.setUint16(40+2*_,this.dims[_],this.littleEndian);w.setFloat32(56,this.intent_p1,this.littleEndian),w.setFloat32(60,this.intent_p2,this.littleEndian),w.setFloat32(64,this.intent_p3,this.littleEndian),w.setInt16(68,this.intent_code,this.littleEndian),w.setInt16(70,this.datatypeCode,this.littleEndian),w.setInt16(72,this.numBitsPerVoxel,this.littleEndian),w.setInt16(74,this.slice_start,this.littleEndian);for(let _=0;_<8;_++)w.setFloat32(76+4*_,this.pixDims[_],this.littleEndian);w.setFloat32(108,this.vox_offset,this.littleEndian),w.setFloat32(112,this.scl_slope,this.littleEndian),w.setFloat32(116,this.scl_inter,this.littleEndian),w.setInt16(120,this.slice_end,this.littleEndian),w.setUint8(122,this.slice_code),w.setUint8(123,this.xyzt_units),w.setFloat32(124,this.cal_max,this.littleEndian),w.setFloat32(128,this.cal_min,this.littleEndian),w.setFloat32(132,this.slice_duration,this.littleEndian),w.setFloat32(136,this.toffset,this.littleEndian),v.set(Buffer.from(this.description),148),v.set(Buffer.from(this.aux_file),228),w.setInt16(252,this.qform_code,this.littleEndian),w.setInt16(254,this.sform_code,this.littleEndian),w.setFloat32(256,this.quatern_b,this.littleEndian),w.setFloat32(260,this.quatern_c,this.littleEndian),w.setFloat32(264,this.quatern_d,this.littleEndian),w.setFloat32(268,this.qoffset_x,this.littleEndian),w.setFloat32(272,this.qoffset_y,this.littleEndian),w.setFloat32(276,this.qoffset_z,this.littleEndian);const I=this.affine.flat();for(let _=0;_<12;_++)w.setFloat32(280+4*_,I[_],this.littleEndian);if(v.set(Buffer.from(this.intent_name),328),v.set(Buffer.from(this.magic),344),u){v.set(Uint8Array.from([1,0,0,0]),348);let _=this.getExtensionLocation();for(const P of this.extensions)w.setInt32(_,P.esize,P.littleEndian),w.setInt32(_+4,P.ecode,P.littleEndian),v.set(new Uint8Array(P.edata),_+8),_+=P.esize}else v.set(new Uint8Array(4).fill(0),348);return v.buffer}};$0(Ue,"TYPE_NONE",0),$0(Ue,"TYPE_BINARY",1),$0(Ue,"TYPE_UINT8",2),$0(Ue,"TYPE_INT16",4),$0(Ue,"TYPE_INT32",8),$0(Ue,"TYPE_FLOAT32",16),$0(Ue,"TYPE_COMPLEX64",32),$0(Ue,"TYPE_FLOAT64",64),$0(Ue,"TYPE_RGB24",128),$0(Ue,"TYPE_INT8",256),$0(Ue,"TYPE_UINT16",512),$0(Ue,"TYPE_UINT32",768),$0(Ue,"TYPE_INT64",1024),$0(Ue,"TYPE_UINT64",1280),$0(Ue,"TYPE_FLOAT128",1536),$0(Ue,"TYPE_COMPLEX128",1792),$0(Ue,"TYPE_COMPLEX256",2048),$0(Ue,"XFORM_UNKNOWN",0),$0(Ue,"XFORM_SCANNER_ANAT",1),$0(Ue,"XFORM_ALIGNED_ANAT",2),$0(Ue,"XFORM_TALAIRACH",3),$0(Ue,"XFORM_MNI_152",4),$0(Ue,"SPATIAL_UNITS_MASK",7),$0(Ue,"TEMPORAL_UNITS_MASK",56),$0(Ue,"UNITS_UNKNOWN",0),$0(Ue,"UNITS_METER",1),$0(Ue,"UNITS_MM",2),$0(Ue,"UNITS_MICRON",3),$0(Ue,"UNITS_SEC",8),$0(Ue,"UNITS_MSEC",16),$0(Ue,"UNITS_USEC",24),$0(Ue,"UNITS_HZ",32),$0(Ue,"UNITS_PPM",40),$0(Ue,"UNITS_RADS",48),$0(Ue,"MAGIC_COOKIE",348),$0(Ue,"STANDARD_HEADER_SIZE",348),$0(Ue,"MAGIC_NUMBER_LOCATION",344),$0(Ue,"MAGIC_NUMBER",[110,43,49]),$0(Ue,"MAGIC_NUMBER2",[110,105,49]),$0(Ue,"EXTENSION_HEADER_SIZE",8);let NIFTI1=Ue;nifti1.NIFTI1=NIFTI1;var nifti2={};Object.defineProperty(nifti2,"__esModule",{value:!0});nifti2.NIFTI2=void 0;const nifti1_1=nifti1,utilities_1=utilities$1,At=class At{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"magic","0");$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensions",[]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"getExtensionLocation",function(){return At.MAGIC_COOKIE+4});$0(this,"getExtensionSize",nifti1_1.NIFTI1.prototype.getExtensionSize);$0(this,"getExtensionCode",nifti1_1.NIFTI1.prototype.getExtensionCode);$0(this,"addExtension",nifti1_1.NIFTI1.prototype.addExtension);$0(this,"removeExtension",nifti1_1.NIFTI1.prototype.removeExtension);$0(this,"getDatatypeCodeString",nifti1_1.NIFTI1.prototype.getDatatypeCodeString);$0(this,"getTransformCodeString",nifti1_1.NIFTI1.prototype.getTransformCodeString);$0(this,"getUnitsCodeString",nifti1_1.NIFTI1.prototype.getUnitsCodeString);$0(this,"getQformMat",nifti1_1.NIFTI1.prototype.getQformMat);$0(this,"convertNiftiQFormToNiftiSForm",nifti1_1.NIFTI1.prototype.convertNiftiQFormToNiftiSForm);$0(this,"convertNiftiSFormToNEMA",nifti1_1.NIFTI1.prototype.convertNiftiSFormToNEMA);$0(this,"nifti_mat33_mul",nifti1_1.NIFTI1.prototype.nifti_mat33_mul);$0(this,"nifti_mat33_determ",nifti1_1.NIFTI1.prototype.nifti_mat33_determ)}readHeader(u){var h=new DataView(u),g=utilities_1.Utils.getIntAt(h,0,this.littleEndian),S,v,w,I;if(g!==At.MAGIC_COOKIE&&(this.littleEndian=!0,g=utilities_1.Utils.getIntAt(h,0,this.littleEndian)),g!==At.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.magic=utilities_1.Utils.getStringAt(h,4,12),this.datatypeCode=utilities_1.Utils.getShortAt(h,12,this.littleEndian),this.numBitsPerVoxel=utilities_1.Utils.getShortAt(h,14,this.littleEndian),S=0;S<8;S+=1)I=16+S*8,this.dims[S]=utilities_1.Utils.getLongAt(h,I,this.littleEndian);for(this.intent_p1=utilities_1.Utils.getDoubleAt(h,80,this.littleEndian),this.intent_p2=utilities_1.Utils.getDoubleAt(h,88,this.littleEndian),this.intent_p3=utilities_1.Utils.getDoubleAt(h,96,this.littleEndian),S=0;S<8;S+=1)I=104+S*8,this.pixDims[S]=utilities_1.Utils.getDoubleAt(h,I,this.littleEndian);for(this.vox_offset=utilities_1.Utils.getLongAt(h,168,this.littleEndian),this.scl_slope=utilities_1.Utils.getDoubleAt(h,176,this.littleEndian),this.scl_inter=utilities_1.Utils.getDoubleAt(h,184,this.littleEndian),this.cal_max=utilities_1.Utils.getDoubleAt(h,192,this.littleEndian),this.cal_min=utilities_1.Utils.getDoubleAt(h,200,this.littleEndian),this.slice_duration=utilities_1.Utils.getDoubleAt(h,208,this.littleEndian),this.toffset=utilities_1.Utils.getDoubleAt(h,216,this.littleEndian),this.slice_start=utilities_1.Utils.getLongAt(h,224,this.littleEndian),this.slice_end=utilities_1.Utils.getLongAt(h,232,this.littleEndian),this.description=utilities_1.Utils.getStringAt(h,240,320),this.aux_file=utilities_1.Utils.getStringAt(h,320,344),this.qform_code=utilities_1.Utils.getIntAt(h,344,this.littleEndian),this.sform_code=utilities_1.Utils.getIntAt(h,348,this.littleEndian),this.quatern_b=utilities_1.Utils.getDoubleAt(h,352,this.littleEndian),this.quatern_c=utilities_1.Utils.getDoubleAt(h,360,this.littleEndian),this.quatern_d=utilities_1.Utils.getDoubleAt(h,368,this.littleEndian),this.qoffset_x=utilities_1.Utils.getDoubleAt(h,376,this.littleEndian),this.qoffset_y=utilities_1.Utils.getDoubleAt(h,384,this.littleEndian),this.qoffset_z=utilities_1.Utils.getDoubleAt(h,392,this.littleEndian),v=0;v<3;v+=1)for(w=0;w<4;w+=1)I=400+(v*4+w)*8,this.affine[v][w]=utilities_1.Utils.getDoubleAt(h,I,this.littleEndian);this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.slice_code=utilities_1.Utils.getIntAt(h,496,this.littleEndian),this.xyzt_units=utilities_1.Utils.getIntAt(h,500,this.littleEndian),this.intent_code=utilities_1.Utils.getIntAt(h,504,this.littleEndian),this.intent_name=utilities_1.Utils.getStringAt(h,508,524),this.dim_info=utilities_1.Utils.getByteAt(h,524),h.byteLength>At.MAGIC_COOKIE&&(this.extensionFlag[0]=utilities_1.Utils.getByteAt(h,540),this.extensionFlag[1]=utilities_1.Utils.getByteAt(h,541),this.extensionFlag[2]=utilities_1.Utils.getByteAt(h,542),this.extensionFlag[3]=utilities_1.Utils.getByteAt(h,543),this.extensionFlag[0]&&(this.extensions=utilities_1.Utils.getExtensionsAt(h,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode))}toFormattedString(){var u=utilities_1.Utils.formatNumber,h="";return h+="Datatype = "+ +this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+`) +`,h+="Bits Per Voxel = = "+this.numBitsPerVoxel+` +`,h+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+` +`,h+="Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+` +`,h+="Voxel Dimensions (1-8): "+u(this.pixDims[0])+", "+u(this.pixDims[1])+", "+u(this.pixDims[2])+", "+u(this.pixDims[3])+", "+u(this.pixDims[4])+", "+u(this.pixDims[5])+", "+u(this.pixDims[6])+", "+u(this.pixDims[7])+` +`,h+="Image Offset = "+this.vox_offset+` +`,h+="Data Scale: Slope = "+u(this.scl_slope)+" Intercept = "+u(this.scl_inter)+` +`,h+="Display Range: Max = "+u(this.cal_max)+" Min = "+u(this.cal_min)+` +`,h+="Slice Duration = "+this.slice_duration+` +`,h+="Time Axis Shift = "+this.toffset+` +`,h+="Slice Start = "+this.slice_start+` +`,h+="Slice End = "+this.slice_end+` +`,h+='Description: "'+this.description+`" +`,h+='Auxiliary File: "'+this.aux_file+`" +`,h+="Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code)+`) +`,h+="S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code)+`) +`,h+="Quaternion Parameters: b = "+u(this.quatern_b)+" c = "+u(this.quatern_c)+" d = "+u(this.quatern_d)+` +`,h+="Quaternion Offsets: x = "+this.qoffset_x+" y = "+this.qoffset_y+" z = "+this.qoffset_z+` +`,h+="S-Form Parameters X: "+u(this.affine[0][0])+", "+u(this.affine[0][1])+", "+u(this.affine[0][2])+", "+u(this.affine[0][3])+` +`,h+="S-Form Parameters Y: "+u(this.affine[1][0])+", "+u(this.affine[1][1])+", "+u(this.affine[1][2])+", "+u(this.affine[1][3])+` +`,h+="S-Form Parameters Z: "+u(this.affine[2][0])+", "+u(this.affine[2][1])+", "+u(this.affine[2][2])+", "+u(this.affine[2][3])+` +`,h+="Slice Code = "+this.slice_code+` +`,h+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(nifti1_1.NIFTI1.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(nifti1_1.NIFTI1.TEMPORAL_UNITS_MASK&this.xyzt_units)+`) +`,h+="Intent Code = "+this.intent_code+` +`,h+='Intent Name: "'+this.intent_name+`" +`,h+="Dim Info = "+this.dim_info+` +`,h}toArrayBuffer(u=!1){let S=544;if(u)for(let _ of this.extensions)S+=_.esize;let v=new Uint8Array(S),w=new DataView(v.buffer);w.setInt32(0,540,this.littleEndian),v.set(Buffer.from(this.magic),4),w.setInt16(12,this.datatypeCode,this.littleEndian),w.setInt16(14,this.numBitsPerVoxel,this.littleEndian);for(let _=0;_<8;_++)w.setBigInt64(16+8*_,BigInt(this.dims[_]),this.littleEndian);w.setFloat64(80,this.intent_p1,this.littleEndian),w.setFloat64(88,this.intent_p2,this.littleEndian),w.setFloat64(96,this.intent_p3,this.littleEndian);for(let _=0;_<8;_++)w.setFloat64(104+8*_,this.pixDims[_],this.littleEndian);w.setBigInt64(168,BigInt(this.vox_offset),this.littleEndian),w.setFloat64(176,this.scl_slope,this.littleEndian),w.setFloat64(184,this.scl_inter,this.littleEndian),w.setFloat64(192,this.cal_max,this.littleEndian),w.setFloat64(200,this.cal_min,this.littleEndian),w.setFloat64(208,this.slice_duration,this.littleEndian),w.setFloat64(216,this.toffset,this.littleEndian),w.setBigInt64(224,BigInt(this.slice_start),this.littleEndian),w.setBigInt64(232,BigInt(this.slice_end),this.littleEndian),v.set(Buffer.from(this.description),240),v.set(Buffer.from(this.aux_file),320),w.setInt32(344,this.qform_code,this.littleEndian),w.setInt32(348,this.sform_code,this.littleEndian),w.setFloat64(352,this.quatern_b,this.littleEndian),w.setFloat64(360,this.quatern_c,this.littleEndian),w.setFloat64(368,this.quatern_d,this.littleEndian),w.setFloat64(376,this.qoffset_x,this.littleEndian),w.setFloat64(384,this.qoffset_y,this.littleEndian),w.setFloat64(392,this.qoffset_z,this.littleEndian);const I=this.affine.flat();for(let _=0;_<12;_++)w.setFloat64(400+8*_,I[_],this.littleEndian);if(w.setInt32(496,this.slice_code,this.littleEndian),w.setInt32(500,this.xyzt_units,this.littleEndian),w.setInt32(504,this.intent_code,this.littleEndian),v.set(Buffer.from(this.intent_name),508),w.setUint8(524,this.dim_info),u){v.set(Uint8Array.from([1,0,0,0]),540);let _=this.getExtensionLocation();for(const P of this.extensions)w.setInt32(_,P.esize,P.littleEndian),w.setInt32(_+4,P.ecode,P.littleEndian),v.set(new Uint8Array(P.edata),_+8),_+=P.esize}else v.set(new Uint8Array(4).fill(0),540);return v.buffer}};$0(At,"MAGIC_COOKIE",540),$0(At,"MAGIC_NUMBER_LOCATION",4),$0(At,"MAGIC_NUMBER",[110,43,50,0,13,10,26,10]),$0(At,"MAGIC_NUMBER2",[110,105,50,0,13,10,26,10]);let NIFTI2=At;nifti2.NIFTI2=NIFTI2;(function(C){var u=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(G,Z,e0,z){z===void 0&&(z=e0);var f=Object.getOwnPropertyDescriptor(Z,e0);(!f||("get"in f?!Z.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return Z[e0]}}),Object.defineProperty(G,z,f)}:function(G,Z,e0,z){z===void 0&&(z=e0),G[z]=Z[e0]}),h=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(G,Z){Object.defineProperty(G,"default",{enumerable:!0,value:Z})}:function(G,Z){G.default=Z}),g=commonjsGlobal&&commonjsGlobal.__importStar||function(G){if(G&&G.__esModule)return G;var Z={};if(G!=null)for(var e0 in G)e0!=="default"&&Object.prototype.hasOwnProperty.call(G,e0)&&u(Z,G,e0);return h(Z,G),Z};Object.defineProperty(C,"__esModule",{value:!0}),C.readExtensionData=C.readExtension=C.readImage=C.hasExtension=C.readHeader=C.decompress=C.isCompressed=C.isNIFTI=C.isNIFTI2=C.isNIFTI1=C.NIFTIEXTENSION=C.Utils=C.NIFTI2=C.NIFTI1=void 0;const S=g(browser),v=nifti1,w=nifti2,I=utilities$1;var _=nifti1;Object.defineProperty(C,"NIFTI1",{enumerable:!0,get:function(){return _.NIFTI1}});var P=nifti2;Object.defineProperty(C,"NIFTI2",{enumerable:!0,get:function(){return P.NIFTI2}});var L=utilities$1;Object.defineProperty(C,"Utils",{enumerable:!0,get:function(){return L.Utils}});var d=niftiExtension;Object.defineProperty(C,"NIFTIEXTENSION",{enumerable:!0,get:function(){return d.NIFTIEXTENSION}});function k(G,Z=!1){var e0,z,f,f0;return G.byteLength1)for(var v=Array.prototype.slice.call(arguments,1);S--;)g[h-1-S]=u.Utils.createArray.apply(this,v);return g},u.Utils.getStringAt=function(h,g,S,v,w){var I="",_,P;for(_=0;_0?parseInt(h,10):0},u.Utils.convertCamcelCaseToTitleCase=function(h){var g=h.replace(/([A-Z][a-z])/g," $1");return u.Utils.trim(g.charAt(0).toUpperCase()+g.slice(1))},u.Utils.safeParseFloat=function(h){return h=u.Utils.stripLeadingZeros(h),h.length>0?parseFloat(h):0},u.Utils.bytesToDouble=function(h){var g=(h[0]&128)>>7,S=(h[0]&127)<<4|(h[1]&240)>>4;if(S==0)return 0;if(S==2047)return g?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;var v=Math.pow(2,S-1023-52),w=h[7]+h[6]*Math.pow(2,8)+h[5]*Math.pow(2,8*2)+h[4]*Math.pow(2,8*3)+h[3]*Math.pow(2,8*4)+h[2]*Math.pow(2,8*5)+(h[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,g)*w*v},u.Utils.concatArrayBuffers=function(h,g){var S=new Uint8Array(h.byteLength+g.byteLength);return S.set(new Uint8Array(h),0),S.set(new Uint8Array(g),h.byteLength),S.buffer},u.Utils.concatArrayBuffers2=function(h){var g=0,S=0,v;for(v=0;v>8&65280|h>>24&255},u.Utils.swap16=function(h){return((h&255)<<8|h>>8&255)<<16>>16},u.Utils.makeCRCTable=function(){for(var h,g=[],S=0;S<256;S++){h=S;for(var v=0;v<8;v++)h=h&1?3988292384^h>>>1:h>>>1;g[S]=h}return g},u.Utils.crc32=function(h){for(var g=u.Utils.crcTable||(u.Utils.crcTable=u.Utils.makeCRCTable()),S=-1,v=0;v>>8^g[(S^h.getUint8(v))&255];return(S^-1)>>>0},u.Utils.createBitMask=function(h,g,S){var v=4294967295;return v>>>=(4-h)*8+(h*8-g),S?h==1?v&=255:h==2?v&=65535:h==4?v&=4294967295:h==8&&(v=4294967295):v=4294967295,v},C.exports&&(C.exports=u.Utils)}(utilities)),utilities.exports}var hasRequiredDictionary;function requireDictionary(){return hasRequiredDictionary||(hasRequiredDictionary=1,function(C){var u=u||{};u.Dictionary=u.Dictionary||{},u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary.dictPrivate={"0207":{"101F":["FE","ElscintDataScale"]}},u.Dictionary.dict={"0002":{"0001":["OB","FileMetaInformationVersion"],"0002":["UI","MediaStoredSOPClassUID"],"0003":["UI","MediaStoredSOPInstanceUID"],"0010":["UI","TransferSyntaxUID"],"0012":["UI","ImplementationClassUID"],"0013":["SH","ImplementationVersionName"],"0016":["AE","SourceApplicationEntityTitle"],"0100":["UI","PrivateInformationCreatorUID"],"0102":["OB","PrivateInformation"]},"0004":{1130:["CS","FilesetID"],1141:["CS","FilesetDescriptorFileFileID"],1142:["CS","FilesetDescriptorFileFormat"],1200:["UL","RootDirectoryEntitysFirstDirectoryRecordOffset"],1202:["UL","RootDirectoryEntitysLastDirectoryRecordOffset"],1212:["US","File-setConsistenceFlag"],1220:["SQ","DirectoryRecordSequence"],1400:["UL","NextDirectoryRecordOffset"],1410:["US","RecordInuseFlag"],1420:["UL","ReferencedLowerlevelDirectoryEntityOffset"],1430:["CS","DirectoryRecordType"],1432:["UI","PrivateRecordUID"],1500:["CS","ReferencedFileID"],1510:["UI","ReferencedSOPClassUIDInFile"],1511:["UI","ReferencedSOPInstanceUIDInFile"],1600:["UL","NumberOfReferences"]},"0008":{"0001":["UL","LengthToEnd"],"0005":["CS","SpecificCharacterSet"],"0006":["SQ","LanguageCodeSequence"],"0008":["CS","ImageType"],"0010":["SH","RecognitionCode"],"0012":["DA","InstanceCreationDate"],"0013":["TM","InstanceCreationTime"],"0014":["UI","InstanceCreatorUID"],"0016":["UI","SOPClassUID"],"0018":["UI","SOPInstanceUID"],"001A":["UI","RelatedGeneralSOPClassUID"],"001B":["UI","OriginalSpecializedSOPClassUID"],"0020":["DA","StudyDate"],"0021":["DA","SeriesDate"],"0022":["DA","AcquisitionDate"],"0023":["DA","ContentDate"],"0024":["DA","OverlayDate"],"0025":["DA","CurveDate"],"002A":["DT","AcquisitionDateTime"],"0030":["TM","StudyTime"],"0031":["TM","SeriesTime"],"0032":["TM","AcquisitionTime"],"0033":["TM","ContentTime"],"0034":["TM","OverlayTime"],"0035":["TM","CurveTime"],"0040":["US","DataSetType"],"0041":["LO","DataSetSubtype"],"0042":["CS","NuclearMedicineSeriesType"],"0050":["SH","AccessionNumber"],"0051":["SQ","IssuerOfAccessionNumberSequence"],"0052":["CS","QueryRetrieveLevel"],"0054":["AE","RetrieveAETitle"],"0056":["CS","InstanceAvailability"],"0058":["UI","FailedSOPInstanceUIDList"],"0060":["CS","Modality"],"0061":["CS","ModalitiesInStudy"],"0062":["UI","SOPClassesInStudy"],"0064":["CS","ConversionType"],"0068":["CS","PresentationIntentType"],"0070":["LO","Manufacturer"],"0080":["LO","InstitutionName"],"0081":["ST","InstitutionAddress"],"0082":["SQ","InstitutionCodeSequence"],"0090":["PN","ReferringPhysicianName"],"0092":["ST","ReferringPhysicianAddress"],"0094":["SH","ReferringPhysicianTelephoneNumbers"],"0096":["SQ","ReferringPhysicianIdentificationSequence"],"0100":["SH","CodeValue"],"0102":["SH","CodingSchemeDesignator"],"0103":["SH","CodingSchemeVersion"],"0104":["LO","CodeMeaning"],"0105":["CS","MappingResource"],"0106":["DT","ContextGroupVersion"],"0107":["DT","ContextGroupLocalVersion"],"010B":["CS","ContextGroupExtensionFlag"],"010C":["UI","CodingSchemeUID"],"010D":["UI","ContextGroupExtensionCreatorUID"],"010F":["CS","ContextIdentifier"],"0110":["SQ","CodingSchemeIdentificationSequence"],"0112":["LO","CodingSchemeRegistry"],"0114":["ST","CodingSchemeExternalID"],"0115":["ST","CodingSchemeName"],"0116":["ST","CodingSchemeResponsibleOrganization"],"0117":["UI","ContextUID"],"0201":["SH","TimezoneOffsetFromUTC"],1e3:["AE","NetworkID"],1010:["SH","StationName"],1030:["LO","StudyDescription"],1032:["SQ","ProcedureCodeSequence"],"103E":["LO","SeriesDescription"],"103F":["SQ","SeriesDescriptionCodeSequence"],1040:["LO","InstitutionalDepartmentName"],1048:["PN","PhysiciansOfRecord"],1049:["SQ","PhysiciansOfRecordIdentificationSequence"],1050:["PN","PerformingPhysicianName"],1052:["SQ","PerformingPhysicianIdentificationSequence"],1060:["PN","NameOfPhysiciansReadingStudy"],1062:["SQ","PhysiciansReadingStudyIdentificationSequence"],1070:["PN","OperatorsName"],1072:["SQ","OperatorIdentificationSequence"],1080:["LO","AdmittingDiagnosesDescription"],1084:["SQ","AdmittingDiagnosesCodeSequence"],1090:["LO","ManufacturerModelName"],1100:["SQ","ReferencedResultsSequence"],1110:["SQ","ReferencedStudySequence"],1111:["SQ","ReferencedPerformedProcedureStepSequence"],1115:["SQ","ReferencedSeriesSequence"],1120:["SQ","ReferencedPatientSequence"],1125:["SQ","ReferencedVisitSequence"],1130:["SQ","ReferencedOverlaySequence"],1134:["SQ","ReferencedStereometricInstanceSequence"],"113A":["SQ","ReferencedWaveformSequence"],1140:["SQ","ReferencedImageSequence"],1145:["SQ","ReferencedCurveSequence"],"114A":["SQ","ReferencedInstanceSequence"],"114B":["SQ","ReferencedRealWorldValueMappingInstanceSequence"],1150:["UI","ReferencedSOPClassUID"],1155:["UI","ReferencedSOPInstanceUID"],"115A":["UI","SOPClassesSupported"],1160:["IS","ReferencedFrameNumber"],1161:["UL","SimpleFrameList"],1162:["UL","CalculatedFrameList"],1163:["FD","TimeRange"],1164:["SQ","FrameExtractionSequence"],1167:["UI","MultiFrameSourceSOPInstanceUID"],1195:["UI","TransactionUID"],1197:["US","FailureReason"],1198:["SQ","FailedSOPSequence"],1199:["SQ","ReferencedSOPSequence"],1200:["SQ","StudiesContainingOtherReferencedInstancesSequence"],1250:["SQ","RelatedSeriesSequence"],2110:["CS","LossyImageCompressionRetired"],2111:["ST","DerivationDescription"],2112:["SQ","SourceImageSequence"],2120:["SH","StageName"],2122:["IS","StageNumber"],2124:["IS","NumberOfStages"],2127:["SH","ViewName"],2128:["IS","ViewNumber"],2129:["IS","NumberOfEventTimers"],"212A":["IS","NumberOfViewsInStage"],2130:["DS","EventElapsedTimes"],2132:["LO","EventTimerNames"],2133:["SQ","EventTimerSequence"],2134:["FD","EventTimeOffset"],2135:["SQ","EventCodeSequence"],2142:["IS","StartTrim"],2143:["IS","StopTrim"],2144:["IS","RecommendedDisplayFrameRate"],2200:["CS","TransducerPosition"],2204:["CS","TransducerOrientation"],2208:["CS","AnatomicStructure"],2218:["SQ","AnatomicRegionSequence"],2220:["SQ","AnatomicRegionModifierSequence"],2228:["SQ","PrimaryAnatomicStructureSequence"],2229:["SQ","AnatomicStructureSpaceOrRegionSequence"],2230:["SQ","PrimaryAnatomicStructureModifierSequence"],2240:["SQ","TransducerPositionSequence"],2242:["SQ","TransducerPositionModifierSequence"],2244:["SQ","TransducerOrientationSequence"],2246:["SQ","TransducerOrientationModifierSequence"],2251:["SQ","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],2253:["SQ","AnatomicPortalOfEntranceCodeSequenceTrial"],2255:["SQ","AnatomicApproachDirectionCodeSequenceTrial"],2256:["ST","AnatomicPerspectiveDescriptionTrial"],2257:["SQ","AnatomicPerspectiveCodeSequenceTrial"],2258:["ST","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],2259:["SQ","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"225A":["SQ","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"225C":["SQ","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],3001:["SQ","AlternateRepresentationSequence"],3010:["UI","IrradiationEventUID"],4e3:["LT","IdentifyingComments"],9007:["CS","FrameType"],9092:["SQ","ReferencedImageEvidenceSequence"],9121:["SQ","ReferencedRawDataSequence"],9123:["UI","CreatorVersionUID"],9124:["SQ","DerivationImageSequence"],9154:["SQ","SourceImageEvidenceSequence"],9205:["CS","PixelPresentation"],9206:["CS","VolumetricProperties"],9207:["CS","VolumeBasedCalculationTechnique"],9208:["CS","ComplexImageComponent"],9209:["CS","AcquisitionContrast"],9215:["SQ","DerivationCodeSequence"],9237:["SQ","ReferencedPresentationStateSequence"],9410:["SQ","ReferencedOtherPlaneSequence"],9458:["SQ","FrameDisplaySequence"],9459:["FL","RecommendedDisplayFrameRateInFloat"],9460:["CS","SkipFrameRangeFlag"]},"0010":{"0010":["PN","PatientName"],"0020":["LO","PatientID"],"0021":["LO","IssuerOfPatientID"],"0022":["CS","TypeOfPatientID"],"0024":["SQ","IssuerOfPatientIDQualifiersSequence"],"0030":["DA","PatientBirthDate"],"0032":["TM","PatientBirthTime"],"0040":["CS","PatientSex"],"0050":["SQ","PatientInsurancePlanCodeSequence"],"0101":["SQ","PatientPrimaryLanguageCodeSequence"],"0102":["SQ","PatientPrimaryLanguageModifierCodeSequence"],1e3:["LO","OtherPatientIDs"],1001:["PN","OtherPatientNames"],1002:["SQ","OtherPatientIDsSequence"],1005:["PN","PatientBirthName"],1010:["AS","PatientAge"],1020:["DS","PatientSize"],1021:["SQ","PatientSizeCodeSequence"],1030:["DS","PatientWeight"],1040:["LO","PatientAddress"],1050:["LO","InsurancePlanIdentification"],1060:["PN","PatientMotherBirthName"],1080:["LO","MilitaryRank"],1081:["LO","BranchOfService"],1090:["LO","MedicalRecordLocator"],2e3:["LO","MedicalAlerts"],2110:["LO","Allergies"],2150:["LO","CountryOfResidence"],2152:["LO","RegionOfResidence"],2154:["SH","PatientTelephoneNumbers"],2160:["SH","EthnicGroup"],2180:["SH","Occupation"],"21A0":["CS","SmokingStatus"],"21B0":["LT","AdditionalPatientHistory"],"21C0":["US","PregnancyStatus"],"21D0":["DA","LastMenstrualDate"],"21F0":["LO","PatientReligiousPreference"],2201:["LO","PatientSpeciesDescription"],2202:["SQ","PatientSpeciesCodeSequence"],2203:["CS","PatientSexNeutered"],2210:["CS","AnatomicalOrientationType"],2292:["LO","PatientBreedDescription"],2293:["SQ","PatientBreedCodeSequence"],2294:["SQ","BreedRegistrationSequence"],2295:["LO","BreedRegistrationNumber"],2296:["SQ","BreedRegistryCodeSequence"],2297:["PN","ResponsiblePerson"],2298:["CS","ResponsiblePersonRole"],2299:["LO","ResponsibleOrganization"],4e3:["LT","PatientComments"],9431:["FL","ExaminedBodyThickness"]},"0012":{"0010":["LO","ClinicalTrialSponsorName"],"0020":["LO","ClinicalTrialProtocolID"],"0021":["LO","ClinicalTrialProtocolName"],"0030":["LO","ClinicalTrialSiteID"],"0031":["LO","ClinicalTrialSiteName"],"0040":["LO","ClinicalTrialSubjectID"],"0042":["LO","ClinicalTrialSubjectReadingID"],"0050":["LO","ClinicalTrialTimePointID"],"0051":["ST","ClinicalTrialTimePointDescription"],"0060":["LO","ClinicalTrialCoordinatingCenterName"],"0062":["CS","PatientIdentityRemoved"],"0063":["LO","DeidentificationMethod"],"0064":["SQ","DeidentificationMethodCodeSequence"],"0071":["LO","ClinicalTrialSeriesID"],"0072":["LO","ClinicalTrialSeriesDescription"],"0081":["LO","ClinicalTrialProtocolEthicsCommitteeName"],"0082":["LO","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0083":["SQ","ConsentForClinicalTrialUseSequence"],"0084":["CS","DistributionType"],"0085":["CS","ConsentForDistributionFlag"]},"0014":{"0023":["ST","CADFileFormat"],"0024":["ST","ComponentReferenceSystem"],"0025":["ST","ComponentManufacturingProcedure"],"0028":["ST","ComponentManufacturer"],"0030":["DS","MaterialThickness"],"0032":["DS","MaterialPipeDiameter"],"0034":["DS","MaterialIsolationDiameter"],"0042":["ST","MaterialGrade"],"0044":["ST","MaterialPropertiesFileID"],"0045":["ST","MaterialPropertiesFileFormat"],"0046":["LT","MaterialNotes"],"0050":["CS","ComponentShape"],"0052":["CS","CurvatureType"],"0054":["DS","OuterDiameter"],"0056":["DS","InnerDiameter"],1010:["ST","ActualEnvironmentalConditions"],1020:["DA","ExpiryDate"],1040:["ST","EnvironmentalConditions"],2002:["SQ","EvaluatorSequence"],2004:["IS","EvaluatorNumber"],2006:["PN","EvaluatorName"],2008:["IS","EvaluationAttempt"],2012:["SQ","IndicationSequence"],2014:["IS","IndicationNumber "],2016:["SH","IndicationLabel"],2018:["ST","IndicationDescription"],"201A":["CS","IndicationType"],"201C":["CS","IndicationDisposition"],"201E":["SQ","IndicationROISequence"],2030:["SQ","IndicationPhysicalPropertySequence"],2032:["SH","PropertyLabel"],2202:["IS","CoordinateSystemNumberOfAxes "],2204:["SQ","CoordinateSystemAxesSequence"],2206:["ST","CoordinateSystemAxisDescription"],2208:["CS","CoordinateSystemDataSetMapping"],"220A":["IS","CoordinateSystemAxisNumber"],"220C":["CS","CoordinateSystemAxisType"],"220E":["CS","CoordinateSystemAxisUnits"],2210:["OB","CoordinateSystemAxisValues"],2220:["SQ","CoordinateSystemTransformSequence"],2222:["ST","TransformDescription"],2224:["IS","TransformNumberOfAxes"],2226:["IS","TransformOrderOfAxes"],2228:["CS","TransformedAxisUnits"],"222A":["DS","CoordinateSystemTransformRotationAndScaleMatrix"],"222C":["DS","CoordinateSystemTransformTranslationMatrix"],3011:["DS","InternalDetectorFrameTime"],3012:["DS","NumberOfFramesIntegrated"],3020:["SQ","DetectorTemperatureSequence"],3022:["DS","SensorName"],3024:["DS","HorizontalOffsetOfSensor"],3026:["DS","VerticalOffsetOfSensor"],3028:["DS","SensorTemperature"],3040:["SQ","DarkCurrentSequence"],3050:["OB","DarkCurrentCounts"],3060:["SQ","GainCorrectionReferenceSequence"],3070:["OB","AirCounts"],3071:["DS","KVUsedInGainCalibration"],3072:["DS","MAUsedInGainCalibration"],3073:["DS","NumberOfFramesUsedForIntegration"],3074:["LO","FilterMaterialUsedInGainCalibration"],3075:["DS","FilterThicknessUsedInGainCalibration"],3076:["DA","DateOfGainCalibration"],3077:["TM","TimeOfGainCalibration"],3080:["OB","BadPixelImage"],3099:["LT","CalibrationNotes"],4002:["SQ","PulserEquipmentSequence"],4004:["CS","PulserType"],4006:["LT","PulserNotes"],4008:["SQ","ReceiverEquipmentSequence"],"400A":["CS","AmplifierType"],"400C":["LT","ReceiverNotes"],"400E":["SQ","PreAmplifierEquipmentSequence"],"400F":["LT","PreAmplifierNotes"],4010:["SQ","TransmitTransducerSequence"],4011:["SQ","ReceiveTransducerSequence"],4012:["US","NumberOfElements"],4013:["CS","ElementShape"],4014:["DS","ElementDimensionA"],4015:["DS","ElementDimensionB"],4016:["DS","ElementPitch"],4017:["DS","MeasuredBeamDimensionA"],4018:["DS","MeasuredBeamDimensionB"],4019:["DS","LocationOfMeasuredBeamDiameter"],"401A":["DS","NominalFrequency"],"401B":["DS","MeasuredCenterFrequency"],"401C":["DS","MeasuredBandwidth"],4020:["SQ","PulserSettingsSequence"],4022:["DS","PulseWidth"],4024:["DS","ExcitationFrequency"],4026:["CS","ModulationType"],4028:["DS","Damping"],4030:["SQ","ReceiverSettingsSequence"],4031:["DS","AcquiredSoundpathLength"],4032:["CS","AcquisitionCompressionType"],4033:["IS","AcquisitionSampleSize"],4034:["DS","RectifierSmoothing"],4035:["SQ","DACSequence"],4036:["CS","DACType"],4038:["DS","DACGainPoints"],"403A":["DS","DACTimePoints"],"403C":["DS","DACAmplitude"],4040:["SQ","PreAmplifierSettingsSequence"],4050:["SQ","TransmitTransducerSettingsSequence"],4051:["SQ","ReceiveTransducerSettingsSequence"],4052:["DS","IncidentAngle"],4054:["ST","CouplingTechnique"],4056:["ST","CouplingMedium"],4057:["DS","CouplingVelocity"],4058:["DS","CrystalCenterLocationX"],4059:["DS","CrystalCenterLocationZ"],"405A":["DS","SoundPathLength"],"405C":["ST","DelayLawIdentifier"],4060:["SQ","GateSettingsSequence"],4062:["DS","GateThreshold"],4064:["DS","VelocityOfSound"],4070:["SQ","CalibrationSettingsSequence"],4072:["ST","CalibrationProcedure"],4074:["SH","ProcedureVersion"],4076:["DA","ProcedureCreationDate"],4078:["DA","ProcedureExpirationDate"],"407A":["DA","ProcedureLastModifiedDate"],"407C":["TM","CalibrationTime"],"407E":["DA","CalibrationDate"],5002:["IS","LINACEnergy"],5004:["IS","LINACOutput"]},"0018":{"0010":["LO","ContrastBolusAgent"],"0012":["SQ","ContrastBolusAgentSequence"],"0014":["SQ","ContrastBolusAdministrationRouteSequence"],"0015":["CS","BodyPartExamined"],"0020":["CS","ScanningSequence"],"0021":["CS","SequenceVariant"],"0022":["CS","ScanOptions"],"0023":["CS","MRAcquisitionType"],"0024":["SH","SequenceName"],"0025":["CS","AngioFlag"],"0026":["SQ","InterventionDrugInformationSequence"],"0027":["TM","InterventionDrugStopTime"],"0028":["DS","InterventionDrugDose"],"0029":["SQ","InterventionDrugCodeSequence"],"002A":["SQ","AdditionalDrugSequence"],"0030":["LO","Radionuclide"],"0031":["LO","Radiopharmaceutical"],"0032":["DS","EnergyWindowCenterline"],"0033":["DS","EnergyWindowTotalWidth"],"0034":["LO","InterventionDrugName"],"0035":["TM","InterventionDrugStartTime"],"0036":["SQ","InterventionSequence"],"0037":["CS","TherapyType"],"0038":["CS","InterventionStatus"],"0039":["CS","TherapyDescription"],"003A":["ST","InterventionDescription"],"0040":["IS","CineRate"],"0042":["CS","InitialCineRunState"],"0050":["DS","SliceThickness"],"0060":["DS","KVP"],"0070":["IS","CountsAccumulated"],"0071":["CS","AcquisitionTerminationCondition"],"0072":["DS","EffectiveDuration"],"0073":["CS","AcquisitionStartCondition"],"0074":["IS","AcquisitionStartConditionData"],"0075":["IS","AcquisitionTerminationConditionData"],"0080":["DS","RepetitionTime"],"0081":["DS","EchoTime"],"0082":["DS","InversionTime"],"0083":["DS","NumberOfAverages"],"0084":["DS","ImagingFrequency"],"0085":["SH","ImagedNucleus"],"0086":["IS","EchoNumbers"],"0087":["DS","MagneticFieldStrength"],"0088":["DS","SpacingBetweenSlices"],"0089":["IS","NumberOfPhaseEncodingSteps"],"0090":["DS","DataCollectionDiameter"],"0091":["IS","EchoTrainLength"],"0093":["DS","PercentSampling"],"0094":["DS","PercentPhaseFieldOfView"],"0095":["DS","PixelBandwidth"],1e3:["LO","DeviceSerialNumber"],1002:["UI","DeviceUID"],1003:["LO","DeviceID"],1004:["LO","PlateID"],1005:["LO","GeneratorID"],1006:["LO","GridID"],1007:["LO","CassetteID"],1008:["LO","GantryID"],1010:["LO","SecondaryCaptureDeviceID"],1011:["LO","HardcopyCreationDeviceID"],1012:["DA","DateOfSecondaryCapture"],1014:["TM","TimeOfSecondaryCapture"],1016:["LO","SecondaryCaptureDeviceManufacturer"],1017:["LO","HardcopyDeviceManufacturer"],1018:["LO","SecondaryCaptureDeviceManufacturerModelName"],1019:["LO","SecondaryCaptureDeviceSoftwareVersions"],"101A":["LO","HardcopyDeviceSoftwareVersion"],"101B":["LO","HardcopyDeviceManufacturerModelName"],1020:["LO","SoftwareVersions"],1022:["SH","VideoImageFormatAcquired"],1023:["LO","DigitalImageFormatAcquired"],1030:["LO","ProtocolName"],1040:["LO","ContrastBolusRoute"],1041:["DS","ContrastBolusVolume"],1042:["TM","ContrastBolusStartTime"],1043:["TM","ContrastBolusStopTime"],1044:["DS","ContrastBolusTotalDose"],1045:["IS","SyringeCounts"],1046:["DS","ContrastFlowRate"],1047:["DS","ContrastFlowDuration"],1048:["CS","ContrastBolusIngredient"],1049:["DS","ContrastBolusIngredientConcentration"],1050:["DS","SpatialResolution"],1060:["DS","TriggerTime"],1061:["LO","TriggerSourceOrType"],1062:["IS","NominalInterval"],1063:["DS","FrameTime"],1064:["LO","CardiacFramingType"],1065:["DS","FrameTimeVector"],1066:["DS","FrameDelay"],1067:["DS","ImageTriggerDelay"],1068:["DS","MultiplexGroupTimeOffset"],1069:["DS","TriggerTimeOffset"],"106A":["CS","SynchronizationTrigger"],"106C":["US","SynchronizationChannel"],"106E":["UL","TriggerSamplePosition"],1070:["LO","RadiopharmaceuticalRoute"],1071:["DS","RadiopharmaceuticalVolume"],1072:["TM","RadiopharmaceuticalStartTime"],1073:["TM","RadiopharmaceuticalStopTime"],1074:["DS","RadionuclideTotalDose"],1075:["DS","RadionuclideHalfLife"],1076:["DS","RadionuclidePositronFraction"],1077:["DS","RadiopharmaceuticalSpecificActivity"],1078:["DT","RadiopharmaceuticalStartDateTime"],1079:["DT","RadiopharmaceuticalStopDateTime"],1080:["CS","BeatRejectionFlag"],1081:["IS","LowRRValue"],1082:["IS","HighRRValue"],1083:["IS","IntervalsAcquired"],1084:["IS","IntervalsRejected"],1085:["LO","PVCRejection"],1086:["IS","SkipBeats"],1088:["IS","HeartRate"],1090:["IS","CardiacNumberOfImages"],1094:["IS","TriggerWindow"],1100:["DS","ReconstructionDiameter"],1110:["DS","DistanceSourceToDetector"],1111:["DS","DistanceSourceToPatient"],1114:["DS","EstimatedRadiographicMagnificationFactor"],1120:["DS","GantryDetectorTilt"],1121:["DS","GantryDetectorSlew"],1130:["DS","TableHeight"],1131:["DS","TableTraverse"],1134:["CS","TableMotion"],1135:["DS","TableVerticalIncrement"],1136:["DS","TableLateralIncrement"],1137:["DS","TableLongitudinalIncrement"],1138:["DS","TableAngle"],"113A":["CS","TableType"],1140:["CS","RotationDirection"],1141:["DS","AngularPosition"],1142:["DS","RadialPosition"],1143:["DS","ScanArc"],1144:["DS","AngularStep"],1145:["DS","CenterOfRotationOffset"],1146:["DS","RotationOffset"],1147:["CS","FieldOfViewShape"],1149:["IS","FieldOfViewDimensions"],1150:["IS","ExposureTime"],1151:["IS","XRayTubeCurrent"],1152:["IS","Exposure"],1153:["IS","ExposureInuAs"],1154:["DS","AveragePulseWidth"],1155:["CS","RadiationSetting"],1156:["CS","RectificationType"],"115A":["CS","RadiationMode"],"115E":["DS","ImageAndFluoroscopyAreaDoseProduct"],1160:["SH","FilterType"],1161:["LO","TypeOfFilters"],1162:["DS","IntensifierSize"],1164:["DS","ImagerPixelSpacing"],1166:["CS","Grid"],1170:["IS","GeneratorPower"],1180:["SH","CollimatorGridName"],1181:["CS","CollimatorType"],1182:["IS","FocalDistance"],1183:["DS","XFocusCenter"],1184:["DS","YFocusCenter"],1190:["DS","FocalSpots"],1191:["CS","AnodeTargetMaterial"],"11A0":["DS","BodyPartThickness"],"11A2":["DS","CompressionForce"],1200:["DA","DateOfLastCalibration"],1201:["TM","TimeOfLastCalibration"],1210:["SH","ConvolutionKernel"],1240:["IS","UpperLowerPixelValues"],1242:["IS","ActualFrameDuration"],1243:["IS","CountRate"],1244:["US","PreferredPlaybackSequencing"],1250:["SH","ReceiveCoilName"],1251:["SH","TransmitCoilName"],1260:["SH","PlateType"],1261:["LO","PhosphorType"],1300:["DS","ScanVelocity"],1301:["CS","WholeBodyTechnique"],1302:["IS","ScanLength"],1310:["US","AcquisitionMatrix"],1312:["CS","InPlanePhaseEncodingDirection"],1314:["DS","FlipAngle"],1315:["CS","VariableFlipAngleFlag"],1316:["DS","SAR"],1318:["DS","dBdt"],1400:["LO","AcquisitionDeviceProcessingDescription"],1401:["LO","AcquisitionDeviceProcessingCode"],1402:["CS","CassetteOrientation"],1403:["CS","CassetteSize"],1404:["US","ExposuresOnPlate"],1405:["IS","RelativeXRayExposure"],1411:["DS","ExposureIndex"],1412:["DS","TargetExposureIndex"],1413:["DS","DeviationIndex"],1450:["DS","ColumnAngulation"],1460:["DS","TomoLayerHeight"],1470:["DS","TomoAngle"],1480:["DS","TomoTime"],1490:["CS","TomoType"],1491:["CS","TomoClass"],1495:["IS","NumberOfTomosynthesisSourceImages"],1500:["CS","PositionerMotion"],1508:["CS","PositionerType"],1510:["DS","PositionerPrimaryAngle"],1511:["DS","PositionerSecondaryAngle"],1520:["DS","PositionerPrimaryAngleIncrement"],1521:["DS","PositionerSecondaryAngleIncrement"],1530:["DS","DetectorPrimaryAngle"],1531:["DS","DetectorSecondaryAngle"],1600:["CS","ShutterShape"],1602:["IS","ShutterLeftVerticalEdge"],1604:["IS","ShutterRightVerticalEdge"],1606:["IS","ShutterUpperHorizontalEdge"],1608:["IS","ShutterLowerHorizontalEdge"],1610:["IS","CenterOfCircularShutter"],1612:["IS","RadiusOfCircularShutter"],1620:["IS","VerticesOfThePolygonalShutter"],1622:["US","ShutterPresentationValue"],1623:["US","ShutterOverlayGroup"],1624:["US","ShutterPresentationColorCIELabValue"],1700:["CS","CollimatorShape"],1702:["IS","CollimatorLeftVerticalEdge"],1704:["IS","CollimatorRightVerticalEdge"],1706:["IS","CollimatorUpperHorizontalEdge"],1708:["IS","CollimatorLowerHorizontalEdge"],1710:["IS","CenterOfCircularCollimator"],1712:["IS","RadiusOfCircularCollimator"],1720:["IS","VerticesOfThePolygonalCollimator"],1800:["CS","AcquisitionTimeSynchronized"],1801:["SH","TimeSource"],1802:["CS","TimeDistributionProtocol"],1803:["LO","NTPSourceAddress"],2001:["IS","PageNumberVector"],2002:["SH","FrameLabelVector"],2003:["DS","FramePrimaryAngleVector"],2004:["DS","FrameSecondaryAngleVector"],2005:["DS","SliceLocationVector"],2006:["SH","DisplayWindowLabelVector"],2010:["DS","NominalScannedPixelSpacing"],2020:["CS","DigitizingDeviceTransportDirection"],2030:["DS","RotationOfScannedFilm"],3100:["CS","IVUSAcquisition"],3101:["DS","IVUSPullbackRate"],3102:["DS","IVUSGatedRate"],3103:["IS","IVUSPullbackStartFrameNumber"],3104:["IS","IVUSPullbackStopFrameNumber"],3105:["IS","LesionNumber"],4e3:["LT","AcquisitionComments"],5e3:["SH","OutputPower"],5010:["LO","TransducerData"],5012:["DS","FocusDepth"],5020:["LO","ProcessingFunction"],5021:["LO","PostprocessingFunction"],5022:["DS","MechanicalIndex"],5024:["DS","BoneThermalIndex"],5026:["DS","CranialThermalIndex"],5027:["DS","SoftTissueThermalIndex"],5028:["DS","SoftTissueFocusThermalIndex"],5029:["DS","SoftTissueSurfaceThermalIndex"],5030:["DS","DynamicRange"],5040:["DS","TotalGain"],5050:["IS","DepthOfScanField"],5100:["CS","PatientPosition"],5101:["CS","ViewPosition"],5104:["SQ","ProjectionEponymousNameCodeSequence"],5210:["DS","ImageTransformationMatrix"],5212:["DS","ImageTranslationVector"],6e3:["DS","Sensitivity"],6011:["SQ","SequenceOfUltrasoundRegions"],6012:["US","RegionSpatialFormat"],6014:["US","RegionDataType"],6016:["UL","RegionFlags"],6018:["UL","RegionLocationMinX0"],"601A":["UL","RegionLocationMinY0"],"601C":["UL","RegionLocationMaxX1"],"601E":["UL","RegionLocationMaxY1"],6020:["SL","ReferencePixelX0"],6022:["SL","ReferencePixelY0"],6024:["US","PhysicalUnitsXDirection"],6026:["US","PhysicalUnitsYDirection"],6028:["FD","ReferencePixelPhysicalValueX"],"602A":["FD","ReferencePixelPhysicalValueY"],"602C":["FD","PhysicalDeltaX"],"602E":["FD","PhysicalDeltaY"],6030:["UL","TransducerFrequency"],6031:["CS","TransducerType"],6032:["UL","PulseRepetitionFrequency"],6034:["FD","DopplerCorrectionAngle"],6036:["FD","SteeringAngle"],6038:["UL","DopplerSampleVolumeXPositionRetired"],6039:["SL","DopplerSampleVolumeXPosition"],"603A":["UL","DopplerSampleVolumeYPositionRetired"],"603B":["SL","DopplerSampleVolumeYPosition"],"603C":["UL","TMLinePositionX0Retired"],"603D":["SL","TMLinePositionX0"],"603E":["UL","TMLinePositionY0Retired"],"603F":["SL","TMLinePositionY0"],6040:["UL","TMLinePositionX1Retired"],6041:["SL","TMLinePositionX1"],6042:["UL","TMLinePositionY1Retired"],6043:["SL","TMLinePositionY1"],6044:["US","PixelComponentOrganization"],6046:["UL","PixelComponentMask"],6048:["UL","PixelComponentRangeStart"],"604A":["UL","PixelComponentRangeStop"],"604C":["US","PixelComponentPhysicalUnits"],"604E":["US","PixelComponentDataType"],6050:["UL","NumberOfTableBreakPoints"],6052:["UL","TableOfXBreakPoints"],6054:["FD","TableOfYBreakPoints"],6056:["UL","NumberOfTableEntries"],6058:["UL","TableOfPixelValues"],"605A":["FL","TableOfParameterValues"],6060:["FL","RWaveTimeVector"],7e3:["CS","DetectorConditionsNominalFlag"],7001:["DS","DetectorTemperature"],7004:["CS","DetectorType"],7005:["CS","DetectorConfiguration"],7006:["LT","DetectorDescription"],7008:["LT","DetectorMode"],"700A":["SH","DetectorID"],"700C":["DA","DateOfLastDetectorCalibration"],"700E":["TM","TimeOfLastDetectorCalibration"],7010:["IS","ExposuresOnDetectorSinceLastCalibration"],7011:["IS","ExposuresOnDetectorSinceManufactured"],7012:["DS","DetectorTimeSinceLastExposure"],7014:["DS","DetectorActiveTime"],7016:["DS","DetectorActivationOffsetFromExposure"],"701A":["DS","DetectorBinning"],7020:["DS","DetectorElementPhysicalSize"],7022:["DS","DetectorElementSpacing"],7024:["CS","DetectorActiveShape"],7026:["DS","DetectorActiveDimensions"],7028:["DS","DetectorActiveOrigin"],"702A":["LO","DetectorManufacturerName"],"702B":["LO","DetectorManufacturerModelName"],7030:["DS","FieldOfViewOrigin"],7032:["DS","FieldOfViewRotation"],7034:["CS","FieldOfViewHorizontalFlip"],7036:["FL","PixelDataAreaOriginRelativeToFOV"],7038:["FL","PixelDataAreaRotationAngleRelativeToFOV"],7040:["LT","GridAbsorbingMaterial"],7041:["LT","GridSpacingMaterial"],7042:["DS","GridThickness"],7044:["DS","GridPitch"],7046:["IS","GridAspectRatio"],7048:["DS","GridPeriod"],"704C":["DS","GridFocalDistance"],7050:["CS","FilterMaterial"],7052:["DS","FilterThicknessMinimum"],7054:["DS","FilterThicknessMaximum"],7056:["FL","FilterBeamPathLengthMinimum"],7058:["FL","FilterBeamPathLengthMaximum"],7060:["CS","ExposureControlMode"],7062:["LT","ExposureControlModeDescription"],7064:["CS","ExposureStatus"],7065:["DS","PhototimerSetting"],8150:["DS","ExposureTimeInuS"],8151:["DS","XRayTubeCurrentInuA"],9004:["CS","ContentQualification"],9005:["SH","PulseSequenceName"],9006:["SQ","MRImagingModifierSequence"],9008:["CS","EchoPulseSequence"],9009:["CS","InversionRecovery"],9010:["CS","FlowCompensation"],9011:["CS","MultipleSpinEcho"],9012:["CS","MultiPlanarExcitation"],9014:["CS","PhaseContrast"],9015:["CS","TimeOfFlightContrast"],9016:["CS","Spoiling"],9017:["CS","SteadyStatePulseSequence"],9018:["CS","EchoPlanarPulseSequence"],9019:["FD","TagAngleFirstAxis"],9020:["CS","MagnetizationTransfer"],9021:["CS","T2Preparation"],9022:["CS","BloodSignalNulling"],9024:["CS","SaturationRecovery"],9025:["CS","SpectrallySelectedSuppression"],9026:["CS","SpectrallySelectedExcitation"],9027:["CS","SpatialPresaturation"],9028:["CS","Tagging"],9029:["CS","OversamplingPhase"],9030:["FD","TagSpacingFirstDimension"],9032:["CS","GeometryOfKSpaceTraversal"],9033:["CS","SegmentedKSpaceTraversal"],9034:["CS","RectilinearPhaseEncodeReordering"],9035:["FD","TagThickness"],9036:["CS","PartialFourierDirection"],9037:["CS","CardiacSynchronizationTechnique"],9041:["LO","ReceiveCoilManufacturerName"],9042:["SQ","MRReceiveCoilSequence"],9043:["CS","ReceiveCoilType"],9044:["CS","QuadratureReceiveCoil"],9045:["SQ","MultiCoilDefinitionSequence"],9046:["LO","MultiCoilConfiguration"],9047:["SH","MultiCoilElementName"],9048:["CS","MultiCoilElementUsed"],9049:["SQ","MRTransmitCoilSequence"],9050:["LO","TransmitCoilManufacturerName"],9051:["CS","TransmitCoilType"],9052:["FD","SpectralWidth"],9053:["FD","ChemicalShiftReference"],9054:["CS","VolumeLocalizationTechnique"],9058:["US","MRAcquisitionFrequencyEncodingSteps"],9059:["CS","Decoupling"],9060:["CS","DecoupledNucleus"],9061:["FD","DecouplingFrequency"],9062:["CS","DecouplingMethod"],9063:["FD","DecouplingChemicalShiftReference"],9064:["CS","KSpaceFiltering"],9065:["CS","TimeDomainFiltering"],9066:["US","NumberOfZeroFills"],9067:["CS","BaselineCorrection"],9069:["FD","ParallelReductionFactorInPlane"],9070:["FD","CardiacRRIntervalSpecified"],9073:["FD","AcquisitionDuration"],9074:["DT","FrameAcquisitionDateTime"],9075:["CS","DiffusionDirectionality"],9076:["SQ","DiffusionGradientDirectionSequence"],9077:["CS","ParallelAcquisition"],9078:["CS","ParallelAcquisitionTechnique"],9079:["FD","InversionTimes"],9080:["ST","MetaboliteMapDescription"],9081:["CS","PartialFourier"],9082:["FD","EffectiveEchoTime"],9083:["SQ","MetaboliteMapCodeSequence"],9084:["SQ","ChemicalShiftSequence"],9085:["CS","CardiacSignalSource"],9087:["FD","DiffusionBValue"],9089:["FD","DiffusionGradientOrientation"],9090:["FD","VelocityEncodingDirection"],9091:["FD","VelocityEncodingMinimumValue"],9092:["SQ","VelocityEncodingAcquisitionSequence"],9093:["US","NumberOfKSpaceTrajectories"],9094:["CS","CoverageOfKSpace"],9095:["UL","SpectroscopyAcquisitionPhaseRows"],9096:["FD","ParallelReductionFactorInPlaneRetired"],9098:["FD","TransmitterFrequency"],9100:["CS","ResonantNucleus"],9101:["CS","FrequencyCorrection"],9103:["SQ","MRSpectroscopyFOVGeometrySequence"],9104:["FD","SlabThickness"],9105:["FD","SlabOrientation"],9106:["FD","MidSlabPosition"],9107:["SQ","MRSpatialSaturationSequence"],9112:["SQ","MRTimingAndRelatedParametersSequence"],9114:["SQ","MREchoSequence"],9115:["SQ","MRModifierSequence"],9117:["SQ","MRDiffusionSequence"],9118:["SQ","CardiacSynchronizationSequence"],9119:["SQ","MRAveragesSequence"],9125:["SQ","MRFOVGeometrySequence"],9126:["SQ","VolumeLocalizationSequence"],9127:["UL","SpectroscopyAcquisitionDataColumns"],9147:["CS","DiffusionAnisotropyType"],9151:["DT","FrameReferenceDateTime"],9152:["SQ","MRMetaboliteMapSequence"],9155:["FD","ParallelReductionFactorOutOfPlane"],9159:["UL","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],9166:["CS","BulkMotionStatus"],9168:["FD","ParallelReductionFactorSecondInPlane"],9169:["CS","CardiacBeatRejectionTechnique"],9170:["CS","RespiratoryMotionCompensationTechnique"],9171:["CS","RespiratorySignalSource"],9172:["CS","BulkMotionCompensationTechnique"],9173:["CS","BulkMotionSignalSource"],9174:["CS","ApplicableSafetyStandardAgency"],9175:["LO","ApplicableSafetyStandardDescription"],9176:["SQ","OperatingModeSequence"],9177:["CS","OperatingModeType"],9178:["CS","OperatingMode"],9179:["CS","SpecificAbsorptionRateDefinition"],9180:["CS","GradientOutputType"],9181:["FD","SpecificAbsorptionRateValue"],9182:["FD","GradientOutput"],9183:["CS","FlowCompensationDirection"],9184:["FD","TaggingDelay"],9185:["ST","RespiratoryMotionCompensationTechniqueDescription"],9186:["SH","RespiratorySignalSourceID"],9195:["FD","ChemicalShiftMinimumIntegrationLimitInHz"],9196:["FD","ChemicalShiftMaximumIntegrationLimitInHz"],9197:["SQ","MRVelocityEncodingSequence"],9198:["CS","FirstOrderPhaseCorrection"],9199:["CS","WaterReferencedPhaseCorrection"],9200:["CS","MRSpectroscopyAcquisitionType"],9214:["CS","RespiratoryCyclePosition"],9217:["FD","VelocityEncodingMaximumValue"],9218:["FD","TagSpacingSecondDimension"],9219:["SS","TagAngleSecondAxis"],9220:["FD","FrameAcquisitionDuration"],9226:["SQ","MRImageFrameTypeSequence"],9227:["SQ","MRSpectroscopyFrameTypeSequence"],9231:["US","MRAcquisitionPhaseEncodingStepsInPlane"],9232:["US","MRAcquisitionPhaseEncodingStepsOutOfPlane"],9234:["UL","SpectroscopyAcquisitionPhaseColumns"],9236:["CS","CardiacCyclePosition"],9239:["SQ","SpecificAbsorptionRateSequence"],9240:["US","RFEchoTrainLength"],9241:["US","GradientEchoTrainLength"],9250:["CS","ArterialSpinLabelingContrast"],9251:["SQ","MRArterialSpinLabelingSequence"],9252:["LO","ASLTechniqueDescription"],9253:["US","ASLSlabNumber"],9254:["FD ","ASLSlabThickness"],9255:["FD ","ASLSlabOrientation"],9256:["FD ","ASLMidSlabPosition"],9257:["CS","ASLContext"],9258:["UL","ASLPulseTrainDuration"],9259:["CS","ASLCrusherFlag"],"925A":["FD","ASLCrusherFlow"],"925B":["LO","ASLCrusherDescription"],"925C":["CS","ASLBolusCutoffFlag"],"925D":["SQ","ASLBolusCutoffTimingSequence"],"925E":["LO","ASLBolusCutoffTechnique"],"925F":["UL","ASLBolusCutoffDelayTime"],9260:["SQ","ASLSlabSequence"],9295:["FD","ChemicalShiftMinimumIntegrationLimitInppm"],9296:["FD","ChemicalShiftMaximumIntegrationLimitInppm"],9301:["SQ","CTAcquisitionTypeSequence"],9302:["CS","AcquisitionType"],9303:["FD","TubeAngle"],9304:["SQ","CTAcquisitionDetailsSequence"],9305:["FD","RevolutionTime"],9306:["FD","SingleCollimationWidth"],9307:["FD","TotalCollimationWidth"],9308:["SQ","CTTableDynamicsSequence"],9309:["FD","TableSpeed"],9310:["FD","TableFeedPerRotation"],9311:["FD","SpiralPitchFactor"],9312:["SQ","CTGeometrySequence"],9313:["FD","DataCollectionCenterPatient"],9314:["SQ","CTReconstructionSequence"],9315:["CS","ReconstructionAlgorithm"],9316:["CS","ConvolutionKernelGroup"],9317:["FD","ReconstructionFieldOfView"],9318:["FD","ReconstructionTargetCenterPatient"],9319:["FD","ReconstructionAngle"],9320:["SH","ImageFilter"],9321:["SQ","CTExposureSequence"],9322:["FD","ReconstructionPixelSpacing"],9323:["CS","ExposureModulationType"],9324:["FD","EstimatedDoseSaving"],9325:["SQ","CTXRayDetailsSequence"],9326:["SQ","CTPositionSequence"],9327:["FD","TablePosition"],9328:["FD","ExposureTimeInms"],9329:["SQ","CTImageFrameTypeSequence"],9330:["FD","XRayTubeCurrentInmA"],9332:["FD","ExposureInmAs"],9333:["CS","ConstantVolumeFlag"],9334:["CS","FluoroscopyFlag"],9335:["FD","DistanceSourceToDataCollectionCenter"],9337:["US","ContrastBolusAgentNumber"],9338:["SQ","ContrastBolusIngredientCodeSequence"],9340:["SQ","ContrastAdministrationProfileSequence"],9341:["SQ","ContrastBolusUsageSequence"],9342:["CS","ContrastBolusAgentAdministered"],9343:["CS","ContrastBolusAgentDetected"],9344:["CS","ContrastBolusAgentPhase"],9345:["FD","CTDIvol"],9346:["SQ","CTDIPhantomTypeCodeSequence"],9351:["FL","CalciumScoringMassFactorPatient"],9352:["FL","CalciumScoringMassFactorDevice"],9353:["FL","EnergyWeightingFactor"],9360:["SQ","CTAdditionalXRaySourceSequence"],9401:["SQ","ProjectionPixelCalibrationSequence"],9402:["FL","DistanceSourceToIsocenter"],9403:["FL","DistanceObjectToTableTop"],9404:["FL","ObjectPixelSpacingInCenterOfBeam"],9405:["SQ","PositionerPositionSequence"],9406:["SQ","TablePositionSequence"],9407:["SQ","CollimatorShapeSequence"],9410:["CS","PlanesInAcquisition"],9412:["SQ","XAXRFFrameCharacteristicsSequence"],9417:["SQ","FrameAcquisitionSequence"],9420:["CS","XRayReceptorType"],9423:["LO","AcquisitionProtocolName"],9424:["LT","AcquisitionProtocolDescription"],9425:["CS","ContrastBolusIngredientOpaque"],9426:["FL","DistanceReceptorPlaneToDetectorHousing"],9427:["CS","IntensifierActiveShape"],9428:["FL","IntensifierActiveDimensions"],9429:["FL","PhysicalDetectorSize"],9430:["FL","PositionOfIsocenterProjection"],9432:["SQ","FieldOfViewSequence"],9433:["LO","FieldOfViewDescription"],9434:["SQ","ExposureControlSensingRegionsSequence"],9435:["CS","ExposureControlSensingRegionShape"],9436:["SS","ExposureControlSensingRegionLeftVerticalEdge"],9437:["SS","ExposureControlSensingRegionRightVerticalEdge"],9438:["SS","ExposureControlSensingRegionUpperHorizontalEdge"],9439:["SS","ExposureControlSensingRegionLowerHorizontalEdge"],9440:["SS","CenterOfCircularExposureControlSensingRegion"],9441:["US","RadiusOfCircularExposureControlSensingRegion"],9442:["SS","VerticesOfThePolygonalExposureControlSensingRegion"],9447:["FL","ColumnAngulationPatient"],9449:["FL","BeamAngle"],9451:["SQ","FrameDetectorParametersSequence"],9452:["FL","CalculatedAnatomyThickness"],9455:["SQ","CalibrationSequence"],9456:["SQ","ObjectThicknessSequence"],9457:["CS","PlaneIdentification"],9461:["FL","FieldOfViewDimensionsInFloat"],9462:["SQ","IsocenterReferenceSystemSequence"],9463:["FL","PositionerIsocenterPrimaryAngle"],9464:["FL","PositionerIsocenterSecondaryAngle"],9465:["FL","PositionerIsocenterDetectorRotationAngle"],9466:["FL","TableXPositionToIsocenter"],9467:["FL","TableYPositionToIsocenter"],9468:["FL","TableZPositionToIsocenter"],9469:["FL","TableHorizontalRotationAngle"],9470:["FL","TableHeadTiltAngle"],9471:["FL","TableCradleTiltAngle"],9472:["SQ","FrameDisplayShutterSequence"],9473:["FL","AcquiredImageAreaDoseProduct"],9474:["CS","CArmPositionerTabletopRelationship"],9476:["SQ","XRayGeometrySequence"],9477:["SQ","IrradiationEventIdentificationSequence"],9504:["SQ","XRay3DFrameTypeSequence"],9506:["SQ","ContributingSourcesSequence"],9507:["SQ","XRay3DAcquisitionSequence"],9508:["FL","PrimaryPositionerScanArc"],9509:["FL","SecondaryPositionerScanArc"],9510:["FL ","PrimaryPositionerScanStartAngle"],9511:["FL","SecondaryPositionerScanStartAngle"],9514:["FL","PrimaryPositionerIncrement"],9515:["FL","SecondaryPositionerIncrement"],9516:["DT","StartAcquisitionDateTime"],9517:["DT","EndAcquisitionDateTime"],9524:["LO","ApplicationName"],9525:["LO","ApplicationVersion"],9526:["LO","ApplicationManufacturer"],9527:["CS","AlgorithmType"],9528:["LO","AlgorithmDescription"],9530:["SQ","XRay3DReconstructionSequence"],9531:["LO","ReconstructionDescription"],9538:["SQ","PerProjectionAcquisitionSequence"],9601:["SQ","DiffusionBMatrixSequence"],9602:["FD","DiffusionBValueXX"],9603:["FD","DiffusionBValueXY"],9604:["FD","DiffusionBValueXZ"],9605:["FD","DiffusionBValueYY"],9606:["FD","DiffusionBValueYZ"],9607:["FD","DiffusionBValueZZ"],9701:["DT","DecayCorrectionDateTime"],9715:["FD","StartDensityThreshold"],9716:["FD","StartRelativeDensityDifferenceThreshold"],9717:["FD","StartCardiacTriggerCountThreshold"],9718:["FD","StartRespiratoryTriggerCountThreshold"],9719:["FD","TerminationCountsThreshold"],9720:["FD","TerminationDensityThreshold"],9721:["FD","TerminationRelativeDensityThreshold"],9722:["FD","TerminationTimeThreshold"],9723:["FD","TerminationCardiacTriggerCountThreshold"],9724:["FD","TerminationRespiratoryTriggerCountThreshold"],9725:["CS","DetectorGeometry"],9726:["FD","TransverseDetectorSeparation"],9727:["FD","AxialDetectorDimension"],9729:["US","RadiopharmaceuticalAgentNumber"],9732:["SQ","PETFrameAcquisitionSequence"],9733:["SQ","PETDetectorMotionDetailsSequence"],9734:["SQ","PETTableDynamicsSequence"],9735:["SQ","PETPositionSequence"],9736:["SQ","PETFrameCorrectionFactorsSequence"],9737:["SQ","RadiopharmaceuticalUsageSequence"],9738:["CS","AttenuationCorrectionSource"],9739:["US","NumberOfIterations"],9740:["US","NumberOfSubsets"],9749:["SQ","PETReconstructionSequence"],9751:["SQ","PETFrameTypeSequence"],9755:["CS","TimeOfFlightInformationUsed"],9756:["CS","ReconstructionType"],9758:["CS","DecayCorrected"],9759:["CS","AttenuationCorrected"],9760:["CS","ScatterCorrected"],9761:["CS","DeadTimeCorrected"],9762:["CS","GantryMotionCorrected"],9763:["CS","PatientMotionCorrected"],9764:["CS","CountLossNormalizationCorrected"],9765:["CS","RandomsCorrected"],9766:["CS","NonUniformRadialSamplingCorrected"],9767:["CS","SensitivityCalibrated"],9768:["CS","DetectorNormalizationCorrection"],9769:["CS","IterativeReconstructionMethod"],9770:["CS","AttenuationCorrectionTemporalRelationship"],9771:["SQ","PatientPhysiologicalStateSequence"],9772:["SQ","PatientPhysiologicalStateCodeSequence"],9801:["FD","DepthsOfFocus"],9803:["SQ","ExcludedIntervalsSequence"],9804:["DT","ExclusionStartDatetime"],9805:["FD","ExclusionDuration"],9806:["SQ","USImageDescriptionSequence"],9807:["SQ","ImageDataTypeSequence"],9808:["CS","DataType"],9809:["SQ","TransducerScanPatternCodeSequence"],"980B":["CS","AliasedDataType"],"980C":["CS","PositionMeasuringDeviceUsed"],"980D":["SQ","TransducerGeometryCodeSequence"],"980E":["SQ","TransducerBeamSteeringCodeSequence"],"980F":["SQ","TransducerApplicationCodeSequence"],A001:["SQ","ContributingEquipmentSequence"],A002:["DT","ContributionDateTime"],A003:["ST","ContributionDescription"]},"0020":{"000D":["UI","StudyInstanceUID"],"000E":["UI","SeriesInstanceUID"],"0010":["SH","StudyID"],"0011":["IS","SeriesNumber"],"0012":["IS","AcquisitionNumber"],"0013":["IS","InstanceNumber"],"0014":["IS","IsotopeNumber"],"0015":["IS","PhaseNumber"],"0016":["IS","IntervalNumber"],"0017":["IS","TimeSlotNumber"],"0018":["IS","AngleNumber"],"0019":["IS","ItemNumber"],"0020":["CS","PatientOrientation"],"0022":["IS","OverlayNumber"],"0024":["IS","CurveNumber"],"0026":["IS","LUTNumber"],"0030":["DS","ImagePosition"],"0032":["DS","ImagePositionPatient"],"0035":["DS","ImageOrientation"],"0037":["DS","ImageOrientationPatient"],"0050":["DS","Location"],"0052":["UI","FrameOfReferenceUID"],"0060":["CS","Laterality"],"0062":["CS","ImageLaterality"],"0070":["LO","ImageGeometryType"],"0080":["CS","MaskingImage"],"00AA":["IS","ReportNumber"],"0100":["IS","TemporalPositionIdentifier"],"0105":["IS","NumberOfTemporalPositions"],"0110":["DS","TemporalResolution"],"0200":["UI","SynchronizationFrameOfReferenceUID"],"0242":["UI","SOPInstanceUIDOfConcatenationSource"],1e3:["IS","SeriesInStudy"],1001:["IS","AcquisitionsInSeries"],1002:["IS","ImagesInAcquisition"],1003:["IS","ImagesInSeries"],1004:["IS","AcquisitionsInStudy"],1005:["IS","ImagesInStudy"],1020:["LO","Reference"],1040:["LO","PositionReferenceIndicator"],1041:["DS","SliceLocation"],1070:["IS","OtherStudyNumbers"],1200:["IS","NumberOfPatientRelatedStudies"],1202:["IS","NumberOfPatientRelatedSeries"],1204:["IS","NumberOfPatientRelatedInstances"],1206:["IS","NumberOfStudyRelatedSeries"],1208:["IS","NumberOfStudyRelatedInstances"],1209:["IS","NumberOfSeriesRelatedInstances"],3401:["CS","ModifyingDeviceID"],3402:["CS","ModifiedImageID"],3403:["DA","ModifiedImageDate"],3404:["LO","ModifyingDeviceManufacturer"],3405:["TM","ModifiedImageTime"],3406:["LO","ModifiedImageDescription"],4e3:["LT","ImageComments"],5e3:["AT","OriginalImageIdentification"],5002:["LO","OriginalImageIdentificationNomenclature"],9056:["SH","StackID"],9057:["UL","InStackPositionNumber"],9071:["SQ","FrameAnatomySequence"],9072:["CS","FrameLaterality"],9111:["SQ","FrameContentSequence"],9113:["SQ","PlanePositionSequence"],9116:["SQ","PlaneOrientationSequence"],9128:["UL","TemporalPositionIndex"],9153:["FD","NominalCardiacTriggerDelayTime"],9154:["FL","NominalCardiacTriggerTimePriorToRPeak"],9155:["FL","ActualCardiacTriggerTimePriorToRPeak"],9156:["US","FrameAcquisitionNumber"],9157:["UL","DimensionIndexValues"],9158:["LT","FrameComments"],9161:["UI","ConcatenationUID"],9162:["US","InConcatenationNumber"],9163:["US","InConcatenationTotalNumber"],9164:["UI","DimensionOrganizationUID"],9165:["AT","DimensionIndexPointer"],9167:["AT","FunctionalGroupPointer"],9213:["LO","DimensionIndexPrivateCreator"],9221:["SQ","DimensionOrganizationSequence"],9222:["SQ","DimensionIndexSequence"],9228:["UL","ConcatenationFrameOffsetNumber"],9238:["LO","FunctionalGroupPrivateCreator"],9241:["FL","NominalPercentageOfCardiacPhase"],9245:["FL","NominalPercentageOfRespiratoryPhase"],9246:["FL","StartingRespiratoryAmplitude"],9247:["CS","StartingRespiratoryPhase"],9248:["FL","EndingRespiratoryAmplitude"],9249:["CS","EndingRespiratoryPhase"],9250:["CS","RespiratoryTriggerType"],9251:["FD","RRIntervalTimeNominal"],9252:["FD","ActualCardiacTriggerDelayTime"],9253:["SQ","RespiratorySynchronizationSequence"],9254:["FD","RespiratoryIntervalTime"],9255:["FD","NominalRespiratoryTriggerDelayTime"],9256:["FD","RespiratoryTriggerDelayThreshold"],9257:["FD","ActualRespiratoryTriggerDelayTime"],9301:["FD","ImagePositionVolume"],9302:["FD","ImageOrientationVolume"],9307:["CS","UltrasoundAcquisitionGeometry"],9308:["FD","ApexPosition"],9309:["FD","VolumeToTransducerMappingMatrix"],"930A":["FD","VolumeToTableMappingMatrix"],"930C":["CS","PatientFrameOfReferenceSource"],"930D":["FD","TemporalPositionTimeOffset"],"930E":["SQ","PlanePositionVolumeSequence"],"930F":["SQ","PlaneOrientationVolumeSequence"],9310:["SQ","TemporalPositionSequence"],9311:["CS","DimensionOrganizationType"],9312:["UI","VolumeFrameOfReferenceUID"],9313:["UI","TableFrameOfReferenceUID"],9421:["LO","DimensionDescriptionLabel"],9450:["SQ","PatientOrientationInFrameSequence"],9453:["LO","FrameLabel"],9518:["US","AcquisitionIndex"],9529:["SQ","ContributingSOPInstancesReferenceSequence"],9536:["US","ReconstructionIndex"]},"0022":{"0001":["US","LightPathFilterPassThroughWavelength"],"0002":["US","LightPathFilterPassBand"],"0003":["US","ImagePathFilterPassThroughWavelength"],"0004":["US","ImagePathFilterPassBand"],"0005":["CS","PatientEyeMovementCommanded"],"0006":["SQ","PatientEyeMovementCommandCodeSequence"],"0007":["FL","SphericalLensPower"],"0008":["FL","CylinderLensPower"],"0009":["FL","CylinderAxis"],"000A":["FL","EmmetropicMagnification"],"000B":["FL","IntraOcularPressure"],"000C":["FL","HorizontalFieldOfView"],"000D":["CS","PupilDilated"],"000E":["FL","DegreeOfDilation"],"0010":["FL","StereoBaselineAngle"],"0011":["FL","StereoBaselineDisplacement"],"0012":["FL","StereoHorizontalPixelOffset"],"0013":["FL","StereoVerticalPixelOffset"],"0014":["FL","StereoRotation"],"0015":["SQ","AcquisitionDeviceTypeCodeSequence"],"0016":["SQ","IlluminationTypeCodeSequence"],"0017":["SQ","LightPathFilterTypeStackCodeSequence"],"0018":["SQ","ImagePathFilterTypeStackCodeSequence"],"0019":["SQ","LensesCodeSequence"],"001A":["SQ","ChannelDescriptionCodeSequence"],"001B":["SQ","RefractiveStateSequence"],"001C":["SQ","MydriaticAgentCodeSequence"],"001D":["SQ","RelativeImagePositionCodeSequence"],"001E":["FL","CameraAngleOfView"],"0020":["SQ","StereoPairsSequence"],"0021":["SQ","LeftImageSequence"],"0022":["SQ","RightImageSequence"],"0030":["FL","AxialLengthOfTheEye"],"0031":["SQ","OphthalmicFrameLocationSequence"],"0032":["FL","ReferenceCoordinates"],"0035":["FL","DepthSpatialResolution"],"0036":["FL","MaximumDepthDistortion"],"0037":["FL","AlongScanSpatialResolution"],"0038":["FL","MaximumAlongScanDistortion"],"0039":["CS","OphthalmicImageOrientation"],"0041":["FL","DepthOfTransverseImage"],"0042":["SQ","MydriaticAgentConcentrationUnitsSequence"],"0048":["FL","AcrossScanSpatialResolution"],"0049":["FL","MaximumAcrossScanDistortion"],"004E":["DS","MydriaticAgentConcentration"],"0055":["FL","IlluminationWaveLength"],"0056":["FL","IlluminationPower"],"0057":["FL","IlluminationBandwidth"],"0058":["SQ","MydriaticAgentSequence"],1007:["SQ","OphthalmicAxialMeasurementsRightEyeSequence"],1008:["SQ","OphthalmicAxialMeasurementsLeftEyeSequence"],1010:["CS","OphthalmicAxialLengthMeasurementsType"],1019:["FL","OphthalmicAxialLength"],1024:["SQ","LensStatusCodeSequence"],1025:["SQ","VitreousStatusCodeSequence"],1028:["SQ","IOLFormulaCodeSequence"],1029:["LO","IOLFormulaDetail"],1033:["FL","KeratometerIndex"],1035:["SQ","SourceOfOphthalmicAxialLengthCodeSequence"],1037:["FL","TargetRefraction"],1039:["CS","RefractiveProcedureOccurred"],1040:["SQ","RefractiveSurgeryTypeCodeSequence"],1044:["SQ","OphthalmicUltrasoundAxialMeasurementsTypeCodeSequence"],1050:["SQ","OphthalmicAxialLengthMeasurementsSequence"],1053:["FL","IOLPower"],1054:["FL","PredictedRefractiveError"],1059:["FL","OphthalmicAxialLengthVelocity"],1065:["LO","LensStatusDescription"],1066:["LO","VitreousStatusDescription"],1090:["SQ","IOLPowerSequence"],1092:["SQ","LensConstantSequence"],1093:["LO","IOLManufacturer"],1094:["LO","LensConstantDescription"],1096:["SQ","KeratometryMeasurementTypeCodeSequence"],1100:["SQ","ReferencedOphthalmicAxialMeasurementsSequence"],1101:["SQ","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],1103:["SQ","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],1121:["FL","IOLPowerForExactEmmetropia"],1122:["FL","IOLPowerForExactTargetRefraction"],1125:["SQ","AnteriorChamberDepthDefinitionCodeSequence"],1130:["FL","LensThickness"],1131:["FL","AnteriorChamberDepth"],1132:["SQ","SourceOfLensThicknessDataCodeSequence"],1133:["SQ","SourceOfAnteriorChamberDepthDataCodeSequence"],1135:["SQ","SourceOfRefractiveErrorDataCodeSequence"],1140:["CS","OphthalmicAxialLengthMeasurementModified"],1150:["SQ","OphthalmicAxialLengthDataSourceCodeSequence"],1153:["SQ","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],1155:["FL","SignalToNoiseRatio"],1159:["LO","OphthalmicAxialLengthDataSourceDescription"],1210:["SQ","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],1211:["SQ","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],1212:["SQ","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],1220:["SQ","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],1225:["SQ","OpticalOphthalmicAxialLengthMeasurementsSequence"],1230:["SQ","UltrasoundSelectedOphthalmicAxialLengthSequence"],1250:["SQ","OphthalmicAxialLengthSelectionMethodCodeSequence"],1255:["SQ","OpticalSelectedOphthalmicAxialLengthSequence"],1257:["SQ","SelectedSegmentalOphthalmicAxialLengthSequence"],1260:["SQ","SelectedTotalOphthalmicAxialLengthSequence"],1262:["SQ","OphthalmicAxialLengthQualityMetricSequence"],1273:["LO","OphthalmicAxialLengthQualityMetricTypeDescription"],1300:["SQ","IntraocularLensCalculationsRightEyeSequence"],1310:["SQ","IntraocularLensCalculationsLeftEyeSequence"],1330:["SQ","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"]},"0024":{"0010":["FL","VisualFieldHorizontalExtent"],"0011":["FL","VisualFieldVerticalExtent"],"0012":["CS","VisualFieldShape"],"0016":["SQ","ScreeningTestModeCodeSequence"],"0018":["FL","MaximumStimulusLuminance"],"0020":["FL","BackgroundLuminance"],"0021":["SQ","StimulusColorCodeSequence"],"0024":["SQ","BackgroundIlluminationColorCodeSequence"],"0025":["FL","StimulusArea"],"0028":["FL","StimulusPresentationTime"],"0032":["SQ","FixationSequence"],"0033":["SQ","FixationMonitoringCodeSequence"],"0034":["SQ","VisualFieldCatchTrialSequence"],"0035":["US","FixationCheckedQuantity"],"0036":["US","PatientNotProperlyFixatedQuantity"],"0037":["CS","PresentedVisualStimuliDataFlag"],"0038":["US","NumberOfVisualStimuli"],"0039":["CS","ExcessiveFixationLossesDataFlag"],"0040":["CS","ExcessiveFixationLosses"],"0042":["US","StimuliRetestingQuantity"],"0044":["LT","CommentsOnPatientPerformanceOfVisualField"],"0045":["CS","FalseNegativesEstimateFlag"],"0046":["FL","FalseNegativesEstimate"],"0048":["US","NegativeCatchTrialsQuantity"],"0050":["US","FalseNegativesQuantity"],"0051":["CS","ExcessiveFalseNegativesDataFlag"],"0052":["CS","ExcessiveFalseNegatives"],"0053":["CS","FalsePositivesEstimateFlag"],"0054":["FL","FalsePositivesEstimate"],"0055":["CS","CatchTrialsDataFlag"],"0056":["US","PositiveCatchTrialsQuantity"],"0057":["CS","TestPointNormalsDataFlag"],"0058":["SQ","TestPointNormalsSequence"],"0059":["CS","GlobalDeviationProbabilityNormalsFlag"],"0060":["US","FalsePositivesQuantity"],"0061":["CS","ExcessiveFalsePositivesDataFlag"],"0062":["CS","ExcessiveFalsePositives"],"0063":["CS","VisualFieldTestNormalsFlag"],"0064":["SQ","ResultsNormalsSequence"],"0065":["SQ","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0066":["FL","GlobalDeviationFromNormal"],"0067":["SQ","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0068":["FL","LocalizedDeviationfromNormal"],"0069":["LO","PatientReliabilityIndicator"],"0070":["FL","VisualFieldMeanSensitivity"],"0071":["FL","GlobalDeviationProbability"],"0072":["CS","LocalDeviationProbabilityNormalsFlag"],"0073":["FL","LocalizedDeviationProbability"],"0074":["CS","ShortTermFluctuationCalculated"],"0075":["FL","ShortTermFluctuation"],"0076":["CS","ShortTermFluctuationProbabilityCalculated"],"0077":["FL","ShortTermFluctuationProbability"],"0078":["CS","CorrectedLocalizedDeviationFromNormalCalculated"],"0079":["FL","CorrectedLocalizedDeviationFromNormal"],"0080":["CS","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0081":["FL","CorrectedLocalizedDeviationFromNormalProbability"],"0083":["SQ","GlobalDeviationProbabilitySequence"],"0085":["SQ","LocalizedDeviationProbabilitySequence"],"0086":["CS","FovealSensitivityMeasured"],"0087":["FL","FovealSensitivity"],"0088":["FL","VisualFieldTestDuration"],"0089":["SQ","VisualFieldTestPointSequence"],"0090":["FL","VisualFieldTestPointXCoordinate"],"0091":["FL","VisualFieldTestPointYCoordinate"],"0092":["FL","AgeCorrectedSensitivityDeviationValue"],"0093":["CS","StimulusResults"],"0094":["FL","SensitivityValue"],"0095":["CS","RetestStimulusSeen"],"0096":["FL","RetestSensitivityValue"],"0097":["SQ","VisualFieldTestPointNormalsSequence"],"0098":["FL","QuantifiedDefect"],"0100":["FL","AgeCorrectedSensitivityDeviationProbabilityValue"],"0102":["CS","GeneralizedDefectCorrectedSensitivityDeviationFlag "],"0103":["FL","GeneralizedDefectCorrectedSensitivityDeviationValue "],"0104":["FL","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0105":["FL ","MinimumSensitivityValue"],"0106":["CS","BlindSpotLocalized"],"0107":["FL","BlindSpotXCoordinate"],"0108":["FL","BlindSpotYCoordinate "],"0110":["SQ","VisualAcuityMeasurementSequence"],"0112":["SQ","RefractiveParametersUsedOnPatientSequence"],"0113":["CS","MeasurementLaterality"],"0114":["SQ","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0115":["SQ","OphthalmicPatientClinicalInformationRightEyeSequence"],"0117":["CS","FovealPointNormativeDataFlag"],"0118":["FL","FovealPointProbabilityValue"],"0120":["CS","ScreeningBaselineMeasured"],"0122":["SQ","ScreeningBaselineMeasuredSequence"],"0124":["CS","ScreeningBaselineType"],"0126":["FL","ScreeningBaselineValue"],"0202":["LO","AlgorithmSource"],"0306":["LO","DataSetName"],"0307":["LO","DataSetVersion"],"0308":["LO","DataSetSource"],"0309":["LO","DataSetDescription"],"0317":["SQ","VisualFieldTestReliabilityGlobalIndexSequence"],"0320":["SQ","VisualFieldGlobalResultsIndexSequence"],"0325":["SQ","DataObservationSequence"],"0338":["CS","IndexNormalsFlag"],"0341":["FL","IndexProbability"],"0344":["SQ","IndexProbabilitySequence"]},"0028":{"0002":["US","SamplesPerPixel"],"0003":["US","SamplesPerPixelUsed"],"0004":["CS","PhotometricInterpretation"],"0005":["US","ImageDimensions"],"0006":["US","PlanarConfiguration"],"0008":["IS","NumberOfFrames"],"0009":["AT","FrameIncrementPointer"],"000A":["AT","FrameDimensionPointer"],"0010":["US","Rows"],"0011":["US","Columns"],"0012":["US","Planes"],"0014":["US","UltrasoundColorDataPresent"],"0030":["DS","PixelSpacing"],"0031":["DS","ZoomFactor"],"0032":["DS","ZoomCenter"],"0034":["IS","PixelAspectRatio"],"0040":["CS","ImageFormat"],"0050":["LO","ManipulatedImage"],"0051":["CS","CorrectedImage"],"005F":["LO","CompressionRecognitionCode"],"0060":["CS","CompressionCode"],"0061":["SH","CompressionOriginator"],"0062":["LO","CompressionLabel"],"0063":["SH","CompressionDescription"],"0065":["CS","CompressionSequence"],"0066":["AT","CompressionStepPointers"],"0068":["US","RepeatInterval"],"0069":["US","BitsGrouped"],"0070":["US","PerimeterTable"],"0071":["SS","PerimeterValue"],"0080":["US","PredictorRows"],"0081":["US","PredictorColumns"],"0082":["US","PredictorConstants"],"0090":["CS","BlockedPixels"],"0091":["US","BlockRows"],"0092":["US","BlockColumns"],"0093":["US","RowOverlap"],"0094":["US","ColumnOverlap"],"0100":["US","BitsAllocated"],"0101":["US","BitsStored"],"0102":["US","HighBit"],"0103":["US","PixelRepresentation"],"0104":["SS","SmallestValidPixelValue"],"0105":["SS","LargestValidPixelValue"],"0106":["SS","SmallestImagePixelValue"],"0107":["SS","LargestImagePixelValue"],"0108":["SS","SmallestPixelValueInSeries"],"0109":["SS","LargestPixelValueInSeries"],"0110":["SS","SmallestImagePixelValueInPlane"],"0111":["SS","LargestImagePixelValueInPlane"],"0120":["SS","PixelPaddingValue"],"0121":["SS","PixelPaddingRangeLimit"],"0200":["US","ImageLocation"],"0300":["CS","QualityControlImage"],"0301":["CS","BurnedInAnnotation"],"0302":["CS","RecognizableVisualFeatures"],"0303":["CS","LongitudinalTemporalInformationModified"],"0400":["LO","TransformLabel"],"0401":["LO","TransformVersionNumber"],"0402":["US","NumberOfTransformSteps"],"0403":["LO","SequenceOfCompressedData"],"0404":["AT","DetailsOfCoefficients"],"0700":["LO","DCTLabel"],"0701":["CS","DataBlockDescription"],"0702":["AT","DataBlock"],"0710":["US","NormalizationFactorFormat"],"0720":["US","ZonalMapNumberFormat"],"0721":["AT","ZonalMapLocation"],"0722":["US","ZonalMapFormat"],"0730":["US","AdaptiveMapFormat"],"0740":["US","CodeNumberFormat"],"0A02":["CS","PixelSpacingCalibrationType"],"0A04":["LO","PixelSpacingCalibrationDescription"],1040:["CS","PixelIntensityRelationship"],1041:["SS","PixelIntensityRelationshipSign"],1050:["DS","WindowCenter"],1051:["DS","WindowWidth"],1052:["DS","RescaleIntercept"],1053:["DS","RescaleSlope"],1054:["LO","RescaleType"],1055:["LO","WindowCenterWidthExplanation"],1056:["CS","VOILUTFunction"],1080:["CS","GrayScale"],1090:["CS","RecommendedViewingMode"],1100:["SS","GrayLookupTableDescriptor"],1101:["SS","RedPaletteColorLookupTableDescriptor"],1102:["SS","GreenPaletteColorLookupTableDescriptor"],1103:["SS","BluePaletteColorLookupTableDescriptor"],1104:["US","AlphaPaletteColorLookupTableDescriptor"],1111:["SS","LargeRedPaletteColorLookupTableDescriptor"],1112:["SS","LargeGreenPaletteColorLookupTableDescriptor"],1113:["SS","LargeBluePaletteColorLookupTableDescriptor"],1199:["UI","PaletteColorLookupTableUID"],1200:["OW","GrayLookupTableData"],1201:["OW","RedPaletteColorLookupTableData"],1202:["OW","GreenPaletteColorLookupTableData"],1203:["OW","BluePaletteColorLookupTableData"],1204:["OW","AlphaPaletteColorLookupTableData"],1211:["OW","LargeRedPaletteColorLookupTableData"],1212:["OW","LargeGreenPaletteColorLookupTableData"],1213:["OW","LargeBluePaletteColorLookupTableData"],1214:["UI","LargePaletteColorLookupTableUID"],1221:["OW","SegmentedRedPaletteColorLookupTableData"],1222:["OW","SegmentedGreenPaletteColorLookupTableData"],1223:["OW","SegmentedBluePaletteColorLookupTableData"],1300:["CS","BreastImplantPresent"],1350:["CS","PartialView"],1351:["ST","PartialViewDescription"],1352:["SQ","PartialViewCodeSequence"],"135A":["CS","SpatialLocationsPreserved"],1401:["SQ","DataFrameAssignmentSequence"],1402:["CS","DataPathAssignment"],1403:["US","BitsMappedToColorLookupTable"],1404:["SQ","BlendingLUT1Sequence"],1405:["CS","BlendingLUT1TransferFunction"],1406:["FD","BlendingWeightConstant"],1407:["US","BlendingLookupTableDescriptor"],1408:["OW","BlendingLookupTableData"],"140B":["SQ","EnhancedPaletteColorLookupTableSequence"],"140C":["SQ","BlendingLUT2Sequence"],"140D":["CS","BlendingLUT2TransferFunction"],"140E":["CS","DataPathID"],"140F":["CS","RGBLUTTransferFunction"],1410:["CS","AlphaLUTTransferFunction"],2e3:["OB","ICCProfile"],2110:["CS","LossyImageCompression"],2112:["DS","LossyImageCompressionRatio"],2114:["CS","LossyImageCompressionMethod"],3e3:["SQ","ModalityLUTSequence"],3002:["SS","LUTDescriptor"],3003:["LO","LUTExplanation"],3004:["LO","ModalityLUTType"],3006:["OW","LUTData"],3010:["SQ","VOILUTSequence"],3110:["SQ","SoftcopyVOILUTSequence"],4e3:["LT","ImagePresentationComments"],5e3:["SQ","BiPlaneAcquisitionSequence"],6010:["US","RepresentativeFrameNumber"],6020:["US","FrameNumbersOfInterest"],6022:["LO","FrameOfInterestDescription"],6023:["CS","FrameOfInterestType"],6030:["US","MaskPointers"],6040:["US","RWavePointer"],6100:["SQ","MaskSubtractionSequence"],6101:["CS","MaskOperation"],6102:["US","ApplicableFrameRange"],6110:["US","MaskFrameNumbers"],6112:["US","ContrastFrameAveraging"],6114:["FL","MaskSubPixelShift"],6120:["SS","TIDOffset"],6190:["ST","MaskOperationExplanation"],"7FE0":["UT","PixelDataProviderURL"],9001:["UL","DataPointRows"],9002:["UL","DataPointColumns"],9003:["CS","SignalDomainColumns"],9099:["US","LargestMonochromePixelValue"],9108:["CS","DataRepresentation"],9110:["SQ","PixelMeasuresSequence"],9132:["SQ","FrameVOILUTSequence"],9145:["SQ","PixelValueTransformationSequence"],9235:["CS","SignalDomainRows"],9411:["FL","DisplayFilterPercentage"],9415:["SQ","FramePixelShiftSequence"],9416:["US","SubtractionItemID"],9422:["SQ","PixelIntensityRelationshipLUTSequence"],9443:["SQ","FramePixelDataPropertiesSequence"],9444:["CS","GeometricalProperties"],9445:["FL","GeometricMaximumDistortion"],9446:["CS","ImageProcessingApplied"],9454:["CS","MaskSelectionMode"],9474:["CS","LUTFunction"],9478:["FL","MaskVisibilityPercentage"],9501:["SQ","PixelShiftSequence"],9502:["SQ","RegionPixelShiftSequence"],9503:["SS","VerticesOfTheRegion"],9505:["SQ","MultiFramePresentationSequence"],9506:["US","PixelShiftFrameRange"],9507:["US","LUTFrameRange"],9520:["DS","ImageToEquipmentMappingMatrix"],9537:["CS","EquipmentCoordinateSystemIdentification"]},"0032":{"000A":["CS","StudyStatusID"],"000C":["CS","StudyPriorityID"],"0012":["LO","StudyIDIssuer"],"0032":["DA","StudyVerifiedDate"],"0033":["TM","StudyVerifiedTime"],"0034":["DA","StudyReadDate"],"0035":["TM","StudyReadTime"],1e3:["DA","ScheduledStudyStartDate"],1001:["TM","ScheduledStudyStartTime"],1010:["DA","ScheduledStudyStopDate"],1011:["TM","ScheduledStudyStopTime"],1020:["LO","ScheduledStudyLocation"],1021:["AE","ScheduledStudyLocationAETitle"],1030:["LO","ReasonForStudy"],1031:["SQ","RequestingPhysicianIdentificationSequence"],1032:["PN","RequestingPhysician"],1033:["LO","RequestingService"],1034:["SQ","RequestingServiceCodeSequence"],1040:["DA","StudyArrivalDate"],1041:["TM","StudyArrivalTime"],1050:["DA","StudyCompletionDate"],1051:["TM","StudyCompletionTime"],1055:["CS","StudyComponentStatusID"],1060:["LO","RequestedProcedureDescription"],1064:["SQ","RequestedProcedureCodeSequence"],1070:["LO","RequestedContrastAgent"],4e3:["LT","StudyComments"]},"0038":{"0004":["SQ","ReferencedPatientAliasSequence"],"0008":["CS","VisitStatusID"],"0010":["LO","AdmissionID"],"0011":["LO","IssuerOfAdmissionID"],"0014":["SQ","IssuerOfAdmissionIDSequence"],"0016":["LO","RouteOfAdmissions"],"001A":["DA","ScheduledAdmissionDate"],"001B":["TM","ScheduledAdmissionTime"],"001C":["DA","ScheduledDischargeDate"],"001D":["TM","ScheduledDischargeTime"],"001E":["LO","ScheduledPatientInstitutionResidence"],"0020":["DA","AdmittingDate"],"0021":["TM","AdmittingTime"],"0030":["DA","DischargeDate"],"0032":["TM","DischargeTime"],"0040":["LO","DischargeDiagnosisDescription"],"0044":["SQ","DischargeDiagnosisCodeSequence"],"0050":["LO","SpecialNeeds"],"0060":["LO","ServiceEpisodeID"],"0061":["LO","IssuerOfServiceEpisodeID"],"0062":["LO","ServiceEpisodeDescription"],"0064":["SQ","IssuerOfServiceEpisodeIDSequence"],"0100":["SQ","PertinentDocumentsSequence"],"0300":["LO","CurrentPatientLocation"],"0400":["LO","PatientInstitutionResidence"],"0500":["LO","PatientState"],"0502":["SQ","PatientClinicalTrialParticipationSequence"],4e3:["LT","VisitComments"]},"003A":{"0004":["CS","WaveformOriginality"],"0005":["US","NumberOfWaveformChannels"],"0010":["UL","NumberOfWaveformSamples"],"001A":["DS","SamplingFrequency"],"0020":["SH","MultiplexGroupLabel"],"0200":["SQ","ChannelDefinitionSequence"],"0202":["IS","WaveformChannelNumber"],"0203":["SH","ChannelLabel"],"0205":["CS","ChannelStatus"],"0208":["SQ","ChannelSourceSequence"],"0209":["SQ","ChannelSourceModifiersSequence"],"020A":["SQ","SourceWaveformSequence"],"020C":["LO","ChannelDerivationDescription"],"0210":["DS","ChannelSensitivity"],"0211":["SQ","ChannelSensitivityUnitsSequence"],"0212":["DS","ChannelSensitivityCorrectionFactor"],"0213":["DS","ChannelBaseline"],"0214":["DS","ChannelTimeSkew"],"0215":["DS","ChannelSampleSkew"],"0218":["DS","ChannelOffset"],"021A":["US","WaveformBitsStored"],"0220":["DS","FilterLowFrequency"],"0221":["DS","FilterHighFrequency"],"0222":["DS","NotchFilterFrequency"],"0223":["DS","NotchFilterBandwidth"],"0230":["FL","WaveformDataDisplayScale"],"0231":["US","WaveformDisplayBackgroundCIELabValue"],"0240":["SQ","WaveformPresentationGroupSequence"],"0241":["US","PresentationGroupNumber"],"0242":["SQ","ChannelDisplaySequence"],"0244":["US","ChannelRecommendedDisplayCIELabValue"],"0245":["FL","ChannelPosition"],"0246":["CS","DisplayShadingFlag"],"0247":["FL","FractionalChannelDisplayScale"],"0248":["FL","AbsoluteChannelDisplayScale"],"0300":["SQ","MultiplexedAudioChannelsDescriptionCodeSequence"],"0301":["IS","ChannelIdentificationCode"],"0302":["CS","ChannelMode"]},"0040":{"0001":["AE","ScheduledStationAETitle"],"0002":["DA","ScheduledProcedureStepStartDate"],"0003":["TM","ScheduledProcedureStepStartTime"],"0004":["DA","ScheduledProcedureStepEndDate"],"0005":["TM","ScheduledProcedureStepEndTime"],"0006":["PN","ScheduledPerformingPhysicianName"],"0007":["LO","ScheduledProcedureStepDescription"],"0008":["SQ","ScheduledProtocolCodeSequence"],"0009":["SH","ScheduledProcedureStepID"],"000A":["SQ","StageCodeSequence"],"000B":["SQ","ScheduledPerformingPhysicianIdentificationSequence"],"0010":["SH","ScheduledStationName"],"0011":["SH","ScheduledProcedureStepLocation"],"0012":["LO","PreMedication"],"0020":["CS","ScheduledProcedureStepStatus"],"0026":["SQ","OrderPlacerIdentifierSequence"],"0027":["SQ","OrderFillerIdentifierSequence"],"0031":["UT","LocalNamespaceEntityID"],"0032":["UT","UniversalEntityID"],"0033":["CS","UniversalEntityIDType"],"0035":["CS","IdentifierTypeCode"],"0036":["SQ","AssigningFacilitySequence"],"0039":["SQ","AssigningJurisdictionCodeSequence"],"003A":["SQ","AssigningAgencyOrDepartmentCodeSequence"],"0100":["SQ","ScheduledProcedureStepSequence"],"0220":["SQ","ReferencedNonImageCompositeSOPInstanceSequence"],"0241":["AE","PerformedStationAETitle"],"0242":["SH","PerformedStationName"],"0243":["SH","PerformedLocation"],"0244":["DA","PerformedProcedureStepStartDate"],"0245":["TM","PerformedProcedureStepStartTime"],"0250":["DA","PerformedProcedureStepEndDate"],"0251":["TM","PerformedProcedureStepEndTime"],"0252":["CS","PerformedProcedureStepStatus"],"0253":["SH","PerformedProcedureStepID"],"0254":["LO","PerformedProcedureStepDescription"],"0255":["LO","PerformedProcedureTypeDescription"],"0260":["SQ","PerformedProtocolCodeSequence"],"0261":["CS","PerformedProtocolType"],"0270":["SQ","ScheduledStepAttributesSequence"],"0275":["SQ","RequestAttributesSequence"],"0280":["ST","CommentsOnThePerformedProcedureStep"],"0281":["SQ","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0293":["SQ","QuantitySequence"],"0294":["DS","Quantity"],"0295":["SQ","MeasuringUnitsSequence"],"0296":["SQ","BillingItemSequence"],"0300":["US","TotalTimeOfFluoroscopy"],"0301":["US","TotalNumberOfExposures"],"0302":["US","EntranceDose"],"0303":["US","ExposedArea"],"0306":["DS","DistanceSourceToEntrance"],"0307":["DS","DistanceSourceToSupport"],"030E":["SQ","ExposureDoseSequence"],"0310":["ST","CommentsOnRadiationDose"],"0312":["DS","XRayOutput"],"0314":["DS","HalfValueLayer"],"0316":["DS","OrganDose"],"0318":["CS","OrganExposed"],"0320":["SQ","BillingProcedureStepSequence"],"0321":["SQ","FilmConsumptionSequence"],"0324":["SQ","BillingSuppliesAndDevicesSequence"],"0330":["SQ","ReferencedProcedureStepSequence"],"0340":["SQ","PerformedSeriesSequence"],"0400":["LT","CommentsOnTheScheduledProcedureStep"],"0440":["SQ","ProtocolContextSequence"],"0441":["SQ","ContentItemModifierSequence"],"0500":["SQ","ScheduledSpecimenSequence"],"050A":["LO","SpecimenAccessionNumber"],"0512":["LO","ContainerIdentifier"],"0513":["SQ","IssuerOfTheContainerIdentifierSequence"],"0515":["SQ","AlternateContainerIdentifierSequence"],"0518":["SQ","ContainerTypeCodeSequence"],"051A":["LO","ContainerDescription"],"0520":["SQ","ContainerComponentSequence"],"0550":["SQ","SpecimenSequence"],"0551":["LO","SpecimenIdentifier"],"0552":["SQ","SpecimenDescriptionSequenceTrial"],"0553":["ST","SpecimenDescriptionTrial"],"0554":["UI","SpecimenUID"],"0555":["SQ","AcquisitionContextSequence"],"0556":["ST","AcquisitionContextDescription"],"059A":["SQ","SpecimenTypeCodeSequence"],"0560":["SQ","SpecimenDescriptionSequence"],"0562":["SQ","IssuerOfTheSpecimenIdentifierSequence"],"0600":["LO","SpecimenShortDescription"],"0602":["UT","SpecimenDetailedDescription"],"0610":["SQ","SpecimenPreparationSequence"],"0612":["SQ","SpecimenPreparationStepContentItemSequence"],"0620":["SQ","SpecimenLocalizationContentItemSequence"],"06FA":["LO","SlideIdentifier"],"071A":["SQ","ImageCenterPointCoordinatesSequence"],"072A":["DS","XOffsetInSlideCoordinateSystem"],"073A":["DS","YOffsetInSlideCoordinateSystem"],"074A":["DS","ZOffsetInSlideCoordinateSystem"],"08D8":["SQ","PixelSpacingSequence"],"08DA":["SQ","CoordinateSystemAxisCodeSequence"],"08EA":["SQ","MeasurementUnitsCodeSequence"],"09F8":["SQ","VitalStainCodeSequenceTrial"],1001:["SH","RequestedProcedureID"],1002:["LO","ReasonForTheRequestedProcedure"],1003:["SH","RequestedProcedurePriority"],1004:["LO","PatientTransportArrangements"],1005:["LO","RequestedProcedureLocation"],1006:["SH","PlacerOrderNumberProcedure"],1007:["SH","FillerOrderNumberProcedure"],1008:["LO","ConfidentialityCode"],1009:["SH","ReportingPriority"],"100A":["SQ","ReasonForRequestedProcedureCodeSequence"],1010:["PN","NamesOfIntendedRecipientsOfResults"],1011:["SQ","IntendedRecipientsOfResultsIdentificationSequence"],1012:["SQ","ReasonForPerformedProcedureCodeSequence"],1060:["LO","RequestedProcedureDescriptionTrial"],1101:["SQ","PersonIdentificationCodeSequence"],1102:["ST","PersonAddress"],1103:["LO","PersonTelephoneNumbers"],1400:["LT","RequestedProcedureComments"],2001:["LO","ReasonForTheImagingServiceRequest"],2004:["DA","IssueDateOfImagingServiceRequest"],2005:["TM","IssueTimeOfImagingServiceRequest"],2006:["SH","PlacerOrderNumberImagingServiceRequestRetired"],2007:["SH","FillerOrderNumberImagingServiceRequestRetired"],2008:["PN","OrderEnteredBy"],2009:["SH","OrderEntererLocation"],2010:["SH","OrderCallbackPhoneNumber"],2016:["LO","PlacerOrderNumberImagingServiceRequest"],2017:["LO","FillerOrderNumberImagingServiceRequest"],2400:["LT","ImagingServiceRequestComments"],3001:["LO","ConfidentialityConstraintOnPatientDataDescription"],4001:["CS","GeneralPurposeScheduledProcedureStepStatus"],4002:["CS","GeneralPurposePerformedProcedureStepStatus"],4003:["CS","GeneralPurposeScheduledProcedureStepPriority"],4004:["SQ","ScheduledProcessingApplicationsCodeSequence"],4005:["DT","ScheduledProcedureStepStartDateTime"],4006:["CS","MultipleCopiesFlag"],4007:["SQ","PerformedProcessingApplicationsCodeSequence"],4009:["SQ","HumanPerformerCodeSequence"],4010:["DT","ScheduledProcedureStepModificationDateTime"],4011:["DT","ExpectedCompletionDateTime"],4015:["SQ","ResultingGeneralPurposePerformedProcedureStepsSequence"],4016:["SQ","ReferencedGeneralPurposeScheduledProcedureStepSequence"],4018:["SQ","ScheduledWorkitemCodeSequence"],4019:["SQ","PerformedWorkitemCodeSequence"],4020:["CS","InputAvailabilityFlag"],4021:["SQ","InputInformationSequence"],4022:["SQ","RelevantInformationSequence"],4023:["UI","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],4025:["SQ","ScheduledStationNameCodeSequence"],4026:["SQ","ScheduledStationClassCodeSequence"],4027:["SQ","ScheduledStationGeographicLocationCodeSequence"],4028:["SQ","PerformedStationNameCodeSequence"],4029:["SQ","PerformedStationClassCodeSequence"],4030:["SQ","PerformedStationGeographicLocationCodeSequence"],4031:["SQ","RequestedSubsequentWorkitemCodeSequence"],4032:["SQ","NonDICOMOutputCodeSequence"],4033:["SQ","OutputInformationSequence"],4034:["SQ","ScheduledHumanPerformersSequence"],4035:["SQ","ActualHumanPerformersSequence"],4036:["LO","HumanPerformerOrganization"],4037:["PN","HumanPerformerName"],4040:["CS","RawDataHandling"],4041:["CS","InputReadinessState"],4050:["DT","PerformedProcedureStepStartDateTime"],4051:["DT","PerformedProcedureStepEndDateTime"],4052:["DT","ProcedureStepCancellationDateTime"],8302:["DS","EntranceDoseInmGy"],9094:["SQ","ReferencedImageRealWorldValueMappingSequence"],9096:["SQ","RealWorldValueMappingSequence"],9098:["SQ","PixelValueMappingCodeSequence"],9210:["SH","LUTLabel"],9211:["SS","RealWorldValueLastValueMapped"],9212:["FD","RealWorldValueLUTData"],9216:["SS","RealWorldValueFirstValueMapped"],9224:["FD","RealWorldValueIntercept"],9225:["FD","RealWorldValueSlope"],A007:["CS","FindingsFlagTrial"],A010:["CS","RelationshipType"],A020:["SQ","FindingsSequenceTrial"],A021:["UI","FindingsGroupUIDTrial"],A022:["UI","ReferencedFindingsGroupUIDTrial"],A023:["DA","FindingsGroupRecordingDateTrial"],A024:["TM","FindingsGroupRecordingTimeTrial"],A026:["SQ","FindingsSourceCategoryCodeSequenceTrial"],A027:["LO","VerifyingOrganization"],A028:["SQ","DocumentingOrganizationIdentifierCodeSequenceTrial"],A030:["DT","VerificationDateTime"],A032:["DT","ObservationDateTime"],A040:["CS","ValueType"],A043:["SQ","ConceptNameCodeSequence"],A047:["LO","MeasurementPrecisionDescriptionTrial"],A050:["CS","ContinuityOfContent"],A057:["CS","UrgencyOrPriorityAlertsTrial"],A060:["LO","SequencingIndicatorTrial"],A066:["SQ","DocumentIdentifierCodeSequenceTrial"],A067:["PN","DocumentAuthorTrial"],A068:["SQ","DocumentAuthorIdentifierCodeSequenceTrial"],A070:["SQ","IdentifierCodeSequenceTrial"],A073:["SQ","VerifyingObserverSequence"],A074:["OB","ObjectBinaryIdentifierTrial"],A075:["PN","VerifyingObserverName"],A076:["SQ","DocumentingObserverIdentifierCodeSequenceTrial"],A078:["SQ","AuthorObserverSequence"],A07A:["SQ","ParticipantSequence"],A07C:["SQ","CustodialOrganizationSequence"],A080:["CS","ParticipationType"],A082:["DT","ParticipationDateTime"],A084:["CS","ObserverType"],A085:["SQ","ProcedureIdentifierCodeSequenceTrial"],A088:["SQ","VerifyingObserverIdentificationCodeSequence"],A089:["OB","ObjectDirectoryBinaryIdentifierTrial"],A090:["SQ","EquivalentCDADocumentSequence"],A0B0:["US","ReferencedWaveformChannels"],A110:["DA","DateOfDocumentOrVerbalTransactionTrial"],A112:["TM","TimeOfDocumentCreationOrVerbalTransactionTrial"],A120:["DT","DateTime"],A121:["DA","Date"],A122:["TM","Time"],A123:["PN","PersonName"],A124:["UI","UID"],A125:["CS","ReportStatusIDTrial"],A130:["CS","TemporalRangeType"],A132:["UL","ReferencedSamplePositions"],A136:["US","ReferencedFrameNumbers"],A138:["DS","ReferencedTimeOffsets"],A13A:["DT","ReferencedDateTime"],A160:["UT","TextValue"],A167:["SQ","ObservationCategoryCodeSequenceTrial"],A168:["SQ","ConceptCodeSequence"],A16A:["ST","BibliographicCitationTrial"],A170:["SQ","PurposeOfReferenceCodeSequence"],A171:["UI","ObservationUIDTrial"],A172:["UI","ReferencedObservationUIDTrial"],A173:["CS","ReferencedObservationClassTrial"],A174:["CS","ReferencedObjectObservationClassTrial"],A180:["US","AnnotationGroupNumber"],A192:["DA","ObservationDateTrial"],A193:["TM","ObservationTimeTrial"],A194:["CS","MeasurementAutomationTrial"],A195:["SQ","ModifierCodeSequence"],A224:["ST","IdentificationDescriptionTrial"],A290:["CS","CoordinatesSetGeometricTypeTrial"],A296:["SQ","AlgorithmCodeSequenceTrial"],A297:["ST","AlgorithmDescriptionTrial"],A29A:["SL","PixelCoordinatesSetTrial"],A300:["SQ","MeasuredValueSequence"],A301:["SQ","NumericValueQualifierCodeSequence"],A307:["PN","CurrentObserverTrial"],A30A:["DS","NumericValue"],A313:["SQ","ReferencedAccessionSequenceTrial"],A33A:["ST","ReportStatusCommentTrial"],A340:["SQ","ProcedureContextSequenceTrial"],A352:["PN","VerbalSourceTrial"],A353:["ST","AddressTrial"],A354:["LO","TelephoneNumberTrial"],A358:["SQ","VerbalSourceIdentifierCodeSequenceTrial"],A360:["SQ","PredecessorDocumentsSequence"],A370:["SQ","ReferencedRequestSequence"],A372:["SQ","PerformedProcedureCodeSequence"],A375:["SQ","CurrentRequestedProcedureEvidenceSequence"],A380:["SQ","ReportDetailSequenceTrial"],A385:["SQ","PertinentOtherEvidenceSequence"],A390:["SQ","HL7StructuredDocumentReferenceSequence"],A402:["UI","ObservationSubjectUIDTrial"],A403:["CS","ObservationSubjectClassTrial"],A404:["SQ","ObservationSubjectTypeCodeSequenceTrial"],A491:["CS","CompletionFlag"],A492:["LO","CompletionFlagDescription"],A493:["CS","VerificationFlag"],A494:["CS","ArchiveRequested"],A496:["CS","PreliminaryFlag"],A504:["SQ","ContentTemplateSequence"],A525:["SQ","IdenticalDocumentsSequence"],A600:["CS","ObservationSubjectContextFlagTrial"],A601:["CS","ObserverContextFlagTrial"],A603:["CS","ProcedureContextFlagTrial"],A730:["SQ","ContentSequence"],A731:["SQ","RelationshipSequenceTrial"],A732:["SQ","RelationshipTypeCodeSequenceTrial"],A744:["SQ","LanguageCodeSequenceTrial"],A992:["ST","UniformResourceLocatorTrial"],B020:["SQ","WaveformAnnotationSequence"],DB00:["CS","TemplateIdentifier"],DB06:["DT","TemplateVersion"],DB07:["DT","TemplateLocalVersion"],DB0B:["CS","TemplateExtensionFlag"],DB0C:["UI","TemplateExtensionOrganizationUID"],DB0D:["UI","TemplateExtensionCreatorUID"],DB73:["UL","ReferencedContentItemIdentifier"],E001:["ST","HL7InstanceIdentifier"],E004:["DT","HL7DocumentEffectiveTime"],E006:["SQ","HL7DocumentTypeCodeSequence"],E008:["SQ","DocumentClassCodeSequence"],E010:["UT","RetrieveURI"],E011:["UI","RetrieveLocationUID"],E020:["CS","TypeOfInstances"],E021:["SQ","DICOMRetrievalSequence"],E022:["SQ","DICOMMediaRetrievalSequence"],E023:["SQ","WADORetrievalSequence"],E024:["SQ","XDSRetrievalSequence"],E030:["UI","RepositoryUniqueID"],E031:["UI","HomeCommunityID"]},"0042":{"0010":["ST","DocumentTitle"],"0011":["OB","EncapsulatedDocument"],"0012":["LO","MIMETypeOfEncapsulatedDocument"],"0013":["SQ","SourceInstanceSequence"],"0014":["LO","ListOfMIMETypes"]},"0044":{"0001":["ST","ProductPackageIdentifier"],"0002":["CS","SubstanceAdministrationApproval"],"0003":["LT","ApprovalStatusFurtherDescription"],"0004":["DT","ApprovalStatusDateTime"],"0007":["SQ","ProductTypeCodeSequence"],"0008":["LO","ProductName"],"0009":["LT","ProductDescription"],"000A":["LO","ProductLotIdentifier"],"000B":["DT","ProductExpirationDateTime"],"0010":["DT","SubstanceAdministrationDateTime"],"0011":["LO","SubstanceAdministrationNotes"],"0012":["LO","SubstanceAdministrationDeviceID"],"0013":["SQ","ProductParameterSequence"],"0019":["SQ","SubstanceAdministrationParameterSequence"]},"0046":{"0012":["LO","LensDescription"],"0014":["SQ","RightLensSequence"],"0015":["SQ","LeftLensSequence"],"0016":["SQ","UnspecifiedLateralityLensSequence"],"0018":["SQ","CylinderSequence"],"0028":["SQ","PrismSequence"],"0030":["FD","HorizontalPrismPower"],"0032":["CS","HorizontalPrismBase"],"0034":["FD","VerticalPrismPower"],"0036":["CS","VerticalPrismBase"],"0038":["CS","LensSegmentType"],"0040":["FD","OpticalTransmittance"],"0042":["FD","ChannelWidth"],"0044":["FD","PupilSize"],"0046":["FD","CornealSize"],"0050":["SQ","AutorefractionRightEyeSequence"],"0052":["SQ","AutorefractionLeftEyeSequence"],"0060":["FD","DistancePupillaryDistance"],"0062":["FD","NearPupillaryDistance"],"0063":["FD","IntermediatePupillaryDistance"],"0064":["FD","OtherPupillaryDistance"],"0070":["SQ","KeratometryRightEyeSequence"],"0071":["SQ","KeratometryLeftEyeSequence"],"0074":["SQ","SteepKeratometricAxisSequence"],"0075":["FD","RadiusOfCurvature"],"0076":["FD","KeratometricPower"],"0077":["FD","KeratometricAxis"],"0080":["SQ","FlatKeratometricAxisSequence"],"0092":["CS","BackgroundColor"],"0094":["CS","Optotype"],"0095":["CS","OptotypePresentation"],"0097":["SQ","SubjectiveRefractionRightEyeSequence"],"0098":["SQ","SubjectiveRefractionLeftEyeSequence"],"0100":["SQ","AddNearSequence"],"0101":["SQ","AddIntermediateSequence"],"0102":["SQ","AddOtherSequence"],"0104":["FD","AddPower"],"0106":["FD","ViewingDistance"],"0121":["SQ","VisualAcuityTypeCodeSequence"],"0122":["SQ","VisualAcuityRightEyeSequence"],"0123":["SQ","VisualAcuityLeftEyeSequence"],"0124":["SQ","VisualAcuityBothEyesOpenSequence"],"0125":["CS","ViewingDistanceType"],"0135":["SS","VisualAcuityModifiers"],"0137":["FD","DecimalVisualAcuity"],"0139":["LO","OptotypeDetailedDefinition"],"0145":["SQ","ReferencedRefractiveMeasurementsSequence"],"0146":["FD","SpherePower"],"0147":["FD","CylinderPower"]},"0048":{"0001":["FL","ImagedVolumeWidth"],"0002":["FL","ImagedVolumeHeight"],"0003":["FL","ImagedVolumeDepth"],"0006":["UL","TotalPixelMatrixColumns"],"0007":["UL","TotalPixelMatrixRows"],"0008":["SQ","TotalPixelMatrixOriginSequence"],"0010":["CS","SpecimenLabelInImage"],"0011":["CS","FocusMethod"],"0012":["CS","ExtendedDepthOfField"],"0013":["US","NumberOfFocalPlanes"],"0014":["FL","DistanceBetweenFocalPlanes"],"0015":["US","RecommendedAbsentPixelCIELabValue"],"0100":["SQ","IlluminatorTypeCodeSequence"],"0102":["DS","ImageOrientationSlide"],"0105":["SQ","OpticalPathSequence"],"0106":["SH","OpticalPathIdentifier"],"0107":["ST","OpticalPathDescription"],"0108":["SQ","IlluminationColorCodeSequence"],"0110":["SQ","SpecimenReferenceSequence"],"0111":["DS","CondenserLensPower"],"0112":["DS","ObjectiveLensPower"],"0113":["DS","ObjectiveLensNumericalAperture"],"0120":["SQ","PaletteColorLookupTableSequence"],"0200":["SQ","ReferencedImageNavigationSequence"],"0201":["US","TopLeftHandCornerOfLocalizerArea"],"0202":["US","BottomRightHandCornerOfLocalizerArea"],"0207":["SQ","OpticalPathIdentificationSequence"],"021A":["SQ","PlanePositionSlideSequence"],"021E":["SL","RowPositionInTotalImagePixelMatrix"],"021F":["SL","ColumnPositionInTotalImagePixelMatrix"],"0301":["CS","PixelOriginInterpretation"]},"0050":{"0004":["CS","CalibrationImage"],"0010":["SQ","DeviceSequence"],"0012":["SQ","ContainerComponentTypeCodeSequence"],"0013":["FD","ContainerComponentThickness"],"0014":["DS","DeviceLength"],"0015":["FD","ContainerComponentWidth"],"0016":["DS","DeviceDiameter"],"0017":["CS","DeviceDiameterUnits"],"0018":["DS","DeviceVolume"],"0019":["DS","InterMarkerDistance"],"001A":["CS","ContainerComponentMaterial"],"001B":["LO","ContainerComponentID"],"001C":["FD","ContainerComponentLength"],"001D":["FD","ContainerComponentDiameter"],"001E":["LO","ContainerComponentDescription"],"0020":["LO","DeviceDescription"]},"0052":{"0001":["FL","ContrastBolusIngredientPercentByVolume"],"0002":["FD","OCTFocalDistance"],"0003":["FD","BeamSpotSize"],"0004":["FD","EffectiveRefractiveIndex"],"0006":["CS","OCTAcquisitionDomain"],"0007":["FD","OCTOpticalCenterWavelength"],"0008":["FD","AxialResolution"],"0009":["FD","RangingDepth"],"0011":["FD","ALineRate"],"0012":["US","ALinesPerFrame"],"0013":["FD","CatheterRotationalRate"],"0014":["FD","ALinePixelSpacing"],"0016":["SQ","ModeOfPercutaneousAccessSequence"],"0025":["SQ","IntravascularOCTFrameTypeSequence"],"0026":["CS","OCTZOffsetApplied"],"0027":["SQ","IntravascularFrameContentSequence"],"0028":["FD","IntravascularLongitudinalDistance"],"0029":["SQ","IntravascularOCTFrameContentSequence"],"0030":["SS","OCTZOffsetCorrection"],"0031":["CS","CatheterDirectionOfRotation"],"0033":["FD","SeamLineLocation"],"0034":["FD","FirstALineLocation"],"0036":["US","SeamLineIndex"],"0038":["US","NumberOfPaddedAlines"],"0039":["CS","InterpolationType"],"003A":["CS","RefractiveIndexApplied"]},"0054":{"0010":["US","EnergyWindowVector"],"0011":["US","NumberOfEnergyWindows"],"0012":["SQ","EnergyWindowInformationSequence"],"0013":["SQ","EnergyWindowRangeSequence"],"0014":["DS","EnergyWindowLowerLimit"],"0015":["DS","EnergyWindowUpperLimit"],"0016":["SQ","RadiopharmaceuticalInformationSequence"],"0017":["IS","ResidualSyringeCounts"],"0018":["SH","EnergyWindowName"],"0020":["US","DetectorVector"],"0021":["US","NumberOfDetectors"],"0022":["SQ","DetectorInformationSequence"],"0030":["US","PhaseVector"],"0031":["US","NumberOfPhases"],"0032":["SQ","PhaseInformationSequence"],"0033":["US","NumberOfFramesInPhase"],"0036":["IS","PhaseDelay"],"0038":["IS","PauseBetweenFrames"],"0039":["CS","PhaseDescription"],"0050":["US","RotationVector"],"0051":["US","NumberOfRotations"],"0052":["SQ","RotationInformationSequence"],"0053":["US","NumberOfFramesInRotation"],"0060":["US","RRIntervalVector"],"0061":["US","NumberOfRRIntervals"],"0062":["SQ","GatedInformationSequence"],"0063":["SQ","DataInformationSequence"],"0070":["US","TimeSlotVector"],"0071":["US","NumberOfTimeSlots"],"0072":["SQ","TimeSlotInformationSequence"],"0073":["DS","TimeSlotTime"],"0080":["US","SliceVector"],"0081":["US","NumberOfSlices"],"0090":["US","AngularViewVector"],"0100":["US","TimeSliceVector"],"0101":["US","NumberOfTimeSlices"],"0200":["DS","StartAngle"],"0202":["CS","TypeOfDetectorMotion"],"0210":["IS","TriggerVector"],"0211":["US","NumberOfTriggersInPhase"],"0220":["SQ","ViewCodeSequence"],"0222":["SQ","ViewModifierCodeSequence"],"0300":["SQ","RadionuclideCodeSequence"],"0302":["SQ","AdministrationRouteCodeSequence"],"0304":["SQ","RadiopharmaceuticalCodeSequence"],"0306":["SQ","CalibrationDataSequence"],"0308":["US","EnergyWindowNumber"],"0400":["SH","ImageID"],"0410":["SQ","PatientOrientationCodeSequence"],"0412":["SQ","PatientOrientationModifierCodeSequence"],"0414":["SQ","PatientGantryRelationshipCodeSequence"],"0500":["CS","SliceProgressionDirection"],1e3:["CS","SeriesType"],1001:["CS","Units"],1002:["CS","CountsSource"],1004:["CS","ReprojectionMethod"],1006:["CS","SUVType"],1100:["CS","RandomsCorrectionMethod"],1101:["LO","AttenuationCorrectionMethod"],1102:["CS","DecayCorrection"],1103:["LO","ReconstructionMethod"],1104:["LO","DetectorLinesOfResponseUsed"],1105:["LO","ScatterCorrectionMethod"],1200:["DS","AxialAcceptance"],1201:["IS","AxialMash"],1202:["IS","TransverseMash"],1203:["DS","DetectorElementSize"],1210:["DS","CoincidenceWindowWidth"],1220:["CS","SecondaryCountsType"],1300:["DS","FrameReferenceTime"],1310:["IS","PrimaryPromptsCountsAccumulated"],1311:["IS","SecondaryCountsAccumulated"],1320:["DS","SliceSensitivityFactor"],1321:["DS","DecayFactor"],1322:["DS","DoseCalibrationFactor"],1323:["DS","ScatterFractionFactor"],1324:["DS","DeadTimeFactor"],1330:["US","ImageIndex"],1400:["CS","CountsIncluded"],1401:["CS","DeadTimeCorrectionFlag"]},"0060":{3e3:["SQ","HistogramSequence"],3002:["US","HistogramNumberOfBins"],3004:["SS","HistogramFirstBinValue"],3006:["SS","HistogramLastBinValue"],3008:["US","HistogramBinWidth"],3010:["LO","HistogramExplanation"],3020:["UL","HistogramData"]},"0062":{"0001":["CS","SegmentationType"],"0002":["SQ","SegmentSequence"],"0003":["SQ","SegmentedPropertyCategoryCodeSequence"],"0004":["US","SegmentNumber"],"0005":["LO","SegmentLabel"],"0006":["ST","SegmentDescription"],"0008":["CS","SegmentAlgorithmType"],"0009":["LO","SegmentAlgorithmName"],"000A":["SQ","SegmentIdentificationSequence"],"000B":["US","ReferencedSegmentNumber"],"000C":["US","RecommendedDisplayGrayscaleValue"],"000D":["US","RecommendedDisplayCIELabValue"],"000E":["US","MaximumFractionalValue"],"000F":["SQ","SegmentedPropertyTypeCodeSequence"],"0010":["CS","SegmentationFractionalType"]},"0064":{"0002":["SQ","DeformableRegistrationSequence"],"0003":["UI","SourceFrameOfReferenceUID"],"0005":["SQ","DeformableRegistrationGridSequence"],"0007":["UL","GridDimensions"],"0008":["FD","GridResolution"],"0009":["OF","VectorGridData"],"000F":["SQ","PreDeformationMatrixRegistrationSequence"],"0010":["SQ","PostDeformationMatrixRegistrationSequence"]},"0066":{"0001":["UL","NumberOfSurfaces"],"0002":["SQ","SurfaceSequence"],"0003":["UL","SurfaceNumber"],"0004":["LT","SurfaceComments"],"0009":["CS","SurfaceProcessing"],"000A":["FL","SurfaceProcessingRatio"],"000B":["LO","SurfaceProcessingDescription"],"000C":["FL","RecommendedPresentationOpacity"],"000D":["CS","RecommendedPresentationType"],"000E":["CS","FiniteVolume"],"0010":["CS","Manifold"],"0011":["SQ","SurfacePointsSequence"],"0012":["SQ","SurfacePointsNormalsSequence"],"0013":["SQ","SurfaceMeshPrimitivesSequence"],"0015":["UL","NumberOfSurfacePoints"],"0016":["OF","PointCoordinatesData"],"0017":["FL","PointPositionAccuracy"],"0018":["FL","MeanPointDistance"],"0019":["FL","MaximumPointDistance"],"001A":["FL","PointsBoundingBoxCoordinates"],"001B":["FL","AxisOfRotation"],"001C":["FL","CenterOfRotation"],"001E":["UL","NumberOfVectors"],"001F":["US","VectorDimensionality"],"0020":["FL","VectorAccuracy"],"0021":["OF","VectorCoordinateData"],"0023":["OW","TrianglePointIndexList"],"0024":["OW","EdgePointIndexList"],"0025":["OW","VertexPointIndexList"],"0026":["SQ","TriangleStripSequence"],"0027":["SQ","TriangleFanSequence"],"0028":["SQ","LineSequence"],"0029":["OW","PrimitivePointIndexList"],"002A":["UL","SurfaceCount"],"002B":["SQ","ReferencedSurfaceSequence"],"002C":["UL","ReferencedSurfaceNumber"],"002D":["SQ","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"002E":["SQ","SegmentSurfaceSourceInstanceSequence"],"002F":["SQ","AlgorithmFamilyCodeSequence"],"0030":["SQ","AlgorithmNameCodeSequence"],"0031":["LO","AlgorithmVersion"],"0032":["LT","AlgorithmParameters"],"0034":["SQ","FacetSequence"],"0035":["SQ","SurfaceProcessingAlgorithmIdentificationSequence"],"0036":["LO","AlgorithmName"]},"0068":{6210:["LO","ImplantSize"],6221:["LO","ImplantTemplateVersion"],6222:["SQ","ReplacedImplantTemplateSequence"],6223:["CS","ImplantType"],6224:["SQ","DerivationImplantTemplateSequence"],6225:["SQ","OriginalImplantTemplateSequence"],6226:["DT","EffectiveDateTime"],6230:["SQ","ImplantTargetAnatomySequence"],6260:["SQ","InformationFromManufacturerSequence"],6265:["SQ","NotificationFromManufacturerSequence"],6270:["DT","InformationIssueDateTime"],6280:["ST","InformationSummary"],"62A0":["SQ","ImplantRegulatoryDisapprovalCodeSequence"],"62A5":["FD","OverallTemplateSpatialTolerance"],"62C0":["SQ","HPGLDocumentSequence"],"62D0":["US","HPGLDocumentID"],"62D5":["LO","HPGLDocumentLabel"],"62E0":["SQ","ViewOrientationCodeSequence"],"62F0":["FD","ViewOrientationModifier"],"62F2":["FD","HPGLDocumentScaling"],6300:["OB","HPGLDocument"],6310:["US","HPGLContourPenNumber"],6320:["SQ","HPGLPenSequence"],6330:["US","HPGLPenNumber"],6340:["LO","HPGLPenLabel"],6345:["ST","HPGLPenDescription"],6346:["FD","RecommendedRotationPoint"],6347:["FD","BoundingRectangle"],6350:["US","ImplantTemplate3DModelSurfaceNumber"],6360:["SQ","SurfaceModelDescriptionSequence"],6380:["LO","SurfaceModelLabel"],6390:["FD","SurfaceModelScalingFactor"],"63A0":["SQ","MaterialsCodeSequence"],"63A4":["SQ","CoatingMaterialsCodeSequence"],"63A8":["SQ","ImplantTypeCodeSequence"],"63AC":["SQ","FixationMethodCodeSequence"],"63B0":["SQ","MatingFeatureSetsSequence"],"63C0":["US","MatingFeatureSetID"],"63D0":["LO","MatingFeatureSetLabel"],"63E0":["SQ","MatingFeatureSequence"],"63F0":["US","MatingFeatureID"],6400:["SQ","MatingFeatureDegreeOfFreedomSequence"],6410:["US","DegreeOfFreedomID"],6420:["CS","DegreeOfFreedomType"],6430:["SQ","TwoDMatingFeatureCoordinatesSequence"],6440:["US","ReferencedHPGLDocumentID"],6450:["FD","TwoDMatingPoint"],6460:["FD","TwoDMatingAxes"],6470:["SQ","TwoDDegreeOfFreedomSequence"],6490:["FD","ThreeDDegreeOfFreedomAxis"],"64A0":["FD","RangeOfFreedom"],"64C0":["FD","ThreeDMatingPoint"],"64D0":["FD","ThreeDMatingAxes"],"64F0":["FD","TwoDDegreeOfFreedomAxis"],6500:["SQ","PlanningLandmarkPointSequence"],6510:["SQ","PlanningLandmarkLineSequence"],6520:["SQ","PlanningLandmarkPlaneSequence"],6530:["US","PlanningLandmarkID"],6540:["LO","PlanningLandmarkDescription"],6545:["SQ","PlanningLandmarkIdentificationCodeSequence"],6550:["SQ","TwoDPointCoordinatesSequence"],6560:["FD","TwoDPointCoordinates"],6590:["FD","ThreeDPointCoordinates"],"65A0":["SQ","TwoDLineCoordinatesSequence"],"65B0":["FD","TwoDLineCoordinates"],"65D0":["FD","ThreeDLineCoordinates"],"65E0":["SQ","TwoDPlaneCoordinatesSequence"],"65F0":["FD","TwoDPlaneIntersection"],6610:["FD","ThreeDPlaneOrigin"],6620:["FD","ThreeDPlaneNormal"]},"0070":{"0001":["SQ","GraphicAnnotationSequence"],"0002":["CS","GraphicLayer"],"0003":["CS","BoundingBoxAnnotationUnits"],"0004":["CS","AnchorPointAnnotationUnits"],"0005":["CS","GraphicAnnotationUnits"],"0006":["ST","UnformattedTextValue"],"0008":["SQ","TextObjectSequence"],"0009":["SQ","GraphicObjectSequence"],"0010":["FL","BoundingBoxTopLeftHandCorner"],"0011":["FL","BoundingBoxBottomRightHandCorner"],"0012":["CS","BoundingBoxTextHorizontalJustification"],"0014":["FL","AnchorPoint"],"0015":["CS","AnchorPointVisibility"],"0020":["US","GraphicDimensions"],"0021":["US","NumberOfGraphicPoints"],"0022":["FL","GraphicData"],"0023":["CS","GraphicType"],"0024":["CS","GraphicFilled"],"0040":["IS","ImageRotationRetired"],"0041":["CS","ImageHorizontalFlip"],"0042":["US","ImageRotation"],"0050":["US","DisplayedAreaTopLeftHandCornerTrial"],"0051":["US","DisplayedAreaBottomRightHandCornerTrial"],"0052":["SL","DisplayedAreaTopLeftHandCorner"],"0053":["SL","DisplayedAreaBottomRightHandCorner"],"005A":["SQ","DisplayedAreaSelectionSequence"],"0060":["SQ","GraphicLayerSequence"],"0062":["IS","GraphicLayerOrder"],"0066":["US","GraphicLayerRecommendedDisplayGrayscaleValue"],"0067":["US","GraphicLayerRecommendedDisplayRGBValue"],"0068":["LO","GraphicLayerDescription"],"0080":["CS","ContentLabel"],"0081":["LO","ContentDescription"],"0082":["DA","PresentationCreationDate"],"0083":["TM","PresentationCreationTime"],"0084":["PN","ContentCreatorName"],"0086":["SQ","ContentCreatorIdentificationCodeSequence"],"0087":["SQ","AlternateContentDescriptionSequence"],"0100":["CS","PresentationSizeMode"],"0101":["DS","PresentationPixelSpacing"],"0102":["IS","PresentationPixelAspectRatio"],"0103":["FL","PresentationPixelMagnificationRatio"],"0207":["LO","GraphicGroupLabel"],"0208":["ST","GraphicGroupDescription"],"0209":["SQ","CompoundGraphicSequence"],"0226":["UL","CompoundGraphicInstanceID"],"0227":["LO","FontName"],"0228":["CS","FontNameType"],"0229":["LO","CSSFontName"],"0230":["FD","RotationAngle"],"0231":["SQ","TextStyleSequence"],"0232":["SQ","LineStyleSequence"],"0233":["SQ","FillStyleSequence"],"0234":["SQ","GraphicGroupSequence"],"0241":["US","TextColorCIELabValue"],"0242":["CS","HorizontalAlignment"],"0243":["CS","VerticalAlignment"],"0244":["CS","ShadowStyle"],"0245":["FL","ShadowOffsetX"],"0246":["FL","ShadowOffsetY"],"0247":["US","ShadowColorCIELabValue"],"0248":["CS","Underlined"],"0249":["CS","Bold"],"0250":["CS","Italic"],"0251":["US","PatternOnColorCIELabValue"],"0252":["US","PatternOffColorCIELabValue"],"0253":["FL","LineThickness"],"0254":["CS","LineDashingStyle"],"0255":["UL","LinePattern"],"0256":["OB","FillPattern"],"0257":["CS","FillMode"],"0258":["FL","ShadowOpacity"],"0261":["FL","GapLength"],"0262":["FL","DiameterOfVisibility"],"0273":["FL","RotationPoint"],"0274":["CS","TickAlignment"],"0278":["CS","ShowTickLabel"],"0279":["CS","TickLabelAlignment"],"0282":["CS","CompoundGraphicUnits"],"0284":["FL","PatternOnOpacity"],"0285":["FL","PatternOffOpacity"],"0287":["SQ","MajorTicksSequence"],"0288":["FL","TickPosition"],"0289":["SH","TickLabel"],"0294":["CS","CompoundGraphicType"],"0295":["UL","GraphicGroupID"],"0306":["CS","ShapeType"],"0308":["SQ","RegistrationSequence"],"0309":["SQ","MatrixRegistrationSequence"],"030A":["SQ","MatrixSequence"],"030C":["CS","FrameOfReferenceTransformationMatrixType"],"030D":["SQ","RegistrationTypeCodeSequence"],"030F":["ST","FiducialDescription"],"0310":["SH","FiducialIdentifier"],"0311":["SQ","FiducialIdentifierCodeSequence"],"0312":["FD","ContourUncertaintyRadius"],"0314":["SQ","UsedFiducialsSequence"],"0318":["SQ","GraphicCoordinatesDataSequence"],"031A":["UI","FiducialUID"],"031C":["SQ","FiducialSetSequence"],"031E":["SQ","FiducialSequence"],"0401":["US","GraphicLayerRecommendedDisplayCIELabValue"],"0402":["SQ","BlendingSequence"],"0403":["FL","RelativeOpacity"],"0404":["SQ","ReferencedSpatialRegistrationSequence"],"0405":["CS","BlendingPosition"]},"0072":{"0002":["SH","HangingProtocolName"],"0004":["LO","HangingProtocolDescription"],"0006":["CS","HangingProtocolLevel"],"0008":["LO","HangingProtocolCreator"],"000A":["DT","HangingProtocolCreationDateTime"],"000C":["SQ","HangingProtocolDefinitionSequence"],"000E":["SQ","HangingProtocolUserIdentificationCodeSequence"],"0010":["LO","HangingProtocolUserGroupName"],"0012":["SQ","SourceHangingProtocolSequence"],"0014":["US","NumberOfPriorsReferenced"],"0020":["SQ","ImageSetsSequence"],"0022":["SQ","ImageSetSelectorSequence"],"0024":["CS","ImageSetSelectorUsageFlag"],"0026":["AT","SelectorAttribute"],"0028":["US","SelectorValueNumber"],"0030":["SQ","TimeBasedImageSetsSequence"],"0032":["US","ImageSetNumber"],"0034":["CS","ImageSetSelectorCategory"],"0038":["US","RelativeTime"],"003A":["CS","RelativeTimeUnits"],"003C":["SS","AbstractPriorValue"],"003E":["SQ","AbstractPriorCodeSequence"],"0040":["LO","ImageSetLabel"],"0050":["CS","SelectorAttributeVR"],"0052":["AT","SelectorSequencePointer"],"0054":["LO","SelectorSequencePointerPrivateCreator"],"0056":["LO","SelectorAttributePrivateCreator"],"0060":["AT","SelectorATValue"],"0062":["CS","SelectorCSValue"],"0064":["IS","SelectorISValue"],"0066":["LO","SelectorLOValue"],"0068":["LT","SelectorLTValue"],"006A":["PN","SelectorPNValue"],"006C":["SH","SelectorSHValue"],"006E":["ST","SelectorSTValue"],"0070":["UT","SelectorUTValue"],"0072":["DS","SelectorDSValue"],"0074":["FD","SelectorFDValue"],"0076":["FL","SelectorFLValue"],"0078":["UL","SelectorULValue"],"007A":["US","SelectorUSValue"],"007C":["SL","SelectorSLValue"],"007E":["SS","SelectorSSValue"],"0080":["SQ","SelectorCodeSequenceValue"],"0100":["US","NumberOfScreens"],"0102":["SQ","NominalScreenDefinitionSequence"],"0104":["US","NumberOfVerticalPixels"],"0106":["US","NumberOfHorizontalPixels"],"0108":["FD","DisplayEnvironmentSpatialPosition"],"010A":["US","ScreenMinimumGrayscaleBitDepth"],"010C":["US","ScreenMinimumColorBitDepth"],"010E":["US","ApplicationMaximumRepaintTime"],"0200":["SQ","DisplaySetsSequence"],"0202":["US","DisplaySetNumber"],"0203":["LO","DisplaySetLabel"],"0204":["US","DisplaySetPresentationGroup"],"0206":["LO","DisplaySetPresentationGroupDescription"],"0208":["CS","PartialDataDisplayHandling"],"0210":["SQ","SynchronizedScrollingSequence"],"0212":["US","DisplaySetScrollingGroup"],"0214":["SQ","NavigationIndicatorSequence"],"0216":["US","NavigationDisplaySet"],"0218":["US","ReferenceDisplaySets"],"0300":["SQ","ImageBoxesSequence"],"0302":["US","ImageBoxNumber"],"0304":["CS","ImageBoxLayoutType"],"0306":["US","ImageBoxTileHorizontalDimension"],"0308":["US","ImageBoxTileVerticalDimension"],"0310":["CS","ImageBoxScrollDirection"],"0312":["CS","ImageBoxSmallScrollType"],"0314":["US","ImageBoxSmallScrollAmount"],"0316":["CS","ImageBoxLargeScrollType"],"0318":["US","ImageBoxLargeScrollAmount"],"0320":["US","ImageBoxOverlapPriority"],"0330":["FD","CineRelativeToRealTime"],"0400":["SQ","FilterOperationsSequence"],"0402":["CS","FilterByCategory"],"0404":["CS","FilterByAttributePresence"],"0406":["CS","FilterByOperator"],"0420":["US","StructuredDisplayBackgroundCIELabValue"],"0421":["US","EmptyImageBoxCIELabValue"],"0422":["SQ","StructuredDisplayImageBoxSequence"],"0424":["SQ","StructuredDisplayTextBoxSequence"],"0427":["SQ","ReferencedFirstFrameSequence"],"0430":["SQ","ImageBoxSynchronizationSequence"],"0432":["US","SynchronizedImageBoxList"],"0434":["CS","TypeOfSynchronization"],"0500":["CS","BlendingOperationType"],"0510":["CS","ReformattingOperationType"],"0512":["FD","ReformattingThickness"],"0514":["FD","ReformattingInterval"],"0516":["CS","ReformattingOperationInitialViewDirection"],"0520":["CS","ThreeDRenderingType"],"0600":["SQ","SortingOperationsSequence"],"0602":["CS","SortByCategory"],"0604":["CS","SortingDirection"],"0700":["CS","DisplaySetPatientOrientation"],"0702":["CS","VOIType"],"0704":["CS","PseudoColorType"],"0705":["SQ","PseudoColorPaletteInstanceReferenceSequence"],"0706":["CS","ShowGrayscaleInverted"],"0710":["CS","ShowImageTrueSizeFlag"],"0712":["CS","ShowGraphicAnnotationFlag"],"0714":["CS","ShowPatientDemographicsFlag"],"0716":["CS","ShowAcquisitionTechniquesFlag"],"0717":["CS","DisplaySetHorizontalJustification"],"0718":["CS","DisplaySetVerticalJustification"]},"0074":{"0120":["FD","ContinuationStartMeterset"],"0121":["FD","ContinuationEndMeterset"],1e3:["CS","ProcedureStepState"],1002:["SQ","ProcedureStepProgressInformationSequence"],1004:["DS","ProcedureStepProgress"],1006:["ST","ProcedureStepProgressDescription"],1008:["SQ","ProcedureStepCommunicationsURISequence"],"100A":["ST","ContactURI"],"100C":["LO","ContactDisplayName"],"100E":["SQ","ProcedureStepDiscontinuationReasonCodeSequence"],1020:["SQ","BeamTaskSequence"],1022:["CS","BeamTaskType"],1024:["IS","BeamOrderIndexTrial"],1026:["FD","TableTopVerticalAdjustedPosition"],1027:["FD","TableTopLongitudinalAdjustedPosition"],1028:["FD","TableTopLateralAdjustedPosition"],"102A":["FD","PatientSupportAdjustedAngle"],"102B":["FD","TableTopEccentricAdjustedAngle"],"102C":["FD","TableTopPitchAdjustedAngle"],"102D":["FD","TableTopRollAdjustedAngle"],1030:["SQ","DeliveryVerificationImageSequence"],1032:["CS","VerificationImageTiming"],1034:["CS","DoubleExposureFlag"],1036:["CS","DoubleExposureOrdering"],1038:["DS","DoubleExposureMetersetTrial"],"103A":["DS","DoubleExposureFieldDeltaTrial"],1040:["SQ","RelatedReferenceRTImageSequence"],1042:["SQ","GeneralMachineVerificationSequence"],1044:["SQ","ConventionalMachineVerificationSequence"],1046:["SQ","IonMachineVerificationSequence"],1048:["SQ","FailedAttributesSequence"],"104A":["SQ","OverriddenAttributesSequence"],"104C":["SQ","ConventionalControlPointVerificationSequence"],"104E":["SQ","IonControlPointVerificationSequence"],1050:["SQ","AttributeOccurrenceSequence"],1052:["AT","AttributeOccurrencePointer"],1054:["UL","AttributeItemSelector"],1056:["LO","AttributeOccurrencePrivateCreator"],1057:["IS","SelectorSequencePointerItems"],1200:["CS","ScheduledProcedureStepPriority"],1202:["LO","WorklistLabel"],1204:["LO","ProcedureStepLabel"],1210:["SQ","ScheduledProcessingParametersSequence"],1212:["SQ","PerformedProcessingParametersSequence"],1216:["SQ","UnifiedProcedureStepPerformedProcedureSequence"],1220:["SQ","RelatedProcedureStepSequence"],1222:["LO","ProcedureStepRelationshipType"],1224:["SQ","ReplacedProcedureStepSequence"],1230:["LO","DeletionLock"],1234:["AE","ReceivingAE"],1236:["AE","RequestingAE"],1238:["LT","ReasonForCancellation"],1242:["CS","SCPStatus"],1244:["CS","SubscriptionListStatus"],1246:["CS","UnifiedProcedureStepListStatus"],1324:["UL","BeamOrderIndex"],1338:["FD","DoubleExposureMeterset"],"133A":["FD","DoubleExposureFieldDelta"]},"0076":{"0001":["LO","ImplantAssemblyTemplateName"],"0003":["LO","ImplantAssemblyTemplateIssuer"],"0006":["LO","ImplantAssemblyTemplateVersion"],"0008":["SQ","ReplacedImplantAssemblyTemplateSequence"],"000A":["CS","ImplantAssemblyTemplateType"],"000C":["SQ","OriginalImplantAssemblyTemplateSequence"],"000E":["SQ","DerivationImplantAssemblyTemplateSequence"],"0010":["SQ","ImplantAssemblyTemplateTargetAnatomySequence"],"0020":["SQ","ProcedureTypeCodeSequence"],"0030":["LO","SurgicalTechnique"],"0032":["SQ","ComponentTypesSequence"],"0034":["CS","ComponentTypeCodeSequence"],"0036":["CS","ExclusiveComponentType"],"0038":["CS","MandatoryComponentType"],"0040":["SQ","ComponentSequence"],"0055":["US","ComponentID"],"0060":["SQ","ComponentAssemblySequence"],"0070":["US","Component1ReferencedID"],"0080":["US","Component1ReferencedMatingFeatureSetID"],"0090":["US","Component1ReferencedMatingFeatureID"],"00A0":["US","Component2ReferencedID"],"00B0":["US","Component2ReferencedMatingFeatureSetID"],"00C0":["US","Component2ReferencedMatingFeatureID"]},"0078":{"0001":["LO","ImplantTemplateGroupName"],"0010":["ST","ImplantTemplateGroupDescription"],"0020":["LO","ImplantTemplateGroupIssuer"],"0024":["LO","ImplantTemplateGroupVersion"],"0026":["SQ","ReplacedImplantTemplateGroupSequence"],"0028":["SQ","ImplantTemplateGroupTargetAnatomySequence"],"002A":["SQ","ImplantTemplateGroupMembersSequence"],"002E":["US","ImplantTemplateGroupMemberID"],"0050":["FD","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0060":["FD","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0070":["SQ","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0090":["FD","TwoDImplantTemplateGroupMemberMatchingPoint"],"00A0":["FD","TwoDImplantTemplateGroupMemberMatchingAxes"],"00B0":["SQ","ImplantTemplateGroupVariationDimensionSequence"],"00B2":["LO","ImplantTemplateGroupVariationDimensionName"],"00B4":["SQ","ImplantTemplateGroupVariationDimensionRankSequence"],"00B6":["US","ReferencedImplantTemplateGroupMemberID"],"00B8":["US","ImplantTemplateGroupVariationDimensionRank"]},"0088":{"0130":["SH","StorageMediaFileSetID"],"0140":["UI","StorageMediaFileSetUID"],"0200":["SQ","IconImageSequence"],"0904":["LO","TopicTitle"],"0906":["ST","TopicSubject"],"0910":["LO","TopicAuthor"],"0912":["LO","TopicKeywords"]},"0100":{"0410":["CS","SOPInstanceStatus"],"0420":["DT","SOPAuthorizationDateTime"],"0424":["LT","SOPAuthorizationComment"],"0426":["LO","AuthorizationEquipmentCertificationNumber"]},"0400":{"0005":["US","MACIDNumber"],"0010":["UI","MACCalculationTransferSyntaxUID"],"0015":["CS","MACAlgorithm"],"0020":["AT","DataElementsSigned"],"0100":["UI","DigitalSignatureUID"],"0105":["DT","DigitalSignatureDateTime"],"0110":["CS","CertificateType"],"0115":["OB","CertificateOfSigner"],"0120":["OB","Signature"],"0305":["CS","CertifiedTimestampType"],"0310":["OB","CertifiedTimestamp"],"0401":["SQ","DigitalSignaturePurposeCodeSequence"],"0402":["SQ","ReferencedDigitalSignatureSequence"],"0403":["SQ","ReferencedSOPInstanceMACSequence"],"0404":["OB","MAC"],"0500":["SQ","EncryptedAttributesSequence"],"0510":["UI","EncryptedContentTransferSyntaxUID"],"0520":["OB","EncryptedContent"],"0550":["SQ","ModifiedAttributesSequence"],"0561":["SQ","OriginalAttributesSequence"],"0562":["DT","AttributeModificationDateTime"],"0563":["LO","ModifyingSystem"],"0564":["LO","SourceOfPreviousValues"],"0565":["CS","ReasonForTheAttributeModification"]},2e3:{"0010":["IS","NumberOfCopies"],"001E":["SQ","PrinterConfigurationSequence"],"0020":["CS","PrintPriority"],"0030":["CS","MediumType"],"0040":["CS","FilmDestination"],"0050":["LO","FilmSessionLabel"],"0060":["IS","MemoryAllocation"],"0061":["IS","MaximumMemoryAllocation"],"0062":["CS","ColorImagePrintingFlag"],"0063":["CS","CollationFlag"],"0065":["CS","AnnotationFlag"],"0067":["CS","ImageOverlayFlag"],"0069":["CS","PresentationLUTFlag"],"006A":["CS","ImageBoxPresentationLUTFlag"],"00A0":["US","MemoryBitDepth"],"00A1":["US","PrintingBitDepth"],"00A2":["SQ","MediaInstalledSequence"],"00A4":["SQ","OtherMediaAvailableSequence"],"00A8":["SQ","SupportedImageDisplayFormatsSequence"],"0500":["SQ","ReferencedFilmBoxSequence"],"0510":["SQ","ReferencedStoredPrintSequence"]},2010:{"0010":["ST","ImageDisplayFormat"],"0030":["CS","AnnotationDisplayFormatID"],"0040":["CS","FilmOrientation"],"0050":["CS","FilmSizeID"],"0052":["CS","PrinterResolutionID"],"0054":["CS","DefaultPrinterResolutionID"],"0060":["CS","MagnificationType"],"0080":["CS","SmoothingType"],"00A6":["CS","DefaultMagnificationType"],"00A7":["CS","OtherMagnificationTypesAvailable"],"00A8":["CS","DefaultSmoothingType"],"00A9":["CS","OtherSmoothingTypesAvailable"],"0100":["CS","BorderDensity"],"0110":["CS","EmptyImageDensity"],"0120":["US","MinDensity"],"0130":["US","MaxDensity"],"0140":["CS","Trim"],"0150":["ST","ConfigurationInformation"],"0152":["LT","ConfigurationInformationDescription"],"0154":["IS","MaximumCollatedFilms"],"015E":["US","Illumination"],"0160":["US","ReflectedAmbientLight"],"0376":["DS","PrinterPixelSpacing"],"0500":["SQ","ReferencedFilmSessionSequence"],"0510":["SQ","ReferencedImageBoxSequence"],"0520":["SQ","ReferencedBasicAnnotationBoxSequence"]},2020:{"0010":["US","ImageBoxPosition"],"0020":["CS","Polarity"],"0030":["DS","RequestedImageSize"],"0040":["CS","RequestedDecimateCropBehavior"],"0050":["CS","RequestedResolutionID"],"00A0":["CS","RequestedImageSizeFlag"],"00A2":["CS","DecimateCropResult"],"0110":["SQ","BasicGrayscaleImageSequence"],"0111":["SQ","BasicColorImageSequence"],"0130":["SQ","ReferencedImageOverlayBoxSequence"],"0140":["SQ","ReferencedVOILUTBoxSequence"]},2030:{"0010":["US","AnnotationPosition"],"0020":["LO","TextString"]},2040:{"0010":["SQ","ReferencedOverlayPlaneSequence"],"0011":["US","ReferencedOverlayPlaneGroups"],"0020":["SQ","OverlayPixelDataSequence"],"0060":["CS","OverlayMagnificationType"],"0070":["CS","OverlaySmoothingType"],"0072":["CS","OverlayOrImageMagnification"],"0074":["US","MagnifyToNumberOfColumns"],"0080":["CS","OverlayForegroundDensity"],"0082":["CS","OverlayBackgroundDensity"],"0090":["CS","OverlayMode"],"0100":["CS","ThresholdDensity"],"0500":["SQ","ReferencedImageBoxSequenceRetired"]},2050:{"0010":["SQ","PresentationLUTSequence"],"0020":["CS","PresentationLUTShape"],"0500":["SQ","ReferencedPresentationLUTSequence"]},2100:{"0010":["SH","PrintJobID"],"0020":["CS","ExecutionStatus"],"0030":["CS","ExecutionStatusInfo"],"0040":["DA","CreationDate"],"0050":["TM","CreationTime"],"0070":["AE","Originator"],"0140":["AE","DestinationAE"],"0160":["SH","OwnerID"],"0170":["IS","NumberOfFilms"],"0500":["SQ","ReferencedPrintJobSequencePullStoredPrint"]},2110:{"0010":["CS","PrinterStatus"],"0020":["CS","PrinterStatusInfo"],"0030":["LO","PrinterName"],"0099":["SH","PrintQueueID"]},2120:{"0010":["CS","QueueStatus"],"0050":["SQ","PrintJobDescriptionSequence"],"0070":["SQ","ReferencedPrintJobSequence"]},2130:{"0010":["SQ","PrintManagementCapabilitiesSequence"],"0015":["SQ","PrinterCharacteristicsSequence"],"0030":["SQ","FilmBoxContentSequence"],"0040":["SQ","ImageBoxContentSequence"],"0050":["SQ","AnnotationContentSequence"],"0060":["SQ","ImageOverlayBoxContentSequence"],"0080":["SQ","PresentationLUTContentSequence"],"00A0":["SQ","ProposedStudySequence"],"00C0":["SQ","OriginalImageSequence"]},2200:{"0001":["CS","LabelUsingInformationExtractedFromInstances"],"0002":["UT","LabelText"],"0003":["CS","LabelStyleSelection"],"0004":["LT","MediaDisposition"],"0005":["LT","BarcodeValue"],"0006":["CS","BarcodeSymbology"],"0007":["CS","AllowMediaSplitting"],"0008":["CS","IncludeNonDICOMObjects"],"0009":["CS","IncludeDisplayApplication"],"000A":["CS","PreserveCompositeInstancesAfterMediaCreation"],"000B":["US","TotalNumberOfPiecesOfMediaCreated"],"000C":["LO","RequestedMediaApplicationProfile"],"000D":["SQ","ReferencedStorageMediaSequence"],"000E":["AT","FailureAttributes"],"000F":["CS","AllowLossyCompression"],"0020":["CS","RequestPriority"]},3002:{"0002":["SH","RTImageLabel"],"0003":["LO","RTImageName"],"0004":["ST","RTImageDescription"],"000A":["CS","ReportedValuesOrigin"],"000C":["CS","RTImagePlane"],"000D":["DS","XRayImageReceptorTranslation"],"000E":["DS","XRayImageReceptorAngle"],"0010":["DS","RTImageOrientation"],"0011":["DS","ImagePlanePixelSpacing"],"0012":["DS","RTImagePosition"],"0020":["SH","RadiationMachineName"],"0022":["DS","RadiationMachineSAD"],"0024":["DS","RadiationMachineSSD"],"0026":["DS","RTImageSID"],"0028":["DS","SourceToReferenceObjectDistance"],"0029":["IS","FractionNumber"],"0030":["SQ","ExposureSequence"],"0032":["DS","MetersetExposure"],"0034":["DS","DiaphragmPosition"],"0040":["SQ","FluenceMapSequence"],"0041":["CS","FluenceDataSource"],"0042":["DS","FluenceDataScale"],"0050":["SQ","PrimaryFluenceModeSequence"],"0051":["CS","FluenceMode"],"0052":["SH","FluenceModeID"]},3004:{"0001":["CS","DVHType"],"0002":["CS","DoseUnits"],"0004":["CS","DoseType"],"0006":["LO","DoseComment"],"0008":["DS","NormalizationPoint"],"000A":["CS","DoseSummationType"],"000C":["DS","GridFrameOffsetVector"],"000E":["DS","DoseGridScaling"],"0010":["SQ","RTDoseROISequence"],"0012":["DS","DoseValue"],"0014":["CS","TissueHeterogeneityCorrection"],"0040":["DS","DVHNormalizationPoint"],"0042":["DS","DVHNormalizationDoseValue"],"0050":["SQ","DVHSequence"],"0052":["DS","DVHDoseScaling"],"0054":["CS","DVHVolumeUnits"],"0056":["IS","DVHNumberOfBins"],"0058":["DS","DVHData"],"0060":["SQ","DVHReferencedROISequence"],"0062":["CS","DVHROIContributionType"],"0070":["DS","DVHMinimumDose"],"0072":["DS","DVHMaximumDose"],"0074":["DS","DVHMeanDose"]},3006:{"0002":["SH","StructureSetLabel"],"0004":["LO","StructureSetName"],"0006":["ST","StructureSetDescription"],"0008":["DA","StructureSetDate"],"0009":["TM","StructureSetTime"],"0010":["SQ","ReferencedFrameOfReferenceSequence"],"0012":["SQ","RTReferencedStudySequence"],"0014":["SQ","RTReferencedSeriesSequence"],"0016":["SQ","ContourImageSequence"],"0020":["SQ","StructureSetROISequence"],"0022":["IS","ROINumber"],"0024":["UI","ReferencedFrameOfReferenceUID"],"0026":["LO","ROIName"],"0028":["ST","ROIDescription"],"002A":["IS","ROIDisplayColor"],"002C":["DS","ROIVolume"],"0030":["SQ","RTRelatedROISequence"],"0033":["CS","RTROIRelationship"],"0036":["CS","ROIGenerationAlgorithm"],"0038":["LO","ROIGenerationDescription"],"0039":["SQ","ROIContourSequence"],"0040":["SQ","ContourSequence"],"0042":["CS","ContourGeometricType"],"0044":["DS","ContourSlabThickness"],"0045":["DS","ContourOffsetVector"],"0046":["IS","NumberOfContourPoints"],"0048":["IS","ContourNumber"],"0049":["IS","AttachedContours"],"0050":["DS","ContourData"],"0080":["SQ","RTROIObservationsSequence"],"0082":["IS","ObservationNumber"],"0084":["IS","ReferencedROINumber"],"0085":["SH","ROIObservationLabel"],"0086":["SQ","RTROIIdentificationCodeSequence"],"0088":["ST","ROIObservationDescription"],"00A0":["SQ","RelatedRTROIObservationsSequence"],"00A4":["CS","RTROIInterpretedType"],"00A6":["PN","ROIInterpreter"],"00B0":["SQ","ROIPhysicalPropertiesSequence"],"00B2":["CS","ROIPhysicalProperty"],"00B4":["DS","ROIPhysicalPropertyValue"],"00B6":["SQ","ROIElementalCompositionSequence"],"00B7":["US","ROIElementalCompositionAtomicNumber"],"00B8":["FL","ROIElementalCompositionAtomicMassFraction"],"00C0":["SQ","FrameOfReferenceRelationshipSequence"],"00C2":["UI","RelatedFrameOfReferenceUID"],"00C4":["CS","FrameOfReferenceTransformationType"],"00C6":["DS","FrameOfReferenceTransformationMatrix"],"00C8":["LO","FrameOfReferenceTransformationComment"]},3008:{"0010":["SQ","MeasuredDoseReferenceSequence"],"0012":["ST","MeasuredDoseDescription"],"0014":["CS","MeasuredDoseType"],"0016":["DS","MeasuredDoseValue"],"0020":["SQ","TreatmentSessionBeamSequence"],"0021":["SQ","TreatmentSessionIonBeamSequence"],"0022":["IS","CurrentFractionNumber"],"0024":["DA","TreatmentControlPointDate"],"0025":["TM","TreatmentControlPointTime"],"002A":["CS","TreatmentTerminationStatus"],"002B":["SH","TreatmentTerminationCode"],"002C":["CS","TreatmentVerificationStatus"],"0030":["SQ","ReferencedTreatmentRecordSequence"],"0032":["DS","SpecifiedPrimaryMeterset"],"0033":["DS","SpecifiedSecondaryMeterset"],"0036":["DS","DeliveredPrimaryMeterset"],"0037":["DS","DeliveredSecondaryMeterset"],"003A":["DS","SpecifiedTreatmentTime"],"003B":["DS","DeliveredTreatmentTime"],"0040":["SQ","ControlPointDeliverySequence"],"0041":["SQ","IonControlPointDeliverySequence"],"0042":["DS","SpecifiedMeterset"],"0044":["DS","DeliveredMeterset"],"0045":["FL","MetersetRateSet"],"0046":["FL","MetersetRateDelivered"],"0047":["FL","ScanSpotMetersetsDelivered"],"0048":["DS","DoseRateDelivered"],"0050":["SQ","TreatmentSummaryCalculatedDoseReferenceSequence"],"0052":["DS","CumulativeDoseToDoseReference"],"0054":["DA","FirstTreatmentDate"],"0056":["DA","MostRecentTreatmentDate"],"005A":["IS","NumberOfFractionsDelivered"],"0060":["SQ","OverrideSequence"],"0061":["AT","ParameterSequencePointer"],"0062":["AT","OverrideParameterPointer"],"0063":["IS","ParameterItemIndex"],"0064":["IS","MeasuredDoseReferenceNumber"],"0065":["AT","ParameterPointer"],"0066":["ST","OverrideReason"],"0068":["SQ","CorrectedParameterSequence"],"006A":["FL","CorrectionValue"],"0070":["SQ","CalculatedDoseReferenceSequence"],"0072":["IS","CalculatedDoseReferenceNumber"],"0074":["ST","CalculatedDoseReferenceDescription"],"0076":["DS","CalculatedDoseReferenceDoseValue"],"0078":["DS","StartMeterset"],"007A":["DS","EndMeterset"],"0080":["SQ","ReferencedMeasuredDoseReferenceSequence"],"0082":["IS","ReferencedMeasuredDoseReferenceNumber"],"0090":["SQ","ReferencedCalculatedDoseReferenceSequence"],"0092":["IS","ReferencedCalculatedDoseReferenceNumber"],"00A0":["SQ","BeamLimitingDeviceLeafPairsSequence"],"00B0":["SQ","RecordedWedgeSequence"],"00C0":["SQ","RecordedCompensatorSequence"],"00D0":["SQ","RecordedBlockSequence"],"00E0":["SQ","TreatmentSummaryMeasuredDoseReferenceSequence"],"00F0":["SQ","RecordedSnoutSequence"],"00F2":["SQ","RecordedRangeShifterSequence"],"00F4":["SQ","RecordedLateralSpreadingDeviceSequence"],"00F6":["SQ","RecordedRangeModulatorSequence"],"0100":["SQ","RecordedSourceSequence"],"0105":["LO","SourceSerialNumber"],"0110":["SQ","TreatmentSessionApplicationSetupSequence"],"0116":["CS","ApplicationSetupCheck"],"0120":["SQ","RecordedBrachyAccessoryDeviceSequence"],"0122":["IS","ReferencedBrachyAccessoryDeviceNumber"],"0130":["SQ","RecordedChannelSequence"],"0132":["DS","SpecifiedChannelTotalTime"],"0134":["DS","DeliveredChannelTotalTime"],"0136":["IS","SpecifiedNumberOfPulses"],"0138":["IS","DeliveredNumberOfPulses"],"013A":["DS","SpecifiedPulseRepetitionInterval"],"013C":["DS","DeliveredPulseRepetitionInterval"],"0140":["SQ","RecordedSourceApplicatorSequence"],"0142":["IS","ReferencedSourceApplicatorNumber"],"0150":["SQ","RecordedChannelShieldSequence"],"0152":["IS","ReferencedChannelShieldNumber"],"0160":["SQ","BrachyControlPointDeliveredSequence"],"0162":["DA","SafePositionExitDate"],"0164":["TM","SafePositionExitTime"],"0166":["DA","SafePositionReturnDate"],"0168":["TM","SafePositionReturnTime"],"0200":["CS","CurrentTreatmentStatus"],"0202":["ST","TreatmentStatusComment"],"0220":["SQ","FractionGroupSummarySequence"],"0223":["IS","ReferencedFractionNumber"],"0224":["CS","FractionGroupType"],"0230":["CS","BeamStopperPosition"],"0240":["SQ","FractionStatusSummarySequence"],"0250":["DA","TreatmentDate"],"0251":["TM","TreatmentTime"]},"300A":{"0002":["SH","RTPlanLabel"],"0003":["LO","RTPlanName"],"0004":["ST","RTPlanDescription"],"0006":["DA","RTPlanDate"],"0007":["TM","RTPlanTime"],"0009":["LO","TreatmentProtocols"],"000A":["CS","PlanIntent"],"000B":["LO","TreatmentSites"],"000C":["CS","RTPlanGeometry"],"000E":["ST","PrescriptionDescription"],"0010":["SQ","DoseReferenceSequence"],"0012":["IS","DoseReferenceNumber"],"0013":["UI","DoseReferenceUID"],"0014":["CS","DoseReferenceStructureType"],"0015":["CS","NominalBeamEnergyUnit"],"0016":["LO","DoseReferenceDescription"],"0018":["DS","DoseReferencePointCoordinates"],"001A":["DS","NominalPriorDose"],"0020":["CS","DoseReferenceType"],"0021":["DS","ConstraintWeight"],"0022":["DS","DeliveryWarningDose"],"0023":["DS","DeliveryMaximumDose"],"0025":["DS","TargetMinimumDose"],"0026":["DS","TargetPrescriptionDose"],"0027":["DS","TargetMaximumDose"],"0028":["DS","TargetUnderdoseVolumeFraction"],"002A":["DS","OrganAtRiskFullVolumeDose"],"002B":["DS","OrganAtRiskLimitDose"],"002C":["DS","OrganAtRiskMaximumDose"],"002D":["DS","OrganAtRiskOverdoseVolumeFraction"],"0040":["SQ","ToleranceTableSequence"],"0042":["IS","ToleranceTableNumber"],"0043":["SH","ToleranceTableLabel"],"0044":["DS","GantryAngleTolerance"],"0046":["DS","BeamLimitingDeviceAngleTolerance"],"0048":["SQ","BeamLimitingDeviceToleranceSequence"],"004A":["DS","BeamLimitingDevicePositionTolerance"],"004B":["FL","SnoutPositionTolerance"],"004C":["DS","PatientSupportAngleTolerance"],"004E":["DS","TableTopEccentricAngleTolerance"],"004F":["FL","TableTopPitchAngleTolerance"],"0050":["FL","TableTopRollAngleTolerance"],"0051":["DS","TableTopVerticalPositionTolerance"],"0052":["DS","TableTopLongitudinalPositionTolerance"],"0053":["DS","TableTopLateralPositionTolerance"],"0055":["CS","RTPlanRelationship"],"0070":["SQ","FractionGroupSequence"],"0071":["IS","FractionGroupNumber"],"0072":["LO","FractionGroupDescription"],"0078":["IS","NumberOfFractionsPlanned"],"0079":["IS","NumberOfFractionPatternDigitsPerDay"],"007A":["IS","RepeatFractionCycleLength"],"007B":["LT","FractionPattern"],"0080":["IS","NumberOfBeams"],"0082":["DS","BeamDoseSpecificationPoint"],"0084":["DS","BeamDose"],"0086":["DS","BeamMeterset"],"0088":["FL","BeamDosePointDepth"],"0089":["FL","BeamDosePointEquivalentDepth"],"008A":["FL","BeamDosePointSSD"],"00A0":["IS","NumberOfBrachyApplicationSetups"],"00A2":["DS","BrachyApplicationSetupDoseSpecificationPoint"],"00A4":["DS","BrachyApplicationSetupDose"],"00B0":["SQ","BeamSequence"],"00B2":["SH","TreatmentMachineName"],"00B3":["CS","PrimaryDosimeterUnit"],"00B4":["DS","SourceAxisDistance"],"00B6":["SQ","BeamLimitingDeviceSequence"],"00B8":["CS","RTBeamLimitingDeviceType"],"00BA":["DS","SourceToBeamLimitingDeviceDistance"],"00BB":["FL","IsocenterToBeamLimitingDeviceDistance"],"00BC":["IS","NumberOfLeafJawPairs"],"00BE":["DS","LeafPositionBoundaries"],"00C0":["IS","BeamNumber"],"00C2":["LO","BeamName"],"00C3":["ST","BeamDescription"],"00C4":["CS","BeamType"],"00C6":["CS","RadiationType"],"00C7":["CS","HighDoseTechniqueType"],"00C8":["IS","ReferenceImageNumber"],"00CA":["SQ","PlannedVerificationImageSequence"],"00CC":["LO","ImagingDeviceSpecificAcquisitionParameters"],"00CE":["CS","TreatmentDeliveryType"],"00D0":["IS","NumberOfWedges"],"00D1":["SQ","WedgeSequence"],"00D2":["IS","WedgeNumber"],"00D3":["CS","WedgeType"],"00D4":["SH","WedgeID"],"00D5":["IS","WedgeAngle"],"00D6":["DS","WedgeFactor"],"00D7":["FL","TotalWedgeTrayWaterEquivalentThickness"],"00D8":["DS","WedgeOrientation"],"00D9":["FL","IsocenterToWedgeTrayDistance"],"00DA":["DS","SourceToWedgeTrayDistance"],"00DB":["FL","WedgeThinEdgePosition"],"00DC":["SH","BolusID"],"00DD":["ST","BolusDescription"],"00E0":["IS","NumberOfCompensators"],"00E1":["SH","MaterialID"],"00E2":["DS","TotalCompensatorTrayFactor"],"00E3":["SQ","CompensatorSequence"],"00E4":["IS","CompensatorNumber"],"00E5":["SH","CompensatorID"],"00E6":["DS","SourceToCompensatorTrayDistance"],"00E7":["IS","CompensatorRows"],"00E8":["IS","CompensatorColumns"],"00E9":["DS","CompensatorPixelSpacing"],"00EA":["DS","CompensatorPosition"],"00EB":["DS","CompensatorTransmissionData"],"00EC":["DS","CompensatorThicknessData"],"00ED":["IS","NumberOfBoli"],"00EE":["CS","CompensatorType"],"00F0":["IS","NumberOfBlocks"],"00F2":["DS","TotalBlockTrayFactor"],"00F3":["FL","TotalBlockTrayWaterEquivalentThickness"],"00F4":["SQ","BlockSequence"],"00F5":["SH","BlockTrayID"],"00F6":["DS","SourceToBlockTrayDistance"],"00F7":["FL","IsocenterToBlockTrayDistance"],"00F8":["CS","BlockType"],"00F9":["LO","AccessoryCode"],"00FA":["CS","BlockDivergence"],"00FB":["CS","BlockMountingPosition"],"00FC":["IS","BlockNumber"],"00FE":["LO","BlockName"],"0100":["DS","BlockThickness"],"0102":["DS","BlockTransmission"],"0104":["IS","BlockNumberOfPoints"],"0106":["DS","BlockData"],"0107":["SQ","ApplicatorSequence"],"0108":["SH","ApplicatorID"],"0109":["CS","ApplicatorType"],"010A":["LO","ApplicatorDescription"],"010C":["DS","CumulativeDoseReferenceCoefficient"],"010E":["DS","FinalCumulativeMetersetWeight"],"0110":["IS","NumberOfControlPoints"],"0111":["SQ","ControlPointSequence"],"0112":["IS","ControlPointIndex"],"0114":["DS","NominalBeamEnergy"],"0115":["DS","DoseRateSet"],"0116":["SQ","WedgePositionSequence"],"0118":["CS","WedgePosition"],"011A":["SQ","BeamLimitingDevicePositionSequence"],"011C":["DS","LeafJawPositions"],"011E":["DS","GantryAngle"],"011F":["CS","GantryRotationDirection"],"0120":["DS","BeamLimitingDeviceAngle"],"0121":["CS","BeamLimitingDeviceRotationDirection"],"0122":["DS","PatientSupportAngle"],"0123":["CS","PatientSupportRotationDirection"],"0124":["DS","TableTopEccentricAxisDistance"],"0125":["DS","TableTopEccentricAngle"],"0126":["CS","TableTopEccentricRotationDirection"],"0128":["DS","TableTopVerticalPosition"],"0129":["DS","TableTopLongitudinalPosition"],"012A":["DS","TableTopLateralPosition"],"012C":["DS","IsocenterPosition"],"012E":["DS","SurfaceEntryPoint"],"0130":["DS","SourceToSurfaceDistance"],"0134":["DS","CumulativeMetersetWeight"],"0140":["FL","TableTopPitchAngle"],"0142":["CS","TableTopPitchRotationDirection"],"0144":["FL","TableTopRollAngle"],"0146":["CS","TableTopRollRotationDirection"],"0148":["FL","HeadFixationAngle"],"014A":["FL","GantryPitchAngle"],"014C":["CS","GantryPitchRotationDirection"],"014E":["FL","GantryPitchAngleTolerance"],"0180":["SQ","PatientSetupSequence"],"0182":["IS","PatientSetupNumber"],"0183":["LO","PatientSetupLabel"],"0184":["LO","PatientAdditionalPosition"],"0190":["SQ","FixationDeviceSequence"],"0192":["CS","FixationDeviceType"],"0194":["SH","FixationDeviceLabel"],"0196":["ST","FixationDeviceDescription"],"0198":["SH","FixationDevicePosition"],"0199":["FL","FixationDevicePitchAngle"],"019A":["FL","FixationDeviceRollAngle"],"01A0":["SQ","ShieldingDeviceSequence"],"01A2":["CS","ShieldingDeviceType"],"01A4":["SH","ShieldingDeviceLabel"],"01A6":["ST","ShieldingDeviceDescription"],"01A8":["SH","ShieldingDevicePosition"],"01B0":["CS","SetupTechnique"],"01B2":["ST","SetupTechniqueDescription"],"01B4":["SQ","SetupDeviceSequence"],"01B6":["CS","SetupDeviceType"],"01B8":["SH","SetupDeviceLabel"],"01BA":["ST","SetupDeviceDescription"],"01BC":["DS","SetupDeviceParameter"],"01D0":["ST","SetupReferenceDescription"],"01D2":["DS","TableTopVerticalSetupDisplacement"],"01D4":["DS","TableTopLongitudinalSetupDisplacement"],"01D6":["DS","TableTopLateralSetupDisplacement"],"0200":["CS","BrachyTreatmentTechnique"],"0202":["CS","BrachyTreatmentType"],"0206":["SQ","TreatmentMachineSequence"],"0210":["SQ","SourceSequence"],"0212":["IS","SourceNumber"],"0214":["CS","SourceType"],"0216":["LO","SourceManufacturer"],"0218":["DS","ActiveSourceDiameter"],"021A":["DS","ActiveSourceLength"],"0222":["DS","SourceEncapsulationNominalThickness"],"0224":["DS","SourceEncapsulationNominalTransmission"],"0226":["LO","SourceIsotopeName"],"0228":["DS","SourceIsotopeHalfLife"],"0229":["CS","SourceStrengthUnits"],"022A":["DS","ReferenceAirKermaRate"],"022B":["DS","SourceStrength"],"022C":["DA","SourceStrengthReferenceDate"],"022E":["TM","SourceStrengthReferenceTime"],"0230":["SQ","ApplicationSetupSequence"],"0232":["CS","ApplicationSetupType"],"0234":["IS","ApplicationSetupNumber"],"0236":["LO","ApplicationSetupName"],"0238":["LO","ApplicationSetupManufacturer"],"0240":["IS","TemplateNumber"],"0242":["SH","TemplateType"],"0244":["LO","TemplateName"],"0250":["DS","TotalReferenceAirKerma"],"0260":["SQ","BrachyAccessoryDeviceSequence"],"0262":["IS","BrachyAccessoryDeviceNumber"],"0263":["SH","BrachyAccessoryDeviceID"],"0264":["CS","BrachyAccessoryDeviceType"],"0266":["LO","BrachyAccessoryDeviceName"],"026A":["DS","BrachyAccessoryDeviceNominalThickness"],"026C":["DS","BrachyAccessoryDeviceNominalTransmission"],"0280":["SQ","ChannelSequence"],"0282":["IS","ChannelNumber"],"0284":["DS","ChannelLength"],"0286":["DS","ChannelTotalTime"],"0288":["CS","SourceMovementType"],"028A":["IS","NumberOfPulses"],"028C":["DS","PulseRepetitionInterval"],"0290":["IS","SourceApplicatorNumber"],"0291":["SH","SourceApplicatorID"],"0292":["CS","SourceApplicatorType"],"0294":["LO","SourceApplicatorName"],"0296":["DS","SourceApplicatorLength"],"0298":["LO","SourceApplicatorManufacturer"],"029C":["DS","SourceApplicatorWallNominalThickness"],"029E":["DS","SourceApplicatorWallNominalTransmission"],"02A0":["DS","SourceApplicatorStepSize"],"02A2":["IS","TransferTubeNumber"],"02A4":["DS","TransferTubeLength"],"02B0":["SQ","ChannelShieldSequence"],"02B2":["IS","ChannelShieldNumber"],"02B3":["SH","ChannelShieldID"],"02B4":["LO","ChannelShieldName"],"02B8":["DS","ChannelShieldNominalThickness"],"02BA":["DS","ChannelShieldNominalTransmission"],"02C8":["DS","FinalCumulativeTimeWeight"],"02D0":["SQ","BrachyControlPointSequence"],"02D2":["DS","ControlPointRelativePosition"],"02D4":["DS","ControlPoint3DPosition"],"02D6":["DS","CumulativeTimeWeight"],"02E0":["CS","CompensatorDivergence"],"02E1":["CS","CompensatorMountingPosition"],"02E2":["DS","SourceToCompensatorDistance"],"02E3":["FL","TotalCompensatorTrayWaterEquivalentThickness"],"02E4":["FL","IsocenterToCompensatorTrayDistance"],"02E5":["FL","CompensatorColumnOffset"],"02E6":["FL","IsocenterToCompensatorDistances"],"02E7":["FL","CompensatorRelativeStoppingPowerRatio"],"02E8":["FL","CompensatorMillingToolDiameter"],"02EA":["SQ","IonRangeCompensatorSequence"],"02EB":["LT","CompensatorDescription"],"0302":["IS","RadiationMassNumber"],"0304":["IS","RadiationAtomicNumber"],"0306":["SS","RadiationChargeState"],"0308":["CS","ScanMode"],"030A":["FL","VirtualSourceAxisDistances"],"030C":["SQ","SnoutSequence"],"030D":["FL","SnoutPosition"],"030F":["SH","SnoutID"],"0312":["IS","NumberOfRangeShifters"],"0314":["SQ","RangeShifterSequence"],"0316":["IS","RangeShifterNumber"],"0318":["SH","RangeShifterID"],"0320":["CS","RangeShifterType"],"0322":["LO","RangeShifterDescription"],"0330":["IS","NumberOfLateralSpreadingDevices"],"0332":["SQ","LateralSpreadingDeviceSequence"],"0334":["IS","LateralSpreadingDeviceNumber"],"0336":["SH","LateralSpreadingDeviceID"],"0338":["CS","LateralSpreadingDeviceType"],"033A":["LO","LateralSpreadingDeviceDescription"],"033C":["FL","LateralSpreadingDeviceWaterEquivalentThickness"],"0340":["IS","NumberOfRangeModulators"],"0342":["SQ","RangeModulatorSequence"],"0344":["IS","RangeModulatorNumber"],"0346":["SH","RangeModulatorID"],"0348":["CS","RangeModulatorType"],"034A":["LO","RangeModulatorDescription"],"034C":["SH","BeamCurrentModulationID"],"0350":["CS","PatientSupportType"],"0352":["SH","PatientSupportID"],"0354":["LO","PatientSupportAccessoryCode"],"0356":["FL","FixationLightAzimuthalAngle"],"0358":["FL","FixationLightPolarAngle"],"035A":["FL","MetersetRate"],"0360":["SQ","RangeShifterSettingsSequence"],"0362":["LO","RangeShifterSetting"],"0364":["FL","IsocenterToRangeShifterDistance"],"0366":["FL","RangeShifterWaterEquivalentThickness"],"0370":["SQ","LateralSpreadingDeviceSettingsSequence"],"0372":["LO","LateralSpreadingDeviceSetting"],"0374":["FL","IsocenterToLateralSpreadingDeviceDistance"],"0380":["SQ","RangeModulatorSettingsSequence"],"0382":["FL","RangeModulatorGatingStartValue"],"0384":["FL","RangeModulatorGatingStopValue"],"0386":["FL","RangeModulatorGatingStartWaterEquivalentThickness"],"0388":["FL","RangeModulatorGatingStopWaterEquivalentThickness"],"038A":["FL","IsocenterToRangeModulatorDistance"],"0390":["SH","ScanSpotTuneID"],"0392":["IS","NumberOfScanSpotPositions"],"0394":["FL","ScanSpotPositionMap"],"0396":["FL","ScanSpotMetersetWeights"],"0398":["FL","ScanningSpotSize"],"039A":["IS","NumberOfPaintings"],"03A0":["SQ","IonToleranceTableSequence"],"03A2":["SQ","IonBeamSequence"],"03A4":["SQ","IonBeamLimitingDeviceSequence"],"03A6":["SQ","IonBlockSequence"],"03A8":["SQ","IonControlPointSequence"],"03AA":["SQ","IonWedgeSequence"],"03AC":["SQ","IonWedgePositionSequence"],"0401":["SQ","ReferencedSetupImageSequence"],"0402":["ST","SetupImageComment"],"0410":["SQ","MotionSynchronizationSequence"],"0412":["FL","ControlPointOrientation"],"0420":["SQ","GeneralAccessorySequence"],"0421":["SH","GeneralAccessoryID"],"0422":["ST","GeneralAccessoryDescription"],"0423":["CS","GeneralAccessoryType"],"0424":["IS","GeneralAccessoryNumber"],"0431":["SQ","ApplicatorGeometrySequence"],"0432":["CS","ApplicatorApertureShape"],"0433":["FL","ApplicatorOpening"],"0434":["FL","ApplicatorOpeningX"],"0435":["FL","ApplicatorOpeningY"],"0436":["FL","SourceToApplicatorMountingPositionDistance"]},"300C":{"0002":["SQ","ReferencedRTPlanSequence"],"0004":["SQ","ReferencedBeamSequence"],"0006":["IS","ReferencedBeamNumber"],"0007":["IS","ReferencedReferenceImageNumber"],"0008":["DS","StartCumulativeMetersetWeight"],"0009":["DS","EndCumulativeMetersetWeight"],"000A":["SQ","ReferencedBrachyApplicationSetupSequence"],"000C":["IS","ReferencedBrachyApplicationSetupNumber"],"000E":["IS","ReferencedSourceNumber"],"0020":["SQ","ReferencedFractionGroupSequence"],"0022":["IS","ReferencedFractionGroupNumber"],"0040":["SQ","ReferencedVerificationImageSequence"],"0042":["SQ","ReferencedReferenceImageSequence"],"0050":["SQ","ReferencedDoseReferenceSequence"],"0051":["IS","ReferencedDoseReferenceNumber"],"0055":["SQ","BrachyReferencedDoseReferenceSequence"],"0060":["SQ","ReferencedStructureSetSequence"],"006A":["IS","ReferencedPatientSetupNumber"],"0080":["SQ","ReferencedDoseSequence"],"00A0":["IS","ReferencedToleranceTableNumber"],"00B0":["SQ","ReferencedBolusSequence"],"00C0":["IS","ReferencedWedgeNumber"],"00D0":["IS","ReferencedCompensatorNumber"],"00E0":["IS","ReferencedBlockNumber"],"00F0":["IS","ReferencedControlPointIndex"],"00F2":["SQ","ReferencedControlPointSequence"],"00F4":["IS","ReferencedStartControlPointIndex"],"00F6":["IS","ReferencedStopControlPointIndex"],"0100":["IS","ReferencedRangeShifterNumber"],"0102":["IS","ReferencedLateralSpreadingDeviceNumber"],"0104":["IS","ReferencedRangeModulatorNumber"]},"300E":{"0002":["CS","ApprovalStatus"],"0004":["DA","ReviewDate"],"0005":["TM","ReviewTime"],"0008":["PN","ReviewerName"]},4e3:{"0010":["LT","Arbitrary"],4e3:["LT","TextComments"]},4008:{"0040":["SH","ResultsID"],"0042":["LO","ResultsIDIssuer"],"0050":["SQ","ReferencedInterpretationSequence"],"00FF":["CS","ReportProductionStatusTrial"],"0100":["DA","InterpretationRecordedDate"],"0101":["TM","InterpretationRecordedTime"],"0102":["PN","InterpretationRecorder"],"0103":["LO","ReferenceToRecordedSound"],"0108":["DA","InterpretationTranscriptionDate"],"0109":["TM","InterpretationTranscriptionTime"],"010A":["PN","InterpretationTranscriber"],"010B":["ST","InterpretationText"],"010C":["PN","InterpretationAuthor"],"0111":["SQ","InterpretationApproverSequence"],"0112":["DA","InterpretationApprovalDate"],"0113":["TM","InterpretationApprovalTime"],"0114":["PN","PhysicianApprovingInterpretation"],"0115":["LT","InterpretationDiagnosisDescription"],"0117":["SQ","InterpretationDiagnosisCodeSequence"],"0118":["SQ","ResultsDistributionListSequence"],"0119":["PN","DistributionName"],"011A":["LO","DistributionAddress"],"0200":["SH","InterpretationID"],"0202":["LO","InterpretationIDIssuer"],"0210":["CS","InterpretationTypeID"],"0212":["CS","InterpretationStatusID"],"0300":["ST","Impressions"],4e3:["ST","ResultsComments"]},4010:{"0001":["CS","LowEnergyDetectors"],"0002":["CS","HighEnergyDetectors"],"0004":["SQ","DetectorGeometrySequence"],1001:["SQ","ThreatROIVoxelSequence"],1004:["FL","ThreatROIBase"],1005:["FL","ThreatROIExtents"],1006:["OB","ThreatROIBitmap"],1007:["SH","RouteSegmentID"],1008:["CS","GantryType"],1009:["CS","OOIOwnerType"],"100A":["SQ","RouteSegmentSequence"],1010:["US","PotentialThreatObjectID"],1011:["SQ","ThreatSequence"],1012:["CS","ThreatCategory"],1013:["LT","ThreatCategoryDescription"],1014:["CS","ATDAbilityAssessment"],1015:["CS","ATDAssessmentFlag"],1016:["FL","ATDAssessmentProbability"],1017:["FL","Mass"],1018:["FL","Density"],1019:["FL","ZEffective"],"101A":["SH","BoardingPassID"],"101B":["FL","CenterOfMass"],"101C":["FL","CenterOfPTO"],"101D":["FL","BoundingPolygon"],"101E":["SH","RouteSegmentStartLocationID"],"101F":["SH","RouteSegmentEndLocationID"],1020:["CS","RouteSegmentLocationIDType"],1021:["CS","AbortReason"],1023:["FL","VolumeOfPTO"],1024:["CS","AbortFlag"],1025:["DT","RouteSegmentStartTime"],1026:["DT","RouteSegmentEndTime"],1027:["CS","TDRType"],1028:["CS","InternationalRouteSegment"],1029:["LO","ThreatDetectionAlgorithmandVersion"],"102A":["SH","AssignedLocation"],"102B":["DT","AlarmDecisionTime"],1031:["CS","AlarmDecision"],1033:["US","NumberOfTotalObjects"],1034:["US","NumberOfAlarmObjects"],1037:["SQ","PTORepresentationSequence"],1038:["SQ","ATDAssessmentSequence"],1039:["CS","TIPType"],"103A":["CS","DICOSVersion"],1041:["DT","OOIOwnerCreationTime"],1042:["CS","OOIType"],1043:["FL","OOISize"],1044:["CS","AcquisitionStatus"],1045:["SQ","BasisMaterialsCodeSequence"],1046:["CS","PhantomType"],1047:["SQ","OOIOwnerSequence"],1048:["CS","ScanType"],1051:["LO","ItineraryID"],1052:["SH","ItineraryIDType"],1053:["LO","ItineraryIDAssigningAuthority"],1054:["SH","RouteID"],1055:["SH","RouteIDAssigningAuthority"],1056:["CS","InboundArrivalType"],1058:["SH","CarrierID"],1059:["CS","CarrierIDAssigningAuthority"],1060:["FL","SourceOrientation"],1061:["FL","SourcePosition"],1062:["FL","BeltHeight"],1064:["SQ","AlgorithmRoutingCodeSequence"],1067:["CS","TransportClassification"],1068:["LT","OOITypeDescriptor"],1069:["FL","TotalProcessingTime"],"106C":["OB","DetectorCalibrationData"]}},u.Dictionary.getVR=function(h,g){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(h)],w&&(v=w[u.Utils.dec2hex(g)],v?S=v[0]:g===0&&(S="UL")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(h)],w&&(v=w[u.Utils.dec2hex(g)],v&&(S=v[0]))),S||(S="OB"),S},u.Dictionary.getDescription=function(h,g){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(h)],w&&(v=w[u.Utils.dec2hex(g)],v?S=v[1]:g===0&&(S="Group "+u.Utils.dec2hex(h)+" Length")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(h)],w&&(v=w[u.Utils.dec2hex(g)],v&&(S=v[1]))),S||(S="PrivateData"),S},C.exports&&(C.exports=u.Dictionary)}(dictionary)),dictionary.exports}var image={exports:{}},tag={exports:{}},lib$1={exports:{}},_default$1={},lib={exports:{}},_default={},hasRequired_default$1;function require_default$1(){if(hasRequired_default$1)return _default;hasRequired_default$1=1;function C(){var v={};return v["align-content"]=!1,v["align-items"]=!1,v["align-self"]=!1,v["alignment-adjust"]=!1,v["alignment-baseline"]=!1,v.all=!1,v["anchor-point"]=!1,v.animation=!1,v["animation-delay"]=!1,v["animation-direction"]=!1,v["animation-duration"]=!1,v["animation-fill-mode"]=!1,v["animation-iteration-count"]=!1,v["animation-name"]=!1,v["animation-play-state"]=!1,v["animation-timing-function"]=!1,v.azimuth=!1,v["backface-visibility"]=!1,v.background=!0,v["background-attachment"]=!0,v["background-clip"]=!0,v["background-color"]=!0,v["background-image"]=!0,v["background-origin"]=!0,v["background-position"]=!0,v["background-repeat"]=!0,v["background-size"]=!0,v["baseline-shift"]=!1,v.binding=!1,v.bleed=!1,v["bookmark-label"]=!1,v["bookmark-level"]=!1,v["bookmark-state"]=!1,v.border=!0,v["border-bottom"]=!0,v["border-bottom-color"]=!0,v["border-bottom-left-radius"]=!0,v["border-bottom-right-radius"]=!0,v["border-bottom-style"]=!0,v["border-bottom-width"]=!0,v["border-collapse"]=!0,v["border-color"]=!0,v["border-image"]=!0,v["border-image-outset"]=!0,v["border-image-repeat"]=!0,v["border-image-slice"]=!0,v["border-image-source"]=!0,v["border-image-width"]=!0,v["border-left"]=!0,v["border-left-color"]=!0,v["border-left-style"]=!0,v["border-left-width"]=!0,v["border-radius"]=!0,v["border-right"]=!0,v["border-right-color"]=!0,v["border-right-style"]=!0,v["border-right-width"]=!0,v["border-spacing"]=!0,v["border-style"]=!0,v["border-top"]=!0,v["border-top-color"]=!0,v["border-top-left-radius"]=!0,v["border-top-right-radius"]=!0,v["border-top-style"]=!0,v["border-top-width"]=!0,v["border-width"]=!0,v.bottom=!1,v["box-decoration-break"]=!0,v["box-shadow"]=!0,v["box-sizing"]=!0,v["box-snap"]=!0,v["box-suppress"]=!0,v["break-after"]=!0,v["break-before"]=!0,v["break-inside"]=!0,v["caption-side"]=!1,v.chains=!1,v.clear=!0,v.clip=!1,v["clip-path"]=!1,v["clip-rule"]=!1,v.color=!0,v["color-interpolation-filters"]=!0,v["column-count"]=!1,v["column-fill"]=!1,v["column-gap"]=!1,v["column-rule"]=!1,v["column-rule-color"]=!1,v["column-rule-style"]=!1,v["column-rule-width"]=!1,v["column-span"]=!1,v["column-width"]=!1,v.columns=!1,v.contain=!1,v.content=!1,v["counter-increment"]=!1,v["counter-reset"]=!1,v["counter-set"]=!1,v.crop=!1,v.cue=!1,v["cue-after"]=!1,v["cue-before"]=!1,v.cursor=!1,v.direction=!1,v.display=!0,v["display-inside"]=!0,v["display-list"]=!0,v["display-outside"]=!0,v["dominant-baseline"]=!1,v.elevation=!1,v["empty-cells"]=!1,v.filter=!1,v.flex=!1,v["flex-basis"]=!1,v["flex-direction"]=!1,v["flex-flow"]=!1,v["flex-grow"]=!1,v["flex-shrink"]=!1,v["flex-wrap"]=!1,v.float=!1,v["float-offset"]=!1,v["flood-color"]=!1,v["flood-opacity"]=!1,v["flow-from"]=!1,v["flow-into"]=!1,v.font=!0,v["font-family"]=!0,v["font-feature-settings"]=!0,v["font-kerning"]=!0,v["font-language-override"]=!0,v["font-size"]=!0,v["font-size-adjust"]=!0,v["font-stretch"]=!0,v["font-style"]=!0,v["font-synthesis"]=!0,v["font-variant"]=!0,v["font-variant-alternates"]=!0,v["font-variant-caps"]=!0,v["font-variant-east-asian"]=!0,v["font-variant-ligatures"]=!0,v["font-variant-numeric"]=!0,v["font-variant-position"]=!0,v["font-weight"]=!0,v.grid=!1,v["grid-area"]=!1,v["grid-auto-columns"]=!1,v["grid-auto-flow"]=!1,v["grid-auto-rows"]=!1,v["grid-column"]=!1,v["grid-column-end"]=!1,v["grid-column-start"]=!1,v["grid-row"]=!1,v["grid-row-end"]=!1,v["grid-row-start"]=!1,v["grid-template"]=!1,v["grid-template-areas"]=!1,v["grid-template-columns"]=!1,v["grid-template-rows"]=!1,v["hanging-punctuation"]=!1,v.height=!0,v.hyphens=!1,v.icon=!1,v["image-orientation"]=!1,v["image-resolution"]=!1,v["ime-mode"]=!1,v["initial-letters"]=!1,v["inline-box-align"]=!1,v["justify-content"]=!1,v["justify-items"]=!1,v["justify-self"]=!1,v.left=!1,v["letter-spacing"]=!0,v["lighting-color"]=!0,v["line-box-contain"]=!1,v["line-break"]=!1,v["line-grid"]=!1,v["line-height"]=!1,v["line-snap"]=!1,v["line-stacking"]=!1,v["line-stacking-ruby"]=!1,v["line-stacking-shift"]=!1,v["line-stacking-strategy"]=!1,v["list-style"]=!0,v["list-style-image"]=!0,v["list-style-position"]=!0,v["list-style-type"]=!0,v.margin=!0,v["margin-bottom"]=!0,v["margin-left"]=!0,v["margin-right"]=!0,v["margin-top"]=!0,v["marker-offset"]=!1,v["marker-side"]=!1,v.marks=!1,v.mask=!1,v["mask-box"]=!1,v["mask-box-outset"]=!1,v["mask-box-repeat"]=!1,v["mask-box-slice"]=!1,v["mask-box-source"]=!1,v["mask-box-width"]=!1,v["mask-clip"]=!1,v["mask-image"]=!1,v["mask-origin"]=!1,v["mask-position"]=!1,v["mask-repeat"]=!1,v["mask-size"]=!1,v["mask-source-type"]=!1,v["mask-type"]=!1,v["max-height"]=!0,v["max-lines"]=!1,v["max-width"]=!0,v["min-height"]=!0,v["min-width"]=!0,v["move-to"]=!1,v["nav-down"]=!1,v["nav-index"]=!1,v["nav-left"]=!1,v["nav-right"]=!1,v["nav-up"]=!1,v["object-fit"]=!1,v["object-position"]=!1,v.opacity=!1,v.order=!1,v.orphans=!1,v.outline=!1,v["outline-color"]=!1,v["outline-offset"]=!1,v["outline-style"]=!1,v["outline-width"]=!1,v.overflow=!1,v["overflow-wrap"]=!1,v["overflow-x"]=!1,v["overflow-y"]=!1,v.padding=!0,v["padding-bottom"]=!0,v["padding-left"]=!0,v["padding-right"]=!0,v["padding-top"]=!0,v.page=!1,v["page-break-after"]=!1,v["page-break-before"]=!1,v["page-break-inside"]=!1,v["page-policy"]=!1,v.pause=!1,v["pause-after"]=!1,v["pause-before"]=!1,v.perspective=!1,v["perspective-origin"]=!1,v.pitch=!1,v["pitch-range"]=!1,v["play-during"]=!1,v.position=!1,v["presentation-level"]=!1,v.quotes=!1,v["region-fragment"]=!1,v.resize=!1,v.rest=!1,v["rest-after"]=!1,v["rest-before"]=!1,v.richness=!1,v.right=!1,v.rotation=!1,v["rotation-point"]=!1,v["ruby-align"]=!1,v["ruby-merge"]=!1,v["ruby-position"]=!1,v["shape-image-threshold"]=!1,v["shape-outside"]=!1,v["shape-margin"]=!1,v.size=!1,v.speak=!1,v["speak-as"]=!1,v["speak-header"]=!1,v["speak-numeral"]=!1,v["speak-punctuation"]=!1,v["speech-rate"]=!1,v.stress=!1,v["string-set"]=!1,v["tab-size"]=!1,v["table-layout"]=!1,v["text-align"]=!0,v["text-align-last"]=!0,v["text-combine-upright"]=!0,v["text-decoration"]=!0,v["text-decoration-color"]=!0,v["text-decoration-line"]=!0,v["text-decoration-skip"]=!0,v["text-decoration-style"]=!0,v["text-emphasis"]=!0,v["text-emphasis-color"]=!0,v["text-emphasis-position"]=!0,v["text-emphasis-style"]=!0,v["text-height"]=!0,v["text-indent"]=!0,v["text-justify"]=!0,v["text-orientation"]=!0,v["text-overflow"]=!0,v["text-shadow"]=!0,v["text-space-collapse"]=!0,v["text-transform"]=!0,v["text-underline-position"]=!0,v["text-wrap"]=!0,v.top=!1,v.transform=!1,v["transform-origin"]=!1,v["transform-style"]=!1,v.transition=!1,v["transition-delay"]=!1,v["transition-duration"]=!1,v["transition-property"]=!1,v["transition-timing-function"]=!1,v["unicode-bidi"]=!1,v["vertical-align"]=!1,v.visibility=!1,v["voice-balance"]=!1,v["voice-duration"]=!1,v["voice-family"]=!1,v["voice-pitch"]=!1,v["voice-range"]=!1,v["voice-rate"]=!1,v["voice-stress"]=!1,v["voice-volume"]=!1,v.volume=!1,v["white-space"]=!1,v.widows=!1,v.width=!0,v["will-change"]=!1,v["word-break"]=!0,v["word-spacing"]=!0,v["word-wrap"]=!0,v["wrap-flow"]=!1,v["wrap-through"]=!1,v["writing-mode"]=!1,v["z-index"]=!1,v}function u(v,w,I){}function h(v,w,I){}var g=/javascript\s*\:/img;function S(v,w){return g.test(w)?"":w}return _default.whiteList=C(),_default.getDefaultWhiteList=C,_default.onAttr=u,_default.onIgnoreAttr=h,_default.safeAttrValue=S,_default}var util$1,hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,util$1={indexOf:function(C,u){var h,g;if(Array.prototype.indexOf)return C.indexOf(u);for(h=0,g=C.length;h/g,e=/"/g,N=/"/g,B=/&#([a-zA-Z0-9]*);?/gim,Q=/:?/gim,i0=/&newline;?/gim,j=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,H=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function Y(g0){return g0.replace(e,""")}function G(g0){return g0.replace(N,'"')}function Z(g0){return g0.replace(B,function(T0,M0){return M0[0]==="x"||M0[0]==="X"?String.fromCharCode(parseInt(M0.substr(1),16)):String.fromCharCode(parseInt(M0,10))})}function e0(g0){return g0.replace(Q,":").replace(i0," ")}function z(g0){for(var x0="",T0=0,M0=g0.length;T0",M0);if(ee===-1)break;T0=ee+3}return x0}function v0(g0){var x0=g0.split("");return x0=x0.filter(function(T0){var M0=T0.charCodeAt(0);return M0===127?!1:M0<=31?M0===10||M0===13:!0}),x0.join("")}return _default$1.whiteList=g(),_default$1.getDefaultWhiteList=g,_default$1.onTag=v,_default$1.onIgnoreTag=w,_default$1.onTagAttr=I,_default$1.onIgnoreTagAttr=_,_default$1.safeAttrValue=L,_default$1.escapeHtml=P,_default$1.escapeQuote=Y,_default$1.unescapeQuote=G,_default$1.escapeHtmlEntities=Z,_default$1.escapeDangerHtml5Entities=e0,_default$1.clearNonPrintableCharacter=z,_default$1.friendlyAttrValue=f,_default$1.escapeAttrValue=f0,_default$1.onIgnoreTagStripAll=o0,_default$1.StripTagBody=c0,_default$1.stripCommentTag=m0,_default$1.stripBlankChar=v0,_default$1.cssFilter=S,_default$1.getDefaultCSSWhiteList=u,_default$1}var parser$1={},hasRequiredParser$1;function requireParser$1(){if(hasRequiredParser$1)return parser$1;hasRequiredParser$1=1;var C=requireUtil();function u(d){var k=C.spaceIndex(d),e;return k===-1?e=d.slice(1,-1):e=d.slice(1,k+1),e=C.trim(e).toLowerCase(),e.slice(0,1)==="/"&&(e=e.slice(1)),e.slice(-1)==="/"&&(e=e.slice(0,-1)),e}function h(d){return d.slice(0,2)===""||j===H-1){N+=e(d.slice(B,Q)),Y=d.slice(Q,j+1),y=u(Y),N+=k(Q,N.length,y,Y,h(Y)),B=j+1,Q=!1;continue}if(G==='"'||G==="'")for(var Z=1,e0=d.charAt(j-Z);e0.trim()===""||e0==="=";){if(e0==="="){i0=G;continue e}e0=d.charAt(j-++Z)}}else if(G===i0){i0=!1;continue}}return B0;k--){var e=d[k];if(e!==" ")return e==="="?k:-1}}function P(d){return d[0]==='"'&&d[d.length-1]==='"'||d[0]==="'"&&d[d.length-1]==="'"}function L(d){return P(d)?d.substr(1,d.length-2):d}return parser$1.parseTag=g,parser$1.parseAttr=v,parser$1}var xss,hasRequiredXss;function requireXss(){if(hasRequiredXss)return xss;hasRequiredXss=1;var C=requireLib$1().FilterCSS,u=require_default(),h=requireParser$1(),g=h.parseTag,S=h.parseAttr,v=requireUtil();function w(d){return d==null}function I(d){var k=v.spaceIndex(d);if(k===-1)return{html:"",closing:d[d.length-2]==="/"};d=v.trim(d.slice(k+1,-1));var e=d[d.length-1]==="/";return e&&(d=v.trim(d.slice(0,-1))),{html:d,closing:e}}function _(d){var k={};for(var e in d)k[e]=d[e];return k}function P(d){var k={};for(var e in d)Array.isArray(d[e])?k[e.toLowerCase()]=d[e].map(function(N){return N.toLowerCase()}):k[e.toLowerCase()]=d[e];return k}function L(d){d=_(d||{}),d.stripIgnoreTag&&(d.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),d.onIgnoreTag=u.onIgnoreTagStripAll),d.whiteList||d.allowList?d.whiteList=P(d.whiteList||d.allowList):d.whiteList=u.whiteList,d.onTag=d.onTag||u.onTag,d.onTagAttr=d.onTagAttr||u.onTagAttr,d.onIgnoreTag=d.onIgnoreTag||u.onIgnoreTag,d.onIgnoreTagAttr=d.onIgnoreTagAttr||u.onIgnoreTagAttr,d.safeAttrValue=d.safeAttrValue||u.safeAttrValue,d.escapeHtml=d.escapeHtml||u.escapeHtml,this.options=d,d.css===!1?this.cssFilter=!1:(d.css=d.css||{},this.cssFilter=new C(d.css))}return L.prototype.process=function(d){if(d=d||"",d=d.toString(),!d)return"";var k=this,e=k.options,N=e.whiteList,B=e.onTag,Q=e.onIgnoreTag,i0=e.onTagAttr,j=e.onIgnoreTagAttr,H=e.safeAttrValue,y=e.escapeHtml,Y=k.cssFilter;e.stripBlankChar&&(d=u.stripBlankChar(d)),e.allowCommentTag||(d=u.stripCommentTag(d));var G=!1;e.stripIgnoreTagBody&&(G=u.StripTagBody(e.stripIgnoreTagBody,Q),Q=G.onIgnoreTag);var Z=g(d,function(e0,z,f,f0,o0){var c0={sourcePosition:e0,position:z,isClosing:o0,isWhite:Object.prototype.hasOwnProperty.call(N,f)},m0=B(f,f0,c0);if(!w(m0))return m0;if(c0.isWhite){if(c0.isClosing)return"";var v0=I(f0),g0=N[f],x0=S(v0.html,function(T0,M0){var ee=v.indexOf(g0,T0)!==-1,re=i0(f,T0,M0,ee);return w(re)?ee?(M0=H(f,T0,M0,Y),M0?T0+'="'+M0+'"':T0):(re=j(f,T0,M0,ee),w(re)?void 0:re):re});return f0="<"+f,x0&&(f0+=" "+x0),v0.closing&&(f0+=" /"),f0+=">",f0}else return m0=Q(f,f0,c0),w(m0)?y(f0):m0},y);return G&&(Z=G.remove(Z)),Z},xss=L,xss}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,function(C,u){var h=require_default(),g=requireParser$1(),S=requireXss();function v(I,_){var P=new S(_);return P.process(I)}u=C.exports=v,u.filterXSS=v,u.FilterXSS=S,function(){for(var I in h)u[I]=h[I];for(var _ in g)u[_]=g[_]}(),typeof window<"u"&&(window.filterXSS=C.exports);function w(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}w()&&(self.filterXSS=C.exports)}(lib$1,lib$1.exports)),lib$1.exports}var siemens={exports:{}},hasRequiredSiemens;function requireSiemens(){return hasRequiredSiemens||(hasRequiredSiemens=1,function(C){var u=u||{};u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Siemens=u.Siemens||function(h){this.output="",this.data=new DataView(h,0)},u.Siemens.CSA2_MAGIC_NUMBER=[83,86,49,48],u.Siemens.NAME_LENGTH=64,u.Siemens.ELEMENT_CSA1=4112,u.Siemens.ELEMENT_CSA2=4128,u.Siemens.GROUP_CSA=41,u.Siemens.prototype.readHeader=function(){var h,g;try{if(this.data.byteLength>u.Siemens.CSA2_MAGIC_NUMBER.length){for(g=!0,h=0;h128)return this.output;for(h+=4,h+=4,S=0;Sthis.data.buffer.length?-1:(h+=16,g>0&&(this.output+=this.readString(h,g)+" "),h+g)},u.Siemens.prototype.canRead=function(h,g){return h===u.Siemens.GROUP_CSA&&(g===u.Siemens.ELEMENT_CSA1||g===u.Siemens.ELEMENT_CSA2)},C.exports&&(C.exports=u.Siemens)}(siemens)),siemens.exports}var hasRequiredTag;function requireTag(){return hasRequiredTag||(hasRequiredTag=1,function(C){var u=requireLib(),h=h||{};h.Utils=h.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),h.Dictionary=h.Dictionary||(typeof commonjsRequire<"u"?requireDictionary():null),h.Siemens=h.Siemens||(typeof commonjsRequire<"u"?requireSiemens():null),h.Tag=h.Tag||function(g,S,v,w,I,_,P,L,d){if(this.group=g,this.element=S,this.vr=v,this.offsetStart=I,this.offsetValue=_,this.offsetEnd=P,this.sublist=!1,this.preformatted=!1,this.id=h.Tag.createId(g,S),w instanceof Array)this.value=w,this.sublist=!0;else if(w!==null){var k=new DataView(w);this.value=h.Tag.convertValue(v,k,L,d),this.value===k&&this.isPrivateData()&&(this.value=h.Tag.convertPrivateValue(g,S,k),this.preformatted=this.value!==k)}else this.value=null},h.Tag.PRIVATE_DATA_READERS=[h.Siemens],h.Tag.VR_AE_MAX_LENGTH=16,h.Tag.VR_AS_MAX_LENGTH=4,h.Tag.VR_AT_MAX_LENGTH=4,h.Tag.VR_CS_MAX_LENGTH=16,h.Tag.VR_DA_MAX_LENGTH=8,h.Tag.VR_DS_MAX_LENGTH=16,h.Tag.VR_DT_MAX_LENGTH=26,h.Tag.VR_FL_MAX_LENGTH=4,h.Tag.VR_FD_MAX_LENGTH=8,h.Tag.VR_IS_MAX_LENGTH=12,h.Tag.VR_LO_MAX_LENGTH=64,h.Tag.VR_LT_MAX_LENGTH=10240,h.Tag.VR_OB_MAX_LENGTH=-1,h.Tag.VR_OD_MAX_LENGTH=-1,h.Tag.VR_OF_MAX_LENGTH=-1,h.Tag.VR_OW_MAX_LENGTH=-1,h.Tag.VR_PN_MAX_LENGTH=64*5,h.Tag.VR_SH_MAX_LENGTH=16,h.Tag.VR_SL_MAX_LENGTH=4,h.Tag.VR_SS_MAX_LENGTH=2,h.Tag.VR_ST_MAX_LENGTH=1024,h.Tag.VR_TM_MAX_LENGTH=16,h.Tag.VR_UI_MAX_LENGTH=64,h.Tag.VR_UL_MAX_LENGTH=4,h.Tag.VR_UN_MAX_LENGTH=-1,h.Tag.VR_US_MAX_LENGTH=2,h.Tag.VR_UT_MAX_LENGTH=-1,h.Tag.VR_UC_MAX_LENGTH=-1,h.Tag.TAG_TRANSFER_SYNTAX=[2,16],h.Tag.TAG_META_LENGTH=[2,0],h.Tag.TAG_SUBLIST_ITEM=[65534,57344],h.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357],h.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565],h.Tag.TAG_ROWS=[40,16],h.Tag.TAG_COLS=[40,17],h.Tag.TAG_ACQUISITION_MATRIX=[24,4880],h.Tag.TAG_NUMBER_OF_FRAMES=[40,8],h.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261],h.Tag.TAG_PIXEL_SPACING=[40,48],h.Tag.TAG_SLICE_THICKNESS=[24,80],h.Tag.TAG_SLICE_GAP=[24,136],h.Tag.TAG_TR=[24,128],h.Tag.TAG_FRAME_TIME=[24,4195],h.Tag.TAG_BITS_ALLOCATED=[40,256],h.Tag.TAG_BITS_STORED=[40,257],h.Tag.TAG_PIXEL_REPRESENTATION=[40,259],h.Tag.TAG_HIGH_BIT=[40,258],h.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4],h.Tag.TAG_SAMPLES_PER_PIXEL=[40,2],h.Tag.TAG_PLANAR_CONFIG=[40,6],h.Tag.TAG_PALETTE_RED=[40,4609],h.Tag.TAG_PALETTE_GREEN=[40,4610],h.Tag.TAG_PALETTE_BLUE=[40,4611],h.Tag.TAG_DATA_SCALE_SLOPE=[40,4179],h.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178],h.Tag.TAG_DATA_SCALE_ELSCINT=[519,4127],h.Tag.TAG_PIXEL_BANDWIDTH=[24,149],h.Tag.TAG_IMAGE_MIN=[40,262],h.Tag.TAG_IMAGE_MAX=[40,263],h.Tag.TAG_WINDOW_CENTER=[40,4176],h.Tag.TAG_WINDOW_WIDTH=[40,4177],h.Tag.TAG_SPECIFIC_CHAR_SET=[8,5],h.Tag.TAG_PATIENT_NAME=[16,16],h.Tag.TAG_PATIENT_ID=[16,32],h.Tag.TAG_STUDY_DATE=[8,32],h.Tag.TAG_STUDY_TIME=[8,48],h.Tag.TAG_STUDY_DES=[8,4144],h.Tag.TAG_IMAGE_TYPE=[8,8],h.Tag.TAG_IMAGE_COMMENTS=[32,16384],h.Tag.TAG_SEQUENCE_NAME=[24,36],h.Tag.TAG_MODALITY=[8,96],h.Tag.TAG_FRAME_OF_REF_UID=[32,82],h.Tag.TAG_STUDY_UID=[32,13],h.Tag.TAG_SERIES_DESCRIPTION=[8,4158],h.Tag.TAG_SERIES_INSTANCE_UID=[32,14],h.Tag.TAG_SERIES_NUMBER=[32,17],h.Tag.TAG_ECHO_NUMBER=[24,134],h.Tag.TAG_TEMPORAL_POSITION=[32,256],h.Tag.TAG_IMAGE_NUM=[32,19],h.Tag.TAG_SLICE_LOCATION=[32,4161],h.Tag.TAG_IMAGE_ORIENTATION=[32,55],h.Tag.TAG_IMAGE_POSITION=[32,50],h.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197],h.Tag.TAG_LUT_SHAPE=[8272,32],h.Tag.TAG_PIXEL_DATA=[32736,16],h.Tag.createId=function(g,S){var v=h.Utils.dec2hex(g),w=h.Utils.dec2hex(S);return v+w},h.Tag.getUnsignedInteger16=function(g,S){var v,w,I;for(w=g.byteLength/2,v=[],I=0;I=4?(I=parseInt(S[w].substring(0,4),10),S[w].length>=6&&(_=h.Utils.safeParseInt(S[w].substring(4,6))-1),S[w].length>=8&&(P=h.Utils.safeParseInt(S[w].substring(6,8))),S[w].length>=10&&(L=h.Utils.safeParseInt(S[w].substring(8,10))),S[w].length>=12&&(d=h.Utils.safeParseInt(S[w].substring(10,12))),S[w].length>=14&&(k=h.Utils.safeParseInt(S[w].substring(12,14))),v[w]=new Date(I,_,P,L,d,k)):v[w]=Date.parse(S[w]),h.Utils.isValidDate(v[w])||(v[w]=S[w]);return v},h.Tag.getTimeStringValue=function(g,S){var v=h.Tag.getStringValue(g),w=[];if(S){var I=null,_,P=0,L=0,d=0;for(_=0;_1&&(L=h.Utils.safeParseInt(I[1])),I.length>2&&(d=h.Utils.safeParseFloat(I[2]))):(v[_].length>=2&&(P=h.Utils.safeParseInt(v[_].substring(0,2))),v[_].length>=4&&(L=h.Utils.safeParseInt(v[_].substring(2,4))),v[_].length>=6&&(d=h.Utils.safeParseFloat(v[_].substring(4)))),w[_]=Math.round(P*60*60*1e3+L*60*1e3+d*1e3);return w}return v},h.Tag.getDoubleStringValue=function(g){var S=h.Tag.getStringValue(g),v=[],w;for(w=0;w"+this.value+"]":v="["+this.value+"]":v="";return this.isSublistItem()?P="Sequence Item":this.isSublistItemDelim()?P="Sequence Item Delimiter":this.isSequenceDelim()?P="Sequence Delimiter":this.isPixelData()?P="Pixel Data":L=h.Utils.convertCamcelCaseToTitleCase(h.Dictionary.getDescription(this.group,this.element)),v=u(v),S?d+""+P+"   "+L+"   "+v:d+" "+P+" "+L+" "+v},h.Tag.prototype.toHTMLString=function(g){return this.toString(g,!0)},h.Tag.prototype.isTransformSyntax=function(){return this.group===h.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===h.Tag.TAG_TRANSFER_SYNTAX[1]},h.Tag.prototype.isCharset=function(){return this.group===h.Tag.TAG_SPECIFIC_CHAR_SET[0]&&this.element===h.Tag.TAG_SPECIFIC_CHAR_SET[1]},h.Tag.prototype.isPixelData=function(){return this.group===h.Tag.TAG_PIXEL_DATA[0]&&this.element===h.Tag.TAG_PIXEL_DATA[1]},h.Tag.prototype.isPrivateData=function(){return(this.group&1)===1},h.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&h.Utils.isString(this.value)},h.Tag.prototype.isSublistItem=function(){return this.group===h.Tag.TAG_SUBLIST_ITEM[0]&&this.element===h.Tag.TAG_SUBLIST_ITEM[1]},h.Tag.prototype.isSublistItemDelim=function(){return this.group===h.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===h.Tag.TAG_SUBLIST_ITEM_DELIM[1]},h.Tag.prototype.isSequenceDelim=function(){return this.group===h.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===h.Tag.TAG_SUBLIST_SEQ_DELIM[1]},h.Tag.prototype.isMetaLength=function(){return this.group===h.Tag.TAG_META_LENGTH[0]&&this.element===h.Tag.TAG_META_LENGTH[1]},C.exports&&(C.exports=h.Tag)}(tag)),tag.exports}var rle={exports:{}},hasRequiredRle;function requireRle(){return hasRequiredRle||(hasRequiredRle=1,function(C){var u=u||{};u.RLE=u.RLE||function(){this.rawData=null,this.bytesRead=0,this.bytesPut=0,this.segElemPut=0,this.numSegments=0,this.segmentOffsets=[],this.littleEndian=!0,this.segmentIndex=0,this.numElements=0,this.size=0,this.output=null},u.RLE.HEADER_SIZE=64,u.RLE.prototype.decode=function(h,g,S){var v;for(this.rawData=new DataView(h),this.littleEndian=g,this.numElements=S,this.readHeader(),this.output=new DataView(new ArrayBuffer(this.size)),v=0;v=0&&h<128?this.readLiteral(h):h<=-1&&h>-128?this.readEncoded(h):h===-128&&console.warn("RLE: unsupported code!");this.segmentIndex+=1},u.RLE.prototype.readLiteral=function(h){var g,S=h+1;if(this.hasValidInput())for(g=0;g1)for(var v=Array.prototype.slice.call(arguments,1);S--;)g[h-1-S]=u.lossless.Utils.createArray.apply(this,v);return g},u.lossless.Utils.makeCRCTable=function(){for(var h,g=[],S=0;S<256;S++){h=S;for(var v=0;v<8;v++)h=h&1?3988292384^h>>>1:h>>>1;g[S]=h}return g},u.lossless.Utils.crc32=function(h){for(var g=new Uint8Array(h.buffer),S=u.lossless.Utils.crcTable||(u.lossless.Utils.crcTable=u.lossless.Utils.makeCRCTable()),v=-1,w=0;w>>8^S[(v^g[w])&255];return(v^-1)>>>0},C.exports&&(C.exports=u.lossless.Utils)}(utils)),utils.exports}var hasRequiredHuffmanTable;function requireHuffmanTable(){return hasRequiredHuffmanTable||(hasRequiredHuffmanTable=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||function(){this.l=u.lossless.Utils.createArray(4,2,16),this.th=[],this.v=u.lossless.Utils.createArray(4,2,16,200),this.tc=u.lossless.Utils.createArray(4,2),this.tc[0][0]=0,this.tc[1][0]=0,this.tc[2][0]=0,this.tc[3][0]=0,this.tc[0][1]=0,this.tc[1][1]=0,this.tc[2][1]=0,this.tc[3][1]=0,this.th[0]=0,this.th[1]=0,this.th[2]=0,this.th[3]=0},u.lossless.HuffmanTable.MSB=2147483648,u.lossless.HuffmanTable.prototype.read=function(h,g){var S=0,v,w,I,_,P,L;for(v=h.get16(),S+=2;S3)throw new Error("ERROR: Huffman table ID > 3");if(_=w>>4,_>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[I]=1,this.tc[I][_]=1,P=0;P<16;P+=1)this.l[I][_][P]=h.get8(),S+=1;for(P=0;P<16;P+=1)for(L=0;Lv)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[I][_][P][L]=h.get8(),S+=1}}if(S!==v)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(P=0;P<4;P+=1)for(L=0;L<2;L+=1)this.tc[P][L]!==0&&this.buildHuffTable(g[P][L],this.l[P][L],this.v[P][L]);return 1},u.lossless.HuffmanTable.prototype.buildHuffTable=function(h,g,S){var v,w,I,_,P,L;for(w=256,I=0,_=0;_<8;_+=1)for(P=0;P>_+1;L+=1)h[I]=S[_][P]|_+1<<8,I+=1;for(_=1;I<256;_+=1,I+=1)h[I]=_|u.lossless.HuffmanTable.MSB;for(v=1,I=0,_=8;_<16;_+=1)for(P=0;P>_-7;L+=1)h[v*256+I]=S[_][P]|_+1<<8,I+=1;if(I>=256){if(I>256)throw new Error("ERROR: Huffman table error(1)!");I=0,v+=1}}},C.exports&&(C.exports=u.lossless.HuffmanTable)}(huffmanTable)),huffmanTable.exports}var quantizationTable={exports:{}},hasRequiredQuantizationTable;function requireQuantizationTable(){return hasRequiredQuantizationTable||(hasRequiredQuantizationTable=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||function(){this.precision=[],this.tq=[],this.quantTables=u.lossless.Utils.createArray(4,64),this.tq[0]=0,this.tq[1]=0,this.tq[2]=0,this.tq[3]=0},u.lossless.QuantizationTable.enhanceQuantizationTable=function(h,g){var S;for(S=0;S<8;S+=1)h[g[0*8+S]]*=90,h[g[4*8+S]]*=90,h[g[2*8+S]]*=118,h[g[6*8+S]]*=49,h[g[5*8+S]]*=71,h[g[1*8+S]]*=126,h[g[7*8+S]]*=25,h[g[3*8+S]]*=106;for(S=0;S<8;S+=1)h[g[0+8*S]]*=90,h[g[4+8*S]]*=90,h[g[2+8*S]]*=118,h[g[6+8*S]]*=49,h[g[5+8*S]]*=71,h[g[1+8*S]]*=126,h[g[7+8*S]]*=25,h[g[3+8*S]]*=106;for(S=0;S<64;S+=1)h[S]>>=6},u.lossless.QuantizationTable.prototype.read=function(h,g){var S=0,v,w,I,_;for(v=h.get16(),S+=2;S3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[I]=w>>4,this.precision[I]===0)this.precision[I]=8;else if(this.precision[I]===1)this.precision[I]=16;else throw new Error("ERROR: Quantization table precision error");if(this.tq[I]=1,this.precision[I]===8){for(_=0;_<64;_+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[I][_]=h.get8(),S+=1}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[I],g)}else{for(_=0;_<64;_+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[I][_]=h.get16(),S+=2}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[I],g)}}if(S!==v)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1},C.exports&&(C.exports=u.lossless.QuantizationTable)}(quantizationTable)),quantizationTable.exports}var scanHeader={exports:{}},scanComponent={exports:{}},hasRequiredScanComponent;function requireScanComponent(){return hasRequiredScanComponent||(hasRequiredScanComponent=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.ScanComponent=u.lossless.ScanComponent||function(){this.acTabSel=0,this.dcTabSel=0,this.scanCompSel=0},C.exports&&(C.exports=u.lossless.ScanComponent)}(scanComponent)),scanComponent.exports}var hasRequiredScanHeader;function requireScanHeader(){return hasRequiredScanHeader||(hasRequiredScanHeader=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.ScanComponent=u.lossless.ScanComponent||(typeof commonjsRequire<"u"?requireScanComponent():null),u.lossless.ScanHeader=u.lossless.ScanHeader||function(){this.ah=0,this.al=0,this.numComp=0,this.selection=0,this.spectralEnd=0,this.components=[]},u.lossless.ScanHeader.prototype.read=function(h){var g=0,S,v,w;for(S=h.get16(),g+=2,this.numComp=h.get8(),g+=1,v=0;vS)throw new Error("ERROR: scan header format error");this.components[v].scanCompSel=h.get8(),g+=1,w=h.get8(),g+=1,this.components[v].dcTabSel=w>>4,this.components[v].acTabSel=w&15}if(this.selection=h.get8(),g+=1,this.spectralEnd=h.get8(),g+=1,w=h.get8(),this.ah=w>>4,this.al=w&15,g+=1,g!==S)throw new Error("ERROR: scan header format error [count!=Ns]");return 1},C.exports&&(C.exports=u.lossless.ScanHeader)}(scanHeader)),scanHeader.exports}var frameHeader={exports:{}},hasRequiredFrameHeader;function requireFrameHeader(){return hasRequiredFrameHeader||(hasRequiredFrameHeader=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.ComponentSpec=u.lossless.ComponentSpec||(typeof commonjsRequire<"u"?requireComponentSpec():null),u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.FrameHeader=u.lossless.FrameHeader||function(){this.components=[],this.dimX=0,this.dimY=0,this.numComp=0,this.precision=0},u.lossless.FrameHeader.prototype.read=function(h){var g=0,S,v,w,I;for(S=h.get16(),g+=2,this.precision=h.get8(),g+=1,this.dimY=h.get16(),g+=2,this.dimX=h.get16(),g+=2,this.numComp=h.get8(),g+=1,v=1;v<=this.numComp;v+=1){if(g>S)throw new Error("ERROR: frame format error");if(w=h.get8(),g+=1,g>=S)throw new Error("ERROR: frame format error [c>=Lf]");I=h.get8(),g+=1,this.components[w]||(this.components[w]=new u.lossless.ComponentSpec),this.components[w].hSamp=I>>4,this.components[w].vSamp=I&15,this.components[w].quantTableSel=h.get8(),g+=1}if(g!==S)throw new Error("ERROR: frame format error [Lf!=count]");return 1},C.exports&&(C.exports=u.lossless.FrameHeader)}(frameHeader)),frameHeader.exports}var hasRequiredDecoder;function requireDecoder(){return hasRequiredDecoder||(hasRequiredDecoder=1,function(C){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||(typeof commonjsRequire<"u"?requireHuffmanTable():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||(typeof commonjsRequire<"u"?requireQuantizationTable():null),u.lossless.ScanHeader=u.lossless.ScanHeader||(typeof commonjsRequire<"u"?requireScanHeader():null),u.lossless.FrameHeader=u.lossless.FrameHeader||(typeof commonjsRequire<"u"?requireFrameHeader():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.Decoder=u.lossless.Decoder||function(g,S){this.buffer=g,this.frame=new u.lossless.FrameHeader,this.huffTable=new u.lossless.HuffmanTable,this.quantTable=new u.lossless.QuantizationTable,this.scan=new u.lossless.ScanHeader,this.DU=u.lossless.Utils.createArray(10,4,64),this.HuffTab=u.lossless.Utils.createArray(4,2,50*256),this.IDCT_Source=[],this.nBlock=[],this.acTab=u.lossless.Utils.createArray(10,1),this.dcTab=u.lossless.Utils.createArray(10,1),this.qTab=u.lossless.Utils.createArray(10,1),this.marker=0,this.markerIndex=0,this.numComp=0,this.restartInterval=0,this.selection=0,this.xDim=0,this.yDim=0,this.xLoc=0,this.yLoc=0,this.numBytes=0,this.outputData=null,this.restarting=!1,this.mask=0,typeof S<"u"&&(this.numBytes=S)},u.lossless.Decoder.IDCT_P=[0,5,40,16,45,2,7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54],u.lossless.Decoder.TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],u.lossless.Decoder.MAX_HUFFMAN_SUBTREE=50,u.lossless.Decoder.MSB=2147483648,u.lossless.Decoder.RESTART_MARKER_BEGIN=65488,u.lossless.Decoder.RESTART_MARKER_END=65495,u.lossless.Decoder.prototype.decompress=function(g,S,v){return this.decode(g,S,v).buffer},u.lossless.Decoder.prototype.decode=function(g,S,v,w){var I,_=0,P=[],L,d,k=[],e=[],N;if(typeof g<"u"&&(this.buffer=g),typeof w<"u"&&(this.numBytes=w),this.stream=new u.lossless.DataStream(this.buffer,S,v),this.buffer=null,this.xLoc=0,this.yLoc=0,I=this.stream.get16(),I!==65496)throw new Error("Not a JPEG file");for(I=this.stream.get16();I>>4!==4092||I===65476;){switch(I){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(I>>8!==255)throw new Error("ERROR: format throw new IOException! (decode)")}I=this.stream.get16()}if(I<65472||I>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),I=this.stream.get16();do{for(;I!==65498;){switch(I){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(I>>8!==255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}I=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=parseInt(Math.ceil(this.precision/8))),this.numBytes==1?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,this.numBytes===1?this.numComp===3?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue16,this.setter=this.setValue16,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}for(this.scanComps=this.scan.components,this.quantTables=this.quantTable.quantTables,L=0;L=u.lossless.Decoder.RESTART_MARKER_BEGIN&&I<=u.lossless.Decoder.RESTART_MARKER_END))break}I===65500&&_===1&&(this.readNumber(),I=this.stream.get16())}while(I!==65497&&this.xLoc>1)},u.lossless.Decoder.prototype.select6=function(g){return this.getPreviousY(g)+(this.getPreviousX(g)-this.getPreviousXY(g)>>1)},u.lossless.Decoder.prototype.select7=function(g){return(this.getPreviousX(g)+this.getPreviousY(g))/2},u.lossless.Decoder.prototype.decodeRGB=function(g,S,v){var w,I,_,P,L,d,k,e;for(g[0]=this.selector(0),g[1]=this.selector(1),g[2]=this.selector(2),L=0;L=65280)return w;for(g[L]=this.IDCT_Source[0]=g[L]+this.getn(v,w,S,v),this.IDCT_Source[0]*=P[0],e=1;e<64;e+=1){if(w=this.getHuffmanValue(I,S,v),w>=65280)return w;if(e+=w>>4,w&15)this.IDCT_Source[u.lossless.Decoder.IDCT_P[e]]=this.getn(v,w&15,S,v)*P[e];else if(!(w>>4))break}}return 0},u.lossless.Decoder.prototype.decodeSingle=function(g,S,v){var w,I,_,P;for(this.restarting?(this.restarting=!1,g[0]=1<=65280)return w;if(_=this.getn(g,w,S,v),P=_>>8,P>=u.lossless.Decoder.RESTART_MARKER_BEGIN&&P<=u.lossless.Decoder.RESTART_MARKER_END)return P;g[0]+=_}return 0},u.lossless.Decoder.prototype.getHuffmanValue=function(g,S,v){var w,I,_;if(_=65535,v[0]<8?(S[0]<<=8,I=this.stream.get8(),I===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=I):v[0]-=8,w=g[S[0]>>v[0]],w&u.lossless.Decoder.MSB){if(this.markerIndex!==0)return this.markerIndex=0,65280|this.marker;S[0]&=_>>16-v[0],S[0]<<=8,I=this.stream.get8(),I===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=I,w=g[(w&255)*256+(S[0]>>v[0])],v[0]+=8}if(v[0]+=8-(w>>8),v[0]<0)throw new Error("index="+v[0]+" temp="+S[0]+" code="+w+" in HuffmanValue()");return v[0]>16-v[0],w&255)},u.lossless.Decoder.prototype.getn=function(g,S,v,w){var I,_,P,L,d;if(_=1,P=-1,L=65535,S===0)return 0;if(S===16)return g[0]>=0?-32768:32768;if(w[0]-=S,w[0]>=0){if(w[0]>w[0],v[0]&=L>>16-w[0]}else{if(v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8,w[0]<0){if(this.markerIndex!==0)return this.markerIndex=0,(65280|this.marker)<<8;v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8}if(w[0]<0)throw new Error("index="+w[0]+" in getn()");if(w[0]>w[0],v[0]&=L>>16-w[0]}return I<_<0?this.getter(this.yLoc*this.xDim+this.xLoc-1,g):this.yLoc>0?this.getPreviousY(g):1<0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,g):this.getPreviousY(g)},u.lossless.Decoder.prototype.getPreviousY=function(g){return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,g):this.getPreviousX(g)},u.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1},u.lossless.Decoder.prototype.outputSingle=function(g){this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.outputRGB=function(g){var S=this.yLoc*this.xDim+this.xLoc;this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.setValue8=function(g,S){this.outputData[g]=S},u.lossless.Decoder.prototype.getValue8=function(g){return this.outputData[g]};var h=function(){var g=new ArrayBuffer(2);return new DataView(g).setInt16(0,256,!0),new Int16Array(g)[0]===256}();h?(u.lossless.Decoder.prototype.setValue16=u.lossless.Decoder.prototype.setValue8,u.lossless.Decoder.prototype.getValue16=u.lossless.Decoder.prototype.getValue8):(u.lossless.Decoder.prototype.setValue16=function(g,S){this.outputData[g]=(S&255)<<8|S>>8&255},u.lossless.Decoder.prototype.getValue16=function(g){var S=this.outputData[g];return(S&255)<<8|S>>8&255}),u.lossless.Decoder.prototype.setValueRGB=function(g,S,v){this.outputData[g*3+v]=S},u.lossless.Decoder.prototype.getValueRGB=function(g,S){return this.outputData[g*3+S]},u.lossless.Decoder.prototype.readApp=function(){var g=0,S=this.stream.get16();for(g+=2;g0&&!y[f-1];)f--;Z.push({children:[],index:0});var f0=Z[0],o0;for(e0=0;e00;)f0=Z.pop();for(f0.index++,Z.push(f0);Z.length<=e0;)Z.push(o0={children:[],index:0}),f0.children[f0.index]=o0.children,f0=o0;G++}e0+10)return x0--,g0>>x0&1;if(g0=y[Y++],g0==255){var Q0=y[Y++];if(Q0)throw"unexpected marker: "+(g0<<8|Q0).toString(16)}return x0=7,g0>>>7}function M0(Q0){for(var B0=Q0,pe;(pe=T0())!==null;){if(B0=B0[pe],typeof B0=="number")return B0;if(typeof B0!="object")throw"invalid huffman sequence"}return null}function ee(Q0){for(var B0=0;Q0>0;){var pe=T0();if(pe===null)return;B0=B0<<1|pe,Q0--}return B0}function re(Q0){var B0=ee(Q0);return B0>=1<>4;if(U0===0){if(X0<15)break;K0+=16;continue}K0+=X0;var z0=S[K0];Q0.blockData[B0+z0]=re(U0),K0++}}function Oe(Q0,B0){var pe=M0(Q0.huffmanTableDC),q0=pe===0?0:re(pe)<0){D0--;return}for(var pe=z,q0=f;pe<=q0;){var K0=M0(Q0.huffmanTableAC),W=K0&15,U0=K0>>4;if(W===0){if(U0<15){D0=ee(U0)+(1<>4,X0===0)K0<15?(D0=ee(K0)+(1<=65488&&O0<=65495)Y+=2;else break}return Y-v0}function i0(y,Y,G){var Z=y.quantizationTable,e0,z,f,f0,o0,c0,m0,v0,g0,x0;for(x0=0;x0<64;x0++)G[x0]=y.blockData[Y+x0]*Z[x0];for(x0=0;x0<8;++x0){var T0=8*x0;if(G[1+T0]===0&&G[2+T0]===0&&G[3+T0]===0&&G[4+T0]===0&&G[5+T0]===0&&G[6+T0]===0&&G[7+T0]===0){g0=d*G[0+T0]+512>>10,G[0+T0]=g0,G[1+T0]=g0,G[2+T0]=g0,G[3+T0]=g0,G[4+T0]=g0,G[5+T0]=g0,G[6+T0]=g0,G[7+T0]=g0;continue}e0=d*G[0+T0]+128>>8,z=d*G[4+T0]+128>>8,f=G[2+T0],f0=G[6+T0],o0=k*(G[1+T0]-G[7+T0])+128>>8,v0=k*(G[1+T0]+G[7+T0])+128>>8,c0=G[3+T0]<<4,m0=G[5+T0]<<4,g0=e0-z+1>>1,e0=e0+z+1>>1,z=g0,g0=f*L+f0*P+128>>8,f=f*P-f0*L+128>>8,f0=g0,g0=o0-m0+1>>1,o0=o0+m0+1>>1,m0=g0,g0=v0+c0+1>>1,c0=v0-c0+1>>1,v0=g0,g0=e0-f0+1>>1,e0=e0+f0+1>>1,f0=g0,g0=z-f+1>>1,z=z+f+1>>1,f=g0,g0=o0*_+v0*I+2048>>12,o0=o0*I-v0*_+2048>>12,v0=g0,g0=c0*w+m0*v+2048>>12,c0=c0*v-m0*w+2048>>12,m0=g0,G[0+T0]=e0+v0,G[7+T0]=e0-v0,G[1+T0]=z+m0,G[6+T0]=z-m0,G[2+T0]=f+c0,G[5+T0]=f-c0,G[3+T0]=f0+o0,G[4+T0]=f0-o0}for(x0=0;x0<8;++x0){var M0=x0;if(G[1*8+M0]===0&&G[2*8+M0]===0&&G[3*8+M0]===0&&G[4*8+M0]===0&&G[5*8+M0]===0&&G[6*8+M0]===0&&G[7*8+M0]===0){g0=d*G[x0+0]+8192>>14,G[0*8+M0]=g0,G[1*8+M0]=g0,G[2*8+M0]=g0,G[3*8+M0]=g0,G[4*8+M0]=g0,G[5*8+M0]=g0,G[6*8+M0]=g0,G[7*8+M0]=g0;continue}e0=d*G[0*8+M0]+2048>>12,z=d*G[4*8+M0]+2048>>12,f=G[2*8+M0],f0=G[6*8+M0],o0=k*(G[1*8+M0]-G[7*8+M0])+2048>>12,v0=k*(G[1*8+M0]+G[7*8+M0])+2048>>12,c0=G[3*8+M0],m0=G[5*8+M0],g0=e0-z+1>>1,e0=e0+z+1>>1,z=g0,g0=f*L+f0*P+2048>>12,f=f*P-f0*L+2048>>12,f0=g0,g0=o0-m0+1>>1,o0=o0+m0+1>>1,m0=g0,g0=v0+c0+1>>1,c0=v0-c0+1>>1,v0=g0,g0=e0-f0+1>>1,e0=e0+f0+1>>1,f0=g0,g0=z-f+1>>1,z=z+f+1>>1,f=g0,g0=o0*_+v0*I+2048>>12,o0=o0*I-v0*_+2048>>12,v0=g0,g0=c0*w+m0*v+2048>>12,c0=c0*v-m0*w+2048>>12,m0=g0,G[0*8+M0]=e0+v0,G[7*8+M0]=e0-v0,G[1*8+M0]=z+m0,G[6*8+M0]=z-m0,G[2*8+M0]=f+c0,G[5*8+M0]=f-c0,G[3*8+M0]=f0+o0,G[4*8+M0]=f0-o0}for(x0=0;x0<64;++x0){var ee=Y+x0,re=G[x0];re=re<=-2056/y.bitConversion?0:re>=2024/y.bitConversion?255/y.bitConversion:re+2056/y.bitConversion>>4,y.blockData[ee]=re}}function j(y,Y){for(var G=Y.blocksPerLine,Z=Y.blocksPerColumn,e0=new Int32Array(64),z=0;z=255?255:y|0}return e.prototype={load:function(Y){var G=(function(o0){this.parse(o0),this.onload&&this.onload()}).bind(this);if(Y.indexOf("data:")>-1){for(var Z=Y.indexOf("base64,")+7,e0=atob(Y.substring(Z)),z=new Uint8Array(e0.length),f=e0.length-1;f>=0;f--)z[f]=e0.charCodeAt(f);G(e0)}else{var f0=new XMLHttpRequest;f0.open("GET",Y,!0),f0.responseType="arraybuffer",f0.onload=(function(){var o0=new Uint8Array(f0.response);G(o0)}).bind(this),f0.send(null)}},parse:function(Y){function G(){var W=Y[z]<<8|Y[z+1];return z+=2,W}function Z(){var W=G(),U0=Y.subarray(z,z+W-2);return z+=U0.length,U0}function e0(W){for(var U0=Math.ceil(W.samplesPerLine/8/W.maxH),X0=Math.ceil(W.scanLines/8/W.maxV),z0=0;z0>4)if(ke>>4===1)for(M0=0;M0<64;M0++){var Ge=S[M0];D0[Ge]=G()}else throw"DQT: invalid table spec";else for(M0=0;M0<64;M0++){var Ve=S[M0];D0[Ve]=Y[z++]}m0[ke&15]=D0}break;case 65472:case 65473:case 65474:if(o0)throw"Only single frame JPEGs supported";G(),o0={},o0.extended=x0===65473,o0.progressive=x0===65474,o0.precision=Y[z++],o0.scanLines=G(),o0.samplesPerLine=G(),o0.components=[],o0.componentIds={};var ti=Y[z++],ai,ri=0,qe=0;for(T0=0;T0>4,J0=Y[z+1]&15;ri>4?v0:g0)[C0&15]=N(R0,N0)}break;case 65501:G(),c0=G();break;case 65498:G();var O0=Y[z++],V0=[],k0;for(T0=0;T0>4],k0.huffmanTableAC=v0[Q0&15],V0.push(k0)}var B0=Y[z++],pe=Y[z++],q0=Y[z++],K0=Q(Y,z,o0,V0,c0,B0,pe,q0>>4,q0&15);z+=K0;break;default:if(Y[z-3]==255&&Y[z-2]>=192&&Y[z-2]<=254){z-=3;break}throw"unknown JPEG marker "+x0.toString(16)}x0=G()}switch(this.width=o0.samplesPerLine,this.height=o0.scanLines,this.jfif=f,this.adobe=f0,this.components=[],o0.components.length){case 1:this.colorspace=u.Grayscale;break;case 3:this.adobe?this.colorspace=u.AdobeRGB:this.colorspace=u.RGB;break;case 4:this.colorspace=u.CYMK;break;default:this.colorspace=u.Unknown}for(var T0=0;T0>24&255,O0>>16&255,O0>>8&255,O0&255);w("Unsupported header type "+O0+" ("+B0+")");break}k0&&(C0+=V0)}},parseImageProperties:function(F0){for(var se=F0.getByte();se>=0;){var C0=se;se=F0.getByte();var R0=C0<<8|se;if(R0===65361){F0.skip(4);var me=F0.getInt32()>>>0,N0=F0.getInt32()>>>0,O0=F0.getInt32()>>>0,V0=F0.getInt32()>>>0;F0.skip(16);var k0=F0.getUint16();this.width=me-O0,this.height=N0-V0,this.componentsCount=k0,this.bitsPerComponent=8;return}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(F0,se,C0){var R0={};try{for(var me=!1,N0=se;N0+1>5,Q0=[];k0>3,ue.mu=0):(ue.epsilon=F0[k0]>>3,ue.mu=(F0[k0]&7)<<8|F0[k0+1],k0+=2),Q0.push(ue)}oe.SPqcds=Q0,R0.mainHeader?R0.QCD=oe:(R0.currentTile.QCD=oe,R0.currentTile.QCC=[]);break;case 65373:V0=B(F0,N0);var I0={};k0=N0+2;var b0;switch(R0.SIZ.Csiz<257?b0=F0[k0++]:(b0=B(F0,k0),k0+=2),j0=F0[k0++],j0&31){case 0:B0=8,pe=!0;break;case 1:B0=16,pe=!1;break;case 2:B0=16,pe=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+j0)}for(I0.noQuantization=B0===8,I0.scalarExpounded=pe,I0.guardBits=j0>>5,Q0=[];k0>3,ue.mu=0):(ue.epsilon=F0[k0]>>3,ue.mu=(F0[k0]&7)<<8|F0[k0+1],k0+=2),Q0.push(ue);I0.SPqcds=Q0,R0.mainHeader?R0.QCC[b0]=I0:R0.currentTile.QCC[b0]=I0;break;case 65362:V0=B(F0,N0);var n0={};k0=N0+2;var h0=F0[k0++];n0.entropyCoderWithCustomPrecincts=!!(h0&1),n0.sopMarkerUsed=!!(h0&2),n0.ephMarkerUsed=!!(h0&4),n0.progressionOrder=F0[k0++],n0.layersCount=B(F0,k0),k0+=2,n0.multipleComponentTransform=F0[k0++],n0.decompositionLevelsCount=F0[k0++],n0.xcb=(F0[k0++]&15)+2,n0.ycb=(F0[k0++]&15)+2;var Ee=F0[k0++];if(n0.selectiveArithmeticCodingBypass=!!(Ee&1),n0.resetContextProbabilities=!!(Ee&2),n0.terminationOnEachCodingPass=!!(Ee&4),n0.verticalyStripe=!!(Ee&8),n0.predictableTermination=!!(Ee&16),n0.segmentationSymbolUsed=!!(Ee&32),n0.reversibleTransformation=F0[k0++],n0.entropyCoderWithCustomPrecincts){for(var u0=[];k0>4})}n0.precinctsSizes=u0}var L0=[];if(n0.selectiveArithmeticCodingBypass&&L0.push("selectiveArithmeticCodingBypass"),n0.resetContextProbabilities&&L0.push("resetContextProbabilities"),n0.terminationOnEachCodingPass&&L0.push("terminationOnEachCodingPass"),n0.verticalyStripe&&L0.push("verticalyStripe"),n0.predictableTermination&&L0.push("predictableTermination"),L0.length>0)throw me=!0,new Error("JPX Error: Unsupported COD options ("+L0.join(", ")+")");R0.mainHeader?R0.COD=n0:(R0.currentTile.COD=n0,R0.currentTile.COC=[]);break;case 65424:V0=B(F0,N0),q0={},q0.index=B(F0,N0+2),q0.length=Q(F0,N0+4),q0.dataEnd=q0.length+N0-2,q0.partIndex=F0[N0+8],q0.partsCount=F0[N0+9],R0.mainHeader=!1,q0.partIndex===0&&(q0.COD=R0.COD,q0.COC=R0.COC.slice(0),q0.QCD=R0.QCD,q0.QCC=R0.QCC.slice(0)),R0.currentTile=q0;break;case 65427:q0=R0.currentTile,q0.partIndex===0&&(Ve(R0,q0.index),re(R0)),V0=q0.dataEnd-N0,Fe(R0,F0,N0,V0);break;case 65365:case 65367:case 65368:case 65380:V0=B(F0,N0);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+O0.toString(16))}N0+=V0}}catch(Ye){if(me||this.failOnCorruptedImage)throw Ye;w("Trying to recover from "+Ye.message)}this.tiles=D0(R0),this.width=R0.SIZ.Xsiz-R0.SIZ.XOsiz,this.height=R0.SIZ.Ysiz-R0.SIZ.YOsiz,this.componentsCount=R0.SIZ.Csiz}};function e0(J0,F0){J0.x0=Math.ceil(F0.XOsiz/J0.XRsiz),J0.x1=Math.ceil(F0.Xsiz/J0.XRsiz),J0.y0=Math.ceil(F0.YOsiz/J0.YRsiz),J0.y1=Math.ceil(F0.Ysiz/J0.YRsiz),J0.width=J0.x1-J0.x0,J0.height=J0.y1-J0.y0}function z(J0,F0){for(var se=J0.SIZ,C0,R0=[],me=Math.ceil((se.Xsiz-se.XTOsiz)/se.XTsiz),N0=Math.ceil((se.Ysiz-se.YTOsiz)/se.YTsiz),O0=0;O00?Math.min(C0.xcb,R0.PPx-1):Math.min(C0.xcb,R0.PPx),R0.ycb_=se>0?Math.min(C0.ycb,R0.PPy-1):Math.min(C0.ycb,R0.PPy),R0}function f0(J0,F0,se){var C0=1<F0.trx0?Math.ceil(F0.trx1/C0)-Math.floor(F0.trx0/C0):0,k0=F0.try1>F0.try0?Math.ceil(F0.try1/R0)-Math.floor(F0.try0/R0):0,j0=V0*k0;F0.precinctParameters={precinctWidth:C0,precinctHeight:R0,numprecinctswide:V0,numprecinctshigh:k0,numprecincts:j0,precinctWidthInSubband:N0,precinctHeightInSubband:O0}}function o0(J0,F0,se){var C0=se.xcb_,R0=se.ycb_,me=1<>C0,V0=F0.tby0>>R0,k0=F0.tbx1+me-1>>C0,j0=F0.tby1+N0-1>>R0,Q0=F0.resolution.precinctParameters,B0=[],pe=[],q0,K0,W,U0;for(K0=V0;K0oe.cbxMax&&(oe.cbxMax=q0),K0oe.cbyMax&&(oe.cbyMax=K0)):pe[U0]=oe={cbxMin:q0,cbyMin:K0,cbxMax:q0,cbyMax:K0},W.precinct=oe}}F0.codeblockParameters={codeblockWidth:C0,codeblockHeight:R0,numcodeblockwide:k0-O0+1,numcodeblockhigh:j0-V0+1},F0.codeblocks=B0,F0.precincts=pe}function c0(J0,F0,se){for(var C0=[],R0=J0.subbands,me=0,N0=R0.length;mepe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[k0],K0=q0.precinctParameters.numprecincts;Q0pe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[V0],K0=q0.precinctParameters.numprecincts;Q0W.codingStyleParameters.decompositionLevelsCount)){var U0=W.resolutions[O0],X0=U0.precinctParameters.numprecincts;if(!(k0>=X0)){for(;N0=0;--W){var U0=V0.resolutions[W],X0=K0*U0.precinctParameters.precinctWidth,z0=K0*U0.precinctParameters.precinctHeight;Q0=Math.min(Q0,X0),B0=Math.min(B0,z0),pe=Math.max(pe,U0.precinctParameters.numprecinctswide),q0=Math.max(q0,U0.precinctParameters.numprecinctshigh),j0[W]={width:X0,height:z0},K0<<=1}se=Math.min(se,Q0),C0=Math.min(C0,B0),R0=Math.max(R0,pe),me=Math.max(me,q0),N0[O0]={resolutions:j0,minWidth:Q0,minHeight:B0,maxNumWide:pe,maxNumHigh:q0}}return{components:N0,minWidth:se,minHeight:C0,maxNumWide:R0,maxNumHigh:me}}function re(J0){for(var F0=J0.SIZ,se=J0.currentTile.index,C0=J0.tiles[se],R0=F0.Csiz,me=0;me=F0.length)throw new Error("Unexpected EOF");var we=F0[se+R0];R0++,O0?(me=me<<7|we,N0+=7,O0=!1):(me=me<<8|we,N0+=8),we===255&&(O0=!0)}return N0-=d0,me>>>N0&(1<=F0.length)return;if(Ye.isAboveThreshold())break;if(Ye.isKnown()){Ye.nextLevel();continue}if(V0(1))if(Ye.setKnown(),Ye.isLeaf()){ue.included=!0,u0=Me=!0;break}else Ye.nextLevel();else Ye.incrementValue()}}if(u0){if(Me){for(W0=n0.zeroBitPlanesTree,W0.reset(h0,Ee);;){if(R0>=F0.length)return;if(V0(1)){if(L0=!W0.nextLevel(),L0)break}else W0.incrementValue()}ue.zeroBitPlanes=W0.value}for(var y0=B0();V0(1);)ue.Lblock++;var $=N(y0),Z0=(y0<1<<$?$-1:$)+ue.Lblock,p0=V0(Z0);oe.push({codeblock:ue,codingpasses:y0,dataLength:p0})}}for(Q0(),W&&k0(146);oe.length>0;){var E0=oe.shift();ue=E0.codeblock,ue.data===void 0&&(ue.data=[]),ue.data.push({data:F0,start:se+R0,end:se+R0+E0.dataLength,codingpasses:E0.codingpasses}),R0+=E0.dataLength}}catch{return}return R0}function Oe(J0,F0,se,C0,R0,me,N0,O0){for(var V0=C0.tbx0,k0=C0.tby0,j0=C0.tbx1-C0.tbx0,Q0=C0.codeblocks,B0=C0.type.charAt(0)==="H"?1:0,pe=C0.type.charAt(1)==="H"?F0:0,q0=0,K0=Q0.length;q0=me?J0[Le]=p0:J0[Le]=p0*(1<0?1-W:0));var h0=U0.subbands[ue],Ee=G[h0.type],u0=B0?1:Math.pow(2,Q0+Ee-n0)*(1+b0/2048),Me=k0+n0-1;Oe(oe,X0,z0,h0,u0,Me,B0,j0)}q0.push({width:X0,height:z0,items:oe})}var L0=pe.calculate(q0,C0.tcx0,C0.tcy0);return{left:C0.tcx0,top:C0.tcy0,width:L0.width,height:L0.height,items:L0.items}}function D0(J0){for(var F0=J0.SIZ,se=J0.components,C0=F0.Csiz,R0=[],me=0,N0=J0.tiles.length;me>2),h0=Ee+n0,u0=Ee+b0,B0[z0++]=h0<=0?0:h0>=W?255:h0>>q0,B0[z0++]=Ee<=0?0:Ee>=W?255:Ee>>q0,B0[z0++]=u0<=0?0:u0>=W?255:u0>>q0;else for(oe=0;oe=W?255:h0>>q0,B0[z0++]=Ee<=0?0:Ee>=W?255:Ee>>q0,B0[z0++]=u0<=0?0:u0>=W?255:u0>>q0;if(Ye)for(oe=0,z0=3;oe=X0?255:Me+K0>>q0}else for(k0=0;k0=W?255:L0+K0>>q0,z0+=C0}else{var Q0=se[k0].isSigned,p0=V0[k0].items;if(Q0)for(z0=k0,oe=0,ue=p0.length;oe>=1,R0>>=1,me++}me--,O0=this.levels[me],O0.items[O0.index]=N0,this.currentLevel=me,delete this.value},incrementValue:function(){var C0=this.levels[this.currentLevel];C0.items[C0.index]++},nextLevel:function(){var C0=this.currentLevel,R0=this.levels[C0],me=R0.items[R0.index];return C0--,C0<0?(this.value=me,!1):(this.currentLevel=C0,R0=this.levels[C0],R0.items[R0.index]=me,!0)}},F0}(),ti=function(){function F0(se,C0){var R0=N(Math.max(se,C0))+1;this.levels=[];for(var me=0;me>=1,R0>>=1,N0++}this.currentLevel=this.levels.length-1,this.minValue=this.levels[this.currentLevel].items[0]},incrementValue:function(){var C0=this.levels[this.currentLevel];C0.items[C0.index]=C0.items[C0.index]+1,C0.items[C0.index]>this.minValue&&(this.minValue=C0.items[C0.index])},nextLevel:function(){var C0=this.currentLevel;if(C0--,C0<0)return!1;this.currentLevel=C0;var R0=this.levels[C0];return R0.items[R0.index]this.minValue&&(this.minValue=R0.items[R0.index]),!0},isLeaf:function(){return this.currentLevel===0},isAboveThreshold:function(){var C0=this.currentLevel,R0=this.levels[C0];return R0.items[R0.index]>this.currentStopValue},isKnown:function(){var C0=this.currentLevel,R0=this.levels[C0];return R0.status[R0.index]>0},setKnown:function(){var C0=this.currentLevel,R0=this.levels[C0];R0.status[R0.index]=1}},F0}(),ai=function(){var F0=17,se=18,C0=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),R0=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),me=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function N0(O0,V0,k0,j0,Q0){this.width=O0,this.height=V0,this.contextLabelTable=k0==="HH"?me:k0==="HL"?R0:C0;var B0=O0*V0;this.neighborsSignificance=new Uint8Array(B0),this.coefficentsSign=new Uint8Array(B0),this.coefficentsMagnitude=Q0>14?new Uint32Array(B0):Q0>6?new Uint16Array(B0):new Uint8Array(B0),this.processingFlags=new Uint8Array(B0);var pe=new Uint8Array(B0);if(j0!==0)for(var q0=0;q00,K0=k0+10&&(W=j0-B0,q0&&(Q0[W-1]+=16),K0&&(Q0[W+1]+=16),Q0[W]+=4),V0+1=j0)break;if(q0[b0]&=X0,!(Q0[b0]||!pe[b0])){var Ee=W[pe[b0]],u0=V0.readBit(K0,Ee);if(u0){var Me=this.decodeSignBit(h0,I0,b0);B0[b0]=Me,Q0[b0]=1,this.setNeighborsSignificance(h0,I0,b0),q0[b0]|=oe}U0[b0]++,q0[b0]|=z0}}},decodeSignBit:function(V0,k0,j0){var Q0=this.width,B0=this.height,pe=this.coefficentsMagnitude,q0=this.coefficentsSign,K0,W,U0,X0,z0,oe;X0=k0>0&&pe[j0-1]!==0,k0+10&&pe[j0-Q0]!==0,V0+1=0?(z0=9+K0,oe=this.decoder.readBit(this.contexts,z0)):(z0=9-K0,oe=this.decoder.readBit(this.contexts,z0)^1),oe},runMagnitudeRefinementPass:function(){for(var V0=this.decoder,k0=this.width,j0=this.height,Q0=this.coefficentsMagnitude,B0=this.neighborsSignificance,pe=this.contexts,q0=this.bitsDecoded,K0=this.processingFlags,W=1,U0=2,X0=k0*j0,z0=k0*4,oe=0,ue;oe>1;R0=R0|0;var O0,V0,k0,j0,Q0=-1.586134342059924,B0=-.052980118572961,pe=.882911075530934,q0=.443506852043971,K0=1.230174104914001,W=1/K0;for(O0=R0-3,V0=N0+4;V0--;O0+=2)C0[O0]*=W;for(O0=R0-2,k0=q0*C0[O0-1],V0=N0+3;V0--&&(j0=q0*C0[O0+1],C0[O0]=K0*C0[O0]-k0-j0,V0--);O0+=2)O0+=2,k0=q0*C0[O0+1],C0[O0]=K0*C0[O0]-k0-j0;for(O0=R0-1,k0=pe*C0[O0-1],V0=N0+2;V0--&&(j0=pe*C0[O0+1],C0[O0]-=k0+j0,V0--);O0+=2)O0+=2,k0=pe*C0[O0+1],C0[O0]-=k0+j0;for(O0=R0,k0=B0*C0[O0-1],V0=N0+1;V0--&&(j0=B0*C0[O0+1],C0[O0]-=k0+j0,V0--);O0+=2)O0+=2,k0=B0*C0[O0+1],C0[O0]-=k0+j0;if(N0!==0)for(O0=R0+1,k0=Q0*C0[O0-1],V0=N0;V0--&&(j0=Q0*C0[O0+1],C0[O0]-=k0+j0,V0--);O0+=2)O0+=2,k0=Q0*C0[O0+1],C0[O0]-=k0+j0},F0}(),be=function(){function F0(){ri.call(this)}return F0.prototype=Object.create(ri.prototype),F0.prototype.filter=function(C0,R0,me){var N0=me>>1;R0=R0|0;var O0,V0;for(O0=R0,V0=N0+1;V0--;O0+=2)C0[O0]-=C0[O0-1]+C0[O0+1]+2>>2;for(O0=R0+1,V0=N0;V0--;O0+=2)C0[O0]+=C0[O0-1]+C0[O0+1]>>1},F0}();return Z}(),h=function(){var G=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function Z(e0,z,f){this.data=e0,this.bp=z,this.dataEnd=f,this.chigh=e0[z],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}return Z.prototype={byteIn:function(){var z=this.data,f=this.bp;if(z[f]===255){var f0=z[f+1];f0>143?(this.clow+=65280,this.ct=8):(f++,this.clow+=z[f]<<9,this.ct=7,this.bp=f)}else f++,this.clow+=f65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(z,f){var f0=z[f]>>1,o0=z[f]&1,c0=G[f0],m0=c0.qe,v0,g0=this.a-m0;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(g0&32768));return this.a=g0,z[f]=f0<<1|o0,v0}},Z}(),g=typeof window>"u"?commonjsGlobal:window;g.PDFJS||(g.PDFJS={});var S=S||{};S.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5},S.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};function v(Y){S.verbosity>=S.VERBOSITY_LEVELS.infos&&console.log("Info: "+Y)}function w(Y){S.verbosity>=S.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+Y)}S.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},S.UnsupportedManager=function(){var G=[];return{listen:function(Z){G.push(Z)},notify:function(Z){w('Unsupported feature "'+Z+'"');for(var e0=0,z=G.length;e0G;)G<<=1,Z++;return Z}function B(Y,G){return Y[G]<<8|Y[G+1]}function Q(Y,G){return(Y[G]<<24|Y[G+1]<<16|Y[G+2]<<8|Y[G+3])>>>0}function i0(){var Y=new Uint8Array(2);Y[0]=1;var G=new Uint16Array(Y.buffer);return G[0]===1}Object.defineProperty(S,"isLittleEndian",{configurable:!0,get:function(){return _(S,"isLittleEndian",i0())}});function j(){var Y=document.createElement("canvas");Y.width=Y.height=1;var G=Y.getContext("2d"),Z=G.createImageData(1,1);return typeof Z.data.buffer<"u"}Object.defineProperty(S,"hasCanvasTypedArrays",{configurable:!0,get:function(){return _(S,"hasCanvasTypedArrays",j())}});var H=S.Util=function(){function G(){}var Z=["rgb(",0,",",0,",",0,")"];return G.makeCssRgb=function(z,f,f0){return Z[1]=z,Z[3]=f,Z[5]=f0,Z.join("")},G.transform=function(z,f){return[z[0]*f[0]+z[2]*f[1],z[1]*f[0]+z[3]*f[1],z[0]*f[2]+z[2]*f[3],z[1]*f[2]+z[3]*f[3],z[0]*f[4]+z[2]*f[5]+z[4],z[1]*f[4]+z[3]*f[5]+z[5]]},G.applyTransform=function(z,f){var f0=z[0]*f[0]+z[1]*f[2]+f[4],o0=z[0]*f[1]+z[1]*f[3]+f[5];return[f0,o0]},G.applyInverseTransform=function(z,f){var f0=f[0]*f[3]-f[1]*f[2],o0=(z[0]*f[3]-z[1]*f[2]+f[2]*f[5]-f[4]*f[3])/f0,c0=(-z[0]*f[1]+z[1]*f[0]+f[4]*f[1]-f[5]*f[0])/f0;return[o0,c0]},G.getAxialAlignedBoundingBox=function(z,f){var f0=G.applyTransform(z,f),o0=G.applyTransform(z.slice(2,4),f),c0=G.applyTransform([z[0],z[3]],f),m0=G.applyTransform([z[2],z[1]],f);return[Math.min(f0[0],o0[0],c0[0],m0[0]),Math.min(f0[1],o0[1],c0[1],m0[1]),Math.max(f0[0],o0[0],c0[0],m0[0]),Math.max(f0[1],o0[1],c0[1],m0[1])]},G.inverseTransform=function(z){var f=z[0]*z[3]-z[1]*z[2];return[z[3]/f,-z[1]/f,-z[2]/f,z[0]/f,(z[2]*z[5]-z[4]*z[3])/f,(z[4]*z[1]-z[5]*z[0])/f]},G.apply3dTransform=function(z,f){return[z[0]*f[0]+z[1]*f[1]+z[2]*f[2],z[3]*f[0]+z[4]*f[1]+z[5]*f[2],z[6]*f[0]+z[7]*f[1]+z[8]*f[2]]},G.singularValueDecompose2dScale=function(z){var f=[z[0],z[2],z[1],z[3]],f0=z[0]*f[0]+z[1]*f[2],o0=z[0]*f[1]+z[1]*f[3],c0=z[2]*f[0]+z[3]*f[2],m0=z[2]*f[1]+z[3]*f[3],v0=(f0+m0)/2,g0=Math.sqrt((f0+m0)*(f0+m0)-4*(f0*m0-c0*o0))/2,x0=v0+g0||1,T0=v0-g0||1;return[Math.sqrt(x0),Math.sqrt(T0)]},G.normalizeRect=function(z){var f=z.slice(0);return z[0]>z[2]&&(f[0]=z[2],f[2]=z[0]),z[1]>z[3]&&(f[1]=z[3],f[3]=z[1]),f},G.intersect=function(z,f){function f0(v0,g0){return v0-g0}var o0=[z[0],z[2],f[0],f[2]].sort(f0),c0=[z[1],z[3],f[1],f[3]].sort(f0),m0=[];if(z=G.normalizeRect(z),f=G.normalizeRect(f),o0[0]===z[0]&&o0[1]===f[0]||o0[0]===f[0]&&o0[1]===z[0])m0[0]=o0[1],m0[2]=o0[2];else return!1;if(c0[0]===z[1]&&c0[1]===f[1]||c0[0]===f[1]&&c0[1]===z[1])m0[1]=c0[1],m0[3]=c0[2];else return!1;return m0},G.sign=function(z){return z<0?-1:1},G.appendToArray=function(z,f){Array.prototype.push.apply(z,f)},G.prependToArray=function(z,f){Array.prototype.unshift.apply(z,f)},G.extendObj=function(z,f){for(var f0 in f)z[f0]=f[f0]},G.getInheritableProperty=function(z,f){for(;z&&!z.has(f);)z=z.get("Parent");return z?z.get(f):null},G.inherit=function(z,f,f0){z.prototype=Object.create(f.prototype),z.prototype.constructor=z;for(var o0 in f0)z.prototype[o0]=f0[o0]},G.loadScript=function(z,f){var f0=document.createElement("script"),o0=!1;f0.setAttribute("src",z),f&&(f0.onload=function(){o0||f(),o0=!0}),document.getElementsByTagName("head")[0].appendChild(f0)},G}();S.PageViewport=function(){function G(Z,e0,z,f,f0,o0){this.viewBox=Z,this.scale=e0,this.rotation=z,this.offsetX=f,this.offsetY=f0;var c0=(Z[2]+Z[0])/2,m0=(Z[3]+Z[1])/2,v0,g0,x0,T0;switch(z=z%360,z=z<0?z+360:z,z){case 180:v0=-1,g0=0,x0=0,T0=1;break;case 90:v0=0,g0=1,x0=1,T0=0;break;case 270:v0=0,g0=-1,x0=-1,T0=0;break;default:v0=1,g0=0,x0=0,T0=-1;break}o0&&(x0=-x0,T0=-T0);var M0,ee,re,Fe;v0===0?(M0=Math.abs(m0-Z[1])*e0+f,ee=Math.abs(c0-Z[0])*e0+f0,re=Math.abs(Z[3]-Z[1])*e0,Fe=Math.abs(Z[2]-Z[0])*e0):(M0=Math.abs(c0-Z[0])*e0+f,ee=Math.abs(m0-Z[1])*e0+f0,re=Math.abs(Z[2]-Z[0])*e0,Fe=Math.abs(Z[3]-Z[1])*e0),this.transform=[v0*e0,g0*e0,x0*e0,T0*e0,M0-v0*e0*c0-x0*e0*m0,ee-g0*e0*c0-T0*e0*m0],this.width=re,this.height=Fe,this.fontScale=e0}return G.prototype={clone:function(e0){e0=e0||{};var z="scale"in e0?e0.scale:this.scale,f="rotation"in e0?e0.rotation:this.rotation;return new G(this.viewBox.slice(),z,f,this.offsetX,this.offsetY,e0.dontFlip)},convertToViewportPoint:function(e0,z){return H.applyTransform([e0,z],this.transform)},convertToViewportRectangle:function(e0){var z=H.applyTransform([e0[0],e0[1]],this.transform),f=H.applyTransform([e0[2],e0[3]],this.transform);return[z[0],z[1],f[0],f[1]]},convertToPdfPoint:function(e0,z){return H.applyInverseTransform([e0,z],this.transform)}},G}();function y(){var Y={};return Y.promise=new Promise(function(G,Z){Y.resolve=G,Y.reject=Z}),Y}S.createPromiseCapability=y,function(){if(g.Promise){typeof g.Promise.all!="function"&&(g.Promise.all=function(o0){var c0=0,m0=[],v0,g0,x0=new g.Promise(function(T0,M0){v0=T0,g0=M0});return o0.forEach(function(T0,M0){c0++,T0.then(function(ee){m0[M0]=ee,c0--,c0===0&&v0(m0)},g0)}),c0===0&&v0(m0),x0}),typeof g.Promise.resolve!="function"&&(g.Promise.resolve=function(o0){return new g.Promise(function(c0){c0(o0)})}),typeof g.Promise.reject!="function"&&(g.Promise.reject=function(o0){return new g.Promise(function(c0,m0){m0(o0)})}),typeof g.Promise.prototype.catch2!="function"&&(g.Promise.prototype.catch2=function(o0){return g.Promise.prototype.then(void 0,o0)});return}var G=0,Z=1,e0=2,z=500,f={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(c0){c0._status!==G&&(this.handlers=this.handlers.concat(c0._handlers),c0._handlers=[],!this.running&&(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var c0=1,m0=Date.now()+c0;this.handlers.length>0;){var v0=this.handlers.shift(),g0=v0.thisPromise._status,x0=v0.thisPromise._value;try{g0===Z?typeof v0.onResolve=="function"&&(x0=v0.onResolve(x0)):typeof v0.onReject=="function"&&(x0=v0.onReject(x0),g0=Z,v0.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(v0.thisPromise))}catch(T0){g0=e0,x0=T0}if(v0.nextPromise._updateStatus(g0,x0),Date.now()>=m0)break}if(this.handlers.length>0){setTimeout(this.runHandlers.bind(this),0);return}this.running=!1},addUnhandledRejection:function(c0){this.unhandledRejections.push({promise:c0,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(c0){c0._unhandledRejection=!1;for(var m0=0;m0z){var g0=this.unhandledRejections[v0].promise._value,x0="Unhandled rejection: "+g0;g0.stack&&(x0+=` +`+g0.stack),w(x0),this.unhandledRejections.splice(v0),v0--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}).bind(this),z))}};function f0(o0){this._status=G,this._handlers=[];try{o0.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(c0){this._reject(c0)}}f0.all=function(c0){var m0,v0,g0=new f0(function(ke,D0){m0=ke,v0=D0}),x0=c0.length,T0=[];if(x0===0)return m0(T0),g0;function M0(ke){g0._status!==e0&&(T0=[],v0(ke))}for(var ee=0,re=c0.length;ee>2,T0=(m0&3)<<4|v0>>4,M0=o0+1>6:64,ee=o0+21?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),module.exports=Module,process.on("uncaughtException",function(C){if(!(C instanceof ExitStatus))throw C}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available (jsc?)"},Module.readBinary=function(u){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(u));var h=read(u,"binary");return assert(typeof h=="object"),h},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments);else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(u){var h=new XMLHttpRequest;return h.open("GET",u,!1),h.send(null),h.responseText},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(u){console.log(u)}),Module.printErr||(Module.printErr=function(u){console.log(u)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(C){dump(C)}:function(C){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(C){document.title=C})}else throw"Unknown runtime environment. Where are we?";function globalEval(C){eval.call(null,C)}!Module.load&&Module.read&&(Module.load=function(u){globalEval(Module.read(u))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);var Runtime={setTempRet0:function(C){tempRet0=C},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(C){STACKTOP=C},getNativeTypeSize:function(C){switch(C){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(C[C.length-1]==="*")return Runtime.QUANTUM_SIZE;if(C[0]==="i"){var u=parseInt(C.substr(1));return assert(u%8===0),u/8}else return 0}}},getNativeFieldSize:function(C){return Math.max(Runtime.getNativeTypeSize(C),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(C,u){return u==="double"||u==="i64"?C&7&&(assert((C&7)===4),C+=4):assert((C&3)===0),C},getAlignSize:function(C,u,h){return!h&&(C=="i64"||C=="double")?8:C?Math.min(u||(C?Runtime.getNativeFieldSize(C):0),Runtime.QUANTUM_SIZE):Math.min(u,8)},dynCall:function(C,u,h){return h&&h.length?(h.splice||(h=Array.prototype.slice.call(h)),h.splice(0,0,u),Module["dynCall_"+C].apply(null,h)):Module["dynCall_"+C].call(null,u)},functionPointers:[],addFunction:function(C){for(var u=0;u=TOTAL_MEMORY){var h=enlargeMemory();if(!h)return DYNAMICTOP=u,0}return u},alignMemory:function(C,u){var h=C=Math.ceil(C/(u||16))*(u||16);return h},makeBigInt:function(C,u,h){var g=h?+(C>>>0)+ +(u>>>0)*4294967296:+(C>>>0)+ +(u|0)*4294967296;return g},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=!1,tempDouble,tempI64,tempRet0;function assert(C,u){C||abort("Assertion failed: "+u)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(C){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(C){var u=Runtime.stackAlloc(C.length);return writeArrayToMemory(C,u),u},stringToC:function(C){var u=0;return C!=null&&C!==0&&(u=Runtime.stackAlloc((C.length<<2)+1),writeStringToMemory(C,u)),u}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(u,h,g,S,v){var w=getCFunc(u),I=[],_=0;if(S)for(var P=0;P>0]=u;break;case"i8":HEAP8[C>>0]=u;break;case"i16":HEAP16[C>>1]=u;break;case"i32":HEAP32[C>>2]=u;break;case"i64":tempI64=[u>>>0,(tempDouble=u,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[C>>2]=tempI64[0],HEAP32[C+4>>2]=tempI64[1];break;case"float":HEAPF32[C>>2]=u;break;case"double":HEAPF64[C>>3]=u;break;default:abort("invalid type for setValue: "+h)}}Module.setValue=setValue;function getValue(C,u,h){switch(u=u||"i8",u.charAt(u.length-1)==="*"&&(u="i32"),u){case"i1":return HEAP8[C>>0];case"i8":return HEAP8[C>>0];case"i16":return HEAP16[C>>1];case"i32":return HEAP32[C>>2];case"i64":return HEAP32[C>>2];case"float":return HEAPF32[C>>2];case"double":return HEAPF64[C>>3];default:abort("invalid type for setValue: "+u)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(C,u,h,g){var S,v;typeof C=="number"?(S=!0,v=C):(S=!1,v=C.length);var w=typeof u=="string"?u:null,I;if(h==ALLOC_NONE?I=g:I=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][h===void 0?ALLOC_STATIC:h](Math.max(v,w?1:u.length)),S){var g=I,_;for(assert((I&3)==0),_=I+(v&-4);g<_;g+=4)HEAP32[g>>2]=0;for(_=I+v;g<_;)HEAP8[g++>>0]=0;return I}if(w==="i8")return C.subarray||C.slice?HEAPU8.set(C,I):HEAPU8.set(new Uint8Array(C),I),I;for(var P=0,L,d,k;P>0],h|=g,!(g==0&&!u||(S++,u&&S==u)););u||(u=S);var v="";if(h<128){for(var w=1024,I;u>0;)I=String.fromCharCode.apply(String,HEAPU8.subarray(C,C+Math.min(u,w))),v=v?v+I:I,C+=w,u-=w;return v}return Module.UTF8ToString(C)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(C){for(var u="";;){var h=HEAP8[C++>>0];if(!h)return u;u+=String.fromCharCode(h)}}Module.AsciiToString=AsciiToString;function stringToAscii(C,u){return writeAsciiToMemory(C,u,!1)}Module.stringToAscii=stringToAscii;function UTF8ArrayToString(C,u){for(var h,g,S,v,w,I,_="";;){if(h=C[u++],!h)return _;if(!(h&128)){_+=String.fromCharCode(h);continue}if(g=C[u++]&63,(h&224)==192){_+=String.fromCharCode((h&31)<<6|g);continue}if(S=C[u++]&63,(h&240)==224?h=(h&15)<<12|g<<6|S:(v=C[u++]&63,(h&248)==240?h=(h&7)<<18|g<<12|S<<6|v:(w=C[u++]&63,(h&252)==248?h=(h&3)<<24|g<<18|S<<12|v<<6|w:(I=C[u++]&63,h=(h&1)<<30|g<<24|S<<18|v<<12|w<<6|I))),h<65536)_+=String.fromCharCode(h);else{var P=h-65536;_+=String.fromCharCode(55296|P>>10,56320|P&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(C){return UTF8ArrayToString(HEAPU8,C)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(C,u,h,g){if(!(g>0))return 0;for(var S=h,v=h+g-1,w=0;w=55296&&I<=57343&&(I=65536+((I&1023)<<10)|C.charCodeAt(++w)&1023),I<=127){if(h>=v)break;u[h++]=I}else if(I<=2047){if(h+1>=v)break;u[h++]=192|I>>6,u[h++]=128|I&63}else if(I<=65535){if(h+2>=v)break;u[h++]=224|I>>12,u[h++]=128|I>>6&63,u[h++]=128|I&63}else if(I<=2097151){if(h+3>=v)break;u[h++]=240|I>>18,u[h++]=128|I>>12&63,u[h++]=128|I>>6&63,u[h++]=128|I&63}else if(I<=67108863){if(h+4>=v)break;u[h++]=248|I>>24,u[h++]=128|I>>18&63,u[h++]=128|I>>12&63,u[h++]=128|I>>6&63,u[h++]=128|I&63}else{if(h+5>=v)break;u[h++]=252|I>>30,u[h++]=128|I>>24&63,u[h++]=128|I>>18&63,u[h++]=128|I>>12&63,u[h++]=128|I>>6&63,u[h++]=128|I&63}}return u[h]=0,h-S}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(C,u,h){return stringToUTF8Array(C,HEAPU8,u,h)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(C){for(var u=0,h=0;h=55296&&g<=57343&&(g=65536+((g&1023)<<10)|C.charCodeAt(++h)&1023),g<=127?++u:g<=2047?u+=2:g<=65535?u+=3:g<=2097151?u+=4:g<=67108863?u+=5:u+=6}return u}Module.lengthBytesUTF8=lengthBytesUTF8;function UTF16ToString(C){for(var u=0,h="";;){var g=HEAP16[C+u*2>>1];if(g==0)return h;++u,h+=String.fromCharCode(g)}}Module.UTF16ToString=UTF16ToString;function stringToUTF16(C,u,h){if(h===void 0&&(h=2147483647),h<2)return 0;h-=2;for(var g=u,S=h>1]=w,u+=2}return HEAP16[u>>1]=0,u-g}Module.stringToUTF16=stringToUTF16;function lengthBytesUTF16(C){return C.length*2}Module.lengthBytesUTF16=lengthBytesUTF16;function UTF32ToString(C){for(var u=0,h="";;){var g=HEAP32[C+u*4>>2];if(g==0)return h;if(++u,g>=65536){var S=g-65536;h+=String.fromCharCode(55296|S>>10,56320|S&1023)}else h+=String.fromCharCode(g)}}Module.UTF32ToString=UTF32ToString;function stringToUTF32(C,u,h){if(h===void 0&&(h=2147483647),h<4)return 0;for(var g=u,S=g+h-4,v=0;v=55296&&w<=57343){var I=C.charCodeAt(++v);w=65536+((w&1023)<<10)|I&1023}if(HEAP32[u>>2]=w,u+=4,u+4>S)break}return HEAP32[u>>2]=0,u-g}Module.stringToUTF32=stringToUTF32;function lengthBytesUTF32(C){for(var u=0,h=0;h=55296&&g<=57343&&++h,u+=4}return u}Module.lengthBytesUTF32=lengthBytesUTF32;function demangle(C){var u=!!Module.___cxa_demangle;if(u)try{var h=_malloc(C.length);writeStringToMemory(C.substr(1),h);var g=_malloc(4),S=Module.___cxa_demangle(h,0,0,g);if(getValue(g,"i32")===0&&S)return Pointer_stringify(S)}catch{}finally{h&&_free(h),g&&_free(g),S&&_free(S)}var v=3,w={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},I=[],_=!0;function P(){v++,C[v]==="K"&&v++;for(var k=[];C[v]!=="E";){if(C[v]==="S"){v++;var e=C.indexOf("_",v),N=C.substring(v,e)||0;k.push(I[N]||"?"),v=e+1;continue}if(C[v]==="C"){k.push(k[k.length-1]),v+=2;continue}var B=parseInt(C.substr(v)),Q=B.toString().length;if(!B||!Q){v--;break}var i0=C.substr(v+Q,B);k.push(i0),I.push(i0),v+=Q+B}return v++,k}function L(k,e,N){e=e||1/0;var B="",Q=[];function i0(){return"("+Q.join(", ")+")"}var j;if(C[v]==="N"){if(j=P().join("::"),e--,e===0)return k?[j]:j}else{(C[v]==="K"||_&&C[v]==="L")&&v++;var H=parseInt(C.substr(v));if(H){var y=H.toString().length;j=C.substr(v+y,H),v+=y+H}}if(_=!1,C[v]==="I"){v++;var Y=L(!0),G=L(!0,1,!0);B+=G[0]+" "+j+"<"+Y.join(", ")+">"}else B=j;e:for(;v0;){var Z=C[v++];if(Z in w)Q.push(w[Z]);else switch(Z){case"P":Q.push(L(!0,1,!0)[0]+"*");break;case"R":Q.push(L(!0,1,!0)[0]+"&");break;case"L":{v++;var e0=C.indexOf("E",v),H=e0-v;Q.push(C.substr(v,H)),v+=H+2;break}case"A":{var H=parseInt(C.substr(v));if(v+=H.toString().length,C[v]!=="_")throw"?";v++,Q.push(L(!0,1,!0)[0]+" ["+H+"]");break}case"E":break e;default:B+="?"+Z;break e}}return!N&&Q.length===1&&Q[0]==="void"&&(Q=[]),k?(B&&Q.push(B+"?"),Q):B+i0()}var d=C;try{if(C=="Object._main"||C=="_main")return"main()";if(typeof C=="number"&&(C=Pointer_stringify(C)),C[0]!=="_"||C[1]!=="_"||C[2]!=="Z")return C;switch(C[3]){case"n":return"operator new()";case"d":return"operator delete()"}d=L()}catch{d+="?"}return d.indexOf("?")>=0&&!u&&Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),d}function demangleAll(C){return C.replace(/__Z[\w\d_]+/g,function(u){var h=demangle(u);return u===h?u:u+" ["+h+"]"})}function jsStackTrace(){var C=new Error;if(!C.stack){try{throw new Error(0)}catch(u){C=u}if(!C.stack)return"(no stack trace available)"}return C.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module.stackTrace=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(C){return C%4096>0&&(C+=4096-C%4096),C}var HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE=0,STATICTOP=0,staticSealed=!1,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){var C=Math.pow(2,31);if(DYNAMICTOP>=C)return!1;for(;TOTAL_MEMORY<=DYNAMICTOP;)if(TOTAL_MEMORY=C)return!1;try{if(ArrayBuffer.transfer)buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY);else{var h=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch{return!1}var g=_emscripten_replace_memory(buffer);return g?(Module.buffer=buffer,Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer),ArrayBuffer.transfer||HEAP8.set(h),!0):!1}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(C){byteLength=function(u){return u.byteLength}}for(var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,totalMemory=64*1024;totalMemory0;){var u=C.shift();if(typeof u=="function"){u();continue}var h=u.func;typeof h=="number"?u.arg===void 0?Runtime.dynCall("v",h):Runtime.dynCall("vi",h,[u.arg]):h(u.arg===void 0?null:u.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(C){__ATPRERUN__.unshift(C)}Module.addOnPreRun=addOnPreRun;function addOnInit(C){__ATINIT__.unshift(C)}Module.addOnInit=addOnInit;function addOnPreMain(C){__ATMAIN__.unshift(C)}Module.addOnPreMain=addOnPreMain;function addOnExit(C){__ATEXIT__.unshift(C)}Module.addOnExit=addOnExit;function addOnPostRun(C){__ATPOSTRUN__.unshift(C)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(C,u,h){var g=h>0?h:lengthBytesUTF8(C)+1,S=new Array(g),v=stringToUTF8Array(C,S,0,S.length);return u&&(S.length=v),S}Module.intArrayFromString=intArrayFromString;function intArrayToString(C){for(var u=[],h=0;h255&&(g&=255),u.push(String.fromCharCode(g))}return u.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(C,u,h){for(var g=intArrayFromString(C,h),S=0;S>0]=v,S=S+1}}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(C,u){for(var h=0;h>0]=C[h]}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(C,u,h){for(var g=0;g>0]=C.charCodeAt(g);h||(HEAP8[u>>0]=0)}Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function C(u,h){var g=u>>>16,S=u&65535,v=h>>>16,w=h&65535;return S*w+(g*w+S*v<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(C){C=C>>>0;for(var u=0;u<32;u++)if(C&1<<31-u)return u;return 32}),Math.clz32=Math.clz32;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(C){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(C){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&dependenciesFulfilled){var u=dependenciesFulfilled;dependenciesFulfilled=null,u()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=8,STATICTOP=STATIC_BASE+59744,__ATINIT__.push({func:function(){__GLOBAL__I_000101()}},{func:function(){__GLOBAL__sub_I_jpegls_cpp()}},{func:function(){}}),allocate([0,0,0,0,0,0,0,0,84,144,0,0,31,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,237,191,0,0,48,0,0,0,0,0,0,0,44,144,0,0,41,192,0,0,84,144,0,0,55,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,115,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,192,0,0,152,3,0,0,0,0,0,0,84,144,0,0,241,192,0,0,216,3,0,0,0,0,0,0,84,144,0,0,55,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,95,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,135,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,216,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,241,193,0,0,48,0,0,0,0,0,0,0,44,144,0,0,13,194,0,0,84,144,0,0,80,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,44,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,139,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,179,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,219,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,3,195,0,0,48,0,0,0,0,0,0,0,84,144,0,0,103,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,157,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,211,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,8,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,71,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,138,196,0,0,160,1,0,0,0,0,0,0,44,144,0,0,120,196,0,0,84,144,0,0,187,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,246,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,49,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,103,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,157,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,210,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,17,198,0,0,160,1,0,0,0,0,0,0,84,144,0,0,86,198,0,0,72,3,0,0,0,0,0,0,84,144,0,0,162,198,0,0,56,2,0,0,0,0,0,0,44,144,0,0,182,198,0,0,84,144,0,0,196,198,0,0,56,2,0,0,0,0,0,0,84,144,0,0,112,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,125,199,0,0,84,144,0,0,138,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,156,199,0,0,84,144,0,0,169,199,0,0,96,2,0,0,0,0,0,0,84,144,0,0,181,199,0,0,120,2,0,0,0,0,0,0,84,144,0,0,214,199,0,0,144,2,0,0,0,0,0,0,84,144,0,0,28,200,0,0,144,2,0,0,0,0,0,0,84,144,0,0,248,199,0,0,176,2,0,0,0,0,0,0,84,144,0,0,62,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,99,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,182,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,245,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,13,222,0,0,152,3,0,0,0,0,0,0,84,144,0,0,38,222,0,0,152,3,0,0,0,0,0,0,44,144,0,0,62,222,0,0,84,144,0,0,87,222,0,0,104,2,0,0,0,0,0,0,44,144,0,0,110,222,0,0,84,144,0,0,135,222,0,0,72,3,0,0,0,0,0,0,84,144,0,0,161,222,0,0,56,3,0,0,0,0,0,0,44,144,0,0,187,222,0,0,84,144,0,0,205,222,0,0,112,3,0,0,0,0,0,0,84,144,0,0,247,222,0,0,112,3,0,0,0,0,0,0,44,144,0,0,33,223,0,0,44,144,0,0,82,223,0,0,124,144,0,0,131,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,178,223,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,124,144,0,0,225,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,16,224,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,84,144,0,0,63,224,0,0,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,144,0,0,187,224,0,0,48,3,0,0,0,0,0,0,124,144,0,0,209,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,124,144,0,0,227,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,5,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,40,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,75,225,0,0,144,4,0,0,0,0,0,0,84,144,0,0,109,225,0,0,144,4,0,0,0,0,0,0,124,144,0,0,144,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,178,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,200,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,220,225,0,0,32,4,0,0,0,0,0,0,124,144,0,0,240,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,84,144,0,0,2,226,0,0,32,4,0,0,0,0,0,0,84,144,0,0,23,226,0,0,32,4,0,0,0,0,0,0,124,144,0,0,44,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,80,10,0,0,0,0,0,0,124,144,0,0,112,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,104,10,0,0,0,0,0,0,124,144,0,0,180,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,128,10,0,0,0,0,0,0,124,144,0,0,248,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,152,10,0,0,0,0,0,0,124,144,0,0,60,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,184,10,0,0,0,8,0,0,124,144,0,0,129,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,192,10,0,0,0,8,0,0,124,144,0,0,198,227,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,11,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,80,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,108,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,136,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,164,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,192,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,216,10,0,0,0,0,0,0,124,144,0,0,6,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,224,10,0,0,0,0,0,0,124,144,0,0,76,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,232,10,0,0,0,0,0,0,124,144,0,0,146,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,240,10,0,0,0,0,0,0,124,144,0,0,216,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,124,144,0,0,237,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,144,0,0,73,233,0,0,44,144,0,0,50,233,0,0,124,144,0,0,28,233,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,237,232,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,215,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,124,144,0,0,168,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,44,144,0,0,149,232,0,0,44,144,0,0,115,232,0,0,44,144,0,0,81,232,0,0,44,144,0,0,60,232,0,0,44,144,0,0,39,232,0,0,44,144,0,0,14,232,0,0,44,144,0,0,245,231,0,0,44,144,0,0,220,231,0,0,44,144,0,0,195,231,0,0,44,144,0,0,171,231,0,0,44,144,0,0,190,232,0,0,44,144,0,0,3,233],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE),allocate([156,143,0,0,0,0,0,0,8,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,248,1,0,0,3,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,232,1,0,0,5,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,7,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,200,1,0,0,9,0,0,0,10,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,184,1,0,0,11,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,168,1,0,0,13,0,0,0,14,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,144,1,0,0,15,0,0,0,16,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,128,1,0,0,17,0,0,0,18,0,0,0,9,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,112,1,0,0,19,0,0,0,20,0,0,0,10,0,0,0,2,0,0,0,10,0,0,0,0,0,0,0,96,1,0,0,21,0,0,0,22,0,0,0,11,0,0,0,3,0,0,0,11,0,0,0,0,0,0,0,80,1,0,0,23,0,0,0,24,0,0,0,12,0,0,0,4,0,0,0,12,0,0,0,0,0,0,0,64,1,0,0,25,0,0,0,26,0,0,0,13,0,0,0,5,0,0,0,13,0,0,0,0,0,0,0,240,0,0,0,27,0,0,0,28,0,0,0,14,0,0,0,6,0,0,0,14,0,0,0,0,0,0,0,224,0,0,0,29,0,0,0,30,0,0,0,15,0,0,0,7,0,0,0,15,0,0,0,0,0,0,0,16,0,0,0,31,0,0,0,32,0,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,0,0,0,200,0,0,0,33,0,0,0,34,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,184,0,0,0,33,0,0,0,35,0,0,0,3,0,0,0,4,0,0,0,56,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,200,255,255,255,200,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,56,0,0,0,0,0,0,0,104,0,0,0,40,0,0,0,41,0,0,0,200,255,255,255,200,255,255,255,104,0,0,0,42,0,0,0,43,0,0,0,0,0,0,0,88,0,0,0,44,0,0,0,45,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,17,0,0,0,3,0,0,0,18,0,0,0,104,141,0,0,64,141,0,0,84,141,0,0,124,141,0,0,0,0,0,0,32,0,0,0,46,0,0,0,47,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,56,0,0,0,48,0,0,0,49,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,72,0,0,0,50,0,0,0,51,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,120,0,0,0,52,0,0,0,53,0,0,0,12,0,0,0,13,0,0,0,0,0,0,0,136,0,0,0,54,0,0,0,55,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,152,0,0,0,56,0,0,0,57,0,0,0,16,0,0,0,17,0,0,0,0,0,0,0,168,0,0,0,58,0,0,0,59,0,0,0,18,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,216,0,0,0,60,0,0,0,61,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,62,0,0,0,63,0,0,0,20,0,0,0,21,0,0,0,0,0,0,0,16,1,0,0,64,0,0,0,65,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0,32,1,0,0,66,0,0,0,67,0,0,0,24,0,0,0,25,0,0,0,0,0,0,0,48,1,0,0,68,0,0,0,69,0,0,0,26,0,0,0,27,0,0,0,0,0,0,0,160,1,0,0,70,0,0,0,71,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,24,2,0,0,72,0,0,0,73,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,40,2,0,0,74,0,0,0,75,0,0,0,18,0,0,0,0,0,0,0,64,2,0,0,76,0,0,0,77,0,0,0,19,0,0,0,2,0,0,0,0,0,0,0,80,2,0,0,78,0,0,0,79,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,80,0,0,0,81,0,0,0,7,0,0,0,0,0,0,0,128,2,0,0,82,0,0,0,83,0,0,0,8,0,0,0,0,0,0,0,160,2,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,2,0,0,0,9,0,0,0,28,0,0,0,0,0,0,0,208,2,0,0,84,0,0,0,88,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,3,0,0,0,10,0,0,0,29,0,0,0,0,0,0,0,224,2,0,0,84,0,0,0,89,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,4,0,0,0,11,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,1,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,88,146,0,0,200,146,0,0,56,147,0,0,56,147,0,0,120,187,0,0,168,155,0,0,168,149,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,0,159,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,9,0,0,0,151,215,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0,0,0,143,211,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+35640),allocate([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+39844),allocate([240,2,0,0,90,0,0,0,91,0,0,0,20,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,14,0,0,0,20,0,0,0,0,0,0,0,0,3,0,0,90,0,0,0,92,0,0,0,21,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,16,0,0,0,21,0,0,0,15,0,0,0,22,0,0,0,0,0,0,0,16,3,0,0,93,0,0,0,94,0,0,0,22,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,17,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,16,0,0,0,24,0,0,0,0,0,0,0,32,3,0,0,93,0,0,0,95,0,0,0,23,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,19,0,0,0,20,0,0,0,25,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,56,3,0,0,96,0,0,0,97,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,3,0,0,93,0,0,0,98,0,0,0,17,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,160,3,0,0,90,0,0,0,99,0,0,0,24,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,15,0,0,0,22,0,0,0,8,0,0,0,0,0,0,0,168,3,0,0,100,0,0,0,101,0,0,0,248,255,255,255,248,255,255,255,168,3,0,0,102,0,0,0,103,0,0,0,8,0,0,0,0,0,0,0,192,3,0,0,104,0,0,0,105,0,0,0,248,255,255,255,248,255,255,255,192,3,0,0,106,0,0,0,107,0,0,0,4,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,252,255,255,255,252,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,4,0,0,0,0,0,0,0,240,3,0,0,108,0,0,0,109,0,0,0,252,255,255,255,252,255,255,255,240,3,0,0,110,0,0,0,111,0,0,0,0,0,0,0,96,3,0,0,112,0,0,0,113,0,0,0,7,0,0,0,0,0,0,0,112,3,0,0,114,0,0,0,115,0,0,0,0,0,0,0,8,4,0,0,72,0,0,0,116,0,0,0,21,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,117,0,0,0,118,0,0,0,119,0,0,0,1,0,0,0,33,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,5,0,0,120,0,0,0,121,0,0,0,119,0,0,0,2,0,0,0,34,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,5,0,0,122,0,0,0,123,0,0,0,119,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,5,0,0,124,0,0,0,125,0,0,0,119,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,5,0,0,126,0,0,0,127,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,1,0,0,0,2,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,5,0,0,128,0,0,0,129,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,25,0,0,0,9,0,0,0,26,0,0,0,3,0,0,0,4,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,5,0,0,130,0,0,0,131,0,0,0,119,0,0,0,22,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,1,0,0,0,248,255,255,255,224,5,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,132,0,0,0,133,0,0,0,119,0,0,0,30,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,2,0,0,0,248,255,255,255,8,6,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,6,0,0,134,0,0,0,135,0,0,0,119,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,6,0,0,136,0,0,0,137,0,0,0,119,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,6,0,0,138,0,0,0,139,0,0,0,119,0,0,0,38,0,0,0,39,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,40,0,0,0,29,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,0,0,140,0,0,0,141,0,0,0,119,0,0,0,41,0,0,0,42,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,43,0,0,0,35,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,6,0,0,142,0,0,0,143,0,0,0,119,0,0,0,44,0,0,0,45,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,46,0,0,0,41,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,6,0,0,144,0,0,0,145,0,0,0,119,0,0,0,47,0,0,0,48,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,49,0,0,0,47,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,6,0,0,146,0,0,0,147,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,7,0,0,148,0,0,0,149,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,7,0,0,150,0,0,0,151,0,0,0,119,0,0,0,1,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,7,0,0,152,0,0,0,153,0,0,0,119,0,0,0,2,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,7,0,0,154,0,0,0,155,0,0,0,119,0,0,0,19,0,0,0,7,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,156,0,0,0,157,0,0,0,119,0,0,0,20,0,0,0,8,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,4,0,0,158,0,0,0,159,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,5,0,0,160,0,0,0,161,0,0,0,119,0,0,0,27,0,0,0,21,0,0,0,28,0,0,0,22,0,0,0,29,0,0,0,9,0,0,0,23,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,4,0,0,162,0,0,0,163,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,12,0,0,0,50,0,0,0,51,0,0,0,13,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,5,0,0,164,0,0,0,165,0,0,0,119,0,0,0,53,0,0,0,54,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,0,0,0,0,80,5,0,0,166,0,0,0,167,0,0,0,119,0,0,0,55,0,0,0,56,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,0,0,0,0,32,4,0,0,168,0,0,0,169,0,0,0,119,0,0,0,0,0,0,0,48,4,0,0,168,0,0,0,170,0,0,0,119,0,0,0,24,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,30,0,0,0,25,0,0,0,31,0,0,0,26,0,0,0,32,0,0,0,13,0,0,0,27,0,0,0,14,0,0,0,0,0,0,0,80,4,0,0,168,0,0,0,171,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,15,0,0,0,57,0,0,0,58,0,0,0,16,0,0,0,59,0,0,0,0,0,0,0,112,4,0,0,168,0,0,0,172,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,17,0,0,0,60,0,0,0,61,0,0,0,18,0,0,0,62,0,0,0,0,0,0,0,144,4,0,0,168,0,0,0,173,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,176,4,0,0,168,0,0,0,174,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,192,4,0,0,168,0,0,0,175,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,37,0,0,0,89,0,0,0,45,0,0,0,37,0,0,0,109,0,0,0,45,0,0,0,37,0,0,0,100,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,114,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,102,0,0,0,97,0,0,0,108,0,0,0,115,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,110,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,114,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,117,0,0,0,114,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,114,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,99,0,0,0,104,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,105,0,0,0,108,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,101,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,117,0,0,0,115,0,0,0,116,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,116,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,111,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,97,0,0,0,32,0,0,0,37,0,0,0,98,0,0,0,32,0,0,0,37,0,0,0,100,0,0,0,32,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,32,2,32,2,32,2,32,2,32,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,96,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,213,8,213,8,213,8,213,8,213,8,213,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,4,192,4,192,4,192,4,192,4,192,4,192,8,214,8,214,8,214,8,214,8,214,8,214,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,4,192,4,192,4,192,4,192,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,119,83,116,114,101,97,109,32,111,114,32,114,97,119,68,97,116,97,32,110,101,101,100,115,32,116,111,32,114,101,102,101,114,101,110,99,101,32,116,111,32,115,111,109,101,116,104,105,110,103,0,119,105,100,116,104,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,104,101,105,103,104,116,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,98,105,116,115,112,101,114,115,97,109,112,108,101,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,50,44,32,49,54,93,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,110,101,101,100,115,32,116,111,32,98,101,32,115,101,116,32,116,111,32,97,32,118,97,108,117,101,32,111,102,32,123,78,111,110,101,44,32,83,97,109,112,108,101,44,32,76,105,110,101,125,0,99,111,109,112,111,110,101,110,116,115,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,50,53,53,93,0,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,119,105,116,104,32,116,104,101,32,111,116,104,101,114,32,112,97,114,97,109,101,116,101,114,115,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,110,111,116,32,98,101,32,115,101,116,32,116,111,32,83,97,109,112,108,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,52,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,32,111,110,108,121,32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,49,0,67,111,108,111,114,32,116,114,97,110,115,102,111,114,109,97,116,105,111,110,32,0,78,111,32,109,111,114,101,32,98,121,116,101,115,32,97,118,97,105,108,97,98,108,101,32,105,110,32,105,110,112,117,116,32,98,117,102,102,101,114,44,32,115,116,105,108,108,32,110,101,101,100,101,100,105,110,103,32,0,65,110,32,111,100,100,32,110,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,40,0,41,32,99,97,110,110,111,116,32,98,101,32,115,119,97,112,112,101,100,46,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,69,0,49,49,80,114,111,99,101,115,115,76,105,110,101,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,105,110,103,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,57,98,97,115,105,99,95,111,115,116,114,105,110,103,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,116,69,69,0,50,50,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,83,116,114,101,97,109,0,50,53,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,67,111,109,112,111,110,101,110,116,0,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,104,69,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,67,104,97,114,76,83,32,101,114,114,111,114,0,99,104,97,114,108,115,0,49,53,99,104,97,114,108,115,95,99,97,116,101,103,111,114,121,0,112,97,114,97,109,115,46,88,116,104,117,109,98,110,97,105,108,32,105,115,32,62,32,48,32,98,117,116,32,112,97,114,97,109,115,46,116,104,117,109,98,110,97,105,108,32,61,61,32,110,117,108,108,95,112,116,114,0,49,55,74,112,101,103,77,97,114,107,101,114,83,101,103,109,101,110,116,0,49,49,74,112,101,103,83,101,103,109,101,110,116,0,50,48,74,112,101,103,73,109,97,103,101,68,97,116,97,83,101,103,109,101,110,116,0,69,120,112,101,99,116,101,100,32,74,80,69,71,32,77,97,114,107,101,114,32,115,116,97,114,116,32,98,121,116,101,32,48,120,70,70,32,98,117,116,32,116,104,101,32,98,121,116,101,32,118,97,108,117,101,32,119,97,115,32,48,120,0,74,80,69,71,32,101,110,99,111,100,105,110,103,32,119,105,116,104,32,109,97,114,107,101,114,32,0,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,46,0,85,110,107,110,111,119,110,32,74,80,69,71,32,109,97,114,107,101,114,32,0,32,101,110,99,111,117,110,116,101,114,101,100,46,0,109,114,102,120,0,83,116,57,98,97,100,95,97,108,108,111,99,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,83,116,57,116,121,112,101,95,105,110,102,111,0,83,116,56,98,97,100,95,99,97,115,116,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,49,95,95,118,109,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,33,34,98,97,115,105,99,95,115,116,114,105,110,103,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,115,116,114,105,110,103,0,95,95,116,104,114,111,119,95,108,101,110,103,116,104,95,101,114,114,111,114,0,33,34,118,101,99,116,111,114,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,118,101,99,116,111,114,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+42396),allocate([32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,80,79,83,73,88],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+52636),allocate([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,119,69,69,0,117,110,115,117,112,112,111,114,116,101,100,32,108,111,99,97,108,101,32,102,111,114,32,115,116,97,110,100,97,114,100,32,105,110,112,117,116,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,52,95,95,115,104,97,114,101,100,95,99,111,117,110,116,69,0,78,83,116,51,95,95,49,49,50,115,121,115,116,101,109,95,101,114,114,111,114,69,0,78,83,116,51,95,95,49,49,52,101,114,114,111,114,95,99,97,116,101,103,111,114,121,69,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,0,58,32,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,55,102,97,105,108,117,114,101,69,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,57,95,95,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,69,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,105,111,115,116,114,101,97,109,0,117,110,115,112,101,99,105,102,105,101,100,32,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,65,66,67,68,69,70,120,88,43,45,112,80,105,73,110,78,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,99,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,115,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,105,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,49,54,95,95,110,97,114,114,111,119,95,116,111,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,49,55,95,95,119,105,100,101,110,95,102,114,111,109,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,119,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,119,69,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,49,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,49,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,99,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,37,112,0,67,0,37,0,0,0,0,0,108,0,108,108,0,0,76,0,37,112,0,0,0,0,37,72,58,37,77,58,37,83,37,109,47,37,100,47,37,121,37,89,45,37,109,45,37,100,37,73,58,37,77,58,37,83,32,37,112,37,72,58,37,77,37,72,58,37,77,58,37,83,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,48,49,50,51,52,53,54,55,56,57,0,37,76,102,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,0,37,46,48,76,102,0,116,114,117,101,0,102,97,108,115,101,0,83,117,110,100,97,121,0,77,111,110,100,97,121,0,84,117,101,115,100,97,121,0,87,101,100,110,101,115,100,97,121,0,84,104,117,114,115,100,97,121,0,70,114,105,100,97,121,0,83,97,116,117,114,100,97,121,0,83,117,110,0,77,111,110,0,84,117,101,0,87,101,100,0,84,104,117,0,70,114,105,0,83,97,116,0,74,97,110,117,97,114,121,0,70,101,98,114,117,97,114,121,0,77,97,114,99,104,0,65,112,114,105,108,0,77,97,121,0,74,117,110,101,0,74,117,108,121,0,65,117,103,117,115,116,0,83,101,112,116,101,109,98,101,114,0,79,99,116,111,98,101,114,0,78,111,118,101,109,98,101,114,0,68,101,99,101,109,98,101,114,0,74,97,110,0,70,101,98,0,77,97,114,0,65,112,114,0,74,117,110,0,74,117,108,0,65,117,103,0,83,101,112,0,79,99,116,0,78,111,118,0,68,101,99,0,65,77,0,80,77,0,37,109,47,37,100,47,37,121,0,37,72,58,37,77,58,37,83,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,37,73,58,37,77,58,37,83,32,37,112,0,78,83,116,51,95,95,49,49,51,109,101,115,115,97,103,101,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,116,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,119,69,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,99,69,69,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,112,117,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,103,101,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+56215);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function _atexit(C,u){__ATEXIT__.unshift({func:C,arg:u})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module._i64Subtract=_i64Subtract;function ___assert_fail(C,u,h,g){throw ABORT=!0,"Assertion failed: "+Pointer_stringify(C)+", at: "+[u?Pointer_stringify(u):"unknown filename",h,g?Pointer_stringify(g):"unknown function"]+" at "+stackTrace()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(C){if(!C||EXCEPTIONS.infos[C])return C;for(var u in EXCEPTIONS.infos){var h=EXCEPTIONS.infos[u];if(h.adjusted===C)return u}return C},addRef:function(C){if(C){var u=EXCEPTIONS.infos[C];u.refcount++}},decRef:function(C){if(C){var u=EXCEPTIONS.infos[C];assert(u.refcount>0),u.refcount--,u.refcount===0&&(u.destructor&&Runtime.dynCall("vi",u.destructor,[C]),delete EXCEPTIONS.infos[C],___cxa_free_exception(C))}},clearRef:function(C){if(C){var u=EXCEPTIONS.infos[C];u.refcount=0}}};function ___resumeException(C){throw EXCEPTIONS.last||(EXCEPTIONS.last=C),EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(C)),C}function ___cxa_find_matching_catch(){var C=EXCEPTIONS.last;if(!C)return asm.setTempRet0(0),0|0;var u=EXCEPTIONS.infos[C],h=u.type;if(!h)return asm.setTempRet0(0),C|0;var g=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(h),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=C,C=___cxa_find_matching_catch.buffer;for(var S=0;S>2],u.adjusted=C,asm.setTempRet0(g[S]),C|0;return C=HEAP32[C>>2],asm.setTempRet0(h),C|0}function ___cxa_throw(C,u,h){throw EXCEPTIONS.infos[C]={ptr:C,adjusted:C,type:u,destructor:h,refcount:0},EXCEPTIONS.last=C,"uncaught_exception"in __ZSt18uncaught_exceptionv?__ZSt18uncaught_exceptionv.uncaught_exception++:__ZSt18uncaught_exceptionv.uncaught_exception=1,C}Module._memset=_memset;function ___gxx_personality_v0(){}function __isLeapYear(C){return C%4===0&&(C%100!==0||C%400===0)}function __arraySum(C,u){for(var h=0,g=0;g<=u;h+=C[g++]);return h}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(C,u){for(var h=new Date(C.getTime());u>0;){var g=__isLeapYear(h.getFullYear()),S=h.getMonth(),v=(g?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[S];if(u>v-h.getDate())u-=v-h.getDate()+1,h.setDate(1),S<11?h.setMonth(S+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1));else return h.setDate(h.getDate()+u),h}return h}function _strftime(C,u,h,g){var S=HEAP32[g+40>>2],v={tm_sec:HEAP32[g>>2],tm_min:HEAP32[g+4>>2],tm_hour:HEAP32[g+8>>2],tm_mday:HEAP32[g+12>>2],tm_mon:HEAP32[g+16>>2],tm_year:HEAP32[g+20>>2],tm_wday:HEAP32[g+24>>2],tm_yday:HEAP32[g+28>>2],tm_isdst:HEAP32[g+32>>2],tm_gmtoff:HEAP32[g+36>>2],tm_zone:S?Pointer_stringify(S):""},w=Pointer_stringify(h),I={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var _ in I)w=w.replace(new RegExp(_,"g"),I[_]);var P=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],L=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(j,H,y){for(var Y=typeof j=="number"?j.toString():j||"";Y.length0?1:0}var Y;return(Y=y(j.getFullYear()-H.getFullYear()))===0&&(Y=y(j.getMonth()-H.getMonth()))===0&&(Y=y(j.getDate()-H.getDate())),Y}function N(j){switch(j.getDay()){case 0:return new Date(j.getFullYear()-1,11,29);case 1:return j;case 2:return new Date(j.getFullYear(),0,3);case 3:return new Date(j.getFullYear(),0,2);case 4:return new Date(j.getFullYear(),0,1);case 5:return new Date(j.getFullYear()-1,11,31);case 6:return new Date(j.getFullYear()-1,11,30)}}function B(j){var H=__addDays(new Date(j.tm_year+1900,0,1),j.tm_yday),y=new Date(H.getFullYear(),0,4),Y=new Date(H.getFullYear()+1,0,4),G=N(y),Z=N(Y);return e(G,H)<=0?e(Z,H)<=0?H.getFullYear()+1:H.getFullYear():H.getFullYear()-1}var Q={"%a":function(j){return P[j.tm_wday].substring(0,3)},"%A":function(j){return P[j.tm_wday]},"%b":function(j){return L[j.tm_mon].substring(0,3)},"%B":function(j){return L[j.tm_mon]},"%C":function(j){var H=j.tm_year+1900;return k(H/100|0,2)},"%d":function(j){return k(j.tm_mday,2)},"%e":function(j){return d(j.tm_mday,2," ")},"%g":function(j){return B(j).toString().substring(2)},"%G":function(j){return B(j)},"%H":function(j){return k(j.tm_hour,2)},"%I":function(j){return k(j.tm_hour<13?j.tm_hour:j.tm_hour-12,2)},"%j":function(j){return k(j.tm_mday+__arraySum(__isLeapYear(j.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,j.tm_mon-1),3)},"%m":function(j){return k(j.tm_mon+1,2)},"%M":function(j){return k(j.tm_min,2)},"%n":function(){return` +`},"%p":function(j){return j.tm_hour>0&&j.tm_hour<13?"AM":"PM"},"%S":function(j){return k(j.tm_sec,2)},"%t":function(){return" "},"%u":function(j){var H=new Date(j.tm_year+1900,j.tm_mon+1,j.tm_mday,0,0,0,0);return H.getDay()||7},"%U":function(j){var H=new Date(j.tm_year+1900,0,1),y=H.getDay()===0?H:__addDays(H,7-H.getDay()),Y=new Date(j.tm_year+1900,j.tm_mon,j.tm_mday);if(e(y,Y)<0){var G=__arraySum(__isLeapYear(Y.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,Y.getMonth()-1)-31,Z=31-y.getDate(),e0=Z+G+Y.getDate();return k(Math.ceil(e0/7),2)}return e(y,H)===0?"01":"00"},"%V":function(j){var H=new Date(j.tm_year+1900,0,4),y=new Date(j.tm_year+1901,0,4),Y=N(H),G=N(y),Z=__addDays(new Date(j.tm_year+1900,0,1),j.tm_yday);if(e(Z,Y)<0)return"53";if(e(G,Z)<=0)return"01";var e0;return Y.getFullYear()=0;return H=Math.abs(H)/60,H=H/60*100+H%60,(y?"+":"-")+("0000"+H).slice(-4)},"%Z":function(j){return j.tm_zone},"%%":function(){return"%"}};for(var _ in Q)w.indexOf(_)>=0&&(w=w.replace(new RegExp(_,"g"),Q[_](v)));var i0=intArrayFromString(w,!1);return i0.length>u?0:(writeArrayToMemory(i0,C),i0.length-1)}function _strftime_l(C,u,h,g){return _strftime(C,u,h,g)}function _abort(){Module.abort()}function _free(){}Module._free=_free;function ___cxa_free_exception(C){try{return _free(C)}catch{}}function ___cxa_end_catch(){if(___cxa_end_catch.rethrown){___cxa_end_catch.rethrown=!1;return}asm.setThrew(0);var C=EXCEPTIONS.caught.pop();C&&(EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(C)),EXCEPTIONS.last=0)}function _pthread_once(C,u){_pthread_once.seen||(_pthread_once.seen={}),!(C in _pthread_once.seen)&&(Runtime.dynCall("v",u),_pthread_once.seen[C]=1)}function ___lock(){}function ___unlock(){}var PTHREAD_SPECIFIC={};function _pthread_getspecific(C){return PTHREAD_SPECIFIC[C]||0}function ___setErrNo(C){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=C),C}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(C){switch(C){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return typeof navigator=="object"&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}var _fabs=Math_abs,PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(C,u){return C==0?ERRNO_CODES.EINVAL:(HEAP32[C>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function _emscripten_set_main_loop_timing(C,u){if(Browser.mainLoop.timingMode=C,Browser.mainLoop.timingValue=u,!Browser.mainLoop.func)return 1;if(C==0)Browser.mainLoop.scheduler=function(){setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(C==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(C==2){if(!window.setImmediate){let S=function(v){v.source===window&&v.data===g&&(v.stopPropagation(),h.shift()())};var h=[],g="__emcc";window.addEventListener("message",S,!0),window.setImmediate=function(w){h.push(w),window.postMessage(g,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(C,u,h,g,S){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=C,Browser.mainLoop.arg=g;var v=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var I=Date.now(),_=Browser.mainLoop.queue.shift();if(_.func(_.arg),Browser.mainLoop.remainingBlockers){var P=Browser.mainLoop.remainingBlockers,L=P%1==0?P-1:Math.floor(P);_.counted?Browser.mainLoop.remainingBlockers=L:(L=L+.5,Browser.mainLoop.remainingBlockers=(8*P+L)/9)}console.log('main loop blocker "'+_.name+'" took '+(Date.now()-I)+" ms"),Browser.mainLoop.updateStatus(),setTimeout(Browser.mainLoop.runner,0);return}if(!(v1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(function(){typeof g<"u"?Runtime.dynCall("vi",C,[g]):Runtime.dynCall("v",C)}),!(v0?_emscripten_set_main_loop_timing(0,1e3/u):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),h)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var C=Browser.mainLoop.timingMode,u=Browser.mainLoop.timingValue,h=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(h,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(C,u),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var C=Module.statusMessage||"Please wait...",u=Browser.mainLoop.remainingBlockers,h=Browser.mainLoop.expectedBlockers;u?u"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var C={};C.canHandle=function(v){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(v)},C.handle=function(v,w,I,_){var P=null;if(Browser.hasBlobConstructor)try{P=new Blob([v],{type:Browser.getMimetype(w)}),P.size!==v.length&&(P=new Blob([new Uint8Array(v).buffer],{type:Browser.getMimetype(w)}))}catch(e){Runtime.warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!P){var L=new Browser.BlobBuilder;L.append(new Uint8Array(v).buffer),P=L.getBlob()}var d=Browser.URLObject.createObjectURL(P),k=new Image;k.onload=function(){assert(k.complete,"Image "+w+" could not be decoded");var N=document.createElement("canvas");N.width=k.width,N.height=k.height;var B=N.getContext("2d");B.drawImage(k,0,0),Module.preloadedImages[w]=N,Browser.URLObject.revokeObjectURL(d),I&&I(v)},k.onerror=function(N){console.log("Image "+d+" could not be decoded"),_&&_()},k.src=d},Module.preloadPlugins.push(C);var u={};u.canHandle=function(v){return!Module.noAudioDecoding&&v.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},u.handle=function(v,w,I,_){var P=!1;function L(B){P||(P=!0,Module.preloadedAudios[w]=B,I&&I(v))}function d(){P||(P=!0,Module.preloadedAudios[w]=new Audio,_&&_())}if(Browser.hasBlobConstructor){try{var k=new Blob([v],{type:Browser.getMimetype(w)})}catch{return d()}var e=Browser.URLObject.createObjectURL(k),N=new Audio;N.addEventListener("canplaythrough",function(){L(N)},!1),N.onerror=function(Q){if(P)return;console.log("warning: browser could not fully decode audio "+w+", trying slower base64 approach");function i0(j){for(var H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",Y="",G=0,Z=0,e0=0;e0=6;){var z=G>>Z-6&63;Z-=6,Y+=H[z]}return Z==2?(Y+=H[(G&3)<<4],Y+=y+y):Z==4&&(Y+=H[(G&15)<<2],Y+=y),Y}N.src="data:audio/x-"+w.substr(-3)+";base64,"+i0(v),L(N)},N.src=e,Browser.safeSetTimeout(function(){L(N)},1e4)}else return d()},Module.preloadPlugins.push(u);var h=Module.canvas;function g(){Browser.pointerLock=document.pointerLockElement===h||document.mozPointerLockElement===h||document.webkitPointerLockElement===h||document.msPointerLockElement===h}h&&(h.requestPointerLock=h.requestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock||h.msRequestPointerLock||function(){},h.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},h.exitPointerLock=h.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",g,!1),document.addEventListener("mozpointerlockchange",g,!1),document.addEventListener("webkitpointerlockchange",g,!1),document.addEventListener("mspointerlockchange",g,!1),Module.elementPointerLock&&h.addEventListener("click",function(S){!Browser.pointerLock&&h.requestPointerLock&&(h.requestPointerLock(),S.preventDefault())},!1))},createContext:function(C,u,h,g){if(u&&Module.ctx&&C==Module.canvas)return Module.ctx;var S,v;if(u){var w={antialias:!1,alpha:!1};if(g)for(var I in g)w[I]=g[I];v=GL.createContext(C,w),v&&(S=GL.getContext(v).GLctx),C.style.backgroundColor="black"}else S=C.getContext("2d");return S?(h&&(u||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=S,u&&GL.makeContextCurrent(v),Module.useWebGL=u,Browser.moduleContextCreatedCallbacks.forEach(function(_){_()}),Browser.init()),S):null},destroyContext:function(C,u,h){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(C,u,h){Browser.lockPointer=C,Browser.resizeCanvas=u,Browser.vrDevice=h,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var g=Module.canvas;function S(){Browser.isFullScreen=!1;var w=g.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===w?(g.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},g.cancelFullScreen=g.cancelFullScreen.bind(document),Browser.lockPointer&&g.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(w.parentNode.insertBefore(g,w),w.parentNode.removeChild(w),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(g)}Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",S,!1),document.addEventListener("mozfullscreenchange",S,!1),document.addEventListener("webkitfullscreenchange",S,!1),document.addEventListener("MSFullscreenChange",S,!1));var v=document.createElement("div");g.parentNode.insertBefore(v,g),v.appendChild(g),v.requestFullScreen=v.requestFullScreen||v.mozRequestFullScreen||v.msRequestFullscreen||(v.webkitRequestFullScreen?function(){v.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),h?v.requestFullScreen({vrDisplay:h}):v.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(C){var u=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=u+1e3/60;else for(;u+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var h=Math.max(Browser.nextRAF-u,0);setTimeout(C,h)},requestAnimationFrame:function C(u){typeof window>"u"?Browser.fakeRequestAnimationFrame(u):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(u))},safeCallback:function(C){return function(){if(!ABORT)return C.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var C=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],C.forEach(function(u){u()})}},safeRequestAnimationFrame:function(C){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?C():Browser.queuedAsyncCallbacks.push(C))})},safeSetTimeout:function(C,u){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?C():Browser.queuedAsyncCallbacks.push(C))},u)},safeSetInterval:function(C,u){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&C()},u)},getMimetype:function(C){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[C.substr(C.lastIndexOf(".")+1)]},getUserMedia:function(C){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(C)},getMovementX:function(C){return C.movementX||C.mozMovementX||C.webkitMovementX||0},getMovementY:function(C){return C.movementY||C.mozMovementY||C.webkitMovementY||0},getMouseWheelDelta:function(C){var u=0;switch(C.type){case"DOMMouseScroll":u=C.detail;break;case"mousewheel":u=C.wheelDelta;break;case"wheel":u=C.deltaY;break;default:throw"unrecognized mouse wheel event: "+C.type}return u},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(C){if(Browser.pointerLock)C.type!="mousemove"&&"mozMovementX"in C?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(C),Browser.mouseMovementY=Browser.getMovementY(C)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var u=Module.canvas.getBoundingClientRect(),h=Module.canvas.width,g=Module.canvas.height,S=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,v=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(C.type==="touchstart"||C.type==="touchend"||C.type==="touchmove"){var w=C.touch;if(w===void 0)return;var I=w.pageX-(S+u.left),_=w.pageY-(v+u.top);I=I*(h/u.width),_=_*(g/u.height);var P={x:I,y:_};if(C.type==="touchstart")Browser.lastTouches[w.identifier]=P,Browser.touches[w.identifier]=P;else if(C.type==="touchend"||C.type==="touchmove"){var L=Browser.touches[w.identifier];L||(L=P),Browser.lastTouches[w.identifier]=L,Browser.touches[w.identifier]=P}return}var d=C.pageX-(S+u.left),k=C.pageY-(v+u.top);d=d*(h/u.width),k=k*(g/u.height),Browser.mouseMovementX=d-Browser.mouseX,Browser.mouseMovementY=k-Browser.mouseY,Browser.mouseX=d,Browser.mouseY=k}},xhrLoad:function(C,u,h){var g=new XMLHttpRequest;g.open("GET",C,!0),g.responseType="arraybuffer",g.onload=function(){g.status==200||g.status==0&&g.response?u(g.response):h()},g.onerror=h,g.send(null)},asyncLoad:function(C,u,h,g){Browser.xhrLoad(C,function(S){assert(S,'Loading data file "'+C+'" failed (no arrayBuffer).'),u(new Uint8Array(S)),g||removeRunDependency()},function(S){if(h)h();else throw'Loading data file "'+C+'" failed.'}),g||addRunDependency()},resizeListeners:[],updateResizeListeners:function(){var C=Module.canvas;Browser.resizeListeners.forEach(function(u){u(C.width,C.height)})},setCanvasSize:function(C,u,h){var g=Module.canvas;Browser.updateCanvasDimensions(g,C,u),h||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if(typeof SDL<"u"){var C=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];C=C|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=C}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var C=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];C=C&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=C}Browser.updateResizeListeners()},updateCanvasDimensions:function(C,u,h){u&&h?(C.widthNative=u,C.heightNative=h):(u=C.widthNative,h=C.heightNative);var g=u,S=h;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(g/S>2];return u},getStr:function(){var C=Pointer_stringify(SYSCALLS.get());return C},get64:function(){var C=SYSCALLS.get(),u=SYSCALLS.get();return C>=0?assert(u===0):assert(u===-1),C},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall54(C,u){SYSCALLS.varargs=u;try{return 0}catch(h){return(typeof FS>"u"||!(h instanceof FS.ErrnoError))&&abort(h),-h.errno}}Module._i64Add=_i64Add,Module._bitshift64Lshr=_bitshift64Lshr;function ___cxa_pure_virtual(){throw ABORT=!0,"Pure virtual function called!"}function _pthread_cleanup_push(C,u){__ATEXIT__.push(function(){Runtime.dynCall("vi",C,[u])}),_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cond_broadcast(){return 0}function ___cxa_guard_acquire(C){return HEAP8[C>>0]?0:(HEAP8[C>>0]=1,1)}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!"),__ATEXIT__.pop(),_pthread_cleanup_push.level=__ATEXIT__.length}function ___cxa_guard_release(){}function ___cxa_begin_catch(C){return __ZSt18uncaught_exceptionv.uncaught_exception--,EXCEPTIONS.caught.push(C),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(C)),C}function _llvm_eh_typeid_for(C){return C}function _emscripten_memcpy_big(C,u,h){return HEAPU8.set(HEAPU8.subarray(u,u+h),C),C}Module._memcpy=_memcpy;function ___syscall6(C,u){SYSCALLS.varargs=u;try{var h=SYSCALLS.getStreamFromFD();return FS.close(h),0}catch(g){return(typeof FS>"u"||!(g instanceof FS.ErrnoError))&&abort(g),-g.errno}}function _pthread_mutex_lock(){}function _sbrk(C){var u=_sbrk;u.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),u.called=!0,assert(Runtime.dynamicAlloc),u.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var h=DYNAMICTOP;if(C!=0){var g=u.alloc(C);if(!g)return 4294967295}return h}Module._bitshift64Shl=_bitshift64Shl;function ___cxa_guard_abort(){}Module._memmove=_memmove;function _pthread_cond_wait(){return 0}function ___cxa_rethrow(){___cxa_end_catch.rethrown=!0;var C=EXCEPTIONS.caught.pop();throw EXCEPTIONS.last=C,C}function _pthread_mutex_unlock(){}function _time(C){var u=Date.now()/1e3|0;return C&&(HEAP32[C>>2]=u),u}function _pthread_self(){return 0}function ___syscall140(C,u){SYSCALLS.varargs=u;try{var h=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),S=SYSCALLS.get(),v=SYSCALLS.get(),w=SYSCALLS.get(),I=S;return assert(g===0),FS.llseek(h,I,w),HEAP32[v>>2]=h.position,h.getdents&&I===0&&w===0&&(h.getdents=null),0}catch(_){return(typeof FS>"u"||!(_ instanceof FS.ErrnoError))&&abort(_),-_.errno}}function ___syscall146(C,u){SYSCALLS.varargs=u;try{var h=SYSCALLS.get(),g=SYSCALLS.get(),S=SYSCALLS.get(),v=0;___syscall146.buffer||(___syscall146.buffer=[]);for(var w=___syscall146.buffer,I=0;I>2],P=HEAP32[g+(I*8+4)>>2],L=0;L"u"||!(k instanceof FS.ErrnoError))&&abort(k),-k.errno}}function ___syscall145(C,u){SYSCALLS.varargs=u;try{var h=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),S=SYSCALLS.get();return SYSCALLS.doReadv(h,g,S)}catch(v){return(typeof FS>"u"||!(v instanceof FS.ErrnoError))&&abort(v),-v.errno}}var ___dso_handle=allocate(1,"i32*",ALLOC_STATIC);Module.requestFullScreen=function C(u,h,g){Browser.requestFullScreen(u,h,g)},Module.requestAnimationFrame=function C(u){Browser.requestAnimationFrame(u)},Module.setCanvasSize=function C(u,h,g){Browser.setCanvasSize(u,h,g)},Module.pauseMainLoop=function C(){Browser.mainLoop.pause()},Module.resumeMainLoop=function C(){Browser.mainLoop.resume()},Module.getUserMedia=function C(){Browser.getUserMedia()},Module.createContext=function C(u,h,g,S){return Browser.createContext(u,h,g,S)},STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE2147483648?!1:(d=new g(t),k=new S(t),e=new v(t),N=new w(t),B=new I(t),Q=new _(t),i0=new P(t),j=new L(t),h=t,!0)}function $n(t){t=t|0;var r=0;return r=y,y=y+t|0,y=y+15&-16,r|0}function es(){return y|0}function is(t){t=t|0,y=t}function ts(t,r){t=t|0,r=r|0,y=t,Y=r}function rs(t,r){t=t|0,r=r|0,f||(f=t,f0=r)}function tA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0]}function rA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0],d[G+4>>0]=d[t+4>>0],d[G+5>>0]=d[t+5>>0],d[G+6>>0]=d[t+6>>0],d[G+7>>0]=d[t+7>>0]}function ns(t){t=t|0,D0=t}function ss(){return D0|0}function os(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0;if(R=y,y=y+128|0,T=R+44|0,U=R+8|0,m=R+4|0,p=R,D=n+4|0,E=n+8|0,f=0,P0(35,e[n>>2]|0,e[D>>2]|0,e[E>>2]|0,s|0),A=f,f=0,A&1)V=5;else{a=T,l=a+84|0;do e[a>>2]=e[s>>2],a=a+4|0,s=s+4|0;while((a|0)<(l|0));if(s=T+12|0,!(e[s>>2]|0)&&(c=W(((e[T+8>>2]|0)+7|0)/8|0,e[T>>2]|0)|0,e[s>>2]=c,(e[T+24>>2]|0)!=0)&&(A=W(e[T+16>>2]|0,c)|0,e[s>>2]=A),f=0,n0(176,U|0),A=f,f=0,A&1)V=5;else{s=T+56|0;do if(e[s>>2]|0)if(f=0,s=u0(66,s|0)|0,A=f,f=0,A&1)V=15;else{if(e[m>>2]=s,l=U+28|0,a=e[l>>2]|0,a>>>0<(e[U+32>>2]|0)>>>0){e[a>>2]=s,e[l>>2]=a+4,e[m>>2]=0,V=19;break}if(f=0,h0(57,U+24|0,m|0),A=f,f=0,A&1){if(l=b(824,0)|0,s=D0,a=e[m>>2]|0,e[m>>2]=0,!a)break;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break}else{if(s=e[m>>2]|0,e[m>>2]=0,!s){V=19;break}Ce[e[(e[s>>2]|0)+4>>2]&255](s),V=19;break}}else V=19;while(!1);e:do if((V|0)==19)if(a=T+4|0,c=T+8|0,m=T+16|0,f=0,s=E0(14,e[T>>2]|0,e[a>>2]|0,e[c>>2]|0,e[m>>2]|0)|0,A=f,f=0,A&1)V=15;else{e[p>>2]=s,A=U+28|0,l=e[A>>2]|0;do if(l>>>0>=(e[U+32>>2]|0)>>>0)if(f=0,h0(57,U+24|0,p|0),l=f,f=0,l&1){if(l=b(824,0)|0,s=D0,a=e[p>>2]|0,e[p>>2]=0,!a)break e;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break e}else{if(s=e[p>>2]|0,e[p>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}else e[l>>2]=s,e[A>>2]=l+4,e[p>>2]=0;while(!1);if(s=e[T+28>>2]|0,s|0&&(f=0,h0(58,U|0,s|0),V=f,f=0,V&1)){V=15;break}i:do if(e[T+24>>2]|0){if(f=0,d0(4,U|0,n|0,T|0),V=f,f=0,V&1){V=15;break e}}else if(s=W(e[a>>2]|0,e[T>>2]|0)|0,s=W(s,((e[c>>2]|0)+7|0)/8|0)|0,(e[m>>2]|0)>0){for(a=0;f=0,d0(4,U|0,n|0,T|0),V=f,f=0,!(V&1);)if(l=e[D>>2]|0,l&&(e[D>>2]=l+s,e[E>>2]=(e[E>>2]|0)-s),a=a+1|0,(a|0)>=(e[m>>2]|0))break i;l=b(824,0)|0,s=D0,V=16;break e}while(!1);if(f=0,y0(33,U|0,t|0)|0,V=f,f=0,V&1)V=15;else{if(e[r>>2]=e[U+16>>2],o&&(d[o>>0]=0),a=U+24|0,s=e[a>>2]|0,s){if(l=e[A>>2]|0,(l|0)!=(s|0)){do o=l+-4|0,e[A>>2]=o,l=e[o>>2]|0,e[o>>2]=0,l&&Ce[e[(e[l>>2]|0)+4>>2]&255](l),l=e[A>>2]|0;while((l|0)!=(s|0));s=e[a>>2]|0}l0(s)}return o=0,y=R,o|0}}while(!1);if((V|0)==15&&(l=b(824,0)|0,s=D0,V=16),A=U+24|0,a=e[A>>2]|0,a){if(m=U+28|0,c=e[m>>2]|0,(c|0)!=(a|0)){do U=c+-4|0,e[m>>2]=U,c=e[U>>2]|0,e[U>>2]=0,c&&Ce[e[(e[c>>2]|0)+4>>2]&255](c),c=e[m>>2]|0;while((c|0)!=(a|0));a=e[A>>2]|0}l0(a)}}}if((V|0)==5&&(l=b(824,0)|0,s=D0),U=(s|0)==(Ur(824)|0),c=Qi(l|0)|0,s=(o|0)==0,!U)return s||(d[o>>0]=0),Wi(),o=14,y=R,o|0;a=c+12|0;do if(s)V=60;else if(s=e[a>>2]|0,f=0,l=p0(1)|0,U=f,f=0,!(U&1))if((s|0)==(l|0)){E1(o,Se[e[(e[c>>2]|0)+8>>2]&127](c)|0)|0,V=60;break}else{d[o>>0]=0,V=60;break}while(!1);return(V|0)==60&&(q=e[a>>2]|0,f=0,O=p0(1)|0,o=f,f=0,!(o&1))?(o=(q|0)==(O|0)?e[c+8>>2]|0:13,Wi(),y=R,o|0):(s=b()|0,f=0,we(3),R=f,f=0,R&1?(R=b(0)|0,De(R)):r0(s|0),0)}function ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;switch(A=y,y=y+112|0,l=A+96|0,m=A+84|0,p=A+72|0,T=A+60|0,D=A+48|0,E=A+36|0,U=A+24|0,V=A+12|0,q=A,c=(r|0)==0,(t|0)==0&c&&(o=de(16)|0,f=0,d0(5,l|0,48504,52),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,l|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(l),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),a=e[s>>2]|0,(a+-1|0)>>>0>65534&&(o=de(16)|0,f=0,d0(5,m|0,48557,41),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,m|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(m),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),l=e[s+4>>2]|0,(l+-1|0)>>>0>65534&&(o=de(16)|0,f=0,d0(5,p|0,48599,42),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,p|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(p),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),o=e[s+8>>2]|0,(o+-2|0)>>>0>14&&(o=de(16)|0,f=0,d0(5,T|0,48642,46),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,T|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(T),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),t=e[s+24>>2]|0,t>>>0>=3&&(o=de(16)|0,f=0,d0(5,D|0,48689,65),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,D|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(D),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),r=e[s+16>>2]|0,(r+-1|0)>>>0>254&&(o=de(16)|0,f=0,d0(5,E|0,48755,44),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,E|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(E),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),!c&&(E=W(l,a)|0,(W(W(E,(o|0)>8?2:1)|0,r)|0)>>>0>n>>>0)&&(o=de(16)|0,f=0,d0(5,U|0,48800,58),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,U|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(U),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)),r|0){case 4:{if((t|0)!=2){y=A;return}o=de(16)|0,f=0,d0(5,V|0,48859,73),q=f,f=0,q&1?r=b()|0:(f=0,r=p0(1)|0,q=f,f=0,!(q&1)&&(f=0,P0(36,o|0,1,r|0,V|0),q=f,f=0,!(q&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(V),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)}case 3:{y=A;return}default:{if(!t){y=A;return}o=de(16)|0,f=0,d0(5,q|0,48933,73),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,q|0),V=f,f=0,!(V&1))?(f=0,d0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,a0(q),t||(q=r,r0(q|0))),ge(o|0),q=r,r0(q|0)}}}function De(t){t=t|0,Qi(t|0)|0,Ig()}function as(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+128|0,l=p+116|0,a=p,f=0,e[l>>2]=e[r>>2],e[l+4>>2]=e[r+4>>2],e[l+8>>2]=e[r+8>>2],h0(59,a|0,l|0),o=f,f=0,!(o&1)){if(n){o=a+16|0,r=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(r|0))}if(f=0,e[l>>2]=e[t>>2],e[l+4>>2]=e[t+4>>2],e[l+8>>2]=e[t+8>>2],h0(60,a|0,l|0),a=f,f=0,!(a&1))return s&&(d[s>>0]=0),A=0,y=p,A|0}if(t=b(824,0)|0,a=D0,a=(a|0)==(Ur(824)|0),t=Qi(t|0)|0,r=(s|0)==0,!a)return r||(d[s>>0]=0),Wi(),A=14,y=p,A|0;o=t+12|0;do if(r)A=10;else if(r=e[o>>2]|0,f=0,n=p0(1)|0,a=f,f=0,!(a&1))if((r|0)==(n|0)){E1(s,Se[e[(e[t>>2]|0)+8>>2]&127](t)|0)|0,A=10;break}else{d[s>>0]=0,A=10;break}while(!1);return(A|0)==10&&(c=e[o>>2]|0,f=0,m=p0(1)|0,A=f,f=0,!(A&1))?(A=(c|0)==(m|0)?e[t+8>>2]|0:13,Wi(),y=p,A|0):(r=b()|0,f=0,we(3),p=f,f=0,p&1?(p=b(0)|0,De(p)):r0(r|0),0)}function fs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(m=y,y=y+128|0,o=m+116|0,s=m,f=0,e[o>>2]=e[t>>2],e[o+4>>2]=e[t+4>>2],e[o+8>>2]=e[t+8>>2],h0(59,s|0,o|0),o=f,f=0,!(o&1)&&(f=0,n0(177,s|0),o=f,f=0,!(o&1))&&(f=0,h0(61,s|0,1),o=f,f=0,!(o&1))){t=s+16|0,s=r+84|0;do e[r>>2]=e[t>>2],r=r+4|0,t=t+4|0;while((r|0)<(s|0));return n&&(d[n>>0]=0),n=0,y=m,n|0}if(o=b(824,0)|0,r=D0,r=(r|0)==(Ur(824)|0),o=Qi(o|0)|0,t=(n|0)==0,!r)return t||(d[n>>0]=0),Wi(),n=14,y=m,n|0;r=o+12|0;do if(t)c=13;else if(t=e[r>>2]|0,f=0,s=p0(1)|0,A=f,f=0,!(A&1))if((t|0)==(s|0)){E1(n,Se[e[(e[o>>2]|0)+8>>2]&127](o)|0)|0,c=13;break}else{d[n>>0]=0,c=13;break}while(!1);return(c|0)==13&&(l=e[r>>2]|0,f=0,a=p0(1)|0,A=f,f=0,!(A&1))?(A=(l|0)==(a|0)?e[o+8>>2]|0:13,Wi(),y=m,A|0):(t=b()|0,f=0,we(3),A=f,f=0,A&1?(A=b(0)|0,De(A)):r0(t|0),0)}function us(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0;return T=y,y=y+48|0,m=T+36|0,c=T+24|0,A=T+12|0,p=T,(t|0)!=0&(n|0)!=0&(s|0)!=0&(l|0)!=0?(e[A>>2]=0,e[A+4>>2]=t,e[A+8>>2]=r,e[p>>2]=0,e[p+4>>2]=s,e[p+8>>2]=o,e[c>>2]=e[A>>2],e[c+4>>2]=e[A+4>>2],e[c+8>>2]=e[A+8>>2],e[m>>2]=e[p>>2],e[m+4>>2]=e[p+4>>2],e[m+8>>2]=e[p+8>>2],o=os(c,n,m,l,a)|0,y=T,o|0):(o=1,y=T,o|0)}function cs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;return o=y,y=y+32|0,l=o+12|0,a=o,c=a,e[c>>2]=0,e[c+4>>2]=0,e[a+4>>2]=t,e[a+8>>2]=r,e[l>>2]=e[a>>2],e[l+4>>2]=e[a+4>>2],e[l+8>>2]=e[a+8>>2],n=fs(l,n,s)|0,y=o,n|0}function hs(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+48|0,c=a+36|0,m=a+24|0,p=a+12|0,A=a,e[p>>2]=0,e[p+4>>2]=t,e[p+8>>2]=r,e[A>>2]=0,e[A+4>>2]=n,e[A+8>>2]=s,e[m>>2]=e[p>>2],e[m+4>>2]=e[p+4>>2],e[m+8>>2]=e[p+8>>2],e[c>>2]=e[A>>2],e[c+4>>2]=e[A+4>>2],e[c+8>>2]=e[A+8>>2],s=as(m,c,o,l)|0,y=a,s|0}function ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(A=t+4|0,n=e[t>>2]|0,o=((e[A>>2]|0)-n>>2)+1|0,o>>>0>1073741823&&(ct(t),n=e[t>>2]|0),p=t+8|0,s=(e[p>>2]|0)-n|0,s>>2>>>0<536870911?(s=s>>1,s=s>>>0>>0?o:s,n=(e[A>>2]|0)-n>>2,s?c=6:(l=0,a=0)):(s=1073741823,n=(e[A>>2]|0)-n>>2,c=6),(c|0)==6&&(l=s,a=G0(s<<2)|0),o=a+(n<<2)|0,s=o,m=a+(l<<2)|0,c=e[r>>2]|0,e[r>>2]=0,e[o>>2]=c,c=a+(n+1<<2)|0,a=e[t>>2]|0,n=e[A>>2]|0,(n|0)==(a|0))o=t,l=A;else{do n=n+-4|0,r=e[n>>2]|0,e[n>>2]=0,e[o+-4>>2]=r,o=s+-4|0,s=o;while((n|0)!=(a|0));n=s,o=t,l=A,s=n,a=e[t>>2]|0,n=e[A>>2]|0}if(e[o>>2]=s,e[l>>2]=c,e[p>>2]=m,o=a,(n|0)!=(o|0))do n=n+-4|0,s=e[n>>2]|0,e[n>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s);while((n|0)!=(o|0));a&&l0(a)}function ds(){return d[8]|0||!(Ae(8)|0)||(xe(72,35648,z|0)|0,ve(8)),35648}function or(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;p=y,y=y+32|0,m=p,hi(m,(1<>2]|0,A=l+1|0,n=A<<1,e[t>>2]=0,a=t+4|0,e[a>>2]=0,e[t+8>>2]=0;e:do if(A){if((l|0)<-1&&(f=0,n0(178,t|0),c=f,f=0,c&1)||(s=4),(s|0)==4&&(f=0,o=u0(67,n|0)|0,c=f,f=0,!(c&1))){for(e[a>>2]=o,e[t>>2]=o,e[t+8>>2]=o+n,r=o;;)if(d[r>>0]=0,r=(e[a>>2]|0)+1|0,e[a>>2]=r,n=n+-1|0,!n)break e}n=b()|0,r=e[t>>2]|0,r||r0(n|0),(e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),l0(r),r0(n|0)}while(!1);if(r=~l,(l|0)<(r|0)){y=p;return}a=m+12|0,c=m+8|0,l=m+4|0,o=r;do r=e[a>>2]|0,(o|0)>(0-r|0)?(n=e[c>>2]|0,(o|0)>(0-n|0)?(s=e[l>>2]|0,(o|0)>(0-s|0)?(o|0)>=0?(o|0)>0?(s|0)<=(o|0)?(n|0)>(o|0)?r=2:r=(r|0)>(o|0)?3:4:r=1:r=0:r=-1:r=-2):r=-3):r=-4,d[(e[t>>2]|0)+(o+A)>>0]=r,o=o+1|0;while((o|0)<(A|0));y=p}function gs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;switch(D=e[n+16>>2]|0,D|0){case 64:case 0:{f=0,t=y0(34,t|0,r|0)|0,r=f,f=0,r&1?E=16:s=t;break}default:{for(o=(1<>2])+-1|0,T=e[r+20>>2]|0,p=T<<1,p=((p+o|0)/(p|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4624)|0,A=f,f=0,A&1)E=16;else{l=((a|0)<8?8:a)+a<<1,c=s+4|0,m=r,A=c+84|0;do e[c>>2]=e[m>>2],c=c+4|0,m=m+4|0;while((c|0)<(A|0));c=s+88|0,A=c+40|0;do e[c>>2]=0,c=c+4|0;while((c|0)<(A|0));e[s>>2]=35660,e[s+128>>2]=o,e[s+132>>2]=p,e[s+136>>2]=T,e[s+140>>2]=t,e[s+144>>2]=a,e[s+148>>2]=l,e[s+152>>2]=D,t=s+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+172>>2]=e[r>>2],e[s+176>>2]=0,e[s+180>>2]=0,e[s+184>>2]=0,t=s+4568|0,o=s+188|0;do e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,k[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4580|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1)}}}return(E|0)==16&&(E=b()|0,r0(E|0)),!s||(f=0,h0(e[(e[s>>2]|0)+12>>2]|0,s|0,n|0),E=f,f=0,!(E&1))?s|0:(t=b()|0,s||(E=t,r0(E|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),E=t,r0(E|0),0)}function ps(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;p=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!p){if(n){if((t|0)!=8)break;s=G0(4600)|0,a=s+4|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=s+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[s>>2]=35688,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4600)|0,a=s+4|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=s+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[s>>2]=35716,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 12:{s=G0(4600)|0,a=s+4|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=s+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[s>>2]=35744,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 16:{s=G0(4600)|0,a=s+4|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=s+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[s>>2]=35772,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}default:break e}}while(!1);if(A=(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=o+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[o>>2]=35800,e[o+128>>2]=A,e[o+132>>2]=l,e[o+136>>2]=p,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=o+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[o>>2]=35660,e[o+128>>2]=A,e[o+132>>2]=l,e[o+136>>2]=p,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=p<<1,l=((l+A|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=o+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[o>>2]=35828,e[o+128>>2]=A,e[o+132>>2]=l,e[o+136>>2]=p,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));a=o+88|0,m=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(m|0));e[o>>2]=35856,e[o+128>>2]=A,e[o+132>>2]=l,e[o+136>>2]=p,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}return 0}function As(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;switch(D=e[n+16>>2]|0,D|0){case 64:case 0:{f=0,t=y0(35,t|0,r|0)|0,r=f,f=0,r&1?E=16:s=t;break}default:{for(o=(1<>2])+-1|0,T=e[r+20>>2]|0,p=T<<1,p=((p+o|0)/(p|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4632)|0,A=f,f=0,A&1)E=16;else{l=((a|0)<8?8:a)+a<<1,e[s+4>>2]=0,c=s+8|0,m=r,A=c+84|0;do e[c>>2]=e[m>>2],c=c+4|0,m=m+4|0;while((c|0)<(A|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,A=s+116|0,e[A>>2]=0,e[A+4>>2]=0,e[A+8>>2]=0,e[A+12>>2]=0,e[A+16>>2]=0,e[s>>2]=35884,e[s+136>>2]=o,e[s+140>>2]=p,e[s+144>>2]=T,e[s+148>>2]=t,e[s+152>>2]=a,e[s+156>>2]=l,e[s+160>>2]=D,t=s+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+180>>2]=e[r>>2],e[s+184>>2]=0,e[s+188>>2]=0,e[s+192>>2]=0,t=s+4576|0,o=s+196|0;do e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,k[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4588|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1)}}}return(E|0)==16&&(E=b()|0,r0(E|0)),!s||(f=0,h0(e[(e[s>>2]|0)+8>>2]|0,s|0,n|0),E=f,f=0,!(E&1))?s|0:(t=b()|0,s||(E=t,r0(E|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),E=t,r0(E|0),0)}function Ss(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;p=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!p){if(n){if((t|0)!=8)break;s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35912,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35940,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 12:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35968,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 16:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35996,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}default:break e}}while(!1);if(A=(1<>2]=0,a=o+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,m=o+116|0,e[m>>2]=0,e[m+4>>2]=0,e[m+8>>2]=0,e[m+12>>2]=0,e[m+16>>2]=0,e[o>>2]=36024,e[o+136>>2]=A,e[o+140>>2]=l,e[o+144>>2]=p,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,m=o+116|0,e[m>>2]=0,e[m+4>>2]=0,e[m+8>>2]=0,e[m+12>>2]=0,e[m+16>>2]=0,e[o>>2]=35884,e[o+136>>2]=A,e[o+140>>2]=l,e[o+144>>2]=p,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=p<<1,l=((l+A|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=0,a=o+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,m=o+116|0,e[m>>2]=0,e[m+4>>2]=0,e[m+8>>2]=0,e[m+12>>2]=0,e[m+16>>2]=0,e[o>>2]=36052,e[o+136>>2]=A,e[o+140>>2]=l,e[o+144>>2]=p,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,m=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(m|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,m=o+116|0,e[m>>2]=0,e[m+4>>2]=0,e[m+8>>2]=0,e[m+12>>2]=0,e[m+16>>2]=0,e[o>>2]=36080,e[o+136>>2]=A,e[o+140>>2]=l,e[o+144>>2]=p,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,k[n+8>>1]=0,k[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,k[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,k[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}return 0}function vs(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0;t=2832;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=4880);je(2832,0,2048)|0,t=0;do a=2832+(t+128<<3)|0,e[a>>2]=0,e[a+4>>2]=1,t=t+1|0;while((t|0)!=128);t=3088,e[t>>2]=1,e[t+4>>2]=3,t=3096,e[t>>2]=1,e[t+4>>2]=3,t=3104,e[t>>2]=1,e[t+4>>2]=3,t=3112,e[t>>2]=1,e[t+4>>2]=3,t=3120,e[t>>2]=1,e[t+4>>2]=3,t=3128,e[t>>2]=1,e[t+4>>2]=3,t=3136,e[t>>2]=1,e[t+4>>2]=3,t=3144,e[t>>2]=1,e[t+4>>2]=3,t=3152,e[t>>2]=1,e[t+4>>2]=3,t=3160,e[t>>2]=1,e[t+4>>2]=3,t=3168,e[t>>2]=1,e[t+4>>2]=3,t=3176,e[t>>2]=1,e[t+4>>2]=3,t=3184,e[t>>2]=1,e[t+4>>2]=3,t=3192,e[t>>2]=1,e[t+4>>2]=3,t=3200,e[t>>2]=1,e[t+4>>2]=3,t=3208,e[t>>2]=1,e[t+4>>2]=3,t=3216,e[t>>2]=1,e[t+4>>2]=3,t=3224,e[t>>2]=1,e[t+4>>2]=3,t=3232,e[t>>2]=1,e[t+4>>2]=3,t=3240,e[t>>2]=1,e[t+4>>2]=3,t=3248,e[t>>2]=1,e[t+4>>2]=3,t=3256,e[t>>2]=1,e[t+4>>2]=3,t=3264,e[t>>2]=1,e[t+4>>2]=3,t=3272,e[t>>2]=1,e[t+4>>2]=3,t=3280,e[t>>2]=1,e[t+4>>2]=3,t=3288,e[t>>2]=1,e[t+4>>2]=3,t=3296,e[t>>2]=1,e[t+4>>2]=3,t=3304,e[t>>2]=1,e[t+4>>2]=3,t=3312,e[t>>2]=1,e[t+4>>2]=3,t=3320,e[t>>2]=1,e[t+4>>2]=3,t=3328,e[t>>2]=1,e[t+4>>2]=3,t=3336,e[t>>2]=1,e[t+4>>2]=3,t=2896,e[t>>2]=2,e[t+4>>2]=5,t=2904,e[t>>2]=2,e[t+4>>2]=5,t=2912,e[t>>2]=2,e[t+4>>2]=5,t=2920,e[t>>2]=2,e[t+4>>2]=5,t=2928,e[t>>2]=2,e[t+4>>2]=5,t=2936,e[t>>2]=2,e[t+4>>2]=5,t=2944,e[t>>2]=2,e[t+4>>2]=5,t=2952,e[t>>2]=2,e[t+4>>2]=5,t=2848,e[t>>2]=3,e[t+4>>2]=7,t=2856,e[t>>2]=3,e[t+4>>2]=7,t=0;do a=2832+(t+64<<3)|0,e[a>>2]=-1,e[a+4>>2]=2,t=t+1|0;while((t|0)!=64);t=2960,e[t>>2]=-2,e[t+4>>2]=4,t=2968,e[t>>2]=-2,e[t+4>>2]=4,t=2976,e[t>>2]=-2,e[t+4>>2]=4,t=2984,e[t>>2]=-2,e[t+4>>2]=4,t=2992,e[t>>2]=-2,e[t+4>>2]=4,t=3e3,e[t>>2]=-2,e[t+4>>2]=4,t=3008,e[t>>2]=-2,e[t+4>>2]=4,t=3016,e[t>>2]=-2,e[t+4>>2]=4,t=3024,e[t>>2]=-2,e[t+4>>2]=4,t=3032,e[t>>2]=-2,e[t+4>>2]=4,t=3040,e[t>>2]=-2,e[t+4>>2]=4,t=3048,e[t>>2]=-2,e[t+4>>2]=4,t=3056,e[t>>2]=-2,e[t+4>>2]=4,t=3064,e[t>>2]=-2,e[t+4>>2]=4,t=3072,e[t>>2]=-2,e[t+4>>2]=4,t=3080,e[t>>2]=-2,e[t+4>>2]=4,t=2864,e[t>>2]=-3,e[t+4>>2]=6,t=2872,e[t>>2]=-3,e[t+4>>2]=6,t=2880,e[t>>2]=-3,e[t+4>>2]=6,t=2888,e[t>>2]=-3,e[t+4>>2]=6,t=2840,e[t>>2]=-4,e[t+4>>2]=8,t=4880;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=6928);for(je(4880,0,2048)|0,n=2,t=0,o=0,l=0;;){if(n=n<<16>>16,r=8-n|0,s=1<>2]=o,e[a+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==7){r=2,o=1,l=-1,a=-1;break}else n=(t>>1)+2|0,o=r>>16}for(;;){if(n=r<<16>>16,t=8-n|0,s=1<>2]=l,e[o+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(t=(a<<16)+-65536|0,o=t>>31^t>>15,r=(o>>1)+2|0,(r|0)>8){t=6928;break}else l=t>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=8976);for(je(6928,0,2048)|0,o=3,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==12){o=3,r=1,s=-1,l=-1;break}else o=(t>>2)+3|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>2)+3|0,(o|0)>8){t=8976;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=11024);for(je(8976,0,2048)|0,o=4,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==20){o=4,r=1,s=-1,l=-1;break}else o=(t>>3)+4|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>3)+4|0,(o|0)>8){t=11024;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=13072);for(je(11024,0,2048)|0,o=5,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==32){o=5,r=1,s=-1,l=-1;break}else o=(t>>4)+5|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>4)+5|0,(o|0)>8){t=13072;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=15120);for(je(13072,0,2048)|0,o=6,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==48){o=6,r=1,s=-1,l=-1;break}else o=(t>>5)+6|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>5)+6|0,(o|0)>8){t=15120;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=17168);for(je(15120,0,2048)|0,o=7,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){o=7,r=1,s=-1,l=-1;break}else o=(t>>6)+7|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>6)+7|0,(o|0)>8){t=17168;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=19216);for(je(17168,0,2048)|0,o=8,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){l=8,s=1,o=-1,a=-1;break}else o=(t>>7)+8|0,s=r>>16}for(;;){if(t=8-l|0,n=1<>2]=o,e[s+4>>2]=l,r=r+1|0;while((r|0)<(n|0))}if(r=(a<<16)+-65536|0,s=r>>31^r>>15,t=s>>7,(t|0)>0){t=19216;break}else l=t+8|0,o=r>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=21264);je(19216,0,2048)|0,t=21264;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=23312);je(21264,0,2048)|0,t=23312;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=25360);je(23312,0,2048)|0,t=25360;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=27408);je(25360,0,2048)|0,t=27408;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=29456);je(27408,0,2048)|0,t=29456;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=31504);je(29456,0,2048)|0,t=31504;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=33552);je(31504,0,2048)|0,t=33552;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=35600);je(33552,0,2048)|0,or(35600,8),xe(179,35600,z|0)|0,or(35612,10),xe(179,35612,z|0)|0,or(35624,12),xe(179,35624,z|0)|0,or(35636,16),xe(179,35636,z|0)|0}function ws(t){t=t|0;var r=0;r=e[t>>2]|0,r&&(t=t+4|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),l0(r))}function xs(t){t=t|0;var r=0,n=0;e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Cs(t){t=t|0;var r=0,n=0;if(e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Ts(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+184>>2]=c|0?c:e[m+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,qo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,k[t+196+(l*12|0)+8>>1]=0,k[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=m,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=m,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function ys(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35856,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,X1(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],X1(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function Ds(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Is(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;e[t>>2]=36460,e[t+4>>2]=n,T=t+8|0,l=e[n>>2]|0,A=n+16|0,s=e[A>>2]|0,a=W(s,l)|0,e[T>>2]=0,D=t+12|0,e[D>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,T|0),l=f,f=0,l&1)||(p=4),(p|0)==4&&(c=a<<1,f=0,m=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[T>>2]=m,l=m+(a<<1)|0,e[t+16>>2]=l,je(m|0,0,c|0)|0,e[D>>2]=l,l=e[n>>2]|0,s=e[A>>2]|0;break}a=b()|0,o=e[T>>2]|0,s=o,o&&(l=e[D>>2]|0,(l|0)!=(o|0)&&(e[D>>2]=l+(~((l+-2-s|0)>>>1)<<1)),l0(o)),D=a,r0(D|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=13),(p|0)==13&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),l0(o)),o=e[T>>2]|0,o||(D=l,r0(D|0)),s=e[D>>2]|0,(s|0)!=(o|0)&&(e[D>>2]=s+(~((s+-2-o|0)>>>1)<<1)),l0(o),D=l,r0(D|0)}function ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;e[t>>2]=36436,e[t+4>>2]=n,T=t+8|0,l=e[n>>2]|0,A=n+16|0,s=e[A>>2]|0,a=W(s,l)|0,e[T>>2]=0,D=t+12|0,e[D>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,T|0),l=f,f=0,l&1)||(p=4),(p|0)==4&&(c=a<<1,f=0,m=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[T>>2]=m,l=m+(a<<1)|0,e[t+16>>2]=l,je(m|0,0,c|0)|0,e[D>>2]=l,l=e[n>>2]|0,s=e[A>>2]|0;break}a=b()|0,o=e[T>>2]|0,s=o,o&&(l=e[D>>2]|0,(l|0)!=(o|0)&&(e[D>>2]=l+(~((l+-2-s|0)>>>1)<<1)),l0(o)),D=a,r0(D|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=13),(p|0)==13&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),l0(o)),o=e[T>>2]|0,o||(D=l,r0(D|0)),s=e[D>>2]|0,(s|0)!=(o|0)&&(e[D>>2]=s+(~((s+-2-o|0)>>>1)<<1)),l0(o),D=l,r0(D|0)}function Es(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;e[t>>2]=36412,e[t+4>>2]=n,T=t+8|0,l=e[n>>2]|0,A=n+16|0,s=e[A>>2]|0,a=W(s,l)|0,e[T>>2]=0,D=t+12|0,e[D>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,T|0),l=f,f=0,l&1)||(p=4),(p|0)==4&&(c=a<<1,f=0,m=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[T>>2]=m,l=m+(a<<1)|0,e[t+16>>2]=l,je(m|0,0,c|0)|0,e[D>>2]=l,l=e[n>>2]|0,s=e[A>>2]|0;break}a=b()|0,o=e[T>>2]|0,s=o,o&&(l=e[D>>2]|0,(l|0)!=(o|0)&&(e[D>>2]=l+(~((l+-2-s|0)>>>1)<<1)),l0(o)),D=a,r0(D|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=13),(p|0)==13&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),l0(o)),o=e[T>>2]|0,o||(D=l,r0(D|0)),s=e[D>>2]|0,(s|0)!=(o|0)&&(e[D>>2]=s+(~((s+-2-o|0)>>>1)<<1)),l0(o),D=l,r0(D|0)}function Fs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;e[t>>2]=36388,e[t+4>>2]=n,T=t+8|0,l=e[n>>2]|0,A=n+16|0,s=e[A>>2]|0,a=W(s,l)|0,e[T>>2]=0,D=t+12|0,e[D>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,T|0),l=f,f=0,l&1)||(p=4),(p|0)==4&&(c=a<<1,f=0,m=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[T>>2]=m,l=m+(a<<1)|0,e[t+16>>2]=l,je(m|0,0,c|0)|0,e[D>>2]=l,l=e[n>>2]|0,s=e[A>>2]|0;break}a=b()|0,o=e[T>>2]|0,s=o,o&&(l=e[D>>2]|0,(l|0)!=(o|0)&&(e[D>>2]=l+(~((l+-2-s|0)>>>1)<<1)),l0(o)),D=a,r0(D|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=13),(p|0)==13&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);D=t+36|0,e[D>>2]=e[r>>2],e[D+4>>2]=e[r+4>>2],e[D+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),l0(o)),o=e[T>>2]|0,o||(D=l,r0(D|0)),s=e[D>>2]|0,(s|0)!=(o|0)&&(e[D>>2]=s+(~((s+-2-o|0)>>>1)<<1)),l0(o),D=l,r0(D|0)}function Ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;a=t+32|0,f5(a,r)|0,l=t+44|0,e[l>>2]=0,c=t+48|0,o=e[c>>2]|0,o&8&&(r=d[a>>0]|0,r&1?(r=(e[t+40>>2]|0)+(e[t+36>>2]|0)|0,e[l>>2]=r,s=e[t+40>>2]|0,n=s):(r=((r&255)>>>1)+(a+1)|0,e[l>>2]=r,n=a+1|0,s=a+1|0),e[t+8>>2]=n,e[t+12>>2]=s,e[t+16>>2]=r),o&16&&(r=d[a>>0]|0,r&1?(o=e[t+36>>2]|0,e[l>>2]=(e[t+40>>2]|0)+o,r=(e[a>>2]&-2)+-1|0,l=o):(o=(r&255)>>>1,e[l>>2]=a+1+o,r=10,l=o),O2(a,r,0),r=d[a>>0]|0,r&1?(n=e[t+40>>2]|0,o=n,s=e[t+36>>2]|0):(o=a+1|0,s=(r&255)>>>1,n=a+1|0),r=t+24|0,e[r>>2]=n,e[t+20>>2]=n,e[t+28>>2]=o+s,e[c>>2]&3&&(e[r>>2]=n+l))}function _s(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;D=y,y=y+32|0,a=D+16|0,T=D+8|0,c=D,f=0,h0(65,T|0,t|0),A=f,f=0;e:do if(A&1)n=b(0)|0,s=t,o=t;else{do if(d[T>>0]|0){s=e[(e[t>>2]|0)+-12>>2]|0,e[c>>2]=e[t+(s+24)>>2],m=t+s|0,A=e[t+(s+4)>>2]|0,o=r+n|0,s=t+(s+76)|0,n=e[s>>2]|0;do if((n|0)==-1)if(f=0,n=u0(68,m|0)|0,E=f,f=0,E&1)p=13;else{if(e[a>>2]=n,f=0,n=y0(37,a|0,44220)|0,E=f,f=0,!(E&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,E=f,f=0,!(E&1))){Mi(a),n=l<<24>>24,e[s>>2]=n,p=9;break}n=b(0)|0,Mi(a)}else p=9;while(!1);if((p|0)==9)if(f=0,e[a>>2]=e[c>>2],n=Ee(39,a|0,r|0,((A&176|0)==32?o:r)|0,o|0,m|0,n&255|0)|0,E=f,f=0,E&1)p=13;else{if(n)break;if(E=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+E|0,e[t+(E+16)>>2]|5|0),E=f,f=0,E&1)p=13;else break}(p|0)==13&&(n=b(0)|0),yt(T),s=t,o=t;break e}while(!1);return yt(T),y=D,t|0}while(!1);return Qi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),E=f,f=0,E&1?(n=b()|0,f=0,we(3),E=f,f=0,E&1?(E=b(0)|0,De(E)):r0(n|0),0):(Wi(),y=D,t|0)}function Rs(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(n=e[r+48>>2]|0,n&16){if(n=r+44|0,s=e[n>>2]|0,o=e[r+24>>2]|0,s>>>0>>0?e[n>>2]=o:o=s,s=e[r+20>>2]|0,l=o-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(r=l+16&-16,n=G0(r)|0,e[t+8>>2]=n,e[t>>2]=r|1,e[t+4>>2]=l),(s|0)!=(o|0)){for(r=n;d[r>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(o|0);)r=r+1|0;n=n+l|0}d[n>>0]=0;return}if(!(n&8)){e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0;return}if(s=e[r+8>>2]|0,r=e[r+16>>2]|0,l=r-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(o=l+16&-16,n=G0(o)|0,e[t+8>>2]=n,e[t>>2]=o|1,e[t+4>>2]=l),(s|0)!=(r|0)){for(o=n;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(r|0);)o=o+1|0;n=n+l|0}d[n>>0]=0}function Ps(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;e[t>>2]=36364,e[t+4>>2]=n,D=t+8|0,a=e[n>>2]|0,p=n+16|0,l=e[p>>2]|0,A=W(l,a)|0,e[D>>2]=0,E=t+12|0,e[E>>2]=0,e[t+16>>2]=0;do if(A){if((A|0)<0&&(f=0,n0(178,D|0),a=f,f=0,a&1)||(T=4),(T|0)==4&&(c=A<<1,f=0,m=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[D>>2]=m,a=m+(A<<1)|0,e[t+16>>2]=a,je(m|0,0,c|0)|0,e[E>>2]=a,a=e[n>>2]|0,l=e[p>>2]|0;break}c=b()|0,o=e[D>>2]|0,l=o,o&&(a=e[E>>2]|0,(a|0)!=(o|0)&&(e[E>>2]=a+(~((a+-2-l|0)>>>1)<<1)),l0(o)),E=c,r0(E|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,m=t+24|0,e[m>>2]=0,e[t+28>>2]=0,!l){E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),p=f,f=0,p&1)||(T=13),(T|0)==13&&(f=0,o=u0(67,l|0)|0,T=f,f=0,!(T&1))){e[m>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[m>>2]|0)+1|0,e[m>>2]=o,l=l+-1|0;while(l|0);E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[m>>2]|0)!=(o|0)&&(e[m>>2]=o),l0(o)),o=e[D>>2]|0,o||(E=a,r0(E|0)),l=e[E>>2]|0,(l|0)!=(o|0)&&(e[E>>2]=l+(~((l+-2-o|0)>>>1)<<1)),l0(o),E=a,r0(E|0)}function Ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;e[t>>2]=36340,e[t+4>>2]=n,D=t+8|0,a=e[n>>2]|0,p=n+16|0,l=e[p>>2]|0,A=W(l,a)|0,e[D>>2]=0,E=t+12|0,e[E>>2]=0,e[t+16>>2]=0;do if(A){if((A|0)<0&&(f=0,n0(178,D|0),a=f,f=0,a&1)||(T=4),(T|0)==4&&(c=A<<1,f=0,m=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[D>>2]=m,a=m+(A<<1)|0,e[t+16>>2]=a,je(m|0,0,c|0)|0,e[E>>2]=a,a=e[n>>2]|0,l=e[p>>2]|0;break}c=b()|0,o=e[D>>2]|0,l=o,o&&(a=e[E>>2]|0,(a|0)!=(o|0)&&(e[E>>2]=a+(~((a+-2-l|0)>>>1)<<1)),l0(o)),E=c,r0(E|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,m=t+24|0,e[m>>2]=0,e[t+28>>2]=0,!l){E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),p=f,f=0,p&1)||(T=13),(T|0)==13&&(f=0,o=u0(67,l|0)|0,T=f,f=0,!(T&1))){e[m>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[m>>2]|0)+1|0,e[m>>2]=o,l=l+-1|0;while(l|0);E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[m>>2]|0)!=(o|0)&&(e[m>>2]=o),l0(o)),o=e[D>>2]|0,o||(E=a,r0(E|0)),l=e[E>>2]|0,(l|0)!=(o|0)&&(e[E>>2]=l+(~((l+-2-o|0)>>>1)<<1)),l0(o),E=a,r0(E|0)}function Us(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;e[t>>2]=36316,e[t+4>>2]=n,D=t+8|0,a=e[n>>2]|0,p=n+16|0,l=e[p>>2]|0,A=W(l,a)|0,e[D>>2]=0,E=t+12|0,e[E>>2]=0,e[t+16>>2]=0;do if(A){if((A|0)<0&&(f=0,n0(178,D|0),a=f,f=0,a&1)||(T=4),(T|0)==4&&(c=A<<1,f=0,m=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[D>>2]=m,a=m+(A<<1)|0,e[t+16>>2]=a,je(m|0,0,c|0)|0,e[E>>2]=a,a=e[n>>2]|0,l=e[p>>2]|0;break}c=b()|0,o=e[D>>2]|0,l=o,o&&(a=e[E>>2]|0,(a|0)!=(o|0)&&(e[E>>2]=a+(~((a+-2-l|0)>>>1)<<1)),l0(o)),E=c,r0(E|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,m=t+24|0,e[m>>2]=0,e[t+28>>2]=0,!l){E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),p=f,f=0,p&1)||(T=13),(T|0)==13&&(f=0,o=u0(67,l|0)|0,T=f,f=0,!(T&1))){e[m>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[m>>2]|0)+1|0,e[m>>2]=o,l=l+-1|0;while(l|0);E=t+32|0,D=s,D=e[D>>2]|0,s=s+4|0,s=e[s>>2]|0,T=E,e[T>>2]=D,E=E+4|0,e[E>>2]=s,E=t+40|0,e[E>>2]=D,E=t+48|0,e[E>>2]=e[r>>2],e[E+4>>2]=e[r+4>>2],e[E+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[m>>2]|0)!=(o|0)&&(e[m>>2]=o),l0(o)),o=e[D>>2]|0,o||(E=a,r0(E|0)),l=e[E>>2]|0,(l|0)!=(o|0)&&(e[E>>2]=l+(~((l+-2-o|0)>>>1)<<1)),l0(o),E=a,r0(E|0)}function Os(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function Ns(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function Vs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,b1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,b1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function Bs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){qs(t,o,r,n,s);return}else{o=t+52|0,Or(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Or(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;m=t+4|0,l=e[m>>2]|0;do if(!(d[l+32>>0]|0))A=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*6|0)|0,l=e[m>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){A=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;A=l+4|0,p=k[l>>1]|0,k[l>>1]=k[A>>1]|0,k[A>>1]=p,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;A=r,l=e[m>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do p=e[l>>2]|0,m=B[A+(r*6|0)+2>>1]<>1]<>1]<>1]=(m+49152+((t+o|0)>>>2)&65535)>>>p,k[n+(r*6|0)+2>>1]=t>>>p,k[n+(r*6|0)+4>>1]=o>>>p,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=B[A+(r*6|0)+2>>1]<>1]<>1]<>1]=(s+49152+((t+p|0)>>>2)&65535)>>>l,k[n+(r+o<<1)>>1]=t>>>l,k[n+(r+c<<1)>>1]=p>>>l,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,m=o*3|0,l=e[t+32>>2]|0,r=0;do p=k[A+(r<<3)+6>>1]|0,T=B[A+(r<<3)+2>>1]<>1]<>1]<>1]=(T+49152+((s+t|0)>>>2)&65535)>>>l,k[n+(r+o<<1)>>1]=s>>>l,k[n+(r+c<<1)>>1]=t>>>l,k[n+(r+m<<1)>>1]=p,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function qs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Or(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,Or(t,U,n,s,o),y=T}function Zi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(o=y,y=y+176|0,n=o+152|0,m=o+16|0,a=o,!(r&1)){if(n=(r|0)/4|0,(r|0)>3){s=0;do m=t+(s<<2)|0,c=e[m>>2]|0,e[m>>2]=c>>>8&16711935|c<<8&-16711936,s=s+1|0;while((s|0)<(n|0))}if(!(r&3)){y=o;return}a=t+(r+-2)|0,m=t+(r+-1)|0,c=d[a>>0]|0,d[a>>0]=d[m>>0]|0,d[m>>0]=c,y=o;return}c=m+56|0,l=m+4|0,e[m>>2]=36160,e[c>>2]=36180,f=0,h0(62,m+56|0,l|0),o=f,f=0,o&1&&(m=b()|0,H0(c),r0(m|0)),e[m+128>>2]=0,e[m+132>>2]=-1,e[m>>2]=36200,e[m+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)n=b()|0;else{if(e[l>>2]=36236,o=m+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[m+52>>2]=16,e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,f=0,h0(63,l|0,n|0),t=f,f=0,t&1){m=b()|0,a0(n),a0(o),ce(l),n=m;break}a0(n),f=0,n=L0(28,m|0,49087,24)|0,t=f,f=0,!(t&1)&&(f=0,s=y0(36,n|0,r|0)|0,r=f,f=0,!(r&1))&&(f=0,L0(28,s|0,49112,20)|0,r=f,f=0,!(r&1))&&(t=de(16)|0,f=0,h0(64,a|0,l|0),r=f,f=0,r&1?n=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,t|0,1,35648,a|0),r=f,f=0,r&1?s=1:(f=0,d0(6,t|0,824,96),f=0,s=0),n=b()|0,a0(a),s||(a=n,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0))),ge(t|0),a=n,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0)}while(!1);m=n,H0(c),r0(m|0)}function b1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;A=t+4|0,l=e[A>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do o=e[l>>2]|0,c=B[r+(t*6|0)+2>>1]<>1]<>1]<>2)+16384|0,k[n+(t*6|0)>>1]=(a+32768+m&65535)>>>o,k[n+(t*6|0)+2>>1]=(m&65535)>>>o,k[n+(t*6|0)+4>>1]=(c+32768+m&65535)>>>o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do m=e[l>>2]|0,T=B[r+(t+o<<1)>>1]<>1]<>1]<>2)+16384|0,k[n+(t*6|0)>>1]=(D+32768+p&65535)>>>m,k[n+(t*6|0)+2>>1]=(p&65535)>>>m,k[n+(t*6|0)+4>>1]=(T+32768+p&65535)>>>m,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(m=(s|0)<(o|0)?s:o,(m|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do D=e[l>>2]|0,T=B[r+(a+o<<1)>>1]<>1]<>1]<>2)+16384|0,E=k[r+(a+t<<1)>>1]|0,V=pi((p&65535)>>>D&65535|0,0,16)|0,T=(T+32768+p&65535)>>>D|D0,E=pi(E&65535|0,0,48)|0,E=V|(U+32768+p&65535)>>>D&65535|E,T=T&65535|D0,D=n+(a<<3)|0,p=D,k[p>>1]=E,k[p+2>>1]=E>>>16,D=D+4|0,k[D>>1]=T,k[D+2>>1]=T>>>16,a=a+1|0;while((a|0)!=(m|0))}break}default:}while(!1);if(l=e[A>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;V=l+4|0,U=k[l>>1]|0,k[l>>1]=k[V>>1]|0,k[V>>1]=U,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function bs(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function Gs(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function zs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,G1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,G1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function Qs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Hs(t,o,r,n,s);return}else{o=t+52|0,Nr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Nr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;m=t+4|0,l=e[m>>2]|0;do if(!(d[l+32>>0]|0))A=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*6|0)|0,l=e[m>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){A=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;A=l+4|0,p=k[l>>1]|0,k[l>>1]=k[A>>1]|0,k[A>>1]=p,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;A=r,l=e[m>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,m=B[A+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>o&65535,k[n+(r*6|0)>>1]=(m+32768-t&65535)>>>o,k[n+(r*6|0)+2>>1]=(t&65535)>>>o,k[n+(r*6|0)+4>>1]=p,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=B[A+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,k[n+(r<<1)>>1]=(s+32768-t&65535)>>>l,k[n+(r+o<<1)>>1]=(t&65535)>>>l,k[n+(r+c<<1)>>1]=p,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,m=o*3|0,l=e[t+32>>2]|0,r=0;do p=k[A+(r<<3)+6>>1]|0,T=B[A+(r<<3)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,k[n+(r<<1)>>1]=(T+32768-s&65535)>>>l,k[n+(r+o<<1)>>1]=(s&65535)>>>l,k[n+(r+c<<1)>>1]=t,k[n+(r+m<<1)>>1]=p,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function Hs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Nr(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,Nr(t,U,n,s,o),y=T}function G1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;A=t+4|0,l=e[A>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do m=e[l>>2]|0,c=B[r+(t*6|0)+2>>1]<>1]<>1]<>>1)&65535)>>>m&65535,k[n+(t*6|0)>>1]=a>>>m,k[n+(t*6|0)+2>>1]=c>>>m,k[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do p=e[l>>2]|0,T=B[r+(t+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>p&65535,k[n+(t*6|0)>>1]=D>>>p,k[n+(t*6|0)+2>>1]=T>>>p,k[n+(t*6|0)+4>>1]=m,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(m=(s|0)<(o|0)?s:o,(m|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do p=e[l>>2]|0,D=B[r+(a+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>p,E=k[r+(a+t<<1)>>1]|0,D=pi(D>>>p&65535|0,0,16)|0,T=D0|T,E=pi(E&65535|0,0,48)|0,E=U>>>p&65535|D|E,T=T&65535|D0,D=n+(a<<3)|0,p=D,k[p>>1]=E,k[p+2>>1]=E>>>16,D=D+4|0,k[D>>1]=T,k[D+2>>1]=T>>>16,a=a+1|0;while((a|0)!=(m|0))}break}default:}while(!1);if(l=e[A>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,E=k[l>>1]|0,k[l>>1]=k[U>>1]|0,k[U>>1]=E,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Ys(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function js(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function Xs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,z1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,z1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function Ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Ws(t,o,r,n,s);return}else{o=t+52|0,Vr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Vr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;m=t+4|0,l=e[m>>2]|0;do if(!(d[l+32>>0]|0))A=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*6|0)|0,l=e[m>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){A=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;A=l+4|0,p=k[l>>1]|0,k[l>>1]=k[A>>1]|0,k[A>>1]=p,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;A=r,l=e[m>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,t=B[A+(r*6|0)+2>>1]<>1]<>>o&65535,k[n+(r*6|0)>>1]=((B[A+(r*6|0)>>1]<>>o,k[n+(r*6|0)+2>>1]=(t&65535)>>>o,k[n+(r*6|0)+4>>1]=p,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do t=B[A+(r*6|0)+2>>1]<>1]<>>l&65535,k[n+(r<<1)>>1]=((B[A+(r*6|0)>>1]<>>l,k[n+(r+o<<1)>>1]=(t&65535)>>>l,k[n+(r+c<<1)>>1]=p,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(c=(o|0)<(s|0)?o:s,(c|0)<=0))return;m=o<<1,a=o*3|0,l=e[t+32>>2]|0,r=0;do p=k[A+(r<<3)+6>>1]|0,s=B[A+(r<<3)+2>>1]<>1]<>>l&65535,k[n+(r<<1)>>1]=((B[A+(r<<3)>>1]<>>l,k[n+(r+o<<1)>>1]=(s&65535)>>>l,k[n+(r+m<<1)>>1]=t,k[n+(r+a<<1)>>1]=p,r=r+1|0;while((r|0)!=(c|0));return}default:return}}function Ws(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Vr(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,Vr(t,U,n,s,o),y=T}function z1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;A=t+4|0,l=e[A>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do m=e[l>>2]|0,c=B[r+(t*6|0)+2>>1]<>1]<>>m&65535,k[n+(t*6|0)>>1]=((B[r+(t*6|0)>>1]<>>m,k[n+(t*6|0)+2>>1]=(c&65535)>>>m,k[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do p=e[l>>2]|0,T=B[r+(t+o<<1)>>1]<>1]<>>p&65535,k[n+(t*6|0)>>1]=((B[r+(t<<1)>>1]<>>p,k[n+(t*6|0)+2>>1]=(T&65535)>>>p,k[n+(t*6|0)+4>>1]=m,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(m=(s|0)<(o|0)?s:o,(m|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do D=e[l>>2]|0,U=B[r+(a+o<<1)>>1]<>1]<>>D,p=(U+32768+(B[r+(a+c<<1)>>1]<>>D,E=k[r+(a+t<<1)>>1]|0,D=pi((U&65535)>>>D&65535|0,0,16)|0,p=p|D0,E=pi(E&65535|0,0,48)|0,E=D|T&65535|E,p=p&65535|D0,T=n+(a<<3)|0,D=T,k[D>>1]=E,k[D+2>>1]=E>>>16,T=T+4|0,k[T>>1]=p,k[T+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(m|0))}break}default:}while(!1);if(l=e[A>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,E=k[l>>1]|0,k[l>>1]=k[U>>1]|0,k[U>>1]=E,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Bt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0;if(T=y,y=y+16|0,A=T,p=e[t>>2]|0,!p)return t=0,y=T,t|0;if(D=r,c=s-D|0,m=o+12|0,a=e[m>>2]|0,c=(a|0)>(c|0)?a-c|0:0,a=n,o=a-D|0,(o|0)>0&&(ze[e[(e[p>>2]|0)+48>>2]&63](p,r,o)|0)!=(o|0))return e[t>>2]=0,D=0,y=T,D|0;do if((c|0)>0){if(f1(A,c,l),f=0,o=L0(e[(e[p>>2]|0)+48>>2]|0,p|0,(d[A>>0]&1?e[A+8>>2]|0:A+1|0)|0,c|0)|0,D=f,f=0,D&1&&(D=b()|0,a0(A),r0(D|0)),(o|0)==(c|0)){a0(A);break}return e[t>>2]=0,a0(A),D=0,y=T,D|0}while(!1);return s=s-a|0,(s|0)>0&&(ze[e[(e[p>>2]|0)+48>>2]&63](p,n,s)|0)!=(s|0)?(e[t>>2]=0,D=0,y=T,D|0):(e[m>>2]=0,D=p,y=T,D|0)}function Zs(t){t=t|0,e[t>>2]=36236,a0(t+32|0),ce(t)}function Js(t){t=t|0,e[t>>2]=36236,a0(t+32|0),ce(t),l0(t)}function $s(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(a=r+44|0,c=e[a>>2]|0,A=r+24|0,p=e[A>>2]|0,c>>>0

>>0&&(e[a>>2]=p,c=p),m=c,a=l&24,!a){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((o|0)==1&(a|0)==24){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}e:do switch(o|0){case 0:{a=0,o=0;break}case 1:if(l&8){o=(e[r+12>>2]|0)-(e[r+8>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}else{o=p-(e[r+20>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}case 2:{a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,o=c-a|0,a=o,o=((o|0)<0)<<31>>31;break}default:{r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}while(!1);if(o=Li(a|0,o|0,n|0,s|0)|0,n=D0,(n|0)>=0&&(a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,s=c-a|0,c=((s|0)<0)<<31>>31,!((c|0)<(n|0)|(c|0)==(n|0)&s>>>0>>0))){if(a=l&8,!((o|0)==0&(n|0)==0)){if(a|0&&!(e[r+12>>2]|0)){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((l&16|0)!=0&(p|0)==0){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}a&&(e[r+12>>2]=(e[r+8>>2]|0)+o,e[r+16>>2]=m),l&16&&(e[A>>2]=(e[r+20>>2]|0)+o),r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=o,e[r+4>>2]=n;return}r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function eo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=n+8|0,Vt[e[(e[r>>2]|0)+16>>2]&15](t,r,e[n>>2]|0,e[n+4>>2]|0,0,s)}function io(t){t=t|0;var r=0,n=0,s=0,o=0;return r=t+44|0,n=e[r>>2]|0,s=e[t+24>>2]|0,n>>>0>>0&&(e[r>>2]=s,n=s),!(e[t+48>>2]&8)||(o=t+16|0,r=e[o>>2]|0,s=t+12|0,r>>>0>>0?(s=e[s>>2]|0,e[o>>2]=n,r=n):s=e[s>>2]|0,s>>>0>=r>>>0)?(t=-1,t|0):(t=N[s>>0]|0,t|0)}function to(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(s=t+44|0,n=e[s>>2]|0,o=e[t+24>>2]|0,n>>>0>>0&&(e[s>>2]=o,n=o),c=t+8|0,s=e[c>>2]|0,m=t+12|0,l=e[m>>2]|0,a=s,s>>>0>=l>>>0)return t=-1,t|0;if((r|0)==-1)return e[c>>2]=s,e[m>>2]=l+-1,e[t+16>>2]=n,t=0,t|0;if(e[t+48>>2]&16)o=r&255,s=l+-1|0;else if(o=r&255,s=l+-1|0,o<<24>>24!=(d[s>>0]|0))return t=-1,t|0;return e[c>>2]=a,e[m>>2]=s,e[t+16>>2]=n,d[s>>0]=o,t=r,t|0}function ro(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;if(V=y,y=y+16|0,p=V,(r|0)==-1)return t=0,y=V,t|0;T=t+12|0,D=t+8|0,E=(e[T>>2]|0)-(e[D>>2]|0)|0,U=t+24|0,n=e[U>>2]|0,A=t+28|0,s=e[A>>2]|0;do if((n|0)==(s|0)){if(c=t+48|0,!(e[c>>2]&16))return t=-1,y=V,t|0;if(m=t+20|0,a=e[m>>2]|0,o=n-a|0,l=t+44|0,a=(e[l>>2]|0)-a|0,s=t+32|0,f=0,h0(67,s|0,0),n=f,f=0,!(n&1)&&(d[s>>0]&1?n=(e[s>>2]&-2)+-1|0:n=10,f=0,d0(8,s|0,n|0,0),n=f,f=0,!(n&1))){n=d[s>>0]|0,n&1?(s=e[t+40>>2]|0,n=e[t+36>>2]|0):(s=s+1|0,n=(n&255)>>>1),q=s+n|0,e[m>>2]=s,e[A>>2]=q,m=s+o|0,e[U>>2]=m,n=s+a|0,e[l>>2]=n,s=q;break}return q=b(0)|0,Qi(q|0)|0,Wi(),q=-1,y=V,q|0}else q=t+44|0,c=t+48|0,l=q,m=n,n=e[q>>2]|0;while(!1);return a=m+1|0,e[p>>2]=a,o=e[(a>>>0>>0?l:p)>>2]|0,e[l>>2]=o,e[c>>2]&8&&(n=t+32|0,d[n>>0]&1?n=e[t+40>>2]|0:n=n+1|0,e[D>>2]=n,e[T>>2]=n+E,e[t+16>>2]=o),(m|0)==(s|0)?(q=Ni[e[(e[t>>2]|0)+52>>2]&63](t,r&255)|0,y=V,q|0):(e[U>>2]=a,d[m>>0]=r,q=r&255,y=V,q|0)}function no(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,a0(t+36|0),ce(n),H0(r)}function so(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,a0(t+36|0),ce(n),H0(r),l0(t)}function oo(t){t=t|0;var r=0,n=0,s=0,o=0;o=e[(e[t>>2]|0)+-12>>2]|0,r=t+o|0,e[r>>2]=36200,n=t+(o+56)|0,e[n>>2]=36220,s=t+(o+4)|0,e[s>>2]=36236,a0(t+(o+36)|0),ce(s),H0(n),l0(r)}function lo(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function ao(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function fo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,Q1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,Q1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function uo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){co(t,o,r,n,s);return}else{o=t+40|0,Br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))m=r;else{if(t=t+8|0,ei(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){m=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;m=l+4|0,A=k[l>>1]|0,k[l>>1]=k[m>>1]|0,k[m>>1]=A,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;m=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do c=B[m+(l*6|0)+2>>1]|0,o=32768-c+(B[m+(l*6|0)+4>>1]|0)|0,A=(B[m+(l*6|0)>>1]|0)-c+32768|0,k[n+(l*6|0)>>1]=c+49152+(((o&65535)+(A&65535)|0)>>>2),k[n+(l*6|0)+2>>1]=o,k[n+(l*6|0)+4>>1]=A,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do c=B[m+(r*6|0)+2>>1]|0,s=32768-c+(B[m+(r*6|0)+4>>1]|0)|0,A=(B[m+(r*6|0)>>1]|0)-c+32768|0,k[n+(r<<1)>>1]=c+49152+(((s&65535)+(A&65535)|0)>>>2),k[n+(r+o<<1)>>1]=s,k[n+(r+t<<1)>>1]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do A=k[m+(a<<3)+6>>1]|0,p=B[m+(a<<3)+2>>1]|0,c=32768-p+(B[m+(a<<3)+4>>1]|0)|0,s=(B[m+(a<<3)>>1]|0)-p+32768|0,k[n+(a<<1)>>1]=p+49152+(((c&65535)+(s&65535)|0)>>>2),k[n+(a+o<<1)>>1]=c,k[n+(a+t<<1)>>1]=s,k[n+(a+r<<1)>>1]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Br(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,Br(t,U,n,s,o),y=T}function Q1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=B[r+(t*6|0)+2>>1]|0,a=B[r+(t*6|0)+4>>1]|0,o=(B[r+(t*6|0)>>1]|0)-((a+c|0)>>>2)+16384|0,k[n+(t*6|0)>>1]=a+32768+o,k[n+(t*6|0)+2>>1]=o,k[n+(t*6|0)+4>>1]=c+32768+o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do A=B[r+(a+o<<1)>>1]|0,p=B[r+(a+l<<1)>>1]|0,c=(B[r+(a<<1)>>1]|0)-((p+A|0)>>>2)+16384|0,k[n+(a*6|0)>>1]=p+32768+c,k[n+(a*6|0)+2>>1]=c,k[n+(a*6|0)+4>>1]=A+32768+c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do A=B[r+(a+o<<1)>>1]|0,T=B[r+(a+t<<1)>>1]|0,p=(B[r+(a<<1)>>1]|0)-((T+A|0)>>>2)+16384|0,D=k[r+(a+l<<1)>>1]|0,E=pi(p&65535|0,0,16)|0,A=A+32768+p|D0,D=pi(D&65535|0,0,48)|0,D=E|T+32768+p&65535|D,A=A&65535|D0,p=n+(a<<3)|0,T=p,k[T>>1]=D,k[T+2>>1]=D>>>16,p=p+4|0,k[p>>1]=A,k[p+2>>1]=A>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;E=t+4|0,D=k[t>>1]|0,k[t>>1]=k[E>>1]|0,k[E>>1]=D,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function ho(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function mo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function go(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,H1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,H1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Ao(t,o,r,n,s);return}else{o=t+40|0,qr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function qr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))m=r;else{if(t=t+8|0,ei(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){m=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;m=l+4|0,A=k[l>>1]|0,k[l>>1]=k[m>>1]|0,k[m>>1]=A,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;m=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=B[m+(l*6|0)>>1]|0,o=k[m+(l*6|0)+2>>1]|0,c=o&65535,A=(B[m+(l*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,k[n+(l*6|0)>>1]=a+32768-c,k[n+(l*6|0)+2>>1]=o,k[n+(l*6|0)+4>>1]=A,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=k[m+(r*6|0)+2>>1]|0,a=B[m+(r*6|0)>>1]|0,c=s&65535,A=(B[m+(r*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,k[n+(r<<1)>>1]=a+32768-c,k[n+(r+o<<1)>>1]=s,k[n+(r+t<<1)>>1]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=k[m+(a<<3)+2>>1]|0,A=k[m+(a<<3)+6>>1]|0,T=B[m+(a<<3)>>1]|0,p=c&65535,s=(B[m+(a<<3)+4>>1]|0)+32768-((p+T|0)>>>1)&65535,k[n+(a<<1)>>1]=T+32768-p,k[n+(a+o<<1)>>1]=c,k[n+(a+t<<1)>>1]=s,k[n+(a+r<<1)>>1]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Ao(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,qr(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,qr(t,U,n,s,o),y=T}function H1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=k[r+(t*6|0)+2>>1]|0,o=c&65535,a=(B[r+(t*6|0)>>1]|0)+32768+o|0,o=(B[r+(t*6|0)+4>>1]|0)+32768+(((a&65535)+o|0)>>>1)&65535,k[n+(t*6|0)>>1]=a,k[n+(t*6|0)+2>>1]=c,k[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do A=k[r+(a+o<<1)>>1]|0,c=A&65535,p=(B[r+(a<<1)>>1]|0)+32768+c|0,c=(B[r+(a+l<<1)>>1]|0)+32768+(((p&65535)+c|0)>>>1)&65535,k[n+(a*6|0)>>1]=p,k[n+(a*6|0)+2>>1]=A,k[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=k[r+(a+o<<1)>>1]|0,A=p&65535,T=(B[r+(a<<1)>>1]|0)+32768+A&65535,A=(B[r+(a+t<<1)>>1]|0)+32768+((T+A|0)>>>1)|0,D=k[r+(a+l<<1)>>1]|0,p=pi(p&65535|0,0,16)|0,A=D0|A,D=pi(D&65535|0,0,48)|0,D=T|p|D,A=A&65535|D0,p=n+(a<<3)|0,T=p,k[T>>1]=D,k[T+2>>1]=D>>>16,p=p+4|0,k[p>>1]=A,k[p+2>>1]=A>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;D=t+4|0,T=k[t>>1]|0,k[t>>1]=k[D>>1]|0,k[D>>1]=T,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function So(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function vo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function wo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,Y1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,Y1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function xo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Co(t,o,r,n,s);return}else{o=t+40|0,br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))m=r;else{if(t=t+8|0,ei(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){m=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;m=l+4|0,A=k[l>>1]|0,k[l>>1]=k[m>>1]|0,k[m>>1]=A,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;m=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=k[m+(l*6|0)+2>>1]|0,c=o&65535,A=32768-c+(B[m+(l*6|0)+4>>1]|0)&65535,k[n+(l*6|0)>>1]=(B[m+(l*6|0)>>1]|0)+32768-c,k[n+(l*6|0)+2>>1]=o,k[n+(l*6|0)+4>>1]=A,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=k[m+(r*6|0)+2>>1]|0,c=s&65535,A=32768-c+(B[m+(r*6|0)+4>>1]|0)&65535,k[n+(r<<1)>>1]=(B[m+(r*6|0)>>1]|0)+32768-c,k[n+(r+o<<1)>>1]=s,k[n+(r+t<<1)>>1]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=k[m+(a<<3)+2>>1]|0,A=k[m+(a<<3)+6>>1]|0,p=c&65535,s=32768-p+(B[m+(a<<3)+4>>1]|0)&65535,k[n+(a<<1)>>1]=(B[m+(a<<3)>>1]|0)+32768-p,k[n+(a+o<<1)>>1]=c,k[n+(a+t<<1)>>1]=s,k[n+(a+r<<1)>>1]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,br(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,br(t,U,n,s,o),y=T}function Y1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=k[r+(t*6|0)+2>>1]|0,a=c&65535,o=a+32768+(B[r+(t*6|0)+4>>1]|0)&65535,k[n+(t*6|0)>>1]=(B[r+(t*6|0)>>1]|0)+32768+a,k[n+(t*6|0)+2>>1]=c,k[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do A=k[r+(a+o<<1)>>1]|0,p=A&65535,c=p+32768+(B[r+(a+l<<1)>>1]|0)&65535,k[n+(a*6|0)>>1]=(B[r+(a<<1)>>1]|0)+32768+p,k[n+(a*6|0)+2>>1]=A,k[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=k[r+(a+o<<1)>>1]|0,A=p&65535,T=(B[r+(a<<1)>>1]|0)+32768+A|0,A=A+32768+(B[r+(a+t<<1)>>1]|0)|0,D=k[r+(a+l<<1)>>1]|0,p=pi(p&65535|0,0,16)|0,A=D0|A,D=pi(D&65535|0,0,48)|0,D=T&65535|p|D,A=A&65535|D0,p=n+(a<<3)|0,T=p,k[T>>1]=D,k[T+2>>1]=D>>>16,p=p+4|0,k[p>>1]=A,k[p+2>>1]=A>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;D=t+4|0,T=k[t>>1]|0,k[t>>1]=k[D>>1]|0,k[D>>1]=T,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function To(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s))}function yo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),s=e[t+8>>2]|0,!s){l0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),l0(s),l0(t)}function Do(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,j1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}m=t+4|0,l=n<<1,a=W(l,e[(e[m>>2]|0)+16>>2]|0)|0,c=t+20|0,j1(t,r,e[c>>2]|0,n,s),r=e[m>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),m=e[o>>2]|0,(ze[e[(e[m>>2]|0)+48>>2]&63](m,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,3,35648),m=f,f=0,m&1?(m=b()|0,ge(r|0),r0(m|0)):Ne(r|0,824,96))}function Io(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){ko(t,o,r,n,s);return}else{o=t+40|0,Gr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Gr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))m=r;else{if(t=t+8|0,ei(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){m=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;m=l+4|0,A=k[l>>1]|0,k[l>>1]=k[m>>1]|0,k[m>>1]=A,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;m=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=k[m+(l*6|0)+2>>1]|0,A=k[m+(l*6|0)+4>>1]|0,k[n+(l*6|0)>>1]=k[m+(l*6|0)>>1]|0,k[n+(l*6|0)+2>>1]=o,k[n+(l*6|0)+4>>1]=A,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=k[m+(r*6|0)+2>>1]|0,A=k[m+(r*6|0)+4>>1]|0,k[n+(r<<1)>>1]=k[m+(r*6|0)>>1]|0,k[n+(r+o<<1)>>1]=s,k[n+(r+t<<1)>>1]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=k[m+(a<<3)+2>>1]|0,s=k[m+(a<<3)+4>>1]|0,A=k[m+(a<<3)+6>>1]|0,k[n+(a<<1)>>1]=k[m+(a<<3)>>1]|0,k[n+(a+o<<1)>>1]=c,k[n+(a+t<<1)>>1]=s,k[n+(a+r<<1)>>1]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function ko(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;T=y,y=y+176|0,D=T+152|0,U=T+16|0,E=T,m=t+4|0,l=e[m>>2]|0,p=s<<1,a=W(p,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=ze[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){A=26;break}else a=a-l|0;if((A|0)==26){l=e[m>>2]|0;break}A=U+56|0,m=U+4|0,e[U>>2]=36160,e[A>>2]=36180,f=0,h0(62,U+56|0,m|0),T=f,f=0,T&1&&(U=b()|0,H0(A),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,m|0),T=f,f=0;do if(T&1)l=b()|0;else{if(e[m>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,f=0,h0(63,m|0,D|0),T=f,f=0,T&1){l=b()|0,a0(D),a0(r),ce(m);break}a0(D),f=0,l=L0(28,U|0,49029,57)|0,D=f,f=0,!(D&1)&&(f=0,y0(36,l|0,0)|0,D=f,f=0,!(D&1))&&(c=de(16)|0,f=0,h0(64,E|0,m|0),D=f,f=0,D&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,E|0),D=f,f=0,D&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(E),a||(E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0))),ge(c|0),E=l,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)),E=b()|0,e[U>>2]=36200,e[A>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(A),r0(E|0)}while(!1);U=l,H0(A),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Gr(t,U,n,s,o),y=T;return}Zi(e[a>>2]|0,W(p,e[l+16>>2]|0)|0),U=e[a>>2]|0,Gr(t,U,n,s,o),y=T}function j1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=k[r+(t*6|0)+2>>1]|0,o=k[r+(t*6|0)+4>>1]|0,k[n+(t*6|0)>>1]=k[r+(t*6|0)>>1]|0,k[n+(t*6|0)+2>>1]=c,k[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do A=k[r+(a+o<<1)>>1]|0,c=k[r+(a+l<<1)>>1]|0,k[n+(a*6|0)>>1]=k[r+(a<<1)>>1]|0,k[n+(a*6|0)+2>>1]=A,k[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do A=k[r+(a<<1)>>1]|0,D=k[r+(a+l<<1)>>1]|0,p=B[r+(a+t<<1)>>1]|0,T=pi(B[r+(a+o<<1)>>1]|0,0,16)|0,p=D0|p,D=pi(D&65535|0,0,48)|0,D=T|A&65535|D,p=p&65535|D0,A=n+(a<<3)|0,T=A,k[T>>1]=D,k[T+2>>1]=D>>>16,A=A+4|0,k[A>>1]=p,k[A+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;D=t+4|0,T=k[t>>1]|0,k[t>>1]=k[D>>1]|0,k[D>>1]=T,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function Eo(t){t=t|0}function Fo(t){t=t|0,l0(t)}function Mo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=W(e[t+8>>2]|0,n)|0,t=e[t+4>>2]|0,(ze[e[(e[t>>2]|0)+48>>2]&63](t,r,n)|0)!=(n|0)&&(s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Ne(s|0,824,96))}function _o(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;p=y,y=y+16|0,A=p,m=t+8|0,o=e[m>>2]|0,s=W(o,n)|0;do if(s){for(a=t+4|0,l=s;o=e[a>>2]|0,o=ze[e[(e[o>>2]|0)+32>>2]&63](o,r,l)|0,!!o;)if(s=l-o|0,(l|0)==(o|0)){c=11;break}else l=s;if((c|0)==11){o=e[m>>2]|0,l=s;break}s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Ne(s|0,824,96)}else l=0;while(!1);if((o|0)==2&&(Zi(r,n<<1),o=e[m>>2]|0),s=e[t+12>>2]|0,(s|0)<=(W(o,n)|0)){y=p;return}t=e[t+4>>2]|0,Vt[e[(e[t>>2]|0)+16>>2]&15](A,t,s-l|0,0,1,24),y=p}function Ro(t){t=t|0,l0(t)}function Po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ei(e[s>>2]|0,r|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Lo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ei(r|0,e[s>>2]|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Hi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;e[t+112>>2]=0,e[t+108>>2]=0,A=e[r>>2]|0,o=A;do if(A)if(a=t+92|0,A=t+96|0,c=e[A>>2]|0,m=e[a>>2]|0,n=m,s=c-n|0,s>>>0>=4e4?(s>>>0>4e4&&(l=m+4e4|0,(c|0)!=(l|0))&&(e[A>>2]=l),l=n):(St(a,4e4-s|0),l=e[a>>2]|0,o=e[r>>2]|0),n=t+116|0,e[n>>2]=l,c=t+124|0,e[c>>2]=l,m=t+104|0,e[m>>2]=o,s=o,o){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(r=(Se[e[(e[o>>2]|0)+36>>2]&127](s)|0)==-1,s=e[c>>2]|0,r)break;o=e[n>>2]|0}else s=l,o=l;if(a=s-o|0,a>>>0<=64){if(l=t+92|0,(s|0)==(o|0))s=o;else{s=o,o=0;do d[(e[l>>2]|0)+o>>0]=d[s+o>>0]|0,o=o+1|0,s=e[n>>2]|0;while(o>>>0>>0);o=e[c>>2]|0}l=e[l>>2]|0,r=l,p=r-s|0,e[n>>2]=l,s=o+p|0,e[c>>2]=s,l=t+120|0,e[l>>2]=(e[l>>2]|0)+p,m=e[m>>2]|0,s=ze[e[(e[m>>2]|0)+32>>2]&63](m,s,(e[A>>2]|0)-(r+a)|0)|0,s=(e[c>>2]|0)+s|0,e[c>>2]=s}}else s=l;else e[t+104>>2]=0,s=e[r+4>>2]|0,n=t+116|0,e[n>>2]=s,s=s+(e[r+8>>2]|0)|0,e[t+124>>2]=s;while(!1);if(n=e[n>>2]|0,n>>>0>=s>>>0){A=n,p=t+120|0,e[p>>2]=A,_i(t);return}for(;;){if((d[n>>0]|0)==-1){s=20;break}if(n=n+1|0,n>>>0>=s>>>0){s=20;break}}if((s|0)==20){p=t+120|0,e[p>>2]=n,_i(t);return}}function St(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(m=t+8|0,o=e[m>>2]|0,A=t+4|0,n=e[A>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[A>>2]|0)+1|0,e[A>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[m>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[A>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[A>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[A>>2]|0)-r|0,c=a+(l-s)|0,ei(c|0,r|0,s|0)|0,e[t>>2]=c,e[A>>2]=n,e[m>>2]=o,r&&l0(r)}function X1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,q=O,E=t+180|0,U=(e[E>>2]|0)+4|0,(e[t+32>>2]|0)==1?V=e[t+24>>2]|0:V=1,r=W(V<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),R=f,f=0,R&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,R=f,f=0,!(R&1))){e[F>>2]=s,R=s+(r<<1)|0,e[F+8>>2]=R,je(s|0,0,n|0)|0,e[M>>2]=R;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[q>>2]=0,R=q+4|0,e[R>>2]=0,e[q+8>>2]=0;do if(!V)a=18;else{if(V>>>0>1073741823&&(f=0,n0(178,q|0),D=f,f=0,D&1)||(a=16),(a|0)==16&&(o=V<<2,f=0,l=u0(67,o|0)|0,D=f,f=0,!(D&1))){e[q>>2]=l,a=l+(V<<2)|0,e[q+8>>2]=a,je(l|0,0,o|0)|0,e[R>>2]=a,a=18;break}s=b()|0,r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4604|0,c=(W(V,U)|0)+1|0,m=t+4608|0,A=t+92|0,p=(V|0)>0,T=t+4600|0,D=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[m>>2]=n,D&1?(e[a>>2]=n,e[m>>2]=r):r=n,o=e[A>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[E>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(p){r=e[a>>2]|0,n=e[m>>2]|0,s=e[q>>2]|0,o=0;do{if(e[T>>2]=e[s+(o<<2)>>2],s=e[E>>2]|0,k[r+(s<<1)>>1]=k[r+(s+-1<<1)>>1]|0,k[n+-2>>1]=k[r>>1]|0,f=0,h0(68,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[q>>2]|0,e[s+(o<<2)>>2]=e[T>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[m>>2]|0)+(U<<1)|0,e[m>>2]=n,o=o+1|0}while((o|0)<(V|0))}if(D=D+1|0,(D|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[q>>2]|0,n=r,r&&(s=e[R>>2]|0,(s|0)!=(r|0)&&(e[R>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=O;return}while(!1);r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function Uo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4604|0,r=e[T>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(D=t+4608|0,E=t+4612|0,o=r,l=B[r+-2>>1]|0,r=B[r>>1]|0,p=0;A=e[D>>2]|0,m=B[A+(p+-1<<1)>>1]|0,s=p+1|0,n=B[o+(s<<1)>>1]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=No(t,c,B[A+(p<<1)>>1]|0,o,0)|0,k[(e[D>>2]|0)+(p<<1)>>1]=A):(s=(Vo(t,p,0)|0)+p|0,n=e[T>>2]|0,r=B[n+(s+-1<<1)>>1]|0,n=B[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Oo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;o=t+104|0,(e[o>>2]|0)>>>0<4&&Jt(t),l=t+100|0,a=t+112|0,c=t+96|0,m=t+108|0,A=t+116|0,r=e[l>>2]|0,s=0;do{if(n=d[a>>0]|0,(r|0)>31)break;r=e[c>>2]|0,n<<24>>24?(d[e[m>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[m>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,p=e[m>>2]|0,n=(d[p>>0]|0)==-1&1,d[a>>0]=n,e[m>>2]=p+1,e[o>>2]=(e[o>>2]|0)+-1,e[A>>2]=(e[A>>2]|0)+1,s=s+1|0}while((s|0)<4);n<<24>>24?Te(t,0,(r+-1|0)%8|0):Te(t,0,(r|0)%8|0),(e[o>>2]|0)>>>0<4&&Jt(t),r=e[l>>2]|0,n=0;do{if((r|0)>31)break;r=e[c>>2]|0,d[a>>0]|0?(d[e[m>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[m>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,p=e[m>>2]|0,d[a>>0]=(d[p>>0]|0)==-1&1,e[m>>2]=p+1,e[o>>2]=(e[o>>2]|0)+-1,e[A>>2]=(e[A>>2]|0)+1,n=n+1|0}while((n|0)<4);e[t+132>>2]|0&&Jt(t)}function Jt(t){t=t|0;var r=0,n=0,s=0,o=0,l=0;if(r=e[t+132>>2]|0,r||(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,4,35648),t=f,f=0,t&1||Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),n=t+108|0,s=t+120|0,l=e[s>>2]|0,o=(e[n>>2]|0)-l|0,(ze[e[(e[r>>2]|0)+48>>2]&63](r,l,o)|0)==(o|0)){l=e[s>>2]|0,e[n>>2]=l,e[t+104>>2]=(e[t+124>>2]|0)-l;return}r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,4,35648),l=f,f=0,l&1||Ne(r|0,824,96),l=b()|0,ge(r|0),r0(l|0)}function Te(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(A=t+100|0,n=(e[A>>2]|0)-n|0,e[A>>2]=n,(n|0)>-1){p=t+96|0,e[p>>2]=e[p>>2]|r<>2]=e[p>>2]|r>>0-n,m=t+104|0,(e[m>>2]|0)>>>0<4&&(Jt(t),n=e[A>>2]|0),l=t+112|0,a=t+108|0,c=t+116|0,s=0;!((n|0)>31);)if(n=e[p>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[p>>2]=e[p>>2]<<7,n=(e[A>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[p>>2]=e[p>>2]<<8,n=(e[A>>2]|0)+8|0),e[A>>2]=n,T=e[a>>2]|0,d[l>>0]=(d[T>>0]|0)==-1&1,e[a>>2]=T+1,e[m>>2]=(e[m>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0,(s|0)>=4){o=11;break}e:do if((o|0)==11&&(n|0)<0){e[p>>2]=e[p>>2]|r>>0-n,(e[m>>2]|0)>>>0<4&&(Jt(t),n=e[A>>2]|0),s=0;do{if((n|0)>31)break e;n=e[p>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[p>>2]=e[p>>2]<<7,n=(e[A>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[p>>2]=e[p>>2]<<8,n=(e[A>>2]|0)+8|0),e[A>>2]=n,T=e[a>>2]|0,d[l>>0]=(d[T>>0]|0)==-1&1,e[a>>2]=T+1,e[m>>2]=(e[m>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0}while((s|0)<4)}while(!1);e[p>>2]=e[p>>2]|r<>31,l=(V^r)-V|0,E=t+196+(l*12|0)+10|0,a=k[E>>1]|0,D=t+196+(l*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^V)-V+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?A=o:A=s&~(o>>31),o=(n-A^V)-V|0,m=t+144|0,s=e[m>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,T=t+140|0,c=e[T>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,W1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[D>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[m>>2]<<1|1,c)|0)|0,n=k[E>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[D>>2]=r,s=n+1|0,k[E>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,E=k[p>>1]|0,k[p>>1]=(E<<16>>16<127&1)+(E&65535),o=(o|0)>0?0:o):(o=k[p>>1]|0,k[p>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[m>>2]|0,n=s<<1|1,r=(W(n,(c^V)-V|0)|0)+A|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[T>>2]|0,n)|0)|0)):(r=(W(e[T>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(V=r,V=V&65535,V|0):(V=o&~(r>>31),V=V&65535,V|0)}function Vo(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;for(m=(e[t+180>>2]|0)-r|0,A=e[t+4608>>2]|0,p=e[t+4604>>2]|0,o=k[A+(r+-1<<1)>>1]|0,c=o&65535,n=e[t+144>>2]|0,l=0;s=A+(l+r<<1)|0,a=(B[s>>1]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(n|0));)if(k[s>>1]=o,l=l+1|0,(l|0)==(m|0)){l=m;break}if(o=(l|0)==(m|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do Te(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,c,B[p+(m<<1)>>1]|0)|0,k[r>>1]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Bo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;return c=n-s|0,m=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[m>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[m>>2]|0),(o&r|0)==(o|0)?(m=o,m=m&65535,m|0):(m=r&~(o>>31),m=m&65535,m|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[m>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[m>>2]|0),(o&r|0)==(o|0)?(m=o,m=m&65535,m|0):(m=r&~(o>>31),m=m&65535,m|0))}function K1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,W1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function W1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-31-(e[l>>2]|0)|0)):Te(t,1,a),r=e[l>>2]|0,Te(t,(1<>2]|0,m=t+120|0,r>>>0<((e[m>>2]|0)+-3|0)>>>0){m=t+112|0,a=e[m>>2]|0,t=t+108|0,e[t>>2]=(N[r+1>>0]<<16|N[r>>0]<<24|N[r+2>>0]<<8|N[r+3>>0])>>>a|e[t>>2],t=32-a>>3,e[c>>2]=r+t,e[m>>2]=(t<<3)+a;return}a=t+104|0,n=e[a>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if((Se[e[(e[n>>2]|0)+36>>2]&127](n)|0)==-1)break;r=e[c>>2]|0}if(o=t+124|0,n=e[o>>2]|0,l=n-r|0,l>>>0<=64){if(s=t+92|0,(n|0)==(r|0))n=r;else{n=0;do d[(e[s>>2]|0)+n>>0]=d[r+n>>0]|0,n=n+1|0,r=e[c>>2]|0;while(n>>>0>>0);n=r,r=e[o>>2]|0}p=e[s>>2]|0,s=p,A=s-n|0,e[c>>2]=p,n=r+A|0,e[o>>2]=n,e[m>>2]=(e[m>>2]|0)+A,a=e[a>>2]|0,a=ze[e[(e[a>>2]|0)+32>>2]&63](a,n,(e[t+96>>2]|0)-(s+l)|0)|0,e[o>>2]=(e[o>>2]|0)+a}}while(!1);for(a=t+112|0,l=t+108|0,t=e[t+124>>2]|0,o=t+-1|0,r=e[c>>2]|0;;){if(r>>>0>=t>>>0){n=14;break}if(s=d[r>>0]|0,n=s&255,s=s<<24>>24==-1,s){if((r|0)==(o|0)){n=25;break}if(r=r+1|0,(d[r>>0]|0)<0){n=25;break}}else r=r+1|0;if(p=e[a>>2]|0,e[l>>2]=n<<24-p|e[l>>2],e[c>>2]=r,p=p+(s?7:8)|0,e[a>>2]=p,(p|0)>=24){n=33;break}}if((n|0)==14){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,5,35648),p=f,f=0,p&1||Ne(r|0,824,96),p=b()|0,ge(r|0),r0(p|0)}else if((n|0)==25){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,5,35648),p=f,f=0,p&1||Ne(r|0,824,96),p=b()|0,ge(r|0),r0(p|0)}else if((n|0)==33){e:do if(r>>>0>>0)do{if((d[r>>0]|0)==-1)break e;r=r+1|0}while(r>>>0>>0);while(!1);e[m>>2]=r;return}}function qo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+144|0;e:do if(e[T>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4612>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4612>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4612>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4612>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4616|0,s=p<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4612|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+192|0,m=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function Yi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(m=t+8|0,o=e[m>>2]|0,A=t+4|0,n=e[A>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[A>>2]|0)+1|0,e[A>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[m>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[A>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[A>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[A>>2]|0)-r|0,c=a+(l-s)|0,ei(c|0,r|0,s|0)|0,e[t>>2]=c,e[A>>2]=n,e[m>>2]=o,r&&l0(r)}function bo(t){t=t|0;var r=0,n=0;e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Go(t){t=t|0;var r=0,n=0;if(e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function zo(t){t=t|0;var r=0,n=0;e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qo(t){t=t|0;var r=0,n=0;if(e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Ho(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+184>>2]=c|0?c:e[m+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Zo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,k[t+196+(l*12|0)+8>>1]=0,k[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=m,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=m,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function Yo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35828,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,Z1(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],Z1(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function jo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Z1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;q=y,y=y+32|0,R=q+12|0,V=q,D=t+180|0,E=(e[D>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,E)|0,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,R|0),O=f,f=0,O&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[R>>2]=n,s=n+(r*6|0)|0,e[R+8>>2]=s;k[n>>1]=0,k[n+2>>1]=0,k[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[F>>2]=s;break}s=b()|0,r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),r0(s|0)}while(!1);e[V>>2]=0,O=V+4|0,e[O>>2]=0,e[V+8>>2]=0;do if(!U)a=20;else{if(U>>>0>1073741823&&(f=0,n0(178,V|0),T=f,f=0,T&1)||(a=18),(a|0)==18&&(o=U<<2,f=0,l=u0(67,o|0)|0,T=f,f=0,!(T&1))){e[V>>2]=l,a=l+(U<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[O>>2]=a,a=20;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==20){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,E)|0)+1|0,c=t+4608|0,m=t+92|0,A=(U|0)>0,p=t+4600|0,T=0;i:for(;;){if(n=e[R>>2]|0,r=n+6|0,e[l>>2]=r,n=n+(a*6|0)|0,e[c>>2]=n,T&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[m>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[D>>2]|0,E|0),s=f,f=0,s&1){a=30;break}if(A){r=e[V>>2]|0,n=e[l>>2]|0,s=0;do{if(e[p>>2]=e[r+(s<<2)>>2],M=e[D>>2]|0,r=n+(M*6|0)|0,n=n+((M+-1|0)*6|0)|0,k[r>>1]=k[n>>1]|0,k[r+2>>1]=k[n+2>>1]|0,k[r+4>>1]=k[n+4>>1]|0,n=(e[c>>2]|0)+-6|0,r=e[l>>2]|0,k[n>>1]=k[r>>1]|0,k[n+2>>1]=k[r+2>>1]|0,k[n+4>>1]=k[r+4>>1]|0,f=0,h0(69,t|0,0),n=f,f=0,n&1){a=29;break i}r=e[V>>2]|0,e[r+(s<<2)>>2]=e[p>>2],n=(e[l>>2]|0)+(E*6|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(E*6|0),s=s+1|0}while((s|0)<(U|0))}if(T=T+1|0,(T|0)>=(e[o>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[R>>2]|0,!r){y=q;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),y=q;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),r0(s|0)}function Xo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(J=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[J>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=B[a+(K*6|0)>>1]|0,X=e[w0>>2]|0,c=B[a+(F*6|0)>>1]|0,m=o-c|0,A=B[l+(F*6|0)>>1]|0,p=c-A|0,T=((((d[X+((B[a+(r*6|0)>>1]|0)-o)>>0]|0)*9|0)+(d[X+m>>0]|0)|0)*9|0)+(d[X+p>>0]|0)|0,s=B[a+(K*6|0)+2>>1]|0,D=B[a+(F*6|0)+2>>1]|0,E=s-D|0,U=B[l+(F*6|0)+2>>1]|0,V=D-U|0,q=((((d[X+((B[a+(r*6|0)+2>>1]|0)-s)>>0]|0)*9|0)+(d[X+E>>0]|0)|0)*9|0)+(d[X+V>>0]|0)|0,n=B[a+(K*6|0)+4>>1]|0,O=B[a+(F*6|0)+4>>1]|0,R=n-O|0,F=B[l+(F*6|0)+4>>1]|0,M=O-F|0,X=((((d[X+((B[a+(r*6|0)+4>>1]|0)-n)>>0]|0)*9|0)+(d[X+R>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,q|T|X?(a=B[l+(K*6|0)>>1]|0,l=o-A>>31,(l^p|0)>=0&&((l^m|0)<0?o=A:o=A-c+o|0),a=zr(t,T,a,o,0)|0,l=B[(e[J>>2]|0)+(K*6|0)+2>>1]|0,o=s-U>>31,(o^V|0)>=0&&((o^E|0)<0?s=U:s=U-D+s|0),o=zr(t,q,l,s,0)|0,l=B[(e[J>>2]|0)+(K*6|0)+4>>1]|0,s=n-F>>31,(s^M|0)>=0&&((s^R|0)<0?n=F:n=F-O+n|0),M=zr(t,X,l,n,0)|0,X=e[J>>2]|0,k[X+(K*6|0)>>1]=a,k[X+(K*6|0)+2>>1]=o,k[X+(K*6|0)+4>>1]=M):r=(Ko(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Ko(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0;for(t0=y,y=y+48|0,E=t0+30|0,D=t0+24|0,T=t0+18|0,U=t0+12|0,F=t0+6|0,M=t0,X=(e[t+180>>2]|0)-r|0,K=e[t+4608>>2]|0,V=e[t+4604>>2]|0,R=r+-1|0,q=k[K+(R*6|0)>>1]|0,O=k[K+(R*6|0)+2>>1]|0,R=k[K+(R*6|0)+4>>1]|0,n=q&65535,s=t+144|0,o=O&65535,l=R&65535,p=0;m=p+r|0,a=K+(m*6|0)|0,c=K+(m*6|0)+2|0,m=K+(m*6|0)+4|0,J=(B[a>>1]|0)-n|0,A=e[s>>2]|0,!((((J|0)>-1?J:0-J|0)|0)>(A|0)||(J=(B[c>>1]|0)-o|0,(((J|0)>-1?J:0-J|0)|0)>(A|0))||(J=(B[m>>1]|0)-l|0,(((J|0)>-1?J:0-J|0)|0)>(A|0)));)if(k[a>>1]=q,k[c>>1]=O,k[m>>1]=R,p=p+1|0,(p|0)==(X|0)){p=X;break}if(o=(p|0)==(X|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(p|0))n=p;else{n=p;do Te(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]=k[J>>1]|0,k[F+2>>1]=k[J+2>>1]|0,k[F+4>>1]=k[J+4>>1]|0,k[M>>1]=q,k[M+2>>1]=O,k[M+4>>1]=R,r=V+(r*6|0)|0,k[T>>1]=k[F>>1]|0,k[T+2>>1]=k[F+2>>1]|0,k[T+4>>1]=k[F+4>>1]|0,k[D>>1]=k[M>>1]|0,k[D+2>>1]=k[M+2>>1]|0,k[D+4>>1]=k[M+4>>1]|0,k[E>>1]=k[r>>1]|0,k[E+2>>1]=k[r+2>>1]|0,k[E+4>>1]=k[r+4>>1]|0,Wo(U,t,T,D,E),k[J>>1]=k[U>>1]|0,k[J+2>>1]=k[U+2>>1]|0,k[J+4>>1]=k[U+4>>1]|0,J=e[l>>2]|0,e[l>>2]=(J|0)<1?0:J+-1|0,J=p+1|0,y=t0,J|0)}function zr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(V=r>>31,l=(V^r)-V|0,E=t+196+(l*12|0)+10|0,a=k[E>>1]|0,D=t+196+(l*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^V)-V+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?A=o:A=s&~(o>>31),o=(n-A^V)-V|0,m=t+144|0,s=e[m>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,T=t+140|0,c=e[T>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,J1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[D>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[m>>2]<<1|1,c)|0)|0,n=k[E>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[D>>2]=r,s=n+1|0,k[E>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,E=k[p>>1]|0,k[p>>1]=(E<<16>>16<127&1)+(E&65535),o=(o|0)>0?0:o):(o=k[p>>1]|0,k[p>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[m>>2]|0,n=s<<1|1,r=(W(n,(c^V)-V|0)|0)+A|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[T>>2]|0,n)|0)|0)):(r=(W(e[T>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(V=r,V=V&65535,V|0):(V=o&~(r>>31),V=V&65535,V|0)}function J1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-31-(e[l>>2]|0)|0)):Te(t,1,a),r=e[l>>2]|0,Te(t,(1<>1]|0,D=T-(B[s>>1]|0)>>31|1,l=W(D,(B[n>>1]|0)-T|0)|0,A=r+144|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,m=e[F>>2]|0,c=((l|0)<0?m:0)+l|0,m=c-((c|0)<((m+1|0)/2|0|0)?0:m)|0,c=r+4576|0,Qr(r,c,m),q=B[o+2>>1]|0,O=q-(B[s+2>>1]|0)>>31|1,l=W(O,(B[n+2>>1]|0)-q|0)|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,E=e[F>>2]|0,R=((l|0)<0?E:0)+l|0,E=R-((R|0)<((E+1|0)/2|0|0)?0:E)|0,Qr(r,c,E),R=B[o+4>>1]|0,V=R-(B[s+4>>1]|0)>>31|1,l=W(V,(B[n+4>>1]|0)-R|0)|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,p=e[F>>2]|0,l=((l|0)<0?p:0)+l|0,p=l-((l|0)<((p+1|0)/2|0|0)?0:p)|0,Qr(r,c,p),c=e[A>>2]|0,A=c<<1|1,l=(W(W(A,m)|0,D)|0)+T|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0),s=a):(l=(W(e[F>>2]|0,A)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&65535,l=(W(W(A,E)|0,O)|0)+q|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0):l=(W(e[F>>2]|0,A)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&65535,l=(W(W(A,p)|0,V)|0)+R|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0):l=(W(e[F>>2]|0,A)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&65535,k[t>>1]=o,R=t+2|0,k[R>>1]=a,t=t+4|0,k[t>>1]=F;return}F=s&~(l>>31),F=F&65535,k[t>>1]=o,R=t+2|0,k[R>>1]=a,t=t+4|0,k[t>>1]=F}function Qr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,J1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function Zo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+144|0;e:do if(e[T>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4612>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4612>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4612>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4612>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4616|0,s=p<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4612|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+192|0,m=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function Jo(t){t=t|0;var r=0,n=0;e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $o(t){t=t|0;var r=0,n=0;if(e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function el(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+184>>2]=c|0?c:e[m+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Rl(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,k[t+196+(l*12|0)+8>>1]=0,k[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=m,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=m,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35800,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,r2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],r2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function tl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function rl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;e[t>>2]=36712,e[t+4>>2]=n,p=t+8|0,s=e[n>>2]|0,m=n+16|0,a=e[m>>2]|0,l=W(a,s)|0,e[p>>2]=0,T=t+12|0,e[T>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,p|0),a=f,f=0,a&1)||(A=4),(A|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[T>>2]=c,e[p>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[T>>2]|0)+1|0,e[T>>2]=s,l=l+-1|0;while(l|0);l=e[m>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[p>>2]|0,o&&((e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o)),T=s,r0(T|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(A=15),(A|0)==15&&(f=0,o=u0(67,s|0)|0,A=f,f=0,!(A&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),l0(o)),o=e[p>>2]|0,o||(T=s,r0(T|0)),(e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o),T=s,r0(T|0)}function nl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;e[t>>2]=36688,e[t+4>>2]=n,p=t+8|0,s=e[n>>2]|0,m=n+16|0,a=e[m>>2]|0,l=W(a,s)|0,e[p>>2]=0,T=t+12|0,e[T>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,p|0),a=f,f=0,a&1)||(A=4),(A|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[T>>2]=c,e[p>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[T>>2]|0)+1|0,e[T>>2]=s,l=l+-1|0;while(l|0);l=e[m>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[p>>2]|0,o&&((e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o)),T=s,r0(T|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(A=15),(A|0)==15&&(f=0,o=u0(67,s|0)|0,A=f,f=0,!(A&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),l0(o)),o=e[p>>2]|0,o||(T=s,r0(T|0)),(e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o),T=s,r0(T|0)}function sl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;e[t>>2]=36664,e[t+4>>2]=n,p=t+8|0,s=e[n>>2]|0,m=n+16|0,a=e[m>>2]|0,l=W(a,s)|0,e[p>>2]=0,T=t+12|0,e[T>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,p|0),a=f,f=0,a&1)||(A=4),(A|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[T>>2]=c,e[p>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[T>>2]|0)+1|0,e[T>>2]=s,l=l+-1|0;while(l|0);l=e[m>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[p>>2]|0,o&&((e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o)),T=s,r0(T|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(A=15),(A|0)==15&&(f=0,o=u0(67,s|0)|0,A=f,f=0,!(A&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),l0(o)),o=e[p>>2]|0,o||(T=s,r0(T|0)),(e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o),T=s,r0(T|0)}function ol(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;e[t>>2]=36640,e[t+4>>2]=n,p=t+8|0,s=e[n>>2]|0,m=n+16|0,a=e[m>>2]|0,l=W(a,s)|0,e[p>>2]=0,T=t+12|0,e[T>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,p|0),a=f,f=0,a&1)||(A=4),(A|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[T>>2]=c,e[p>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[T>>2]|0)+1|0,e[T>>2]=s,l=l+-1|0;while(l|0);l=e[m>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[p>>2]|0,o&&((e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o)),T=s,r0(T|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(A=15),(A|0)==15&&(f=0,o=u0(67,s|0)|0,A=f,f=0,!(A&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);T=t+36|0,e[T>>2]=e[r>>2],e[T+4>>2]=e[r+4>>2],e[T+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),l0(o)),o=e[p>>2]|0,o||(T=s,r0(T|0)),(e[T>>2]|0)!=(o|0)&&(e[T>>2]=o),l0(o),T=s,r0(T|0)}function ll(t){t=t|0;var r=0,n=0;e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),l0(n))}function al(t){t=t|0;var r=0,n=0;if(e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),r=e[t+8>>2]|0,!r){l0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r),l0(t)}function ul(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,$1(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,$1(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(ze[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Ne(o|0,824,96))}function cl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){hl(t,o,r,n,s);return}else{o=t+40|0,Hr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Hr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;m=l+2|0,A=d[l>>0]|0,d[l>>0]=d[m>>0]|0,d[m>>0]=A,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=N[c+(l*3|0)+1>>0]|0,o=128-a+(N[c+(l*3|0)+2>>0]|0)|0,m=(N[c+(l*3|0)>>0]|0)-a+128|0,A=n+(l*3|0)|0,d[A>>0]=a+192+(((o&255)+(m&255)|0)>>>2),d[A+1>>0]=o,d[A+2>>0]=m,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=N[c+(r*3|0)+1>>0]|0,m=128-s+(N[c+(r*3|0)+2>>0]|0)|0,A=(N[c+(r*3|0)>>0]|0)-s+128|0,d[n+r>>0]=s+192+(((m&255)+(A&255)|0)>>>2),d[n+(r+o)>>0]=m,d[n+(r+t)>>0]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do A=d[c+(a<<2)+3>>0]|0,p=N[c+(a<<2)+1>>0]|0,s=128-p+(N[c+(a<<2)+2>>0]|0)|0,m=(N[c+(a<<2)>>0]|0)-p+128|0,d[n+a>>0]=p+192+(((s&255)+(m&255)|0)>>>2),d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=m,d[n+(a+r)>>0]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function hl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+176|0,T=p+152|0,E=p+16|0,D=p,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,m=t+20|0,l=e[m>>2]|0,!a){E=l,Hr(t,E,n,s,o),y=p;return}for(;c=ze[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[m>>2]|0,(a|0)==(c|0)){A=26;break}else a=a-c|0;if((A|0)==26){Hr(t,l,n,s,o),y=p;return}n=E+56|0,m=E+4|0,e[E>>2]=36160,e[n>>2]=36180,f=0,h0(62,E+56|0,m|0),p=f,f=0,p&1&&(E=b()|0,H0(n),r0(E|0)),e[E+128>>2]=0,e[E+132>>2]=-1,e[E>>2]=36200,e[E+56>>2]=36220,f=0,n0(180,m|0),p=f,f=0;do if(p&1)l=b()|0;else{if(e[m>>2]=36236,r=E+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[E+52>>2]=16,e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,f=0,h0(63,m|0,T|0),p=f,f=0,p&1){l=b()|0,a0(T),a0(r),ce(m);break}a0(T),f=0,l=L0(28,E|0,49029,57)|0,T=f,f=0,!(T&1)&&(f=0,y0(36,l|0,0)|0,T=f,f=0,!(T&1))&&(c=de(16)|0,f=0,h0(64,D|0,m|0),T=f,f=0,T&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,D|0),T=f,f=0,T&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(D),a||(D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0))),ge(c|0),D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)),D=b()|0,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)}while(!1);E=l,H0(n),r0(E|0)}function $1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=N[r+(t*3|0)+1>>0]|0,l=N[r+(t*3|0)+2>>0]|0,c=(N[r+(t*3|0)>>0]|0)-((l+a|0)>>>2)+64|0,o=n+(t*3|0)|0,d[o>>0]=l+128+c,d[o+1>>0]=c,d[o+2>>0]=a+128+c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=N[r+(a+o)>>0]|0,T=N[r+(a+l)>>0]|0,A=(N[r+a>>0]|0)-((T+p|0)>>>2)+64|0,c=n+(a*3|0)|0,d[c>>0]=T+128+A,d[c+1>>0]=A,d[c+2>>0]=p+128+A,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do A=N[r+(a+o)>>0]|0,D=N[r+(a+t)>>0]|0,p=(N[r+a>>0]|0)-((D+A|0)>>>2)+64|0,T=n+(a<<2)|0,p=p<<8&65280|N[r+(a+l)>>0]<<24|D+128+p&255|A+128+p<<16&16711680,d[T>>0]=p,d[T+1>>0]=p>>8,d[T+2>>0]=p>>16,d[T+3>>0]=p>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;D=t+2|0,T=d[t>>0]|0,d[t>>0]=d[D>>0]|0,d[D>>0]=T,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function ml(t){t=t|0;var r=0,n=0;e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),l0(n))}function dl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),r=e[t+8>>2]|0,!r){l0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r),l0(t)}function pl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,e2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,e2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(ze[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Ne(o|0,824,96))}function Al(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Sl(t,o,r,n,s);return}else{o=t+40|0,Yr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Yr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;m=l+2|0,A=d[l>>0]|0,d[l>>0]=d[m>>0]|0,d[m>>0]=A,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do r=N[c+(l*3|0)>>0]|0,o=d[c+(l*3|0)+1>>0]|0,a=o&255,m=(N[c+(l*3|0)+2>>0]|0)+128-((a+r|0)>>>1)&255,A=n+(l*3|0)|0,d[A>>0]=r+128-a,d[A+1>>0]=o,d[A+2>>0]=m,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do m=d[c+(r*3|0)+1>>0]|0,a=N[c+(r*3|0)>>0]|0,s=m&255,A=(N[c+(r*3|0)+2>>0]|0)+128-((s+a|0)>>>1)&255,d[n+r>>0]=a+128-s,d[n+(r+o)>>0]=m,d[n+(r+t)>>0]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,A=d[c+(a<<2)+3>>0]|0,T=N[c+(a<<2)>>0]|0,p=s&255,m=(N[c+(a<<2)+2>>0]|0)+128-((p+T|0)>>>1)&255,d[n+a>>0]=T+128-p,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=m,d[n+(a+r)>>0]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Sl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+176|0,T=p+152|0,E=p+16|0,D=p,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,m=t+20|0,l=e[m>>2]|0,!a){E=l,Yr(t,E,n,s,o),y=p;return}for(;c=ze[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[m>>2]|0,(a|0)==(c|0)){A=26;break}else a=a-c|0;if((A|0)==26){Yr(t,l,n,s,o),y=p;return}n=E+56|0,m=E+4|0,e[E>>2]=36160,e[n>>2]=36180,f=0,h0(62,E+56|0,m|0),p=f,f=0,p&1&&(E=b()|0,H0(n),r0(E|0)),e[E+128>>2]=0,e[E+132>>2]=-1,e[E>>2]=36200,e[E+56>>2]=36220,f=0,n0(180,m|0),p=f,f=0;do if(p&1)l=b()|0;else{if(e[m>>2]=36236,r=E+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[E+52>>2]=16,e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,f=0,h0(63,m|0,T|0),p=f,f=0,p&1){l=b()|0,a0(T),a0(r),ce(m);break}a0(T),f=0,l=L0(28,E|0,49029,57)|0,T=f,f=0,!(T&1)&&(f=0,y0(36,l|0,0)|0,T=f,f=0,!(T&1))&&(c=de(16)|0,f=0,h0(64,D|0,m|0),T=f,f=0,T&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,D|0),T=f,f=0,T&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(D),a||(D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0))),ge(c|0),D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)),D=b()|0,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)}while(!1);E=l,H0(n),r0(E|0)}function e2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=a&255,l=(N[r+(t*3|0)>>0]|0)+128+c|0,c=(N[r+(t*3|0)+2>>0]|0)+128+(((l&255)+c|0)>>>1)&255,o=n+(t*3|0)|0,d[o>>0]=l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=d[r+(a+o)>>0]|0,A=p&255,T=(N[r+a>>0]|0)+128+A|0,A=(N[r+(a+l)>>0]|0)+128+(((T&255)+A|0)>>>1)&255,c=n+(a*3|0)|0,d[c>>0]=T,d[c+1>>0]=p,d[c+2>>0]=A,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=N[r+(a+o)>>0]|0,A=(N[r+a>>0]|0)+128+p&255,T=n+(a<<2)|0,p=A|p<<8|N[r+(a+l)>>0]<<24|(N[r+(a+t)>>0]|0)+128+((A+p|0)>>>1)<<16&16711680,d[T>>0]=p,d[T+1>>0]=p>>8,d[T+2>>0]=p>>16,d[T+3>>0]=p>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;T=t+2|0,p=d[t>>0]|0,d[t>>0]=d[T>>0]|0,d[T>>0]=p,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function vl(t){t=t|0;var r=0,n=0;e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),l0(n))}function wl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),r=e[t+8>>2]|0,!r){l0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r),l0(t)}function xl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,i2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,i2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(ze[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Ne(o|0,824,96))}function Cl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Tl(t,o,r,n,s);return}else{o=t+40|0,jr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function jr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;m=l+2|0,A=d[l>>0]|0,d[l>>0]=d[m>>0]|0,d[m>>0]=A,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,a=o&255,m=128-a+(N[c+(l*3|0)+2>>0]|0)&255,A=n+(l*3|0)|0,d[A>>0]=(N[c+(l*3|0)>>0]|0)+128-a,d[A+1>>0]=o,d[A+2>>0]=m,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do m=d[c+(r*3|0)+1>>0]|0,s=m&255,A=128-s+(N[c+(r*3|0)+2>>0]|0)&255,d[n+r>>0]=(N[c+(r*3|0)>>0]|0)+128-s,d[n+(r+o)>>0]=m,d[n+(r+t)>>0]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,A=d[c+(a<<2)+3>>0]|0,p=s&255,m=128-p+(N[c+(a<<2)+2>>0]|0)&255,d[n+a>>0]=(N[c+(a<<2)>>0]|0)+128-p,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=m,d[n+(a+r)>>0]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Tl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+176|0,T=p+152|0,E=p+16|0,D=p,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,m=t+20|0,l=e[m>>2]|0,!a){E=l,jr(t,E,n,s,o),y=p;return}for(;c=ze[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[m>>2]|0,(a|0)==(c|0)){A=26;break}else a=a-c|0;if((A|0)==26){jr(t,l,n,s,o),y=p;return}n=E+56|0,m=E+4|0,e[E>>2]=36160,e[n>>2]=36180,f=0,h0(62,E+56|0,m|0),p=f,f=0,p&1&&(E=b()|0,H0(n),r0(E|0)),e[E+128>>2]=0,e[E+132>>2]=-1,e[E>>2]=36200,e[E+56>>2]=36220,f=0,n0(180,m|0),p=f,f=0;do if(p&1)l=b()|0;else{if(e[m>>2]=36236,r=E+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[E+52>>2]=16,e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,f=0,h0(63,m|0,T|0),p=f,f=0,p&1){l=b()|0,a0(T),a0(r),ce(m);break}a0(T),f=0,l=L0(28,E|0,49029,57)|0,T=f,f=0,!(T&1)&&(f=0,y0(36,l|0,0)|0,T=f,f=0,!(T&1))&&(c=de(16)|0,f=0,h0(64,D|0,m|0),T=f,f=0,T&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,D|0),T=f,f=0,T&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(D),a||(D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0))),ge(c|0),D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)),D=b()|0,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)}while(!1);E=l,H0(n),r0(E|0)}function i2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,l=a&255,c=l+128+(N[r+(t*3|0)+2>>0]|0)&255,o=n+(t*3|0)|0,d[o>>0]=(N[r+(t*3|0)>>0]|0)+128+l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=d[r+(a+o)>>0]|0,T=p&255,A=T+128+(N[r+(a+l)>>0]|0)&255,c=n+(a*3|0)|0,d[c>>0]=(N[r+a>>0]|0)+128+T,d[c+1>>0]=p,d[c+2>>0]=A,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=N[r+(a+o)>>0]|0,T=n+(a<<2)|0,p=(N[r+a>>0]|0)+128+p&255|p<<8|N[r+(a+l)>>0]<<24|p+128+(N[r+(a+t)>>0]|0)<<16&16711680,d[T>>0]=p,d[T+1>>0]=p>>8,d[T+2>>0]=p>>16,d[T+3>>0]=p>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;T=t+2|0,p=d[t>>0]|0,d[t>>0]=d[T>>0]|0,d[T>>0]=p,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function yl(t){t=t|0;var r=0,n=0;e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),l0(n))}function Dl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),r=e[t+8>>2]|0,!r){l0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r),l0(t)}function Il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,t2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,t2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(ze[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Ne(o|0,824,96))}function kl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){El(t,o,r,n,s);return}else{o=t+40|0,Xr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Xr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ei(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;m=l+2|0,A=d[l>>0]|0,d[l>>0]=d[m>>0]|0,d[m>>0]=A,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,m=d[c+(l*3|0)+2>>0]|0,A=n+(l*3|0)|0,d[A>>0]=d[c+(l*3|0)>>0]|0,d[A+1>>0]=o,d[A+2>>0]=m,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do m=d[c+(r*3|0)+1>>0]|0,A=d[c+(r*3|0)+2>>0]|0,d[n+r>>0]=d[c+(r*3|0)>>0]|0,d[n+(r+o)>>0]=m,d[n+(r+t)>>0]=A,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,m=d[c+(a<<2)+2>>0]|0,A=d[c+(a<<2)+3>>0]|0,d[n+a>>0]=d[c+(a<<2)>>0]|0,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=m,d[n+(a+r)>>0]=A,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function El(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+176|0,T=p+152|0,E=p+16|0,D=p,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,m=t+20|0,l=e[m>>2]|0,!a){E=l,Xr(t,E,n,s,o),y=p;return}for(;c=ze[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[m>>2]|0,(a|0)==(c|0)){A=26;break}else a=a-c|0;if((A|0)==26){Xr(t,l,n,s,o),y=p;return}n=E+56|0,m=E+4|0,e[E>>2]=36160,e[n>>2]=36180,f=0,h0(62,E+56|0,m|0),p=f,f=0,p&1&&(E=b()|0,H0(n),r0(E|0)),e[E+128>>2]=0,e[E+132>>2]=-1,e[E>>2]=36200,e[E+56>>2]=36220,f=0,n0(180,m|0),p=f,f=0;do if(p&1)l=b()|0;else{if(e[m>>2]=36236,r=E+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[E+52>>2]=16,e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,f=0,h0(63,m|0,T|0),p=f,f=0,p&1){l=b()|0,a0(T),a0(r),ce(m);break}a0(T),f=0,l=L0(28,E|0,49029,57)|0,T=f,f=0,!(T&1)&&(f=0,y0(36,l|0,0)|0,T=f,f=0,!(T&1))&&(c=de(16)|0,f=0,h0(64,D|0,m|0),T=f,f=0,T&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,D|0),T=f,f=0,T&1?a=1:(f=0,d0(6,c|0,824,96),f=0,a=0),l=b()|0,a0(D),a||(D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0))),ge(c|0),D=l,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)),D=b()|0,e[E>>2]=36200,e[n>>2]=36220,e[m>>2]=36236,a0(r),ce(m),H0(n),r0(D|0)}while(!1);E=l,H0(n),r0(E|0)}function t2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;m=t+4|0,t=e[m>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=d[r+(t*3|0)+2>>0]|0,o=n+(t*3|0)|0,d[o>>0]=d[r+(t*3|0)>>0]|0,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=d[r+(a+o)>>0]|0,A=d[r+(a+l)>>0]|0,c=n+(a*3|0)|0,d[c>>0]=d[r+a>>0]|0,d[c+1>>0]=p,d[c+2>>0]=A,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=n+(a<<2)|0,A=N[r+(a+o)>>0]<<8|N[r+a>>0]|N[r+(a+t)>>0]<<16|N[r+(a+l)>>0]<<24,d[p>>0]=A,d[p+1>>0]=A>>8,d[p+2>>0]=A>>16,d[p+3>>0]=A>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[m>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;p=t+2|0,A=d[t>>0]|0,d[t>>0]=d[p>>0]|0,d[p>>0]=A,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function r2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;q=y,y=y+32|0,R=q+12|0,V=q,D=t+180|0,E=(e[D>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,E)|0,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,R|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[R>>2]=n,e[R+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}while(!1);e[V>>2]=0,O=V+4|0,e[O>>2]=0,e[V+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,V|0),T=f,f=0,T&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,T=f,f=0,!(T&1))){e[V>>2]=o,l=o+(U<<2)|0,e[V+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,E)|0)+1|0,c=t+4608|0,m=t+92|0,A=(U|0)>0,p=t+4600|0,T=0;i:for(;;){if(s=e[R>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,T&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[m>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[D>>2]|0,E|0),s=f,f=0,s&1){l=29;break}if(A){r=e[V>>2]|0,n=e[l>>2]|0,s=0;do{if(e[p>>2]=e[r+(s<<2)>>2],M=e[D>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(70,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[V>>2]|0,e[r+(s<<2)>>2]=e[p>>2],n=(e[l>>2]|0)+(E*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(E*3|0),s=s+1|0}while((s|0)<(U|0))}if(T=T+1|0,(T|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[R>>2]|0,!r){y=q;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),y=q;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}function Fl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(J=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[J>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,m=o-c|0,A=N[l+(F*3|0)>>0]|0,p=c-A|0,T=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+m>>0]|0)|0)*9|0)+(d[X+p>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,D=N[a+(F*3|0)+1>>0]|0,E=s-D|0,U=N[l+(F*3|0)+1>>0]|0,V=D-U|0,q=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+E>>0]|0)|0)*9|0)+(d[X+V>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,R=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+R>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,q|T|X?(a=N[l+(K*3|0)>>0]|0,l=o-A>>31,(l^p|0)>=0&&((l^m|0)<0?o=A:o=A-c+o|0),a=Kr(t,T,a,o,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^V|0)>=0&&((o^E|0)<0?s=U:s=U-D+s|0),o=Kr(t,q,l,s,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^R|0)<0?n=F:n=F-O+n|0),X=Kr(t,X,l,n,0)|0,K=(e[J>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Ml(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Ml(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0;for(t0=y,y=y+32|0,K=t0+15|0,D=t0+12|0,T=t0+9|0,E=t0+6|0,R=t0+3|0,F=t0,M=(e[t+180>>2]|0)-r|0,X=e[t+4608>>2]|0,U=e[t+4604>>2]|0,O=X+((r+-1|0)*3|0)|0,V=d[O>>0]|0,q=d[O+1>>0]|0,O=d[O+2>>0]|0,n=V&255,s=t+144|0,o=q&255,l=O&255,p=0;a=X+((p+r|0)*3|0)|0,c=a+1|0,m=a+2|0,J=(N[a>>0]|0)-n|0,A=e[s>>2]|0,!((((J|0)>-1?J:0-J|0)|0)>(A|0)||(J=(N[c>>0]|0)-o|0,(((J|0)>-1?J:0-J|0)|0)>(A|0))||(J=(N[m>>0]|0)-l|0,(((J|0)>-1?J:0-J|0)|0)>(A|0)));)if(d[a>>0]=V,d[c>>0]=q,d[m>>0]=O,p=p+1|0,(p|0)==(M|0)){p=M;break}if(o=(p|0)==(M|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(p|0))n=p;else{n=p;do Te(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]=d[J>>0]|0,d[R+1>>0]=d[J+1>>0]|0,d[R+2>>0]=d[J+2>>0]|0,d[F>>0]=V,d[F+1>>0]=q,d[F+2>>0]=O,r=U+(r*3|0)|0,d[T>>0]=d[R>>0]|0,d[T+1>>0]=d[R+1>>0]|0,d[T+2>>0]=d[R+2>>0]|0,d[D>>0]=d[F>>0]|0,d[D+1>>0]=d[F+1>>0]|0,d[D+2>>0]=d[F+2>>0]|0,d[K>>0]=d[r>>0]|0,d[K+1>>0]=d[r+1>>0]|0,d[K+2>>0]=d[r+2>>0]|0,_l(E,t,T,D,K),d[J>>0]=d[E>>0]|0,d[J+1>>0]=d[E+1>>0]|0,d[J+2>>0]=d[E+2>>0]|0,J=e[l>>2]|0,e[l>>2]=(J|0)<1?0:J+-1|0,J=p+1|0,y=t0,J|0)}function Kr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(V=r>>31,l=(V^r)-V|0,E=t+196+(l*12|0)+10|0,a=k[E>>1]|0,D=t+196+(l*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^V)-V+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?A=o:A=s&~(o>>31),o=(n-A^V)-V|0,m=t+144|0,s=e[m>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,T=t+140|0,c=e[T>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,n2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[D>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[m>>2]<<1|1,c)|0)|0,n=k[E>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[D>>2]=r,s=n+1|0,k[E>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,E=k[p>>1]|0,k[p>>1]=(E<<16>>16<127&1)+(E&65535),o=(o|0)>0?0:o):(o=k[p>>1]|0,k[p>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[m>>2]|0,n=s<<1|1,r=(W(n,(c^V)-V|0)|0)+A|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[T>>2]|0,n)|0)|0)):(r=(W(e[T>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(V=r,V=V&255,V|0):(V=o&~(r>>31),V=V&255,V|0)}function n2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-31-(e[l>>2]|0)|0)):Te(t,1,a),r=e[l>>2]|0,Te(t,(1<>0]|0,D=T-(N[s>>0]|0)>>31|1,l=W(D,(N[n>>0]|0)-T|0)|0,A=r+144|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,m=e[F>>2]|0,c=((l|0)<0?m:0)+l|0,m=c-((c|0)<((m+1|0)/2|0|0)?0:m)|0,c=r+4576|0,Wr(r,c,m),q=N[o+1>>0]|0,O=q-(N[s+1>>0]|0)>>31|1,l=W(O,(N[n+1>>0]|0)-q|0)|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,E=e[F>>2]|0,R=((l|0)<0?E:0)+l|0,E=R-((R|0)<((E+1|0)/2|0|0)?0:E)|0,Wr(r,c,E),R=N[o+2>>0]|0,V=R-(N[s+2>>0]|0)>>31|1,l=W(V,(N[n+2>>0]|0)-R|0)|0,a=e[A>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,p=e[F>>2]|0,l=((l|0)<0?p:0)+l|0,p=l-((l|0)<((p+1|0)/2|0|0)?0:p)|0,Wr(r,c,p),c=e[A>>2]|0,A=c<<1|1,l=(W(W(A,m)|0,D)|0)+T|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0),s=a):(l=(W(e[F>>2]|0,A)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&255,l=(W(W(A,E)|0,O)|0)+q|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0):l=(W(e[F>>2]|0,A)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&255,l=(W(W(A,p)|0,V)|0)+R|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,A)|0)|0):l=(W(e[F>>2]|0,A)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&255,d[t>>0]=o,R=t+1|0,d[R>>0]=a,t=t+2|0,d[t>>0]=F;return}F=s&~(l>>31),F=F&255,d[t>>0]=o,R=t+1|0,d[R>>0]=a,t=t+2|0,d[t>>0]=F}function Wr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,n2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function Rl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+144|0;e:do if(e[T>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4612>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4612>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4612>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4612>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4616|0,s=p<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4612|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+192|0,m=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function Pl(t){t=t|0;var r=0,n=0;e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Ll(t){t=t|0;var r=0,n=0;if(e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Ul(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,Gl(t),s=0;do e[t+172+(s*12|0)>>2]=1024,e[t+172+(s*12|0)+4>>2]=0,k[t+172+(s*12|0)+8>>1]=0,k[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=1024,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=1024,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Ol(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35772,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,s2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],s2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function Nl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function s2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,q=O,E=t+156|0,U=(e[E>>2]|0)+4|0,(e[t+32>>2]|0)==1?V=e[t+24>>2]|0:V=1,r=W(V<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),R=f,f=0,R&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,R=f,f=0,!(R&1))){e[F>>2]=s,R=s+(r<<1)|0,e[F+8>>2]=R,je(s|0,0,n|0)|0,e[M>>2]=R;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[q>>2]=0,R=q+4|0,e[R>>2]=0,e[q+8>>2]=0;do if(!V)a=18;else{if(V>>>0>1073741823&&(f=0,n0(178,q|0),D=f,f=0,D&1)||(a=16),(a|0)==16&&(o=V<<2,f=0,l=u0(67,o|0)|0,D=f,f=0,!(D&1))){e[q>>2]=l,a=l+(V<<2)|0,e[q+8>>2]=a,je(l|0,0,o|0)|0,e[R>>2]=a,a=18;break}s=b()|0,r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(V,U)|0)+1|0,m=t+4584|0,A=t+92|0,p=(V|0)>0,T=t+4576|0,D=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[m>>2]=n,D&1?(e[a>>2]=n,e[m>>2]=r):r=n,o=e[A>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[E>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(p){r=e[a>>2]|0,n=e[m>>2]|0,s=e[q>>2]|0,o=0;do{if(e[T>>2]=e[s+(o<<2)>>2],s=e[E>>2]|0,k[r+(s<<1)>>1]=k[r+(s+-1<<1)>>1]|0,k[n+-2>>1]=k[r>>1]|0,f=0,h0(71,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[q>>2]|0,e[s+(o<<2)>>2]=e[T>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[m>>2]|0)+(U<<1)|0,e[m>>2]=n,o=o+1|0}while((o|0)<(V|0))}if(D=D+1|0,(D|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[q>>2]|0,n=r,r&&(s=e[R>>2]|0,(s|0)!=(r|0)&&(e[R>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=O;return}while(!1);r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function Vl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4580|0,r=e[T>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(D=t+4584|0,E=t+4588|0,o=r,l=B[r+-2>>1]|0,r=B[r>>1]|0,p=0;A=e[D>>2]|0,m=B[A+(p+-1<<1)>>1]|0,s=p+1|0,n=B[o+(s<<1)>>1]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=Bl(t,c,B[A+(p<<1)>>1]|0,o,0)|0,k[(e[D>>2]|0)+(p<<1)>>1]=A):(s=(ql(t,p,0)|0)+p|0,n=e[T>>2]|0,r=B[n+(s+-1<<1)>>1]|0,n=B[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Bl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,E=t+172+(m*12|0)+10|0,a=k[E>>1]|0,D=t+172+(m*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&65535|0)==(o|0)?p=o:p=o>>31&65535^65535,c=(n-p^U)-U<<16,A=c>>16,l?o=0:o=(e[t+172+(m*12|0)+4>>2]<<1)+-1+a>>31,s=o^A,s=s>>30^s<<1,o=s>>l,(o|0)<47?((o|0)>30&&(a=(o|0)/2|0,Te(t,0,a),o=o-a|0),Te(t,1,o+1|0),Te(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+A>>l,a=o?32:a<<16>>16,e[D>>2]=(e[D>>2]|0)+((c|0)>-65536?A:0-A|0)>>l,l=a+1|0,k[E>>1]=l,o=l+n|0,(o|0)<1?(E=k[T>>1]|0,k[T>>1]=(E&65535)-(E<<16>>16>-128&1),E=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&65535,r|0):(n|0)<=0?(E=n,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&65535,r|0):(E=n-l|0,D=k[T>>1]|0,k[T>>1]=(D<<16>>16<127&1)+(D&65535),E=(E|0)>0?0:E,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&65535,r|0)}function ql(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,A=e[t+4580>>2]|0,o=k[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(k[n>>1]|0)!=o<<16>>16){p=s;break}if(k[n>>1]=o,s=s+1|0,(s|0)==(a|0)){p=a;break}}if(l=o&65535,o=(p|0)==(a|0),m=t+4576|0,s=e[36476+(e[m>>2]<<2)>>2]|0,(1<(p|0))n=p;else{n=p;do Te(t,1,1),s=e[m>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[m>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=B[A+(n<<1)>>1]|0,A=l-n|0,(((A|0)>-1?A:0-A|0)|0)<1?(n=s-l<<16>>16,o2(t,t+4564|0,n),n=n+l|0):(A=n-l>>31|1,r=(W(s-n<<16,A)|0)>>16,o2(t,t+4552|0,r),n=(W(r,A)|0)+n|0),k[o>>1]=n,t=e[m>>2]|0,e[m>>2]=(t|0)<1?0:t+-1|0,t=p+1|0,t|0)}function o2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,bl(t,o,s,63-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function bl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-16|0,(o|0)<(s+-17|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-47|0)):Te(t,1,l),Te(t,n+65535&65535,16)}function Gl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,65535,0),m=t+160|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){m=e[8909]|0,e[t+4588>>2]=m+(((e[8910]|0)-m|0)>>>1),y=A;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+65536,a=t+168|0,o=t+164|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=A}function zl(t){t=t|0;var r=0,n=0;e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Ql(t){t=t|0;var r=0,n=0;if(e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Hl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,Jl(t),s=0;do e[t+172+(s*12|0)>>2]=64,e[t+172+(s*12|0)+4>>2]=0,k[t+172+(s*12|0)+8>>1]=0,k[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=64,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=64,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Yl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35744,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,l2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],l2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function jl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function l2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,q=O,E=t+156|0,U=(e[E>>2]|0)+4|0,(e[t+32>>2]|0)==1?V=e[t+24>>2]|0:V=1,r=W(V<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),R=f,f=0,R&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,R=f,f=0,!(R&1))){e[F>>2]=s,R=s+(r<<1)|0,e[F+8>>2]=R,je(s|0,0,n|0)|0,e[M>>2]=R;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[q>>2]=0,R=q+4|0,e[R>>2]=0,e[q+8>>2]=0;do if(!V)a=18;else{if(V>>>0>1073741823&&(f=0,n0(178,q|0),D=f,f=0,D&1)||(a=16),(a|0)==16&&(o=V<<2,f=0,l=u0(67,o|0)|0,D=f,f=0,!(D&1))){e[q>>2]=l,a=l+(V<<2)|0,e[q+8>>2]=a,je(l|0,0,o|0)|0,e[R>>2]=a,a=18;break}s=b()|0,r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(V,U)|0)+1|0,m=t+4584|0,A=t+92|0,p=(V|0)>0,T=t+4576|0,D=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[m>>2]=n,D&1?(e[a>>2]=n,e[m>>2]=r):r=n,o=e[A>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[E>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(p){r=e[a>>2]|0,n=e[m>>2]|0,s=e[q>>2]|0,o=0;do{if(e[T>>2]=e[s+(o<<2)>>2],s=e[E>>2]|0,k[r+(s<<1)>>1]=k[r+(s+-1<<1)>>1]|0,k[n+-2>>1]=k[r>>1]|0,f=0,h0(72,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[q>>2]|0,e[s+(o<<2)>>2]=e[T>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[m>>2]|0)+(U<<1)|0,e[m>>2]=n,o=o+1|0}while((o|0)<(V|0))}if(D=D+1|0,(D|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[q>>2]|0,n=r,r&&(s=e[R>>2]|0,(s|0)!=(r|0)&&(e[R>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=O;return}while(!1);r=e[q>>2]|0,n=r,r&&(o=e[R>>2]|0,(o|0)!=(r|0)&&(e[R>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function Xl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4580|0,r=e[T>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(D=t+4584|0,E=t+4588|0,o=r,l=B[r+-2>>1]|0,r=B[r>>1]|0,p=0;A=e[D>>2]|0,m=B[A+(p+-1<<1)>>1]|0,s=p+1|0,n=B[o+(s<<1)>>1]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=Kl(t,c,B[A+(p<<1)>>1]|0,o,0)|0,k[(e[D>>2]|0)+(p<<1)>>1]=A):(s=(Wl(t,p,0)|0)+p|0,n=e[T>>2]|0,r=B[n+(s+-1<<1)>>1]|0,n=B[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Kl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,E=t+172+(m*12|0)+10|0,a=k[E>>1]|0,D=t+172+(m*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&4095|0)==(o|0)?p=o:p=o>>31&4095^4095,c=(n-p^U)-U<<20,A=c>>20,l?o=0:o=(e[t+172+(m*12|0)+4>>2]<<1)+-1+a>>31,s=o^A,s=s>>30^s<<1,o=s>>l,(o|0)<35?((o|0)>30&&(a=(o|0)/2|0,Te(t,0,a),o=o-a|0),Te(t,1,o+1|0),Te(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+A>>l,a=o?32:a<<16>>16,e[D>>2]=(e[D>>2]|0)+((c|0)>-1048576?A:0-A|0)>>l,l=a+1|0,k[E>>1]=l,o=l+n|0,(o|0)<1?(E=k[T>>1]|0,k[T>>1]=(E&65535)-(E<<16>>16>-128&1),E=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(n|0)<=0?(E=n,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(E=n-l|0,D=k[T>>1]|0,k[T>>1]=(D<<16>>16<127&1)+(D&65535),E=(E|0)>0?0:E,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0)}function Wl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,A=e[t+4580>>2]|0,o=k[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(k[n>>1]|0)!=o<<16>>16){p=s;break}if(k[n>>1]=o,s=s+1|0,(s|0)==(a|0)){p=a;break}}if(l=o&65535,o=(p|0)==(a|0),m=t+4576|0,s=e[36476+(e[m>>2]<<2)>>2]|0,(1<(p|0))n=p;else{n=p;do Te(t,1,1),s=e[m>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[m>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=B[A+(n<<1)>>1]|0,A=l-n|0,(((A|0)>-1?A:0-A|0)|0)<1?(n=s-l<<20>>20,a2(t,t+4564|0,n),n=n+l|0):(A=n-l>>31|1,r=(W(s-n<<20,A)|0)>>20,a2(t,t+4552|0,r),n=(W(r,A)|0)+n|0),k[o>>1]=n&4095,t=e[m>>2]|0,e[m>>2]=(t|0)<1?0:t+-1|0,t=p+1|0,t|0)}function a2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,Zl(t,o,s,47-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function Zl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-12|0,(o|0)<(s+-13|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-43|0)):Te(t,1,l),Te(t,n+4095&4095,12)}function Jl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,4095,0),m=t+160|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){m=e[8906]|0,e[t+4588>>2]=m+(((e[8907]|0)-m|0)>>>1),y=A;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+4096,a=t+168|0,o=t+164|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=A}function $l(t){t=t|0;var r=0,n=0;e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ea(t){t=t|0;var r=0,n=0;if(e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function ia(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,aa(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,k[t+172+(s*12|0)+8>>1]=0,k[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ta(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35716,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,f2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],f2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function ra(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function f2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;q=y,y=y+32|0,R=q+12|0,V=q,D=t+156|0,E=(e[D>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,E)|0,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,R|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[R>>2]=n,e[R+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[R>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),r0(n|0)}while(!1);e[V>>2]=0,O=V+4|0,e[O>>2]=0,e[V+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,V|0),T=f,f=0,T&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,T=f,f=0,!(T&1))){e[V>>2]=o,l=o+(U<<2)|0,e[V+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}n=b()|0,r=e[V>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,E)|0)+1|0,c=t+4584|0,m=t+92|0,A=(U|0)>0,p=t+4576|0,T=0;i:for(;;){if(n=e[R>>2]|0,r=n+1|0,e[l>>2]=r,n=n+a|0,e[c>>2]=n,T&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[m>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[D>>2]|0,E|0),s=f,f=0,s&1){l=29;break}if(A){r=e[l>>2]|0,n=e[V>>2]|0,s=0;do{if(e[p>>2]=e[n+(s<<2)>>2],n=e[D>>2]|0,d[r+n>>0]=d[r+(n+-1)>>0]|0,d[(e[c>>2]|0)+-1>>0]=d[e[l>>2]>>0]|0,f=0,h0(73,t|0,0),n=f,f=0,n&1){l=28;break i}n=e[V>>2]|0,e[n+(s<<2)>>2]=e[p>>2],r=(e[l>>2]|0)+E|0,e[l>>2]=r,e[c>>2]=(e[c>>2]|0)+E,s=s+1|0}while((s|0)<(U|0))}if(T=T+1|0,(T|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){n=b()|0;break}else if((l|0)==29){n=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[R>>2]|0,!r){y=q;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),y=q;return}while(!1);r=e[V>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}r=e[R>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),r0(n|0)}function na(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4580|0,r=e[T>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(D=t+4584|0,E=t+4588|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,p=0;A=e[D>>2]|0,m=N[A+(p+-1)>>0]|0,s=p+1|0,n=N[o+s>>0]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=sa(t,c,N[A+p>>0]|0,o,0)|0,d[(e[D>>2]|0)+p>>0]=A):(s=(oa(t,p,0)|0)+p|0,n=e[T>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function sa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,E=t+172+(m*12|0)+10|0,a=k[E>>1]|0,D=t+172+(m*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?p=o:p=o>>31&255^255,c=(n-p^U)-U<<24,A=c>>24,l?o=0:o=(e[t+172+(m*12|0)+4>>2]<<1)+-1+a>>31,o=o^A,o=o>>30^o<<1,s=o>>l,(s|0)<23?(Te(t,1,s+1|0),Te(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+A>>l,a=o?32:a<<16>>16,e[D>>2]=(e[D>>2]|0)+((c|0)>-16777216?A:0-A|0)>>l,l=a+1|0,k[E>>1]=l,o=l+n|0,(o|0)<1?(E=k[T>>1]|0,k[T>>1]=(E&65535)-(E<<16>>16>-128&1),E=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(E=n,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0):(E=n-l|0,D=k[T>>1]|0,k[T>>1]=(D<<16>>16<127&1)+(D&65535),E=(E|0)>0?0:E,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0)}function oa(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,A=e[t+4580>>2]|0,o=d[c+(r+-1)>>0]|0,s=0;;){if(n=c+(s+r)|0,(d[n>>0]|0)!=o<<24>>24){p=s;break}if(d[n>>0]=o,s=s+1|0,(s|0)==(a|0)){p=a;break}}if(l=o&255,o=(p|0)==(a|0),m=t+4576|0,s=e[36476+(e[m>>2]<<2)>>2]|0,(1<(p|0))n=p;else{n=p;do Te(t,1,1),s=e[m>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[m>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,n=N[A+n>>0]|0,A=l-n|0,(((A|0)>-1?A:0-A|0)|0)<1?(n=s-l<<24>>24,u2(t,t+4564|0,n),n=n+l|0):(A=n-l>>31|1,r=(W(s-n<<24,A)|0)>>24,u2(t,t+4552|0,r),n=(W(r,A)|0)+n|0),d[o>>0]=n,t=e[m>>2]|0,e[m>>2]=(t|0)<1?0:t+-1|0,t=p+1|0,t|0)}function u2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,la(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function la(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-39|0)):Te(t,1,l),Te(t,n+255&255,8)}function aa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,255,0),m=t+160|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){m=e[8900]|0,e[t+4588>>2]=m+(((e[8901]|0)-m|0)>>>1),y=A;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=A}function fa(t){t=t|0;var r=0,n=0;e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ua(t){t=t|0;var r=0,n=0;if(e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function ca(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,Aa(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,k[t+172+(s*12|0)+8>>1]=0,k[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ha(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35688,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,c2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],c2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function c2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;q=y,y=y+32|0,R=q+12|0,V=q,D=t+156|0,E=(e[D>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,E)|0,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,R|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[R>>2]=n,e[R+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}while(!1);e[V>>2]=0,O=V+4|0,e[O>>2]=0,e[V+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,V|0),T=f,f=0,T&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,T=f,f=0,!(T&1))){e[V>>2]=o,l=o+(U<<2)|0,e[V+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,E)|0)+1|0,c=t+4584|0,m=t+92|0,A=(U|0)>0,p=t+4576|0,T=0;i:for(;;){if(s=e[R>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,T&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[m>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[D>>2]|0,E|0),s=f,f=0,s&1){l=29;break}if(A){r=e[V>>2]|0,n=e[l>>2]|0,s=0;do{if(e[p>>2]=e[r+(s<<2)>>2],M=e[D>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(74,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[V>>2]|0,e[r+(s<<2)>>2]=e[p>>2],n=(e[l>>2]|0)+(E*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(E*3|0),s=s+1|0}while((s|0)<(U|0))}if(T=T+1|0,(T|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[R>>2]|0,!r){y=q;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),y=q;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[R>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}function da(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0;if(t0=t+156|0,!((e[t0>>2]|0)<=0))for(J=t+4584|0,s0=t+4580|0,w0=t+4588|0,K=0;F=K+-1|0,l=e[J>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,m=o-c|0,A=N[l+(F*3|0)>>0]|0,p=c-A|0,T=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+m>>0]|0)|0)*9|0)+(d[X+p>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,D=N[a+(F*3|0)+1>>0]|0,E=s-D|0,U=N[l+(F*3|0)+1>>0]|0,V=D-U|0,q=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+E>>0]|0)|0)*9|0)+(d[X+V>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,R=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+R>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,q|T|X?(a=N[l+(K*3|0)>>0]|0,l=o-A>>31,(l^p|0)>=0&&((l^m|0)<0?o=A:o=A-c+o|0),a=Zr(t,T,a,o,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^V|0)>=0&&((o^E|0)<0?s=U:s=U-D+s|0),o=Zr(t,q,l,s,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^R|0)<0?n=F:n=F-O+n|0),X=Zr(t,X,l,n,0)|0,K=(e[J>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(ga(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function ga(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;for(A=(e[t+156>>2]|0)-r|0,p=e[t+4584>>2]|0,T=e[t+4580>>2]|0,m=p+((r+-1|0)*3|0)|0,D=d[m>>0]|0,c=d[m+1>>0]|0,m=d[m+2>>0]|0,l=0;n=p+((l+r|0)*3|0)|0,s=n+1|0,o=n+2|0,!!(((d[n>>0]|0)==D<<24>>24?(d[s>>0]|0)==c<<24>>24:0)&(d[o>>0]|0)==m<<24>>24);)if(d[n>>0]=D,d[s>>0]=c,d[o>>0]=m,l=l+1|0,(l|0)==(A|0)){l=A;break}if(o=(l|0)==(A|0),a=t+4576|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do Te(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,r=A+2|0,o=d[r>>0]|0,T=T+(s*3|0)|0,s=d[T+1>>0]|0,q=d[T+2>>0]|0,T=N[T>>0]|0,E=T-(D&255)>>31|1,U=(W((N[A>>0]|0)-T<<24,E)|0)>>24,V=t+4552|0,Jr(t,V,U),D=s&255,s=D-(c&255)>>31|1,n=(W((n&255)-D<<24,s)|0)>>24,Jr(t,V,n),c=q&255,m=c-(m&255)>>31|1,o=(W((o&255)-c<<24,m)|0)>>24,Jr(t,V,o),T=(W(U,E)|0)+T&255,D=(W(n,s)|0)+D&255,t=(W(o,m)|0)+c&255,d[A>>0]=T,d[p>>0]=D,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Zr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,E=t+172+(m*12|0)+10|0,a=k[E>>1]|0,D=t+172+(m*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?p=o:p=o>>31&255^255,c=(n-p^U)-U<<24,A=c>>24,l?o=0:o=(e[t+172+(m*12|0)+4>>2]<<1)+-1+a>>31,o=o^A,o=o>>30^o<<1,s=o>>l,(s|0)<23?(Te(t,1,s+1|0),Te(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+A>>l,a=o?32:a<<16>>16,e[D>>2]=(e[D>>2]|0)+((c|0)>-16777216?A:0-A|0)>>l,l=a+1|0,k[E>>1]=l,o=l+n|0,(o|0)<1?(E=k[T>>1]|0,k[T>>1]=(E&65535)-(E<<16>>16>-128&1),E=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(E=n,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0):(E=n-l|0,D=k[T>>1]|0,k[T>>1]=(D<<16>>16<127&1)+(D&65535),E=(E|0)>0?0:E,e[s>>2]=E,U=A^U,r=r>>>31,r=p+r|0,r=r+U|0,r=r&255,r|0)}function Jr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,pa(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function pa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-39|0)):Te(t,1,l),Te(t,n+255&255,8)}function Aa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,255,0),m=t+160|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){m=e[8900]|0,e[t+4588>>2]=m+(((e[8901]|0)-m|0)>>>1),y=A;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=A}function Sa(t){t=t|0;var r=0,n=0;e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function va(t){t=t|0;var r=0,n=0;if(e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function wa(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+184>>2]=c|0?c:e[m+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,ka(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,k[t+196+(l*12|0)+8>>1]=0,k[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=m,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=m,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function xa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=y,y=y+16|0,m=p,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[m>>2]=0,e[m+4>>2]=s,c=n+8|0,e[m+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35660,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,k[s+8>>1]=0,k[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,k[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,k[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,m)}return m=t+100|0,e[m>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(A=r+4e3|0,(s|0)!=(A|0))&&(e[c>>2]=A,s=A):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,h2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],h2(t),A=t+116|0,A=e[A>>2]|0,t=e[m>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=A-t|0,y=p,t|0)}function Ca(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(E=t+8|0,V=t+36|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function h2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;q=y,y=y+32|0,R=q+12|0,V=q,E=t+180|0,U=(e[E>>2]|0)+4|0,(e[t+32>>2]|0)==1?T=e[t+24>>2]|0:T=1,r=W(T<<1,U)|0,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,R|0),O=f,f=0,O&1)||(D=6),(D|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[R>>2]=n,e[R+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[R>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),r0(n|0)}while(!1);e[V>>2]=0,O=V+4|0,e[O>>2]=0,e[V+8>>2]=0;do if(!T)D=19;else{if(T>>>0>1073741823&&(f=0,n0(178,V|0),p=f,f=0,p&1)||(D=17),(D|0)==17&&(s=T<<2,f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[V>>2]=o,D=o+(T<<2)|0,e[V+8>>2]=D,je(o|0,0,s|0)|0,e[O>>2]=D,D=19;break}n=b()|0,r=e[V>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}while(!1);if((D|0)==19){a=t+12|0;e:do if((e[a>>2]|0)>0){if(c=t+4604|0,m=(W(T,U)|0)+1|0,A=t+4608|0,p=t+92|0,l=t+4600|0,(T|0)>0)o=0;else{for(s=0;n=e[R>>2]|0,r=n+1|0,e[c>>2]=r,n=n+m|0,e[A>>2]=n,s&1?(e[c>>2]=n,e[A>>2]=r):r=n,T=e[p>>2]|0,f=0,P0(e[(e[T>>2]|0)+12>>2]|0,T|0,r|0,e[E>>2]|0,U|0),T=f,f=0,!(T&1);)if(s=s+1|0,(s|0)>=(e[a>>2]|0)){D=45;break e}n=b()|0;break}i:for(;;){if(n=e[R>>2]|0,r=n+1|0,e[c>>2]=r,n=n+m|0,e[A>>2]=n,o&1?(e[c>>2]=n,e[A>>2]=r):r=n,D=e[p>>2]|0,f=0,P0(e[(e[D>>2]|0)+12>>2]|0,D|0,r|0,e[E>>2]|0,U|0),D=f,f=0,D&1){D=28;break}r=e[V>>2]|0,n=e[c>>2]|0,s=0;do{if(e[l>>2]=e[r+(s<<2)>>2],D=e[E>>2]|0,d[n+D>>0]=d[n+(D+-1)>>0]|0,d[(e[A>>2]|0)+-1>>0]=d[e[c>>2]>>0]|0,f=0,h0(75,t|0,0),D=f,f=0,D&1){D=36;break i}r=e[V>>2]|0,e[r+(s<<2)>>2]=e[l>>2],n=(e[c>>2]|0)+U|0,e[c>>2]=n,e[A>>2]=(e[A>>2]|0)+U,s=s+1|0}while((s|0)<(T|0));if(o=o+1|0,(o|0)>=(e[a>>2]|0)){D=45;break e}}if((D|0)==28){n=b()|0;break}else if((D|0)==36){n=b()|0;break}}else D=45;while(!1);do if((D|0)==45){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[R>>2]|0,!r){y=q;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),y=q;return}while(!1);r=e[V>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}r=e[R>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),r0(n|0)}function Ta(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4604|0,r=e[T>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(D=t+4608|0,E=t+4612|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,p=0;A=e[D>>2]|0,m=N[A+(p+-1)>>0]|0,s=p+1|0,n=N[o+s>>0]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=ya(t,c,N[A+p>>0]|0,o,0)|0,d[(e[D>>2]|0)+p>>0]=A):(s=(Da(t,p,0)|0)+p|0,n=e[T>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function ya(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(V=r>>31,l=(V^r)-V|0,E=t+196+(l*12|0)+10|0,a=k[E>>1]|0,D=t+196+(l*12|0)|0,o=e[D>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^V)-V+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?A=o:A=s&~(o>>31),o=(n-A^V)-V|0,m=t+144|0,s=e[m>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,T=t+140|0,c=e[T>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,d2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[D>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[m>>2]<<1|1,c)|0)|0,n=k[E>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[D>>2]=r,s=n+1|0,k[E>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,E=k[p>>1]|0,k[p>>1]=(E<<16>>16<127&1)+(E&65535),o=(o|0)>0?0:o):(o=k[p>>1]|0,k[p>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[m>>2]|0,n=s<<1|1,r=(W(n,(c^V)-V|0)|0)+A|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[T>>2]|0,n)|0)|0)):(r=(W(e[T>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(V=r,V=V&255,V|0):(V=o&~(r>>31),V=V&255,V|0)}function Da(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;for(m=(e[t+180>>2]|0)-r|0,A=e[t+4608>>2]|0,p=e[t+4604>>2]|0,o=d[A+(r+-1)>>0]|0,c=o&255,n=t+144|0,l=0;s=A+(l+r)|0,a=(N[s>>0]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(e[n>>2]|0));)if(d[s>>0]=o,l=l+1|0,(l|0)==(m|0)){l=m;break}if(o=(l|0)==(m|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do Te(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,c,N[p+m>>0]|0)|0,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Ia(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;return c=n-s|0,m=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[m>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[m>>2]|0),(o&r|0)==(o|0)?(m=o,m=m&255,m|0):(m=r&~(o>>31),m=m&255,m|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[m>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[m>>2]|0),(o&r|0)==(o|0)?(m=o,m=m&255,m|0):(m=r&~(o>>31),m=m&255,m|0))}function m2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;if(p=r+9|0,a=N[p>>0]|0,A=r+4|0,m=e[A>>2]|0,o=(W(a>>>1,m)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-m+(s<<31>>31)|0,d2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[A>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[p>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[p>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r}function d2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,Te(t,0,s),o=o-s|0),Te(t,1,o+1|0),Te(t,(1<31?(Te(t,0,31),Te(t,1,s+-31-(e[l>>2]|0)|0)):Te(t,1,a),r=e[l>>2]|0,Te(t,(1<>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4612>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4612>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4612>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4612>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4616|0,s=p<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4612|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+192|0,m=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function Ea(t){t=t|0;var r=0,n=0;e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Fa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Ra(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+176>>2]=c|0?c:e[m+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,qa(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,k[t+188+(l*12|0)+8>>1]=0,k[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=m,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=m,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Pa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),La(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function La(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+172|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[J>>2]=s,t0=s+(r<<1)|0,e[J+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,m=c+1|0,A=t+4600|0,p=(M|0)>0,T=t+160|0,D=t+168|0,E=t+164|0,U=t+156|0,V=t+88|0,q=t+4592|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(m<<1)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],o=e[R>>2]|0,k[n+(o<<1)>>1]=k[n+(o+-1<<1)>>1]|0,k[r+-2>>1]=k[n>>1]|0,f=0,h0(76,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F<<1)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function Ua(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;if(D=t+4596|0,n=e[D>>2]|0,q=t+172|0,r=e[q>>2]|0,!((r|0)<=0))for(E=t+4600|0,U=t+4604|0,V=t+4592|0,c=n,l=B[n+-2>>1]|0,n=B[n>>1]|0,T=0;A=e[E>>2]|0,a=k[A+(T+-1<<1)>>1]|0,p=a&65535,o=T+1|0,s=B[c+(o<<1)>>1]|0,m=e[U>>2]|0,c=n-l|0,l=l-p|0,m=((((d[m+(s-n)>>0]|0)*9|0)+(d[m+c>>0]|0)|0)*9|0)+(d[m+l>>0]|0)|0,A=A+(T<<1)|0,m?(r=n-p>>31,(r^l|0)<0?r=n:r=p+((r^c|0)<0?0:c)|0,p=Na(t,m,B[A>>1]|0,r,0)|0,k[(e[E>>2]|0)+(T<<1)>>1]=p):(r=Va(t,a,A,r-T|0)|0,n=r+T|0,(n|0)!=(e[q>>2]|0)&&(p=Ba(t,p,B[(e[D>>2]|0)+(n<<1)>>1]|0)|0,k[(e[E>>2]|0)+(n<<1)>>1]=p,p=e[V>>2]|0,e[V>>2]=(p|0)<1?0:p+-1|0,r=r+1|0),o=r+T|0,s=e[D>>2]|0,n=B[s+(o+-1<<1)>>1]|0,s=B[s+(o<<1)>>1]|0),r=e[q>>2]|0,!((r|0)<=(o|0));)c=e[D>>2]|0,l=n,n=s,T=o}function Oa(t){t=t|0;var r=0,n=0,s=0,o=0;s=t+116|0,n=e[s>>2]|0,(d[n>>0]|0)!=-1?(o=t+112|0,r=e[o>>2]|0,(r|0)<1&&(_i(t),r=e[o>>2]|0,n=e[s>>2]|0),t=t+108|0,s=e[t>>2]|0,e[o>>2]=r+-1,r=s<<1,e[t>>2]=r,(d[n>>0]|0)!=-1&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,6,35648),t=f,f=0,t&1||Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))):r=e[t+108>>2]|0,r&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,r|0,6,35648),t=f,f=0,t&1||Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))}function Na(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,D=t+188+(m*12|0)+10|0,n=k[D>>1]|0,T=t+188+(m*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,E=t+128|0,o=e[E>>2]|0,(n&o|0)==(n|0)?A=n:A=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Ne(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(m*12|0)+4>>2]<<1)+-1+(k[D>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[T>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(m*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=k[D>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[T>>2]=o,r=s+1|0,k[D>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,D=k[p>>1]|0,k[p>>1]=(D<<16>>16<127&1)+(D&65535),n=(n|0)>0?0:n):(n=k[p>>1]|0,k[p>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+A|0,(o|0)>=(0-r|0)?(n=e[E>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[E>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function Va(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do k[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function Ba(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(g2(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0)):(n=g2(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0))}function g2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=r+9|0,n=N[A>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,m=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,m=8);while(!1);return(m|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[A>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[A>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[A>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=m,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0)}function ji(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(l=t+112|0,(e[l>>2]|0)<16&&_i(t),a=t+108|0,n=e[a>>2]|0,(n|0)>=0){if(n&1073741824)r=1;else if(n&536870912)r=2;else if(n&268435456)r=3;else if(n&134217728)r=4;else if(n&67108864)r=5;else if(n&33554432)r=6;else if(n&16777216)r=7;else if(n&8388608)r=8;else if(n&4194304)r=9;else if(n&2097152)r=10;else if(n&1048576)r=11;else if(n&524288)r=12;else if(n&262144)r=13;else if(n&131072)r=14;else if(o=n>>>12&16,r=o+-1|0,!o){for(r=(e[l>>2]|0)+-15|0,e[l>>2]=r,s=n<<15,e[a>>2]=s,n=r,r=15;(n|0)<1?(_i(t),o=e[a>>2]|0,n=e[l>>2]|0):o=s,n=n+-1|0,e[l>>2]=n,s=o<<1,e[a>>2]=s,!((o|0)<0);)r=r+1|0;return r|0}}else r=0;return t=r+1|0,e[l>>2]=(e[l>>2]|0)-t,e[a>>2]=n<>2]|0,(n|0)<(r|0)&&(_i(t),n=e[s>>2]|0,(n|0)<(r|0)&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Ne(n|0,824,96))),o=t+108|0,t=e[o>>2]|0,e[s>>2]=n-r,e[o>>2]=t<>>(32-r|0)|0}function qa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+136|0;e:do if(e[T>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4604>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4604>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4604>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4604>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4608|0,s=p<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4604|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+184|0,m=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function ba(t){t=t|0;var r=0,n=0;e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Ga(t){t=t|0;var r=0,n=0;if(e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function za(t){t=t|0;var r=0,n=0;e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Ha(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Ya(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+176>>2]=c|0?c:e[m+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Ja(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,k[t+188+(l*12|0)+8>>1]=0,k[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=m,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=m,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function ja(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Xa(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Xa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+172|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[J>>2]=n,s=n+(r*6|0)|0,e[J+8>>2]=s;k[n>>1]=0,k[n+2>>1]=0,k[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[s0>>2]=s;break}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=20;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=18),(a|0)==18&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=20;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==20){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,m=c+1|0,A=t+4600|0,p=(M|0)>0,T=t+160|0,D=t+168|0,E=t+164|0,U=t+156|0,V=t+88|0,q=t+4592|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+6|0,e[a>>2]=n,s=s+(m*6|0)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],r=e[R>>2]|0,o=n+(r*6|0)|0,n=n+((r+-1|0)*6|0)|0,k[o>>1]=k[n>>1]|0,k[o+2>>1]=k[n+2>>1]|0,k[o+4>>1]=k[n+4>>1]|0,o=(e[A>>2]|0)+-6|0,n=e[a>>2]|0,k[o>>1]=k[n>>1]|0,k[o+2>>1]=k[n+2>>1]|0,k[o+4>>1]=k[n+4>>1]|0,f=0,h0(77,t|0,0),o=f,f=0,o&1){a=31;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F*6|0)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F*6|0)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*6|0)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){a=32;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=44;break e}}if((a|0)==31){s=b()|0;break}else if((a|0)==32){s=b()|0;break}}else a=44;while(!1);do if((a|0)==44){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),l0(r),r0(s|0)}function Ka(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0;if(_e=y,y=y+32|0,J=_e+24|0,We=_e+18|0,$e=_e+12|0,s0=_e+6|0,w0=_e,S0=t+172|0,r=e[S0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,Qe=t+4604|0,Re=t+4592|0,t0=0;s=t0+-1|0,o=e[A0>>2]|0,le=e[Y0>>2]|0,n=t0+1|0,l=B[le+(t0*6|0)>>1]|0,K=e[Qe>>2]|0,a=B[le+(s*6|0)>>1]|0,c=l-a|0,m=B[o+(s*6|0)>>1]|0,A=a-m|0,p=((((d[K+((B[le+(n*6|0)>>1]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+A>>0]|0)|0,T=B[le+(t0*6|0)+2>>1]|0,D=B[le+(s*6|0)+2>>1]|0,E=T-D|0,U=B[o+(s*6|0)+2>>1]|0,V=D-U|0,q=((((d[K+((B[le+(n*6|0)+2>>1]|0)-T)>>0]|0)*9|0)+(d[K+E>>0]|0)|0)*9|0)+(d[K+V>>0]|0)|0,O=B[le+(t0*6|0)+4>>1]|0,R=B[le+(s*6|0)+4>>1]|0,F=O-R|0,M=B[o+(s*6|0)+4>>1]|0,X=R-M|0,K=((((d[K+((B[le+(n*6|0)+4>>1]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,q|p|K?(s=B[o+(t0*6|0)>>1]|0,r=l-m>>31,(r^A|0)>=0?(r^c|0)<0?r=m:r=m-a+l|0:r=l,l=$r(t,p,s,r,0)|0,s=B[(e[A0>>2]|0)+(t0*6|0)+2>>1]|0,r=T-U>>31,(r^V|0)>=0?(r^E|0)<0?r=U:r=U-D+T|0:r=T,s=$r(t,q,s,r,0)|0,o=B[(e[A0>>2]|0)+(t0*6|0)+4>>1]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-R+O|0:r=O,K=$r(t,K,o,r,0)|0,le=e[A0>>2]|0,k[le+(t0*6|0)>>1]=l,k[le+(t0*6|0)+2>>1]=s,k[le+(t0*6|0)+4>>1]=K):(n=o+(s*6|0)|0,k[$e>>1]=k[n>>1]|0,k[$e+2>>1]=k[n+2>>1]|0,k[$e+4>>1]=k[n+4>>1]|0,k[J>>1]=k[n>>1]|0,k[J+2>>1]=k[n+2>>1]|0,k[J+4>>1]=k[n+4>>1]|0,r=Wa(t,J,o+(t0*6|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[S0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*6|0)|0,k[w0>>1]=k[le>>1]|0,k[w0+2>>1]=k[le+2>>1]|0,k[w0+4>>1]=k[le+4>>1]|0,le=(e[A0>>2]|0)+(n*6|0)|0,k[We>>1]=k[$e>>1]|0,k[We+2>>1]=k[$e+2>>1]|0,k[We+4>>1]=k[$e+4>>1]|0,k[J>>1]=k[w0>>1]|0,k[J+2>>1]=k[w0+2>>1]|0,k[J+4>>1]=k[w0+4>>1]|0,Za(s0,t,We,J),k[le>>1]=k[s0>>1]|0,k[le+2>>1]=k[s0+2>>1]|0,k[le+4>>1]=k[s0+4>>1]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[S0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function Wa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do D=n+(l*6|0)|0,k[D>>1]=k[r>>1]|0,k[D+2>>1]=k[r+2>>1]|0,k[D+4>>1]=k[r+4>>1]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function Za(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(m=r+4568|0,T=e1(r,m)|0,a=e1(r,m)|0,m=e1(r,m)|0,l=r+128|0,o=B[s>>1]|0,A=e[r+136>>2]|0,p=A<<1|1,o=(W(W(p,T)|0,o-(B[n>>1]|0)>>31|1)|0)+o|0,T=0-A|0,(o|0)>=(T|0)?(l=e[l>>2]|0,(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0)):(o=(W(e[r+132>>2]|0,p)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&65535,o=B[s+2>>1]|0,o=(W(W(p,a)|0,o-(B[n+2>>1]|0)>>31|1)|0)+o|0,(o|0)>=(T|0)?(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0):o=(W(e[r+132>>2]|0,p)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&65535,o=B[s+4>>1]|0,o=(W(W(p,m)|0,o-(B[n+4>>1]|0)>>31|1)|0)+o|0,(o|0)>=(T|0)?(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0):o=(W(e[r+132>>2]|0,p)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&65535,k[t>>1]=c,T=t+2|0,k[T>>1]=a,t=t+4|0,k[t>>1]=r;return}r=l&~(o>>31),r=r&65535,k[t>>1]=c,T=t+2|0,k[T>>1]=a,t=t+4|0,k[t>>1]=r}function $r(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,D=t+188+(m*12|0)+10|0,n=k[D>>1]|0,T=t+188+(m*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,E=t+128|0,o=e[E>>2]|0,(n&o|0)==(n|0)?A=n:A=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Ne(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(m*12|0)+4>>2]<<1)+-1+(k[D>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[T>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(m*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=k[D>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[T>>2]=o,r=s+1|0,k[D>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,D=k[p>>1]|0,k[p>>1]=(D<<16>>16<127&1)+(D&65535),n=(n|0)>0?0:n):(n=k[p>>1]|0,k[p>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+A|0,(o|0)>=(0-r|0)?(n=e[E>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[E>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function e1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=r+9|0,n=N[A>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,m=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,m=8);while(!1);return(m|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[A>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[A>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[A>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=m,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0)}function Ja(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+136|0;e:do if(e[T>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4604>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4604>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4604>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4604>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4608|0,s=p<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4604|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+184|0,m=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function $a(t){t=t|0;var r=0,n=0;e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ef(t){t=t|0;var r=0,n=0;if(e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function tf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function rf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+176>>2]=c|0?c:e[m+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,ff(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,k[t+188+(l*12|0)+8>>1]=0,k[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=m,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=m,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function nf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),sf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function sf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+172|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[J>>2]=n,e[J+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,m=c+1|0,A=t+4600|0,p=(M|0)>0,T=t+160|0,D=t+168|0,E=t+164|0,U=t+156|0,V=t+88|0,q=t+4592|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(m*3|0)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],r=e[R>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[A>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(78,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F*3|0)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}function of(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0;if(_e=y,y=y+16|0,J=_e+12|0,We=_e+9|0,$e=_e+6|0,s0=_e+3|0,w0=_e,S0=t+172|0,r=e[S0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,Qe=t+4604|0,Re=t+4592|0,t0=0;M=t0+-1|0,s=e[A0>>2]|0,o=s+(M*3|0)|0,le=e[Y0>>2]|0,n=t0+1|0,l=N[le+(t0*3|0)>>0]|0,K=e[Qe>>2]|0,a=N[le+(M*3|0)>>0]|0,c=l-a|0,m=N[o>>0]|0,A=a-m|0,p=((((d[K+((N[le+(n*3|0)>>0]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+A>>0]|0)|0,T=N[le+(t0*3|0)+1>>0]|0,D=N[le+(M*3|0)+1>>0]|0,E=T-D|0,U=N[s+(M*3|0)+1>>0]|0,V=D-U|0,q=((((d[K+((N[le+(n*3|0)+1>>0]|0)-T)>>0]|0)*9|0)+(d[K+E>>0]|0)|0)*9|0)+(d[K+V>>0]|0)|0,O=N[le+(t0*3|0)+2>>0]|0,R=N[le+(M*3|0)+2>>0]|0,F=O-R|0,M=N[s+(M*3|0)+2>>0]|0,X=R-M|0,K=((((d[K+((N[le+(n*3|0)+2>>0]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,q|p|K?(s=N[s+(t0*3|0)>>0]|0,r=l-m>>31,(r^A|0)>=0?(r^c|0)<0?r=m:r=m-a+l|0:r=l,l=i1(t,p,s,r,0)|0,s=N[(e[A0>>2]|0)+(t0*3|0)+1>>0]|0,r=T-U>>31,(r^V|0)>=0?(r^E|0)<0?r=U:r=U-D+T|0:r=T,s=i1(t,q,s,r,0)|0,o=N[(e[A0>>2]|0)+(t0*3|0)+2>>0]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-R+O|0:r=O,K=i1(t,K,o,r,0)|0,le=(e[A0>>2]|0)+(t0*3|0)|0,d[le>>0]=l,d[le+1>>0]=s,d[le+2>>0]=K):(d[$e>>0]=d[o>>0]|0,d[$e+1>>0]=d[o+1>>0]|0,d[$e+2>>0]=d[o+2>>0]|0,d[J>>0]=d[o>>0]|0,d[J+1>>0]=d[o+1>>0]|0,d[J+2>>0]=d[o+2>>0]|0,r=lf(t,J,s+(t0*3|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[S0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*3|0)|0,d[w0>>0]=d[le>>0]|0,d[w0+1>>0]=d[le+1>>0]|0,d[w0+2>>0]=d[le+2>>0]|0,le=e[A0>>2]|0,d[We>>0]=d[$e>>0]|0,d[We+1>>0]=d[$e+1>>0]|0,d[We+2>>0]=d[$e+2>>0]|0,d[J>>0]=d[w0>>0]|0,d[J+1>>0]=d[w0+1>>0]|0,d[J+2>>0]=d[w0+2>>0]|0,af(s0,t,We,J),le=le+(n*3|0)|0,d[le>>0]=d[s0>>0]|0,d[le+1>>0]=d[s0+1>>0]|0,d[le+2>>0]=d[s0+2>>0]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[S0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function lf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do D=n+(l*3|0)|0,d[D>>0]=d[r>>0]|0,d[D+1>>0]=d[r+1>>0]|0,d[D+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function af(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(m=r+4568|0,T=t1(r,m)|0,a=t1(r,m)|0,m=t1(r,m)|0,l=r+128|0,o=N[s>>0]|0,A=e[r+136>>2]|0,p=A<<1|1,o=(W(W(p,T)|0,o-(N[n>>0]|0)>>31|1)|0)+o|0,T=0-A|0,(o|0)>=(T|0)?(l=e[l>>2]|0,(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0)):(o=(W(e[r+132>>2]|0,p)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&255,o=N[s+1>>0]|0,o=(W(W(p,a)|0,o-(N[n+1>>0]|0)>>31|1)|0)+o|0,(o|0)>=(T|0)?(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0):o=(W(e[r+132>>2]|0,p)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&255,o=N[s+2>>0]|0,o=(W(W(p,m)|0,o-(N[n+2>>0]|0)>>31|1)|0)+o|0,(o|0)>=(T|0)?(l+A|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,p)|0)|0):o=(W(e[r+132>>2]|0,p)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&255,d[t>>0]=c,T=t+1|0,d[T>>0]=a,t=t+2|0,d[t>>0]=r;return}r=l&~(o>>31),r=r&255,d[t>>0]=c,T=t+1|0,d[T>>0]=a,t=t+2|0,d[t>>0]=r}function i1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,D=t+188+(m*12|0)+10|0,n=k[D>>1]|0,T=t+188+(m*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,E=t+128|0,o=e[E>>2]|0,(n&o|0)==(n|0)?A=n:A=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Ne(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(m*12|0)+4>>2]<<1)+-1+(k[D>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[T>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(m*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=k[D>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[T>>2]=o,r=s+1|0,k[D>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,D=k[p>>1]|0,k[p>>1]=(D<<16>>16<127&1)+(D&65535),n=(n|0)>0?0:n):(n=k[p>>1]|0,k[p>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+A|0,(o|0)>=(0-r|0)?(n=e[E>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[E>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function t1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=r+9|0,n=N[A>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,m=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,m=8);while(!1);return(m|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[A>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[A>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[A>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=m,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0)}function ff(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+136|0;e:do if(e[T>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4604>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4604>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4604>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4604>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4608|0,s=p<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4604|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+184|0,m=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function uf(t){t=t|0;var r=0,n=0;e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function cf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function mf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,wf(t),s=0;do e[t+164+(s*12|0)>>2]=1024,e[t+164+(s*12|0)+4>>2]=0,k[t+164+(s*12|0)+8>>1]=0,k[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=1024,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=1024,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function df(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),gf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function gf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+148|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[J>>2]=s,t0=s+(r<<1)|0,e[J+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,m=c+1|0,A=t+4576|0,p=(M|0)>0,T=t+136|0,D=t+144|0,E=t+140|0,U=t+132|0,V=t+88|0,q=t+4568|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(m<<1)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],o=e[R>>2]|0,k[n+(o<<1)>>1]=k[n+(o+-1<<1)>>1]|0,k[r+-2>>1]=k[n>>1]|0,f=0,h0(79,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F<<1)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function pf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4572|0,r=e[T>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(D=t+4576|0,E=t+4580|0,o=r,l=B[r+-2>>1]|0,r=B[r>>1]|0,p=0;A=e[D>>2]|0,m=B[A+(p+-1<<1)>>1]|0,s=p+1|0,n=B[o+(s<<1)>>1]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=Af(t,c,B[A+(p<<1)>>1]|0,o,0)|0,k[(e[D>>2]|0)+(p<<1)>>1]=A):(s=(Sf(t,p,0)|0)+p|0,n=e[T>>2]|0,r=B[n+(s+-1<<1)>>1]|0,n=B[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Af(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(E=r>>31,A=(E^r)-E|0,D=t+164+(A*12|0)+10|0,n=k[D>>1]|0,T=t+164+(A*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^E)-E+s|0,(n&65535|0)!=(n|0)&&(n=n>>31&65535^65535),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,m=e[2832+(l<<11)+(c<<3)+4>>2]|0,m?(e[o>>2]=(e[o>>2]|0)-m,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<47?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Ne(n|0,824,96))),m=t+164+(A*12|0)+4|0,s=e[m>>2]|0,l?l=k[D>>1]|0:(t=k[D>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[T>>2]=((o|0)>-1?o:0-o|0)+(e[T>>2]|0)>>t,s=a+1|0,k[D>>1]=s,l=s+c|0,(l|0)<1?(D=k[p>>1]|0,k[p>>1]=(D&65535)-(D<<16>>16>-128&1),D=(l|0)>(~a|0)?l:0-a|0,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&65535,r|0):(c|0)<=0?(D=c,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&65535,r|0):(D=c-s|0,T=k[p>>1]|0,k[p>>1]=(T<<16>>16<127&1)+(T&65535),D=(D|0)>0?0:D,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&65535,r|0)}function Sf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=k[o+(r+-1<<1)>>1]|0,a=t+148|0,o=vf(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=B[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(p2(t,t+4556|0)|0)+n|0:n=(W(p2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,k[(e[l>>2]|0)+(s<<1)>>1]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function vf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do k[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function p2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(46-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,m=o&1,s=m,l=1,o=(m+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,16)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(m=s,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[c>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0)}function wf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,65535,0),m=t+152|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){m=e[8909]|0,e[t+4580>>2]=m+(((e[8910]|0)-m|0)>>>1),y=A;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+65536,a=t+160|0,o=t+156|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=A}function xf(t){t=t|0;var r=0,n=0;e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Cf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Tf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(37,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(38,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(39,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(40,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function yf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,_f(t),s=0;do e[t+164+(s*12|0)>>2]=64,e[t+164+(s*12|0)+4>>2]=0,k[t+164+(s*12|0)+8>>1]=0,k[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=64,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=64,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Df(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),If(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function If(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+148|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[J>>2]=s,t0=s+(r<<1)|0,e[J+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,m=c+1|0,A=t+4576|0,p=(M|0)>0,T=t+136|0,D=t+144|0,E=t+140|0,U=t+132|0,V=t+88|0,q=t+4568|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(m<<1)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],o=e[R>>2]|0,k[n+(o<<1)>>1]=k[n+(o+-1<<1)>>1]|0,k[r+-2>>1]=k[n>>1]|0,f=0,h0(80,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F<<1)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),l0(r),r0(s|0)}function kf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4572|0,r=e[T>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(D=t+4576|0,E=t+4580|0,o=r,l=B[r+-2>>1]|0,r=B[r>>1]|0,p=0;A=e[D>>2]|0,m=B[A+(p+-1<<1)>>1]|0,s=p+1|0,n=B[o+(s<<1)>>1]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=Ef(t,c,B[A+(p<<1)>>1]|0,o,0)|0,k[(e[D>>2]|0)+(p<<1)>>1]=A):(s=(Ff(t,p,0)|0)+p|0,n=e[T>>2]|0,r=B[n+(s+-1<<1)>>1]|0,n=B[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Ef(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(E=r>>31,A=(E^r)-E|0,D=t+164+(A*12|0)+10|0,n=k[D>>1]|0,T=t+164+(A*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^E)-E+s|0,(n&4095|0)!=(n|0)&&(n=n>>31&4095^4095),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,m=e[2832+(l<<11)+(c<<3)+4>>2]|0,m?(e[o>>2]=(e[o>>2]|0)-m,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<35?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Ne(n|0,824,96))),m=t+164+(A*12|0)+4|0,s=e[m>>2]|0,l?l=k[D>>1]|0:(t=k[D>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[T>>2]=((o|0)>-1?o:0-o|0)+(e[T>>2]|0)>>t,s=a+1|0,k[D>>1]=s,l=s+c|0,(l|0)<1?(D=k[p>>1]|0,k[p>>1]=(D&65535)-(D<<16>>16>-128&1),D=(l|0)>(~a|0)?l:0-a|0,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&4095,r=r&65535,r|0):(c|0)<=0?(D=c,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&4095,r=r&65535,r|0):(D=c-s|0,T=k[p>>1]|0,k[p>>1]=(T<<16>>16<127&1)+(T&65535),D=(D|0)>0?0:D,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&4095,r=r&65535,r|0)}function Ff(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=k[o+(r+-1<<1)>>1]|0,a=t+148|0,o=Mf(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=B[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(A2(t,t+4556|0)|0)+n|0:n=(W(A2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,k[(e[l>>2]|0)+(s<<1)>>1]=n&4095,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function Mf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do k[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function A2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(34-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,m=o&1,s=m,l=1,o=(m+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,12)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(m=s,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[c>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0)}function _f(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,4095,0),m=t+152|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){m=e[8906]|0,e[t+4580>>2]=m+(((e[8907]|0)-m|0)>>>1),y=A;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+4096,a=t+160|0,o=t+156|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=A}function Rf(t){t=t|0;var r=0,n=0;e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Pf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Lf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function Uf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,Gf(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,k[t+164+(s*12|0)+8>>1]=0,k[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Of(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Nf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Nf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+148|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[J>>2]=n,e[J+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[J>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,m=c+1|0,A=t+4576|0,p=(M|0)>0,T=t+136|0,D=t+144|0,E=t+140|0,U=t+132|0,V=t+88|0,q=t+4568|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+1|0,e[a>>2]=n,s=s+m|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],o=e[R>>2]|0,d[n+o>>0]=d[n+(o+-1)>>0]|0,d[(e[A>>2]|0)+-1>>0]=d[e[a>>2]>>0]|0,f=0,h0(81,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+F|0,e[a>>2]=n,r=(e[A>>2]|0)+F|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){n=b()|0;break}else if((l|0)==31){n=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),r0(n|0)}function Vf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=t+4572|0,r=e[T>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(D=t+4576|0,E=t+4580|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,p=0;A=e[D>>2]|0,m=N[A+(p+-1)>>0]|0,s=p+1|0,n=N[o+s>>0]|0,c=e[E>>2]|0,a=r-l|0,o=l-m|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-m>>31,(l^o|0)<0?o=r:o=m+((l^a|0)<0?0:a)|0,A=Bf(t,c,N[A+p>>0]|0,o,0)|0,d[(e[D>>2]|0)+p>>0]=A):(s=(qf(t,p,0)|0)+p|0,n=e[T>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[T>>2]|0,l=r,r=n,p=s}function Bf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(E=r>>31,A=(E^r)-E|0,D=t+164+(A*12|0)+10|0,n=k[D>>1]|0,T=t+164+(A*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^E)-E+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,m=e[2832+(l<<11)+(c<<3)+4>>2]|0,m?(e[o>>2]=(e[o>>2]|0)-m,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Ne(n|0,824,96))),m=t+164+(A*12|0)+4|0,s=e[m>>2]|0,l?l=k[D>>1]|0:(t=k[D>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[T>>2]=((o|0)>-1?o:0-o|0)+(e[T>>2]|0)>>t,s=a+1|0,k[D>>1]=s,l=s+c|0,(l|0)<1?(D=k[p>>1]|0,k[p>>1]=(D&65535)-(D<<16>>16>-128&1),D=(l|0)>(~a|0)?l:0-a|0,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0):(c|0)<=0?(D=c,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0):(D=c-s|0,T=k[p>>1]|0,k[p>>1]=(T<<16>>16<127&1)+(T&65535),D=(D|0)>0?0:D,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0)}function qf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=d[o+(r+-1)>>0]|0,a=t+148|0,o=bf(t,n,o+r|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&255,r=N[(e[t+4572>>2]|0)+s>>0]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(S2(t,t+4556|0)|0)+n|0:n=(W(S2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,d[(e[l>>2]|0)+s>>0]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function bf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function S2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,m=o&1,s=m,l=1,o=(m+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(m=s,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[c>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0)}function Gf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,255,0),m=t+152|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){m=e[8900]|0,e[t+4580>>2]=m+(((e[8901]|0)-m|0)>>>1),y=A;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=A}function zf(t){t=t|0;var r=0,n=0;e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function Hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function Yf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,L8(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,k[t+164+(s*12|0)+8>>1]=0,k[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function jf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Xf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Xf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,R=t+148|0,F=(e[R>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[J>>2]=n,e[J+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,m=c+1|0,A=t+4576|0,p=(M|0)>0,T=t+136|0,D=t+144|0,E=t+140|0,U=t+132|0,V=t+88|0,q=t+4568|0,O=0;i:for(;;){if(s=e[J>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(m*3|0)|0,e[A>>2]=s,O&1?(e[a>>2]=s,e[A>>2]=n,r=n,n=s):r=s,p){o=e[X>>2]|0,s=0;do{if(e[q>>2]=e[o+(s<<2)>>2],r=e[R>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[A>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(82,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[q>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[A>>2]|0)+(F*3|0)|0,e[A>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[T>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[D>>2]|0)+o|0)&&(o=e[V>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[E>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),l0(r),r0(s|0)}function Kf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0;if(t0=t+148|0,!((e[t0>>2]|0)<=0))for(J=t+4576|0,s0=t+4572|0,w0=t+4580|0,K=0;F=K+-1|0,l=e[J>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,m=o-c|0,A=N[l+(F*3|0)>>0]|0,p=c-A|0,T=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+m>>0]|0)|0)*9|0)+(d[X+p>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,D=N[a+(F*3|0)+1>>0]|0,E=s-D|0,U=N[l+(F*3|0)+1>>0]|0,V=D-U|0,q=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+E>>0]|0)|0)*9|0)+(d[X+V>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,R=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+R>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,q|T|X?(a=N[l+(K*3|0)>>0]|0,l=o-A>>31,(l^p|0)>=0&&((l^m|0)<0?o=A:o=A-c+o|0),a=r1(t,T,a,o,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^V|0)>=0&&((o^E|0)<0?s=U:s=U-D+s|0),o=r1(t,q,l,s,0)|0,l=N[(e[J>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^R|0)<0?n=F:n=F-O+n|0),X=r1(t,X,l,n,0)|0,K=(e[J>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Wf(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Wf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;return m=y,y=y+16|0,p=m+3|0,T=m,l=t+4576|0,n=e[l>>2]|0,s=n+((r+-1|0)*3|0)|0,a=d[s>>0]|0,c=d[s+1>>0]|0,s=d[s+2>>0]|0,d[T>>0]=a,d[T+1>>0]=c,d[T+2>>0]=s,A=t+148|0,o=(e[A>>2]|0)-r|0,d[p>>0]=d[T>>0]|0,d[p+1>>0]=d[T+1>>0]|0,d[p+2>>0]=d[T+2>>0]|0,o=Zf(t,p,n+(r*3|0)|0,o)|0,n=o+r|0,(n|0)==(e[A>>2]|0)?(T=o,y=m,T|0):(p=(e[t+4572>>2]|0)+(n*3|0)|0,r=d[p>>0]|0,A=d[p+1>>0]|0,p=d[p+2>>0]|0,T=e[l>>2]|0,l=t+4544|0,E=n1(t,l)|0,D=n1(t,l)|0,r=r&255,r=(W(r-(a&255)>>31|1,E)|0)+r&255,A=A&255,A=(W(A-(c&255)>>31|1,D)|0)+A&255,p=p&255,p=(W(p-(s&255)>>31|1,n1(t,l)|0)|0)+p&255,T=T+(n*3|0)|0,d[T>>0]=r,d[T+1>>0]=A,d[T+2>>0]=p,T=t+4568|0,p=e[T>>2]|0,e[T>>2]=(p|0)<1?0:p+-1|0,T=o+1|0,y=m,T|0)}function r1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(E=r>>31,A=(E^r)-E|0,D=t+164+(A*12|0)+10|0,n=k[D>>1]|0,T=t+164+(A*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^E)-E+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,m=e[2832+(l<<11)+(c<<3)+4>>2]|0,m?(e[o>>2]=(e[o>>2]|0)-m,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Ne(n|0,824,96))),m=t+164+(A*12|0)+4|0,s=e[m>>2]|0,l?l=k[D>>1]|0:(t=k[D>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[T>>2]=((o|0)>-1?o:0-o|0)+(e[T>>2]|0)>>t,s=a+1|0,k[D>>1]=s,l=s+c|0,(l|0)<1?(D=k[p>>1]|0,k[p>>1]=(D&65535)-(D<<16>>16>-128&1),D=(l|0)>(~a|0)?l:0-a|0,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0):(c|0)<=0?(D=c,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0):(D=c-s|0,T=k[p>>1]|0,k[p>>1]=(T<<16>>16<127&1)+(T&65535),D=(D|0)>0?0:D,e[m>>2]=D,E=o^E,r=r>>>31,r=n+r|0,r=r+E|0,r=r&255,r|0)}function Zf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do D=n+(l*3|0)|0,d[D>>0]=d[r>>0]|0,d[D+1>>0]=d[r+1>>0]|0,d[D+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function n1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,m=o&1,s=m,l=1,o=(m+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(m=s,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[c>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,m=m&255,m=m+1|0,m=m&255,d[c>>0]=m,o|0)}function Jf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+128|0,l=p,D=p+116|0,E=p+104|0,c=p+20|0,A=p+16|0,m=p+12|0,T=p+8|0,a=p+4|0,d[D>>0]=d[58887]|0,d[D+1>>0]=d[58888]|0,d[D+2>>0]=d[58889]|0,d[D+3>>0]=d[58890]|0,d[D+4>>0]=d[58891]|0,d[D+5>>0]=d[58892]|0,Dt(D+1|0,58893,0,e[n+4>>2]|0),t=Di()|0,e[l>>2]=o,o=E+(qi(E,12,t,D,l)|0)|0,D=it(E,o,n)|0,t=li(n)|0,e[T>>2]=t,f=0,ie(3,E|0,D|0,o|0,c|0,A|0,m|0,T|0),o=f,f=0,o&1)E=b()|0,Ie(t)|0,r0(E|0);else return Ie(t)|0,e[a>>2]=e[r>>2],D=e[A>>2]|0,E=e[m>>2]|0,e[l>>2]=e[a>>2],E=Qt(l,c,D,E,n,s)|0,y=p,E|0;return 0}function $f(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(T=y,y=y+240|0,a=T+8|0,t=T,E=T+204|0,m=T+32|0,p=T+28|0,A=T+24|0,D=T+20|0,c=T+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,Dt(t+1|0,58895,0,e[n+4>>2]|0),U=Di()|0,V=a,e[V>>2]=o,e[V+4>>2]=l,l=E+(qi(E,23,U,t,a)|0)|0,o=it(E,l,n)|0,t=li(n)|0,e[D>>2]=t,f=0,ie(3,E|0,o|0,l|0,m|0,p|0,A|0,D|0),l=f,f=0,l&1)V=b()|0,Ie(t)|0,r0(V|0);else return Ie(t)|0,e[c>>2]=e[r>>2],U=e[p>>2]|0,V=e[A>>2]|0,e[a>>2]=e[c>>2],V=Qt(a,m,U,V,n,s)|0,y=T,V|0;return 0}function eu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,q=X+312|0,D=X+48|0,T=X+32|0,m=X+24|0,l=X+8|0,p=X,U=X+316|0,V=X+80|0,c=X+84|0,M=X+76|0,F=X+72|0,O=X+68|0,R=X+64|0,A=p,e[A>>2]=37,e[A+4>>2]=0,A=mr(p+1|0,58898,e[n+4>>2]|0)|0,e[V>>2]=U,t=Di()|0,A?(e[l>>2]=e[n+8>>2],j[l+8>>3]=o,l=qi(U,30,t,p,l)|0):(j[m>>3]=o,l=qi(U,30,t,p,m)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,A?!l&&(f=0,e[T>>2]=e[n+8>>2],j[T+8>>3]=o,a=E0(17,V|0,t|0,p|0,T|0)|0,E=f,f=0,!(E&1))&&(K=12):!l&&(f=0,e[D>>2]=e[n+8>>2],j[D+8>>3]=o,E=E0(17,V|0,t|0,p|0,D|0)|0,D=f,f=0,!(D&1))&&(a=E,K=12);do if((K|0)==12){if(t=e[V>>2]|0,t)l=t;else{if(f=0,we(6),E=f,f=0,E&1)break;l=e[V>>2]|0}t=l,p=l,K=16;break e}while(!1);t=b()|0}else t=e[V>>2]|0,p=0,a=l,K=16;while(!1);if((K|0)==16){m=t+a|0,A=it(t,m,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=Ti(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[V>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,V=f,f=0,V&1)K=20;else{if(e[O>>2]=a,f=0,ie(4,t|0,A|0,m|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ie(a)|0;break}if(Ie(a)|0,e[R>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[q>>2]=e[R>>2],t=Ee(40,q|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),p&&Ze(p),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),p&&Ze(p)}return r0(t|0),0}function iu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;switch(M=y,y=y+16|0,X=M,F=Pi(a,44212)|0,O=Pi(a,44368)|0,Ke[e[(e[O>>2]|0)+20>>2]&127](X,O),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,a|0)|0,R=f,f=0,R&1?q=8:(A=e[l>>2]|0,e[l>>2]=A+4,e[A>>2]=a,A=t+1|0,q=10);break}default:A=t,q=10}e:do if((q|0)==10){R=n;i:do if((R-A|0)>1&&(d[A>>0]|0)==48){switch(c=A+1|0,d[c>>0]|0){case 88:case 120:break;default:{q=11;break i}}if(f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,48)|0,V=f,f=0,V&1){q=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+4,e[V>>2]=a,A=A+2|0,f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[c>>0]|0)|0,V=f,f=0,V&1){q=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+4,e[V>>2]=a,A>>>0>>0){for(a=A;c=d[a>>0]|0,f=0,m=p0(3)|0,V=f,f=0,!(V&1||(f=0,c=y0(39,c<<24>>24|0,m|0)|0,V=f,f=0,V&1));){if(!c){V=A;break i}if(a=a+1|0,a>>>0>=n>>>0){V=A;break i}}a=b()|0;break e}else V=A,a=A}else q=11;while(!1);i:do if((q|0)==11)if(A>>>0>>0){for(a=A;c=d[a>>0]|0,f=0,m=p0(3)|0,V=f,f=0,!(V&1||(f=0,c=y0(40,c<<24>>24|0,m|0)|0,V=f,f=0,V&1));){if(!c){V=A;break i}if(a=a+1|0,a>>>0>=n>>>0){V=A;break i}}a=b()|0;break e}else V=A,a=A;while(!1);if(E=d[X>>0]|0,U=X+4|0,(E&1?e[U>>2]|0:(E&255)>>>1)|0){if((V|0)!=(a|0)&&(p=a+-1|0,V>>>0

>>0)){m=V,c=p;do E=d[m>>0]|0,d[m>>0]=d[c>>0]|0,d[c>>0]=E,m=m+1|0,c=c+-1|0;while(m>>>0>>0)}if(f=0,p=u0(e[(e[O>>2]|0)+16>>2]|0,O|0)|0,E=f,f=0,E&1){q=8;break}T=X+8|0,D=X+1|0;i:do if(V>>>0>>0){for(c=0,m=0,E=V;A=d[(d[X>>0]&1?e[T>>2]|0:D)+m>>0]|0,A<<24>>24>0&(c|0)==(A<<24>>24|0)?(c=e[l>>2]|0,e[l>>2]=c+4,e[c>>2]=p,c=d[X>>0]|0,A=0,m=(m>>>0<((c&1?e[U>>2]|0:(c&255)>>>1)+-1|0)>>>0&1)+m|0):A=c,f=0,c=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[E>>0]|0)|0,K=f,f=0,!(K&1);){if(K=e[l>>2]|0,e[l>>2]=K+4,e[K>>2]=c,E=E+1|0,E>>>0>=a>>>0)break i;c=A+1|0}a=b()|0;break e}while(!1);if(c=s+(V-t<<2)|0,A=e[l>>2]|0,(c|0)!=(A|0))if(m=A+-4|0,c>>>0>>0){do K=e[c>>2]|0,e[c>>2]=e[m>>2],e[m>>2]=K,c=c+4|0,m=m+-4|0;while(c>>>0>>0);p=F,c=A}else p=F,c=A;else p=F}else{if(f=0,E0(e[(e[F>>2]|0)+48>>2]|0,F|0,V|0,a|0,e[l>>2]|0)|0,K=f,f=0,K&1){q=8;break}c=(e[l>>2]|0)+(a-V<<2)|0,e[l>>2]=c,p=F}i:do if(a>>>0>>0){for(;;){if(c=d[a>>0]|0,c<<24>>24==46){m=a;break}if(f=0,m=y0(e[(e[p>>2]|0)+44>>2]|0,F|0,c|0)|0,K=f,f=0,K&1){q=4;break}if(K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=m,a=a+1|0,a>>>0>=n>>>0)break i}if((q|0)==4){a=b()|0;break e}if(f=0,a=u0(e[(e[O>>2]|0)+12>>2]|0,O|0)|0,K=f,f=0,K&1){q=8;break e}K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=a,a=m+1|0}while(!1);if(f=0,E0(e[(e[F>>2]|0)+48>>2]|0,F|0,a|0,n|0,c|0)|0,K=f,f=0,K&1)q=8;else{K=(e[l>>2]|0)+(R-a<<2)|0,e[l>>2]=K,e[o>>2]=(r|0)==(n|0)?K:s+(r-t<<2)|0,a0(X),y=M;return}}while(!1);(q|0)==8&&(a=b()|0),a0(X),r0(a|0)}function tu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,q=X+304|0,D=X+48|0,T=X+32|0,m=X+24|0,l=X+8|0,p=X,U=X+308|0,V=X+72|0,c=X+76|0,M=X+68|0,F=X+64|0,O=X+60|0,R=X+56|0,A=p,e[A>>2]=37,e[A+4>>2]=0,A=mr(p+1|0,58899,e[n+4>>2]|0)|0,e[V>>2]=U,t=Di()|0,A?(e[l>>2]=e[n+8>>2],j[l+8>>3]=o,l=qi(U,30,t,p,l)|0):(j[m>>3]=o,l=qi(U,30,t,p,m)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,A?!l&&(f=0,e[T>>2]=e[n+8>>2],j[T+8>>3]=o,a=E0(17,V|0,t|0,p|0,T|0)|0,E=f,f=0,!(E&1))&&(K=12):!l&&(f=0,j[D>>3]=o,E=E0(17,V|0,t|0,p|0,D|0)|0,D=f,f=0,!(D&1))&&(a=E,K=12);do if((K|0)==12){if(t=e[V>>2]|0,t)l=t;else{if(f=0,we(6),E=f,f=0,E&1)break;l=e[V>>2]|0}t=l,p=l,K=16;break e}while(!1);t=b()|0}else t=e[V>>2]|0,p=0,a=l,K=16;while(!1);if((K|0)==16){m=t+a|0,A=it(t,m,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=Ti(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[V>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,V=f,f=0,V&1)K=20;else{if(e[O>>2]=a,f=0,ie(4,t|0,A|0,m|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ie(a)|0;break}if(Ie(a)|0,e[R>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[q>>2]=e[R>>2],t=Ee(40,q|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),p&&Ze(p),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),p&&Ze(p)}return r0(t|0),0}function ru(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(D=y,y=y+192|0,m=D,t=D+180|0,p=D+160|0,T=D+12|0,c=D+8|0,A=D+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Di()|0,e[m>>2]=o,t=qi(p,20,l,t,m)|0,o=p+t|0,l=it(p,o,n)|0,a=li(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44212)|0,E=f,f=0,E&1)E=b()|0,Ie(a)|0,r0(E|0);else return Ie(a)|0,M1[e[(e[c>>2]|0)+48>>2]&31](c,p,o,T)|0,E=T+(t<<2)|0,e[A>>2]=e[r>>2],e[m>>2]=e[A>>2],E=Qt(m,T,(l|0)==(o|0)?E:T+(l-p<<2)|0,E,n,s)|0,y=D,E|0;return 0}function vt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;K=y,y=y+32|0,q=K+16|0,V=K+12|0,F=K+8|0,O=K+4|0,R=K,m=li(s)|0,e[F>>2]=m,f=0,F=y0(37,F|0,44220)|0,U=f,f=0,U&1&&(K=b()|0,Ie(m)|0,r0(K|0)),Ie(m)|0,e[o>>2]=0,U=F+8|0,m=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){A=m,m?(e[m+12>>2]|0)==(e[m+16>>2]|0)&&(Se[e[(e[m>>2]|0)+36>>2]&127](m)|0)==-1&&(e[r>>2]=0,m=0,A=0):m=0,D=(m|0)==0,T=e[n>>2]|0,p=T;do if(T){if((e[T+12>>2]|0)==(e[T+16>>2]|0)&&(Se[e[(e[T>>2]|0)+36>>2]&127](T)|0)==-1){e[n>>2]=0,p=0,X=12;break}if(!D){X=13;break i}}else X=12;while(!1);if((X|0)==12)if(X=0,D){X=13;break}else T=0;t:do if((ze[e[(e[F>>2]|0)+36>>2]&63](F,d[a>>0]|0,0)|0)<<24>>24==37){if(T=a+1|0,(T|0)==(c|0)){X=17;break i}switch(E=ze[e[(e[F>>2]|0)+36>>2]&63](F,d[T>>0]|0,0)|0,E<<24>>24){case 48:case 69:{if(D=a+2|0,(D|0)==(c|0)){X=20;break i}a=T,T=ze[e[(e[F>>2]|0)+36>>2]&63](F,d[D>>0]|0,0)|0,m=E;break}default:T=E,m=0}E=e[(e[t>>2]|0)+36>>2]|0,e[O>>2]=A,e[R>>2]=p,e[V>>2]=e[O>>2],e[q>>2]=e[R>>2],E=Ct[E&15](t,V,q,s,o,l,T,m)|0,e[r>>2]=E,a=a+2|0}else{if(A=d[a>>0]|0,A<<24>>24>-1&&(M=e[U>>2]|0,(k[M+(A<<24>>24<<1)>>1]&8192)!=0)){do{if(a=a+1|0,(a|0)==(c|0)){a=c;break}if(A=d[a>>0]|0,A<<24>>24<=-1)break}while(k[M+(A<<24>>24<<1)>>1]&8192);for(A=T;;){m?(e[m+12>>2]|0)==(e[m+16>>2]|0)&&(Se[e[(e[m>>2]|0)+36>>2]&127](m)|0)==-1&&(e[r>>2]=0,m=0):m=0,p=(m|0)==0;do if(T){if((e[T+12>>2]|0)!=(e[T+16>>2]|0))if(p){E=A;break}else break t;if((Se[e[(e[T>>2]|0)+36>>2]&127](T)|0)!=-1)if(p^(A|0)==0){E=A,T=A;break}else break t;else{e[n>>2]=0,A=0,X=39;break}}else X=39;while(!1);if((X|0)==39){if(X=0,p)break t;E=A,T=0}if(p=m+12|0,A=e[p>>2]|0,D=m+16|0,(A|0)==(e[D>>2]|0)?A=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:A=N[A>>0]|0,(A&255)<<24>>24<=-1||!(k[(e[U>>2]|0)+(A<<24>>24<<1)>>1]&8192))break t;if(A=e[p>>2]|0,(A|0)==(e[D>>2]|0)){Se[e[(e[m>>2]|0)+40>>2]&127](m)|0,A=E;continue}else{e[p>>2]=A+1,A=E;continue}}}if(p=m+12|0,A=e[p>>2]|0,T=m+16|0,(A|0)==(e[T>>2]|0)?A=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:A=N[A>>0]|0,E=Ni[e[(e[F>>2]|0)+12>>2]&63](F,A&255)|0,E<<24>>24!=(Ni[e[(e[F>>2]|0)+12>>2]&63](F,d[a>>0]|0)|0)<<24>>24){X=57;break i}A=e[p>>2]|0,(A|0)==(e[T>>2]|0)?Se[e[(e[m>>2]|0)+40>>2]&127](m)|0:e[p>>2]=A+1,a=a+1|0}while(!1);if(m=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((X|0)==13){e[o>>2]=4;break}else if((X|0)==17){e[o>>2]=4;break}else if((X|0)==20){e[o>>2]=4;break}else if((X|0)==57){e[o>>2]=4,m=e[r>>2]|0;break}}while(!1);m?(e[m+12>>2]|0)==(e[m+16>>2]|0)&&(Se[e[(e[m>>2]|0)+36>>2]&127](m)|0)==-1&&(e[r>>2]=0,m=0):m=0,a=(m|0)==0,A=e[n>>2]|0;do if(A){if((e[A+12>>2]|0)==(e[A+16>>2]|0)&&(Se[e[(e[A>>2]|0)+36>>2]&127](A)|0)==-1){e[n>>2]=0,X=67;break}a||(X=68)}else X=67;while(!1);return(X|0)==67&&a&&(X=68),(X|0)==68&&(e[o>>2]=e[o>>2]|2),y=K,m|0}function nu(t){t=t|0}function su(t){t=t|0,l0(t)}function ou(t){return t=t|0,2}function lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=vt(t,m,c,s,o,l,58907,58915)|0,y=a,t|0}function au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,T=t+8|0,T=Se[e[(e[T>>2]|0)+20>>2]&127](T)|0,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],n=d[T>>0]|0,D=(n&1)==0,r=D?T+1|0:e[T+8>>2]|0,n=r+(D?(n&255)>>>1:e[T+4>>2]|0)|0,e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=vt(t,m,c,s,o,l,r,n)|0,y=a,t|0}function fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],v2(t,l+24|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function v2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0;a=y,y=y+16|0,c=a+4|0,m=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],n=(dr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],w2(t,l+16|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function w2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0;a=y,y=y+16|0,c=a+4|0,m=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],n=(dr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function cu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],x2(t,l+20|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function x2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function hu(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0,vi=0,xi=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,m=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,Qe=_0+120|0,Be=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,xi=_0+96|0,mi=_0+92|0,A=_0+88|0,p=_0+84|0,T=_0+80|0,D=_0+76|0,E=_0+72|0,U=_0+68|0,V=_0+64|0,q=_0+60|0,O=_0+56|0,R=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,J=_0+32|0,s0=_0+28|0,w0=_0+24|0,S0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,$e=_0+4|0,We=_0,e[o>>2]=0,_e=li(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44220)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ie(_e)|0,r0(Pe|0)),Ie(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[m>>2]=e[F>>2],v2(t,l+24|0,r,m,o,le),he=28;break}case 104:case 66:case 98:{e[Qe>>2]=e[n>>2],e[m>>2]=e[Qe>>2],w2(t,l+16|0,r,m,o,le),he=28;break}case 99:{he=t+8|0,he=Se[e[(e[he>>2]|0)+12>>2]&127](he)|0,e[Be>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[Be>>2],e[m>>2]=e[ne>>2],he=vt(t,c,m,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[m>>2]=e[fe>>2],mu(t,l+12|0,r,m,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[xi>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[m>>2]=e[xi>>2],he=vt(t,c,m,s,o,l,58915,58923)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[A>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[m>>2]=e[A>>2],he=vt(t,c,m,s,o,l,58923,58931)|0,e[r>>2]=he,he=28;break}case 72:{e[p>>2]=e[n>>2],e[m>>2]=e[p>>2],du(t,l+8|0,r,m,o,le),he=28;break}case 73:{e[T>>2]=e[n>>2],e[m>>2]=e[T>>2],gu(t,l+8|0,r,m,o,le),he=28;break}case 106:{e[D>>2]=e[n>>2],e[m>>2]=e[D>>2],pu(t,l+28|0,r,m,o,le),he=28;break}case 109:{e[E>>2]=e[n>>2],e[m>>2]=e[E>>2],Au(t,l+16|0,r,m,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[m>>2]=e[U>>2],Su(t,l+4|0,r,m,o,le),he=28;break}case 116:case 110:{e[V>>2]=e[n>>2],e[m>>2]=e[V>>2],vu(t,r,m,o,le),he=28;break}case 112:{e[q>>2]=e[n>>2],e[m>>2]=e[q>>2],wu(t,l+8|0,r,m,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[R>>2]=e[n>>2],e[c>>2]=e[O>>2],e[m>>2]=e[R>>2],he=vt(t,c,m,s,o,l,58931,58942)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[m>>2]=e[X>>2],he=vt(t,c,m,s,o,l,58942,58947)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[m>>2]=e[K>>2],xu(t,l,r,m,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[J>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[m>>2]=e[J>>2],he=vt(t,c,m,s,o,l,58947,58955)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[m>>2]=e[s0>>2],Cu(t,l+24|0,r,m,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[S0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[m>>2]=e[S0>>2],c=rr[Pe&63](t,c,m,s,o,l)|0;break}case 88:{he=t+8|0,he=Se[e[(e[he>>2]|0)+24>>2]&127](he)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[A0>>2],e[m>>2]=e[Y0>>2],he=vt(t,c,m,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[m>>2]=e[Re>>2],x2(t,l+20|0,r,m,o,le),he=28;break}case 89:{e[$e>>2]=e[n>>2],e[m>>2]=e[$e>>2],Tu(t,l+20|0,r,m,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[m>>2]=e[We>>2],yu(t,r,m,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function du(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function pu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Su(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function vu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;a=o+8|0;e:for(;;){o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)!=(e[t+16>>2]|0)){if(o)break;break e}if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)!=-1){if(o)break;break e}else{e[n>>2]=0,c=12;break}}else c=12;while(!1);if((c|0)==12)if(c=0,o){t=0;break}else t=0;if(o=e[r>>2]|0,l=e[o+12>>2]|0,(l|0)==(e[o+16>>2]|0)?o=Se[e[(e[o>>2]|0)+36>>2]&127](o)|0:o=N[l>>0]|0,(o&255)<<24>>24<=-1||!(k[(e[a>>2]|0)+(o<<24>>24<<1)>>1]&8192))break;if(o=e[r>>2]|0,t=o+12|0,l=e[t>>2]|0,(l|0)==(e[o+16>>2]|0)){Se[e[(e[o>>2]|0)+40>>2]&127](o)|0;continue}else{e[t>>2]=l+1;continue}}o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=32;break}o||(c=33)}else c=32;while(!1);(c|0)==32&&o&&(c=33),(c|0)==33&&(e[s>>2]=e[s>>2]|2)}function wu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;p=y,y=y+16|0,c=p+4|0,m=p,A=t+8|0,A=Se[e[(e[A>>2]|0)+8>>2]&127](A)|0,t=d[A>>0]|0,t&1?a=e[A+4>>2]|0:a=(t&255)>>>1,t=d[A+12>>0]|0,t&1?t=e[A+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],t=dr(n,c,A,A+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(A|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-A|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=p}function xu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Cu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Tu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function yu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}else t=0;while(!1);l=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=11;break}l?(a=t,c=13):c=12}else c=11;while(!1);(c|0)==11&&(l?c=12:(a=0,c=13));e:do if((c|0)==12)e[s>>2]=e[s>>2]|6;else if((c|0)==13){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=N[l>>0]|0,(ze[e[(e[o>>2]|0)+36>>2]&63](o,t&255,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,o=e[l>>2]|0,(o|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?c=21:t=0):(e[l>>2]=o+1,c=21);do if((c|0)==21&&(e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}while(!1);t=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)&&(Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[n>>2]=0,c=30;break}if(t)break e}else c=30;while(!1);if((c|0)==30&&!t)break;e[s>>2]=e[s>>2]|2}while(!1)}function wt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;M=y,y=y+32|0,V=M+16|0,U=M+12|0,R=M+8|0,q=M+4|0,O=M,m=li(s)|0,e[R>>2]=m,f=0,R=y0(37,R|0,44212)|0,E=f,f=0,E&1&&(M=b()|0,Ie(m)|0,r0(M|0)),Ie(m)|0,e[o>>2]=0,m=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){p=m,m?(A=e[m+12>>2]|0,(A|0)==(e[m+16>>2]|0)?A=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:A=e[A>>2]|0,(A|0)==-1?(e[r>>2]=0,m=0,D=1,E=0):(D=0,E=p)):(m=0,D=1,E=p),T=e[n>>2]|0,A=T;do if(T)if(p=e[T+12>>2]|0,(p|0)==(e[T+16>>2]|0)?p=Se[e[(e[T>>2]|0)+36>>2]&127](T)|0:p=e[p>>2]|0,(p|0)!=-1){if(D)break;F=17;break i}else{e[n>>2]=0,A=0,F=15;break}else F=15;while(!1);if((F|0)==15)if(F=0,D){F=17;break}else T=0;t:do if((ze[e[(e[R>>2]|0)+52>>2]&63](R,e[a>>2]|0,0)|0)<<24>>24==37){if(p=a+4|0,(p|0)==(c|0)){F=21;break i}switch(D=ze[e[(e[R>>2]|0)+52>>2]&63](R,e[p>>2]|0,0)|0,D<<24>>24){case 48:case 69:{if(T=a+8|0,(T|0)==(c|0)){F=24;break i}a=p,p=ze[e[(e[R>>2]|0)+52>>2]&63](R,e[T>>2]|0,0)|0,m=D;break}default:p=D,m=0}D=e[(e[t>>2]|0)+36>>2]|0,e[q>>2]=E,e[O>>2]=A,e[U>>2]=e[q>>2],e[V>>2]=e[O>>2],E=Ct[D&15](t,U,V,s,o,l,p,m)|0,e[r>>2]=E,a=a+8|0}else{if(!(ze[e[(e[R>>2]|0)+12>>2]&63](R,8192,e[a>>2]|0)|0)){if(p=m+12|0,A=e[p>>2]|0,T=m+16|0,(A|0)==(e[T>>2]|0)?A=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:A=e[A>>2]|0,E=Ni[e[(e[R>>2]|0)+28>>2]&63](R,A)|0,(E|0)!=(Ni[e[(e[R>>2]|0)+28>>2]&63](R,e[a>>2]|0)|0)){F=61;break i}A=e[p>>2]|0,(A|0)==(e[T>>2]|0)?Se[e[(e[m>>2]|0)+40>>2]&127](m)|0:e[p>>2]=A+4,a=a+4|0;break}do if(a=a+4|0,(a|0)==(c|0)){a=c;break}while(ze[e[(e[R>>2]|0)+12>>2]&63](R,8192,e[a>>2]|0)|0);for(A=T,D=T;;){m?(p=e[m+12>>2]|0,(p|0)==(e[m+16>>2]|0)?p=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:p=e[p>>2]|0,(p|0)==-1?(e[r>>2]=0,T=1,m=0):T=0):(T=1,m=0);do if(D)if(p=e[D+12>>2]|0,(p|0)==(e[D+16>>2]|0)?p=Se[e[(e[D>>2]|0)+36>>2]&127](D)|0:p=e[p>>2]|0,(p|0)!=-1)if(T^(A|0)==0){E=A,D=A;break}else break t;else{e[n>>2]=0,A=0,F=44;break}else F=44;while(!1);if((F|0)==44){if(F=0,T)break t;E=A,D=0}if(p=m+12|0,A=e[p>>2]|0,T=m+16|0,(A|0)==(e[T>>2]|0)?A=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:A=e[A>>2]|0,!(ze[e[(e[R>>2]|0)+12>>2]&63](R,8192,A)|0))break t;if(A=e[p>>2]|0,(A|0)==(e[T>>2]|0)){Se[e[(e[m>>2]|0)+40>>2]&127](m)|0,A=E;continue}else{e[p>>2]=A+4,A=E;continue}}}while(!1);if(m=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((F|0)==17){e[o>>2]=4;break}else if((F|0)==21){e[o>>2]=4;break}else if((F|0)==24){e[o>>2]=4;break}else if((F|0)==61){e[o>>2]=4,m=e[r>>2]|0;break}}while(!1);m?(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)?a=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:a=e[a>>2]|0,(a|0)==-1?(e[r>>2]=0,m=0,p=1):p=0):(m=0,p=1),a=e[n>>2]|0;do if(a)if(A=e[a+12>>2]|0,(A|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[A>>2]|0,(a|0)!=-1){if(p)break;F=76;break}else{e[n>>2]=0,F=74;break}else F=74;while(!1);return(F|0)==74&&p&&(F=76),(F|0)==76&&(e[o>>2]=e[o>>2]|2),y=M,m|0}function Du(t){t=t|0}function Iu(t){t=t|0,l0(t)}function ku(t){return t=t|0,2}function Eu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=wt(t,m,c,s,o,l,44788,44820)|0,y=a,t|0}function Fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,E=t+8|0,E=Se[e[(e[E>>2]|0)+20>>2]&127](E)|0,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],T=d[E>>0]|0,D=(T&1)==0,n=E+4|0,r=D?n:e[E+8>>2]|0,n=r+((D?(T&255)>>>1:e[n>>2]|0)<<2)|0,e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=wt(t,m,c,s,o,l,r,n)|0,y=a,t|0}function Mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],C2(t,l+24|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function C2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0;a=y,y=y+16|0,c=a+4|0,m=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],n=(gr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function _u(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],T2(t,l+16|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function T2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0;a=y,y=y+16|0,c=a+4|0,m=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],n=(gr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function Ru(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(A=y,y=y+16|0,c=A+8|0,a=A+4|0,m=A,s=li(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,p=f,f=0,p&1)p=b()|0,Ie(s)|0,r0(p|0);else return Ie(s)|0,e[m>>2]=e[n>>2],e[c>>2]=e[m>>2],y2(t,l+20|0,r,c,o,a),y=A,e[r>>2]|0;return 0}function y2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function Pu(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0,vi=0,xi=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,m=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,Qe=_0+120|0,Be=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,xi=_0+96|0,mi=_0+92|0,A=_0+88|0,p=_0+84|0,T=_0+80|0,D=_0+76|0,E=_0+72|0,U=_0+68|0,V=_0+64|0,q=_0+60|0,O=_0+56|0,R=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,J=_0+32|0,s0=_0+28|0,w0=_0+24|0,S0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,$e=_0+4|0,We=_0,e[o>>2]=0,_e=li(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44212)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ie(_e)|0,r0(Pe|0)),Ie(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[m>>2]=e[F>>2],C2(t,l+24|0,r,m,o,le),he=28;break}case 104:case 66:case 98:{e[Qe>>2]=e[n>>2],e[m>>2]=e[Qe>>2],T2(t,l+16|0,r,m,o,le),he=28;break}case 99:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+12>>2]&127](Pe)|0,e[Be>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[Be>>2],e[m>>2]=e[ne>>2],he=wt(t,c,m,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[m>>2]=e[fe>>2],Lu(t,l+12|0,r,m,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[xi>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[m>>2]=e[xi>>2],he=wt(t,c,m,s,o,l,44820,44852)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[A>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[m>>2]=e[A>>2],he=wt(t,c,m,s,o,l,44852,44884)|0,e[r>>2]=he,he=28;break}case 72:{e[p>>2]=e[n>>2],e[m>>2]=e[p>>2],Uu(t,l+8|0,r,m,o,le),he=28;break}case 73:{e[T>>2]=e[n>>2],e[m>>2]=e[T>>2],Ou(t,l+8|0,r,m,o,le),he=28;break}case 106:{e[D>>2]=e[n>>2],e[m>>2]=e[D>>2],Nu(t,l+28|0,r,m,o,le),he=28;break}case 109:{e[E>>2]=e[n>>2],e[m>>2]=e[E>>2],Vu(t,l+16|0,r,m,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[m>>2]=e[U>>2],Bu(t,l+4|0,r,m,o,le),he=28;break}case 116:case 110:{e[V>>2]=e[n>>2],e[m>>2]=e[V>>2],qu(t,r,m,o,le),he=28;break}case 112:{e[q>>2]=e[n>>2],e[m>>2]=e[q>>2],bu(t,l+8|0,r,m,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[R>>2]=e[n>>2],e[c>>2]=e[O>>2],e[m>>2]=e[R>>2],he=wt(t,c,m,s,o,l,44884,44928)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[m>>2]=e[X>>2],he=wt(t,c,m,s,o,l,44928,44948)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[m>>2]=e[K>>2],Gu(t,l,r,m,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[J>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[m>>2]=e[J>>2],he=wt(t,c,m,s,o,l,44948,44980)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[m>>2]=e[s0>>2],zu(t,l+24|0,r,m,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[S0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[m>>2]=e[S0>>2],c=rr[Pe&63](t,c,m,s,o,l)|0;break}case 88:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+24>>2]&127](Pe)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[A0>>2],e[m>>2]=e[Y0>>2],he=wt(t,c,m,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[m>>2]=e[Re>>2],y2(t,l+20|0,r,m,o,le),he=28;break}case 89:{e[$e>>2]=e[n>>2],e[m>>2]=e[$e>>2],Qu(t,l+20|0,r,m,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[m>>2]=e[We>>2],Hu(t,r,m,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function Lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Ou(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Nu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Vu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function qu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;e:for(;;){t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){a=l;break}else{a=l;break e}else{e[n>>2]=0,c=15;break}else c=15;while(!1);if((c|0)==15)if(c=0,a){a=0;break}else a=0;if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,!(ze[e[(e[o>>2]|0)+12>>2]&63](o,8192,t)|0))break;if(t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)){Se[e[(e[t>>2]|0)+40>>2]&127](t)|0;continue}else{e[l>>2]=a+4;continue}}t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}else l=1;while(!1);do if(a)if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)?t=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break;c=39;break}else{e[n>>2]=0,c=37;break}else c=37;while(!1);(c|0)==37&&l&&(c=39),(c|0)==39&&(e[s>>2]=e[s>>2]|2)}function bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;p=y,y=y+16|0,c=p+4|0,m=p,A=t+8|0,A=Se[e[(e[A>>2]|0)+8>>2]&127](A)|0,t=d[A>>0]|0,t&1?a=e[A+4>>2]|0:a=(t&255)>>>1,t=d[A+12>>0]|0,t&1?t=e[A+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[m>>2]=e[s>>2],e[c>>2]=e[m>>2],t=gr(n,c,A,A+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(A|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-A|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=p}function Gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function zu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Qu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function Hu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0;t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){c=l,m=17;break}else{m=16;break}else{e[n>>2]=0,m=14;break}else m=14;while(!1);(m|0)==14&&(a?m=16:(c=0,m=17));e:do if((m|0)==16)e[s>>2]=e[s>>2]|6;else if((m|0)==17){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(ze[e[(e[o>>2]|0)+52>>2]&63](o,t,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?m=25:l=1):(e[l>>2]=a+4,m=25);do if((m|0)==25)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}while(!1);do if(c)if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)?t=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break e;break}else{e[n>>2]=0,m=37;break}else m=37;while(!1);if((m|0)==37&&!l)break;e[s>>2]=e[s>>2]|2}while(!1)}function Yu(t){t=t|0,lr(t+8|0)}function lr(t){t=t|0;var r=0,n=0,s=0;r=e[t>>2]|0,f=0,n=p0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,De(s)}function ju(t){t=t|0,lr(t+8|0),l0(t)}function Xu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0;if(m=y,y=y+112|0,c=m+4|0,n=m,e[n>>2]=c+100,D2(t+8|0,c,n,o,l,a),o=e[n>>2]|0,n=e[r>>2]|0,(c|0)!=(o|0))do{a=d[c>>0]|0;do if(n)if(s=n+24|0,l=e[s>>2]|0,(l|0)==(e[n+28>>2]|0)){r=(Ni[e[(e[n>>2]|0)+52>>2]&63](n,a&255)|0)==-1,n=r?0:n;break}else{e[s>>2]=l+1,d[l>>0]=a;break}else n=0;while(!1);c=c+1|0}while((c|0)!=(o|0));return y=m,n|0}function D2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0;A=y,y=y+16|0,m=A,d[m>>0]=37,a=m+1|0,d[a>>0]=o,c=m+2|0,d[c>>0]=l,d[m+3>>0]=0,l<<24>>24&&(d[a>>0]=l,d[c>>0]=o),t=r+(Bn(r|0,(e[n>>2]|0)-r|0,m|0,s|0,e[t>>2]|0)|0)|0,e[n>>2]=t,y=A}function Ku(t){t=t|0,lr(t+8|0)}function Wu(t){t=t|0,lr(t+8|0),l0(t)}function Zu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0;if(c=y,y=y+416|0,s=c+8|0,n=c,e[n>>2]=s+400,Ju(t+8|0,s,n,o,l,a),t=e[n>>2]|0,n=e[r>>2]|0,(s|0)!=(t|0)){o=s;do s=e[o>>2]|0,n?(l=n+24|0,a=e[l>>2]|0,(a|0)==(e[n+28>>2]|0)?s=Ni[e[(e[n>>2]|0)+52>>2]&63](n,s)|0:(e[l>>2]=a+4,e[a>>2]=s),n=(s|0)==-1?0:n):n=0,o=o+4|0;while((o|0)!=(t|0))}return y=c,n|0}function Ju(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;if(a=y,y=y+128|0,A=a+16|0,p=a+12|0,c=a,m=a+8|0,e[p>>2]=A+100,D2(t,A,p,s,o,l),o=c,e[o>>2]=0,e[o+4>>2]=0,e[m>>2]=A,o=(e[n>>2]|0)-r>>2,l=nt(e[t>>2]|0)|0,f=0,o=E0(18,r|0,m|0,o|0,c|0)|0,t=f,f=0,t&1&&(o=b()|0,l|0&&(f=0,u0(75,l|0)|0,p=f,f=0,p&1)&&(p=b(0)|0,De(p)),r0(o|0)),l|0&&(f=0,u0(75,l|0)|0,p=f,f=0,p&1)&&(p=b(0)|0,De(p)),(o|0)==-1)ar(58955);else{e[n>>2]=r+(o<<2),y=a;return}}function $u(t){t=t|0}function ic(t){t=t|0,l0(t)}function tc(t){return t=t|0,127}function rc(t){return t=t|0,127}function nc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function sc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function oc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function ac(t,r){t=t|0,r=r|0,f1(t,1,45)}function fc(t){return t=t|0,0}function uc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function cc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function hc(t){t=t|0}function mc(t){t=t|0,l0(t)}function dc(t){return t=t|0,127}function gc(t){return t=t|0,127}function pc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Ac(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Sc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function vc(t,r){t=t|0,r=r|0,f1(t,1,45)}function wc(t){return t=t|0,0}function xc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Cc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Tc(t){t=t|0}function yc(t){t=t|0,l0(t)}function Dc(t){return t=t|0,2147483647}function Ic(t){return t=t|0,2147483647}function kc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Ec(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Fc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Mc(t,r){t=t|0,r=r|0,h1(t,1,45)}function _c(t){return t=t|0,0}function Rc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Pc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Lc(t){t=t|0}function Uc(t){t=t|0,l0(t)}function Oc(t){return t=t|0,2147483647}function Nc(t){return t=t|0,2147483647}function Vc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function Bc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function qc(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function bc(t,r){t=t|0,r=r|0,h1(t,1,45)}function Gc(t){return t=t|0,0}function zc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Qc(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Hc(t){t=t|0}function Yc(t){t=t|0,l0(t)}function jc(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;if(t0=y,y=y+240|0,X=t0+24|0,K=t0,t=t0+136|0,s0=t0+16|0,M=t0+12|0,J=t0+8|0,T=t0+134|0,m=t0+4|0,F=t0+124|0,e[s0>>2]=t,w0=s0+4|0,e[w0>>2]=189,A=t+100|0,f=0,c=u0(68,o|0)|0,R=f,f=0,R&1)m=b()|0,e[s0>>2]=0,c=189,A0=45;else{e[J>>2]=c,f=0,t=y0(37,J|0,44220)|0,R=f,f=0;e:do if(!(R&1)&&(d[T>>0]=0,e[m>>2]=e[n>>2],p=e[o+4>>2]|0,f=0,e[X>>2]=e[m>>2],p=Me(1,r|0,X|0,s|0,J|0,p|0,l|0,T|0,t|0,s0|0,M|0,A|0)|0,R=f,f=0,!(R&1))){i:do if(p){if(f=0,E0(e[(e[t>>2]|0)+32>>2]|0,t|0,58976,58986,F|0)|0,R=f,f=0,R&1){A0=10;break e}m=e[M>>2]|0,A=e[s0>>2]|0,t=m-A|0,(t|0)>98?(t=Ti(t+2|0)|0,c=t,t?A0=13:(f=0,we(6),R=f,f=0,R&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[T>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+10|0,R=F,A>>>0>>0){p=F+1|0,s=p+1|0,o=s+1|0,T=o+1|0,D=T+1|0,E=D+1|0,U=E+1|0,V=U+1|0,q=V+1|0;do{m=d[A>>0]|0;do if((d[F>>0]|0)!=m<<24>>24)if((d[p>>0]|0)!=m<<24>>24)if((d[s>>0]|0)!=m<<24>>24)if((d[o>>0]|0)!=m<<24>>24)if((d[T>>0]|0)==m<<24>>24)m=T;else{if((d[D>>0]|0)==m<<24>>24){m=D;break}if((d[E>>0]|0)==m<<24>>24){m=E;break}if((d[U>>0]|0)==m<<24>>24){m=U;break}if((d[V>>0]|0)==m<<24>>24){m=V;break}m=(d[q>>0]|0)==m<<24>>24?q:O}else m=o;else m=s;else m=p;else m=F;while(!1);d[t>>0]=d[58976+(m-R)>>0]|0,A=A+1|0,t=t+1|0}while(A>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){m=t,c=s0;break e}Ze(c),m=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[n>>2]=0,A0=37;break}}c||(A0=38)}else A0=37;while(!1);return(A0|0)==37&&c&&(A0=38),(A0|0)==38&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ie(e[J>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[w0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,De(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(m=b()|0,c=s0),Ie(e[J>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[w0>>2]|0,A0=45):S0=m}return(A0|0)==45&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,De(A0)):S0=m),r0(S0|0),0}function Xc(t){t=t|0}function Kc(t,r,n,s,o,l,a,c,m,A,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0;var T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0,vi=0,xi=0,mi=0,_0=0,he=0,Pe=0,oi=0,ii=0,fi=0,yi=0,gi=0,Tt=0,ki=0;gi=y,y=y+512|0,le=gi+88|0,U=gi+96|0,ki=gi+80|0,vi=gi+72|0,fe=gi+68|0,xi=gi+500|0,Be=gi+497|0,mi=gi+496|0,Pe=gi+56|0,yi=gi+44|0,ii=gi+32|0,oi=gi+20|0,fi=gi+8|0,ne=gi+4|0,he=gi,e[le>>2]=p,e[ki>>2]=U,Tt=ki+4|0,e[Tt>>2]=189,e[vi>>2]=U,e[fe>>2]=U+400,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[yi>>2]=0,e[yi+4>>2]=0,e[yi+8>>2]=0,e[ii>>2]=0,e[ii+4>>2]=0,e[ii+8>>2]=0,e[oi>>2]=0,e[oi+4>>2]=0,e[oi+8>>2]=0,e[fi>>2]=0,e[fi+4>>2]=0,e[fi+8>>2]=0,f=0,Ci(1,n|0,s|0,xi|0,Be|0,mi|0,Pe|0,yi|0,ii|0,oi|0,ne|0),_e=f,f=0;e:do if(_e&1)c=b()|0;else{e[A>>2]=e[m>>2],A0=c+8|0,Y0=ii+4|0,Qe=oi+4|0,Re=oi+8|0,$e=oi+1|0,We=ii+8|0,_e=ii+1|0,F=(o&512|0)!=0,M=yi+8|0,X=yi+1|0,K=yi+4|0,t0=fi+4|0,J=fi+8|0,s0=fi+1|0,w0=xi+3|0,S0=Pe+4|0,R=0,E=0;i:for(;;){p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);p=(p|0)==0,c=e[r>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0))if(p){O=c;break}else{_0=235;break i}if(f=0,n=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=24;break i}if((n|0)!=-1)if(p){O=c;break}else{_0=235;break i}else{e[r>>2]=0,_0=15;break}}else _0=15;while(!1);if((_0|0)==15)if(_0=0,p){_0=235;break}else O=0;t:do switch(d[xi+R>>0]|0){case 1:{if((R|0)!=3){if(p=e[t>>2]|0,c=e[p+12>>2]|0,(c|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else p=N[c>>0]|0;if((p&255)<<24>>24<=-1){_0=40;break i}if(!(k[(e[A0>>2]|0)+(p<<24>>24<<1)>>1]&8192)){_0=40;break i}if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else e[c>>2]=n+1,p=N[n>>0]|0;if(f=0,h0(67,fi|0,p&255|0),_0=f,f=0,_0&1){_0=24;break i}else p=O,s=O,_0=42}break}case 0:{(R|0)!=3&&(p=O,s=O,_0=42);break}case 3:{if(c=d[ii>>0]|0,p=c&1?e[Y0>>2]|0:(c&255)>>>1,n=d[oi>>0]|0,s=n&1?e[Qe>>2]|0:(n&255)>>>1,(p|0)!=(0-s|0)){if(!p){if(p=e[t>>2]|0,c=e[p+12>>2]|0,(c|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[oi>>0]|0}else p=N[c>>0]|0,c=n;if((p&255)<<24>>24!=(d[(c&1?e[Re>>2]|0:$e)>>0]|0))break t;if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[oi>>0]|0,E=(O&1?e[Qe>>2]|0:(O&255)>>>1)>>>0>1?oi:E;break t}if(o=e[t>>2]|0,T=e[o+12>>2]|0,n=e[o+16>>2]|0,p=(T|0)==(n|0),!s){if(p){if(f=0,p=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[ii>>0]|0}else p=N[T>>0]|0;if((p&255)<<24>>24!=(d[(c&1?e[We>>2]|0:_e)>>0]|0)){d[a>>0]=1;break t}if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;O=d[ii>>0]|0,E=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ii:E;break t}if(p){if(f=0,p=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}n=e[t>>2]|0,c=d[ii>>0]|0,o=n,T=e[n+12>>2]|0,n=e[n+16>>2]|0}else p=N[T>>0]|0;if(s=o+12|0,n=(T|0)==(n|0),(p&255)<<24>>24==(d[(c&1?e[We>>2]|0:_e)>>0]|0)){if(n){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[s>>2]=T+1;O=d[ii>>0]|0,E=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ii:E;break t}if(n){if(f=0,p=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else p=N[T>>0]|0;if((p&255)<<24>>24!=(d[(d[oi>>0]&1?e[Re>>2]|0:$e)>>0]|0)){_0=104;break i}if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[oi>>0]|0,E=(O&1?e[Qe>>2]|0:(O&255)>>>1)>>>0>1?oi:E}break}case 2:{if(!(R>>>0<2|(E|0)!=0)&&!(F|(R|0)==2&(d[w0>>0]|0)!=0)){E=0;break t}V=d[yi>>0]|0,p=(V&1)==0,q=e[M>>2]|0,n=p?X:q,D=n;r:do if(R|0&&(N[xi+(R+-1)>>0]|0)<2){T=p?(V&255)>>>1:e[K>>2]|0,s=n+T|0,o=e[A0>>2]|0;n:do if(!T)c=D;else{T=n,c=D;do{if(p=d[T>>0]|0,p<<24>>24<=-1||!(k[o+(p<<24>>24<<1)>>1]&8192))break n;T=T+1|0,c=T}while((T|0)!=(s|0))}while(!1);if(s=c-D|0,o=d[fi>>0]|0,p=(o&1)==0,o=p?(o&255)>>>1:e[t0>>2]|0,o>>>0>=s>>>0){if(p=p?s0:e[J>>2]|0,T=p+o|0,(c|0)!=(D|0))for(p=p+(o-s)|0;;){if((d[p>>0]|0)!=(d[n>>0]|0)){c=D;break r}if(p=p+1|0,(p|0)==(T|0))break;n=n+1|0}}else c=D}else c=D;while(!1);p=(V&1)==0,p=(p?X:q)+(p?(V&255)>>>1:e[K>>2]|0)|0;r:do if((c|0)!=(p|0))for(o=O,s=O,p=c;;){c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){c=o,T=s;break}else break r;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)!=-1)if(n^(o|0)==0){c=o,T=o;break}else break r;else{e[r>>2]=0,c=0,_0=131;break}}else c=o,_0=131;while(!1);if((_0|0)==131){if(_0=0,n)break r;T=0}if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else n=N[s>>0]|0;if((n&255)<<24>>24!=(d[p>>0]|0))break r;if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else e[s>>2]=o+1;if(p=p+1|0,n=d[yi>>0]|0,O=(n&1)==0,n=(O?X:e[M>>2]|0)+(O?(n&255)>>>1:e[K>>2]|0)|0,(p|0)==(n|0)){p=n;break}else o=c,s=T}while(!1);if(F&&(O=d[yi>>0]|0,q=(O&1)==0,(p|0)!=((q?X:e[M>>2]|0)+(q?(O&255)>>>1:e[K>>2]|0)|0))){_0=143;break i}break}case 4:{D=d[mi>>0]|0,c=O,o=O,p=0;r:for(;;){n=e[t>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)==-1){e[t>>2]=0,n=0;break}else{n=e[t>>2]|0;break}}}else n=0;while(!1);s=(n|0)==0;do if(o){if((e[o+12>>2]|0)!=(e[o+16>>2]|0))if(s){T=c;break}else{s=c;break r}if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)!=-1)if(s^(c|0)==0){T=c,o=c;break}else{s=c;break r}else{e[r>>2]=0,c=0,_0=156;break}}else _0=156;while(!1);if((_0|0)==156)if(_0=0,s){s=c;break}else T=c,o=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}}else c=N[n>>0]|0;if(n=c&255,n<<24>>24>-1&&k[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048){if(c=e[A>>2]|0,(c|0)==(e[le>>2]|0)){if(f=0,d0(12,m|0,A|0,le|0),O=f,f=0,O&1){_0=23;break i}c=e[A>>2]|0}e[A>>2]=c+1,d[c>>0]=n,p=p+1|0}else{if(O=d[Pe>>0]|0,!(n<<24>>24==D<<24>>24&(p|0?((O&1?e[S0>>2]|0:(O&255)>>>1)|0)!=0:0))){s=T;break}if((U|0)==(e[fe>>2]|0)){if(f=0,d0(13,ki|0,vi|0,fe|0),O=f,f=0,O&1){_0=23;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=p,U=O,p=0}if(c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}else{c=T;continue}else{e[n>>2]=s+1,c=T;continue}}if(p|0&&(e[ki>>2]|0)!=(U|0)){if((U|0)==(e[fe>>2]|0)){if(f=0,d0(13,ki|0,vi|0,fe|0),O=f,f=0,O&1){_0=24;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=p,U=O}if(T=e[ne>>2]|0,(T|0)>0){p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);p=(p|0)==0;do if(s){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=24;break i}if((c|0)==-1){e[r>>2]=0,_0=193;break}}if(!p){_0=198;break i}}else _0=193;while(!1);if((_0|0)==193)if(_0=0,p){_0=198;break i}else s=0;if(p=e[t>>2]|0,c=e[p+12>>2]|0,(c|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}}else p=N[c>>0]|0;if((p&255)<<24>>24!=(d[Be>>0]|0)){_0=198;break i}if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;if((T|0)>0)for(o=s,n=s,D=T;;){p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=22;break i}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);c=(p|0)==0;do if(n){if((e[n+12>>2]|0)!=(e[n+16>>2]|0))if(c){p=o,T=n;break}else{_0=222;break i}if(f=0,p=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}if((p|0)!=-1)if(c^(o|0)==0){p=o,T=o;break}else{_0=222;break i}else{e[r>>2]=0,p=0,_0=215;break}}else p=o,_0=215;while(!1);if((_0|0)==215)if(_0=0,c){_0=222;break i}else T=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if((c&255)<<24>>24<=-1){_0=222;break i}if(!(k[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048)){_0=222;break i}if((e[A>>2]|0)==(e[le>>2]|0)&&(f=0,d0(12,m|0,A|0,le|0),O=f,f=0,O&1)){_0=22;break i}if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if(n=e[A>>2]|0,e[A>>2]=n+1,d[n>>0]=c,c=D,D=D+-1|0,e[ne>>2]=D,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}}else e[s>>2]=o+1;if((c|0)<=1)break;o=p,n=T}}if((e[A>>2]|0)==(e[m>>2]|0)){_0=233;break i}break}default:}while(!1);t:do if((_0|0)==42)for(;;){_0=0,c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){o=p;break}else break t;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)!=-1)if(n^(p|0)==0){o=p,s=p;break}else break t;else{e[r>>2]=0,p=0,_0=54;break}}else _0=54;while(!1);if((_0|0)==54){if(_0=0,n)break t;o=p,s=0}if(p=e[t>>2]|0,c=e[p+12>>2]|0,(c|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,O=f,f=0,O&1){_0=20;break i}}else p=N[c>>0]|0;if((p&255)<<24>>24<=-1||!(k[(e[A0>>2]|0)+(p<<24>>24<<1)>>1]&8192))break t;if(p=e[t>>2]|0,c=p+12|0,n=e[c>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,_0=f,f=0,_0&1){_0=20;break i}}else e[c>>2]=n+1,p=N[n>>0]|0;if(f=0,h0(67,fi|0,p&255|0),_0=f,f=0,_0&1){_0=20;break i}else p=o,_0=42}while(!1);if(R=R+1|0,R>>>0>=4){_0=235;break}}i:switch(_0|0){case 20:{c=b()|0;break e}case 21:{c=b()|0;break e}case 22:{c=b()|0;break e}case 23:{c=b()|0;break e}case 24:{c=b()|0;break e}case 40:{e[l>>2]=e[l>>2]|4,c=0;break}case 104:{e[l>>2]=e[l>>2]|4,c=0;break}case 143:{e[l>>2]=e[l>>2]|4,c=0;break}case 198:{e[l>>2]=e[l>>2]|4,c=0;break}case 222:{e[l>>2]=e[l>>2]|4,c=0;break}case 233:{e[l>>2]=e[l>>2]|4,c=0;break}case 235:{t:do if(E){o=E+1|0,T=E+8|0,D=E+4|0,n=1;r:for(;;){if(p=d[E>>0]|0,p&1?p=e[D>>2]|0:p=(p&255)>>>1,n>>>0>=p>>>0)break t;p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){_0=19;break r}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);c=(p|0)==0,p=e[r>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){_0=19;break r}if((p|0)==-1){e[r>>2]=0,_0=253;break}}if(!c){_0=260;break r}}else _0=253;while(!1);if((_0|0)==253&&(_0=0,c)){_0=260;break}if(p=e[t>>2]|0,c=e[p+12>>2]|0,(c|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){_0=19;break}}else p=N[c>>0]|0;if(d[E>>0]&1?c=e[T>>2]|0:c=o,(p&255)<<24>>24!=(d[c+n>>0]|0)){_0=260;break}if(p=n+1|0,c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,A=f,f=0,A&1){_0=19;break}else{n=p;continue}else{e[n>>2]=s+1,n=p;continue}}if((_0|0)==19){c=b()|0;break e}else if((_0|0)==260){e[l>>2]=e[l>>2]|4,c=0;break i}}while(!1);p=e[ki>>2]|0,(p|0)!=(U|0)&&(e[he>>2]=0,Oi(Pe,p,U,he),(e[he>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,c=0):c=1;break}}return a0(fi),a0(oi),a0(ii),a0(yi),a0(Pe),p=e[ki>>2]|0,e[ki>>2]=0,p|0&&(f=0,n0(e[Tt>>2]|0,p|0),ki=f,f=0,ki&1)&&(ki=b(0)|0,De(ki)),y=gi,c|0}while(!1);return a0(fi),a0(oi),a0(ii),a0(yi),a0(Pe),p=e[ki>>2]|0,e[ki>>2]=0,p|0&&(f=0,n0(e[Tt>>2]|0,p|0),ki=f,f=0,ki&1)&&(ki=b(0)|0,De(ki)),r0(c|0),0}function ar(t){t=t|0;var r=0;r=de(8)|0,f=0,h0(90,r|0,t|0),t=f,f=0,t&1?(t=b()|0,ge(r|0),r0(t|0)):Ne(r|0,616,80)}function Wc(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;if(R=y,y=y+144|0,c=R+24|0,t=R+32|0,F=R+16|0,U=R+8|0,T=R+4|0,D=R+28|0,m=R,e[F>>2]=t,K=F+4|0,e[K>>2]=189,A=t+100|0,f=0,O=u0(68,o|0)|0,p=f,f=0,p&1)c=b()|0,e[F>>2]=0,X=36;else{e[T>>2]=O,f=0,p=y0(37,T|0,44220)|0,t=f,f=0;e:do if(!(t&1)&&(d[D>>0]=0,V=e[n>>2]|0,e[m>>2]=V,E=e[o+4>>2]|0,q=V,f=0,e[c>>2]=e[m>>2],E=Me(1,r|0,c|0,s|0,T|0,E|0,l|0,D|0,p|0,F|0,U|0,A|0)|0,o=f,f=0,!(o&1))){if(E){if(d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),d[D>>0]|0&&(f=0,t=y0(e[(e[p>>2]|0)+28>>2]|0,p|0,45)|0,o=f,f=0,o&1||(f=0,h0(67,a|0,t|0),o=f,f=0,o&1))||(f=0,m=y0(e[(e[p>>2]|0)+28>>2]|0,p|0,48)|0,o=f,f=0,o&1))break;t=e[F>>2]|0,A=e[U>>2]|0,c=A+-1|0;i:do if(t>>>0>>0)do{if((d[t>>0]|0)!=m<<24>>24)break i;t=t+1|0}while(t>>>0>>0);while(!1);if(f=0,L0(32,a|0,t|0,A|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e;if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0;do if(V){if((e[q+12>>2]|0)==(e[q+16>>2]|0)){if(f=0,t=u0(e[(e[V>>2]|0)+36>>2]|0,q|0)|0,q=f,f=0,q&1)break e;if((t|0)==-1){e[n>>2]=0,X=29;break}}c||(X=30)}else X=29;while(!1);return(X|0)==29&&c&&(X=30),(X|0)==30&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ie(O)|0,t=e[F>>2]|0,e[F>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,De(K)),y=R,c|0}while(!1);c=b()|0,Ie(O)|0,t=e[F>>2]|0,e[F>>2]=0,t?X=36:M=c}return(X|0)==36&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,De(K)):M=c),r0(M|0),0}function Zc(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0;X=y,y=y+112|0,p=X+100|0,T=X+88|0,D=X+76|0,E=X+64|0,U=X+52|0,V=X+48|0,q=X+36|0,O=X+24|0,R=X+12|0,F=X;do if(t)if(t=Pi(r,43828)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](p,t),F=e[p>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](T,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[m>>2]=e[T>>2],e[m+4>>2]=e[T+4>>2],e[m+8>>2]=e[T+8>>2],e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,a0(T),Ke[e[(e[t>>2]|0)+28>>2]&127](D,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[c>>2]=e[D>>2],e[c+4>>2]=e[D+4>>2],e[c+8>>2]=e[D+8>>2],e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,a0(D),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](E,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,De(o)),e[l>>2]=e[E>>2],e[l+4>>2]=e[E+4>>2],e[l+8>>2]=e[E+8>>2],e[E>>2]=0,e[E+4>>2]=0,e[E+8>>2]=0,a0(E),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,De(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,a0(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43764)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](V,t),V=e[V>>2]|0,d[n>>0]=V,d[n+1>>0]=V>>8,d[n+2>>0]=V>>16,d[n+3>>0]=V>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](q,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[m>>2]=e[q>>2],e[m+4>>2]=e[q+4>>2],e[m+8>>2]=e[q+8>>2],e[q>>2]=0,e[q+4>>2]=0,e[q+8>>2]=0,a0(q),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,a0(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](R,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,De(o)),e[l>>2]=e[R>>2],e[l+4>>2]=e[R+4>>2],e[l+8>>2]=e[R+8>>2],e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,a0(R),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,De(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,a0(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[A>>2]=M,y=X}function Oi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;o=d[t>>0]|0,a=t+4|0,l=e[a>>2]|0;e:do if((o&1?l:(o&255)>>>1)|0){if((r|0)!=(n|0)){if(o=n+-4|0,o>>>0>r>>>0){l=r;do c=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=c,l=l+4|0,o=o+-4|0;while(l>>>0>>0)}o=d[t>>0]|0,l=e[a>>2]|0}c=(o&1)==0,a=c?t+1|0:e[t+8>>2]|0,n=n+-4|0,t=a+(c?(o&255)>>>1:l)|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127;i:do if(n>>>0>r>>>0){for(;!(!o&&(l<<24>>24|0)!=(e[r>>2]|0));)if(a=(t-a|0)>1?a+1|0:a,r=r+4|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127,r>>>0>=n>>>0)break i;e[s>>2]=4;break e}while(!1);!o&&((e[n>>2]|0)+-1|0)>>>0>=l<<24>>24>>>0&&(e[s>>2]=4)}while(!1)}function Jc(t){t=t|0}function $c(t){t=t|0,l0(t)}function eh(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;if(t0=y,y=y+576|0,F=t0+424|0,K=t0,t=t0+24|0,s0=t0+16|0,M=t0+12|0,J=t0+8|0,T=t0+464|0,m=t0+4|0,X=t0+468|0,e[s0>>2]=t,S0=s0+4|0,e[S0>>2]=189,A=t+400|0,f=0,c=u0(68,o|0)|0,R=f,f=0,R&1)m=b()|0,e[s0>>2]=0,c=189,A0=47;else{e[J>>2]=c,f=0,t=y0(37,J|0,44212)|0,R=f,f=0;e:do if(!(R&1)&&(d[T>>0]=0,e[m>>2]=e[n>>2],p=e[o+4>>2]|0,f=0,e[F>>2]=e[m>>2],p=Me(2,r|0,F|0,s|0,J|0,p|0,l|0,T|0,t|0,s0|0,M|0,A|0)|0,R=f,f=0,!(R&1))){i:do if(p){if(f=0,E0(e[(e[t>>2]|0)+48>>2]|0,t|0,59007,59017,F|0)|0,R=f,f=0,R&1){A0=10;break e}m=e[M>>2]|0,A=e[s0>>2]|0,t=m-A|0,(t|0)>392?(t=Ti((t>>2)+2|0)|0,c=t,t?A0=13:(f=0,we(6),R=f,f=0,R&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[T>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+40|0,R=F,A>>>0>>0){p=F+4|0,s=p+4|0,o=s+4|0,T=o+4|0,D=T+4|0,E=D+4|0,U=E+4|0,V=U+4|0,q=V+4|0;do{m=e[A>>2]|0;do if((e[F>>2]|0)!=(m|0))if((e[p>>2]|0)!=(m|0))if((e[s>>2]|0)!=(m|0))if((e[o>>2]|0)!=(m|0))if((e[T>>2]|0)==(m|0))m=T;else{if((e[D>>2]|0)==(m|0)){m=D;break}if((e[E>>2]|0)==(m|0)){m=E;break}if((e[U>>2]|0)==(m|0)){m=U;break}if((e[V>>2]|0)==(m|0)){m=V;break}m=(e[q>>2]|0)==(m|0)?q:O}else m=o;else m=s;else m=p;else m=F;while(!1);d[t>>0]=d[59007+(m-R>>2)>>0]|0,A=A+4|0,t=t+1|0}while(A>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){m=t,c=s0;break e}Ze(c),m=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,m=1;break}else{m=(e[r>>2]|0)==0;break}}else m=1;while(!1);t=e[n>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)!=-1){if(m)break;A0=40;break}else{e[n>>2]=0,A0=38;break}}else A0=38;while(!1);return(A0|0)==38&&m&&(A0=40),(A0|0)==40&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ie(e[J>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[S0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,De(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(m=b()|0,c=s0),Ie(e[J>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[S0>>2]|0,A0=47):w0=m}return(A0|0)==47&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,De(A0)):w0=m),r0(w0|0),0}function ih(t,r,n,s,o,l,a,c,m,A,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0;var T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0,vi=0,xi=0,mi=0,_0=0,he=0,Pe=0,oi=0,ii=0,fi=0;oi=y,y=y+512|0,Re=oi+96|0,T=oi+104|0,fi=oi+88|0,le=oi+80|0,_e=oi+76|0,Be=oi+504|0,$e=oi+72|0,ne=oi+68|0,xi=oi+56|0,Pe=oi+44|0,_0=oi+32|0,mi=oi+20|0,he=oi+8|0,We=oi+4|0,vi=oi,e[Re>>2]=p,e[fi>>2]=T,ii=fi+4|0,e[ii>>2]=189,e[le>>2]=T,e[_e>>2]=T+400,e[xi>>2]=0,e[xi+4>>2]=0,e[xi+8>>2]=0,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[_0>>2]=0,e[_0+4>>2]=0,e[_0+8>>2]=0,e[mi>>2]=0,e[mi+4>>2]=0,e[mi+8>>2]=0,e[he>>2]=0,e[he+4>>2]=0,e[he+8>>2]=0,f=0,Ci(2,n|0,s|0,Be|0,$e|0,ne|0,xi|0,Pe|0,_0|0,mi|0,We|0),Qe=f,f=0;e:do if(Qe&1)n=b()|0;else{e[A>>2]=e[m>>2],S0=_0+4|0,A0=mi+4|0,Y0=mi+8|0,Qe=_0+8|0,M=(o&512|0)!=0,X=Pe+8|0,K=Pe+4|0,t0=he+4|0,J=he+8|0,s0=Be+3|0,w0=xi+4|0,F=0,E=0;i:for(;;){p=e[t>>2]|0;do if(p){if(n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,R=f,f=0,R&1){fe=26;break i}}else p=e[n>>2]|0;if((p|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);n=e[r>>2]|0;do if(n){if(p=e[n+12>>2]|0,(p|0)==(e[n+16>>2]|0)){if(f=0,p=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=26;break i}}else p=e[p>>2]|0;if((p|0)!=-1)if(s){R=n;break}else{U=T,fe=244;break i}else{e[r>>2]=0,fe=16;break}}else fe=16;while(!1);if((fe|0)==16)if(fe=0,s){U=T,fe=244;break}else R=0;t:do switch(d[Be+F>>0]|0){case 1:{if((F|0)!=3){if(p=e[t>>2]|0,n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else p=e[n>>2]|0;if(f=0,p=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,p|0)|0,fe=f,f=0,fe&1){fe=26;break i}if(!p){fe=42;break i}if(p=e[t>>2]|0,n=p+12|0,s=e[n>>2]|0,(s|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else e[n>>2]=s+4,p=e[s>>2]|0;if(f=0,h0(92,he|0,p|0),fe=f,f=0,fe&1){fe=26;break i}else p=R,o=R,fe=44}else p=T;break}case 0:{(F|0)==3?p=T:(p=R,o=R,fe=44);break}case 3:{if(n=d[_0>>0]|0,p=n&1?e[S0>>2]|0:(n&255)>>>1,s=d[mi>>0]|0,o=s&1?e[A0>>2]|0:(s&255)>>>1,(p|0)==(0-o|0))p=T;else{if(!p){if(p=e[t>>2]|0,n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,R=f,f=0,R&1){fe=26;break i}n=d[mi>>0]|0}else p=e[n>>2]|0,n=s;if((p|0)!=(e[(n&1?e[Y0>>2]|0:A0)>>2]|0)){p=T;break t}if(p=e[t>>2]|0,n=p+12|0,s=e[n>>2]|0,(s|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,R=f,f=0,R&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,R=d[mi>>0]|0,p=T,E=(R&1?e[A0>>2]|0:(R&255)>>>1)>>>0>1?mi:E;break t}if(D=e[t>>2]|0,U=e[D+12>>2]|0,s=e[D+16>>2]|0,p=(U|0)==(s|0),!o){if(p){if(f=0,p=u0(e[(e[D>>2]|0)+36>>2]|0,D|0)|0,R=f,f=0,R&1){fe=26;break i}n=d[_0>>0]|0}else p=e[U>>2]|0;if((p|0)!=(e[(n&1?e[Qe>>2]|0:S0)>>2]|0)){d[a>>0]=1,p=T;break t}if(p=e[t>>2]|0,n=p+12|0,s=e[n>>2]|0,(s|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,R=f,f=0,R&1){fe=26;break i}}else e[n>>2]=s+4;R=d[_0>>0]|0,p=T,E=(R&1?e[S0>>2]|0:(R&255)>>>1)>>>0>1?_0:E;break t}if(p){if(f=0,p=u0(e[(e[D>>2]|0)+36>>2]|0,D|0)|0,R=f,f=0,R&1){fe=26;break i}s=e[t>>2]|0,n=d[_0>>0]|0,D=s,U=e[s+12>>2]|0,s=e[s+16>>2]|0}else p=e[U>>2]|0;if(o=D+12|0,s=(U|0)==(s|0),(p|0)==(e[(n&1?e[Qe>>2]|0:S0)>>2]|0)){if(s){if(f=0,u0(e[(e[D>>2]|0)+40>>2]|0,D|0)|0,R=f,f=0,R&1){fe=26;break i}}else e[o>>2]=U+4;R=d[_0>>0]|0,p=T,E=(R&1?e[S0>>2]|0:(R&255)>>>1)>>>0>1?_0:E;break t}if(s){if(f=0,p=u0(e[(e[D>>2]|0)+36>>2]|0,D|0)|0,R=f,f=0,R&1){fe=26;break i}}else p=e[U>>2]|0;if((p|0)!=(e[(d[mi>>0]&1?e[Y0>>2]|0:A0)>>2]|0)){fe=107;break i}if(p=e[t>>2]|0,n=p+12|0,s=e[n>>2]|0,(s|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,R=f,f=0,R&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,R=d[mi>>0]|0,p=T,E=(R&1?e[A0>>2]|0:(R&255)>>>1)>>>0>1?mi:E}break}case 2:{if(!(F>>>0<2|(E|0)!=0)&&!(M|(F|0)==2&(d[s0>>0]|0)!=0)){p=T,E=0;break t}o=d[Pe>>0]|0,s=e[X>>2]|0,n=o&1?s:K,p=n;r:do if(F|0&&(N[Be+(F+-1)>>0]|0)<2){O=(o&1)==0;n:do if((n|0)!=((O?K:s)+((O?(o&255)>>>1:e[K>>2]|0)<<2)|0)){for(o=n;;){if(f=0,n=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,e[o>>2]|0)|0,O=f,f=0,O&1){fe=23;break i}if(!n)break;if(o=o+4|0,p=o,n=d[Pe>>0]|0,s=e[X>>2]|0,O=(n&1)==0,(o|0)==((O?K:s)+((O?(n&255)>>>1:e[K>>2]|0)<<2)|0)){o=n;break n}}o=d[Pe>>0]|0,s=e[X>>2]|0}while(!1);if(U=o&1?s:K,n=U,V=p-n>>2,q=d[he>>0]|0,D=(q&1)==0,q=D?(q&255)>>>1:e[t0>>2]|0,q>>>0>=V>>>0)if(D=D?t0:e[J>>2]|0,O=D+(q<<2)|0,!V)n=p;else for(D=D+(q-V<<2)|0;;){if((e[D>>2]|0)!=(e[U>>2]|0))break r;if(D=D+4|0,(D|0)==(O|0)){n=p;break}else U=U+4|0}}else n=p;while(!1);p=(o&1)==0,p=(p?K:s)+((p?(o&255)>>>1:e[K>>2]|0)<<2)|0;r:do if((n|0)!=(p|0))for(D=R,o=R,p=n;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=22;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,R=f,f=0,R&1){fe=22;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(D|0)==0){n=D,U=D;break}else break r;else{e[r>>2]=0,n=0,fe=136;break}}else n=D,fe=136;while(!1);if((fe|0)==136){if(fe=0,s)break r;U=0}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,R=f,f=0,R&1){fe=22;break i}}else s=e[o>>2]|0;if((s|0)!=(e[p>>2]|0))break r;if(s=e[t>>2]|0,o=s+12|0,D=e[o>>2]|0,(D|0)==(e[s+16>>2]|0)){if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,R=f,f=0,R&1){fe=22;break i}}else e[o>>2]=D+4;if(p=p+4|0,s=d[Pe>>0]|0,R=(s&1)==0,s=(R?K:e[X>>2]|0)+((R?(s&255)>>>1:e[K>>2]|0)<<2)|0,(p|0)==(s|0)){p=s;break}else D=n,o=U}while(!1);if(M&&(R=d[Pe>>0]|0,O=(R&1)==0,(p|0)!=((O?K:e[X>>2]|0)+((O?(R&255)>>>1:e[K>>2]|0)<<2)|0))){fe=148;break i}else p=T;break}case 4:{q=e[ne>>2]|0,V=R,D=R,p=T,n=0;r:for(;;){s=e[t>>2]|0;do if(s){if(o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,R=f,f=0,R&1){fe=25;break i}}else s=e[o>>2]|0;if((s|0)==-1){e[t>>2]=0,o=1;break}else{o=(e[t>>2]|0)==0;break}}else o=1;while(!1);do if(D){if(s=e[D+12>>2]|0,(s|0)==(e[D+16>>2]|0)){if(f=0,s=u0(e[(e[D>>2]|0)+36>>2]|0,D|0)|0,R=f,f=0,R&1){fe=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1)if(o^(V|0)==0){s=V,U=V;break}else{T=V;break r}else{e[r>>2]=0,s=0,fe=162;break}}else s=V,fe=162;while(!1);if((fe|0)==162)if(fe=0,o){T=s;break}else U=0;if(o=e[t>>2]|0,T=e[o+12>>2]|0,(T|0)==(e[o+16>>2]|0)){if(f=0,o=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,R=f,f=0,R&1){fe=25;break i}}else o=e[T>>2]|0;if(f=0,T=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,o|0)|0,R=f,f=0,R&1){fe=25;break i}if(T){if(T=e[A>>2]|0,(T|0)==(e[Re>>2]|0)){if(f=0,d0(14,m|0,A|0,Re|0),R=f,f=0,R&1){fe=25;break i}T=e[A>>2]|0}e[A>>2]=T+4,e[T>>2]=o,n=n+1|0}else{if(R=d[xi>>0]|0,!((o|0)==(q|0)&(n|0?((R&1?e[w0>>2]|0:(R&255)>>>1)|0)!=0:0))){T=s;break}if((p|0)==(e[_e>>2]|0)){if(f=0,d0(13,fi|0,le|0,_e|0),R=f,f=0,R&1){fe=25;break i}p=e[le>>2]|0}R=p+4|0,e[le>>2]=R,e[p>>2]=n,p=R,n=0}if(o=e[t>>2]|0,T=o+12|0,D=e[T>>2]|0,(D|0)==(e[o+16>>2]|0))if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,R=f,f=0,R&1){fe=25;break i}else{V=s,D=U;continue}else{e[T>>2]=D+4,V=s,D=U;continue}}if(n|0&&(e[fi>>2]|0)!=(p|0)){if((p|0)==(e[_e>>2]|0)){if(f=0,d0(13,fi|0,le|0,_e|0),R=f,f=0,R&1){fe=26;break i}p=e[le>>2]|0}R=p+4|0,e[le>>2]=R,e[p>>2]=n,p=R}if(U=e[We>>2]|0,(U|0)>0){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(T){if(n=e[T+12>>2]|0,(n|0)==(e[T+16>>2]|0)){if(f=0,n=u0(e[(e[T>>2]|0)+36>>2]|0,T|0)|0,R=f,f=0,R&1){fe=26;break i}}else n=e[n>>2]|0;if((n|0)!=-1){if(s)break;fe=206;break i}else{e[r>>2]=0,fe=200;break}}else fe=200;while(!1);if((fe|0)==200)if(fe=0,s){fe=206;break i}else T=0;if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)!=(e[$e>>2]|0)){fe=206;break i}if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,R=f,f=0,R&1){fe=26;break i}}else e[s>>2]=o+4;if((U|0)>0)for(D=T,o=T,V=U;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=24;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,R=f,f=0,R&1){fe=24;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(D|0)==0){n=D,U=D;break}else{fe=231;break i}else{e[r>>2]=0,n=0,fe=224;break}}else n=D,fe=224;while(!1);if((fe|0)==224)if(fe=0,s){fe=231;break i}else U=0;if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,R=f,f=0,R&1){fe=24;break i}}else s=e[o>>2]|0;if(f=0,s=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,s|0)|0,R=f,f=0,R&1){fe=24;break i}if(!s){fe=231;break i}if((e[A>>2]|0)==(e[Re>>2]|0)&&(f=0,d0(14,m|0,A|0,Re|0),R=f,f=0,R&1)){fe=24;break i}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,R=f,f=0,R&1){fe=24;break i}}else s=e[o>>2]|0;if(o=e[A>>2]|0,e[A>>2]=o+4,e[o>>2]=s,s=V,V=V+-1|0,e[We>>2]=V,o=e[t>>2]|0,T=o+12|0,D=e[T>>2]|0,(D|0)==(e[o+16>>2]|0)){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,R=f,f=0,R&1){fe=24;break i}}else e[T>>2]=D+4;if((s|0)<=1)break;D=n,o=U}}if((e[A>>2]|0)==(e[m>>2]|0)){fe=242;break i}break}default:p=T}while(!1);t:do if((fe|0)==44)for(;;){fe=0,n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,R=f,f=0,R&1){fe=21;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,R=f,f=0,R&1){fe=21;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(p|0)==0){D=p,o=p;break}else{p=T;break t}else{e[r>>2]=0,p=0,fe=57;break}}else fe=57;while(!1);if((fe|0)==57)if(fe=0,s){p=T;break t}else D=p,o=0;if(p=e[t>>2]|0,n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,R=f,f=0,R&1){fe=21;break i}}else p=e[n>>2]|0;if(f=0,p=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,p|0)|0,R=f,f=0,R&1){fe=21;break i}if(!p){p=T;break t}if(p=e[t>>2]|0,n=p+12|0,s=e[n>>2]|0,(s|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,fe=f,f=0,fe&1){fe=21;break i}}else e[n>>2]=s+4,p=e[s>>2]|0;if(f=0,h0(92,he|0,p|0),fe=f,f=0,fe&1){fe=21;break i}else p=D,fe=44}while(!1);if(F=F+1|0,F>>>0>=4){U=p,fe=244;break}else T=p}i:switch(fe|0){case 21:{n=b()|0;break e}case 22:{n=b()|0;break e}case 23:{n=b()|0;break e}case 24:{n=b()|0;break e}case 25:{n=b()|0;break e}case 26:{n=b()|0;break e}case 42:{e[l>>2]=e[l>>2]|4,n=0;break}case 107:{e[l>>2]=e[l>>2]|4,n=0;break}case 148:{e[l>>2]=e[l>>2]|4,n=0;break}case 206:{e[l>>2]=e[l>>2]|4,n=0;break}case 231:{e[l>>2]=e[l>>2]|4,n=0;break}case 242:{e[l>>2]=e[l>>2]|4,n=0;break}case 244:{t:do if(E){T=E+4|0,D=E+8|0,o=1;r:for(;;){if(p=d[E>>0]|0,p&1?p=e[T>>2]|0:p=(p&255)>>>1,o>>>0>=p>>>0)break t;p=e[t>>2]|0;do if(p){if(n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){fe=20;break r}}else p=e[n>>2]|0;if((p|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);p=e[r>>2]|0;do if(p){if(n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){fe=20;break r}}else p=e[n>>2]|0;if((p|0)!=-1){if(s)break;fe=271;break r}else{e[r>>2]=0,fe=263;break}}else fe=263;while(!1);if((fe|0)==263&&(fe=0,s)){fe=271;break}if(p=e[t>>2]|0,n=e[p+12>>2]|0,(n|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,A=f,f=0,A&1){fe=20;break}}else p=e[n>>2]|0;if(d[E>>0]&1?n=e[D>>2]|0:n=T,(p|0)!=(e[n+(o<<2)>>2]|0)){fe=271;break}if(p=o+1|0,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0))if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,A=f,f=0,A&1){fe=20;break}else{o=p;continue}else{e[s>>2]=o+4,o=p;continue}}if((fe|0)==20){n=b()|0;break e}else if((fe|0)==271){e[l>>2]=e[l>>2]|4,n=0;break i}}while(!1);p=e[fi>>2]|0,(p|0)!=(U|0)&&(e[vi>>2]=0,Oi(xi,p,U,vi),(e[vi>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,n=0):n=1;break}}return ye(he),ye(mi),ye(_0),ye(Pe),a0(xi),p=e[fi>>2]|0,e[fi>>2]=0,p|0&&(f=0,n0(e[ii>>2]|0,p|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,De(fi)),y=oi,n|0}while(!1);return ye(he),ye(mi),ye(_0),ye(Pe),a0(xi),p=e[fi>>2]|0,e[fi>>2]=0,p|0&&(f=0,n0(e[ii>>2]|0,p|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,De(fi)),r0(n|0),0}function th(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;if(R=y,y=y+432|0,c=R+424|0,t=R+24|0,M=R+16|0,U=R+8|0,T=R+4|0,D=R+428|0,m=R,e[M>>2]=t,K=M+4|0,e[K>>2]=189,A=t+400|0,f=0,O=u0(68,o|0)|0,p=f,f=0,p&1)c=b()|0,e[M>>2]=0,X=38;else{e[T>>2]=O,f=0,p=y0(37,T|0,44212)|0,t=f,f=0;e:do if(!(t&1)&&(d[D>>0]=0,V=e[n>>2]|0,e[m>>2]=V,E=e[o+4>>2]|0,q=V,f=0,e[c>>2]=e[m>>2],E=Me(2,r|0,c|0,s|0,T|0,E|0,l|0,D|0,p|0,M|0,U|0,A|0)|0,o=f,f=0,!(o&1))){if(E){if(d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,d[D>>0]|0&&(f=0,t=y0(e[(e[p>>2]|0)+44>>2]|0,p|0,45)|0,o=f,f=0,o&1||(f=0,h0(92,a|0,t|0),o=f,f=0,o&1))||(f=0,m=y0(e[(e[p>>2]|0)+44>>2]|0,p|0,48)|0,o=f,f=0,o&1))break;t=e[M>>2]|0,A=e[U>>2]|0,c=A+-4|0;i:do if(t>>>0>>0)do{if((e[t>>2]|0)!=(m|0))break i;t=t+4|0}while(t>>>0>>0);while(!1);if(f=0,L0(33,a|0,t|0,A|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,c=1;break}else{c=(e[r>>2]|0)==0;break}}else c=1;while(!1);do if(V){if(t=e[q+12>>2]|0,(t|0)==(e[q+16>>2]|0)){if(f=0,t=u0(e[(e[V>>2]|0)+36>>2]|0,q|0)|0,q=f,f=0,q&1)break e}else t=e[t>>2]|0;if((t|0)!=-1){if(c)break;X=32;break}else{e[n>>2]=0,X=30;break}}else X=30;while(!1);return(X|0)==30&&c&&(X=32),(X|0)==32&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ie(O)|0,t=e[M>>2]|0,e[M>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,De(K)),y=R,c|0}while(!1);c=b()|0,Ie(O)|0,t=e[M>>2]|0,e[M>>2]=0,t?X=38:F=c}return(X|0)==38&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,De(K)):F=c),r0(F|0),0}function rh(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0;X=y,y=y+112|0,p=X+100|0,T=X+88|0,D=X+76|0,E=X+64|0,U=X+52|0,V=X+48|0,q=X+36|0,O=X+24|0,R=X+12|0,F=X;do if(t)if(t=Pi(r,43956)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](p,t),F=e[p>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](T,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[m>>2]=e[T>>2],e[m+4>>2]=e[T+4>>2],e[m+8>>2]=e[T+8>>2],e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,ye(T),Ke[e[(e[t>>2]|0)+28>>2]&127](D,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[c>>2]=e[D>>2],e[c+4>>2]=e[D+4>>2],e[c+8>>2]=e[D+8>>2],e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,ye(D),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](E,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,De(o)),e[l>>2]=e[E>>2],e[l+4>>2]=e[E+4>>2],e[l+8>>2]=e[E+8>>2],e[E>>2]=0,e[E+4>>2]=0,e[E+8>>2]=0,a0(E),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,De(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,ye(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43892)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](V,t),V=e[V>>2]|0,d[n>>0]=V,d[n+1>>0]=V>>8,d[n+2>>0]=V>>16,d[n+3>>0]=V>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](q,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[m>>2]=e[q>>2],e[m+4>>2]=e[q+4>>2],e[m+8>>2]=e[q+8>>2],e[q>>2]=0,e[q+4>>2]=0,e[q+8>>2]=0,ye(q),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,De(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](R,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,De(o)),e[l>>2]=e[R>>2],e[l+4>>2]=e[R+4>>2],e[l+8>>2]=e[R+8>>2],e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,a0(R),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,De(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[A>>2]=M,y=X}function nh(t){t=t|0}function sh(t){t=t|0,l0(t)}function oh(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0;J=y,y=y+384|0,q=J+8|0,a=J,m=J+284|0,A=J+72|0,c=J+184|0,w0=J+68|0,X=J+80|0,R=J+77|0,K=J+76|0,S0=J+56|0,Y0=J+44|0,A0=J+32|0,p=J+28|0,V=J+84|0,M=J+24|0,F=J+20|0,O=J+16|0,e[A>>2]=m,j[q>>3]=l,m=Fn(m,100,59018,q)|0;do if(m>>>0>99)if(f=0,t=p0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,j[a>>3]=l,E=E0(17,A|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[A>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[A>>2]|0}c=Ti(E)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,E=m,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,D=f,f=0,D&1)t0=7;else{if(e[w0>>2]=c,f=0,D=y0(37,w0|0,44220)|0,T=f,f=0,!(T&1)&&(T=e[A>>2]|0,f=0,E0(e[(e[D>>2]|0)+32>>2]|0,D|0,T|0,T+E|0,U|0)|0,T=f,f=0,!(T&1))){if(E?T=(d[e[A>>2]>>0]|0)==45:T=0,e[S0>>2]=0,e[S0+4>>2]=0,e[S0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(3,n|0,T|0,w0|0,X|0,R|0,K|0,S0|0,Y0|0,A0|0,p|0),n=f,f=0,n&1)m=b()|0;else{if(p=e[p>>2]|0,(E|0)>(p|0)?(n=d[A0>>0]|0,m=d[Y0>>0]|0,m=(E-p<<1|1)+p+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(m&1?e[Y0+4>>2]|0:(m&255)>>>1)|0):(n=d[A0>>0]|0,m=d[Y0>>0]|0,m=p+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(m&1?e[Y0+4>>2]|0:(m&255)>>>1)|0),m>>>0>100?(m=Ti(m)|0,A=m,m?t0=26:(f=0,we(6),V=f,f=0,V&1||(m=0,t0=26))):(A=0,m=V,t0=26),(t0|0)==26&&(f=0,Ye(1,m|0,M|0,F|0,e[s+4>>2]|0,U|0,U+E|0,D|0,T|0,X|0,d[R>>0]|0,d[K>>0]|0,S0|0,Y0|0,A0|0,p|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[q>>2]=e[O>>2],s0=Ee(39,q|0,m|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return A&&(Ze(A),c=e[w0>>2]|0),a0(A0),a0(Y0),a0(S0),Ie(c)|0,a&&Ze(a),t&&Ze(t),y=J,s0|0;m=b()|0,A&&(Ze(A),c=e[w0>>2]|0)}a0(A0),a0(Y0),a0(S0)}else m=b()|0;Ie(c)|0}return(t0|0)==7&&(m=b()|0),a&&Ze(a),t&&Ze(t),r0(m|0),0}function lh(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;s0=y,y=y+112|0,D=s0+108|0,E=s0+96|0,q=s0+92|0,O=s0+80|0,R=s0+68|0,F=s0+56|0,M=s0+52|0,X=s0+40|0,K=s0+36|0,t0=s0+24|0,U=s0+12|0,V=s0;do if(t){t=Pi(n,43828)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](D,t),r=e[D>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](E,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[E>>2],e[m+4>>2]=e[E+4>>2],e[m+8>>2]=e[E+8>>2],e[E>>2]=0,e[E+4>>2]=0,e[E+8>>2]=0,a0(E),T=t;break}else if(Ke[e[n+40>>2]&127](q,t),r=e[q>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[O>>2],e[m+4>>2]=e[O+4>>2],e[m+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,a0(O),T=t;break}while(!1);if(m=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=m,m=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=m,Ke[e[(e[T>>2]|0)+20>>2]&127](R,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,De(l)),e[a>>2]=e[R>>2],e[a+4>>2]=e[R+4>>2],e[a+8>>2]=e[R+8>>2],e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,a0(R),Ke[e[(e[T>>2]|0)+24>>2]&127](F,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,De(l);else{e[c>>2]=e[F>>2],e[c+4>>2]=e[F+4>>2],e[c+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,a0(F),J=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43764)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](X,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[X>>2],e[m+4>>2]=e[X+4>>2],e[m+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,a0(X),p=t;break}else if(Ke[e[n+40>>2]&127](K,t),r=e[K>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](t0,t),d[m>>0]&1?(d[e[m+8>>2]>>0]=0,e[m+4>>2]=0):(d[m+1>>0]=0,d[m>>0]=0),f=0,h0(91,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[t0>>2],e[m+4>>2]=e[t0+4>>2],e[m+8>>2]=e[t0+8>>2],e[t0>>2]=0,e[t0+4>>2]=0,e[t0+8>>2]=0,a0(t0),p=t;break}while(!1);if(m=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=m,m=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=m,Ke[e[(e[p>>2]|0)+20>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,De(l)),e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,a0(U),Ke[e[(e[p>>2]|0)+24>>2]&127](V,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,De(l);else{e[c>>2]=e[V>>2],e[c+4>>2]=e[V+4>>2],e[c+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,a0(V),J=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[A>>2]=J,y=s0}function ah(t,r,n,s,o,l,a,c,m,A,p,T,D,E,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0,D=D|0,E=E|0,U=U|0;var V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0;e[n>>2]=t,Be=E+4|0,ne=E+8|0,fe=E+1|0,Qe=D+4|0,Re=(s&512|0)==0,$e=D+8|0,We=D+1|0,_e=a+8|0,le=(U|0)>0,t0=T+4|0,J=T+8|0,s0=T+1|0,w0=U+1|0,A0=-2-U-((U|0)<0?~U:-1)|0,Y0=(U|0)>0,K=0;do{switch(d[m+K>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,32)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;break}case 3:{X=d[E>>0]|0,V=(X&1)==0,(V?(X&255)>>>1:e[Be>>2]|0)|0&&(M=d[(V?fe:e[ne>>2]|0)>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M);break}case 2:{if(O=d[D>>0]|0,V=(O&1)==0,O=V?(O&255)>>>1:e[Qe>>2]|0,!(Re|(O|0)==0)){if(q=V?We:e[$e>>2]|0,R=q+O|0,V=e[n>>2]|0,O)do d[V>>0]=d[q>>0]|0,q=q+1|0,V=V+1|0;while((q|0)!=(R|0));e[n>>2]=V}break}case 4:{V=e[n>>2]|0,o=c?o+1|0:o,F=o,R=e[_e>>2]|0;e:do if(o>>>0>>0){q=o;do{if(O=d[q>>0]|0,O<<24>>24<=-1||!(k[R+(O<<24>>24<<1)>>1]&2048))break e;q=q+1|0}while(q>>>0>>0)}else q=o;while(!1);if(O=q,le){if(M=-2-O-~(O>>>0>F>>>0?F:O)|0,M=A0>>>0>M>>>0?A0:M,q>>>0>o>>>0&Y0)for(O=q,F=U;O=O+-1|0,X=d[O>>0]|0,R=e[n>>2]|0,e[n>>2]=R+1,d[R>>0]=X,R=(F|0)>1,O>>>0>o>>>0&R;)F=F+-1|0;else R=Y0;if(X=w0+M|0,O=q+(M+1)|0,R?F=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0:F=0,q=e[n>>2]|0,e[n>>2]=q+1,(X|0)>0)for(R=X;d[q>>0]=F,q=e[n>>2]|0,e[n>>2]=q+1,(R|0)>1;)R=R+-1|0;d[q>>0]=A}else O=q;if((O|0)!=(o|0)){if(X=d[T>>0]|0,q=(X&1)==0,(q?(X&255)>>>1:e[t0>>2]|0)|0?q=d[(q?s0:e[J>>2]|0)>>0]|0:q=-1,(O|0)!=(o|0))for(R=0,F=0;(F|0)==(q|0)&&(X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=p,R=R+1|0,X=d[T>>0]|0,q=(X&1)==0,R>>>0<(q?(X&255)>>>1:e[t0>>2]|0)>>>0?(q=d[(q?s0:e[J>>2]|0)+R>>0]|0,q=q<<24>>24==127?-1:q<<24>>24,F=0):(q=F,F=0)),O=O+-1|0,M=d[O>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M,(O|0)!=(o|0);)F=F+1|0}else M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;if(q=e[n>>2]|0,(V|0)!=(q|0)&&(S0=q+-1|0,V>>>0>>0)){q=S0;do X=d[V>>0]|0,d[V>>0]=d[q>>0]|0,d[q>>0]=X,V=V+1|0,q=q+-1|0;while(V>>>0>>0)}break}default:}K=K+1|0}while((K|0)!=4);if(q=d[E>>0]|0,o=(q&1)==0,q=o?(q&255)>>>1:e[Be>>2]|0,q>>>0>1){if(V=o?fe:e[ne>>2]|0,O=V+q|0,o=e[n>>2]|0,(q|0)!=1){V=V+1|0;do d[o>>0]=d[V>>0]|0,o=o+1|0,V=V+1|0;while((V|0)!=(O|0))}e[n>>2]=o}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function fh(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;X=y,y=y+176|0,E=X+56|0,t0=X+52|0,F=X+64|0,q=X+61|0,M=X+60|0,J=X+40|0,w0=X+28|0,s0=X+16|0,A=X+12|0,D=X+68|0,R=X+8|0,O=X+4|0,U=X,t=li(s)|0,e[t0>>2]=t,f=0,V=y0(37,t0|0,44220)|0,T=f,f=0;do if(T&1)S0=13;else{if(p=d[l>>0]|0,a=(p&1)==0,T=l+4|0,!((a?(p&255)>>>1:e[T>>2]|0)|0))p=0;else{if(a=d[(a?l+1|0:e[l+8>>2]|0)>>0]|0,f=0,c=y0(e[(e[V>>2]|0)+28>>2]|0,V|0,45)|0,p=f,f=0,p&1){S0=13;break}p=a<<24>>24==c<<24>>24}if(e[J>>2]=0,e[J+4>>2]=0,e[J+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(3,n|0,p|0,t0|0,F|0,q|0,M|0,J|0,w0|0,s0|0,A|0),m=f,f=0,m&1)a=b()|0;else{if(m=d[l>>0]|0,n=e[T>>2]|0,a=m&1?n:(m&255)>>>1,A=e[A>>2]|0,(a|0)>(A|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-A<<1|1)+A+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=A+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=Ti(a)|0,c=a,a?S0=17:(f=0,we(6),A0=f,f=0,A0&1||(m=d[l>>0]|0,n=e[T>>2]|0,a=0,S0=17))):(c=0,a=D,S0=17),(S0|0)==17&&(A0=(m&1)==0,l=A0?l+1|0:e[l+8>>2]|0,f=0,Ye(1,a|0,R|0,O|0,e[s+4>>2]|0,l|0,l+(A0?(m&255)>>>1:n)|0,V|0,p|0,F|0,d[q>>0]|0,d[M>>0]|0,J|0,w0|0,s0|0,A|0),A0=f,f=0,!(A0&1)&&(e[U>>2]=e[r>>2],A0=e[R>>2]|0,K=e[O>>2]|0,f=0,e[E>>2]=e[U>>2],K=Ee(39,E|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),a0(s0),a0(w0),a0(J),Ie(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}a0(s0),a0(w0),a0(J)}while(!1);return(S0|0)==13&&(a=b()|0),Ie(t)|0,r0(a|0),0}function uh(t){t=t|0}function hh(t){t=t|0,l0(t)}function mh(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0;J=y,y=y+992|0,q=J+8|0,a=J,m=J+888|0,A=J+880|0,c=J+480|0,w0=J+76|0,X=J+884|0,R=J+72|0,K=J+68|0,S0=J+56|0,Y0=J+44|0,A0=J+32|0,p=J+28|0,V=J+80|0,M=J+24|0,F=J+20|0,O=J+16|0,e[A>>2]=m,j[q>>3]=l,m=Fn(m,100,59018,q)|0;do if(m>>>0>99)if(f=0,t=p0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,j[a>>3]=l,E=E0(17,A|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[A>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[A>>2]|0}c=Ti(E<<2)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,E=m,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,D=f,f=0,D&1)t0=7;else{if(e[w0>>2]=c,f=0,D=y0(37,w0|0,44212)|0,T=f,f=0,!(T&1)&&(T=e[A>>2]|0,f=0,E0(e[(e[D>>2]|0)+48>>2]|0,D|0,T|0,T+E|0,U|0)|0,T=f,f=0,!(T&1))){if(E?T=(d[e[A>>2]>>0]|0)==45:T=0,e[S0>>2]=0,e[S0+4>>2]=0,e[S0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(4,n|0,T|0,w0|0,X|0,R|0,K|0,S0|0,Y0|0,A0|0,p|0),n=f,f=0,n&1)m=b()|0;else{if(p=e[p>>2]|0,(E|0)>(p|0)?(n=d[A0>>0]|0,m=d[Y0>>0]|0,m=(E-p<<1|1)+p+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(m&1?e[Y0+4>>2]|0:(m&255)>>>1)|0):(n=d[A0>>0]|0,m=d[Y0>>0]|0,m=p+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(m&1?e[Y0+4>>2]|0:(m&255)>>>1)|0),m>>>0>100?(m=Ti(m<<2)|0,A=m,m?t0=26:(f=0,we(6),V=f,f=0,V&1||(m=0,t0=26))):(A=0,m=V,t0=26),(t0|0)==26&&(f=0,Ye(2,m|0,M|0,F|0,e[s+4>>2]|0,U|0,U+(E<<2)|0,D|0,T|0,X|0,e[R>>2]|0,e[K>>2]|0,S0|0,Y0|0,A0|0,p|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[q>>2]=e[O>>2],s0=Ee(40,q|0,m|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return A&&(Ze(A),c=e[w0>>2]|0),ye(A0),ye(Y0),a0(S0),Ie(c)|0,a&&Ze(a),t&&Ze(t),y=J,s0|0;m=b()|0,A&&(Ze(A),c=e[w0>>2]|0)}ye(A0),ye(Y0),a0(S0)}else m=b()|0;Ie(c)|0}return(t0|0)==7&&(m=b()|0),a&&Ze(a),t&&Ze(t),r0(m|0),0}function dh(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0;t0=y,y=y+112|0,p=t0+108|0,T=t0+96|0,U=t0+92|0,V=t0+80|0,q=t0+68|0,O=t0+56|0,R=t0+52|0,F=t0+40|0,M=t0+36|0,X=t0+24|0,D=t0+12|0,E=t0;do if(t){t=Pi(n,43956)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](p,t),r=e[p>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](T,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[T>>2],e[m+4>>2]=e[T+4>>2],e[m+8>>2]=e[T+8>>2],e[T>>2]=0,e[T+4>>2]=0,e[T+8>>2]=0,ye(T);break}else if(Ke[e[n+40>>2]&127](U,t),r=e[U>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](V,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[V>>2],e[m+4>>2]=e[V+4>>2],e[m+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,ye(V);break}while(!1);if(m=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=m,m=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=m,Ke[e[(e[t>>2]|0)+20>>2]&127](q,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,De(l)),e[a>>2]=e[q>>2],e[a+4>>2]=e[q+4>>2],e[a+8>>2]=e[q+8>>2],e[q>>2]=0,e[q+4>>2]=0,e[q+8>>2]=0,a0(q),Ke[e[(e[t>>2]|0)+24>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,De(l);else{e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43892)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](R,t),r=e[R>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](F,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[F>>2],e[m+4>>2]=e[F+4>>2],e[m+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F);break}else if(Ke[e[n+40>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](X,t),d[m>>0]&1?e[e[m+8>>2]>>2]=0:d[m>>0]=0,e[m+4>>2]=0,f=0,h0(93,m|0,0),s=f,f=0,s&1)m=b(0)|0,De(m);else{e[m>>2]=e[X>>2],e[m+4>>2]=e[X+4>>2],e[m+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,ye(X);break}while(!1);if(m=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=m,m=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=m,Ke[e[(e[t>>2]|0)+20>>2]&127](D,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,De(l)),e[a>>2]=e[D>>2],e[a+4>>2]=e[D+4>>2],e[a+8>>2]=e[D+8>>2],e[D>>2]=0,e[D+4>>2]=0,e[D+8>>2]=0,a0(D),Ke[e[(e[t>>2]|0)+24>>2]&127](E,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,De(l);else{e[c>>2]=e[E>>2],e[c+4>>2]=e[E+4>>2],e[c+8>>2]=e[E+8>>2],e[E>>2]=0,e[E+4>>2]=0,e[E+8>>2]=0,ye(E),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[A>>2]=K,y=t0}function gh(t,r,n,s,o,l,a,c,m,A,p,T,D,E,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0,D=D|0,E=E|0,U=U|0;var V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0;e[n>>2]=t,We=E+4|0,_e=E+8|0,w0=D+4|0,S0=(s&512|0)==0,A0=D+8|0,Y0=(U|0)>0,Qe=T+4|0,Re=T+8|0,$e=T+1|0,J=(U|0)>0,t0=0;do{switch(d[m+t0>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,32)|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X;break}case 3:{K=d[E>>0]|0,V=(K&1)==0,(V?(K&255)>>>1:e[We>>2]|0)|0&&(X=e[(V?We:e[_e>>2]|0)>>2]|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X);break}case 2:{if(F=d[D>>0]|0,V=(F&1)==0,F=V?(F&255)>>>1:e[w0>>2]|0,!(S0|(F|0)==0)){if(V=V?w0:e[A0>>2]|0,O=V+(F<<2)|0,R=e[n>>2]|0,F)for(q=R;e[q>>2]=e[V>>2],V=V+4|0,(V|0)!=(O|0);)q=q+4|0;e[n>>2]=R+(F<<2)}break}case 4:{V=e[n>>2]|0,o=c?o+4|0:o;e:do if(o>>>0>>0){q=o;do{if(!(ze[e[(e[a>>2]|0)+12>>2]&63](a,2048,e[q>>2]|0)|0))break e;q=q+4|0}while(q>>>0>>0)}else q=o;while(!1);if(Y0){if(q>>>0>o>>>0&J){for(F=e[n>>2]|0,R=U;;)if(q=q+-4|0,O=F+4|0,e[F>>2]=e[q>>2],M=R+-1|0,R=(R|0)>1,q>>>0>o>>>0&R)F=O,R=M;else{F=M;break}e[n>>2]=O,O=F}else R=J,O=U;if(R?M=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0:M=0,X=e[n>>2]|0,R=O+((O|0)<0?~O:-1)|0,(O|0)>0)for(F=X;e[F>>2]=M,(O|0)>1;)F=F+4|0,O=O+-1|0;e[n>>2]=X+(R+2<<2),e[X+(R+1<<2)>>2]=A}if((q|0)==(o|0))X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0,K=e[n>>2]|0,q=K+4|0,e[n>>2]=q,e[K>>2]=X;else{if(X=d[T>>0]|0,O=(X&1)==0,K=e[Qe>>2]|0,(O?(X&255)>>>1:K)|0?O=d[(O?$e:e[Re>>2]|0)>>0]|0:O=-1,(q|0)!=(o|0))for(M=0,X=0;R=e[n>>2]|0,(X|0)==(O|0)?(F=R+4|0,e[n>>2]=F,e[R>>2]=p,M=M+1|0,R=d[T>>0]|0,O=(R&1)==0,M>>>0<(O?(R&255)>>>1:K)>>>0?(O=d[(O?$e:e[Re>>2]|0)+M>>0]|0,R=F,O=O<<24>>24==127?-1:O<<24>>24,F=0):(R=F,O=X,F=0)):F=X,q=q+-4|0,X=e[q>>2]|0,e[n>>2]=R+4,e[R>>2]=X,(q|0)!=(o|0);)X=F+1|0;q=e[n>>2]|0}if((V|0)!=(q|0)&&(s0=q+-4|0,V>>>0>>0)){q=s0;do K=e[V>>2]|0,e[V>>2]=e[q>>2],e[q>>2]=K,V=V+4|0,q=q+-4|0;while(V>>>0>>0)}break}default:}t0=t0+1|0}while((t0|0)!=4);if(V=d[E>>0]|0,o=(V&1)==0,V=o?(V&255)>>>1:e[We>>2]|0,V>>>0>1){if(q=o?We:e[_e>>2]|0,o=q+4|0,q=q+(V<<2)|0,O=e[n>>2]|0,R=q-o|0,(V|0)!=1)for(V=O;e[V>>2]=e[o>>2],o=o+4|0,(o|0)!=(q|0);)V=V+4|0;e[n>>2]=O+(R>>>2<<2)}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function ph(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;X=y,y=y+480|0,D=X+468|0,t0=X+464|0,F=X+472|0,q=X+56|0,M=X+52|0,J=X+40|0,w0=X+28|0,s0=X+16|0,A=X+12|0,T=X+64|0,R=X+8|0,O=X+4|0,E=X,t=li(s)|0,e[t0>>2]=t,f=0,U=y0(37,t0|0,44212)|0,V=f,f=0;do if(V&1)S0=13;else{if(p=d[l>>0]|0,a=(p&1)==0,V=l+4|0,!((a?(p&255)>>>1:e[V>>2]|0)|0))p=0;else{if(a=e[(a?V:e[l+8>>2]|0)>>2]|0,f=0,c=y0(e[(e[U>>2]|0)+44>>2]|0,U|0,45)|0,p=f,f=0,p&1){S0=13;break}p=(a|0)==(c|0)}if(e[J>>2]=0,e[J+4>>2]=0,e[J+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(4,n|0,p|0,t0|0,F|0,q|0,M|0,J|0,w0|0,s0|0,A|0),m=f,f=0,m&1)a=b()|0;else{if(m=d[l>>0]|0,n=e[V>>2]|0,a=m&1?n:(m&255)>>>1,A=e[A>>2]|0,(a|0)>(A|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-A<<1|1)+A+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=A+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=Ti(a<<2)|0,c=a,a?S0=17:(f=0,we(6),A0=f,f=0,A0&1||(m=d[l>>0]|0,n=e[V>>2]|0,a=0,S0=17))):(c=0,a=T,S0=17),(S0|0)==17&&(A0=(m&1)==0,l=A0?V:e[l+8>>2]|0,f=0,Ye(2,a|0,R|0,O|0,e[s+4>>2]|0,l|0,l+((A0?(m&255)>>>1:n)<<2)|0,U|0,p|0,F|0,e[q>>2]|0,e[M>>2]|0,J|0,w0|0,s0|0,A|0),A0=f,f=0,!(A0&1)&&(e[E>>2]=e[r>>2],A0=e[R>>2]|0,K=e[O>>2]|0,f=0,e[D>>2]=e[E>>2],K=Ee(40,D|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),ye(s0),ye(w0),a0(J),Ie(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}ye(s0),ye(w0),a0(J)}while(!1);return(S0|0)==13&&(a=b()|0),Ie(t)|0,r0(a|0),0}function Ah(t){t=t|0}function Sh(t){t=t|0,l0(t)}function vh(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function wh(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0;c=y,y=y+16|0,m=c,e[m>>2]=0,e[m+4>>2]=0,e[m+8>>2]=0,a=d[l>>0]|0,A=(a&1)==0,r=A?l+1|0:e[l+8>>2]|0,a=A?(a&255)>>>1:e[l+4>>2]|0,l=r+a|0;e:do if((a|0)>0){for(;f=0,h0(67,m|0,d[r>>0]|0),A=f,f=0,!(A&1);)if(r=r+1|0,r>>>0>=l>>>0){a=4;break e}r=b()|0,a=7}else a=4;while(!1);e:do if((a|0)==4){if(f=0,r=E0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[m>>0]&1?e[m+8>>2]|0:m+1|0)|0)|0,A=f,f=0,A&1){r=b()|0,a=7;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,A=Ot(r)|0,l=r+A|0;i:do if((A|0)>0){for(;f=0,h0(67,t|0,d[r>>0]|0),A=f,f=0,!(A&1);)if(r=r+1|0,r>>>0>=l>>>0)break i;r=b()|0,a0(t);break e}while(!1);a0(m),y=c;return}while(!1);a0(m),r0(r|0)}function xh(t,r){t=t|0,r=r|0}function Ch(t){t=t|0}function Th(t){t=t|0,l0(t)}function yh(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function Dh(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;R=y,y=y+224|0,T=R+184|0,p=R+192|0,A=R+180|0,D=R+176|0,q=R+168|0,V=R+40|0,U=R+32|0,O=R+28|0,F=R+16|0,m=R+8|0,E=R,e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,e[m+4>>2]=0,e[m>>2]=44696,c=d[l>>0]|0,M=(c&1)==0,a=l+4|0,r=M?a:e[l+8>>2]|0,l=M?(c&255)>>>1:e[a>>2]|0,a=r+(l<<2)|0,c=p+32|0;e:do if((l|0)>0){i:for(;;){if(e[D>>2]=r,f=0,l=He(e[(e[m>>2]|0)+12>>2]|0,m|0,T|0,r|0,a|0,D|0,p|0,c|0,A|0)|0,M=f,f=0,M&1){l=12;break}if((l|0)==2||(e[D>>2]|0)==(r|0)){l=5;break}if(p>>>0<(e[A>>2]|0)>>>0){r=p;do{if(f=0,h0(67,F|0,d[r>>0]|0),M=f,f=0,M&1){l=11;break i}r=r+1|0}while(r>>>0<(e[A>>2]|0)>>>0)}if(r=e[D>>2]|0,!((l|0)!=2&r>>>0>>0)){l=9;break e}}(l|0)==5?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==11||(l|0)==12)&&(r=b()|0)}else l=9;while(!1);e:do if((l|0)==9){if(f=0,r=E0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[F>>0]&1?e[F+8>>2]|0:F+1|0)|0)|0,M=f,f=0,M&1){r=b()|0;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[E+4>>2]=0,e[E>>2]=44744,M=Ot(r)|0,a=r+M|0,c=a,m=V+128|0;i:do if((M|0)>0){t:for(;;){if(e[O>>2]=r,f=0,l=He(e[(e[E>>2]|0)+16>>2]|0,E|0,q|0,r|0,((c-r|0)>32?r+32|0:a)|0,O|0,V|0,m|0,U|0)|0,M=f,f=0,M&1){l=24;break}if((l|0)==2||(e[O>>2]|0)==(r|0)){l=18;break}if(V>>>0<(e[U>>2]|0)>>>0){r=V;do{if(f=0,h0(92,t|0,e[r>>2]|0),M=f,f=0,M&1){l=23;break t}r=r+4|0}while(r>>>0<(e[U>>2]|0)>>>0)}if(r=e[O>>2]|0,!((l|0)!=2&r>>>0>>0))break i}(l|0)==18?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==23||(l|0)==24)&&(r=b()|0),ye(t);break e}while(!1);a0(F),y=R;return}while(!1);a0(F),r0(r|0)}function Ih(t,r){t=t|0,r=r|0}function kh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(e[t+4>>2]=r+-1,e[t>>2]=44196,l=t+8|0,f=0,h0(94,l|0,28),o=f,f=0,o&1)r=b()|0;else{if(o=t+144|0,f=0,d0(5,o|0,58885,1),s=f,f=0,s&1)r=b()|0;else{if(n=e[l>>2]|0,s=t+12|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}e[495]=0,e[494]=43124,f=0,h0(95,t|0,1976),s=f,f=0;do if(!(s&1)&&(e[497]=0,e[496]=43164,f=0,h0(96,t|0,1984),s=f,f=0,!(s&1))&&(e[499]=0,e[498]=44236,e[500]=0,d[2004]=0,s=er()|0,e[500]=s,f=0,h0(97,t|0,1992),s=f,f=0,!(s&1))&&(e[503]=0,e[502]=44484,f=0,h0(98,t|0,2008),s=f,f=0,!(s&1))&&(e[505]=0,e[504]=44552,f=0,h0(99,t|0,2016),s=f,f=0,!(s&1))&&(f=0,h0(100,2024,1),s=f,f=0,!(s&1))&&(f=0,h0(101,t|0,2024),s=f,f=0,!(s&1))&&(e[511]=0,e[510]=44600,f=0,h0(102,t|0,2040),s=f,f=0,!(s&1))&&(e[513]=0,e[512]=44648,f=0,h0(103,t|0,2048),s=f,f=0,!(s&1))&&(X6(2056,1),f=0,h0(104,t|0,2056),s=f,f=0,!(s&1))&&(K6(2080,1),f=0,h0(105,t|0,2080),s=f,f=0,!(s&1))&&(e[529]=0,e[528]=43204,f=0,h0(106,t|0,2112),s=f,f=0,!(s&1))&&(e[531]=0,e[530]=43276,f=0,h0(107,t|0,2120),s=f,f=0,!(s&1))&&(e[533]=0,e[532]=43348,f=0,h0(108,t|0,2128),s=f,f=0,!(s&1))){if(e[535]=0,e[534]=43408,f=0,h0(109,t|0,2136),s=f,f=0,s&1){a=42;break}if(e[537]=0,e[536]=43716,f=0,h0(110,t|0,2144),s=f,f=0,s&1){a=42;break}if(e[539]=0,e[538]=43780,f=0,h0(111,t|0,2152),s=f,f=0,s&1){a=42;break}if(e[541]=0,e[540]=43844,f=0,h0(112,t|0,2160),s=f,f=0,s&1){a=42;break}if(e[543]=0,e[542]=43908,f=0,h0(113,t|0,2168),s=f,f=0,s&1){a=42;break}if(e[545]=0,e[544]=43972,f=0,h0(114,t|0,2176),s=f,f=0,s&1){a=42;break}if(e[547]=0,e[546]=44008,f=0,h0(115,t|0,2184),s=f,f=0,s&1){a=42;break}if(e[549]=0,e[548]=44044,f=0,h0(116,t|0,2192),s=f,f=0,s&1){a=42;break}if(e[551]=0,e[550]=44080,f=0,h0(117,t|0,2200),s=f,f=0,s&1){a=42;break}if(e[553]=0,e[552]=43468,e[554]=43516,f=0,h0(118,t|0,2208),s=f,f=0,s&1){a=42;break}if(e[557]=0,e[556]=43560,e[558]=43608,f=0,h0(119,t|0,2224),s=f,f=0,s&1){a=42;break}if(e[561]=0,e[560]=44464,f=0,r=p0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[562]=r,e[560]=43652,f=0,h0(120,t|0,2240),s=f,f=0,s&1){a=42;break}if(e[565]=0,e[564]=44464,f=0,r=p0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[566]=r,e[564]=43684,f=0,h0(121,t|0,2256),a=f,f=0,a&1){a=42;break}if(e[569]=0,e[568]=44116,f=0,h0(122,t|0,2272),a=f,f=0,a&1){a=42;break}if(e[571]=0,e[570]=44156,f=0,h0(123,t|0,2280),a=f,f=0,a&1){a=42;break}return}else a=42;while(!1);(a|0)==42&&(r=b()|0),a0(o)}S1(l)}r0(r|0)}function Eh(){var t=0;do if(!(d[2288]|0)&&Ae(2288)|0)if(f=0,p0(4)|0,t=f,f=0,t&1)t=b()|0,bi(2288),r0(t|0);else{e[11246]=44980,ve(2288);break}while(!1);return e[11246]|0}function Si(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;cr(r),o=t+8|0,s=e[o>>2]|0;do if((e[t+12>>2]|0)-s>>2>>>0<=n>>>0){if(f=0,h0(124,o|0,n+1|0),t=f,f=0,!(t&1)){s=e[o>>2]|0;break}s=b()|0,r&&Ie(r)|0,r0(s|0)}while(!1);t=e[s+(n<<2)>>2]|0,t&&(Ie(t)|0,s=e[o>>2]|0),e[s+(n<<2)>>2]=r}function I2(t){t=t|0;var r=0,n=0,s=0,o=0;if(e[t>>2]=44196,s=t+8|0,o=t+12|0,r=e[s>>2]|0,(e[o>>2]|0)!=(r|0)){n=0;do r=e[r+(n<<2)>>2]|0,r&&Ie(r)|0,n=n+1|0,r=e[s>>2]|0;while(n>>>0<(e[o>>2]|0)-r>>2>>>0)}a0(t+144|0),S1(s)}function Fh(t){t=t|0,I2(t),l0(t)}function Mh(t,r){return t=t|0,r=r|0,Dd(t,r)|0?e[(e[t+8>>2]|0)+(r<<2)>>2]|0:(t=de(4)|0,Mg(t),Ne(t|0,640,82),0)}function _h(){return kh(2296,1),e[11245]=2296,44980}function Rh(){var t=0;return t=Eh()|0,t=e[t>>2]|0,e[11247]=t,cr(t),44988}function Ph(){var t=0;do if(!(d[2456]|0)&&Ae(2456)|0)if(f=0,p0(5)|0,t=f,f=0,t&1)t=b()|0,bi(2456),r0(t|0);else{e[11248]=44988,ve(2456);break}while(!1);return e[11248]|0}function s1(t){t=t|0;var r=0,n=0;if(f=0,r=p0(6)|0,n=f,f=0,n&1)n=b(0)|0,De(n);else{n=e[r>>2]|0,e[t>>2]=n,cr(n);return}}function $t(t,r){t=t|0,r=r|0,r=e[r>>2]|0,e[t>>2]=r,cr(r)}function Mi(t){t=t|0,Ie(e[t>>2]|0)|0}function Ai(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,(e[t>>2]|0)!=-1&&(e[r>>2]=t,e[r+4>>2]=191,e[r+8>>2]=0,a5(t,r,192)),y=n,(e[t+4>>2]|0)+-1|0}function Pi(t,r){return t=t|0,r=r|0,t=e[t>>2]|0,Mh(t,Ai(r)|0)|0}function Lh(t){t=t|0,l0(t)}function Uh(t){t=t|0,t&&Ce[e[(e[t>>2]|0)+4>>2]&255](t)}function Oh(t){t=t|0;var r=0;r=e[11052]|0,e[11052]=r+1,e[t+4>>2]=r+1}function Nh(t){t=t|0,l0(t)}function Vh(t,r,n){return t=t|0,r=r|0,n=n|0,n>>>0<128?(n=(er()|0)+(n<<1)|0,n=(k[n>>1]&r)<<16>>16!=0):n=0,n|0}function er(){var t=0,r=0;if(f=0,t=p0(7)|0,r=f,f=0,r&1)r=b(0)|0,De(r);else return e[t>>2]|0;return 0}function Bh(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(l=(n-r|0)>>>2,(r|0)!=(n|0))for(o=r;t=e[o>>2]|0,t>>>0<128?(t=(er()|0)+(t<<1)|0,t=B[t>>1]|0):t=0,k[s>>1]=t,o=o+4|0,(o|0)!=(n|0);)s=s+2|0;return r+(l<<2)|0}function qh(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0<128&&(t=(er()|0)+(t<<1)|0,(k[t>>1]&r)<<16>>16!=0))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function bh(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0>=128||(t=(er()|0)+(t<<1)|0,!((k[t>>1]&r)<<16>>16)))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function Gh(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(fr()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function fr(){var t=0,r=0;if(f=0,t=p0(8)|0,r=f,f=0,r&1)r=b(0)|0,De(r);else return e[t>>2]|0;return 0}function Qh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(fr()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function Hh(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(ur()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function ur(){var t=0,r=0;if(f=0,t=p0(9)|0,r=f,f=0,r&1)r=b(0)|0,De(r);else return e[t>>2]|0;return 0}function Yh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(ur()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function jh(t,r){return t=t|0,r=r|0,r<<24>>24|0}function Xh(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;e[s>>2]=d[r>>0],r=r+1|0,(r|0)!=(n|0);)s=s+4|0;return n|0}function Kh(t,r,n){return t=t|0,r=r|0,n=n|0,(r>>>0<128?r&255:n)|0}function Wh(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;if(a=(n-r|0)>>>2,(r|0)!=(n|0))for(l=r,t=o;o=e[l>>2]|0,d[t>>0]=o>>>0<128?o&255:s,l=l+4|0,(l|0)!=(n|0);)t=t+1|0;return r+(a<<2)|0}function k2(t){t=t|0;var r=0;e[t>>2]=44236,r=e[t+8>>2]|0,r|0&&d[t+12>>0]|0&&xg(r)}function Zh(t){t=t|0,k2(t),l0(t)}function Jh(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(fr()|0)+((r&255)<<2)|0,r=e[r>>2]&255),r|0}function $h(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(fr()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function e4(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(ur()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),r|0}function i4(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(ur()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function t4(t,r){return t=t|0,r=r|0,r|0}function r4(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;return n|0}function n4(t,r,n){return t=t|0,r=r|0,n=n|0,(r<<24>>24>-1?r:n)|0}function s4(t,r,n,s,o){if(t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,(r|0)!=(n|0))for(;t=d[r>>0]|0,d[o>>0]=t<<24>>24>-1?t:s,r=r+1|0,(r|0)!=(n|0);)o=o+1|0;return n|0}function o4(t){t=t|0,l0(t)}function l4(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function a4(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function f4(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function u4(t){return t=t|0,1}function c4(t){return t=t|0,1}function h4(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,t=s-n|0,(t>>>0>>0?t:o)|0}function m4(t){return t=t|0,1}function d4(t,r){t=t|0,r=r|0;var n=0;if(e[t+4>>2]=r+-1,e[t>>2]=44304,f=0,r=p0(3)|0,n=f,f=0,n&1)n=b()|0,r0(n|0);else{e[t+8>>2]=r;return}}function g4(t){t=t|0,Z2(t),l0(t)}function o1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0,fe=0,vi=0,xi=0,mi=0,_0=0,he=0,Pe=0,oi=0,ii=0,fi=0,yi=0,gi=0,Tt=0,ki=0,gt=0;gt=y,y=y+624|0,fi=gt+24|0,gi=gt+16|0,yi=gt+588|0,_0=gt+576|0,ii=gt,vi=gt+536|0,ki=gt+8|0,Tt=gt+528|0,Qe=(t|0)!=0,Re=vi+40|0,fe=Re,vi=vi+39|0,xi=ki+4|0,mi=_0+12|0,_0=_0+11|0,he=yi,Pe=mi,oi=Pe-he|0,$e=-2-he|0,We=Pe+2|0,_e=fi+288|0,le=yi+9|0,Be=le,ne=yi+8|0,l=0,V=r,a=0,r=0;e:for(;;){do if((l|0)>-1)if((a|0)>(2147483647-l|0)){l=di()|0,e[l>>2]=75,l=-1;break}else{l=a+l|0;break}while(!1);if(a=d[V>>0]|0,a<<24>>24)c=V;else{Y0=245;break}i:for(;;){switch(a<<24>>24){case 37:{a=c,Y0=9;break i}case 0:{a=c;break i}default:}A0=c+1|0,a=d[A0>>0]|0,c=A0}i:do if((Y0|0)==9)for(;;){if(Y0=0,(d[a+1>>0]|0)!=37)break i;if(c=c+1|0,a=a+2|0,(d[a>>0]|0)==37)Y0=9;else break}while(!1);if(O=c-V|0,Qe&&!(e[t>>2]&32|0)&&Ui(V,O,t)|0,(c|0)!=(V|0)){V=a,a=O;continue}p=a+1|0,c=d[p>>0]|0,m=(c<<24>>24)+-48|0,m>>>0<10?(A0=(d[a+2>>0]|0)==36,p=A0?a+3|0:p,c=d[p>>0]|0,E=A0?m:-1,r=A0?1:r):E=-1,a=c<<24>>24;i:do if((a&-32|0)==32)for(m=0;;){if(!(1<>24)+-32|m,p=p+1|0,c=d[p>>0]|0,a=c<<24>>24,(a&-32|0)!=32){T=m,a=p;break}}else T=0,a=p;while(!1);do if(c<<24>>24==42){if(m=a+1|0,c=(d[m>>0]|0)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36)e[o+(c<<2)>>2]=10,r=1,a=a+3|0,c=e[s+((d[m>>0]|0)+-48<<3)>>2]|0;else{if(r){l=-1;break e}if(!Qe){q=T,a=m,r=0,A0=0;break}r=(e[n>>2]|0)+3&-4,c=e[r>>2]|0,e[n>>2]=r+4,r=0,a=m}(c|0)<0?(q=T|8192,A0=0-c|0):(q=T,A0=c)}else if(m=(c<<24>>24)+-48|0,m>>>0<10){c=0;do c=(c*10|0)+m|0,a=a+1|0,m=(d[a>>0]|0)+-48|0;while(m>>>0<10);if((c|0)<0){l=-1;break e}else q=T,A0=c}else q=T,A0=0;while(!1);i:do if((d[a>>0]|0)==46){if(m=a+1|0,c=d[m>>0]|0,c<<24>>24!=42){if(p=(c<<24>>24)+-48|0,p>>>0<10)a=m,c=0;else{a=m,p=0;break}for(;;)if(c=(c*10|0)+p|0,a=a+1|0,p=(d[a>>0]|0)+-48|0,p>>>0>=10){p=c;break i}}if(m=a+2|0,c=(d[m>>0]|0)+-48|0,c>>>0<10&&(d[a+3>>0]|0)==36){e[o+(c<<2)>>2]=10,a=a+4|0,p=e[s+((d[m>>0]|0)+-48<<3)>>2]|0;break}if(r){l=-1;break e}Qe?(a=(e[n>>2]|0)+3&-4,p=e[a>>2]|0,e[n>>2]=a+4,a=m):(a=m,p=0)}else p=-1;while(!1);for(D=0;;){if(c=(d[a>>0]|0)+-65|0,c>>>0>57){l=-1;break e}if(m=a+1|0,c=d[56223+(D*58|0)+c>>0]|0,T=c&255,(T+-1|0)>>>0<8)a=m,D=T;else{S0=m;break}}if(!(c<<24>>24)){l=-1;break}m=(E|0)>-1;do if(c<<24>>24==19)if(m){l=-1;break e}else Y0=52;else{if(m){e[o+(E<<2)>>2]=T,s0=s+(E<<3)|0,w0=e[s0+4>>2]|0,Y0=ii,e[Y0>>2]=e[s0>>2],e[Y0+4>>2]=w0,Y0=52;break}if(!Qe){l=0;break e}F2(ii,T,n)}while(!1);if((Y0|0)==52&&(Y0=0,!Qe)){V=S0,a=O;continue}E=d[a>>0]|0,E=(D|0)!=0&(E&15|0)==3?E&-33:E,m=q&-65537,w0=q&8192|0?m:q;i:do switch(E|0){case 110:switch(D|0){case 0:{e[e[ii>>2]>>2]=l,V=S0,a=O;continue e}case 1:{e[e[ii>>2]>>2]=l,V=S0,a=O;continue e}case 2:{V=e[ii>>2]|0,e[V>>2]=l,e[V+4>>2]=((l|0)<0)<<31>>31,V=S0,a=O;continue e}case 3:{k[e[ii>>2]>>1]=l,V=S0,a=O;continue e}case 4:{d[e[ii>>2]>>0]=l,V=S0,a=O;continue e}case 6:{e[e[ii>>2]>>2]=l,V=S0,a=O;continue e}case 7:{V=e[ii>>2]|0,e[V>>2]=l,e[V+4>>2]=((l|0)<0)<<31>>31,V=S0,a=O;continue e}default:{V=S0,a=O;continue e}}case 112:{D=w0|8,p=p>>>0>8?p:8,E=120,Y0=64;break}case 88:case 120:{D=w0,Y0=64;break}case 111:{if(m=ii,c=e[m>>2]|0,m=e[m+4>>2]|0,(c|0)==0&(m|0)==0)a=Re;else{a=Re;do a=a+-1|0,d[a>>0]=c&7|48,c=It(c|0,m|0,3)|0,m=D0;while(!((c|0)==0&(m|0)==0))}w0&8?(D=fe-a+1|0,c=w0,p=(p|0)<(D|0)?D:p,D=0,T=56703,Y0=77):(c=w0,D=0,T=56703,Y0=77);break}case 105:case 100:{if(c=ii,a=e[c>>2]|0,c=e[c+4>>2]|0,(c|0)<0){a=Ji(0,0,a|0,c|0)|0,c=D0,m=ii,e[m>>2]=a,e[m+4>>2]=c,m=1,T=56703,Y0=76;break i}w0&2048?(m=1,T=56704,Y0=76):(T=w0&1,m=T,T=T|0?56705:56703,Y0=76);break}case 117:{c=ii,a=e[c>>2]|0,c=e[c+4>>2]|0,m=0,T=56703,Y0=76;break}case 99:{d[vi>>0]=e[ii>>2],V=vi,c=1,D=0,E=56703,a=Re;break}case 109:{a=di()|0,a=gn(e[a>>2]|0)|0,Y0=82;break}case 115:{a=e[ii>>2]|0,a=a|0?a:56713,Y0=82;break}case 67:{e[ki>>2]=e[ii>>2],e[xi>>2]=0,e[ii>>2]=ki,p=-1,Y0=86;break}case 83:{p?Y0=86:(Vi(t,32,A0,0,w0),a=0,Y0=98);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{A=+j[ii>>3],e[gi>>2]=0,j[G>>3]=A,(e[G+4>>2]|0)>=0?w0&2048?(J=1,s0=56723):(s0=w0&1,J=s0,s0=s0|0?56726:56721):(A=-A,J=1,s0=56720),j[G>>3]=A,t0=e[G+4>>2]&2146435072;do if(t0>>>0<2146435072|(t0|0)==2146435072&!1){if(U=+mp(A,gi)*2,c=U!=0,c&&(e[gi>>2]=(e[gi>>2]|0)+-1),X=E|32,(X|0)==97){V=E&32,O=V|0?s0+9|0:s0,q=J|2,a=12-p|0;do if(p>>>0>11|(a|0)==0)A=U;else{A=8;do a=a+-1|0,A=A*16;while(a|0);if((d[O>>0]|0)==45){A=-(A+(-U-A));break}else{A=U+A-A;break}}while(!1);for(c=e[gi>>2]|0,a=(c|0)<0?0-c|0:c,a=qt(a,((a|0)<0)<<31>>31,mi)|0,(a|0)==(mi|0)&&(d[_0>>0]=48,a=_0),d[a+-1>>0]=(c>>31&2)+43,D=a+-2|0,d[D>>0]=E+15,T=(p|0)<1,m=(w0&8|0)==0,c=yi;;){s0=~~A,a=c+1|0,d[c>>0]=N[56687+s0>>0]|V,A=(A-+(s0|0))*16;do if((a-he|0)==1){if(m&(T&A==0))break;d[a>>0]=46,a=c+2|0}while(!1);if(A==0)break;c=a}p=(p|0)!=0&($e+a|0)<(p|0)?We+p-D|0:oi-D+a|0,m=p+q|0,Vi(t,32,A0,m,w0),e[t>>2]&32||Ui(O,q,t)|0,Vi(t,48,A0,m,w0^65536),a=a-he|0,e[t>>2]&32||Ui(yi,a,t)|0,c=Pe-D|0,Vi(t,48,p-(a+c)|0,0,0),e[t>>2]&32||Ui(D,c,t)|0,Vi(t,32,A0,m,w0^8192),a=(m|0)<(A0|0)?A0:m;break}a=(p|0)<0?6:p,c?(c=(e[gi>>2]|0)+-28|0,e[gi>>2]=c,A=U*268435456):(A=U,c=e[gi>>2]|0),t0=(c|0)<0?fi:_e,K=t0,c=t0;do M=~~A>>>0,e[c>>2]=M,c=c+4|0,A=(A-+(M>>>0))*1e9;while(A!=0);if(m=c,c=e[gi>>2]|0,(c|0)>0)for(T=t0;;){D=(c|0)>29?29:c,p=m+-4|0;do if(p>>>0>>0)p=T;else{c=0;do M=pi(e[p>>2]|0,0,D|0)|0,M=Li(M|0,D0|0,c|0,0)|0,c=D0,F=v1(M|0,c|0,1e9,0)|0,e[p>>2]=F,c=Ar(M|0,c|0,1e9,0)|0,p=p+-4|0;while(p>>>0>=T>>>0);if(!c){p=T;break}p=T+-4|0,e[p>>2]=c}while(!1);for(;!(m>>>0<=p>>>0);)if(c=m+-4|0,!(e[c>>2]|0))m=c;else break;if(c=(e[gi>>2]|0)-D|0,e[gi>>2]=c,(c|0)>0)T=p;else break}else p=t0;if((c|0)<0)for(O=((a+25|0)/9|0)+1|0,R=(X|0)==102,V=p;;){q=0-c|0,q=(q|0)>9?9:q;do if(V>>>0>>0){c=(1<>>q,p=0,D=V;do M=e[D>>2]|0,e[D>>2]=(M>>>q)+p,p=W(M&c,T)|0,D=D+4|0;while(D>>>0>>0);if(c=e[V>>2]|0?V:V+4|0,!p){p=c;break}e[m>>2]=p,p=c,m=m+4|0}else p=e[V>>2]|0?V:V+4|0;while(!1);if(c=R?t0:p,m=(m-c>>2|0)>(O|0)?c+(O<<2)|0:m,c=(e[gi>>2]|0)+q|0,e[gi>>2]=c,(c|0)>=0){V=p;break}else V=p}else V=p;do if(V>>>0>>0){if(c=(K-V>>2)*9|0,T=e[V>>2]|0,T>>>0<10)break;p=10;do p=p*10|0,c=c+1|0;while(T>>>0>=p>>>0)}else c=0;while(!1);if(F=(X|0)==103,M=(a|0)!=0,p=a-((X|0)!=102?c:0)+((M&F)<<31>>31)|0,(p|0)<(((m-K>>2)*9|0)+-9|0)){if(D=p+9216|0,R=(D|0)/9|0,p=t0+(R+-1023<<2)|0,D=((D|0)%9|0)+1|0,(D|0)<9){T=10;do T=T*10|0,D=D+1|0;while((D|0)!=9)}else T=10;q=e[p>>2]|0,O=(q>>>0)%(T>>>0)|0,!(O|0)&&(t0+(R+-1022<<2)|0)==(m|0)?T=V:Y0=163;do if((Y0|0)==163){Y0=0,U=((q>>>0)/(T>>>0)|0)&1|0?9007199254740994:9007199254740992,D=(T|0)/2|0;do if(O>>>0>>0)A=.5;else{if((O|0)==(D|0)&&(t0+(R+-1022<<2)|0)==(m|0)){A=1;break}A=1.5}while(!1);do if(J){if((d[s0>>0]|0)!=45)break;U=-U,A=-A}while(!1);if(D=q-O|0,e[p>>2]=D,U+A==U){T=V;break}if(X=D+T|0,e[p>>2]=X,X>>>0>999999999)for(c=V;;)if(T=p+-4|0,e[p>>2]=0,T>>>0>>0&&(c=c+-4|0,e[c>>2]=0),X=(e[T>>2]|0)+1|0,e[T>>2]=X,X>>>0>999999999)p=T;else{V=c,p=T;break}if(c=(K-V>>2)*9|0,D=e[V>>2]|0,D>>>0<10){T=V;break}else T=10;do T=T*10|0,c=c+1|0;while(D>>>0>=T>>>0);T=V}while(!1);X=p+4|0,V=T,m=m>>>0>X>>>0?X:m}for(O=0-c|0;;){if(m>>>0<=V>>>0){R=0,X=m;break}if(p=m+-4|0,!(e[p>>2]|0))m=p;else{R=1,X=m;break}}do if(F){if(a=(M&1^1)+a|0,(a|0)>(c|0)&(c|0)>-5?(E=E+-1|0,a=a+-1-c|0):(E=E+-2|0,a=a+-1|0),m=w0&8,m)break;do if(R){if(m=e[X+-4>>2]|0,!m){p=9;break}if(!((m>>>0)%10|0))T=10,p=0;else{p=0;break}do T=T*10|0,p=p+1|0;while(!((m>>>0)%(T>>>0)|0|0))}else p=9;while(!1);if(m=((X-K>>2)*9|0)+-9|0,(E|32|0)==102){m=m-p|0,m=(m|0)<0?0:m,a=(a|0)<(m|0)?a:m,m=0;break}else{m=m+c-p|0,m=(m|0)<0?0:m,a=(a|0)<(m|0)?a:m,m=0;break}}else m=w0&8;while(!1);if(q=a|m,T=(q|0)!=0&1,D=(E|32|0)==102,D)c=(c|0)>0?c:0,E=0;else{if(p=(c|0)<0?O:c,p=qt(p,((p|0)<0)<<31>>31,mi)|0,(Pe-p|0)<2)do p=p+-1|0,d[p>>0]=48;while((Pe-p|0)<2);d[p+-1>>0]=(c>>31&2)+43,K=p+-2|0,d[K>>0]=E,c=Pe-K|0,E=K}O=J+1+a+T+c|0,Vi(t,32,A0,O,w0),e[t>>2]&32||Ui(s0,J,t)|0,Vi(t,48,A0,O,w0^65536);do if(D){p=V>>>0>t0>>>0?t0:V,c=p;do{m=qt(e[c>>2]|0,0,le)|0;do if((c|0)==(p|0)){if((m|0)!=(le|0))break;d[ne>>0]=48,m=ne}else{if(m>>>0<=yi>>>0)break;do m=m+-1|0,d[m>>0]=48;while(m>>>0>yi>>>0)}while(!1);e[t>>2]&32||Ui(m,Be-m|0,t)|0,c=c+4|0}while(c>>>0<=t0>>>0);do if(q){if(e[t>>2]&32)break;Ui(56755,1,t)|0}while(!1);if((a|0)>0&c>>>0>>0)for(m=c;;){if(c=qt(e[m>>2]|0,0,le)|0,c>>>0>yi>>>0)do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0);if(e[t>>2]&32||Ui(c,(a|0)>9?9:a,t)|0,m=m+4|0,c=a+-9|0,(a|0)>9&m>>>0>>0)a=c;else{a=c;break}}Vi(t,48,a+9|0,9,0)}else{if(D=R?X:V+4|0,(a|0)>-1){T=(m|0)==0,p=V;do{c=qt(e[p>>2]|0,0,le)|0,(c|0)==(le|0)&&(d[ne>>0]=48,c=ne);do if((p|0)==(V|0)){if(m=c+1|0,e[t>>2]&32||Ui(c,1,t)|0,T&(a|0)<1){c=m;break}if(e[t>>2]&32){c=m;break}Ui(56755,1,t)|0,c=m}else{if(c>>>0<=yi>>>0)break;do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0)}while(!1);m=Be-c|0,e[t>>2]&32||Ui(c,(a|0)>(m|0)?m:a,t)|0,a=a-m|0,p=p+4|0}while(p>>>0>>0&(a|0)>-1)}if(Vi(t,48,a+18|0,18,0),e[t>>2]&32)break;Ui(E,Pe-E|0,t)|0}while(!1);Vi(t,32,A0,O,w0^8192),a=(O|0)<(A0|0)?A0:O}else D=(E&32|0)!=0,T=A!=A|!1,c=T?0:J,p=c+3|0,Vi(t,32,A0,p,m),a=e[t>>2]|0,a&32||(Ui(s0,c,t)|0,a=e[t>>2]|0),a&32||Ui(T?D?56747:56751:D?56739:56743,3,t)|0,Vi(t,32,A0,p,w0^8192),a=(p|0)<(A0|0)?A0:p;while(!1);V=S0;continue e}default:m=w0,c=p,D=0,E=56703,a=Re}while(!1);i:do if((Y0|0)==64)if(m=ii,c=e[m>>2]|0,m=e[m+4>>2]|0,T=E&32,(c|0)==0&(m|0)==0)a=Re,c=D,D=0,T=56703,Y0=77;else{a=Re;do a=a+-1|0,d[a>>0]=N[56687+(c&15)>>0]|T,c=It(c|0,m|0,4)|0,m=D0;while(!((c|0)==0&(m|0)==0));Y0=ii,(D&8|0)==0|(e[Y0>>2]|0)==0&(e[Y0+4>>2]|0)==0?(c=D,D=0,T=56703,Y0=77):(c=D,D=2,T=56703+(E>>4)|0,Y0=77)}else if((Y0|0)==76)a=qt(a,c,Re)|0,c=w0,D=m,Y0=77;else if((Y0|0)==82)Y0=0,w0=Pn(a,0,p)|0,s0=(w0|0)==0,V=a,c=s0?p:w0-a|0,D=0,E=56703,a=s0?a+p|0:w0;else if((Y0|0)==86){for(Y0=0,c=0,a=0,T=e[ii>>2]|0;m=e[T>>2]|0,!(!m||(a=yn(Tt,m)|0,(a|0)<0|a>>>0>(p-c|0)>>>0));)if(c=a+c|0,p>>>0>c>>>0)T=T+4|0;else break;if((a|0)<0){l=-1;break e}if(Vi(t,32,A0,c,w0),!c)a=0,Y0=98;else for(m=0,p=e[ii>>2]|0;;){if(a=e[p>>2]|0,!a){a=c,Y0=98;break i}if(a=yn(Tt,a)|0,m=a+m|0,(m|0)>(c|0)){a=c,Y0=98;break i}if(e[t>>2]&32||Ui(Tt,a,t)|0,m>>>0>=c>>>0){a=c,Y0=98;break}else p=p+4|0}}while(!1);if((Y0|0)==98){Y0=0,Vi(t,32,A0,a,w0^8192),V=S0,a=(A0|0)>(a|0)?A0:a;continue}(Y0|0)==77&&(Y0=0,m=(p|0)>-1?c&-65537:c,c=ii,c=(e[c>>2]|0)!=0|(e[c+4>>2]|0)!=0,(p|0)!=0|c?(c=(c&1^1)+(fe-a)|0,V=a,c=(p|0)>(c|0)?p:c,E=T,a=Re):(V=Re,c=0,E=T,a=Re)),T=a-V|0,c=(c|0)<(T|0)?T:c,p=D+c|0,a=(A0|0)<(p|0)?p:A0,Vi(t,32,a,p,m),e[t>>2]&32||Ui(E,D,t)|0,Vi(t,48,a,p,m^65536),Vi(t,48,c,T,0),e[t>>2]&32||Ui(V,T,t)|0,Vi(t,32,a,p,m^8192),V=S0}e:do if((Y0|0)==245&&!t)if(r){for(l=1;r=e[o+(l<<2)>>2]|0,!!r;)if(F2(s+(l<<3)|0,r,n),l=l+1|0,(l|0)>=10){l=1;break e}if((l|0)<10)for(;;){if(e[o+(l<<2)>>2]|0){l=-1;break e}if(l=l+1|0,(l|0)>=10){l=1;break}}else l=1}else l=0;while(!1);return y=gt,l|0}function p4(t,r,n){return t=t|0,r=r|0,n=n|0,yp(t,r,n)|0}function A4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+112|0,a=c,o=a,l=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(l|0));return o=a+4|0,e[o>>2]=t,l=a+8|0,e[l>>2]=-1,e[a+44>>2]=t,e[a+76>>2]=-1,rt(a,0),s=+pn(a,n,1),n=(e[o>>2]|0)-(e[l>>2]|0)+(e[a+108>>2]|0)|0,r&&(e[r>>2]=n|0?t+n|0:t),y=c,+s}function E2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0;return m=y,y=y+112|0,c=m,e[c>>2]=0,l=c+4|0,e[l>>2]=t,e[c+44>>2]=t,a=c+8|0,e[a>>2]=(t|0)<0?-1:t+2147483647|0,e[c+76>>2]=-1,rt(c,0),s=An(c,n,1,s,o)|0,r&&(e[r>>2]=t+((e[l>>2]|0)+(e[c+108>>2]|0)-(e[a>>2]|0))),y=m,s|0}function S4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=t+20|0,o=e[s>>2]|0,t=(e[t+16>>2]|0)-o|0,t=t>>>0>n>>>0?n:t,ei(o|0,r|0,t|0)|0,e[s>>2]=(e[s>>2]|0)+t,n|0}function F2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e:do if(r>>>0<=20)do switch(r|0){case 9:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,e[t>>2]=r;break e}case 10:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=((r|0)<0)<<31>>31;break e}case 11:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=0;break e}case 12:{s=(e[n>>2]|0)+7&-8,r=s,o=e[r>>2]|0,r=e[r+4>>2]|0,e[n>>2]=s+8,s=t,e[s>>2]=o,e[s+4>>2]=r;break e}case 13:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&65535)<<16>>16,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 14:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&65535,e[o+4>>2]=0;break e}case 15:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&255)<<24>>24,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 16:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&255,e[o+4>>2]=0;break e}case 17:{o=(e[n>>2]|0)+7&-8,l=+j[o>>3],e[n>>2]=o+8,j[t>>3]=l;break e}case 18:{o=(e[n>>2]|0)+7&-8,l=+j[o>>3],e[n>>2]=o+8,j[t>>3]=l;break e}default:break e}while(!1);while(!1)}function qt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(r>>>0>0|(r|0)==0&t>>>0>4294967295)for(;;)if(s=v1(t|0,r|0,10,0)|0,n=n+-1|0,d[n>>0]=s|48,s=Ar(t|0,r|0,10,0)|0,r>>>0>9|(r|0)==9&t>>>0>4294967295)t=s,r=D0;else{t=s;break}if(t)for(;n=n+-1|0,d[n>>0]=(t>>>0)%10|0|48,!(t>>>0<10);)t=(t>>>0)/10|0;return n|0}function Vi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;c=y,y=y+256|0,a=c;do if((n|0)>(s|0)&(o&73728|0)==0){if(o=n-s|0,je(a|0,r|0,(o>>>0>256?256:o)|0)|0,r=e[t>>2]|0,l=(r&32|0)==0,o>>>0>255){s=n-s|0;do l&&(Ui(a,256,t)|0,r=e[t>>2]|0),o=o+-256|0,l=(r&32|0)==0;while(o>>>0>255);if(l)o=s&255;else break}else if(!l)break;Ui(a,o,t)|0}while(!1);y=c}function Ti(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0,le=0,Be=0,ne=0;do if(t>>>0<245){if(E=t>>>0<11?16:t+11&-8,t=E>>>3,c=e[10218]|0,n=c>>>t,n&3){t=(n&1^1)+t|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,o=e[s>>2]|0,l=o+8|0,a=e[l>>2]|0;do if((n|0)!=(a|0))if(a>>>0<(e[10222]|0)>>>0&&ae(),r=a+12|0,(e[r>>2]|0)==(o|0)){e[r>>2]=n,e[s>>2]=a;break}else ae();else e[10218]=c&~(1<>2]=ne|3,ne=o+(ne|4)|0,e[ne>>2]=e[ne>>2]|1,ne=l,ne|0}if(a=e[10220]|0,E>>>0>a>>>0){if(n){s=2<>>12&16,s=s>>>m,o=s>>>5&8,s=s>>>o,l=s>>>2&4,s=s>>>l,n=s>>>1&2,s=s>>>n,t=s>>>1&1,t=(o|m|l|n|t)+(s>>>t)|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,l=e[s>>2]|0,m=l+8|0,o=e[m>>2]|0;do if((n|0)!=(o|0))if(o>>>0<(e[10222]|0)>>>0&&ae(),r=o+12|0,(e[r>>2]|0)==(l|0)){e[r>>2]=n,e[s>>2]=o,A=e[10220]|0;break}else ae();else e[10218]=c&~(1<>2]=E|3,c=l+E|0,e[l+(E|4)>>2]=a|1,e[l+ne>>2]=a,A&&(o=e[10223]|0,n=A>>>3,r=n<<1,s=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,r>>>0<(e[10222]|0)>>>0?ae():(p=t,T=r)):(e[10218]=t|n,p=40912+(r+2<<2)|0,T=s),e[p>>2]=o,e[T+12>>2]=o,e[o+8>>2]=T,e[o+12>>2]=s),e[10220]=a,e[10223]=c,ne=m,ne|0}if(t=e[10219]|0,t){for(n=(t&0-t)+-1|0,Be=n>>>12&16,n=n>>>Be,le=n>>>5&8,n=n>>>le,ne=n>>>2&4,n=n>>>ne,t=n>>>1&2,n=n>>>t,s=n>>>1&1,s=e[41176+((le|Be|ne|t|s)+(n>>>s)<<2)>>2]|0,n=(e[s+4>>2]&-8)-E|0,t=s;;){if(r=e[t+16>>2]|0,!r&&(r=e[t+20>>2]|0,!r)){m=n;break}t=(e[r+4>>2]&-8)-E|0,ne=t>>>0>>0,n=ne?t:n,t=r,s=ne?r:s}l=e[10222]|0,s>>>0>>0&&ae(),c=s+E|0,s>>>0>=c>>>0&&ae(),a=e[s+24>>2]|0,n=e[s+12>>2]|0;do if((n|0)==(s|0)){if(t=s+20|0,r=e[t>>2]|0,!r&&(t=s+16|0,r=e[t>>2]|0,!r)){D=0;break}for(;;){if(n=r+20|0,o=e[n>>2]|0,o){r=o,t=n;continue}if(n=r+16|0,o=e[n>>2]|0,o)r=o,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,D=r;break}}else if(o=e[s+8>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(s|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(s|0)){e[r>>2]=n,e[t>>2]=o,D=n;break}else ae();while(!1);do if(a){if(r=e[s+28>>2]|0,t=41176+(r<<2)|0,(s|0)==(e[t>>2]|0)){if(e[t>>2]=D,!D){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(s|0)?e[r>>2]=D:e[a+20>>2]=D,!D)break;t=e[10222]|0,D>>>0>>0&&ae(),e[D+24>>2]=a,r=e[s+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[D+16>>2]=r,e[r+24>>2]=D;break}while(!1);if(r=e[s+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[D+20>>2]=r,e[r+24>>2]=D;break}}while(!1);return m>>>0<16?(ne=m+E|0,e[s+4>>2]=ne|3,ne=s+(ne+4)|0,e[ne>>2]=e[ne>>2]|1):(e[s+4>>2]=E|3,e[s+(E|4)>>2]=m|1,e[s+(m+E)>>2]=m,r=e[10220]|0,r&&(l=e[10223]|0,n=r>>>3,r=n<<1,o=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(U=r,V=t)):(e[10218]=t|n,U=40912+(r+2<<2)|0,V=o),e[U>>2]=l,e[V+12>>2]=l,e[l+8>>2]=V,e[l+12>>2]=o),e[10220]=m,e[10223]=c),ne=s+8|0,ne|0}else V=E}else V=E}else if(t>>>0<=4294967231)if(t=t+11|0,T=t&-8,p=e[10219]|0,p){n=0-T|0,t=t>>>8,t?T>>>0>16777215?A=31:(V=(t+1048320|0)>>>16&8,M=t<>>16&4,M=M<>>16&2,A=14-(U|V|A)+(M<>>15)|0,A=T>>>(A+7|0)&1|A<<1):A=0,t=e[41176+(A<<2)>>2]|0;e:do if(!t)o=0,t=0,M=86;else for(a=n,o=0,c=T<<((A|0)==31?0:25-(A>>>1)|0),m=t,t=0;;){if(l=e[m+4>>2]&-8,n=l-T|0,n>>>0>>0)if((l|0)==(T|0)){l=m,t=m,M=90;break e}else t=m;else n=a;if(M=e[m+20>>2]|0,m=e[m+16+(c>>>31<<2)>>2]|0,o=(M|0)==0|(M|0)==(m|0)?o:M,m)a=n,c=c<<1;else{M=86;break}}while(!1);if((M|0)==86){if((o|0)==0&(t|0)==0){if(t=2<>>12&16,t=t>>>D,p=t>>>5&8,t=t>>>p,U=t>>>2&4,t=t>>>U,V=t>>>1&2,t=t>>>V,o=t>>>1&1,o=e[41176+((p|D|U|V|o)+(t>>>o)<<2)>>2]|0,t=0}o?(l=o,M=90):(c=n,m=t)}if((M|0)==90)for(;;){if(M=0,V=(e[l+4>>2]&-8)-T|0,o=V>>>0>>0,n=o?V:n,t=o?l:t,o=e[l+16>>2]|0,o){l=o,M=90;continue}if(l=e[l+20>>2]|0,l)M=90;else{c=n,m=t;break}}if(m|0&&c>>>0<((e[10220]|0)-T|0)>>>0){o=e[10222]|0,m>>>0>>0&&ae(),a=m+T|0,m>>>0>=a>>>0&&ae(),l=e[m+24>>2]|0,n=e[m+12>>2]|0;do if((n|0)==(m|0)){if(t=m+20|0,r=e[t>>2]|0,!r&&(t=m+16|0,r=e[t>>2]|0,!r)){E=0;break}for(;;){if(n=r+20|0,s=e[n>>2]|0,s){r=s,t=n;continue}if(n=r+16|0,s=e[n>>2]|0,s)r=s,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,E=r;break}}else if(s=e[m+8>>2]|0,s>>>0>>0&&ae(),r=s+12|0,(e[r>>2]|0)!=(m|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(m|0)){e[r>>2]=n,e[t>>2]=s,E=n;break}else ae();while(!1);do if(l){if(r=e[m+28>>2]|0,t=41176+(r<<2)|0,(m|0)==(e[t>>2]|0)){if(e[t>>2]=E,!E){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=l+16|0,(e[r>>2]|0)==(m|0)?e[r>>2]=E:e[l+20>>2]=E,!E)break;t=e[10222]|0,E>>>0>>0&&ae(),e[E+24>>2]=l,r=e[m+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[E+16>>2]=r,e[r+24>>2]=E;break}while(!1);if(r=e[m+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[E+20>>2]=r,e[r+24>>2]=E;break}}while(!1);e:do if(c>>>0>=16){if(e[m+4>>2]=T|3,e[m+(T|4)>>2]=c|1,e[m+(c+T)>>2]=c,r=c>>>3,c>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(O=r,R=t)):(e[10218]=n|r,O=40912+(t+2<<2)|0,R=s),e[O>>2]=a,e[R+12>>2]=a,e[m+(T+8)>>2]=R,e[m+(T+12)>>2]=s;break}if(r=c>>>8,r?c>>>0>16777215?s=31:(Be=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|Be|s)+(ne<>>15)|0,s=c>>>(s+7|0)&1|s<<1):s=0,r=41176+(s<<2)|0,e[m+(T+28)>>2]=s,e[m+(T+20)>>2]=0,e[m+(T+16)>>2]=0,t=e[10219]|0,n=1<>2]=a,e[m+(T+24)>>2]=r,e[m+(T+12)>>2]=a,e[m+(T+8)>>2]=a;break}r=e[r>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(c|0)){for(s=c<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(c|0)){t0=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[m+(T+24)>>2]=r,e[m+(T+12)>>2]=a,e[m+(T+8)>>2]=a;break e}}else t0=r;while(!1);if(r=t0+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&t0>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[m+(T+8)>>2]=t,e[m+(T+12)>>2]=t0,e[m+(T+24)>>2]=0;break}else ae()}else ne=c+T|0,e[m+4>>2]=ne|3,ne=m+(ne+4)|0,e[ne>>2]=e[ne>>2]|1;while(!1);return ne=m+8|0,ne|0}else V=T}else V=T;else V=-1;while(!1);if(n=e[10220]|0,n>>>0>=V>>>0)return r=n-V|0,t=e[10223]|0,r>>>0>15?(e[10223]=t+V,e[10220]=r,e[t+(V+4)>>2]=r|1,e[t+n>>2]=r,e[t+4>>2]=V|3):(e[10220]=0,e[10223]=0,e[t+4>>2]=n|3,ne=t+(n+4)|0,e[ne>>2]=e[ne>>2]|1),ne=t+8|0,ne|0;if(t=e[10221]|0,t>>>0>V>>>0)return Be=t-V|0,e[10221]=Be,ne=e[10224]|0,e[10224]=ne+V,e[ne+(V+4)>>2]=Be|1,e[ne+4>>2]=V|3,ne=ne+8|0,ne|0;do if(!(e[10336]|0))if(t=bn(30)|0,t+-1&t)ae();else{e[10338]=t,e[10337]=t,e[10339]=-1,e[10340]=-1,e[10341]=0,e[10329]=0,t0=(Wn(0)|0)&-16^1431655768,e[10336]=t0;break}while(!1);if(m=V+48|0,c=e[10338]|0,A=V+47|0,a=c+A|0,c=0-c|0,p=a&c,p>>>0<=V>>>0||(t=e[10328]|0,t|0&&(R=e[10326]|0,t0=R+p|0,t0>>>0<=R>>>0|t0>>>0>t>>>0)))return ne=0,ne|0;e:do if(e[10329]&4)t=0,M=191;else{t=e[10224]|0;i:do if(t){for(o=41320;;){if(n=e[o>>2]|0,n>>>0<=t>>>0&&(q=o+4|0,(n+(e[q>>2]|0)|0)>>>0>t>>>0)){l=o,t=q;break}if(o=e[o+8>>2]|0,!o){M=174;break i}}if(n=a-(e[10221]|0)&c,n>>>0<2147483647)if(o=_t(n|0)|0,t0=(o|0)==((e[l>>2]|0)+(e[t>>2]|0)|0),t=t0?n:0,t0){if((o|0)!=-1){X=o,U=t,M=194;break e}}else M=184;else t=0}else M=174;while(!1);do if((M|0)==174)if(l=_t(0)|0,(l|0)!=-1)if(t=l,n=e[10337]|0,o=n+-1|0,o&t?n=p-t+(o+t&0-n)|0:n=p,t=e[10326]|0,o=t+n|0,n>>>0>V>>>0&n>>>0<2147483647){if(t0=e[10328]|0,t0|0&&o>>>0<=t>>>0|o>>>0>t0>>>0){t=0;break}if(o=_t(n|0)|0,t0=(o|0)==(l|0),t=t0?n:0,t0){X=l,U=t,M=194;break e}else M=184}else t=0;else t=0;while(!1);i:do if((M|0)==184){l=0-n|0;do if(m>>>0>n>>>0&(n>>>0<2147483647&(o|0)!=-1)&&(F=e[10338]|0,F=A-n+F&0-F,F>>>0<2147483647))if((_t(F|0)|0)==-1){_t(l|0)|0;break i}else{n=F+n|0;break}while(!1);if((o|0)!=-1){X=o,U=n,M=194;break e}}while(!1);e[10329]=e[10329]|4,M=191}while(!1);if((M|0)==191&&p>>>0<2147483647&&(X=_t(p|0)|0,K=_t(0)|0,X>>>0>>0&((X|0)!=-1&(K|0)!=-1))&&(J=K-X|0,s0=J>>>0>(V+40|0)>>>0,s0)&&(U=s0?J:t,M=194),(M|0)==194){t=(e[10326]|0)+U|0,e[10326]=t,t>>>0>(e[10327]|0)>>>0&&(e[10327]=t),a=e[10224]|0;e:do if(a){l=41320;do{if(t=e[l>>2]|0,n=l+4|0,o=e[n>>2]|0,(X|0)==(t+o|0)){w0=t,S0=n,A0=o,Y0=l,M=204;break}l=e[l+8>>2]|0}while(l|0);if((M|0)==204&&!(e[Y0+12>>2]&8|0)&&a>>>0>>0&a>>>0>=w0>>>0){e[S0>>2]=A0+U,ne=(e[10221]|0)+U|0,Be=a+8|0,Be=Be&7|0?0-Be&7:0,le=ne-Be|0,e[10224]=a+Be,e[10221]=le,e[a+(Be+4)>>2]=le|1,e[a+(ne+4)>>2]=40,e[10225]=e[10340];break}for(t=e[10222]|0,X>>>0>>0&&(e[10222]=X,t=X),n=X+U|0,l=41320;;){if((e[l>>2]|0)==(n|0)){o=l,n=l,M=212;break}if(l=e[l+8>>2]|0,!l){n=41320;break}}if((M|0)==212)if(e[n+12>>2]&8)n=41320;else{e[o>>2]=X,D=n+4|0,e[D>>2]=(e[D>>2]|0)+U,D=X+8|0,D=D&7|0?0-D&7:0,A=X+(U+8)|0,A=A&7|0?0-A&7:0,r=X+(A+U)|0,T=D+V|0,E=X+T|0,p=r-(X+D)-V|0,e[X+(D+4)>>2]=V|3;i:do if((r|0)!=(a|0)){if((r|0)==(e[10223]|0)){ne=(e[10220]|0)+p|0,e[10220]=ne,e[10223]=E,e[X+(T+4)>>2]=ne|1,e[X+(ne+T)>>2]=ne;break}if(c=U+4|0,n=e[X+(c+A)>>2]|0,(n&3|0)==1){m=n&-8,l=n>>>3;t:do if(n>>>0>=256){a=e[X+((A|24)+U)>>2]|0,s=e[X+(U+12+A)>>2]|0;do if((s|0)==(r|0)){if(o=A|16,s=X+(c+o)|0,n=e[s>>2]|0,!n&&(s=X+(o+U)|0,n=e[s>>2]|0,!n)){_e=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,_e=n;break}}else if(o=e[X+((A|8)+U)>>2]|0,o>>>0>>0&&ae(),t=o+12|0,(e[t>>2]|0)!=(r|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(r|0)){e[t>>2]=s,e[n>>2]=o,_e=s;break}else ae();while(!1);if(!a)break;t=e[X+(U+28+A)>>2]|0,n=41176+(t<<2)|0;do if((r|0)!=(e[n>>2]|0)){if(a>>>0<(e[10222]|0)>>>0&&ae(),t=a+16|0,(e[t>>2]|0)==(r|0)?e[t>>2]=_e:e[a+20>>2]=_e,!_e)break t}else{if(e[n>>2]=_e,_e)break;e[10219]=e[10219]&~(1<>>0>>0&&ae(),e[_e+24>>2]=a,r=A|16,t=e[X+(r+U)>>2]|0;do if(t)if(t>>>0>>0)ae();else{e[_e+16>>2]=t,e[t+24>>2]=_e;break}while(!1);if(r=e[X+(c+r)>>2]|0,!r)break;if(r>>>0<(e[10222]|0)>>>0)ae();else{e[_e+20>>2]=r,e[r+24>>2]=_e;break}}else{s=e[X+((A|8)+U)>>2]|0,o=e[X+(U+12+A)>>2]|0,n=40912+(l<<1<<2)|0;do if((s|0)!=(n|0)){if(s>>>0>>0&&ae(),(e[s+12>>2]|0)==(r|0))break;ae()}while(!1);if((o|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),t=o+8|0,(e[t>>2]|0)==(r|0)){Qe=t;break}ae()}while(!1);e[s+12>>2]=o,e[Qe>>2]=s}while(!1);r=X+((m|A)+U)|0,o=m+p|0}else o=p;if(r=r+4|0,e[r>>2]=e[r>>2]&-2,e[X+(T+4)>>2]=o|1,e[X+(o+T)>>2]=o,r=o>>>3,o>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0>=(e[10222]|0)>>>0){le=r,Be=t;break}ae()}while(!1);e[le>>2]=E,e[Be+12>>2]=E,e[X+(T+8)>>2]=Be,e[X+(T+12)>>2]=s;break}r=o>>>8;do if(!r)s=0;else{if(o>>>0>16777215){s=31;break}le=(r+1048320|0)>>>16&8,Be=r<>>16&4,Be=Be<<_e,s=(Be+245760|0)>>>16&2,s=14-(_e|le|s)+(Be<>>15)|0,s=o>>>(s+7|0)&1|s<<1}while(!1);if(r=41176+(s<<2)|0,e[X+(T+28)>>2]=s,e[X+(T+20)>>2]=0,e[X+(T+16)>>2]=0,t=e[10219]|0,n=1<>2]=E,e[X+(T+24)>>2]=r,e[X+(T+12)>>2]=E,e[X+(T+8)>>2]=E;break}r=e[r>>2]|0;t:do if((e[r+4>>2]&-8|0)!=(o|0)){for(s=o<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(o|0)){ne=n;break t}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=E,e[X+(T+24)>>2]=r,e[X+(T+12)>>2]=E,e[X+(T+8)>>2]=E;break i}}else ne=r;while(!1);if(r=ne+8|0,t=e[r>>2]|0,Be=e[10222]|0,t>>>0>=Be>>>0&ne>>>0>=Be>>>0){e[t+12>>2]=E,e[r>>2]=E,e[X+(T+8)>>2]=t,e[X+(T+12)>>2]=ne,e[X+(T+24)>>2]=0;break}else ae()}else ne=(e[10221]|0)+p|0,e[10221]=ne,e[10224]=E,e[X+(T+4)>>2]=ne|1;while(!1);return ne=X+(D|8)|0,ne|0}for(;t=e[n>>2]|0,!(t>>>0<=a>>>0&&(r=e[n+4>>2]|0,s=t+r|0,s>>>0>a>>>0));)n=e[n+8>>2]|0;if(o=t+(r+-39)|0,t=t+(r+-47+(o&7|0?0-o&7:0))|0,o=a+16|0,t=t>>>0>>0?a:t,r=t+8|0,n=X+8|0,n=n&7|0?0-n&7:0,ne=U+-40-n|0,e[10224]=X+n,e[10221]=ne,e[X+(n+4)>>2]=ne|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340],n=t+4|0,e[n>>2]=27,e[r>>2]=e[10330],e[r+4>>2]=e[10331],e[r+8>>2]=e[10332],e[r+12>>2]=e[10333],e[10330]=X,e[10331]=U,e[10333]=0,e[10332]=r,r=t+28|0,e[r>>2]=7,(t+32|0)>>>0>>0)do ne=r,r=r+4|0,e[r>>2]=7;while((ne+8|0)>>>0>>0);if((t|0)!=(a|0)){if(l=t-a|0,e[n>>2]=e[n>>2]&-2,e[a+4>>2]=l|1,e[t>>2]=l,r=l>>>3,l>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(Re=r,$e=t)):(e[10218]=n|r,Re=40912+(t+2<<2)|0,$e=s),e[Re>>2]=a,e[$e+12>>2]=a,e[a+8>>2]=$e,e[a+12>>2]=s;break}if(r=l>>>8,r?l>>>0>16777215?s=31:(Be=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|Be|s)+(ne<>>15)|0,s=l>>>(s+7|0)&1|s<<1):s=0,n=41176+(s<<2)|0,e[a+28>>2]=s,e[a+20>>2]=0,e[o>>2]=0,r=e[10219]|0,t=1<>2]=a,e[a+24>>2]=n,e[a+12>>2]=a,e[a+8>>2]=a;break}r=e[n>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(s=l<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(l|0)){We=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[a+24>>2]=r,e[a+12>>2]=a,e[a+8>>2]=a;break e}}else We=r;while(!1);if(r=We+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&We>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[a+8>>2]=t,e[a+12>>2]=We,e[a+24>>2]=0;break}else ae()}}else{ne=e[10222]|0,(ne|0)==0|X>>>0>>0&&(e[10222]=X),e[10330]=X,e[10331]=U,e[10333]=0,e[10227]=e[10336],e[10226]=-1,r=0;do ne=r<<1,Be=40912+(ne<<2)|0,e[40912+(ne+3<<2)>>2]=Be,e[40912+(ne+2<<2)>>2]=Be,r=r+1|0;while((r|0)!=32);ne=X+8|0,ne=ne&7|0?0-ne&7:0,Be=U+-40-ne|0,e[10224]=X+ne,e[10221]=Be,e[X+(ne+4)>>2]=Be|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340]}while(!1);if(r=e[10221]|0,r>>>0>V>>>0)return Be=r-V|0,e[10221]=Be,ne=e[10224]|0,e[10224]=ne+V,e[ne+(V+4)>>2]=Be|1,e[ne+4>>2]=V|3,ne=ne+8|0,ne|0}return ne=di()|0,e[ne>>2]=12,ne=0,ne|0}function Ze(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;if(t){r=t+-8|0,c=e[10222]|0,r>>>0>>0&&ae(),n=e[t+-4>>2]|0,s=n&3,(s|0)==1&&ae(),E=n&-8,V=t+(E+-8)|0;do if(n&1)F=r,l=E;else{if(r=e[r>>2]|0,!s)return;if(m=-8-r|0,p=t+m|0,T=r+E|0,p>>>0>>0&&ae(),(p|0)==(e[10223]|0)){if(r=t+(E+-4)|0,n=e[r>>2]|0,(n&3|0)!=3){F=p,l=T;break}e[10220]=T,e[r>>2]=n&-2,e[t+(m+4)>>2]=T|1,e[V>>2]=T;return}if(o=r>>>3,r>>>0<256){if(s=e[t+(m+8)>>2]|0,n=e[t+(m+12)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0>>0&&ae(),(e[s+12>>2]|0)!=(p|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(p|0)?a=r:ae()):a=n+8|0,e[s+12>>2]=n,e[a>>2]=s,F=p,l=T;break}a=e[t+(m+24)>>2]|0,s=e[t+(m+12)>>2]|0;do if((s|0)==(p|0)){if(n=t+(m+20)|0,r=e[n>>2]|0,!r&&(n=t+(m+16)|0,r=e[n>>2]|0,!r)){A=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0>>0)ae();else{e[n>>2]=0,A=r;break}}else if(o=e[t+(m+8)>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(p|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(p|0)){e[r>>2]=s,e[n>>2]=o,A=s;break}else ae();while(!1);if(a){if(r=e[t+(m+28)>>2]|0,n=41176+(r<<2)|0,(p|0)==(e[n>>2]|0)){if(e[n>>2]=A,!A){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(p|0)?e[r>>2]=A:e[a+20>>2]=A,!A){F=p,l=T;break}n=e[10222]|0,A>>>0>>0&&ae(),e[A+24>>2]=a,r=e[t+(m+16)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[A+16>>2]=r,e[r+24>>2]=A;break}while(!1);if(r=e[t+(m+20)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[A+20>>2]=r,e[r+24>>2]=A,F=p,l=T;break}else F=p,l=T}else F=p,l=T}while(!1);if(F>>>0>=V>>>0&&ae(),r=t+(E+-4)|0,n=e[r>>2]|0,n&1||ae(),n&2)e[r>>2]=n&-2,e[F+4>>2]=l|1,e[F+l>>2]=l;else{if((V|0)==(e[10224]|0)){if(R=(e[10221]|0)+l|0,e[10221]=R,e[10224]=F,e[F+4>>2]=R|1,(F|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((V|0)==(e[10223]|0)){R=(e[10220]|0)+l|0,e[10220]=R,e[10223]=F,e[F+4>>2]=R|1,e[F+R>>2]=R;return}l=(n&-8)+l|0,o=n>>>3;do if(n>>>0>=256){a=e[t+(E+16)>>2]|0,r=e[t+(E|4)>>2]|0;do if((r|0)==(V|0)){if(n=t+(E+12)|0,r=e[n>>2]|0,!r&&(n=t+(E+8)|0,r=e[n>>2]|0,!r)){U=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=0,U=r;break}}else if(n=e[t+E>>2]|0,n>>>0<(e[10222]|0)>>>0&&ae(),s=n+12|0,(e[s>>2]|0)!=(V|0)&&ae(),o=r+8|0,(e[o>>2]|0)==(V|0)){e[s>>2]=r,e[o>>2]=n,U=r;break}else ae();while(!1);if(a){if(r=e[t+(E+20)>>2]|0,n=41176+(r<<2)|0,(V|0)==(e[n>>2]|0)){if(e[n>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(V|0)?e[r>>2]=U:e[a+20>>2]=U,!U)break;n=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=a,r=e[t+(E+8)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[U+16>>2]=r,e[r+24>>2]=U;break}while(!1);if(r=e[t+(E+12)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=r,e[r+24>>2]=U;break}}}else{if(s=e[t+E>>2]|0,n=e[t+(E|4)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0<(e[10222]|0)>>>0&&ae(),(e[s+12>>2]|0)!=(V|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(V|0)?D=r:ae()):D=n+8|0,e[s+12>>2]=n,e[D>>2]=s}while(!1);if(e[F+4>>2]=l|1,e[F+l>>2]=l,(F|0)==(e[10223]|0)){e[10220]=l;return}}if(r=l>>>3,l>>>0<256){n=r<<1,o=40912+(n<<2)|0,s=e[10218]|0,r=1<>2]|0,n>>>0<(e[10222]|0)>>>0?ae():(q=r,O=n)):(e[10218]=s|r,q=40912+(n+2<<2)|0,O=o),e[q>>2]=F,e[O+12>>2]=F,e[F+8>>2]=O,e[F+12>>2]=o;return}r=l>>>8,r?l>>>0>16777215?o=31:(q=(r+1048320|0)>>>16&8,O=r<>>16&4,O=O<>>16&2,o=14-(V|q|o)+(O<>>15)|0,o=l>>>(o+7|0)&1|o<<1):o=0,r=41176+(o<<2)|0,e[F+28>>2]=o,e[F+20>>2]=0,e[F+16>>2]=0,n=e[10219]|0,s=1<>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(o=l<<((o|0)==31?0:25-(o>>>1)|0);n=r+16+(o>>>31<<2)|0,s=e[n>>2]|0,!!s;)if((e[s+4>>2]&-8|0)==(l|0)){R=s;break i}else o=o<<1,r=s;if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;break e}}else R=r;while(!1);if(r=R+8|0,n=e[r>>2]|0,O=e[10222]|0,n>>>0>=O>>>0&R>>>0>=O>>>0){e[n+12>>2]=F,e[r>>2]=F,e[F+8>>2]=n,e[F+12>>2]=R,e[F+24>>2]=0;break}else ae()}else e[10219]=n|s,e[r>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;while(!1);if(F=(e[10226]|0)+-1|0,e[10226]=F,!F)r=41328;else return;for(;r=e[r>>2]|0,r;)r=r+8|0;e[10226]=-1}}function w4(t,r){t=t|0,r=r|0;var n=0;return t?(n=W(r,t)|0,(r|t)>>>0>65535&&(n=((n>>>0)/(t>>>0)|0|0)==(r|0)?n:-1)):n=0,r=Ti(n)|0,!r||!(e[r+-4>>2]&3)||je(r|0,0,n|0)|0,r|0}function bt(t,r){t=t|0,r=r|0;var n=0,s=0;return t?r>>>0>4294967231?(t=di()|0,e[t>>2]=12,t=0,t|0):(n=x4(t+-8|0,r>>>0<11?16:r+11&-8)|0,n?(t=n+8|0,t|0):(n=Ti(r)|0,n?(s=e[t+-4>>2]|0,s=(s&-8)-(s&3|0?4:8)|0,ei(n|0,t|0,(s>>>0>>0?s:r)|0)|0,Ze(t),t=n,t|0):(t=0,t|0))):(t=Ti(r)|0,t|0)}function x4(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(E=t+4|0,U=e[E>>2]|0,m=U&-8,p=t+m|0,c=e[10222]|0,n=U&3,(n|0)!=1&t>>>0>=c>>>0&t>>>0

>>0||ae(),s=t+(m|4)|0,o=e[s>>2]|0,o&1||ae(),!n)return r>>>0<256?(t=0,t|0):(m>>>0>=(r+4|0)>>>0&&(m-r|0)>>>0<=e[10338]<<1>>>0||(t=0),t|0);if(m>>>0>=r>>>0)return n=m-r|0,n>>>0<=15||(e[E>>2]=U&1|r|2,e[t+(r+4)>>2]=n|3,e[s>>2]=e[s>>2]|1,M2(t+r|0,n)),t|0;if((p|0)==(e[10224]|0))return n=(e[10221]|0)+m|0,n>>>0<=r>>>0?(t=0,t|0):(D=n-r|0,e[E>>2]=U&1|r|2,e[t+(r+4)>>2]=D|1,e[10224]=t+r,e[10221]=D,t|0);if((p|0)==(e[10223]|0))return s=(e[10220]|0)+m|0,s>>>0>>0?(t=0,t|0):(n=s-r|0,n>>>0>15?(e[E>>2]=U&1|r|2,e[t+(r+4)>>2]=n|1,e[t+s>>2]=n,s=t+(s+4)|0,e[s>>2]=e[s>>2]&-2,s=t+r|0):(e[E>>2]=U&1|s|2,s=t+(s+4)|0,e[s>>2]=e[s>>2]|1,s=0,n=0),e[10220]=n,e[10223]=s,t|0);if(o&2||(T=(o&-8)+m|0,T>>>0>>0))return t=0,t|0;D=T-r|0,l=o>>>3;do if(o>>>0>=256){a=e[t+(m+24)>>2]|0,l=e[t+(m+12)>>2]|0;do if((l|0)==(p|0)){if(s=t+(m+20)|0,n=e[s>>2]|0,!n&&(s=t+(m+16)|0,n=e[s>>2]|0,!n)){A=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,A=n;break}}else if(o=e[t+(m+8)>>2]|0,o>>>0>>0&&ae(),n=o+12|0,(e[n>>2]|0)!=(p|0)&&ae(),s=l+8|0,(e[s>>2]|0)==(p|0)){e[n>>2]=l,e[s>>2]=o,A=l;break}else ae();while(!1);if(a){if(n=e[t+(m+28)>>2]|0,s=41176+(n<<2)|0,(p|0)==(e[s>>2]|0)){if(e[s>>2]=A,!A){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=a+16|0,(e[n>>2]|0)==(p|0)?e[n>>2]=A:e[a+20>>2]=A,!A)break;s=e[10222]|0,A>>>0>>0&&ae(),e[A+24>>2]=a,n=e[t+(m+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[A+16>>2]=n,e[n+24>>2]=A;break}while(!1);if(n=e[t+(m+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[A+20>>2]=n,e[n+24>>2]=A;break}}}else{if(o=e[t+(m+8)>>2]|0,s=e[t+(m+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(p|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(p|0)?a=n:ae()):a=s+8|0,e[o+12>>2]=s,e[a>>2]=o}while(!1);return D>>>0<16?(e[E>>2]=T|U&1|2,r=t+(T|4)|0,e[r>>2]=e[r>>2]|1,t|0):(e[E>>2]=U&1|r|2,e[t+(r+4)>>2]=D|3,U=t+(T|4)|0,e[U>>2]=e[U>>2]|1,M2(t+r|0,D),t|0)}function M2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0;V=t+r|0,n=e[t+4>>2]|0;do if(n&1)R=t,a=r;else{if(A=e[t>>2]|0,!(n&3))return;if(D=t+(0-A)|0,T=A+r|0,m=e[10222]|0,D>>>0>>0&&ae(),(D|0)==(e[10223]|0)){if(s=t+(r+4)|0,n=e[s>>2]|0,(n&3|0)!=3){R=D,a=T;break}e[10220]=T,e[s>>2]=n&-2,e[t+(4-A)>>2]=T|1,e[V>>2]=T;return}if(l=A>>>3,A>>>0<256){if(o=e[t+(8-A)>>2]|0,s=e[t+(12-A)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(D|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(D|0)?c=n:ae()):c=s+8|0,e[o+12>>2]=s,e[c>>2]=o,R=D,a=T;break}c=e[t+(24-A)>>2]|0,o=e[t+(12-A)>>2]|0;do if((o|0)==(D|0)){if(o=16-A|0,s=t+(o+4)|0,n=e[s>>2]|0,!n&&(s=t+o|0,n=e[s>>2]|0,!n)){p=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,p=n;break}}else if(l=e[t+(8-A)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(D|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(D|0)){e[n>>2]=o,e[s>>2]=l,p=o;break}else ae();while(!1);if(c){if(n=e[t+(28-A)>>2]|0,s=41176+(n<<2)|0,(D|0)==(e[s>>2]|0)){if(e[s>>2]=p,!p){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(D|0)?e[n>>2]=p:e[c+20>>2]=p,!p){R=D,a=T;break}o=e[10222]|0,p>>>0>>0&&ae(),e[p+24>>2]=c,n=16-A|0,s=e[t+n>>2]|0;do if(s)if(s>>>0>>0)ae();else{e[p+16>>2]=s,e[s+24>>2]=p;break}while(!1);if(n=e[t+(n+4)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[p+20>>2]=n,e[n+24>>2]=p,R=D,a=T;break}else R=D,a=T}else R=D,a=T}while(!1);if(m=e[10222]|0,V>>>0>>0&&ae(),n=t+(r+4)|0,s=e[n>>2]|0,s&2)e[n>>2]=s&-2,e[R+4>>2]=a|1,e[R+a>>2]=a;else{if((V|0)==(e[10224]|0)){if(O=(e[10221]|0)+a|0,e[10221]=O,e[10224]=R,e[R+4>>2]=O|1,(R|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((V|0)==(e[10223]|0)){O=(e[10220]|0)+a|0,e[10220]=O,e[10223]=R,e[R+4>>2]=O|1,e[R+O>>2]=O;return}a=(s&-8)+a|0,l=s>>>3;do if(s>>>0>=256){c=e[t+(r+24)>>2]|0,o=e[t+(r+12)>>2]|0;do if((o|0)==(V|0)){if(s=t+(r+20)|0,n=e[s>>2]|0,!n&&(s=t+(r+16)|0,n=e[s>>2]|0,!n)){U=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,U=n;break}}else if(l=e[t+(r+8)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(V|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(V|0)){e[n>>2]=o,e[s>>2]=l,U=o;break}else ae();while(!1);if(c){if(n=e[t+(r+28)>>2]|0,s=41176+(n<<2)|0,(V|0)==(e[s>>2]|0)){if(e[s>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(V|0)?e[n>>2]=U:e[c+20>>2]=U,!U)break;s=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=c,n=e[t+(r+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[U+16>>2]=n,e[n+24>>2]=U;break}while(!1);if(n=e[t+(r+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=n,e[n+24>>2]=U;break}}}else{if(o=e[t+(r+8)>>2]|0,s=e[t+(r+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(V|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(V|0)?E=n:ae()):E=s+8|0,e[o+12>>2]=s,e[E>>2]=o}while(!1);if(e[R+4>>2]=a|1,e[R+a>>2]=a,(R|0)==(e[10223]|0)){e[10220]=a;return}}if(n=a>>>3,a>>>0<256){s=n<<1,l=40912+(s<<2)|0,o=e[10218]|0,n=1<>2]|0,s>>>0<(e[10222]|0)>>>0?ae():(q=n,O=s)):(e[10218]=o|n,q=40912+(s+2<<2)|0,O=l),e[q>>2]=R,e[O+12>>2]=R,e[R+8>>2]=O,e[R+12>>2]=l;return}if(n=a>>>8,n?a>>>0>16777215?l=31:(q=(n+1048320|0)>>>16&8,O=n<>>16&4,O=O<>>16&2,l=14-(V|q|l)+(O<>>15)|0,l=a>>>(l+7|0)&1|l<<1):l=0,n=41176+(l<<2)|0,e[R+28>>2]=l,e[R+20>>2]=0,e[R+16>>2]=0,s=e[10219]|0,o=1<>2]=R,e[R+24>>2]=n,e[R+12>>2]=R,e[R+8>>2]=R;return}n=e[n>>2]|0;e:do if((e[n+4>>2]&-8|0)!=(a|0)){for(l=a<<((l|0)==31?0:25-(l>>>1)|0);s=n+16+(l>>>31<<2)|0,o=e[s>>2]|0,!!o;)if((e[o+4>>2]&-8|0)==(a|0)){n=o;break e}else l=l<<1,n=o;s>>>0<(e[10222]|0)>>>0&&ae(),e[s>>2]=R,e[R+24>>2]=n,e[R+12>>2]=R,e[R+8>>2]=R;return}while(!1);s=n+8|0,o=e[s>>2]|0,O=e[10222]|0,o>>>0>=O>>>0&n>>>0>=O>>>0||ae(),e[o+12>>2]=R,e[s>>2]=R,e[R+8>>2]=o,e[R+12>>2]=n,e[R+24>>2]=0}function C4(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(s=e[9321]|0,I4(42048,s,42104),e[10342]=42892,e[10344]=42912,e[10343]=0,t=e[10720]|0,f=0,h0(62,41368+t|0,42048),l=f,f=0,l&1&&(l=b()|0,H0(41376),r0(l|0)),e[41368+(t+72)>>2]=0,e[41368+(t+76)>>2]=-1,o=e[9322]|0,_2(42152,o,42112),e[10364]=42972,e[10365]=42992,n=e[10740]|0,f=0,h0(62,41456+n|0,42152),l=f,f=0,l&1&&(l=b()|0,H0(41460),r0(l|0)),t=n+72|0,e[41456+t>>2]=0,r=n+76|0,e[41456+r>>2]=-1,l=e[9320]|0,_2(42200,l,42120),e[10385]=42972,e[10386]=42992,f=0,h0(62,41540+n|0,42200),a=f,f=0,a&1&&(a=b()|0,H0(41544),r0(a|0)),e[41540+t>>2]=0,e[41540+r>>2]=-1,a=e[41540+((e[(e[10385]|0)+-12>>2]|0)+24)>>2]|0,e[10406]=42972,e[10407]=42992,f=0,h0(62,41624+n|0,a|0),a=f,f=0,a&1&&(a=b()|0,H0(41628),r0(a|0)),e[41624+t>>2]=0,e[41624+r>>2]=-1,e[41368+((e[(e[10342]|0)+-12>>2]|0)+72)>>2]=41456,t=41540+((e[(e[10385]|0)+-12>>2]|0)+4)|0,e[t>>2]=e[t>>2]|8192,e[41540+((e[(e[10385]|0)+-12>>2]|0)+72)>>2]=41456,k4(42248,s,42128),e[10427]=42932,e[10429]=42952,e[10428]=0,t=e[10730]|0,f=0,h0(62,41708+t|0,42248),a=f,f=0,a&1&&(a=b()|0,hr(41716),r0(a|0)),e[41708+(t+72)>>2]=0,e[41708+(t+76)>>2]=-1,R2(42304,o,42136),e[10449]=43012,e[10450]=43032,n=e[10750]|0,f=0,h0(62,41796+n|0,42304),a=f,f=0,a&1&&(a=b()|0,hr(41800),r0(a|0)),t=n+72|0,e[41796+t>>2]=0,r=n+76|0,e[41796+r>>2]=-1,R2(42352,l,42144),e[10470]=43012,e[10471]=43032,f=0,h0(62,41880+n|0,42352),a=f,f=0,a&1&&(a=b()|0,hr(41884),r0(a|0)),e[41880+t>>2]=0,e[41880+r>>2]=-1,a=e[41880+((e[(e[10470]|0)+-12>>2]|0)+24)>>2]|0,e[10491]=43012,e[10492]=43032,f=0,h0(62,41964+n|0,a|0),a=f,f=0,a&1)a=b()|0,hr(41968),r0(a|0);else{e[41964+t>>2]=0,e[41964+r>>2]=-1,e[41708+((e[(e[10427]|0)+-12>>2]|0)+72)>>2]=41796,a=41880+((e[(e[10470]|0)+-12>>2]|0)+4)|0,e[a>>2]=e[a>>2]|8192,e[41880+((e[(e[10470]|0)+-12>>2]|0)+72)>>2]=41796;return}}function T4(t){t=t|0,f=0,u0(70,41456)|0,t=f,f=0,!(!(t&1)&&(f=0,u0(70,41624)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41796)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41964)|0,t=f,f=0,!(t&1)))&&(t=b(0)|0,De(t))}function y4(){C4(0),xe(187,56757,z|0)|0}function D4(){}function I4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,m1(t),e[t>>2]=42600,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(23,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),y=o;return}}function _2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,m1(t),e[t>>2]=42536,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44280)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function k4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42472,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(21,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),y=o;return}}function R2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42408,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44288)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function E4(t){t=t|0,ir(t),l0(t)}function F4(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44288)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function M4(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;A=y,y=y+16|0,c=A+8|0,a=A,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,p=(e[a>>2]|0)-l|0,(dt(c,1,p,e[r>>2]|0)|0)!=(p|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{m=4;break e}}}return(m|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=A,t|0}function _4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,4,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[s>>2]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+4|0;else break}else r=0;while(!1);return r|0}function R4(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;V=y,y=y+32|0,D=V+16|0,n=V+8|0,T=V+4|0,p=V,E=(r|0)==-1;e:do if(E)U=11;else{if(e[n>>2]=r,d[t+44>>0]|0)if((dt(n,4,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[T>>2]=D,m=n+4|0,A=t+36|0,o=t+40|0,l=D+8|0,a=D,c=t+32|0;;){if(t=e[A>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[o>>2]|0,n,m,p,D,l,T)|0,(e[p>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[T>>2]|0)-a|0,(dt(D,1,t,e[c>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[p>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[c>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=E?0:r),y=V,n|0}function P4(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44288)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&ar(56783)}function L4(t){t=t|0,ir(t),l0(t)}function U4(t){return t=t|0,P2(t,0)|0}function O4(t){return t=t|0,P2(t,1)|0}function N4(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;A=y,y=y+32|0,m=A+16|0,c=A+8|0,s=A+4|0,o=A,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(e[s>>2]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+4|0,o,m,m+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[m>>0]=e[a>>2],e[c>>2]=m+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=m>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(Fr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=A,r|0}function P2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;U=y,y=y+32|0,E=U+16|0,D=U+8|0,A=U+4|0,p=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,T=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[T>>2]|0)|0,(s|0)==-1){n=-1;break e}d[E+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)e[D>>2]=d[E>>0];else{a=t+40|0,c=t+36|0,m=D+4|0;t:for(;;){switch(V=e[a>>2]|0,o=V,s=e[o>>2]|0,o=e[o+4>>2]|0,q=e[c>>2]|0,l=E+n|0,Ct[e[(e[q>>2]|0)+16>>2]&15](q,V,E,l,A,D,m,p)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(q=e[a>>2]|0,e[q>>2]=s,e[q+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[T>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}e[D>>2]=d[E>>0]}while(!1);if(r){n=e[D>>2]|0,e[t+48>>2]=n;break}for(;!((n|0)<=0);)if(n=n+-1|0,(Fr(d[E+n>>0]|0,e[T>>2]|0)|0)==-1){n=-1;break e}n=e[D>>2]|0}while(!1);return y=U,n|0}function V4(t){t=t|0,ce(t),l0(t)}function B4(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44280)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function q4(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;A=y,y=y+16|0,c=A+8|0,a=A,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,p=(e[a>>2]|0)-l|0,(dt(c,1,p,e[r>>2]|0)|0)!=(p|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{m=4;break e}}}return(m|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=A,t|0}function G4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,1,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[s>>0]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+1|0;else break}else r=0;while(!1);return r|0}function z4(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;V=y,y=y+32|0,D=V+16|0,n=V+8|0,T=V+4|0,p=V,E=(r|0)==-1;e:do if(E)U=11;else{if(d[n>>0]=r,d[t+44>>0]|0)if((dt(n,1,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[T>>2]=D,A=n+1|0,o=t+36|0,l=t+40|0,a=D+8|0,c=D,m=t+32|0;;){if(t=e[o>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[l>>2]|0,n,A,p,D,a,T)|0,(e[p>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[T>>2]|0)-c|0,(dt(D,1,t,e[m>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[p>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[m>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=E?0:r),y=V,n|0}function Q4(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44280)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&ar(56783)}function H4(t){t=t|0,ce(t),l0(t)}function Y4(t){return t=t|0,L2(t,0)|0}function j4(t){return t=t|0,L2(t,1)|0}function X4(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;A=y,y=y+32|0,m=A+16|0,c=A+4|0,s=A+8|0,o=A,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(d[s>>0]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+1|0,o,m,m+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[m>>0]=e[a>>2],e[c>>2]=m+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=m>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(Fr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=A,r|0}function L2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;U=y,y=y+32|0,E=U+16|0,D=U+8|0,A=U+4|0,p=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,T=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[T>>2]|0)|0,(s|0)==-1){n=-1;break e}d[E+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)d[D>>0]=d[E>>0]|0;else{a=t+40|0,c=t+36|0,m=D+1|0;t:for(;;){switch(V=e[a>>2]|0,o=V,s=e[o>>2]|0,o=e[o+4>>2]|0,q=e[c>>2]|0,l=E+n|0,Ct[e[(e[q>>2]|0)+16>>2]&15](q,V,E,l,A,D,m,p)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(q=e[a>>2]|0,e[q>>2]=s,e[q+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[T>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}d[D>>0]=d[E>>0]|0}while(!1);if(r)n=d[D>>0]|0,e[t+48>>2]=n&255;else{for(;!((n|0)<=0);)if(n=n+-1|0,(Fr(N[E+n>>0]|0,e[T>>2]|0)|0)==-1){n=-1;break e}n=d[D>>0]|0}n=n&255}while(!1);return y=U,n|0}function nA(t){t=t|0}function cr(t){t=t|0,t=t+4|0,e[t>>2]=(e[t>>2]|0)+1}function Ie(t){t=t|0;var r=0,n=0;return n=t+4|0,r=e[n>>2]|0,e[n>>2]=r+-1,r?t=0:(Ce[e[(e[t>>2]|0)+8>>2]&255](t),t=1),t|0}function K4(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,(d[r>>0]&1?e[r+8>>2]|0:r+1|0)|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function W4(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,r|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function Z4(t,r){t=t|0,r=r|0;var n=0,s=0;s=Ot(r)|0,n=G0(s+13|0)|0,e[n>>2]=s,e[n+4>>2]=s,e[n+8>>2]=0,n=n+12|0,ei(n|0,r|0,s+1|0)|0,e[t>>2]=n}function J4(t,r,n){t=t|0,r=r|0,n=n|0,e[t>>2]=n,e[t+4>>2]=r}function $4(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,Pr[e[(e[t>>2]|0)+12>>2]&15](s,t,r),(e[s+4>>2]|0)==(e[n+4>>2]|0)?s=(e[s>>2]|0)==(e[n>>2]|0):s=0,y=o,s|0}function e5(t,r,n){return t=t|0,r=r|0,n=n|0,((e[r>>2]|0)==(n|0)?(e[r+4>>2]|0)==(t|0):0)|0}function i5(t,r,n){t=t|0,r=r|0,n=n|0,r=gn(n)|0,xt(t,r,Ot(r)|0)}function t5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,l=a,s=e[r>>2]|0;do if(s)if(o=d[n>>0]|0,o&1?o=e[n+4>>2]|0:o=(o&255)>>>1,o&&(m5(n,56990)|0,s=e[r>>2]|0),r=e[r+4>>2]|0,Pr[e[(e[r>>2]|0)+24>>2]&15](l,r,s),r=d[l>>0]|0,o=(r&1)==0,f=0,L0(30,n|0,(o?l+1|0:e[l+8>>2]|0)|0,(o?(r&255)>>>1:e[l+4>>2]|0)|0)|0,r=f,f=0,r&1)a=b()|0,a0(l),r0(a|0);else{a0(l);break}while(!1);e[t>>2]=e[n>>2],e[t+4>>2]=e[n+4>>2],e[t+8>>2]=e[n+8>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,y=a}function r5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;o=y,y=y+32|0,s=o+12|0,l=o,xt(l,n,Ot(n)|0),f=0,d0(10,s|0,r|0,l|0),n=f,f=0;do if(n&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),n=f,f=0,n&1){o=b()|0,a0(s),s=o;break}else{a0(s),a0(l),e[t>>2]=42664,n=e[r+4>>2]|0,l=t+8|0,e[l>>2]=e[r>>2],e[l+4>>2]=n,y=o;return}while(!1);a0(l),r0(s|0)}function n5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;l=y,y=y+48|0,o=l+24|0,c=l+16|0,a=l,e[c>>2]=r,e[c+4>>2]=n,a1(a,s),f=0,d0(10,o|0,c|0,a|0),s=f,f=0;do if(s&1)o=b()|0;else if(f=0,h0(87,t|0,o|0),c=f,f=0,c&1){c=b()|0,a0(o),o=c;break}else{a0(o),a0(a),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=l;return}while(!1);a0(a),r0(o|0)}function s5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;o=y,y=y+48|0,s=o+24|0,a=o+16|0,l=o,e[a>>2]=r,e[a+4>>2]=n,xt(l,58898,0),f=0,d0(10,s|0,a|0,l|0),a=f,f=0;do if(a&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),a=f,f=0,a&1){a=b()|0,a0(s),s=a;break}else{a0(s),a0(l),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=o;return}while(!1);a0(l),r0(s|0)}function l1(t){t=t|0,Cr(t)}function o5(t){t=t|0,Cr(t),l0(t)}function l5(t){t=t|0}function a5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(V1(42676)|0,(e[t>>2]|0)==1)do zi(42704,42676)|0;while((e[t>>2]|0)==1);do if(e[t>>2]|0)L1(42676)|0;else{if(e[t>>2]=1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1)&&(f=0,n0(n|0,r|0),s=f,f=0,!(s&1))&&(f=0,u0(73,42676)|0,s=f,f=0,!(s&1))&&(e[t>>2]=-1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1)))break;s=b(0)|0,Qi(s|0)|0,f=0,u0(73,42676)|0,s=f,f=0,!(s&1)&&(e[t>>2]=0,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1))&&(f=0,we(5),f=0),r=b()|0,f=0,we(3),s=f,f=0,s&1?(s=b(0)|0,De(s)):r0(r|0)}while(!1)}function a1(t,r){t=t|0,r=r|0,d[r>>0]&1?xt(t,e[r+8>>2]|0,e[r+4>>2]|0):(e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2])}function xt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>4294967279&&tt(t),n>>>0<11?(d[t>>0]=n<<1,t=t+1|0):(o=n+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),ei(t|0,r|0,n|0)|0,d[t+n>>0]=0}function f1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>4294967279&&tt(t),r>>>0<11?(d[t>>0]=r<<1,t=t+1|0):(o=r+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),je(t|0,n|0,r|0)|0,d[t+r>>0]=0}function a0(t){t=t|0,d[t>>0]&1&&l0(e[t+8>>2]|0)}function f5(t,r){t=t|0,r=r|0;var n=0,s=0;return(t|0)!=(r|0)&&(n=d[r>>0]|0,s=(n&1)==0,U2(t,s?r+1|0:e[r+8>>2]|0,s?(n&255)>>>1:e[r+4>>2]|0)|0),t|0}function u5(t,r){return t=t|0,r=r|0,U2(t,r,Ot(r)|0)|0}function U2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=10,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+1|0:s=e[t+8>>2]|0,pr(s|0,r|0,n|0)|0,d[s+n>>0]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,V2(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function O2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;s=d[t>>0]|0,o=(s&1)==0,o?s=(s&255)>>>1:s=e[t+4>>2]|0;do if(s>>>0>=r>>>0)if(o){d[t+1+r>>0]=0,d[t>>0]=r<<1;break}else{d[(e[t+8>>2]|0)+r>>0]=0,e[t+4>>2]=r;break}else c5(t,r-s|0,n)|0;while(!1)}function c5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return r&&(s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>>0&&(u1(t,o,r-o+l|0,l,l,0,0),s=d[t>>0]|0),s&1?o=e[t+8>>2]|0:o=t+1|0,je(o+l|0,n|0,r|0)|0,s=l+r|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0),t|0}function h5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>4294967279&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=10,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<11?a=10:a=(r+16&-16)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=10){if(r=a+1|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,Qi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+1|0,l=0;break}}else r=t+1|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,ei(r|0,o|0,n+1|0)|0,l&&l0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function m5(t,r){return t=t|0,r=r|0,N2(t,r,Ot(r)|0)|0}function d5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=10,l=(n&255)>>>1),(l|0)==(o|0)?(u1(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+1|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),d[n+l>>0]=r,d[n+s>>0]=0}function N2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>=n>>>0?n&&(s&1?o=e[t+8>>2]|0:o=t+1|0,ei(o+l|0,r|0,n|0)|0,s=l+n|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0):V2(t,o,n-o+l|0,l,l,0,n,r),t|0}function V2(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0;(-18-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+1|0,r>>>0<2147483623?(m=n+r|0,A=r<<1,m=m>>>0>>0?A:m,m=m>>>0<11?11:m+16&-16):m=-17,A=G0(m)|0,o&&ei(A|0,p|0,o|0)|0,a&&ei(A+o|0,c|0,a|0)|0,n=s-l|0,(n|0)!=(o|0)&&ei(A+(a+o)|0,p+(l+o)|0,n-o|0)|0,(r|0)!=10&&l0(p),e[t+8>>2]=A,e[t>>2]=m|1,r=n+a|0,e[t+4>>2]=r,d[A+r>>0]=0}function u1(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0;(-17-r|0)>>>0>>0&&tt(t),d[t>>0]&1?A=e[t+8>>2]|0:A=t+1|0,r>>>0<2147483623?(c=n+r|0,m=r<<1,c=c>>>0>>0?m:c,c=c>>>0<11?11:c+16&-16):c=-17,m=G0(c)|0,o&&ei(m|0,A|0,o|0)|0,n=s-l|0,(n|0)!=(o|0)&&ei(m+(a+o)|0,A+(l+o)|0,n-o|0)|0,(r|0)!=10&&l0(A),e[t+8>>2]=m,e[t>>2]=c|1}function c1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>1073741807&&tt(t),n>>>0<2?(d[t>>0]=n<<1,t=t+4|0):(o=n+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),Nt(t,r,n)|0,e[t+(n<<2)>>2]=0}function h1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>1073741807&&tt(t),r>>>0<2?(d[t>>0]=r<<1,t=t+4|0):(o=r+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),Pp(t,n,r)|0,e[t+(r<<2)>>2]=0}function ye(t){t=t|0,d[t>>0]&1&&l0(e[t+8>>2]|0)}function g5(t,r){return t=t|0,r=r|0,p5(t,r,_r(r)|0)|0}function p5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=1,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+4|0:s=e[t+8>>2]|0,Rp(s,r,n)|0,e[s+(n<<2)>>2]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,v5(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function A5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>1073741807&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=1,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<2?a=1:a=(r+4&-4)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=1){if(r=(a<<2)+4|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,Qi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+4|0,l=0;break}}else r=t+4|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,Nt(r,o,n+1|0)|0,l&&l0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function S5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=1,l=(n&255)>>>1),(l|0)==(o|0)?(B2(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+4|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),e[n+(l<<2)>>2]=r,e[n+(s<<2)>>2]=0}function v5(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0;(1073741806-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+4|0,r>>>0<536870887?(m=n+r|0,A=r<<1,m=m>>>0>>0?A:m,m=m>>>0<2?2:m+4&-4):m=1073741807,A=G0(m<<2)|0,o&&Nt(A,p,o)|0,a&&Nt(A+(o<<2)|0,c,a)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(A+(a+o<<2)|0,p+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&l0(p),e[t+8>>2]=A,e[t>>2]=m|1,r=n+a|0,e[t+4>>2]=r,e[A+(r<<2)>>2]=0}function B2(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0;(1073741807-r|0)>>>0>>0&&tt(t),d[t>>0]&1?A=e[t+8>>2]|0:A=t+4|0,r>>>0<536870887?(c=n+r|0,m=r<<1,c=c>>>0>>0?m:c,c=c>>>0<2?2:c+4&-4):c=1073741807,m=G0(c<<2)|0,o&&Nt(m,A,o)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(m+(a+o<<2)|0,A+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&l0(A),e[t+8>>2]=m,e[t>>2]=c|1}function w5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(o=r,s=n-o|0,s>>>0>4294967279&&tt(t),s>>>0<11?(d[t>>0]=s<<1,l=t+1|0):(a=s+16&-16,l=G0(a)|0,e[t+8>>2]=l,e[t>>2]=a|1,e[t+4>>2]=s),t=n-o|0,(r|0)!=(n|0))for(s=l;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;d[l+t>>0]=0}function x5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(l=r,s=n-l|0,o=s>>2,o>>>0>1073741807&&tt(t),o>>>0<2?(d[t>>0]=s>>>1,t=t+4|0):(a=o+4&-4,s=G0(a<<2)|0,e[t+8>>2]=s,e[t>>2]=a|1,e[t+4>>2]=o,t=s),o=(n-l|0)>>>2,(r|0)!=(n|0))for(s=t;e[s>>2]=e[r>>2],r=r+4|0,(r|0)!=(n|0);)s=s+4|0;e[t+(o<<2)>>2]=0}function C5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=y,y=y+16|0,s=n,o=(e[t+24>>2]|0)==0,e[t+16>>2]=o&1|r,!((o&1|r)&e[t+20>>2])){y=n;return}r=de(16)|0,p3()|0,e[s>>2]=1,e[s+4>>2]=43112,f=0,d0(11,r|0,57437,s|0),o=f,f=0,o&1?(o=b()|0,ge(r|0),r0(o|0)):Ne(r|0,864,112)}function Bi(t){t=t|0;var r=0;if(e[t>>2]=43068,f=0,h0(88,t|0,0),r=f,f=0,r&1)r=b(0)|0,De(r);else{Mi(t+28|0),Ze(e[t+32>>2]|0),Ze(e[t+36>>2]|0),Ze(e[t+48>>2]|0),Ze(e[t+60>>2]|0);return}}function H0(t){t=t|0,Bi(t)}function sA(t){t=t|0,Bi(t),l0(t)}function T5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=e[t+40>>2]|0,s=t+32|0,o=t+36|0,n)do n=n+-1|0,Pr[e[(e[s>>2]|0)+(n<<2)>>2]&15](r,t,e[(e[o>>2]|0)+(n<<2)>>2]|0);while(n|0)}function li(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,$t(r,t+28|0),y=n,e[r>>2]|0}function y5(t,r){t=t|0,r=r|0;var n=0;e[t+24>>2]=r,e[t+16>>2]=(r|0)==0&1,e[t+20>>2]=0,e[t+4>>2]=4098,e[t+12>>2]=0,e[t+8>>2]=6,n=t+28|0,r=t+32|0,t=r+40|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0));s1(n)}function hr(t){t=t|0,Bi(t)}function oA(t){t=t|0,Bi(t),l0(t)}function ce(t){t=t|0,e[t>>2]=42760,Mi(t+4|0)}function D5(t){t=t|0,e[t>>2]=42760,Mi(t+4|0),l0(t)}function m1(t){t=t|0,e[t>>2]=42760,s1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function I5(t,r){t=t|0,r=r|0}function k5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function E5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function F5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function M5(t){return t=t|0,0}function _5(t){return t=t|0,0}function R5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0<(e[a>>2]|0)>>>0)e[l>>2]=s+1,s=d[s>>0]|0;else{if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e;s=s&255}if(d[o>>0]=s,r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function P5(t){return t=t|0,-1}function L5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+1,t=N[t>>0]|0),t|0}function U5(t,r){return t=t|0,r=r|0,-1}function O5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[o>>0]|0)|0)==-1)break e}else c=d[o>>0]|0,e[l>>2]=s+1,d[s>>0]=c;if(r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function N5(t,r){return t=t|0,r=r|0,-1}function ir(t){t=t|0,e[t>>2]=42824,Mi(t+4|0)}function V5(t){t=t|0,e[t>>2]=42824,Mi(t+4|0),l0(t)}function q2(t){t=t|0,e[t>>2]=42824,s1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function B5(t,r){t=t|0,r=r|0}function q5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function b5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function G5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function z5(t){return t=t|0,0}function Q5(t){return t=t|0,0}function H5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e}else e[l>>2]=s+4,s=e[s>>2]|0;if(e[o>>2]=s,r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function Y5(t){return t=t|0,-1}function j5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+4,t=e[t>>2]|0),t|0}function X5(t,r){return t=t|0,r=r|0,-1}function K5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[o>>2]|0)|0)==-1)break e}else c=e[o>>2]|0,e[l>>2]=s+4,e[s>>2]=c;if(r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function W5(t,r){return t=t|0,r=r|0,-1}function Z5(t){t=t|0,Bi(t+8|0)}function J5(t){t=t|0,Bi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function G2(t){t=t|0,Bi(t+8|0),l0(t)}function $5(t){t=t|0,G2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function z2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(65,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,yt(n);break i}while(!1);yt(n);break e}while(!1);if(Qi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,De(o)):r0(r|0)}while(!1);return y=s,t|0}function e3(t){t=t|0;var r=0;if(r=t+16|0,e[r>>2]=e[r>>2]|1,e[t+20>>2]&1)O1();else return}function i3(t){t=t|0,Bi(t+8|0)}function t3(t){t=t|0,Bi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function Q2(t){t=t|0,Bi(t+8|0),l0(t)}function r3(t){t=t|0,Q2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function H2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(89,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,X2(n);break i}while(!1);X2(n);break e}while(!1);if(Qi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,De(o)):r0(r|0)}while(!1);return y=s,t|0}function lA(t,r){t=t|0,r=r|0}function n3(t){t=t|0,Bi(t+4|0)}function s3(t){t=t|0,Bi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function Y2(t){t=t|0,Bi(t+4|0),l0(t)}function o3(t){t=t|0,Y2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function l3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&z2(n)|0,d[t>>0]=1)}function yt(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,Qi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,De(n))}while(!1)}function a3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;D=y,y=y+32|0,c=D+20|0,m=D+16|0,p=D+8|0,n=D,f=0,h0(65,p|0,t|0),A=f,f=0;e:do if(A&1)n=b(0)|0,s=t,o=t,T=19;else{do if(d[p>>0]|0){if(A=li(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=A,f=0,A=y0(37,n|0,43392)|0,a=f,f=0,a&1)T=b(0)|0,Mi(n),n=T;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=li(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,E=f,f=0,!(E&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,E=f,f=0,!(E&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,T=10;break}n=b(0)|0,Mi(c)}else T=10;while(!1);if((T|0)==10){if(E=e[(e[A>>2]|0)+16>>2]|0,e[m>>2]=a,f=0,e[c>>2]=e[m>>2],n=$(E|0,A|0,c|0,s|0,n&255|0,r|0)|0,E=f,f=0,!(E&1)&&(n||(E=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+E|0,e[t+(E+16)>>2]|5|0),E=f,f=0,!(E&1))))break;n=b(0)|0}}yt(p),s=t,o=t,T=19;break e}while(!1);yt(p)}while(!1);do if((T|0)==19){if(Qi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),E=f,f=0,!(E&1)){Wi();break}n=b()|0,f=0,we(3),E=f,f=0,E&1?(E=b(0)|0,De(E)):r0(n|0)}while(!1);return y=D,t|0}function f3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;D=y,y=y+32|0,c=D+20|0,m=D+16|0,p=D+8|0,n=D,f=0,h0(65,p|0,t|0),A=f,f=0;e:do if(A&1)n=b(0)|0,s=t,o=t,T=19;else{do if(d[p>>0]|0){if(A=li(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=A,f=0,A=y0(37,n|0,43392)|0,a=f,f=0,a&1)T=b(0)|0,Mi(n),n=T;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=li(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,E=f,f=0,!(E&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,E=f,f=0,!(E&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,T=10;break}n=b(0)|0,Mi(c)}else T=10;while(!1);if((T|0)==10){if(E=e[(e[A>>2]|0)+24>>2]|0,e[m>>2]=a,f=0,e[c>>2]=e[m>>2],n=$(E|0,A|0,c|0,s|0,n&255|0,r|0)|0,E=f,f=0,!(E&1)&&(n||(E=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+E|0,e[t+(E+16)>>2]|5|0),E=f,f=0,!(E&1))))break;n=b(0)|0}}yt(p),s=t,o=t,T=19;break e}while(!1);yt(p)}while(!1);do if((T|0)==19){if(Qi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),E=f,f=0,!(E&1)){Wi();break}n=b()|0,f=0,we(3),E=f,f=0,E&1?(E=b(0)|0,De(E)):r0(n|0)}while(!1);return y=D,t|0}function u3(t){t=t|0,Bi(t+4|0)}function c3(t){t=t|0,Bi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function j2(t){t=t|0,Bi(t+4|0),l0(t)}function h3(t){t=t|0,j2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function m3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&H2(n)|0,d[t>>0]=1)}function X2(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,Qi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,De(n))}while(!1)}function d3(t){return t=t|0,57453}function g3(t,r,n){t=t|0,r=r|0,n=n|0,(n|0)!=1&(n|0)<257?i5(t,r,n):xt(t,57462,35)}function p3(){return!(d[1048]|0)&&Ae(1048)|0&&(e[10778]=43084,xe(72,43112,z|0)|0,ve(1048)),43112}function A3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;s=y,y=y+16|0,o=s+8|0,l=s,c=n,a=e[c+4>>2]|0,n=l,e[n>>2]=e[c>>2],e[n+4>>2]=a,e[o>>2]=e[l>>2],e[o+4>>2]=e[l+4>>2],r5(t,o,r),e[t>>2]=43048,y=s}function S3(t){t=t|0,l1(t)}function v3(t){t=t|0,l1(t),l0(t)}function w3(t){t=t|0,Bi(t),l0(t)}function x3(t){t=t|0,l0(t)}function C3(t){t=t|0}function T3(t){t=t|0}function y3(t){t=t|0,l0(t)}function D3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=d[r>>0]|0,l=d[s>>0]|0,t<<24>>24>24){r=-1;break e}if(l<<24>>24>24){r=1;break e}if(r=r+1|0,s=s+1|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function I3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,w5(t,n,s)}function k3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(d[r>>0]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+1|0;while((r|0)!=(n|0))}return t|0}function E3(t){t=t|0}function F3(t){t=t|0,l0(t)}function M3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=e[r>>2]|0,l=e[s>>2]|0,(t|0)<(l|0)){r=-1;break e}if((l|0)<(t|0)){r=1;break e}if(r=r+4|0,s=s+4|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function _3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,x5(t,n,s)}function R3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(e[r>>2]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+4|0;while((r|0)!=(n|0))}return t|0}function P3(t){t=t|0}function L3(t){t=t|0,l0(t)}function U3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;U=y,y=y+64|0,D=U+56|0,a=U+52|0,p=U+48|0,c=U+44|0,m=U+40|0,A=U+36|0,T=U+32|0,V=U+8|0,E=U;e:do if(e[s+4>>2]&1){a=li(s)|0,e[A>>2]=a,f=0,t=y0(37,A|0,44220)|0,p=f,f=0;do if(p&1)V=b()|0,Ie(a)|0,a=V;else{if(Ie(a)|0,a=li(s)|0,e[T>>2]=a,f=0,m=y0(37,T|0,44360)|0,T=f,f=0,T&1){V=b()|0,Ie(a)|0,a=V;break}if(Ie(a)|0,f=0,h0(e[(e[m>>2]|0)+24>>2]|0,V|0,m|0),T=f,f=0,T&1)c=V;else if(c=V+12|0,f=0,h0(e[(e[m>>2]|0)+28>>2]|0,c|0,m|0),T=f,f=0,!(T&1))if(e[E>>2]=e[n>>2],f=0,e[D>>2]=e[E>>2],a=ue(7,r|0,D|0,V|0,V+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,a0(V+12|0),a0(V);break}else{d[l>>0]=(a|0)==(V|0)&1,a=e[r>>2]|0,a0(V+12|0),a0(V);break e}if(a=b()|0,m=D0,(V|0)!=(c|0))do c=c+-12|0,a0(c);while((c|0)!=(V|0))}while(!1);r0(a|0)}else switch(e[p>>2]=-1,V=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[m>>2]=e[n>>2],e[a>>2]=e[c>>2],e[D>>2]=e[m>>2],a=rr[V&63](t,a,D,s,o,p)|0,e[r>>2]=a,e[p>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function O3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Cm(t,m,c,s,o,l)|0,y=a,t|0}function N3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Tm(t,m,c,s,o,l)|0,y=a,t|0}function V3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=ym(t,m,c,s,o,l)|0,y=a,t|0}function B3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Dm(t,m,c,s,o,l)|0,y=a,t|0}function q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Im(t,m,c,s,o,l)|0,y=a,t|0}function b3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=km(t,m,c,s,o,l)|0,y=a,t|0}function G3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Em(t,m,c,s,o,l)|0,y=a,t|0}function z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Fm(t,m,c,s,o,l)|0,y=a,t|0}function Q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Mm(t,m,c,s,o,l)|0,y=a,t|0}function H3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0;t0=y,y=y+240|0,R=t0,E=t0+208|0,s0=t0+32|0,t=t0+28|0,J=t0+16|0,O=t0+12|0,V=t0+48|0,q=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,D=f,f=0;do if(D&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44220)|0,D=f,f=0,!(D&1)&&(f=0,E0(e[(e[t>>2]|0)+32>>2]|0,t|0,57498,57524,E|0)|0,D=f,f=0,!(D&1))){Ie(s)|0,e[J>>2]=0,e[J+4>>2]=0,e[J+8>>2]=0,d[J>>0]&1?t=(e[J>>2]&-2)+-1|0:t=10,f=0,d0(8,J|0,t|0,0),D=f,f=0;e:do if(D&1)w0=30;else{T=J+8|0,D=J+1|0,s=d[J>>0]&1?e[T>>2]|0:D,e[O>>2]=s,e[q>>2]=V,e[U>>2]=0,p=J+4|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){w0=29;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,m=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){w0=29;break i}if((m|0)!=-1){if(c)break;break i}else{e[n>>2]=0,w0=19;break}}else w0=19;while(!1);if((w0|0)==19)if(w0=0,c){a=0;break}else a=0;if(c=d[J>>0]|0,c=c&1?e[p>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(s+c|0)){if(f=0,d0(8,J|0,c<<1|0,0),A=f,f=0,A&1){w0=29;break}if(d[J>>0]&1?s=(e[J>>2]&-2)+-1|0:s=10,f=0,d0(8,J|0,s|0,0),A=f,f=0,A&1){w0=29;break}s=d[J>>0]&1?e[T>>2]|0:D,e[O>>2]=s+c}if(m=t+12|0,c=e[m>>2]|0,A=t+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,S0=f,f=0,S0&1){w0=29;break}}else c=N[c>>0]|0;if(Rt(c&255,16,s,O,U,0,s0,V,q,E)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,S0=f,f=0,S0&1){w0=29;break}else continue;else{e[m>>2]=a+1;continue}}if((w0|0)==29){t=b()|0;break}if(f=0,d0(8,J|0,(e[O>>2]|0)-s|0,0),S0=f,f=0,!(S0&1)&&(F=d[J>>0]|0,M=e[T>>2]|0,f=0,X=p0(3)|0,S0=f,f=0,!(S0&1))&&(f=0,e[R>>2]=l,K=E0(16,(F&1?M:D)|0,X|0,58882,R|0)|0,S0=f,f=0,!(S0&1))){if((K|0)!=1&&(e[o>>2]=4),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,S0=f,f=0,S0&1){w0=30;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,S0=f,f=0,S0&1){w0=30;break e}if((t|0)==-1){e[n>>2]=0,w0=55;break}}s||(w0=56)}else w0=55;while(!1);return(w0|0)==55&&s&&(w0=56),(w0|0)==56&&(e[o>>2]=e[o>>2]|2),S0=e[r>>2]|0,a0(J),a0(s0),y=t0,S0|0}else w0=30}while(!1);(w0|0)==30&&(t=b()|0),a0(J);break}t=b()|0,Ie(s)|0}while(!1);return a0(s0),r0(t|0),0}function Rt(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0;D=e[s>>2]|0,E=(D|0)==(n|0);do if(E){if(p=(d[A+24>>0]|0)==t<<24>>24,!p&&(d[A+25>>0]|0)!=t<<24>>24){T=5;break}e[s>>2]=n+1,d[n>>0]=p?43:45,e[o>>2]=0,p=0}else T=5;while(!1);e:do if((T|0)==5){if(T=d[a>>0]|0,t<<24>>24==l<<24>>24&&(T&1?e[a+4>>2]|0:(T&255)>>>1)|0){if(p=e[m>>2]|0,(p-c|0)>=160){p=0;break}r=e[o>>2]|0,e[m>>2]=p+4,e[p>>2]=r,e[o>>2]=0,p=0;break}for(a=A+26|0,p=A;(d[p>>0]|0)!=t<<24>>24;)if(p=p+1|0,(p|0)==(a|0)){p=a;break}if(p=p-A|0,(p|0)>23)p=-1;else{switch(r|0){case 10:case 8:{if((p|0)>=(r|0)){p=-1;break e}break}case 16:{if((p|0)>=22){if(E){p=-1;break e}if((D-n|0)>=3){p=-1;break e}if((d[D+-1>>0]|0)!=48){p=-1;break e}e[o>>2]=0,p=d[57498+p>>0]|0,e[s>>2]=D+1,d[D>>0]=p,p=0;break e}break}default:}p=d[57498+p>>0]|0,e[s>>2]=D+1,d[D>>0]=p,e[o>>2]=(e[o>>2]|0)+1,p=0}}while(!1);return p|0}function Di(){var t=0,r=0;do if(!(d[1968]|0)&&Ae(1968)|0)if(f=0,t=L0(31,2147483647,58885,0)|0,r=f,f=0,r&1)r=b()|0,bi(1968),r0(r|0);else{e[11196]=t,ve(1968);break}while(!1);return e[11196]|0}function Y3(t){t=t|0}function j3(t){t=t|0,l0(t)}function X3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;U=y,y=y+64|0,D=U+56|0,a=U+52|0,p=U+48|0,c=U+44|0,m=U+40|0,A=U+36|0,T=U+32|0,V=U+8|0,E=U;e:do if(e[s+4>>2]&1){a=li(s)|0,e[A>>2]=a,f=0,t=y0(37,A|0,44212)|0,p=f,f=0;do if(p&1)V=b()|0,Ie(a)|0,a=V;else{if(Ie(a)|0,a=li(s)|0,e[T>>2]=a,f=0,m=y0(37,T|0,44368)|0,T=f,f=0,T&1){V=b()|0,Ie(a)|0,a=V;break}if(Ie(a)|0,f=0,h0(e[(e[m>>2]|0)+24>>2]|0,V|0,m|0),T=f,f=0,T&1)c=V;else if(c=V+12|0,f=0,h0(e[(e[m>>2]|0)+28>>2]|0,c|0,m|0),T=f,f=0,!(T&1))if(e[E>>2]=e[n>>2],f=0,e[D>>2]=e[E>>2],a=ue(8,r|0,D|0,V|0,V+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,ye(V+12|0),ye(V);break}else{d[l>>0]=(a|0)==(V|0)&1,a=e[r>>2]|0,ye(V+12|0),ye(V);break e}if(a=b()|0,m=D0,(V|0)!=(c|0))do c=c+-12|0,ye(c);while((c|0)!=(V|0))}while(!1);r0(a|0)}else switch(e[p>>2]=-1,V=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[m>>2]=e[n>>2],e[a>>2]=e[c>>2],e[D>>2]=e[m>>2],a=rr[V&63](t,a,D,s,o,p)|0,e[r>>2]=a,e[p>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function K3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Rm(t,m,c,s,o,l)|0,y=a,t|0}function W3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Pm(t,m,c,s,o,l)|0,y=a,t|0}function Z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Lm(t,m,c,s,o,l)|0,y=a,t|0}function J3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Um(t,m,c,s,o,l)|0,y=a,t|0}function $3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Om(t,m,c,s,o,l)|0,y=a,t|0}function e6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Nm(t,m,c,s,o,l)|0,y=a,t|0}function i6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Vm(t,m,c,s,o,l)|0,y=a,t|0}function t6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=Bm(t,m,c,s,o,l)|0,y=a,t|0}function r6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0;return a=y,y=y+16|0,c=a+12|0,m=a+8|0,p=a+4|0,A=a,e[p>>2]=e[r>>2],e[A>>2]=e[n>>2],e[m>>2]=e[p>>2],e[c>>2]=e[A>>2],t=qm(t,m,c,s,o,l)|0,y=a,t|0}function n6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0;t0=y,y=y+320|0,R=t0,E=t0+208|0,s0=t0+32|0,t=t0+28|0,J=t0+16|0,O=t0+12|0,V=t0+48|0,q=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,D=f,f=0;do if(D&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44212)|0,D=f,f=0,!(D&1)&&(f=0,E0(e[(e[t>>2]|0)+48>>2]|0,t|0,57498,57524,E|0)|0,D=f,f=0,!(D&1))){Ie(s)|0,e[J>>2]=0,e[J+4>>2]=0,e[J+8>>2]=0,d[J>>0]&1?t=(e[J>>2]&-2)+-1|0:t=10,f=0,d0(8,J|0,t|0,0),D=f,f=0;e:do if(D&1)w0=31;else{T=J+8|0,D=J+1|0,t=d[J>>0]&1?e[T>>2]|0:D,e[O>>2]=t,e[q>>2]=V,e[U>>2]=0,p=J+4|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){w0=30;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;m=e[n>>2]|0;do if(m){if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)){if(f=0,a=u0(e[(e[m>>2]|0)+36>>2]|0,m|0)|0,A=f,f=0,A&1){w0=30;break i}}else a=e[a>>2]|0;if((a|0)!=-1)if(c){a=m;break}else{a=m;break i}else{e[n>>2]=0,w0=20;break}}else w0=20;while(!1);if((w0|0)==20)if(w0=0,c){a=0;break}else a=0;if(c=d[J>>0]|0,c=c&1?e[p>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(t+c|0)){if(f=0,d0(8,J|0,c<<1|0,0),A=f,f=0,A&1){w0=30;break}if(d[J>>0]&1?t=(e[J>>2]&-2)+-1|0:t=10,f=0,d0(8,J|0,t|0,0),A=f,f=0,A&1){w0=30;break}t=d[J>>0]&1?e[T>>2]|0:D,e[O>>2]=t+c}if(m=s+12|0,c=e[m>>2]|0,A=s+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,S0=f,f=0,S0&1){w0=30;break}}else c=e[c>>2]|0;if(Pt(c,16,t,O,U,0,s0,V,q,E)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,S0=f,f=0,S0&1){w0=30;break}else{a=s;continue}else{e[m>>2]=a+4,a=s;continue}}if((w0|0)==30){t=b()|0;break}if(f=0,d0(8,J|0,(e[O>>2]|0)-t|0,0),S0=f,f=0,!(S0&1)&&(F=d[J>>0]|0,M=e[T>>2]|0,f=0,X=p0(3)|0,S0=f,f=0,!(S0&1))&&(f=0,e[R>>2]=l,K=E0(16,(F&1?M:D)|0,X|0,58882,R|0)|0,S0=f,f=0,!(S0&1))){if((K|0)!=1&&(e[o>>2]=4),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,S0=f,f=0,S0&1){w0=31;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,S0=f,f=0,S0&1){w0=31;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;w0=59;break}else{e[n>>2]=0,w0=57;break}}else w0=57;while(!1);return(w0|0)==57&&s&&(w0=59),(w0|0)==59&&(e[o>>2]=e[o>>2]|2),S0=e[r>>2]|0,a0(J),a0(s0),y=t0,S0|0}else w0=31}while(!1);(w0|0)==31&&(t=b()|0),a0(J);break}t=b()|0,Ie(s)|0}while(!1);return a0(s0),r0(t|0),0}function Pt(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0;var p=0,T=0,D=0,E=0;D=e[s>>2]|0,E=(D|0)==(n|0);do if(E){if(p=(e[A+96>>2]|0)==(t|0),!p&&(e[A+100>>2]|0)!=(t|0)){T=5;break}e[s>>2]=n+1,d[n>>0]=p?43:45,e[o>>2]=0,p=0}else T=5;while(!1);e:do if((T|0)==5){if(T=d[a>>0]|0,(t|0)==(l|0)&&(T&1?e[a+4>>2]|0:(T&255)>>>1)|0){if(p=e[m>>2]|0,(p-c|0)>=160){p=0;break}r=e[o>>2]|0,e[m>>2]=p+4,e[p>>2]=r,e[o>>2]=0,p=0;break}for(a=A+104|0,p=A;(e[p>>2]|0)!=(t|0);)if(p=p+4|0,(p|0)==(a|0)){p=a;break}if(p=p-A|0,a=p>>2,(p|0)>92)p=-1;else{switch(r|0){case 10:case 8:{if((a|0)>=(r|0)){p=-1;break e}break}case 16:{if((p|0)>=88){if(E){p=-1;break e}if((D-n|0)>=3){p=-1;break e}if((d[D+-1>>0]|0)!=48){p=-1;break e}e[o>>2]=0,p=d[57498+a>>0]|0,e[s>>2]=D+1,d[D>>0]=p,p=0;break e}break}default:}p=d[57498+a>>0]|0,e[s>>2]=D+1,d[D>>0]=p,e[o>>2]=(e[o>>2]|0)+1,p=0}}while(!1);return p|0}function Gt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;if(m=y,y=y+16|0,c=m,r=li(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44220)|0,A=f,f=0,!(A&1)&&(f=0,E0(e[(e[o>>2]|0)+32>>2]|0,o|0,57498,57524,n|0)|0,A=f,f=0,!(A&1))&&(f=0,a=y0(37,c|0,44360)|0,A=f,f=0,!(A&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,A=f,f=0,!(A&1))&&(d[s>>0]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),A=f,f=0,!(A&1))){Ie(r)|0,y=m;return}A=b()|0,Ie(r)|0,r0(A|0)}function d1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(p=y,y=y+16|0,A=p,r=li(r)|0,e[A>>2]=r,f=0,l=y0(37,A|0,44220)|0,T=f,f=0,!(T&1)&&(f=0,E0(e[(e[l>>2]|0)+32>>2]|0,l|0,57498,57530,n|0)|0,T=f,f=0,!(T&1))&&(f=0,m=y0(37,A|0,44360)|0,T=f,f=0,!(T&1))&&(f=0,a=u0(e[(e[m>>2]|0)+12>>2]|0,m|0)|0,T=f,f=0,!(T&1))&&(d[s>>0]=a,f=0,c=u0(e[(e[m>>2]|0)+16>>2]|0,m|0)|0,T=f,f=0,!(T&1))&&(d[o>>0]=c,f=0,h0(e[(e[m>>2]|0)+20>>2]|0,t|0,m|0),T=f,f=0,!(T&1))){Ie(r)|0,y=p;return}T=b()|0,Ie(r)|0,r0(T|0)}function g1(t,r,n,s,o,l,a,c,m,A,p,T){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0;var D=0,E=0;e:do if(t<<24>>24==l<<24>>24)d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(D=e[A>>2]|0,(D-m|0)<160)&&(m=e[p>>2]|0,e[A>>2]=D+4,e[D>>2]=m),D=0):D=-1;else{if(t<<24>>24==a<<24>>24&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){D=-1;break}if(D=e[A>>2]|0,(D-m|0)>=160){D=0;break}m=e[p>>2]|0,e[A>>2]=D+4,e[D>>2]=m,e[p>>2]=0,D=0;break}for(l=T+32|0,D=T;(d[D>>0]|0)!=t<<24>>24;)if(D=D+1|0,(D|0)==(l|0)){D=l;break}if(l=D-T|0,(l|0)>31)D=-1;else switch(a=d[57498+l>>0]|0,l|0){case 24:case 25:{if(D=e[o>>2]|0,(D|0)!=(s|0)&&(N[D+-1>>0]&95|0)!=(N[n>>0]&127|0)){D=-1;break e}e[o>>2]=D+1,d[D>>0]=a,D=0;break e}case 23:case 22:{d[n>>0]=80,D=e[o>>2]|0,e[o>>2]=D+1,d[D>>0]=a,D=0;break e}default:{if(D=a&95,(D|0)==(d[n>>0]|0)&&(d[n>>0]=D|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(E=e[A>>2]|0,(E-m|0)<160)&&(m=e[p>>2]|0,e[A>>2]=E+4,e[E>>2]=m),A=e[o>>2]|0,e[o>>2]=A+1,d[A>>0]=a,(l|0)>21){D=0;break e}e[p>>2]=(e[p>>2]|0)+1,D=0;break e}}}while(!1);return D|0}function zt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;if(m=y,y=y+16|0,c=m,r=li(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44212)|0,A=f,f=0,!(A&1)&&(f=0,E0(e[(e[o>>2]|0)+48>>2]|0,o|0,57498,57524,n|0)|0,A=f,f=0,!(A&1))&&(f=0,a=y0(37,c|0,44368)|0,A=f,f=0,!(A&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,A=f,f=0,!(A&1))&&(e[s>>2]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),A=f,f=0,!(A&1))){Ie(r)|0,y=m;return}A=b()|0,Ie(r)|0,r0(A|0)}function p1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;if(p=y,y=y+16|0,A=p,r=li(r)|0,e[A>>2]=r,f=0,l=y0(37,A|0,44212)|0,T=f,f=0,!(T&1)&&(f=0,E0(e[(e[l>>2]|0)+48>>2]|0,l|0,57498,57530,n|0)|0,T=f,f=0,!(T&1))&&(f=0,m=y0(37,A|0,44368)|0,T=f,f=0,!(T&1))&&(f=0,a=u0(e[(e[m>>2]|0)+12>>2]|0,m|0)|0,T=f,f=0,!(T&1))&&(e[s>>2]=a,f=0,c=u0(e[(e[m>>2]|0)+16>>2]|0,m|0)|0,T=f,f=0,!(T&1))&&(e[o>>2]=c,f=0,h0(e[(e[m>>2]|0)+20>>2]|0,t|0,m|0),T=f,f=0,!(T&1))){Ie(r)|0,y=p;return}T=b()|0,Ie(r)|0,r0(T|0)}function A1(t,r,n,s,o,l,a,c,m,A,p,T){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0;var D=0,E=0;e:do if((t|0)==(l|0))d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(D=e[A>>2]|0,(D-m|0)<160)&&(m=e[p>>2]|0,e[A>>2]=D+4,e[D>>2]=m),D=0):D=-1;else{if((t|0)==(a|0)&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){D=-1;break}if(D=e[A>>2]|0,(D-m|0)>=160){D=0;break}m=e[p>>2]|0,e[A>>2]=D+4,e[D>>2]=m,e[p>>2]=0,D=0;break}for(l=T+128|0,D=T;(e[D>>2]|0)!=(t|0);)if(D=D+4|0,(D|0)==(l|0)){D=l;break}if(l=D-T|0,D=l>>2,(l|0)<=124){switch(a=d[57498+D>>0]|0,D|0){case 24:case 25:{if(D=e[o>>2]|0,(D|0)!=(s|0)&&(N[D+-1>>0]&95|0)!=(N[n>>0]&127|0)){D=-1;break e}e[o>>2]=D+1,d[D>>0]=a,D=0;break e}case 23:case 22:{d[n>>0]=80;break}default:D=a&95,(D|0)==(d[n>>0]|0)&&(d[n>>0]=D|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(E=e[A>>2]|0,(E-m|0)<160)&&(m=e[p>>2]|0,e[A>>2]=E+4,e[E>>2]=m)}A=e[o>>2]|0,e[o>>2]=A+1,d[A>>0]=a,(l|0)>84||(e[p>>2]=(e[p>>2]|0)+1),D=0}else D=-1}while(!1);return D|0}function s6(t){t=t|0}function o6(t){t=t|0,l0(t)}function l6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0;p=y,y=y+32|0,l=p+20|0,a=p+16|0,c=p+12|0,A=p;e:do if(!(e[n+4>>2]&1))A=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[A&31](t,l,n,s,o&1)|0;else{l=li(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44360)|0,m=f,f=0;i:do if(m&1)p=b()|0,Ie(l)|0,l=p;else{Ie(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](A,a):Ke[e[l+28>>2]&127](A,a),t=d[A>>0]|0,m=(t&1)==0,l=A+1|0,o=A+8|0,c=m?l:A+1|0,l=m?l:e[A+8>>2]|0,m=A+4|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[m>>2]|0)|0)){r:for(;;){a=d[l>>0]|0,s=e[r>>2]|0;do if(s){if(n=s+24|0,t=e[n>>2]|0,(t|0)!=(e[s+28>>2]|0)){e[n>>2]=t+1,d[t>>0]=a;break}if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a&255|0)|0,t=f,f=0,t&1)break r;(a|0)==-1&&(e[r>>2]=0)}while(!1);if(l=l+1|0,t=d[A>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[m>>2]|0)|0))break t}l=b()|0,a0(A);break i}while(!1);l=e[r>>2]|0,a0(A);break e}while(!1);r0(l|0)}while(!1);return y=p,l|0}function a6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+64|0,l=p,D=p+56|0,E=p+44|0,c=p+20|0,A=p+16|0,m=p+12|0,T=p+8|0,a=p+4|0,d[D>>0]=d[58887]|0,d[D+1>>0]=d[58888]|0,d[D+2>>0]=d[58889]|0,d[D+3>>0]=d[58890]|0,d[D+4>>0]=d[58891]|0,d[D+5>>0]=d[58892]|0,Dt(D+1|0,58893,1,e[n+4>>2]|0),t=Di()|0,e[l>>2]=o,o=E+(qi(E,12,t,D,l)|0)|0,D=it(E,o,n)|0,t=li(n)|0,e[T>>2]=t,f=0,ie(1,E|0,D|0,o|0,c|0,A|0,m|0,T|0),o=f,f=0,o&1)E=b()|0,Ie(t)|0,r0(E|0);else return Ie(t)|0,e[a>>2]=e[r>>2],D=e[A>>2]|0,E=e[m>>2]|0,e[l>>2]=e[a>>2],E=Bt(l,c,D,E,n,s)|0,y=p,E|0;return 0}function Dt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(s&2048&&(d[t>>0]=43,t=t+1|0),s&512&&(d[t>>0]=35,t=t+1|0),o=d[r>>0]|0,o<<24>>24)for(l=r;;)if(l=l+1|0,r=t+1|0,d[t>>0]=o,o=d[l>>0]|0,o<<24>>24)t=r;else{t=r;break}e:do switch(s&74|0){case 64:{d[t>>0]=111;break}case 8:if(s&16384){d[t>>0]=88;break e}else{d[t>>0]=120;break e}default:if(n){d[t>>0]=100;break e}else{d[t>>0]=117;break e}}while(!1)}function it(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do switch(e[n+4>>2]&176|0){case 16:{switch(n=d[t>>0]|0,n<<24>>24){case 43:case 45:{t=t+1|0;break e}default:}if((r-t|0)>1&n<<24>>24==48){switch(d[t+1>>0]|0){case 88:case 120:break;default:{s=7;break e}}t=t+2|0}else s=7;break}case 32:{t=r;break}default:s=7}while(!1);return t|0}function f6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;O=y,y=y+16|0,R=O,V=Pi(a,44220)|0,A=Pi(a,44360)|0,Ke[e[(e[A>>2]|0)+20>>2]&127](R,A),E=d[R>>0]|0,U=R+4|0;e:do if(!((E&1?e[U>>2]|0:(E&255)>>>1)|0))f=0,E0(e[(e[V>>2]|0)+32>>2]|0,V|0,t|0,n|0,s|0)|0,q=f,f=0,q&1?q=5:(a=s+(n-t)|0,e[l>>2]=a,q=29);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[V>>2]|0)+28>>2]|0,V|0,a|0)|0,E=f,f=0,E&1){q=5;break e}m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=a,m=t+1|0;break}default:m=t}i:do if((n-m|0)>1&&(d[m>>0]|0)==48){switch(a=m+1|0,d[a>>0]|0){case 88:case 120:break;default:break i}if(f=0,c=y0(e[(e[V>>2]|0)+28>>2]|0,V|0,48)|0,E=f,f=0,E&1){q=5;break e}if(E=e[l>>2]|0,e[l>>2]=E+1,d[E>>0]=c,f=0,a=y0(e[(e[V>>2]|0)+28>>2]|0,V|0,d[a>>0]|0)|0,E=f,f=0,E&1){q=5;break e}E=e[l>>2]|0,e[l>>2]=E+1,d[E>>0]=a,m=m+2|0}while(!1);if((m|0)!=(n|0)&&(p=n+-1|0,m>>>0

>>0)){c=m,a=p;do E=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=E,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,p=u0(e[(e[A>>2]|0)+16>>2]|0,A|0)|0,E=f,f=0,E&1)q=5;else{T=R+8|0,D=R+1|0;i:do if(m>>>0>>0){for(a=0,c=0,E=m;A=d[(d[R>>0]&1?e[T>>2]|0:D)+c>>0]|0,A<<24>>24!=0&(a|0)==(A<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+1,d[a>>0]=p,a=d[R>>0]|0,A=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):A=a,f=0,a=y0(e[(e[V>>2]|0)+28>>2]|0,V|0,d[E>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+1,d[F>>0]=a,E=E+1|0,E>>>0>=n>>>0)break i;a=A+1|0}a=b()|0;break e}while(!1);if(c=t,a=s+(m-c)|0,t=e[l>>2]|0,(a|0)==(t|0))t=c,q=29;else{if(t=t+-1|0,a>>>0>>0)do F=d[a>>0]|0,d[a>>0]=d[t>>0]|0,d[t>>0]=F,a=a+1|0,t=t+-1|0;while(a>>>0>>0);t=c,a=e[l>>2]|0,q=29}}}while(!1);if((q|0)==5)a=b()|0;else if((q|0)==29){e[o>>2]=(r|0)==(n|0)?a:s+(r-t)|0,a0(R),y=O;return}a0(R),r0(a|0)}function u6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(T=y,y=y+96|0,a=T+8|0,t=T,E=T+74|0,m=T+32|0,p=T+28|0,A=T+24|0,D=T+20|0,c=T+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,Dt(t+1|0,58895,1,e[n+4>>2]|0),U=Di()|0,V=a,e[V>>2]=o,e[V+4>>2]=l,l=E+(qi(E,22,U,t,a)|0)|0,o=it(E,l,n)|0,t=li(n)|0,e[D>>2]=t,f=0,ie(1,E|0,o|0,l|0,m|0,p|0,A|0,D|0),l=f,f=0,l&1)V=b()|0,Ie(t)|0,r0(V|0);else return Ie(t)|0,e[c>>2]=e[r>>2],U=e[p>>2]|0,V=e[A>>2]|0,e[a>>2]=e[c>>2],V=Bt(a,m,U,V,n,s)|0,y=T,V|0;return 0}function c6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+64|0,l=p,D=p+56|0,E=p+44|0,c=p+20|0,A=p+16|0,m=p+12|0,T=p+8|0,a=p+4|0,d[D>>0]=d[58887]|0,d[D+1>>0]=d[58888]|0,d[D+2>>0]=d[58889]|0,d[D+3>>0]=d[58890]|0,d[D+4>>0]=d[58891]|0,d[D+5>>0]=d[58892]|0,Dt(D+1|0,58893,0,e[n+4>>2]|0),t=Di()|0,e[l>>2]=o,o=E+(qi(E,12,t,D,l)|0)|0,D=it(E,o,n)|0,t=li(n)|0,e[T>>2]=t,f=0,ie(1,E|0,D|0,o|0,c|0,A|0,m|0,T|0),o=f,f=0,o&1)E=b()|0,Ie(t)|0,r0(E|0);else return Ie(t)|0,e[a>>2]=e[r>>2],D=e[A>>2]|0,E=e[m>>2]|0,e[l>>2]=e[a>>2],E=Bt(l,c,D,E,n,s)|0,y=p,E|0;return 0}function h6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(T=y,y=y+112|0,a=T+8|0,t=T,E=T+75|0,m=T+32|0,p=T+28|0,A=T+24|0,D=T+20|0,c=T+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,Dt(t+1|0,58895,0,e[n+4>>2]|0),U=Di()|0,V=a,e[V>>2]=o,e[V+4>>2]=l,l=E+(qi(E,23,U,t,a)|0)|0,o=it(E,l,n)|0,t=li(n)|0,e[D>>2]=t,f=0,ie(1,E|0,o|0,l|0,m|0,p|0,A|0,D|0),l=f,f=0,l&1)V=b()|0,Ie(t)|0,r0(V|0);else return Ie(t)|0,e[c>>2]=e[r>>2],U=e[p>>2]|0,V=e[A>>2]|0,e[a>>2]=e[c>>2],V=Bt(a,m,U,V,n,s)|0,y=T,V|0;return 0}function m6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,q=X+84|0,D=X+48|0,T=X+32|0,m=X+24|0,l=X+8|0,p=X,U=X+88|0,V=X+80|0,c=X+118|0,M=X+76|0,F=X+72|0,O=X+68|0,R=X+64|0,A=p,e[A>>2]=37,e[A+4>>2]=0,A=mr(p+1|0,58898,e[n+4>>2]|0)|0,e[V>>2]=U,t=Di()|0,A?(e[l>>2]=e[n+8>>2],j[l+8>>3]=o,l=qi(U,30,t,p,l)|0):(j[m>>3]=o,l=qi(U,30,t,p,m)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,A?!l&&(f=0,e[T>>2]=e[n+8>>2],j[T+8>>3]=o,a=E0(17,V|0,t|0,p|0,T|0)|0,E=f,f=0,!(E&1))&&(K=12):!l&&(f=0,e[D>>2]=e[n+8>>2],j[D+8>>3]=o,E=E0(17,V|0,t|0,p|0,D|0)|0,D=f,f=0,!(D&1))&&(a=E,K=12);do if((K|0)==12){if(t=e[V>>2]|0,t)l=t;else{if(f=0,we(6),E=f,f=0,E&1)break;l=e[V>>2]|0}t=l,p=l,K=16;break e}while(!1);t=b()|0}else t=e[V>>2]|0,p=0,a=l,K=16;while(!1);if((K|0)==16){m=t+a|0,A=it(t,m,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=Ti(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[V>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,V=f,f=0,V&1)K=20;else{if(e[O>>2]=a,f=0,ie(2,t|0,A|0,m|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ie(a)|0;break}if(Ie(a)|0,e[R>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[q>>2]=e[R>>2],t=Ee(39,q|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),p&&Ze(p),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),p&&Ze(p)}return r0(t|0),0}function mr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;if(n&2048&&(d[t>>0]=43,t=t+1|0),n&1024&&(d[t>>0]=35,t=t+1|0),a=n&260,o=n>>>14,c=(a|0)==260,c?l=0:(d[t>>0]=46,d[t+1>>0]=42,t=t+2|0,l=1),n=d[r>>0]|0,n<<24>>24)for(s=t;r=r+1|0,t=s+1|0,d[s>>0]=n,n=d[r>>0]|0,n<<24>>24;)s=t;e:do switch(a|0){case 4:if(o&1){d[t>>0]=70;break e}else{d[t>>0]=102;break e}case 256:if(o&1){d[t>>0]=69;break e}else{d[t>>0]=101;break e}default:if(n=(o&1|0)!=0,c)if(n){d[t>>0]=65;break e}else{d[t>>0]=97;break e}else if(n){d[t>>0]=71;break e}else{d[t>>0]=103;break e}}while(!1);return l|0}function d6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0;switch(X=y,y=y+16|0,K=X,M=Pi(a,44220)|0,R=Pi(a,44360)|0,Ke[e[(e[R>>2]|0)+20>>2]&127](K,R),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,a|0)|0,F=f,f=0,F&1?O=8:(p=e[l>>2]|0,e[l>>2]=p+1,d[p>>0]=a,p=t+1|0,O=10);break}default:p=t,O=10}e:do if((O|0)==10){F=n;i:do if((F-p|0)>1&&(d[p>>0]|0)==48){switch(m=p+1|0,d[m>>0]|0){case 88:case 120:break;default:{O=11;break i}}if(f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,48)|0,q=f,f=0,q&1){O=8;break e}if(q=e[l>>2]|0,e[l>>2]=q+1,d[q>>0]=a,p=p+2|0,f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[m>>0]|0)|0,q=f,f=0,q&1){O=8;break e}if(q=e[l>>2]|0,e[l>>2]=q+1,d[q>>0]=a,p>>>0>>0){for(a=p;m=d[a>>0]|0,f=0,A=p0(3)|0,q=f,f=0,!(q&1||(f=0,m=y0(39,m<<24>>24|0,A|0)|0,q=f,f=0,q&1));){if(!m){q=p;break i}if(a=a+1|0,a>>>0>=n>>>0){q=p;break i}}a=b()|0;break e}else q=p,a=p}else O=11;while(!1);i:do if((O|0)==11)if(p>>>0>>0){for(a=p;m=d[a>>0]|0,f=0,A=p0(3)|0,q=f,f=0,!(q&1||(f=0,m=y0(40,m<<24>>24|0,A|0)|0,q=f,f=0,q&1));){if(!m){q=p;break i}if(a=a+1|0,a>>>0>=n>>>0){q=p;break i}}a=b()|0;break e}else q=p,a=p;while(!1);if(U=d[K>>0]|0,V=K+4|0,(U&1?e[V>>2]|0:(U&255)>>>1)|0){if((q|0)!=(a|0)&&(T=a+-1|0,q>>>0>>0)){A=q,m=T;do U=d[A>>0]|0,d[A>>0]=d[m>>0]|0,d[m>>0]=U,A=A+1|0,m=m+-1|0;while(A>>>0>>0)}if(f=0,T=u0(e[(e[R>>2]|0)+16>>2]|0,R|0)|0,U=f,f=0,U&1){O=8;break}D=K+8|0,E=K+1|0;i:do if(q>>>0>>0){for(m=0,A=0,U=q;p=d[(d[K>>0]&1?e[D>>2]|0:E)+A>>0]|0,p<<24>>24>0&(m|0)==(p<<24>>24|0)?(m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=T,m=d[K>>0]|0,p=0,A=(A>>>0<((m&1?e[V>>2]|0:(m&255)>>>1)+-1|0)>>>0&1)+A|0):p=m,f=0,m=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[U>>0]|0)|0,t0=f,f=0,!(t0&1);){if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=m,U=U+1|0,U>>>0>=a>>>0)break i;m=p+1|0}a=b()|0;break e}while(!1);if(m=s+(q-t)|0,A=e[l>>2]|0,(m|0)!=(A|0)&&(c=A+-1|0,m>>>0>>0)){do t0=d[m>>0]|0,d[m>>0]=d[c>>0]|0,d[c>>0]=t0,m=m+1|0,c=c+-1|0;while(m>>>0>>0);m=M}else m=M}else{if(f=0,E0(e[(e[M>>2]|0)+32>>2]|0,M|0,q|0,a|0,e[l>>2]|0)|0,t0=f,f=0,t0&1){O=8;break}e[l>>2]=(e[l>>2]|0)+(a-q),m=M}i:do if(a>>>0>>0){for(;c=d[a>>0]|0,c<<24>>24!=46;){if(f=0,c=y0(e[(e[m>>2]|0)+28>>2]|0,M|0,c|0)|0,t0=f,f=0,t0&1){O=4;break}if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0,a>>>0>=n>>>0)break i}if((O|0)==4){a=b()|0;break e}if(f=0,c=u0(e[(e[R>>2]|0)+12>>2]|0,R|0)|0,t0=f,f=0,t0&1){O=8;break e}t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0}while(!1);if(f=0,E0(e[(e[M>>2]|0)+32>>2]|0,M|0,a|0,n|0,e[l>>2]|0)|0,t0=f,f=0,t0&1)O=8;else{t0=(e[l>>2]|0)+(F-a)|0,e[l>>2]=t0,e[o>>2]=(r|0)==(n|0)?t0:s+(r-t)|0,a0(K),y=X;return}}while(!1);(O|0)==8&&(a=b()|0),a0(K),r0(a|0)}function g6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,q=X+76|0,D=X+48|0,T=X+32|0,m=X+24|0,l=X+8|0,p=X,U=X+80|0,V=X+72|0,c=X+110|0,M=X+68|0,F=X+64|0,O=X+60|0,R=X+56|0,A=p,e[A>>2]=37,e[A+4>>2]=0,A=mr(p+1|0,58899,e[n+4>>2]|0)|0,e[V>>2]=U,t=Di()|0,A?(e[l>>2]=e[n+8>>2],j[l+8>>3]=o,l=qi(U,30,t,p,l)|0):(j[m>>3]=o,l=qi(U,30,t,p,m)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,A?!l&&(f=0,e[T>>2]=e[n+8>>2],j[T+8>>3]=o,a=E0(17,V|0,t|0,p|0,T|0)|0,E=f,f=0,!(E&1))&&(K=12):!l&&(f=0,j[D>>3]=o,E=E0(17,V|0,t|0,p|0,D|0)|0,D=f,f=0,!(D&1))&&(a=E,K=12);do if((K|0)==12){if(t=e[V>>2]|0,t)l=t;else{if(f=0,we(6),E=f,f=0,E&1)break;l=e[V>>2]|0}t=l,p=l,K=16;break e}while(!1);t=b()|0}else t=e[V>>2]|0,p=0,a=l,K=16;while(!1);if((K|0)==16){m=t+a|0,A=it(t,m,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=Ti(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[V>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,V=f,f=0,V&1)K=20;else{if(e[O>>2]=a,f=0,ie(2,t|0,A|0,m|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ie(a)|0;break}if(Ie(a)|0,e[R>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[q>>2]=e[R>>2],t=Ee(39,q|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),p&&Ze(p),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),p&&Ze(p)}return r0(t|0),0}function p6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(D=y,y=y+80|0,m=D,t=D+70|0,p=D+12|0,T=D+32|0,c=D+8|0,A=D+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Di()|0,e[m>>2]=o,t=qi(p,20,l,t,m)|0,o=p+t|0,l=it(p,o,n)|0,a=li(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44220)|0,E=f,f=0,E&1)E=b()|0,Ie(a)|0,r0(E|0);else return Ie(a)|0,M1[e[(e[c>>2]|0)+32>>2]&31](c,p,o,T)|0,E=T+t|0,e[A>>2]=e[r>>2],e[m>>2]=e[A>>2],E=Bt(m,T,(l|0)==(o|0)?E:T+(l-p)|0,E,n,s)|0,y=D,E|0;return 0}function A6(t){t=t|0}function S6(t){t=t|0,l0(t)}function v6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0;A=y,y=y+32|0,l=A+20|0,a=A+16|0,c=A+12|0,m=A;e:do if(!(e[n+4>>2]&1))m=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[m&31](t,l,n,s,o&1)|0;else{l=li(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44368)|0,c=f,f=0;i:do if(c&1)A=b()|0,Ie(l)|0,l=A;else{Ie(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](m,a):Ke[e[l+28>>2]&127](m,a),t=d[m>>0]|0,n=(t&1)==0,l=m+4|0,o=m+8|0,c=n?l:m+4|0,l=n?l:e[m+8>>2]|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0)){for(;;){if(a=e[l>>2]|0,s=e[r>>2]|0,s){if(n=s+24|0,t=e[n>>2]|0,(t|0)==(e[s+28>>2]|0)){if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a|0)|0,t=f,f=0,t&1)break}else e[n>>2]=t+4,e[t>>2]=a;(a|0)==-1&&(e[r>>2]=0)}if(l=l+4|0,t=d[m>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0))break t}l=b()|0,ye(m);break i}while(!1);l=e[r>>2]|0,ye(m);break e}while(!1);r0(l|0)}while(!1);return y=A,l|0}function w6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if(p=y,y=y+128|0,l=p,D=p+116|0,E=p+104|0,c=p+20|0,A=p+16|0,m=p+12|0,T=p+8|0,a=p+4|0,d[D>>0]=d[58887]|0,d[D+1>>0]=d[58888]|0,d[D+2>>0]=d[58889]|0,d[D+3>>0]=d[58890]|0,d[D+4>>0]=d[58891]|0,d[D+5>>0]=d[58892]|0,Dt(D+1|0,58893,1,e[n+4>>2]|0),t=Di()|0,e[l>>2]=o,o=E+(qi(E,12,t,D,l)|0)|0,D=it(E,o,n)|0,t=li(n)|0,e[T>>2]=t,f=0,ie(3,E|0,D|0,o|0,c|0,A|0,m|0,T|0),o=f,f=0,o&1)E=b()|0,Ie(t)|0,r0(E|0);else return Ie(t)|0,e[a>>2]=e[r>>2],D=e[A>>2]|0,E=e[m>>2]|0,e[l>>2]=e[a>>2],E=Qt(l,c,D,E,n,s)|0,y=p,E|0;return 0}function x6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;O=y,y=y+16|0,R=O,V=Pi(a,44212)|0,A=Pi(a,44368)|0,Ke[e[(e[A>>2]|0)+20>>2]&127](R,A),E=d[R>>0]|0,U=R+4|0;e:do if(!((E&1?e[U>>2]|0:(E&255)>>>1)|0))f=0,E0(e[(e[V>>2]|0)+48>>2]|0,V|0,t|0,n|0,s|0)|0,q=f,f=0,q&1?q=5:(a=s+(n-t<<2)|0,e[l>>2]=a,q=28);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[V>>2]|0)+44>>2]|0,V|0,a|0)|0,E=f,f=0,E&1){q=5;break e}m=e[l>>2]|0,e[l>>2]=m+4,e[m>>2]=a,m=t+1|0;break}default:m=t}i:do if((n-m|0)>1&&(d[m>>0]|0)==48){switch(a=m+1|0,d[a>>0]|0){case 88:case 120:break;default:{E=m;break i}}if(f=0,c=y0(e[(e[V>>2]|0)+44>>2]|0,V|0,48)|0,E=f,f=0,E&1){q=5;break e}if(E=e[l>>2]|0,e[l>>2]=E+4,e[E>>2]=c,f=0,a=y0(e[(e[V>>2]|0)+44>>2]|0,V|0,d[a>>0]|0)|0,E=f,f=0,E&1){q=5;break e}E=e[l>>2]|0,e[l>>2]=E+4,e[E>>2]=a,E=m+2|0}else E=m;while(!1);if((E|0)!=(n|0)&&(p=n+-1|0,E>>>0

>>0)){c=E,a=p;do D=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=D,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,A=u0(e[(e[A>>2]|0)+16>>2]|0,A|0)|0,D=f,f=0,D&1)q=5;else{p=R+8|0,T=R+1|0;i:do if(E>>>0>>0){for(a=0,c=0,D=E;m=d[(d[R>>0]&1?e[p>>2]|0:T)+c>>0]|0,m<<24>>24!=0&(a|0)==(m<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+4,e[a>>2]=A,a=d[R>>0]|0,m=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):m=a,f=0,a=y0(e[(e[V>>2]|0)+44>>2]|0,V|0,d[D>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+4,e[F>>2]=a,D=D+1|0,D>>>0>=n>>>0)break i;a=m+1|0}a=b()|0;break e}while(!1);if(m=t,a=s+(E-m<<2)|0,c=e[l>>2]|0,(a|0)!=(c|0))if(t=c+-4|0,a>>>0>>0){do F=e[a>>2]|0,e[a>>2]=e[t>>2],e[t>>2]=F,a=a+4|0,t=t+-4|0;while(a>>>0>>0);t=m,a=c,q=28}else t=m,a=c,q=28;else t=m,q=28}}while(!1);if((q|0)==5)a=b()|0;else if((q|0)==28){e[o>>2]=(r|0)==(n|0)?a:s+(r-t<<2)|0,a0(R),y=O;return}a0(R),r0(a|0)}function C6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(T=y,y=y+224|0,a=T+8|0,t=T,E=T+196|0,m=T+32|0,p=T+28|0,A=T+24|0,D=T+20|0,c=T+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,Dt(t+1|0,58895,1,e[n+4>>2]|0),U=Di()|0,V=a,e[V>>2]=o,e[V+4>>2]=l,l=E+(qi(E,22,U,t,a)|0)|0,o=it(E,l,n)|0,t=li(n)|0,e[D>>2]=t,f=0,ie(3,E|0,o|0,l|0,m|0,p|0,A|0,D|0),l=f,f=0,l&1)V=b()|0,Ie(t)|0,r0(V|0);else return Ie(t)|0,e[c>>2]=e[r>>2],U=e[p>>2]|0,V=e[A>>2]|0,e[a>>2]=e[c>>2],V=Qt(a,m,U,V,n,s)|0,y=T,V|0;return 0}function T6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0;q=y,y=y+16|0,U=q,D=q+8|0;e:do if((n|0)==(s|0))m=s;else for(m=n;;){if(!(e[m>>2]|0))break e;if(m=m+4|0,(m|0)==(s|0)){m=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,p=a,E=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,A=m;i:for(;;){if(R=r,l=e[R+4>>2]|0,m=U,e[m>>2]=e[R>>2],e[m+4>>2]=l,m=nt(e[E>>2]|0)|0,f=0,l=$(21,t|0,o|0,A-n>>2|0,p-t|0,r|0)|0,R=f,f=0,R&1){O=9;break}if(m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)){O=8;break}switch(l|0){case 0:{T=1;break e}case-1:{m=t,O=14;break i}default:}if(m=(e[c>>2]|0)+l|0,e[c>>2]=m,(m|0)==(a|0)){O=27;break}if((A|0)==(s|0))n=e[o>>2]|0,t=m,m=s;else{if(m=nt(e[E>>2]|0)|0,f=0,n=L0(34,D|0,0,r|0)|0,R=f,f=0,R&1){O=35;break}if(m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)){O=34;break}if((n|0)==-1){T=2;break e}if(n>>>0>(p-(e[c>>2]|0)|0)>>>0){T=1;break e}if(n)for(m=D;A=d[m>>0]|0,R=e[c>>2]|0,e[c>>2]=R+1,d[R>>0]=A,n=n+-1|0,n;)m=m+1|0;n=(e[o>>2]|0)+4|0,e[o>>2]=n;t:do if((n|0)==(s|0))m=s;else for(m=n;;){if(!(e[m>>2]|0))break t;if(m=m+4|0,(m|0)==(s|0)){m=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else A=m}if((O|0)==8)R=b(0)|0,De(R);else if((O|0)==9)n=b()|0,m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0);else if((O|0)==14){e[c>>2]=m;i:do if((n|0)!=(e[o>>2]|0)){for(;;){if(R=e[n>>2]|0,t=nt(e[E>>2]|0)|0,f=0,m=L0(34,m|0,R|0,U|0)|0,R=f,f=0,R&1){V=t;break}if(t|0&&(f=0,u0(75,t|0)|0,R=f,f=0,R&1)){O=18;break}if((m|0)==-1||(m=(e[c>>2]|0)+m|0,e[c>>2]=m,n=n+4|0,(n|0)==(e[o>>2]|0)))break i}(O|0)==18&&(R=b(0)|0,De(R)),n=b()|0,V|0&&(f=0,u0(75,V|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0)}while(!1);e[o>>2]=n,T=2;break}else if((O|0)==27){n=e[o>>2]|0,O=47;break}else(O|0)==34?(R=b(0)|0,De(R)):(O|0)==35&&(n=b()|0,m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0))}while(!1);return(O|0)==47&&(T=(n|0)!=(s|0)&1),y=q,T|0}function y6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0;q=y,y=y+16|0,V=q;e:do if((n|0)==(s|0))m=s;else for(m=n;;){if(!(d[m>>0]|0))break e;if(m=m+1|0,(m|0)==(s|0)){m=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,T=a,E=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,p=m;i:for(;;){if(A=r,m=e[A+4>>2]|0,l=V,e[l>>2]=e[A>>2],e[l+4>>2]=m,l=p,m=nt(e[E>>2]|0)|0,f=0,A=$(22,t|0,o|0,l-n|0,T-t>>2|0,r|0)|0,R=f,f=0,R&1){O=9;break}if(m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)){O=8;break}switch(A|0){case 0:{D=2;break e}case-1:{m=t,O=14;break i}default:}if(t=(e[c>>2]|0)+(A<<2)|0,e[c>>2]=t,(t|0)==(a|0)){O=31;break}if(n=e[o>>2]|0,(p|0)==(s|0))m=s;else{if(m=nt(e[E>>2]|0)|0,f=0,n=E0(20,t|0,n|0,1,r|0)|0,R=f,f=0,R&1){O=38;break}if(m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)){O=37;break}if(n){D=2;break e}e[c>>2]=(e[c>>2]|0)+4,n=(e[o>>2]|0)+1|0,e[o>>2]=n;t:do if((n|0)==(s|0))m=s;else for(m=n;;){if(!(d[m>>0]|0))break t;if(m=m+1|0,(m|0)==(s|0)){m=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else p=m}if((O|0)==8)R=b(0)|0,De(R);else if((O|0)==9)n=b()|0,m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0);else if((O|0)==14){e[c>>2]=m;i:do if((n|0)!=(e[o>>2]|0)){t=m;t:for(;;){if(m=nt(e[E>>2]|0)|0,f=0,t=E0(20,t|0,n|0,l-n|0,V|0)|0,R=f,f=0,R&1){O=19;break}if(m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)){O=18;break}switch(t|0){case-1:{O=25;break t}case-2:{O=26;break t}case 0:{n=n+1|0;break}default:n=n+t|0}if(t=(e[c>>2]|0)+4|0,e[c>>2]=t,(n|0)==(e[o>>2]|0)){U=n;break i}}if((O|0)==18)R=b(0)|0,De(R);else if((O|0)==19)n=b()|0,m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0);else if((O|0)==25){e[o>>2]=n,D=2;break e}else if((O|0)==26){e[o>>2]=n,D=1;break e}}else U=n;while(!1);e[o>>2]=U,D=(U|0)!=(s|0)&1;break}else if((O|0)==31){n=e[o>>2]|0,O=47;break}else(O|0)==37?(R=b(0)|0,De(R)):(O|0)==38&&(n=b()|0,m|0&&(f=0,u0(75,m|0)|0,R=f,f=0,R&1)&&(R=b(0)|0,De(R)),r0(n|0))}while(!1);return(O|0)==47&&(D=(n|0)!=(s|0)&1),y=q,D|0}function D6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;switch(a=y,y=y+16|0,l=a,e[o>>2]=n,n=nt(e[t+8>>2]|0)|0,f=0,t=L0(34,l|0,0,r|0)|0,r=f,f=0,r&1&&(l=b()|0,n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,De(a)),r0(l|0)),n|0&&(f=0,u0(75,n|0)|0,r=f,f=0,r&1)&&(r=b(0)|0,De(r)),t|0){case 0:case-1:{l=2;break}default:if(t=t+-1|0,t>>>0<=(s-(e[o>>2]|0)|0)>>>0)if(!t)l=0;else for(;;)if(r=d[l>>0]|0,s=e[o>>2]|0,e[o>>2]=s+1,d[s>>0]=r,t=t+-1|0,t)l=l+1|0;else{l=0;break}else l=1}return y=a,l|0}function I6(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;r=t+8|0,f=0,n=u0(75,e[r>>2]|0)|0,s=f,f=0;do if(s&1)o=16;else{if(f=0,s=L0(35,0,0,4)|0,t=f,f=0,t&1){if(t=b(0)|0,!n||(f=0,u0(75,n|0)|0,a=f,f=0,!(a&1)))break;a=b(0)|0,De(a)}if(n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,De(a)),s)l=-1;else if(t=e[r>>2]|0,t){if(f=0,t=u0(75,t|0)|0,a=f,f=0,a&1){o=16;break}t|0&&(f=0,u0(75,t|0)|0,a=f,f=0,a&1)?(a=b(0)|0,De(a)):l=0}else l=1;return l|0}while(!1);return(o|0)==16&&(t=b(0)|0),De(t),0}function k6(t){return t=t|0,0}function E6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;A=s,m=t+8|0;e:do if((n|0)==(s|0)|(o|0)==0)t=0;else{for(t=0,c=0;;){if(a=nt(e[m>>2]|0)|0,f=0,l=L0(36,n|0,A-n|0,r|0)|0,D=f,f=0,D&1){T=a;break}if(a|0&&(f=0,u0(75,a|0)|0,D=f,f=0,D&1)){p=5;break}switch(l|0){case-2:case-1:break e;case 0:{n=n+1|0,l=1;break}default:n=n+l|0}if(t=l+t|0,c=c+1|0,(n|0)==(s|0)|c>>>0>=o>>>0)break e}(p|0)==5&&(D=b(0)|0,De(D)),t=b()|0,T|0&&(f=0,u0(75,T|0)|0,D=f,f=0,D&1)&&(D=b(0)|0,De(D)),r0(t|0)}while(!1);return t|0}function F6(t){t=t|0;var r=0,n=0;return t=e[t+8>>2]|0,t?(f=0,t=u0(75,t|0)|0,n=f,f=0,n&1&&(n=b(0)|0,De(n)),t|0&&(f=0,u0(75,t|0)|0,n=f,f=0,n&1)?(n=b(0)|0,De(n)):r=4):r=1,r|0}function M6(t){t=t|0,l0(t)}function _6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0;return t=y,y=y+16|0,m=t+4|0,r=t,e[m>>2]=n,e[r>>2]=l,a=kd(n,s,m,l,a,r,1114111,0)|0,e[o>>2]=e[m>>2],e[c>>2]=e[r>>2],y=t,a|0}function R6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0;return t=y,y=y+16|0,m=t+4|0,r=t,e[m>>2]=n,e[r>>2]=l,a=Ed(n,s,m,l,a,r,1114111,0)|0,e[o>>2]=e[m>>2],e[c>>2]=e[r>>2],y=t,a|0}function P6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function L6(t){return t=t|0,0}function U6(t){return t=t|0,0}function O6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Fd(n,s,o,1114111,0)|0}function N6(t){return t=t|0,4}function V6(t){t=t|0,l0(t)}function B6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0;return t=y,y=y+16|0,m=t+4|0,r=t,e[m>>2]=n,e[r>>2]=l,a=Md(n,s,m,l,a,r,1114111,0)|0,e[o>>2]=e[m>>2],e[c>>2]=e[r>>2],y=t,a|0}function q6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0;return t=y,y=y+16|0,m=t+4|0,r=t,e[m>>2]=n,e[r>>2]=l,a=_d(n,s,m,l,a,r,1114111,0)|0,e[o>>2]=e[m>>2],e[c>>2]=e[r>>2],y=t,a|0}function b6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function G6(t){return t=t|0,0}function z6(t){return t=t|0,0}function Q6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Rd(n,s,o,1114111,0)|0}function H6(t){return t=t|0,4}function Y6(t){t=t|0,l0(t)}function j6(t){t=t|0,l0(t)}function X6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44384,d[t+8>>0]=46,d[t+9>>0]=44,t=t+12|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function K6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44424,e[t+8>>2]=46,e[t+12>>2]=44,t=t+16|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function K2(t){t=t|0,e[t>>2]=44384,a0(t+12|0)}function W6(t){t=t|0,K2(t),l0(t)}function W2(t){t=t|0,e[t>>2]=44424,a0(t+16|0)}function Z6(t){t=t|0,W2(t),l0(t)}function J6(t){return t=t|0,d[t+8>>0]|0}function $6(t){return t=t|0,e[t+8>>2]|0}function em(t){return t=t|0,d[t+9>>0]|0}function im(t){return t=t|0,e[t+12>>2]|0}function tm(t,r){t=t|0,r=r|0,a1(t,r+12|0)}function rm(t,r){t=t|0,r=r|0,a1(t,r+16|0)}function nm(t,r){t=t|0,r=r|0,xt(t,59024,4)}function sm(t,r){t=t|0,r=r|0,c1(t,44996,_r(44996)|0)}function om(t,r){t=t|0,r=r|0,xt(t,59029,5)}function lm(t,r){t=t|0,r=r|0,c1(t,45016,_r(45016)|0)}function st(t){switch(t=t|0,e[t+4>>2]&74|0){case 64:{t=8;break}case 8:{t=16;break}case 0:{t=0;break}default:t=10}return t|0}function am(t){t=t|0;do if(!(d[2464]|0)&&Ae(2464)|0){if(!(d[2472]|0)&&Ae(2472)|0){t=45040;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45208);xe(193,0,z|0)|0,ve(2472)}if(f=0,y0(41,45040,59035)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,45052,59042)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45064,59049)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45076,59057)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45088,59067)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45100,59076)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45112,59083)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45124,59092)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45136,59096)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45148,59100)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45160,59104)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45172,59108)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45184,59112)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45196,59116)|0,t=f,f=0,!(t&1))){e[11302]=45040,ve(2464);break}t=b()|0,bi(2464),r0(t|0)}while(!1);return e[11302]|0}function fm(t){t=t|0;do if(!(d[2480]|0)&&Ae(2480)|0){if(!(d[2488]|0)&&Ae(2488)|0){t=45212;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45380);xe(194,0,z|0)|0,ve(2488)}if(f=0,y0(42,45212,45380)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,45224,45408)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45236,45436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45248,45468)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45260,45508)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45272,45544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45284,45572)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45296,45608)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45308,45624)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45320,45640)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45332,45656)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45344,45672)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45356,45688)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45368,45704)|0,t=f,f=0,!(t&1))){e[11430]=45212,ve(2480);break}t=b()|0,bi(2480),r0(t|0)}while(!1);return e[11430]|0}function um(t){t=t|0;e:do if(!(d[2496]|0)&&Ae(2496)|0){if(!(d[2504]|0)&&Ae(2504)|0){t=45724;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46012);xe(195,0,z|0)|0,ve(2504)}f=0,y0(41,45724,59120)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(41,45736,59128)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45748,59137)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45760,59143)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45772,59149)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45784,59153)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45796,59158)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45808,59163)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45820,59170)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45832,59180)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45844,59188)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45856,59197)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45868,59206)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45880,59210)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45892,59214)|0,t=f,f=0,!(t&1))){if(f=0,y0(41,45904,59218)|0,t=f,f=0,t&1||(f=0,y0(41,45916,59149)|0,t=f,f=0,t&1)||(f=0,y0(41,45928,59222)|0,t=f,f=0,t&1)||(f=0,y0(41,45940,59226)|0,t=f,f=0,t&1)||(f=0,y0(41,45952,59230)|0,t=f,f=0,t&1)||(f=0,y0(41,45964,59234)|0,t=f,f=0,t&1)||(f=0,y0(41,45976,59238)|0,t=f,f=0,t&1)||(f=0,y0(41,45988,59242)|0,t=f,f=0,t&1)||(f=0,y0(41,46e3,59246)|0,t=f,f=0,t&1))break;e[11503]=45724,ve(2496);break e}while(!1);t=b()|0,bi(2496),r0(t|0)}while(!1);return e[11503]|0}function cm(t){t=t|0;e:do if(!(d[2512]|0)&&Ae(2512)|0){if(!(d[2520]|0)&&Ae(2520)|0){t=46016;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46304);xe(196,0,z|0)|0,ve(2520)}f=0,y0(42,46016,46304)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(42,46028,46336)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46040,46372)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46052,46396)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46064,46420)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46076,46436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46088,46456)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46100,46476)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46112,46504)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46124,46544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46136,46576)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46148,46612)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46160,46648)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46172,46664)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46184,46680)|0,t=f,f=0,!(t&1))){if(f=0,y0(42,46196,46696)|0,t=f,f=0,t&1||(f=0,y0(42,46208,46420)|0,t=f,f=0,t&1)||(f=0,y0(42,46220,46712)|0,t=f,f=0,t&1)||(f=0,y0(42,46232,46728)|0,t=f,f=0,t&1)||(f=0,y0(42,46244,46744)|0,t=f,f=0,t&1)||(f=0,y0(42,46256,46760)|0,t=f,f=0,t&1)||(f=0,y0(42,46268,46776)|0,t=f,f=0,t&1)||(f=0,y0(42,46280,46792)|0,t=f,f=0,t&1)||(f=0,y0(42,46292,46808)|0,t=f,f=0,t&1))break;e[11706]=46016,ve(2512);break e}while(!1);t=b()|0,bi(2512),r0(t|0)}while(!1);return e[11706]|0}function hm(t){t=t|0;do if(!(d[2528]|0)&&Ae(2528)|0){if(!(d[2536]|0)&&Ae(2536)|0){t=46828;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47116);xe(197,0,z|0)|0,ve(2536)}if(f=0,y0(41,46828,59250)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,46840,59253)|0,t=f,f=0,!(t&1))){e[11779]=46828,ve(2528);break}t=b()|0,bi(2528),r0(t|0)}while(!1);return e[11779]|0}function mm(t){t=t|0;do if(!(d[2544]|0)&&Ae(2544)|0){if(!(d[2552]|0)&&Ae(2552)|0){t=47120;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47408);xe(198,0,z|0)|0,ve(2552)}if(f=0,y0(42,47120,47408)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,47132,47420)|0,t=f,f=0,!(t&1))){e[11858]=47120,ve(2544);break}t=b()|0,bi(2544),r0(t|0)}while(!1);return e[11858]|0}function dm(t){t=t|0;do if(!(d[2560]|0)&&Ae(2560)|0)if(f=0,d0(5,47436,59256,8),t=f,f=0,t&1)t=b()|0,bi(2560),r0(t|0);else{xe(199,47436,z|0)|0,ve(2560);break}while(!1);return 47436}function gm(t){t=t|0;var r=0;do if(!(d[2568]|0)&&Ae(2568)|0){if(f=0,t=u0(76,47448)|0,r=f,f=0,!(r&1)&&(f=0,d0(15,47484,47448,t|0),r=f,f=0,!(r&1))){xe(200,47484,z|0)|0,ve(2568);break}r=b()|0,bi(2568),r0(r|0)}while(!1);return 47484}function pm(t){t=t|0;do if(!(d[2576]|0)&&Ae(2576)|0)if(f=0,d0(5,47496,59265,8),t=f,f=0,t&1)t=b()|0,bi(2576),r0(t|0);else{xe(199,47496,z|0)|0,ve(2576);break}while(!1);return 47496}function Am(t){t=t|0;var r=0;do if(!(d[2584]|0)&&Ae(2584)|0){if(f=0,t=u0(76,47508)|0,r=f,f=0,!(r&1)&&(f=0,d0(15,47544,47508,t|0),r=f,f=0,!(r&1))){xe(200,47544,z|0)|0,ve(2584);break}r=b()|0,bi(2584),r0(r|0)}while(!1);return 47544}function Sm(t){t=t|0;do if(!(d[2592]|0)&&Ae(2592)|0)if(f=0,d0(5,47556,59274,20),t=f,f=0,t&1)t=b()|0,bi(2592),r0(t|0);else{xe(199,47556,z|0)|0,ve(2592);break}while(!1);return 47556}function vm(t){t=t|0;var r=0;do if(!(d[2600]|0)&&Ae(2600)|0){if(f=0,t=u0(76,47568)|0,r=f,f=0,!(r&1)&&(f=0,d0(15,47652,47568,t|0),r=f,f=0,!(r&1))){xe(200,47652,z|0)|0,ve(2600);break}r=b()|0,bi(2600),r0(r|0)}while(!1);return 47652}function wm(t){t=t|0;do if(!(d[2608]|0)&&Ae(2608)|0)if(f=0,d0(5,47664,59295,11),t=f,f=0,t&1)t=b()|0,bi(2608),r0(t|0);else{xe(199,47664,z|0)|0,ve(2608);break}while(!1);return 47664}function xm(t){t=t|0;var r=0;do if(!(d[2616]|0)&&Ae(2616)|0){if(f=0,t=u0(76,47676)|0,r=f,f=0,!(r&1)&&(f=0,d0(15,47724,47676,t|0),r=f,f=0,!(r&1))){xe(200,47724,z|0)|0,ve(2616);break}r=b()|0,bi(2616),r0(r|0)}while(!1);return 47724}function Z2(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=44304,t=t+8|0,r=e[t>>2]|0,f=0,n=p0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,De(s)}function dr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0;M=y,y=y+112|0,m=M,p=(s-n|0)/12|0;do if(p>>>0>100){if(m=Ti(p)|0,!(m|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,E=6;break}c=m,E=11}else c=0,E=11;while(!1);e:do if((E|0)==11){if((n|0)==(s|0))A=0;else for(E=n,T=0,D=m;A=d[E>>0]|0,A&1?A=e[E+4>>2]|0:A=(A&255)>>>1,A?(d[D>>0]=1,A=T):(d[D>>0]=2,A=T+1|0,p=p+-1|0),E=E+12|0,(E|0)!=(s|0);)T=A,D=D+1|0;R=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=A;i:for(;;){A=e[t>>2]|0;do if(A){if((e[A+12>>2]|0)==(e[A+16>>2]|0)){if(f=0,A=u0(e[(e[A>>2]|0)+36>>2]|0,A|0)|0,q=f,f=0,q&1){E=5;break i}if((A|0)==-1){e[t>>2]=0,A=0;break}else{A=e[t>>2]|0;break}}}else A=0;while(!1);if(E=(A|0)==0,T=e[r>>2]|0,T){if((e[T+12>>2]|0)==(e[T+16>>2]|0)){if(f=0,A=u0(e[(e[T>>2]|0)+36>>2]|0,T|0)|0,q=f,f=0,q&1){E=5;break}(A|0)==-1&&(e[r>>2]=0,T=0)}}else T=0;if(D=(T|0)==0,A=e[t>>2]|0,!((p|0)!=0&(E^D))){E=64;break}if(T=e[A+12>>2]|0,(T|0)==(e[A+16>>2]|0)){if(f=0,A=u0(e[(e[A>>2]|0)+36>>2]|0,A|0)|0,q=f,f=0,q&1){E=5;break}}else A=N[T>>0]|0;if(A=A&255,!a&&(f=0,A=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,A|0)|0,q=f,f=0,q&1)){E=5;break}if(q=O+1|0,R)A=0,E=U;else for(D=0,V=n,E=U,U=m;;){do if((d[U>>0]|0)==1){if(d[V>>0]&1?T=e[V+8>>2]|0:T=V+1|0,T=d[T+O>>0]|0,!a&&(f=0,T=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,T|0)|0,X=f,f=0,X&1)){E=4;break i}if(A<<24>>24!=T<<24>>24){d[U>>0]=0,T=D,p=p+-1|0;break}T=d[V>>0]|0,T&1?T=e[V+4>>2]|0:T=(T&255)>>>1,(T|0)==(q|0)?(d[U>>0]=2,T=1,E=E+1|0,p=p+-1|0):T=1}else T=D;while(!1);if(V=V+12|0,(V|0)==(s|0)){A=T;break}else D=T,U=U+1|0}if(!A){O=q,U=E;continue}if(A=e[t>>2]|0,T=A+12|0,D=e[T>>2]|0,(D|0)==(e[A+16>>2]|0)){if(f=0,u0(e[(e[A>>2]|0)+40>>2]|0,A|0)|0,X=f,f=0,X&1){E=5;break}}else e[T>>2]=D+1;if((E+p|0)>>>0<2|F){O=q,U=E;continue}else A=n,D=E,E=m;for(;;)if((d[E>>0]|0)==2&&(T=d[A>>0]|0,T&1?T=e[A+4>>2]|0:T=(T&255)>>>1,(T|0)!=(q|0)&&(d[E>>0]=0,D=D+-1|0)),A=A+12|0,(A|0)==(s|0)){O=q,U=D;continue i}else E=E+1|0}if((E|0)==4){n=b()|0;break}else if((E|0)==5){n=b()|0;break}else if((E|0)==64){do if(A){if((e[A+12>>2]|0)==(e[A+16>>2]|0)){if(f=0,A=u0(e[(e[A>>2]|0)+36>>2]|0,A|0)|0,X=f,f=0,X&1){E=6;break e}if((A|0)==-1){e[t>>2]=0,A=0;break}else{A=e[t>>2]|0;break}}}else A=0;while(!1);p=(A|0)==0;do if(D)E=76;else{if((e[T+12>>2]|0)==(e[T+16>>2]|0)){if(f=0,A=u0(e[(e[T>>2]|0)+36>>2]|0,T|0)|0,X=f,f=0,X&1){E=6;break e}if((A|0)==-1){e[r>>2]=0,E=76;break}}p||(E=77)}while(!1);(E|0)==76&&p&&(E=77),(E|0)==77&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))E=81;else for(;;){if((d[m>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){E=81;break}else m=m+1|0}while(!1);return(E|0)==81&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(E|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function Cm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,m=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(c)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[E>>2]|0:(c&255)>>>1,(e[q>>2]|0)==(s+c|0)){if(f=0,d0(8,K|0,c<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+c}if(m=t+12|0,c=e[m>>2]|0,A=t+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else c=N[c>>0]|0;if(Rt(c&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(21,s|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Tm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,m=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(a)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(s+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+a}if(m=t+12|0,a=e[m>>2]|0,A=t+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else a=N[a>>0]|0;if(Rt(a&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(22,s|0,e[q>>2]|0,o|0,V|0)|0,a=D0,s0=f,f=0,s0&1)J=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function ym(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,m=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(c)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[E>>2]|0:(c&255)>>>1,(e[q>>2]|0)==(s+c|0)){if(f=0,d0(8,K|0,c<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+c}if(m=t+12|0,c=e[m>>2]|0,A=t+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else c=N[c>>0]|0;if(Rt(c&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(23,s|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=25;else{if(k[l>>1]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Dm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,m=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(c)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[E>>2]|0:(c&255)>>>1,(e[q>>2]|0)==(s+c|0)){if(f=0,d0(8,K|0,c<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+c}if(m=t+12|0,c=e[m>>2]|0,A=t+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else c=N[c>>0]|0;if(Rt(c&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(24,s|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Im(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,m=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(c)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[E>>2]|0:(c&255)>>>1,(e[q>>2]|0)==(s+c|0)){if(f=0,d0(8,K|0,c<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+c}if(m=t+12|0,c=e[m>>2]|0,A=t+16|0,(c|0)==(e[A>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else c=N[c>>0]|0;if(Rt(c&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(25,s|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function km(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=25;else{T=K+8|0,D=K+1|0,s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A=f,f=0,A&1){J=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,m=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A=f,f=0,A&1){J=24;break i}if((m|0)!=-1){if(a)break;break i}else{e[n>>2]=0,J=16;break}}else J=16;while(!1);if((J|0)==16)if(J=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(s+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,d0(8,K|0,s|0,0),A=f,f=0,A&1){J=24;break}s=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=s+a}if(m=t+12|0,a=e[m>>2]|0,A=t+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}}else a=N[a>>0]|0;if(Rt(a&255,V,s,q,O,p,t0,F,M,U)|0)break;if(a=e[m>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=24;break}else continue;else{e[m>>2]=a+1;continue}}if((J|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,s=E0(26,s|0,e[q>>2]|0,o|0,V|0)|0,a=D0,s0=f,f=0,s0&1)J=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){J=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){J=25;break e}if((t|0)==-1){e[n>>2]=0,J=49;break}}s||(J=50)}else J=49;while(!1);return(J|0)==49&&s&&(J=50),(J|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==25&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Em(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+240|0,q=J+208|0,c=J+203|0,m=J+202|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+40|0,t0=J+4|0,F=J,M=J+201|0,O=J+200|0,d1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=25;else{E=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=d[c>>0]|0,T=d[m>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){S0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;m=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(m)break;break i}if(f=0,A=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=24;break i}if((A|0)!=-1){if(m)break;break i}else{e[n>>2]=0,S0=16;break}}else S0=16;while(!1);if((S0|0)==16)if(S0=0,m){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(s+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,d0(8,s0|0,s|0,0),p=f,f=0,p&1){S0=24;break}s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s+m}if(A=t+12|0,m=e[A>>2]|0,p=t+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}}else m=N[m>>0]|0;if(g1(m&255,M,O,s,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}else continue;else{e[A>>2]=c+1;continue}}if((S0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(1,s|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=25;else{if(i0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=25;break e}if((t|0)==-1){e[n>>2]=0,S0=49;break}}s||(S0=50)}else S0=49;while(!1);return(S0|0)==49&&s&&(S0=50),(S0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==25&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function Fm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+240|0,q=J+208|0,c=J+203|0,m=J+202|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+40|0,t0=J+4|0,F=J,M=J+201|0,O=J+200|0,d1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=25;else{E=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=d[c>>0]|0,T=d[m>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){S0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;m=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(m)break;break i}if(f=0,A=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=24;break i}if((A|0)!=-1){if(m)break;break i}else{e[n>>2]=0,S0=16;break}}else S0=16;while(!1);if((S0|0)==16)if(S0=0,m){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(s+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,d0(8,s0|0,s|0,0),p=f,f=0,p&1){S0=24;break}s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s+m}if(A=t+12|0,m=e[A>>2]|0,p=t+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}}else m=N[m>>0]|0;if(g1(m&255,M,O,s,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}else continue;else{e[A>>2]=c+1;continue}}if((S0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(2,s|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=25;else{if(j[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=25;break e}if((t|0)==-1){e[n>>2]=0,S0=49;break}}s||(S0=50)}else S0=49;while(!1);return(S0|0)==49&&s&&(S0=50),(S0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==25&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function Mm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+240|0,q=J+208|0,c=J+203|0,m=J+202|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+40|0,t0=J+4|0,F=J,M=J+201|0,O=J+200|0,d1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=25;else{E=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=d[c>>0]|0,T=d[m>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){S0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;m=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(m)break;break i}if(f=0,A=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=24;break i}if((A|0)!=-1){if(m)break;break i}else{e[n>>2]=0,S0=16;break}}else S0=16;while(!1);if((S0|0)==16)if(S0=0,m){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(s+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,d0(8,s0|0,s|0,0),p=f,f=0,p&1){S0=24;break}s=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=s+m}if(A=t+12|0,m=e[A>>2]|0,p=t+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}}else m=N[m>>0]|0;if(g1(m&255,M,O,s,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=24;break}else continue;else{e[A>>2]=c+1;continue}}if((S0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(3,s|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=25;else{if(j[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){S0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=25;break e}if((t|0)==-1){e[n>>2]=0,S0=49;break}}s||(S0=50)}else S0=49;while(!1);return(S0|0)==49&&s&&(S0=50),(S0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==25&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function _m(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,r=Rn(t,n,l)|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,De(l)),y=o,r|0}function gr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0;M=y,y=y+112|0,m=M,p=(s-n|0)/12|0;do if(p>>>0>100){if(m=Ti(p)|0,!(m|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,D=6;break}c=m,D=11}else c=0,D=11;while(!1);e:do if((D|0)==11){if((n|0)==(s|0))A=0;else for(E=n,T=0,D=m;A=d[E>>0]|0,A&1?A=e[E+4>>2]|0:A=(A&255)>>>1,A?(d[D>>0]=1,A=T):(d[D>>0]=2,A=T+1|0,p=p+-1|0),E=E+12|0,(E|0)!=(s|0);)T=A,D=D+1|0;R=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=p;i:for(;;){p=e[t>>2]|0;do if(p){if(T=e[p+12>>2]|0,(T|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,q=f,f=0,q&1){D=5;break i}}else p=e[T>>2]|0;if((p|0)==-1){e[t>>2]=0,E=1;break}else{E=(e[t>>2]|0)==0;break}}else E=1;while(!1);if(T=e[r>>2]|0,T){if(p=e[T+12>>2]|0,(p|0)==(e[T+16>>2]|0)){if(f=0,p=u0(e[(e[T>>2]|0)+36>>2]|0,T|0)|0,q=f,f=0,q&1){D=5;break}}else p=e[p>>2]|0;(p|0)==-1?(e[r>>2]=0,T=0,D=1):D=0}else T=0,D=1;if(p=e[t>>2]|0,!((U|0)!=0&(E^D))){D=66;break}if(T=e[p+12>>2]|0,(T|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,q=f,f=0,q&1){D=5;break}}else p=e[T>>2]|0;if(!a&&(f=0,p=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,p|0)|0,q=f,f=0,q&1)){D=5;break}if(q=O+1|0,R)p=0,E=U;else for(E=0,V=n,D=U,U=m;;){do if((d[U>>0]|0)==1){if(d[V>>0]&1?T=e[V+8>>2]|0:T=V+4|0,T=e[T+(O<<2)>>2]|0,!a&&(f=0,T=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,T|0)|0,X=f,f=0,X&1)){D=4;break i}if((p|0)!=(T|0)){d[U>>0]=0,T=E,D=D+-1|0;break}T=d[V>>0]|0,T&1?T=e[V+4>>2]|0:T=(T&255)>>>1,(T|0)==(q|0)?(d[U>>0]=2,T=1,A=A+1|0,D=D+-1|0):T=1}else T=E;while(!1);if(V=V+12|0,(V|0)==(s|0)){p=T,E=D;break}else E=T,U=U+1|0}if(!p){O=q,U=E;continue}if(p=e[t>>2]|0,T=p+12|0,D=e[T>>2]|0,(D|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,X=f,f=0,X&1){D=5;break}}else e[T>>2]=D+4;if((A+E|0)>>>0<2|F){O=q,U=E;continue}else p=n,D=m;for(;;)if((d[D>>0]|0)==2&&(T=d[p>>0]|0,T&1?T=e[p+4>>2]|0:T=(T&255)>>>1,(T|0)!=(q|0)&&(d[D>>0]=0,A=A+-1|0)),p=p+12|0,(p|0)==(s|0)){O=q,U=E;continue i}else D=D+1|0}if((D|0)==4){n=b()|0;break}else if((D|0)==5){n=b()|0;break}else if((D|0)==66){do if(p){if(A=e[p+12>>2]|0,(A|0)==(e[p+16>>2]|0)){if(f=0,A=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,X=f,f=0,X&1){D=6;break e}}else A=e[A>>2]|0;if((A|0)==-1){e[t>>2]=0,p=1;break}else{p=(e[t>>2]|0)==0;break}}else p=1;while(!1);do if(T){if(A=e[T+12>>2]|0,(A|0)==(e[T+16>>2]|0)){if(f=0,A=u0(e[(e[T>>2]|0)+36>>2]|0,T|0)|0,X=f,f=0,X&1){D=6;break e}}else A=e[A>>2]|0;if((A|0)!=-1){if(p)break;D=81;break}else{e[r>>2]=0,D=79;break}}else D=79;while(!1);(D|0)==79&&p&&(D=81),(D|0)==81&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))D=85;else for(;;){if((d[m>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){D=85;break}else m=m+1|0}while(!1);return(D|0)==85&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(D|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function Rm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;m=e[n>>2]|0;do if(m){if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)){if(f=0,a=u0(e[(e[m>>2]|0)+36>>2]|0,m|0)|0,A=f,f=0,A&1){J=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=m;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,c){a=0;break}else m=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(t+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,A=s+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}}else a=e[a>>2]|0;if(Pt(a,V,t,q,O,p,t0,F,M,U)|0){a=m;break}if(a=e[c>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(21,t|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Pm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,m=1):m=0}else a=0,m=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A=f,f=0,A&1){J=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(m)break;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,m){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[E>>2]|0:(s&255)>>>1,(e[q>>2]|0)==(t+s|0)){if(f=0,d0(8,K|0,s<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+s}if(m=a+12|0,s=e[m>>2]|0,A=a+16|0,(s|0)==(e[A>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break}}else s=e[s>>2]|0;if(Pt(s,V,t,q,O,p,t0,F,M,U)|0)break;if(s=e[m>>2]|0,(s|0)==(e[A>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break}else continue;else{e[m>>2]=s+4;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(22,t|0,e[q>>2]|0,o|0,V|0)|0,s=D0,s0=f,f=0,s0&1)J=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Lm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;m=e[n>>2]|0;do if(m){if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)){if(f=0,a=u0(e[(e[m>>2]|0)+36>>2]|0,m|0)|0,A=f,f=0,A&1){J=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=m;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,c){a=0;break}else m=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(t+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,A=s+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}}else a=e[a>>2]|0;if(Pt(a,V,t,q,O,p,t0,F,M,U)|0){a=m;break}if(a=e[c>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(23,t|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=26;else{if(k[l>>1]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Um(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;m=e[n>>2]|0;do if(m){if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)){if(f=0,a=u0(e[(e[m>>2]|0)+36>>2]|0,m|0)|0,A=f,f=0,A&1){J=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=m;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,c){a=0;break}else m=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(t+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,A=s+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}}else a=e[a>>2]|0;if(Pt(a,V,t,q,O,p,t0,F,M,U)|0){a=m;break}if(a=e[c>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(24,t|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Om(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;m=e[n>>2]|0;do if(m){if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)){if(f=0,a=u0(e[(e[m>>2]|0)+36>>2]|0,m|0)|0,A=f,f=0,A&1){J=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=m;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,c){a=0;break}else m=0;if(a=d[K>>0]|0,a=a&1?e[E>>2]|0:(a&255)>>>1,(e[q>>2]|0)==(t+a|0)){if(f=0,d0(8,K|0,a<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,A=s+16|0,(a|0)==(e[A>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}}else a=e[a>>2]|0;if(Pt(a,V,t,q,O,p,t0,F,M,U)|0){a=m;break}if(a=e[c>>2]|0,(a|0)==(e[A>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(25,t|0,e[q>>2]|0,o|0,V|0)|0,s0=f,f=0,s0&1)J=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Nm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,q=X+8|0,F=X+40|0,M=X+4|0,O=X,V=st(s)|0,zt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),E=f,f=0;e:do if(E&1)J=26;else{T=K+8|0,D=K+1|0,t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t,e[M>>2]=F,e[O>>2]=0,E=K+4|0,p=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,A=f,f=0,A&1){J=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,m=1):m=0}else a=0,m=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A=f,f=0,A&1){J=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(m)break;break i}else{e[n>>2]=0,J=17;break}}else J=17;while(!1);if((J|0)==17)if(J=0,m){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[E>>2]|0:(s&255)>>>1,(e[q>>2]|0)==(t+s|0)){if(f=0,d0(8,K|0,s<<1|0,0),A=f,f=0,A&1){J=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,d0(8,K|0,t|0,0),A=f,f=0,A&1){J=25;break}t=d[K>>0]&1?e[T>>2]|0:D,e[q>>2]=t+s}if(m=a+12|0,s=e[m>>2]|0,A=a+16|0,(s|0)==(e[A>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break}}else s=e[s>>2]|0;if(Pt(s,V,t,q,O,p,t0,F,M,U)|0)break;if(s=e[m>>2]|0,(s|0)==(e[A>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=25;break}else continue;else{e[m>>2]=s+4;continue}}if((J|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(R=e[M>>2]|0,(R-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=R+4,e[R>>2]=s0),f=0,t=E0(26,t|0,e[q>>2]|0,o|0,V|0)|0,s=D0,s0=f,f=0,s0&1)J=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){J=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){J=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;J=53;break}else{e[n>>2]=0,J=51;break}}else J=51;while(!1);return(J|0)==51&&s&&(J=53),(J|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,a0(K),a0(t0),y=X,s0|0}}while(!1);return(J|0)==26&&(t=b()|0),a0(K),a0(t0),r0(t|0),0}function Vm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+352|0,q=J+208|0,c=J+40|0,m=J+36|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+48|0,t0=J+4|0,F=J,M=J+337|0,O=J+336|0,p1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=26;else{E=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=e[c>>2]|0,T=e[m>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,p=f,f=0,p&1){S0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,A=1):A=0}else s=0,A=1;c=e[n>>2]|0;do if(c){if(m=e[c+12>>2]|0,(m|0)==(e[c+16>>2]|0)){if(f=0,m=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=25;break i}}else m=e[m>>2]|0;if((m|0)!=-1){if(A)break;break i}else{e[n>>2]=0,S0=17;break}}else S0=17;while(!1);if((S0|0)==17)if(S0=0,A){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(t+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),p=f,f=0,p&1){S0=25;break}t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t+m}if(A=s+12|0,m=e[A>>2]|0,p=s+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}}else m=e[m>>2]|0;if(A1(m,M,O,t,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}else continue;else{e[A>>2]=c+4;continue}}if((S0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(1,t|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=26;else{if(i0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;S0=53;break}else{e[n>>2]=0,S0=51;break}}else S0=51;while(!1);return(S0|0)==51&&s&&(S0=53),(S0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==26&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function Bm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+352|0,q=J+208|0,c=J+40|0,m=J+36|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+48|0,t0=J+4|0,F=J,M=J+337|0,O=J+336|0,p1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=26;else{E=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=e[c>>2]|0,T=e[m>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,p=f,f=0,p&1){S0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,A=1):A=0}else s=0,A=1;c=e[n>>2]|0;do if(c){if(m=e[c+12>>2]|0,(m|0)==(e[c+16>>2]|0)){if(f=0,m=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=25;break i}}else m=e[m>>2]|0;if((m|0)!=-1){if(A)break;break i}else{e[n>>2]=0,S0=17;break}}else S0=17;while(!1);if((S0|0)==17)if(S0=0,A){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(t+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),p=f,f=0,p&1){S0=25;break}t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t+m}if(A=s+12|0,m=e[A>>2]|0,p=s+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}}else m=e[m>>2]|0;if(A1(m,M,O,t,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}else continue;else{e[A>>2]=c+4;continue}}if((S0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(2,t|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=26;else{if(j[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;S0=53;break}else{e[n>>2]=0,S0=51;break}}else S0=51;while(!1);return(S0|0)==51&&s&&(S0=53),(S0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==26&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function qm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0;J=y,y=y+352|0,q=J+208|0,c=J+40|0,m=J+36|0,w0=J+24|0,s0=J+12|0,R=J+8|0,K=J+48|0,t0=J+4|0,F=J,M=J+337|0,O=J+336|0,p1(w0,s,q,c,m),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),V=f,f=0;e:do if(V&1)S0=26;else{E=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,V=s0+4|0,D=e[c>>2]|0,T=e[m>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,p=f,f=0,p&1){S0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,A=1):A=0}else s=0,A=1;c=e[n>>2]|0;do if(c){if(m=e[c+12>>2]|0,(m|0)==(e[c+16>>2]|0)){if(f=0,m=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){S0=25;break i}}else m=e[m>>2]|0;if((m|0)!=-1){if(A)break;break i}else{e[n>>2]=0,S0=17;break}}else S0=17;while(!1);if((S0|0)==17)if(S0=0,A){c=0;break}else c=0;if(m=d[s0>>0]|0,m=m&1?e[V>>2]|0:(m&255)>>>1,(e[R>>2]|0)==(t+m|0)){if(f=0,d0(8,s0|0,m<<1|0,0),p=f,f=0,p&1){S0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,d0(8,s0|0,t|0,0),p=f,f=0,p&1){S0=25;break}t=d[s0>>0]&1?e[E>>2]|0:U,e[R>>2]=t+m}if(A=s+12|0,m=e[A>>2]|0,p=s+16|0,(m|0)==(e[p>>2]|0)){if(f=0,m=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}}else m=e[m>>2]|0;if(A1(m,M,O,t,R,D,T,w0,K,t0,F,q)|0)break;if(c=e[A>>2]|0,(c|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=25;break}else continue;else{e[A>>2]=c+4;continue}}if((S0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(3,t|0,e[R>>2]|0,o|0),A0=f,f=0,A0&1)S0=26;else{if(j[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){S0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){S0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;S0=53;break}else{e[n>>2]=0,S0=51;break}}else S0=51;while(!1);return(S0|0)==51&&s&&(S0=53),(S0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,a0(s0),a0(w0),y=J,A0|0}}while(!1);return(S0|0)==26&&(t=b()|0),a0(s0),a0(w0),r0(t|0),0}function qi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;return l=y,y=y+16|0,a=l,e[a>>2]=o,o=nt(n)|0,n=Mr(t,r,s,a)|0,o|0&&(f=0,u0(75,o|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,De(a)),y=l,n|0}function bm(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,f=0,r=L0(37,t|0,n|0,l|0)|0,t=f,f=0,t&1)r=b()|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,De(l)),r0(r|0);else return s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,De(l)),y=o,r|0;return 0}function Qt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0;T=y,y=y+16|0,p=T,a=e[t>>2]|0;e:do if(!a)a=0;else{if(D=r,m=s-D>>2,A=o+12|0,c=e[A>>2]|0,m=(c|0)>(m|0)?c-m|0:0,c=n,D=c-D|0,o=D>>2,(D|0)>0&&(ze[e[(e[a>>2]|0)+48>>2]&63](a,r,o)|0)!=(o|0)){e[t>>2]=0,a=0;break}do if((m|0)>0)if(h1(p,m,l),f=0,o=L0(e[(e[a>>2]|0)+48>>2]|0,a|0,(d[p>>0]&1?e[p+8>>2]|0:p+4|0)|0,m|0)|0,D=f,f=0,D&1&&(D=b()|0,ye(p),r0(D|0)),(o|0)==(m|0)){ye(p);break}else{e[t>>2]=0,ye(p),a=0;break e}while(!1);if(D=s-c|0,s=D>>2,(D|0)>0&&(ze[e[(e[a>>2]|0)+48>>2]&63](a,n,s)|0)!=(s|0)){e[t>>2]=0,a=0;break}e[A>>2]=0}while(!1);return y=T,a|0}function at(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;l=e[t>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0))if((Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[t>>2]=0,l=0;break}else{l=e[t>>2]|0;break}}else l=0;while(!1);a=(l|0)==0,l=e[r>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0)&&(Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[r>>2]=0,U=11;break}a?U=13:U=12}else U=11;while(!1);(U|0)==11&&(a?U=12:(l=0,U=13));e:do if((U|0)==12)e[n>>2]=e[n>>2]|6,l=0;else if((U|0)==13){if(a=e[t>>2]|0,c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[c>>0]|0,c=a&255,c<<24>>24>-1&&(E=s+8|0,(k[(e[E>>2]|0)+(a<<24>>24<<1)>>1]&2048)!=0)){for(A=(ze[e[(e[s>>2]|0)+36>>2]&63](s,c,0)|0)<<24>>24,a=e[t>>2]|0,c=a+12|0,m=e[c>>2]|0,(m|0)==(e[a+16>>2]|0)?(Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,T=o,p=l,o=l,l=A):(e[c>>2]=m+1,T=o,p=l,o=l,l=A);;){l=l+-48|0,D=T+-1|0,a=e[t>>2]|0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);if(m=(a|0)==0,o?(e[o+12>>2]|0)==(e[o+16>>2]|0)?(Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1?(e[r>>2]=0,c=0,o=0):(c=p,o=p):c=p:(c=p,o=0),a=e[t>>2]|0,!((T|0)>1&(m^(o|0)==0)))break;if(m=e[a+12>>2]|0,(m|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[m>>0]|0,m=a&255,m<<24>>24<=-1||!(k[(e[E>>2]|0)+(a<<24>>24<<1)>>1]&2048))break e;if(l=((ze[e[(e[s>>2]|0)+36>>2]&63](s,m,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,m=a+12|0,A=e[m>>2]|0,(A|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,T=D,p=c;continue}else{e[m>>2]=A+1,T=D,p=c;continue}}do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);a=(a|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)&&(Se[e[(e[c>>2]|0)+36>>2]&127](c)|0)==-1){e[r>>2]=0,U=50;break}if(a)break e}else U=50;while(!1);if((U|0)==50&&!a)break;e[n>>2]=e[n>>2]|2;break}e[n>>2]=e[n>>2]|4,l=0}while(!1);return l|0}function ft(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;l=e[t>>2]|0;do if(l)if(a=e[l+12>>2]|0,(a|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[a>>2]|0,(l|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);a=e[r>>2]|0;do if(a)if(l=e[a+12>>2]|0,(l|0)==(e[a+16>>2]|0)?l=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:l=e[l>>2]|0,(l|0)!=-1)if(c){E=17;break}else{E=16;break}else{e[r>>2]=0,E=14;break}else E=14;while(!1);(E|0)==14&&(c?E=16:(a=0,E=17));e:do if((E|0)==16)e[n>>2]=e[n>>2]|6,l=0;else if((E|0)==17){if(l=e[t>>2]|0,c=e[l+12>>2]|0,(c|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[c>>2]|0,!(ze[e[(e[s>>2]|0)+12>>2]&63](s,2048,l)|0)){e[n>>2]=e[n>>2]|4,l=0;break}for(l=(ze[e[(e[s>>2]|0)+52>>2]&63](s,l,0)|0)<<24>>24,c=e[t>>2]|0,m=c+12|0,A=e[m>>2]|0,(A|0)==(e[c+16>>2]|0)?(Se[e[(e[c>>2]|0)+40>>2]&127](c)|0,T=o,p=a,m=a):(e[m>>2]=A+4,T=o,p=a,m=a);;){l=l+-48|0,D=T+-1|0,a=e[t>>2]|0;do if(a)if(c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[c>>2]|0,(a|0)==-1){e[t>>2]=0,A=1;break}else{A=(e[t>>2]|0)==0;break}else A=1;while(!1);do if(m)if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)?a=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:a=e[a>>2]|0,(a|0)==-1){e[r>>2]=0,m=0,o=0,a=1;break}else{m=p,o=p,a=(p|0)==0;break}else m=p,o=0,a=1;while(!1);if(c=e[t>>2]|0,!((T|0)>1&(A^a)))break;if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,!(ze[e[(e[s>>2]|0)+12>>2]&63](s,2048,a)|0))break e;if(l=((ze[e[(e[s>>2]|0)+52>>2]&63](s,a,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,c=a+12|0,A=e[c>>2]|0,(A|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,T=D,p=m,m=o;continue}else{e[c>>2]=A+4,T=D,p=m,m=o;continue}}do if(c)if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,(a|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);do if(m)if(a=e[m+12>>2]|0,(a|0)==(e[m+16>>2]|0)?a=Se[e[(e[m>>2]|0)+36>>2]&127](m)|0:a=e[a>>2]|0,(a|0)!=-1){if(c)break e;break}else{e[r>>2]=0,E=60;break}else E=60;while(!1);if((E|0)==60&&!c)break;e[n>>2]=e[n>>2]|2}while(!1);return l|0}function Gm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a|0,c=bt(s?c:0,o)|0,c||yr();do if(s)e[t>>2]=c,m=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,De(c);else{m=e[t>>2]|0;break}else m=c;while(!1);e[l>>2]=201,e[r>>2]=m+a,e[n>>2]=(e[t>>2]|0)+o}function zm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||yr();do if(s)e[t>>2]=c,m=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,De(c);else{m=e[t>>2]|0;break}else m=c;while(!1);e[l>>2]=201,e[r>>2]=m+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Qm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,m=e[t+4>>2]|0,s=s&255):(o=10,m=(s&255)>>>1),c=n-l|0;do if((n|0)!=(r|0)){if((o-m|0)>>>0>>0&&(u1(t,o,m+c-o|0,m,m,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+1|0,l=n+(m-l)|0,(r|0)!=(n|0))for(s=r,o=a+m|0;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(n|0);)o=o+1|0;if(d[a+l>>0]=0,s=m+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function Hm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||yr();do if(s)e[t>>2]=c,m=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,De(c);else{m=e[t>>2]|0;break}else m=c;while(!1);e[l>>2]=201,e[r>>2]=m+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Ym(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,m=e[t+4>>2]|0,s=s&255):(o=1,m=(s&255)>>>1),c=n-l>>2;do if(c){if((o-m|0)>>>0>>0&&(B2(t,o,m+c-o|0,m,m,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+4|0,l=m+((n-l|0)>>>2)|0,(r|0)!=(n|0))for(s=r,o=a+(m<<2)|0;e[o>>2]=e[s>>2],s=s+4|0,(s|0)!=(n|0);)o=o+4|0;if(e[a+(l<<2)>>2]=0,s=m+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function jm(t,r){t=t|0,r=r|0;var n=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,d[t+128>>0]=0;do if(r)if(f=0,h0(125,t|0,r|0),n=f,f=0,n&1)n=b()|0,S1(t),r0(n|0);else{J2(t,r);break}while(!1)}function Xm(t,r){t=t|0,r=r|0,Si(t,r,Ai(43148)|0)}function Km(t,r){t=t|0,r=r|0,Si(t,r,Ai(43188)|0)}function Wm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44220)|0)}function Zm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44212)|0)}function Jm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44280)|0)}function $m(t,r){t=t|0,r=r|0,Si(t,r,Ai(44288)|0)}function ed(t,r){t=t|0,r=r|0,Si(t,r,Ai(44344)|0)}function id(t,r){t=t|0,r=r|0,Si(t,r,Ai(44352)|0)}function rd(t,r){t=t|0,r=r|0,Si(t,r,Ai(44360)|0)}function nd(t,r){t=t|0,r=r|0,Si(t,r,Ai(44368)|0)}function sd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43260)|0)}function od(t,r){t=t|0,r=r|0,Si(t,r,Ai(43332)|0)}function ld(t,r){t=t|0,r=r|0,Si(t,r,Ai(43392)|0)}function ad(t,r){t=t|0,r=r|0,Si(t,r,Ai(43452)|0)}function ud(t,r){t=t|0,r=r|0,Si(t,r,Ai(43764)|0)}function cd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43828)|0)}function hd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43892)|0)}function md(t,r){t=t|0,r=r|0,Si(t,r,Ai(43956)|0)}function dd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43992)|0)}function gd(t,r){t=t|0,r=r|0,Si(t,r,Ai(44028)|0)}function pd(t,r){t=t|0,r=r|0,Si(t,r,Ai(44064)|0)}function Ad(t,r){t=t|0,r=r|0,Si(t,r,Ai(44100)|0)}function Sd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43544)|0)}function vd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43636)|0)}function wd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43668)|0)}function xd(t,r){t=t|0,r=r|0,Si(t,r,Ai(43700)|0)}function Cd(t,r){t=t|0,r=r|0,Si(t,r,Ai(44140)|0)}function Td(t,r){t=t|0,r=r|0,Si(t,r,Ai(44180)|0)}function S1(t){t=t|0;var r=0,n=0,s=0;n=e[t>>2]|0;do if(n){if(s=t+4|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}if((t+16|0)==(n|0)){d[t+128>>0]=0;break}else{l0(n);break}}while(!1)}function yd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(a=t+4|0,n=e[a>>2]|0,s=e[t>>2]|0,o=n-s>>2,o>>>0>=r>>>0){if(o>>>0>r>>>0&&(l=s+(r<<2)|0,(n|0)!=(l|0))){do n=n+-4|0;while((n|0)!=(l|0));e[a>>2]=n}}else Bd(t,r-o|0)}function Dd(t,r){t=t|0,r=r|0;var n=0;return n=e[t+8>>2]|0,(e[t+12>>2]|0)-n>>2>>>0>r>>>0?n=(e[n+(r<<2)>>2]|0)!=0:n=0,n|0}function Id(t){t=t|0;var r=0,n=0;n=t+4|0,r=e[n>>2]|0,n=e[n+4>>2]|0,t=(e[t>>2]|0)+(n>>1)|0,n&1&&(r=e[(e[t>>2]|0)+r>>2]|0),Ce[r&255](t)}function kd(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0;e[n>>2]=t,e[l>>2]=s,c&2?(o-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=-69,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=-65,m=4):m=4;e:do if((m|0)==4)if(A=r,t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=k[t>>1]|0,m=c&65535,m>>>0>a>>>0){t=2;break e}do if((c&65535)<128){if(t=e[l>>2]|0,(o-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}else{if((c&65535)<2048){if(t=e[l>>2]|0,(o-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=m>>>6|192,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m&63|128;break}if((c&65535)<55296){if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=m>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m&63|128;break}if((c&65535)>=56320){if((c&65535)<57344){t=2;break e}if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=m>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m&63|128;break}if((A-t|0)<4){t=1;break e}if(t=t+2|0,c=B[t>>1]|0,(c&64512|0)!=56320){t=2;break e}if((o-(e[l>>2]|0)|0)<4){t=1;break e}if(s=m&960,((s<<10)+65536|m<<10&64512|c&1023)>>>0>a>>>0){t=2;break e}e[n>>2]=t,t=(s>>>6)+1|0,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=t>>>2|240,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m>>>2&15|t<<4&48|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=m<<4&48|c>>>6&15|128,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c&63|128}while(!1);if(t=(e[n>>2]|0)+2|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function Ed(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65?(e[n>>2]=t+3,m=e[l>>2]|0):m=s):(m=s,c=r),D=o,s=e[n>>2]|0,t=s>>>0>>0;e:do if(t&m>>>0>>0)for(;;){if(t=d[s>>0]|0,p=t&255,p>>>0>a>>>0){t=2;break e}do if(t<<24>>24>-1)k[m>>1]=t&255,e[n>>2]=s+1;else{if((t&255)<194){t=2;break e}if((t&255)<224){if((c-s|0)<2){t=1;break e}if(t=N[s+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|p<<6&1984,t>>>0>a>>>0){t=2;break e}k[m>>1]=t,e[n>>2]=s+2;break}if((t&255)<240){if((c-s|0)<3){t=1;break e}switch(A=d[s+1>>0]|0,t=d[s+2>>0]|0,p|0){case 224:{if((A&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((A&-32)<<24>>24!=-128){t=2;break e}break}default:if((A&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(A&255)<<6&4032|p<<12|t&63,(t&65535)>>>0>a>>>0){t=2;break e}k[m>>1]=t,e[n>>2]=s+3;break}if((t&255)>=245){t=2;break e}if((c-s|0)<4){t=1;break e}switch(A=d[s+1>>0]|0,t=d[s+2>>0]|0,s=d[s+3>>0]|0,p|0){case 240:{if((A+112&255)>=48){t=2;break e}break}case 244:{if((A&-16)<<24>>24!=-128){t=2;break e}break}default:if((A&-64)<<24>>24!=-128){t=2;break e}}if(T=t&255,(T&192|0)!=128){t=2;break e}if(t=s&255,(t&192|0)!=128){t=2;break e}if((D-m|0)<4){t=1;break e}if(p=p&7,s=A&255,A=T<<6,t=t&63,(s<<12&258048|p<<18|A&4032|t)>>>0>a>>>0){t=2;break e}k[m>>1]=s<<2&60|T>>>4&3|((s>>>4&3|p<<2)<<6)+16320|55296,T=m+2|0,e[l>>2]=T,k[T>>1]=t|A&960|56320,e[n>>2]=(e[n>>2]|0)+4}while(!1);if(m=(e[l>>2]|0)+2|0,e[l>>2]=m,s=e[n>>2]|0,t=s>>>0>>0,!(t&m>>>0>>0)){E=39;break}}else E=39;while(!1);return(E|0)==39&&(t=t&1),t|0}function Fd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;T=r,o&4|0&&(T-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){p=o,l=0;i:for(;;){if(o=d[p>>0]|0,A=o&255,A>>>0>s>>>0){o=p,l=42;break e}do if(o<<24>>24>-1)o=p+1|0;else{if((o&255)<194){o=p,l=42;break e}if((o&255)<224){if((T-p|0)<2){o=p,l=42;break e}if(o=N[p+1>>0]|0,(o&192|0)!=128){o=p,l=42;break e}if((o&63|A<<6&1984)>>>0>s>>>0){o=p,l=42;break e}o=p+2|0;break}if((o&255)<240){if(o=p,(T-o|0)<3){o=p,l=42;break e}switch(c=d[p+1>>0]|0,a=d[p+2>>0]|0,A|0){case 224:{if((c&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((c&-32)<<24>>24!=-128){l=22;break i}break}default:if((c&-64)<<24>>24!=-128){l=24;break i}}if(o=a&255,(o&192|0)!=128){o=p,l=42;break e}if(((c&255)<<6&4032|A<<12&61440|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+3|0;break}if((o&255)>=245){o=p,l=42;break e}if(o=p,(n-l|0)>>>0<2|(T-o|0)<4){o=p,l=42;break e}switch(m=d[p+1>>0]|0,a=d[p+2>>0]|0,c=d[p+3>>0]|0,A|0){case 240:{if((m+112&255)>=48){l=32;break i}break}case 244:{if((m&-16)<<24>>24!=-128){l=34;break i}break}default:if((m&-64)<<24>>24!=-128){l=36;break i}}if(a=a&255,(a&192|0)!=128){o=p,l=42;break e}if(o=c&255,(o&192|0)!=128){o=p,l=42;break e}if(((m&255)<<12&258048|A<<18&1835008|a<<6&4032|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+4|0,l=l+1|0}while(!1);if(l=l+1|0,l>>>0>>0&o>>>0>>0)p=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function Md(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0;e[n>>2]=t,e[l>>2]=s,A=o,c&2?(A-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=-69,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=-65,m=4):m=4;e:do if((m|0)==4)if(t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=e[t>>2]|0,c>>>0>a>>>0|(c&-2048|0)==55296){t=2;break e}do if(c>>>0>=128){if(c>>>0<2048){if(t=e[l>>2]|0,(A-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>6|192,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c&63|128;break}if(t=e[l>>2]|0,o=A-t|0,c>>>0<65536){if((o|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>12|224,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c>>>6&63|128,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c&63|128;break}else{if((o|0)<4){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>18|240,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c>>>12&63|128,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c>>>6&63|128,m=e[l>>2]|0,e[l>>2]=m+1,d[m>>0]=c&63|128;break}}else{if(t=e[l>>2]|0,(A-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}while(!1);if(t=(e[n>>2]|0)+4|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function _d(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var m=0,A=0,p=0,T=0,D=0,E=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65&&(e[n>>2]=t+3,s=e[l>>2]|0),D=c):D=r,c=e[n>>2]|0,t=c>>>0>>0;e:do if(t&s>>>0>>0)for(;;){t=d[c>>0]|0,T=t&255;do if(t<<24>>24>-1){if(T>>>0>a>>>0){t=2;break e}e[s>>2]=T,e[n>>2]=c+1}else{if((t&255)<194){t=2;break e}if((t&255)<224){if((D-c|0)<2){t=1;break e}if(t=N[c+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|T<<6&1984,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+2;break}if((t&255)<240){if((D-c|0)<3){t=1;break e}switch(m=d[c+1>>0]|0,t=d[c+2>>0]|0,T|0){case 224:{if((m&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((m&-32)<<24>>24!=-128){t=2;break e}break}default:if((m&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(m&255)<<6&4032|T<<12&61440|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+3;break}if((t&255)>=245){t=2;break e}if((D-c|0)<4){t=1;break e}switch(p=d[c+1>>0]|0,t=d[c+2>>0]|0,m=d[c+3>>0]|0,T|0){case 240:{if((p+112&255)>=48){t=2;break e}break}case 244:{if((p&-16)<<24>>24!=-128){t=2;break e}break}default:if((p&-64)<<24>>24!=-128){t=2;break e}}if(A=t&255,(A&192|0)!=128){t=2;break e}if(t=m&255,(t&192|0)!=128){t=2;break e}if(t=(p&255)<<12&258048|T<<18&1835008|A<<6&4032|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+4}while(!1);if(s=(e[l>>2]|0)+4|0,e[l>>2]=s,c=e[n>>2]|0,t=c>>>0>>0,!(t&s>>>0>>0)){E=38;break}}else E=38;while(!1);return(E|0)==38&&(t=t&1),t|0}function Rd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0;T=r,o&4|0&&(T-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){A=o,p=0;i:for(;;){o=d[A>>0]|0,m=o&255;do if(o<<24>>24>-1){if(m>>>0>s>>>0){o=A,l=42;break e}o=A+1|0}else{if((o&255)<194){o=A,l=42;break e}if((o&255)<224){if((T-A|0)<2){o=A,l=42;break e}if(o=N[A+1>>0]|0,(o&192|0)!=128){o=A,l=42;break e}if((o&63|m<<6&1984)>>>0>s>>>0){o=A,l=42;break e}o=A+2|0;break}if((o&255)<240){if(o=A,(T-o|0)<3){o=A,l=42;break e}switch(a=d[A+1>>0]|0,l=d[A+2>>0]|0,m|0){case 224:{if((a&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((a&-32)<<24>>24!=-128){l=22;break i}break}default:if((a&-64)<<24>>24!=-128){l=24;break i}}if(o=l&255,(o&192|0)!=128){o=A,l=42;break e}if(((a&255)<<6&4032|m<<12&61440|o&63)>>>0>s>>>0){o=A,l=42;break e}o=A+3|0;break}if((o&255)>=245){o=A,l=42;break e}if(o=A,(T-o|0)<4){o=A,l=42;break e}switch(c=d[A+1>>0]|0,l=d[A+2>>0]|0,a=d[A+3>>0]|0,m|0){case 240:{if((c+112&255)>=48){l=32;break i}break}case 244:{if((c&-16)<<24>>24!=-128){l=34;break i}break}default:if((c&-64)<<24>>24!=-128){l=36;break i}}if(l=l&255,(l&192|0)!=128){o=A,l=42;break e}if(o=a&255,(o&192|0)!=128){o=A,l=42;break e}if(((c&255)<<12&258048|m<<18&1835008|l<<6&4032|o&63)>>>0>s>>>0){o=A,l=42;break e}o=A+4|0}while(!1);if(p=p+1|0,p>>>0>>0&o>>>0>>0)A=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function Pd(t){t=t|0,a0(45196),a0(45184),a0(45172),a0(45160),a0(45148),a0(45136),a0(45124),a0(45112),a0(45100),a0(45088),a0(45076),a0(45064),a0(45052),a0(45040)}function Ld(t){t=t|0,ye(45368),ye(45356),ye(45344),ye(45332),ye(45320),ye(45308),ye(45296),ye(45284),ye(45272),ye(45260),ye(45248),ye(45236),ye(45224),ye(45212)}function Ud(t){t=t|0,a0(46e3),a0(45988),a0(45976),a0(45964),a0(45952),a0(45940),a0(45928),a0(45916),a0(45904),a0(45892),a0(45880),a0(45868),a0(45856),a0(45844),a0(45832),a0(45820),a0(45808),a0(45796),a0(45784),a0(45772),a0(45760),a0(45748),a0(45736),a0(45724)}function Od(t){t=t|0,ye(46292),ye(46280),ye(46268),ye(46256),ye(46244),ye(46232),ye(46220),ye(46208),ye(46196),ye(46184),ye(46172),ye(46160),ye(46148),ye(46136),ye(46124),ye(46112),ye(46100),ye(46088),ye(46076),ye(46064),ye(46052),ye(46040),ye(46028),ye(46016)}function Nd(t){t=t|0,a0(47104),a0(47092),a0(47080),a0(47068),a0(47056),a0(47044),a0(47032),a0(47020),a0(47008),a0(46996),a0(46984),a0(46972),a0(46960),a0(46948),a0(46936),a0(46924),a0(46912),a0(46900),a0(46888),a0(46876),a0(46864),a0(46852),a0(46840),a0(46828)}function Vd(t){t=t|0,ye(47396),ye(47384),ye(47372),ye(47360),ye(47348),ye(47336),ye(47324),ye(47312),ye(47300),ye(47288),ye(47276),ye(47264),ye(47252),ye(47240),ye(47228),ye(47216),ye(47204),ye(47192),ye(47180),ye(47168),ye(47156),ye(47144),ye(47132),ye(47120)}function Bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;m=y,y=y+32|0,c=m,l=e[t+8>>2]|0,n=e[t+4>>2]|0,l-n>>2>>>0>>0?(s=e[t>>2]|0,a=n-s>>2,o=a+r|0,o>>>0>1073741823&&ct(t),n=l-s|0,n>>2>>>0<536870911?(n=n>>1,n=n>>>0>>0?o:n):n=1073741823,qd(c,n,a,t+16|0),a=c+8|0,l=e[a>>2]|0,je(l|0,0,r<<2|0)|0,e[a>>2]=l+(r<<2),bd(t,c),Gd(c)):J2(t,r),y=m}function J2(t,r){t=t|0,r=r|0;var n=0;n=t+4|0,t=r,r=e[n>>2]|0;do e[r>>2]=0,r=(e[n>>2]|0)+4|0,e[n>>2]=r,t=t+-1|0;while(t|0)}function qd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;e[t+12>>2]=0,e[t+16>>2]=s;do if(r)if(o=s+112|0,r>>>0<29&(d[o>>0]|0)==0){d[o>>0]=1;break}else{s=G0(r<<2)|0;break}else s=0;while(!1);e[t>>2]=s,n=s+(n<<2)|0,e[t+8>>2]=n,e[t+4>>2]=n,e[t+12>>2]=s+(r<<2)}function bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;s=e[t>>2]|0,l=t+4|0,n=r+4|0,o=(e[l>>2]|0)-s|0,a=(e[n>>2]|0)+(0-(o>>2)<<2)|0,e[n>>2]=a,ei(a|0,s|0,o|0)|0,o=e[t>>2]|0,e[t>>2]=e[n>>2],e[n>>2]=o,o=r+8|0,s=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=s,o=t+8|0,t=r+12|0,s=e[o>>2]|0,e[o>>2]=e[t>>2],e[t>>2]=s,e[r>>2]=e[n>>2]}function Gd(t){t=t|0;var r=0,n=0,s=0;if(n=e[t+4>>2]|0,s=t+8|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}n=e[t>>2]|0;do if(n)if(r=e[t+16>>2]|0,(r|0)==(n|0)){d[r+112>>0]=0;break}else{l0(n);break}while(!1)}function zd(t,r){t=t|0,r=r|0;var n=0;r>>>0>1073741823&&ct(t),n=t+128|0,r>>>0<29&(d[n>>0]|0)==0?(d[n>>0]=1,n=t+16|0):n=G0(r<<2)|0,e[t+4>>2]=n,e[t>>2]=n,e[t+8>>2]=n+(r<<2)}function Qd(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+k1(t,a,Di()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function Hd(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+k1(t,a,Di()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function Yd(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)==(r|0))e[n>>2]=4,s=0;else{if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+k1(t,a,Di()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}while(!1);return y=c,+s}function jd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,s=0,t=0;break}if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,t=Dr(t,a,s,Di()|0)|0,s=e[o>>2]|0,s||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}(s|0)==34?(e[n>>2]=4,s=-1,t=-1):s=D0}else e[n>>2]=4,s=0,t=0;while(!1);return D0=s,y=c,t|0}function Xd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=Dr(t,c,s,Di()|0)|0,s=D0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=m,t|0}function Kd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=Dr(t,c,s,Di()|0)|0,s=D0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=m,t|0}function Wd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=Dr(t,c,s,Di()|0)|0,s=D0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>65535|(o|0)==34){e[n>>2]=4,t=-1;break}else{t=t&65535;break}}else e[n>>2]=4,t=0;while(!1);return y=m,t|0}function Zd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m;do if((t|0)!=(r|0)){if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Di()|0)|0,s=D0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}if((o|0)==34)return e[n>>2]=4,c=(s|0)>0|(s|0)==0&t>>>0>0,D0=c?2147483647:-2147483648,y=m,(c?-1:0)|0}else e[n>>2]=4,s=0,t=0;while(!1);return D0=s,y=m,t|0}function Jd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m;e:do if((t|0)==(r|0))e[n>>2]=4,t=0;else{if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Di()|0)|0,s=D0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}do if((o|0)==34){if(e[n>>2]=4,(s|0)>0|(s|0)==0&t>>>0>0){t=2147483647;break e}}else{if((s|0)<-1|(s|0)==-1&t>>>0<2147483648){e[n>>2]=4;break}if((s|0)>0|(s|0)==0&t>>>0>2147483647){e[n>>2]=4,t=2147483647;break e}else break e}while(!1);t=-2147483648}while(!1);return y=m,t|0}function $d(){}function Ji(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s=r-s-(n>>>0>t>>>0|0)>>>0,D0=s,t-n>>>0|0|0}function je(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(s=t+n|0,(n|0)>=20){if(r=r&255,l=t&3,a=r|r<<8|r<<16|r<<24,o=s&-4,l)for(l=t+4-l|0;(t|0)<(l|0);)d[t>>0]=r,t=t+1|0;for(;(t|0)<(o|0);)e[t>>2]=a,t=t+4|0}for(;(t|0)<(s|0);)d[t>>0]=r,t=t+1|0;return t-n|0}function Li(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,n=t+n>>>0,D0=r+s+(n>>>0>>0|0)>>>0,n|0|0}function It(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(D0=r>>>n,t>>>n|(r&(1<>>n-32|0)}function ei(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((n|0)>=4096)return qn(t|0,r|0,n|0)|0;if(s=t|0,(t&3)==(r&3)){for(;t&3;){if(!n)return s|0;d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0}for(;(n|0)>=4;)e[t>>2]=e[r>>2],t=t+4|0,r=r+4|0,n=n-4|0}for(;(n|0)>0;)d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0;return s|0}function pi(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(D0=r<>>32-n,t<0;)t=t-1|0,r=r-1|0,n=n-1|0,d[t>>0]=d[r>>0]|0;t=s}else ei(t,r,n)|0;return t|0}function aA(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(D0=r>>n,t>>>n|(r&(1<>n-32|0)}function $2(t){t=t|0;var r=0;return r=d[e0+(t&255)>>0]|0,(r|0)<8?r|0:(r=d[e0+(t>>8&255)>>0]|0,(r|0)<8?r+8|0:(r=d[e0+(t>>16&255)>>0]|0,(r|0)<8?r+16|0:(d[e0+(t>>>24)>>0]|0)+24|0))}function e8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;return l=t&65535,o=r&65535,n=W(o,l)|0,s=t>>>16,t=(n>>>16)+(W(o,s)|0)|0,o=r>>>16,r=W(o,l)|0,D0=(t>>>16)+(W(o,s)|0)+(((t&65535)+r|0)>>>16)|0,t+r<<16|n&65535|0|0}function fA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;return A=r>>31|((r|0)<0?-1:0)<<1,m=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,l=s>>31|((s|0)<0?-1:0)<<1,o=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,c=Ji(A^t,m^r,A,m)|0,a=D0,t=l^A,r=o^m,Ji((Sr(c,a,Ji(l^n,o^s,l,o)|0,D0,0)|0)^t,D0^r,t,r)|0}function uA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;return o=y,y=y+16|0,c=o|0,a=r>>31|((r|0)<0?-1:0)<<1,l=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,A=s>>31|((s|0)<0?-1:0)<<1,m=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,t=Ji(a^t,l^r,a,l)|0,r=D0,Sr(t,r,Ji(A^n,m^s,A,m)|0,D0,c)|0,s=Ji(e[c>>2]^a,e[c+4>>2]^l,a,l)|0,n=D0,y=o,D0=n,s|0}function Ht(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=t,l=n,n=e8(o,l)|0,t=D0,D0=(W(r,l)|0)+(W(s,o)|0)+t|t&0,n|0|0|0}function Ar(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Sr(t,r,n,s,0)|0}function v1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return l=y,y=y+16|0,o=l|0,Sr(t,r,n,s,o)|0,y=l,D0=e[o+4>>2]|0,e[o>>2]|0|0}function Sr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(p=t,m=r,A=m,a=n,D=s,c=D,!A)return l=(o|0)!=0,c?l?(e[o>>2]=t|0,e[o+4>>2]=r&0,D=0,o=0,D0=D,o|0):(D=0,o=0,D0=D,o|0):(l&&(e[o>>2]=(p>>>0)%(a>>>0),e[o+4>>2]=0),D=0,o=(p>>>0)/(a>>>0)>>>0,D0=D,o|0);l=(c|0)==0;do if(a){if(!l){if(l=(X0(c|0)|0)-(X0(A|0)|0)|0,l>>>0<=31){T=l+1|0,c=31-l|0,r=l-31>>31,a=T,t=p>>>(T>>>0)&r|A<>>(T>>>0)&r,l=0,c=p<>2]=t|0,e[o+4>>2]=m|r&0,D=0,o=0,D0=D,o|0):(D=0,o=0,D0=D,o|0)}if(l=a-1|0,l&a){c=(X0(a|0)|0)+33-(X0(A|0)|0)|0,U=64-c|0,T=32-c|0,m=T>>31,E=c-32|0,r=E>>31,a=c,t=T-1>>31&A>>>(E>>>0)|(A<>>(c>>>0))&r,r=r&A>>>(c>>>0),l=p<>>(E>>>0))&m|p<>31;break}return o&&(e[o>>2]=l&p,e[o+4>>2]=0),(a|0)==1?(E=m|r&0,U=t|0|0,D0=E,U|0):(U=$2(a|0)|0,E=A>>>(U>>>0)|0,U=A<<32-U|p>>>(U>>>0)|0,D0=E,U|0)}else{if(l)return o&&(e[o>>2]=(A>>>0)%(a>>>0),e[o+4>>2]=0),E=0,U=(A>>>0)/(a>>>0)>>>0,D0=E,U|0;if(!p)return o&&(e[o>>2]=0,e[o+4>>2]=(A>>>0)%(c>>>0)),E=0,U=(A>>>0)/(c>>>0)>>>0,D0=E,U|0;if(l=c-1|0,!(l&c))return o&&(e[o>>2]=t|0,e[o+4>>2]=l&A|r&0),E=0,U=A>>>(($2(c|0)|0)>>>0),D0=E,U|0;if(l=(X0(c|0)|0)-(X0(A|0)|0)|0,l>>>0<=30){r=l+1|0,c=31-l|0,a=r,t=A<>>(r>>>0),r=A>>>(r>>>0),l=0,c=p<>2]=t|0,e[o+4>>2]=m|r&0,E=0,U=0,D0=E,U|0):(E=0,U=0,D0=E,U|0)}while(!1);if(!a)A=c,m=0,c=0;else{T=n|0|0,p=D|s&0,A=Li(T|0,p|0,-1,-1)|0,n=D0,m=c,c=0;do s=m,m=l>>>31|m<<1,l=c|l<<1,s=t<<1|s>>>31|0,D=t>>>31|r<<1|0,Ji(A,n,s,D)|0,U=D0,E=U>>31|((U|0)<0?-1:0)<<1,c=E&1,t=Ji(s,D,E&T,(((U|0)<0?-1:0)>>31|((U|0)<0?-1:0)<<1)&p)|0,r=D0,a=a-1|0;while(a|0);A=m,m=0}return a=0,o&&(e[o>>2]=t,e[o+4>>2]=r),E=(l|0)>>>31|(A|a)<<1|(a<<1|l>>>31)&0|m,U=(l<<1|0)&-2|c,D0=E,U|0}function i8(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Op[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0)|0}function t8(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,Rr[t&15](r|0,n|0,s|0,o|0,l|0)}function r8(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=+a,Np[t&3](r|0,n|0,s|0,o|0,l|0,+a)|0}function n8(t,r){t=t|0,r=r|0,Ce[t&255](r|0)}function s8(t,r,n){t=t|0,r=r|0,n=n|0,Ke[t&127](r|0,n|0)}function o8(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,rr[t&63](r|0,n|0,s|0,o|0,l|0,a|0)|0}function l8(t,r){return t=t|0,r=r|0,Se[t&127](r|0)|0}function a8(t,r,n,s,o,l,a,c,m,A,p,T){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0,Vp[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,m|0,A|0,p|0,T|0)|0}function f8(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,ze[t&63](r|0,n|0,s|0)|0}function c8(t,r,n,s,o,l,a,c,m,A,p,T,D,E,U,V){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0,D=D|0,E=E|0,U=U|0,V=V|0,Bp[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,m|0,A|0,p|0,T|0,D|0,E|0,U|0,V|0)}function h8(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Vt[t&15](r|0,n|0,s|0,o|0,l|0,a|0)}function m8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,qp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0)}function d8(t,r,n,s,o,l,a,c,m,A,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,bp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0,m|0,A|0,p|0)}function g8(t,r,n){return t=t|0,r=r|0,n=n|0,Ni[t&63](r|0,n|0)|0}function p8(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,nr[t&31](r|0,n|0,s|0,o|0,l|0)|0}function A8(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,+Gp[t&3](r|0,n|0,s|0)}function S8(t){return t=t|0,zp[t&15]()|0}function v8(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,M1[t&31](r|0,n|0,s|0,o|0)|0}function w8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,Pr[t&15](r|0,n|0,s|0)}function x8(t){t=t|0,On[t&7]()}function C8(t,r,n,s,o,l,a,c,m){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,Ct[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0,m|0)|0}function T8(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,Qp[t&7](r|0,n|0,s|0,o|0,+l)|0}function y8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Lr[t&63](r|0,n|0,s|0,o|0)}function kt(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,z0(0),0}function tr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,z0(1)}function en(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,z0(2),0}function Xe(t){t=t|0,z0(3)}function w1(t,r){t=t|0,r=r|0,z0(4)}function Ii(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,z0(5),0}function Je(t){return t=t|0,z0(6),0}function D8(t){return t=t|0,L1(t|0)|0}function I8(t){return t=t|0,V1(t|0)|0}function k8(t){return t=t|0,Yn(t|0)|0}function tn(t,r,n,s,o,l,a,c,m,A,p){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,z0(7),0}function wi(t,r,n){return t=t|0,r=r|0,n=n|0,z0(8),0}function rn(t,r,n,s,o,l,a,c,m,A,p,T,D,E,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0,T=T|0,D=D|0,E=E|0,U=U|0,z0(9)}function Et(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,z0(10)}function vr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,z0(11)}function wr(t,r,n,s,o,l,a,c,m,A){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,z0(12)}function Ri(t,r){return t=t|0,r=r|0,z0(13),0}function ut(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,z0(14),0}function E8(t,r,n){return t=t|0,r=r|0,n=n|0,z0(15),0}function Lt(){return z0(16),0}function Yt(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,z0(17),0}function F8(t,r,n){t=t|0,r=r|0,n=n|0,z0(18)}function M8(t,r,n){t=t|0,r=r|0,n=n|0,Ne(t|0,r|0,n|0)}function nn(){z0(19)}function _8(){Kn()}function R8(){Wi()}function P8(){O1()}function jt(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,z0(20),0}function xr(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=+o,z0(21),0}function Gi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,z0(22)}function L8(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=y,y=y+32|0,c=A,hi(c,255,0),m=t+152|0,(e[c+4>>2]|0)==(e[m>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){m=e[8900]|0,e[t+4580>>2]=m+(((e[8901]|0)-m|0)>>>1),y=A;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[m>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=A}function U8(t){t=t|0;var r=0,n=0;e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function O8(t){t=t|0;var r=0,n=0;if(e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){l0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),l0(t)}function N8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;if(O=y,y=y+352|0,R=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,D=O+176|0,c=O+168|0,m=O+160|0,A=O+152|0,q=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(E=t+4|0,V=t+32|0,a=e[V>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[n>>0]|0,P0(44,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[s>>0]|0,P0(45,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[o>>0]|0,P0(46,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[R>>0]=d[l>>0]|0,P0(47,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),O=f,f=0,O&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,F|0,49007,21)|0,R=f,f=0;do if(!(R&1)&&(f=0,p=y0(36,t|0,e[V>>2]|0)|0,R=f,f=0,!(R&1))&&(f=0,L0(28,p|0,50997,18)|0,R=f,f=0,!(R&1))){if(s=de(16)|0,f=0,h0(64,D|0,o|0),R=f,f=0,R&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,D|0),R=f,f=0,R&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(D),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,t|0,8,35648),M=f,f=0,M&1||Ne(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[c>>2],e[R+4>>2]=e[c+4>>2],P0(41,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[m>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[m>>2],e[R+4>>2]=e[m+4>>2],P0(42,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[A>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[R>>2]=e[A>>2],e[R+4>>2]=e[A+4>>2],P0(43,t|0,F|0,E|0,R|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,l0(t),r0(M|0)}default:{a=q+56|0,o=q+4|0,e[q>>2]=36160,e[a>>2]=36180,f=0,h0(62,q+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[q+128>>2]=0,e[q+132>>2]=-1,e[q>>2]=36200,e[q+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=q+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[q+52>>2]=16,e[R>>2]=0,e[R+4>>2]=0,e[R+8>>2]=0,f=0,h0(63,o|0,R|0),F=f,f=0,F&1){t=b()|0,a0(R),a0(l),ce(o);break}a0(R),f=0,t=L0(28,q|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,T=y0(36,t|0,e[V>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,T|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,d0(6,s|0,824,96),f=0,n=0),t=b()|0,a0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[q>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function V8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;a=y,y=y+32|0,m=a,hi(m,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[m+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[m+12>>2]|0,n=e[r+16>>2]|0,s=e[m+16>>2]|0,e[t+176>>2]=c|0?c:e[m+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Y8(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,k[t+188+(l*12|0)+8>>1]=0,k[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,m=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=m,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=m,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function B8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),q8(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function q8(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0;K=y,y=y+32|0,J=K+12|0,X=K,c=t+172|0,M=(e[c>>2]|0)+4|0,(e[t+28>>2]|0)==1?m=e[t+20>>2]|0:m=1,r=W(m<<1,M)|0,e[J>>2]=0,s0=J+4|0,e[s0>>2]=0,e[J+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,J|0),t0=f,f=0,t0&1)||(F=6),(F|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[J>>2]=n,e[J+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[J>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!m)F=19;else{if(m>>>0>1073741823&&(f=0,n0(178,X|0),R=f,f=0,R&1)||(F=17),(F|0)==17&&(s=m<<2,f=0,o=u0(67,s|0)|0,R=f,f=0,!(R&1))){e[X>>2]=o,F=o+(m<<2)|0,e[X+8>>2]=F,je(o|0,0,s|0)|0,e[t0>>2]=F,F=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}while(!1);if((F|0)==19){A=t+8|0,r=e[A>>2]|0;e:do if((r|0)>0){if(p=t+4596|0,T=W(m,M)|0,D=T+1|0,E=t+4600|0,U=t+160|0,V=t+168|0,q=t+164|0,O=t+156|0,R=t+88|0,a=t+4592|0,(m|0)>0)l=0;else{for(l=0;;){if(o=e[J>>2]|0,n=o+1|0,e[p>>2]=n,s=o+D|0,e[E>>2]=s,l&1?(e[p>>2]=s,e[E>>2]=n,n=1):n=D,m=e[U>>2]|0,(m|0)<=(l|0)&&(l|0)<((e[V>>2]|0)+m|0)){if(m=e[R>>2]|0,f=0,P0(e[(e[m>>2]|0)+8>>2]|0,m|0,o+(n+((e[O>>2]|0)-T))|0,e[q>>2]|0,M|0),m=f,f=0,m&1)break;r=e[A>>2]|0}if(l=l+1|0,(l|0)>=(r|0)){F=50;break e}}n=b()|0;break}i:for(;;){n=e[J>>2]|0,r=n+1|0,e[p>>2]=r,n=n+D|0,e[E>>2]=n,l&1&&(e[p>>2]=n,e[E>>2]=r,r=n),o=e[X>>2]|0,n=r,s=0;do{if(e[a>>2]=e[o+(s<<2)>>2],F=e[c>>2]|0,d[n+F>>0]=d[n+(F+-1)>>0]|0,d[(e[E>>2]|0)+-1>>0]=d[e[p>>2]>>0]|0,f=0,h0(83,t|0,0),F=f,f=0,F&1){F=38;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[a>>2],n=(e[p>>2]|0)+M|0,e[p>>2]=n,r=e[E>>2]|0,e[E>>2]=r+M,s=s+1|0}while((s|0)<(m|0));if(F=e[U>>2]|0,(F|0)<=(l|0)&&(l|0)<((e[V>>2]|0)+F|0)&&(F=e[R>>2]|0,f=0,P0(e[(e[F>>2]|0)+8>>2]|0,F|0,r+(M+((e[O>>2]|0)-T))|0,e[q>>2]|0,M|0),F=f,f=0,F&1)){F=30;break}if(l=l+1|0,(l|0)>=(e[A>>2]|0)){F=50;break e}}if((F|0)==30){n=b()|0;break}else if((F|0)==38){n=b()|0;break}}else F=50;while(!1);do if((F|0)==50){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),l0(r)),r=e[J>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),l0(r))}r=e[J>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),l0(r),r0(n|0)}function G8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;if(D=t+4596|0,n=e[D>>2]|0,q=t+172|0,r=e[q>>2]|0,!((r|0)<=0))for(E=t+4600|0,U=t+4604|0,V=t+4592|0,c=n,l=N[n+-1>>0]|0,n=N[n>>0]|0,T=0;A=e[E>>2]|0,a=d[A+(T+-1)>>0]|0,p=a&255,o=T+1|0,s=N[c+o>>0]|0,m=e[U>>2]|0,c=n-l|0,l=l-p|0,m=((((d[m+(s-n)>>0]|0)*9|0)+(d[m+c>>0]|0)|0)*9|0)+(d[m+l>>0]|0)|0,A=A+T|0,m?(r=n-p>>31,(r^l|0)<0?r=n:r=p+((r^c|0)<0?0:c)|0,p=z8(t,m,N[A>>0]|0,r,0)|0,d[(e[E>>2]|0)+T>>0]=p):(r=Q8(t,a,A,r-T|0)|0,n=r+T|0,(n|0)!=(e[q>>2]|0)&&(p=H8(t,p,N[(e[D>>2]|0)+n>>0]|0)|0,d[(e[E>>2]|0)+n>>0]=p,p=e[V>>2]|0,e[V>>2]=(p|0)<1?0:p+-1|0,r=r+1|0),o=r+T|0,s=e[D>>2]|0,n=N[s+(o+-1)>>0]|0,s=N[s+o>>0]|0),r=e[q>>2]|0,!((r|0)<=(o|0));)c=e[D>>2]|0,l=n,n=s,T=o}function z8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(U=r>>31,m=(U^r)-U|0,D=t+188+(m*12|0)+10|0,n=k[D>>1]|0,T=t+188+(m*12|0)|0,o=e[T>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,E=t+128|0,o=e[E>>2]|0,(n&o|0)==(n|0)?A=n:A=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Ne(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(m*12|0)+4>>2]<<1)+-1+(k[D>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[T>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(m*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=k[D>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[T>>2]=o,r=s+1|0,k[D>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,D=k[p>>1]|0,k[p>>1]=(D<<16>>16<127&1)+(D&65535),n=(n|0)>0?0:n):(n=k[p>>1]|0,k[p>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+A|0,(o|0)>=(0-r|0)?(n=e[E>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[E>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function Q8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;for(c=t+112|0,m=t+108|0,A=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[m>>2]|0,o=o+-1|0,e[c>>2]=o,e[m>>2]=a<<1,(a|0)>=0){p=8;break}if(a=e[A>>2]|0,T=1<>2],D=s-l|0,D=(T|0)<(D|0)?T:D,l=D+l|0,(D|0)==(T|0)&&(e[A>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(p|0)==8&&((l|0)!=(s|0)?(o=e[A>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(xe(72,35648,z|0)|0,ve(8)),f=0,d0(7,o|0,5,35648),D=f,f=0,D&1?(D=b()|0,ge(o|0),r0(D|0)):Ne(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function H8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(sn(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0)):(n=sn(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0))}function sn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0;if(A=r+9|0,n=N[A>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,m=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,m=8);while(!1);return(m|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[A>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(m=r+10|0,d[m>>0]=(N[m>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[A>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0):(e[r>>2]=n>>1,m=(s&255)>>>1,d[A>>0]=m,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=m,r=r&255,r=r+1|0,r=r&255,d[A>>0]=r,o|0)}function Y8(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;D=y,y=y+32|0,s=D,T=t+136|0;e:do if(e[T>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{T=e[8900]|0,e[t+4604>>2]=T+(((e[8901]|0)-T|0)>>>1),y=D;return}case 10:{T=e[8903]|0,e[t+4604>>2]=T+(((e[8904]|0)-T|0)>>>1),y=D;return}case 12:{T=e[8906]|0,e[t+4604>>2]=T+(((e[8907]|0)-T|0)>>>1),y=D;return}case 16:{T=e[8909]|0,e[t+4604>>2]=T+(((e[8910]|0)-T|0)>>>1),y=D;return}default:break e}while(!1);if(p=1<>2],n=t+4608|0,s=p<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),A=t+4604|0,e[A>>2]=r+p,r=0-p|0,(p|0)<=(r|0)){y=D;return}c=t+184|0,m=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[m>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[T>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[A>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(p|0));y=D}function j8(t){t=t|0,l0(t)}function X8(t){return t=t|0,50767}function K8(t,r,n){t=t|0,r=r|0,n=n|0,xt(t,50754,12)}function W8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0;U=y,y=y+16|0,V=U,e[V>>2]=0,q=V+4|0,e[q>>2]=0,e[V+8>>2]=0,D=V+8|0,f=0,o=u0(67,1)|0,T=f,f=0;e:do if(!(T&1)&&(T=o+1|0,d[o>>0]=n,e[V>>2]=o,e[q>>2]=T,e[D>>2]=T,f=0,h0(84,V|0,r&65535|0),T=f,f=0,!(T&1))&&(f=0,h0(84,V|0,t&65535|0),T=f,f=0,!(T&1))){if(A=s&255,o=e[q>>2]|0,n=e[D>>2]|0,o>>>0>=n>>>0){if(r=e[V>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,V|0),T=f,f=0,T&1){E=52;break}t=e[V>>2]|0,n=e[D>>2]|0,r=t}if(m=r,o=n-m|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[q>>2]|0,c=n-m|0,o?E=12:(o=0,a=0)):(c=e[q>>2]|0,o=2147483647,n=c,c=c-m|0,E=12),(E|0)==12&&(f=0,a=u0(67,o|0)|0,T=f,f=0,T&1)){E=52;break}d[a+c>>0]=A,p=n-m|0,T=a+(c-p)|0,ei(T|0,r|0,p|0)|0,e[V>>2]=T,e[q>>2]=a+(c+1),e[D>>2]=a+o,t&&l0(t)}else d[o>>0]=A,e[q>>2]=(e[q>>2]|0)+1;i:do if((s|0)>0){for(T=0;;){if(T=T+1|0,p=T&255,o=e[q>>2]|0,r=e[D>>2]|0,o>>>0>=r>>>0){if(t=e[V>>2]|0,n=t,a=o-n+1|0,(a|0)<0){if(f=0,n0(178,V|0),A=f,f=0,A&1)break;t=e[V>>2]|0,n=t,r=e[D>>2]|0}if(A=t,o=r-A|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,r=e[q>>2]|0,c=r-A|0,o?E=25:(m=0,a=0)):(c=e[q>>2]|0,o=2147483647,r=c,c=c-A|0,E=25),(E|0)==25){if(E=0,f=0,a=u0(67,o|0)|0,m=f,f=0,m&1)break;m=o}d[a+c>>0]=p,o=a+(c+1)|0,A=r-A|0,p=a+(c-A)|0,ei(p|0,t|0,A|0)|0,e[V>>2]=p,e[q>>2]=o,e[D>>2]=a+m,n&&(l0(n),o=e[q>>2]|0)}else d[o>>0]=p,o=(e[q>>2]|0)+1|0,e[q>>2]=o;if(n=e[D>>2]|0,o>>>0>=n>>>0){if(r=e[V>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,V|0),p=f,f=0,p&1)break;t=e[V>>2]|0,n=e[D>>2]|0,r=t}if(A=r,o=n-A|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,a=e[q>>2]|0,c=a-A|0,o?E=36:(m=0,n=0)):(c=e[q>>2]|0,o=2147483647,a=c,c=c-A|0,E=36),(E|0)==36){if(E=0,f=0,n=u0(67,o|0)|0,p=f,f=0,p&1)break;m=o}d[n+c>>0]=17,o=n+(c+1)|0,A=a-A|0,p=n+(c-A)|0,ei(p|0,r|0,A|0)|0,e[V>>2]=p,e[q>>2]=o,e[D>>2]=n+m,t&&(l0(t),o=e[q>>2]|0)}else d[o>>0]=17,o=(e[q>>2]|0)+1|0,e[q>>2]=o;if(n=e[D>>2]|0,o>>>0>=n>>>0){if(r=e[V>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,V|0),p=f,f=0,p&1)break;t=e[V>>2]|0,n=e[D>>2]|0,r=t}if(m=r,o=n-m|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[q>>2]|0,c=n-m|0,o?E=48:(o=0,a=0)):(c=e[q>>2]|0,o=2147483647,n=c,c=c-m|0,E=48),(E|0)==48&&(E=0,f=0,a=u0(67,o|0)|0,p=f,f=0,p&1))break;d[a+c>>0]=0,A=n-m|0,p=a+(c-A)|0,ei(p|0,r|0,A|0)|0,e[V>>2]=p,e[q>>2]=a+(c+1),e[D>>2]=a+o,t&&l0(t)}else d[o>>0]=0,e[q>>2]=(e[q>>2]|0)+1;if((T|0)>=(s|0))break i}l=b()|0;break e}while(!1);if(f=0,c=u0(67,20)|0,s=f,f=0,s&1)E=52;else{e[c>>2]=36800,d[c+4>>0]=-9,t=c+8|0,e[t>>2]=0,a=c+12|0,e[a>>2]=0,n=c+16|0,e[n>>2]=0,o=e[q>>2]|0,s=e[V>>2]|0,r=o-s|0;do if((o|0)!=(s|0)){if((r|0)<0&&(f=0,n0(178,t|0),s=f,f=0,s&1)||(E=62),(E|0)==62&&(f=0,l=u0(67,r|0)|0,s=f,f=0,!(s&1))){if(e[a>>2]=l,e[t>>2]=l,e[n>>2]=l+r,o=e[V>>2]|0,n=e[q>>2]|0,(o|0)==(n|0))break;do d[l>>0]=d[o>>0]|0,l=(e[a>>2]|0)+1|0,e[a>>2]=l,o=o+1|0;while((o|0)!=(n|0));o=e[V>>2]|0;break}l=b()|0,o=e[t>>2]|0,o&&((e[a>>2]|0)!=(o|0)&&(e[a>>2]=o),l0(o)),l0(c);break e}while(!1);return o?((e[q>>2]|0)!=(o|0)&&(e[q>>2]=o),l0(o),y=U,c|0):(y=U,c|0)}}else E=52;while(!1);return(E|0)==52&&(l=b()|0),o=e[V>>2]|0,o||r0(l|0),(e[q>>2]|0)!=(o|0)&&(e[q>>2]=o),l0(o),r0(l|0),0}function Z8(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0;q=y,y=y+32|0,E=q+28|0,R=q+16|0,V=q+4|0,U=q,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0,T=G0(5)|0,e[R>>2]=T,D=R+8|0,e[D>>2]=T+5,d[T>>0]=74,d[T+1>>0]=70,d[T+2>>0]=73,d[T+3>>0]=70,d[T+4>>0]=0,e[F>>2]=T+5,f=0,h0(84,R|0,e[t>>2]&65535|0),T=f,f=0;e:do if(T&1)O=43;else{if(A=e[t+4>>2]&255,r=e[F>>2]|0,s=e[D>>2]|0,r>>>0>=s>>>0){if(o=e[R>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,R|0),T=f,f=0,T&1){O=43;break}l=e[R>>2]|0,s=e[D>>2]|0,o=l}if(m=o,r=s-m|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-m|0,r?O=10:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-m|0,O=10),(O|0)==10&&(f=0,a=u0(67,r|0)|0,T=f,f=0,T&1)){O=43;break}d[a+c>>0]=A,p=s-m|0,T=a+(c-p)|0,ei(T|0,o|0,p|0)|0,e[R>>2]=T,e[F>>2]=a+(c+1),e[D>>2]=a+r,l&&l0(l)}else d[r>>0]=A,e[F>>2]=(e[F>>2]|0)+1;if(f=0,h0(84,R|0,e[t+8>>2]&65535|0),T=f,f=0,!(T&1)&&(f=0,h0(84,R|0,e[t+12>>2]&65535|0),T=f,f=0,!(T&1))){if(T=t+16|0,p=e[T>>2]&255,r=e[F>>2]|0,o=e[D>>2]|0,r>>>0>=o>>>0){if(l=e[R>>2]|0,s=l,a=r-s+1|0,(a|0)<0){if(f=0,n0(178,R|0),A=f,f=0,A&1){O=43;break}l=e[R>>2]|0,s=l,o=e[D>>2]|0}if(A=l,r=o-A|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,a=e[F>>2]|0,c=a-A|0,r?O=23:(m=0,o=0)):(c=e[F>>2]|0,r=2147483647,a=c,c=c-A|0,O=23),(O|0)==23)if(f=0,o=u0(67,r|0)|0,m=f,f=0,m&1){O=43;break}else m=r;d[o+c>>0]=p,r=o+(c+1)|0,A=a-A|0,p=o+(c-A)|0,ei(p|0,l|0,A|0)|0,e[R>>2]=p,e[F>>2]=r,e[D>>2]=o+m,s&&(l0(s),r=e[F>>2]|0)}else d[r>>0]=p,r=(e[F>>2]|0)+1|0,e[F>>2]=r;if(p=t+20|0,A=e[p>>2]&255,s=e[D>>2]|0,r>>>0>=s>>>0){if(o=e[R>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,R|0),m=f,f=0,m&1){O=43;break}l=e[R>>2]|0,s=e[D>>2]|0,o=l}if(m=o,r=s-m|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-m|0,r?O=34:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-m|0,O=34),(O|0)==34&&(f=0,a=u0(67,r|0)|0,M=f,f=0,M&1)){O=43;break}d[a+c>>0]=A,A=s-m|0,M=a+(c-A)|0,ei(M|0,o|0,A|0)|0,e[R>>2]=M,e[F>>2]=a+(c+1),e[D>>2]=a+r,l&&l0(l)}else d[r>>0]=A,e[F>>2]=(e[F>>2]|0)+1;r=e[T>>2]|0;do if((r|0)>0){if(!(e[t+24>>2]|0))if(e[U>>2]=e[F>>2],M=0+(W(r*3|0,e[p>>2]|0)|0)|0,f=0,e[E>>2]=e[U>>2],E0(15,R|0,E|0,0,M|0)|0,M=f,f=0,M&1){O=43;break e}else break;if(s=de(16)|0,f=0,d0(5,V|0,50792,57),M=f,f=0,M&1)r=b()|0;else if(f=0,r=p0(1)|0,M=f,f=0,!(M&1)&&(f=0,P0(36,s|0,1,r|0,V|0),M=f,f=0,!(M&1))?(f=0,d0(6,s|0,824,96),f=0,n=0):n=1,r=b()|0,a0(V),!n){n=r;break e}ge(s|0),n=r;break e}while(!1);if(f=0,c=u0(67,20)|0,M=f,f=0,M&1)O=43;else{e[c>>2]=36800,d[c+4>>0]=-32,l=c+8|0,e[l>>2]=0,a=c+12|0,e[a>>2]=0,s=c+16|0,e[s>>2]=0,r=e[F>>2]|0,M=e[R>>2]|0,o=r-M|0;do if((r|0)!=(M|0)){if((o|0)<0&&(f=0,n0(178,l|0),M=f,f=0,M&1)||(O=53),(O|0)==53&&(f=0,n=u0(67,o|0)|0,M=f,f=0,!(M&1))){if(e[a>>2]=n,e[l>>2]=n,e[s>>2]=n+o,r=e[R>>2]|0,s=e[F>>2]|0,(r|0)==(s|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(s|0));r=e[R>>2]|0;break}r=b()|0,n=e[l>>2]|0,n&&((e[a>>2]|0)!=(n|0)&&(e[a>>2]=n),l0(n)),l0(c),O=44;break e}while(!1);return r?((e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),y=q,c|0):(y=q,c|0)}}else O=43}while(!1);return(O|0)==43&&(r=b()|0,O=44),(O|0)==44&&(n=r),r=e[R>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),l0(r),r0(n|0),0}function on(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0;c=y,y=y+16|0,A=c,e[A>>2]=0,p=A+4|0,e[p>>2]=0,e[A+8>>2]=0,f=0,r=u0(67,1)|0,a=f,f=0;e:do if(!(a&1)&&(a=r+1|0,d[r>>0]=1,e[A>>2]=r,e[p>>2]=a,e[A+8>>2]=a,f=0,h0(84,A|0,e[t>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,A|0,e[t+4>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,A|0,e[t+8>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,A|0,e[t+12>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,A|0,e[t+16>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,m=u0(67,20)|0,a=f,f=0,!(a&1))){e[m>>2]=36800,d[m+4>>0]=-8,o=m+8|0,e[o>>2]=0,a=m+12|0,e[a>>2]=0,t=m+16|0,e[t>>2]=0,r=e[p>>2]|0,T=e[A>>2]|0,s=r-T|0;do if((r|0)!=(T|0)){if((s|0)<0&&(f=0,n0(178,o|0),T=f,f=0,T&1)||(l=11),(l|0)==11&&(f=0,n=u0(67,s|0)|0,T=f,f=0,!(T&1))){if(e[a>>2]=n,e[o>>2]=n,e[t>>2]=n+s,r=e[A>>2]|0,t=e[p>>2]|0,(r|0)==(t|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(t|0));r=e[A>>2]|0;break}n=b()|0,r=e[o>>2]|0,r&&((e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),l0(r)),l0(m);break e}while(!1);return r?((e[p>>2]|0)!=(r|0)&&(e[p>>2]=r),l0(r),y=c,m|0):(y=c,m|0)}else l=25;while(!1);return(l|0)==25&&(n=b()|0),r=e[A>>2]|0,r||r0(n|0),(e[p>>2]|0)!=(r|0)&&(e[p>>2]=r),l0(r),r0(n|0),0}function J8(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return l=G0(5)|0,d[l>>0]=109,d[l+1>>0]=114,d[l+2>>0]=102,d[l+3>>0]=120,d[l+4>>0]=t,f=0,o=u0(67,20)|0,s=f,f=0,s&1&&(o=b()|0,l0(l),r0(o|0)),e[o>>2]=36800,d[o+4>>0]=-24,t=o+8|0,e[t>>2]=0,r=o+12|0,e[r>>2]=0,n=o+16|0,e[n>>2]=0,f=0,s=u0(67,5)|0,a=f,f=0,a&1?(a=b()|0,l0(o),l0(l),r0(a|0),0):(e[r>>2]=s,e[t>>2]=s,e[n>>2]=s+5,d[s>>0]=109,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=l+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,d[a>>0]=d[s+1>>0]|0,e[r>>2]=(e[r>>2]|0)+1,l0(l),o|0)}function $8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;O=y,y=y+16|0,R=O,e[R>>2]=0,F=R+4|0,e[F>>2]=0,e[R+8>>2]=0,V=R+8|0,f=0,o=u0(67,1)|0,U=f,f=0;e:do if(U&1)q=29;else{if(c=o+1|0,U=c,d[o>>0]=r,e[R>>2]=o,e[F>>2]=U,e[V>>2]=U,(r|0)>0){a=c,U=0;do{if(E=U+t&255,a>>>0>=c>>>0){if(o=e[R>>2]|0,m=o,a=a-m+1|0,(a|0)<0){if(f=0,n0(178,R|0),D=f,f=0,D&1){q=28;break}m=e[R>>2]|0,c=e[V>>2]|0,D=m}else D=o;if(T=D,o=c-T|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,c=e[F>>2]|0,A=c-T|0,o?q=13:(p=0,a=0)):(A=e[F>>2]|0,o=2147483647,c=A,A=A-T|0,q=13),(q|0)==13)if(q=0,f=0,a=u0(67,o|0)|0,p=f,f=0,p&1){q=28;break}else p=o;d[a+A>>0]=E,o=a+(A+1)|0,T=c-T|0,E=a+(A-T)|0,ei(E|0,D|0,T|0)|0,e[R>>2]=E,e[F>>2]=o,e[V>>2]=a+p,m&&(l0(m),o=e[F>>2]|0)}else d[a>>0]=E,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(c=e[V>>2]|0,o>>>0>=c>>>0){if(m=e[R>>2]|0,a=m,A=o-a+1|0,(A|0)<0){if(f=0,n0(178,R|0),E=f,f=0,E&1){q=28;break}m=e[R>>2]|0,a=m,c=e[V>>2]|0}if(T=m,o=c-T|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?A:o,A=e[F>>2]|0,c=A-T|0,o?q=24:(o=0,p=0)):(c=e[F>>2]|0,o=2147483647,A=c,c=c-T|0,q=24),(q|0)==24&&(q=0,f=0,p=u0(67,o|0)|0,E=f,f=0,E&1)){q=28;break}d[p+c>>0]=0,D=A-T|0,E=p+(c-D)|0,ei(E|0,m|0,D|0)|0,e[R>>2]=E,e[F>>2]=p+(c+1),e[V>>2]=p+o,a&&l0(a)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;U=U+1|0,a=e[F>>2]|0,c=e[V>>2]|0}while((U|0)<(r|0));if((q|0)==28){l=b()|0;break}o=n&255,a>>>0>>0?(d[a>>0]=o,a=(e[F>>2]|0)+1|0,e[F>>2]=a):q=37}else a=c,o=n&255,q=37;if((q|0)==37){if(m=e[R>>2]|0,A=m,p=a-A+1|0,(p|0)<0){if(f=0,n0(178,R|0),n=f,f=0,n&1){q=29;break}A=e[R>>2]|0,c=e[V>>2]|0,m=A}if(E=m,a=c-E|0,a>>>0<1073741823?(a=a<<1,a=a>>>0

>>0?p:a,p=e[F>>2]|0,T=p-E|0,a?q=43:(D=0,c=0)):(T=e[F>>2]|0,a=2147483647,p=T,T=T-E|0,q=43),(q|0)==43)if(f=0,c=u0(67,a|0)|0,n=f,f=0,n&1){q=29;break}else D=a;d[c+T>>0]=o,a=c+(T+1)|0,t=p-E|0,n=c+(T-t)|0,ei(n|0,m|0,t|0)|0,e[R>>2]=n,e[F>>2]=a,e[V>>2]=c+D,A&&(l0(A),a=e[F>>2]|0)}if(E=s&255,o=e[V>>2]|0,a>>>0>=o>>>0){if(c=e[R>>2]|0,m=c,a=a-m+1|0,(a|0)<0){if(f=0,n0(178,R|0),s=f,f=0,s&1){q=29;break}m=e[R>>2]|0,o=e[V>>2]|0,c=m}if(D=c,o=o-D|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,A=e[F>>2]|0,p=A-D|0,o?q=54:(T=0,a=0)):(p=e[F>>2]|0,o=2147483647,A=p,p=p-D|0,q=54),(q|0)==54)if(f=0,a=u0(67,o|0)|0,s=f,f=0,s&1){q=29;break}else T=o;d[a+p>>0]=E,o=a+(p+1)|0,n=A-D|0,s=a+(p-n)|0,ei(s|0,c|0,n|0)|0,e[R>>2]=s,e[F>>2]=o,e[V>>2]=a+T,m&&(l0(m),o=e[F>>2]|0)}else d[a>>0]=E,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(a=e[V>>2]|0,o>>>0>=a>>>0){if(c=e[R>>2]|0,m=c,A=o-m+1|0,(A|0)<0){if(f=0,n0(178,R|0),s=f,f=0,s&1){q=29;break}m=e[R>>2]|0,a=e[V>>2]|0,c=m}if(T=c,o=a-T|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?A:o,a=e[F>>2]|0,p=a-T|0,o?q=65:(o=0,A=0)):(p=e[F>>2]|0,o=2147483647,a=p,p=p-T|0,q=65),(q|0)==65&&(f=0,A=u0(67,o|0)|0,s=f,f=0,s&1)){q=29;break}d[A+p>>0]=0,n=a-T|0,s=A+(p-n)|0,ei(s|0,c|0,n|0)|0,e[R>>2]=s,e[F>>2]=A+(p+1),e[V>>2]=A+o,m&&l0(m)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;if(f=0,p=u0(67,20)|0,V=f,f=0,V&1)q=29;else{e[p>>2]=36800,d[p+4>>0]=-38,m=p+8|0,e[m>>2]=0,A=p+12|0,e[A>>2]=0,a=p+16|0,e[a>>2]=0,o=e[F>>2]|0,V=e[R>>2]|0,c=o-V|0;do if((o|0)!=(V|0)){if((c|0)<0&&(f=0,n0(178,m|0),V=f,f=0,V&1)||(q=72),(q|0)==72&&(f=0,l=u0(67,c|0)|0,V=f,f=0,!(V&1))){if(e[A>>2]=l,e[m>>2]=l,e[a>>2]=l+c,o=e[R>>2]|0,a=e[F>>2]|0,(o|0)==(a|0))break;do d[l>>0]=d[o>>0]|0,l=(e[A>>2]|0)+1|0,e[A>>2]=l,o=o+1|0;while((o|0)!=(a|0));o=e[R>>2]|0;break}l=b()|0,o=e[m>>2]|0,o&&((e[A>>2]|0)!=(o|0)&&(e[A>>2]=o),l0(o)),l0(p);break e}while(!1);return o?((e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),l0(o),y=O,p|0):(y=O,p|0)}}while(!1);return(q|0)==29&&(l=b()|0),o=e[R>>2]|0,o||r0(l|0),(e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),l0(o),r0(l|0),0}function eg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;if(T=(r&65535)>>>8&255,D=t+4|0,n=e[D>>2]|0,E=t+8|0,s=e[E>>2]|0,n>>>0>=s>>>0?(o=e[t>>2]|0,l=o,a=n-l+1|0,(a|0)<0&&(ct(t),l=e[t>>2]|0,s=e[E>>2]|0,o=l),p=o,n=s-p|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?a:n,a=e[D>>2]|0,s=a-p|0,n?U=8:(A=0,m=0,c=s,n=a)):(s=e[D>>2]|0,n=2147483647,a=s,s=s-p|0,U=8),(U|0)==8&&(A=n,m=G0(n)|0,c=s,n=a),d[m+c>>0]=T,s=m+(c+1)|0,p=n-p|0,T=m+(c-p)|0,ei(T|0,o|0,p|0)|0,e[t>>2]=T,e[D>>2]=s,e[E>>2]=m+A,l&&(l0(l),s=e[D>>2]|0)):(d[n>>0]=T,s=(e[D>>2]|0)+1|0,e[D>>2]=s),p=r&255,n=e[E>>2]|0,s>>>0>>0){d[s>>0]=p,e[D>>2]=(e[D>>2]|0)+1;return}o=e[t>>2]|0,l=o,s=s-l+1|0,(s|0)<0&&(ct(t),l=e[t>>2]|0,n=e[E>>2]|0,o=l),A=o,n=n-A|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?s:n,a=e[D>>2]|0,s=a-A|0,n?U=18:(m=0,c=0,n=a)):(s=e[D>>2]|0,n=2147483647,a=s,s=s-A|0,U=18),(U|0)==18&&(m=n,c=G0(n)|0,n=a),d[c+s>>0]=p,r=n-A|0,U=c+(s-r)|0,ei(U|0,o|0,r|0)|0,e[t>>2]=U,e[D>>2]=c+(s+1),e[E>>2]=c+m,l&&l0(l)}function ig(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(o=e[t>>2]|0,U=e[r>>2]|0,E=U,m=o,T=n,A=s-T|0,(A|0)<=0)return V=U,V|0;if(D=t+8|0,r=e[D>>2]|0,V=t+4|0,p=e[V>>2]|0,l=p,(A|0)<=(r-l|0)){if(c=l-E|0,(A|0)>(c|0)){if(a=n+c|0,(a|0)==(s|0))r=p;else{l=a,r=p;do d[r>>0]=d[l>>0]|0,r=(e[V>>2]|0)+1|0,e[V>>2]=r,l=l+1|0;while((l|0)!=(s|0))}if((c|0)>0)c=r;else return V=U,V|0}else c=p,a=s;if(o=c-(o+(A-m+E))|0,r=U+o|0,r>>>0

>>0){l=c;do d[l>>0]=d[r>>0]|0,r=r+1|0,l=(e[V>>2]|0)+1|0,e[V>>2]=l;while((r|0)!=(p|0))}return pr(c+(0-o)|0,U|0,o|0)|0,pr(U|0,n|0,a-T|0)|0,V=U,V|0}if(l=l-m+A|0,(l|0)<0&&(ct(t),r=e[D>>2]|0,o=e[t>>2]|0),a=o,r=r-a|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?l:r,l=E-a|0,r?c=15:(a=0,A=0)):(r=2147483647,l=E-a|0,c=15),(c|0)==15&&(a=r,A=G0(r)|0),m=A+l|0,r=m,c=A+a|0,(n|0)!=(s|0)){o=n,a=m;do d[a>>0]=d[o>>0]|0,a=r+1|0,r=a,o=o+1|0;while((o|0)!=(s|0));o=e[t>>2]|0}return n=E-o|0,s=A+(l-n)|0,ei(s|0,o|0,n|0)|0,E=(e[V>>2]|0)-E|0,n=r,ei(n|0,U|0,E|0)|0,r=e[t>>2]|0,e[t>>2]=s,e[V>>2]=n+E,e[D>>2]=c,r?(l0(r),V=m,V|0):(V=m,V|0)}function tg(t){t=t|0;var r=0;e[t>>2]=36800,r=e[t+8>>2]|0,r&&(t=t+12|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),l0(r))}function rg(t){t=t|0;var r=0,n=0;if(e[t>>2]=36800,r=e[t+8>>2]|0,!r){l0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),l0(r),l0(t)}function ng(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(ot(r,-1),ot(r,d[t+4>>0]|0),o=t+12|0,s=t+8|0,t=(e[o>>2]|0)-(e[s>>2]|0)+2|0,ot(r,(t&65535)>>>8&255),ot(r,t&255),t=e[s>>2]|0,(e[o>>2]|0)!=(t|0)){n=0;do ot(r,d[t+n>>0]|0),n=n+1|0,t=e[s>>2]|0;while(n>>>0<((e[o>>2]|0)-t|0)>>>0)}}function ot(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(o=e[t+4>>2]|0,o)if(n=o+24|0,s=e[n>>2]|0,(s|0)==(e[o+28>>2]|0)){Ni[e[(e[o>>2]|0)+52>>2]&63](o,r&255)|0;return}else{e[n>>2]=s+1,d[s>>0]=r;return}if(n=t+16|0,s=e[n>>2]|0,s>>>0<(e[t+12>>2]|0)>>>0){e[n>>2]=s+1,d[(e[t+8>>2]|0)+s>>0]=r;return}n=de(16)|0,f=0,s=p0(1)|0,r=f,f=0,r&1&&(r=b()|0,ge(n|0),r0(r|0)),f=0,d0(7,n|0,4,s|0),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Ne(n|0,824,96)}function hi(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,o=(r|0)<4095?(r+128|0)/256|0:16,l=(n*3|0)+2+o|0,s=n+1|0,l=(l|0)<(s|0)|(l|0)>(r|0)?s:l,e[t+4>>2]=l,s=(o<<2|3)+(n*5|0)|0,s=(s|0)>(r|0)|(s|0)<(l|0)?l:s,e[t+8>>2]=s,n=(n*7|0)+4+(o*17|0)|0,e[t+12>>2]=(n|0)>(r|0)|(n|0)<(s|0)?s:n,e[t>>2]=r,e[t+16>>2]=64}function sg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;A=y,y=y+128|0,c=A+100|0,s=A+16|0,n=A+112|0,m=A+4|0,p=A,o=s,l=t+20|0,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));e[s+16>>2]=e[t+4>>2],l=As(n,s,t+56|0)|0,n=e[(e[l>>2]|0)+16>>2]|0,t=t+8|0,f=0,e[c>>2]=e[t>>2],e[c+4>>2]=e[t+4>>2],e[c+8>>2]=e[t+8>>2],n=y0(n|0,l|0,c|0)|0,t=f,f=0;do if(t&1)n=b()|0;else{if(o=r+4|0,e[m>>2]=e[o>>2],e[m+4>>2]=e[o+4>>2],e[m+8>>2]=e[o+8>>2],o=r+16|0,t=e[o>>2]|0,c=m+8|0,e[c>>2]=(e[c>>2]|0)-t,c=m+4|0,e[c>>2]=(e[c>>2]|0)+t,c=e[(e[l>>2]|0)+12>>2]|0,e[p>>2]=n,f=0,n=E0(c|0,l|0,p|0,m|0,(d[r>>0]|0?(e[r+8>>2]|0)+t|0:0)|0)|0,m=f,f=0,m&1){if(n=b()|0,s=e[p>>2]|0,e[p>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}if(s=e[p>>2]|0,e[p>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),e[r+4>>2]|0||(e[o>>2]=(e[o>>2]|0)+n),!l){y=A;return}Ce[e[(e[l>>2]|0)+4>>2]&255](l),y=A;return}while(!1);l||r0(n|0),Ce[e[(e[l>>2]|0)+4>>2]&255](l),r0(n|0)}function og(t,r){t=t|0,r=r|0,e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2],d[t+12>>0]=0,r=t+16|0,t=r+100|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0))}function lg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0;O=y,y=y+32|0,q=O+4|0,D=O+16|0,R=O,an(t),E=t+16|0,o=e[t+24>>2]|0;e:do if((o+-2|0)>>>0<=14)if(U=t+40|0,n=e[U>>2]|0,n>>>0>2)n=5;else{switch(V=t+32|0,l=e[V>>2]|0,l|0){case 0:{n=1;break e}case 4:{if((n|0)==2){n=2;break e}break}case 3:break;default:if(n){n=2;break e}}if(T=t+100|0,n=t+108|0,s=e[n>>2]|0,(s|0)<1?(s=e[E>>2]|0,e[n>>2]=s,n=e[t+20>>2]|0,e[t+112>>2]=n):n=e[t+112>>2]|0,m=Ht(n|0,((n|0)<0)<<31>>31|0,s|0,((s|0)<0)<<31>>31|0)|0,c=(o+7|0)/8|0,c=Ht(m|0,D0|0,c|0,((c|0)<0)<<31>>31|0)|0,m=r+4|0,n=e[m>>2]|0,a=r+8|0,n|0&&(A=e[a>>2]|0,p=Ht(l|0,((l|0)<0)<<31>>31|0,c|0,D0|0)|0,o=D0,0<(o|0)|(o|0)==0&A>>>0

>>0)&&(n=de(16)|0,f=0,s=p0(1)|0,R=f,f=0,!(R&1)&&(f=0,d0(7,n|0,3,s|0),R=f,f=0,!(R&1))&&Ne(n|0,824,96),R=b()|0,ge(n|0),r0(R|0)),A=t+52|0,p=t+12|0,(l|0)>0)l=0;else{y=O;return}for(;;){if(fn(t,(l|0)==0),s=gs(D,E,A)|0,o=e[(e[s>>2]|0)+8>>2]|0,f=0,e[q>>2]=e[r>>2],e[q+4>>2]=e[r+4>>2],e[q+8>>2]=e[r+8>>2],o=y0(o|0,s|0,q|0)|0,F=f,f=0,F&1){o=32;break}if(F=e[(e[s>>2]|0)+16>>2]|0,e[R>>2]=o,f=0,I0(F|0,s|0,R|0,T|0,t|0,(d[p>>0]|0)!=0|0),F=f,f=0,F&1){o=30;break}if(o=e[R>>2]|0,e[R>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o),n?(n=n+c|0,e[m>>2]=n,e[a>>2]=(e[a>>2]|0)-c):n=0,o=(e[U>>2]|0)==0,l=(o&1)+l|0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),!o){o=34;break}if((l|0)>=(e[V>>2]|0)){o=34;break}}if((o|0)==30)n=b()|0,o=e[R>>2]|0,e[R>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o);else if((o|0)==32)n=b()|0,s||(F=n,r0(F|0));else if((o|0)==34){y=O;return}Ce[e[(e[s>>2]|0)+4>>2]&255](s),F=n,r0(F|0)}else n=2;while(!1);s=de(16)|0,f=0,o=p0(1)|0,F=f,f=0,!(F&1)&&(f=0,d0(7,s|0,n|0,o|0),F=f,f=0,!(F&1))&&Ne(s|0,824,96),F=b()|0,ge(s|0),r0(F|0)}function an(t){t=t|0;var r=0,n=0,s=0,o=0;if((x1(t)|0)<<24>>24!=-40&&(r=de(16)|0,f=0,n=p0(1)|0,o=f,f=0,!(o&1)&&(f=0,d0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Ne(r|0,824,96),o=b()|0,ge(r|0),r0(o|0)),r=x1(t)|0,r<<24>>24!=-38){for(;s=((ui(t)|0)&255)<<8,s=s|(ui(t)|0)&255,r=fg(t,r)|0,n=-2-r+s|0,!((n|0)<0);){if((n|0)>0){r=s+-2-r|0,n=0;do ui(t)|0,n=n+1|0;while((n|0)!=(r|0))}if(r=x1(t)|0,r<<24>>24==-38){o=8;break}}(o|0)!=8&&(r=de(16)|0,f=0,n=p0(1)|0,o=f,f=0,!(o&1)&&(f=0,d0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Ne(r|0,824,96),o=b()|0,ge(r|0),r0(o|0))}}function fn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;r||((ui(t)|0)<<24>>24!=-1&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,d0(7,r|0,12,n|0),t=f,f=0,!(t&1))&&Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24!=-38&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,d0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))),ui(t)|0,ui(t)|0,n=ui(t)|0,s=n&255;do if(n<<24>>24==1)ui(t)|0,n=0,o=20;else{if((s|0)==(e[t+32>>2]|0))if(r=ui(t)|0,n<<24>>24){n=0,o=20;break}else break;r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,d0(7,r|0,2,n|0),t=f,f=0,!(t&1))&&Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)}while(!1);if((o|0)==20)for(;ui(t)|0,n=n+1|0,r=ui(t)|0,(n|0)!=(s|0);)o=20;e[t+36>>2]=r&255,o=ui(t)|0,n=t+40|0,e[n>>2]=o&255,(o&255)>=3&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,d0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,d0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Ne(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),s=t+28|0,!(e[s>>2]|0)&&(r=e[t+108>>2]|0,r||(r=e[t+16>>2]|0),e[n>>2]|0?n=e[t+32>>2]|0:n=1,o=W(n,r)|0,t=W(o,((e[t+24>>2]|0)+7|0)/8|0)|0,e[s>>2]=t)}function ag(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;if(!((n|0)<=0)){T=r+4|0,D=r+8|0,U=0;do E=ui(t)|0,s=e[T>>2]|0,o=e[D>>2]|0,s>>>0>=o>>>0?(l=e[r>>2]|0,a=l,c=s-a+1|0,(c|0)<0&&(ct(r),a=e[r>>2]|0,o=e[D>>2]|0,l=a),p=l,s=o-p|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?c:s,c=e[T>>2]|0,o=c-p|0,s?V=10:(A=0,m=0,s=c)):(o=e[T>>2]|0,s=2147483647,c=o,o=o-p|0,V=10),(V|0)==10&&(V=0,A=s,m=G0(s)|0,s=c),d[m+o>>0]=E,p=s-p|0,E=m+(o-p)|0,ei(E|0,l|0,p|0)|0,e[r>>2]=E,e[T>>2]=m+(o+1),e[D>>2]=m+A,a&&l0(a)):(d[s>>0]=E,e[T>>2]=(e[T>>2]|0)+1),U=U+1|0;while((U|0)!=(n|0))}}function ui(t){t=t|0;var r=0,n=0,s=0,o=0;return n=e[t>>2]|0,n?(t=n+12|0,r=e[t>>2]|0,(r|0)==(e[n+16>>2]|0)?t=Se[e[(e[n>>2]|0)+40>>2]&127](n)|0:(e[t>>2]=r+1,t=N[r>>0]|0),o=t&255,o|0):(s=t+8|0,o=e[s>>2]|0,o?(t=t+4|0,r=e[t>>2]|0,n=d[r>>0]|0,r?(e[t>>2]=r+1,e[s>>2]=o+-1,o=n,o|0):(o=n,o|0)):(t=de(16)|0,f=0,r=p0(1)|0,o=f,f=0,o&1&&(o=b()|0,ge(t|0),r0(o|0)),f=0,d0(7,t|0,4,r|0),o=f,f=0,o&1?(o=b()|0,ge(t|0),r0(o|0)):Ne(t|0,824,96),0))}function x1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,m=0;if(n=y,y=y+176|0,r=n+152|0,m=n+16|0,a=n,c=ui(t)|0,s=c&255,c<<24>>24==-1){do r=ui(t)|0;while(r<<24>>24==-1);return y=n,r|0}c=m+56|0,l=m+4|0,e[m>>2]=36160,e[c>>2]=36180,f=0,h0(62,m+56|0,l|0),o=f,f=0,o&1&&(m=b()|0,H0(c),r0(m|0)),e[m+128>>2]=0,e[m+132>>2]=-1,e[m>>2]=36200,e[m+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)r=b()|0;else{if(e[l>>2]=36236,o=m+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[m+52>>2]=16,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,f=0,h0(63,l|0,r|0),n=f,f=0,n&1){m=b()|0,a0(r),a0(o),ce(l),r=m;break}a0(r),e[m+((e[(e[m>>2]|0)+-12>>2]|0)+76)>>2]=48,f=0,r=L0(28,m|0,50907,62)|0,n=f,f=0,!(n&1)&&(n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]&-75|8,n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]|16384,e[r+((e[(e[r>>2]|0)+-12>>2]|0)+12)>>2]=2,f=0,y0(38,r|0,s|0)|0,s=f,f=0,!(s&1))&&(n=de(16)|0,f=0,h0(64,a|0,l|0),s=f,f=0,s&1?r=b()|0:(f=0,r=p0(1)|0,s=f,f=0,!(s&1)&&(f=0,P0(36,n|0,12,r|0,a|0),s=f,f=0,!(s&1))?(f=0,d0(6,n|0,824,96),f=0,t=0):t=1,r=b()|0,a0(a),t||(a=r,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0))),ge(n|0),a=r,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[m>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,a0(o),ce(l),H0(c),r0(a|0)}while(!1);return m=r,H0(c),r0(m|0),0}function fg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;switch(n=y,y=y+320|0,c=n+300|0,p=n+152|0,m=n+288|0,T=n+16|0,A=n,r<<24>>24){case-9:return D=(ui(t)|0)&255,e[t+24>>2]=D,D=((ui(t)|0)&255)<<8|(ui(t)|0)&255,T=((ui(t)|0)&255)<<8|(ui(t)|0)&255,e[t+16>>2]=T,e[t+20>>2]=D,D=(ui(t)|0)&255,e[t+32>>2]=D,D=6,y=n,D|0;case-8:return D=ug(t)|0,y=n,D|0;case-24:return D=cg(t)|0,y=n,D|0;case-53:case-54:case-55:case-57:case-58:case-59:case-61:case-62:case-63:case-64:{a=p+56|0,o=p+4|0,e[p>>2]=36160,e[a>>2]=36180,f=0,h0(62,p+56|0,o|0),T=f,f=0,T&1&&(D=b()|0,H0(a),r0(D|0)),e[p+128>>2]=0,e[p+132>>2]=-1,e[p>>2]=36200,e[p+56>>2]=36220,f=0,n0(180,o|0),T=f,f=0;do if(T&1)t=b()|0;else{if(e[o>>2]=36236,l=p+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[p+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,o|0,c|0),T=f,f=0,T&1){t=b()|0,a0(c),a0(l),ce(o);break}a0(c),f=0,t=L0(28,p|0,50970,26)|0,T=f,f=0;do if(!(T&1)&&(f=0,s=y0(38,t|0,r&255|0)|0,T=f,f=0,!(T&1))&&(f=0,L0(28,s|0,50997,18)|0,T=f,f=0,!(T&1))){if(s=de(16)|0,f=0,h0(64,m|0,o|0),T=f,f=0,T&1)t=b()|0;else if(f=0,t=p0(1)|0,T=f,f=0,!(T&1)&&(f=0,P0(36,s|0,10,t|0,m|0),T=f,f=0,!(T&1))?(f=0,d0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,a0(m),!n)break;ge(s|0)}else D=20;while(!1);(D|0)==20&&(t=b()|0),e[p>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,a0(l),ce(o),H0(a),D=t,r0(D|0)}while(!1);D=t,H0(a),r0(D|0)}case-25:case-32:case-2:return D=0,y=n,D|0;default:{m=T+56|0,l=T+4|0,e[T>>2]=36160,e[m>>2]=36180,f=0,h0(62,T+56|0,l|0),p=f,f=0,p&1&&(D=b()|0,H0(m),r0(D|0)),e[T+128>>2]=0,e[T+132>>2]=-1,e[T>>2]=36200,e[T+56>>2]=36220,f=0,n0(180,l|0),p=f,f=0;do if(p&1)t=b()|0;else{if(e[l>>2]=36236,a=T+36|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[T+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,l|0,c|0),p=f,f=0,p&1){t=b()|0,a0(c),a0(a),ce(l);break}a0(c),f=0,t=L0(28,T|0,51016,20)|0,p=f,f=0;do if(!(p&1)&&(f=0,o=y0(38,t|0,r&255|0)|0,p=f,f=0,!(p&1))&&(f=0,L0(28,o|0,51037,13)|0,p=f,f=0,!(p&1))){if(s=de(16)|0,f=0,h0(64,A|0,l|0),p=f,f=0,p&1)t=b()|0;else if(f=0,t=p0(1)|0,p=f,f=0,!(p&1)&&(f=0,P0(36,s|0,11,t|0,A|0),p=f,f=0,!(p&1))?(f=0,d0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,a0(A),!n)break;ge(s|0)}else D=40;while(!1);(D|0)==40&&(t=b()|0),e[T>>2]=36200,e[m>>2]=36220,e[l>>2]=36236,a0(a),ce(l),H0(m),D=t,r0(D|0)}while(!1);D=t,H0(m),r0(D|0)}}return 0}function ug(t){t=t|0;var r=0;return(ui(t)|0)<<24>>24!=1?(t=1,t|0):(r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+52>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+56>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+60>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+64>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+68>>2]=r,t=11,t|0)}function cg(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;n=y,y=y+16|0,o=n,e[o>>2]=0,l=o+4|0,e[l>>2]=0,e[o+8>>2]=0,f=0,d0(9,t|0,o|0,4),r=f,f=0;e:do if(r&1)s=3;else{r=e[o>>2]|0;i:do if(_p(r,51051,4)|0)t=4;else{if(f=0,r=u0(69,t|0)|0,a=f,f=0,a&1){s=3;break e}switch(r=r&255,r|0){case 3:case 2:case 1:case 0:{e[t+44>>2]=r,t=5,r=e[o>>2]|0;break i}case 5:case 4:{if(r=de(16)|0,f=0,t=p0(1)|0,a=f,f=0,!(a&1)&&(f=0,d0(7,r|0,7,t|0),a=f,f=0,!(a&1))){f=0,d0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}default:{if(r=de(16)|0,f=0,t=p0(1)|0,a=f,f=0,!(a&1)&&(f=0,d0(7,r|0,5,t|0),a=f,f=0,!(a&1))){f=0,d0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}}}while(!1);return r?((e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),l0(r),y=n,t|0):(y=n,t|0)}while(!1);return(s|0)==3&&(t=b()|0),r=e[o>>2]|0,r||r0(t|0),(e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),l0(r),r0(t|0),0}function hg(t){t=t|0;var r=0,n=0,s=0;s=e[(e[t>>2]|0)+-12>>2]|0,e[t+s>>2]=36200,r=t+(s+56)|0,e[r>>2]=36220,n=t+(s+4)|0,e[n>>2]=36236,a0(t+(s+36)|0),ce(n),H0(r)}function mg(t){t=t|0}function dg(t){t=t|0,l0(t)}function gg(t){t=t|0,d[t>>0]=0,t=t+4|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0,e[t+24>>2]=0,e[t+28>>2]=0}function pg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(o=y,y=y+16|0,l=o,r=J8(r)|0,e[l>>2]=r,n=t+28|0,s=e[n>>2]|0,s>>>0<(e[t+32>>2]|0)>>>0){e[s>>2]=r,e[n>>2]=s+4,e[l>>2]=0,y=o;return}if(f=0,h0(57,t+24|0,l|0),t=f,f=0,t&1)r=b()|0,n=e[l>>2]|0,e[l>>2]=0,n||r0(r|0),Ce[e[(e[n>>2]|0)+4>>2]&255](n),r0(r|0);else{if(r=e[l>>2]|0,e[l>>2]=0,!r){y=o;return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),y=o;return}}function Ag(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(s=t+4|0,e[s>>2]=e[r>>2],e[s+4>>2]=e[r+4>>2],e[s+8>>2]=e[r+8>>2],ot(t,-1),ot(t,-40),s=t+28|0,o=t+24|0,r=e[o>>2]|0,(e[s>>2]|0)==(r|0))return ot(t,-1),ot(t,-39),t=t+16|0,t=e[t>>2]|0,t|0;n=0;do l=e[r+(n<<2)>>2]|0,Ke[e[(e[l>>2]|0)+8>>2]&127](l,t),n=n+1|0,r=e[o>>2]|0;while(n>>>0<(e[s>>2]|0)-r>>2>>>0);return ot(t,-1),ot(t,-39),l=t+16|0,l=e[l>>2]|0,l|0}function Sg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;T=y,y=y+48|0,c=T+32|0,o=T+12|0,m=T+8|0,p=T+4|0,D=T,s=n+36|0;do if(!(e[s>>2]|0)&&!(e[n+40>>2]|0)&&!(e[n+44>>2]|0)&&!(e[n+48>>2]|0)&&!(e[n+52>>2]|0)){if(s=e[n+8>>2]|0,(s|0)<=12){l=t+28|0,a=t+32|0;break}if(hi(o,(1<>2]|0),s=on(o)|0,e[m>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[m>>2]=0;break}if(f=0,h0(57,t+24|0,m|0),c=f,f=0,!(c&1)){if(s=e[m>>2]|0,e[m>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[m>>2]|0,e[m>>2]=0,s||(D=n,r0(D|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),D=n,r0(D|0)}else A=6;while(!1);do if((A|0)==6){if(s=on(s)|0,e[c>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[c>>2]=0;break}if(f=0,h0(57,t+24|0,c|0),A=f,f=0,!(A&1)){if(s=e[c>>2]|0,e[c>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[c>>2]|0,e[c>>2]=0,s||(D=n,r0(D|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),D=n,r0(D|0)}while(!1);s=t+20|0,o=(e[s>>2]|0)+1|0,e[s>>2]=o,s=e[n+24>>2]|0,c=s|0?e[n+16>>2]|0:1,s=$8(o,c,e[n+20>>2]|0,s)|0,e[p>>2]=s,o=e[l>>2]|0;do if(o>>>0<(e[a>>2]|0)>>>0)e[o>>2]=s,e[l>>2]=o+4,e[p>>2]=0;else{if(f=0,h0(57,t+24|0,p|0),A=f,f=0,!(A&1)){if(s=e[p>>2]|0,e[p>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[p>>2]|0,e[p>>2]=0,s||(D=n,r0(D|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),D=n,r0(D|0)}while(!1);m=G0(104)|0,e[m>>2]=36820,e[m+4>>2]=c,o=m+8|0,e[o>>2]=e[r>>2],e[o+4>>2]=e[r+4>>2],e[o+8>>2]=e[r+8>>2],o=m+20|0,s=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(s|0));if(e[D>>2]=m,n=e[l>>2]|0,n>>>0<(e[a>>2]|0)>>>0){e[n>>2]=m,e[l>>2]=n+4,e[D>>2]=0,y=T;return}if(f=0,h0(57,t+24|0,D|0),t=f,f=0,t&1)n=b()|0,s=e[D>>2]|0,e[D>>2]=0,s||(D=n,r0(D|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),D=n,r0(D|0);else{if(n=e[D>>2]|0,e[D>>2]=0,!n){y=T;return}Ce[e[(e[n>>2]|0)+4>>2]&255](n),y=T;return}}function vg(t,r,n,s,o,l,a,c,m,A,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0,A=A|0,p=p|0;var T=0,D=0,E=0,U=0,V=0,q=0,O=0;return E=y,y=y+96|0,D=E,T=cs(t,r,D,0)|0,T?(o=T,y=E,o|0):(d[D+32>>0]=0,V=e[D+8>>2]|0,O=e[D>>2]|0,q=e[D+4>>2]|0,T=W(q,O)|0,U=e[D+16>>2]|0,T=W(W(T,(V|0)<9?1:2)|0,U)|0,e[s>>2]=T,T=Ti(T)|0,e[n>>2]=T,e[o>>2]=O,e[l>>2]=q,e[a>>2]=V,e[c>>2]=e[D+12>>2],e[m>>2]=U,e[A>>2]=e[D+20>>2],e[p>>2]=e[D+24>>2],o=hs(T,e[s>>2]|0,t,r,0,0)|0,y=E,o|0)}function wg(t,r,n,s,o,l,a,c,m){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,m=m|0;var A=0,p=0,T=0,D=0;T=y,y=y+96|0,A=T+4|0,a=T,p=A,D=p+84|0;do e[p>>2]=0,p=p+4|0;while((p|0)<(D|0));return e[A+16>>2]=l,e[A+8>>2]=o,e[A>>2]=n,e[A+4>>2]=s,n=Ti(r)|0,e[c>>2]=n,e[a>>2]=0,n=us(c,r,a,t,r,A,0)|0,e[m>>2]=e[a>>2],y=T,n|0}function Ft(t,r){t=t|0,r=r|0;var n=0;n=y,y=y+16|0,e[n>>2]=r,r=e[9320]|0,_n(r,t,n)|0,Dp(10,r)|0,ae()}function tt(t){t=t|0,_1(51337,51366,1164,51442)}function ct(t){t=t|0,_1(51463,51486,303,51442)}function un(){var t=0,r=0;if(t=y,y=y+16|0,zn(37024,4)|0)Ft(51562,t);else return r=Gn(e[9255]|0)|0,y=t,r|0;return 0}function G0(t){t=t|0;var r=0;r=t|0?t:1,t=Ti(r)|0;e:do if(!t){for(;t=kg()|0,!!t;)if(On[t&7](),t=Ti(r)|0,t)break e;r=de(4)|0,e[r>>2]=36844,Ne(r|0,592,78)}while(!1);return t|0}function l0(t){t=t|0,Ze(t)}function xg(t){t=t|0,l0(t)}function Cg(t){t=t|0,e[t>>2]=36844}function Tg(t){t=t|0}function yg(t){t=t|0,l0(t)}function Dg(t){return t=t|0,51611}function cn(t){t=t|0;var r=0;r=y,y=y+16|0,f=0,we(t|0),t=f,f=0,t&1||(f=0,h0(85,51626,r|0),f=0),t=b(0)|0,Qi(t|0)|0,f=0,h0(85,51666,r+8|0),f=0,t=b(0)|0,f=0,we(3),r=f,f=0,r&1?(r=b(0)|0,De(r)):De(t)}function Ig(){var t=0,r=0,n=0;f=0,t=p0(2)|0,n=f,f=0,n&1&&(n=b(0)|0,De(n)),t|0&&(r=e[t>>2]|0,(r|0)!=0)&&(n=r+48|0,(e[n>>2]&-256|0)==1126902528?(e[n+4>>2]|0)==1129074247:0)&&cn(e[r+12>>2]|0),n=e[9208]|0,e[9208]=n+0,cn(n)}function kg(){var t=0;return t=e[9214]|0,e[9214]=t+0,t|0}function cA(t){t=t|0}function Cr(t){t=t|0,e[t>>2]=36868,ep(t+4|0)}function Eg(t){t=t|0,Cr(t),l0(t)}function Fg(t){return t=t|0,e[t+4>>2]|0}function hA(t){t=t|0}function Mg(t){t=t|0,e[t>>2]=36888}function _g(t){t=t|0}function Rg(t){t=t|0,l0(t)}function Pg(t){return t=t|0,51716}function Lg(t){t=t|0}function Ug(t){t=t|0}function Og(t){t=t|0}function Ng(t){t=t|0,l0(t)}function Vg(t){t=t|0,l0(t)}function Bg(t){t=t|0,l0(t)}function qg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(a=y,y=y+64|0,l=a,(t|0)!=(r|0))if(r|0&&(o=mn(r,656,672,0)|0,(o|0)!=0)){r=l,s=r+56|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(s|0));e[l>>2]=o,e[l+8>>2]=t,e[l+12>>2]=-1,e[l+48>>2]=1,Lr[e[(e[o>>2]|0)+28>>2]&63](o,l,e[n>>2]|0,1),(e[l+24>>2]|0)==1?(e[n>>2]=e[l+16>>2],r=1):r=0}else r=0;else r=1;return y=a,r|0}function C1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;t=r+16|0,o=e[t>>2]|0;do if(o){if((o|0)!=(n|0)){s=r+36|0,e[s>>2]=(e[s>>2]|0)+1,e[r+24>>2]=2,d[r+54>>0]=1;break}t=r+24|0,(e[t>>2]|0)==2&&(e[t>>2]=s)}else e[t>>2]=n,e[r+24>>2]=s,e[r+36>>2]=1;while(!1)}function bg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)&&C1(0,r,n,s)}function Gg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)?C1(0,r,n,s):(t=e[t+8>>2]|0,Lr[e[(e[t>>2]|0)+28>>2]&63](t,r,n,s))}function hn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;l=e[t+4>>2]|0,o=l>>8,l&1&&(o=e[(e[n>>2]|0)+o>>2]|0),t=e[t>>2]|0,Lr[e[(e[t>>2]|0)+28>>2]&63](t,r,n+o|0,l&2|0?s:2)}function zg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;e:do if((t|0)!=(e[r+8>>2]|0)){if(l=e[t+12>>2]|0,o=t+16+(l<<3)|0,hn(t+16|0,r,n,s),(l|0)>1){l=r+54|0,t=t+24|0;do{if(hn(t,r,n,s),d[l>>0]|0)break e;t=t+8|0}while(t>>>0>>0)}}else C1(0,r,n,s);while(!1)}function mn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;E=y,y=y+64|0,D=E,T=e[t>>2]|0,p=t+(e[T+-8>>2]|0)|0,T=e[T+-4>>2]|0,e[D>>2]=n,e[D+4>>2]=t,e[D+8>>2]=r,e[D+12>>2]=s,s=D+16|0,t=D+20|0,r=D+24|0,o=D+28|0,l=D+32|0,a=D+40|0,c=(T|0)==(n|0),m=s,A=m+36|0;do e[m>>2]=0,m=m+4|0;while((m|0)<(A|0));k[s+36>>1]=0,d[s+38>>0]=0;e:do if(c)e[D+48>>2]=1,Vt[e[(e[n>>2]|0)+20>>2]&15](n,D,p,p,1,0),s=(e[r>>2]|0)==1?p:0;else{switch(Rr[e[(e[T>>2]|0)+24>>2]&15](T,D,p,1,0),e[D+36>>2]|0){case 0:{s=(e[a>>2]|0)==1&(e[o>>2]|0)==1&(e[l>>2]|0)==1?e[t>>2]|0:0;break e}case 1:break;default:{s=0;break e}}if((e[r>>2]|0)!=1&&!((e[a>>2]|0)==0&(e[o>>2]|0)==1&(e[l>>2]|0)==1)){s=0;break}s=e[s>>2]|0}while(!1);return y=E,s|0}function T1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,d[r+53>>0]=1;do if((e[r+4>>2]|0)==(s|0)){if(d[r+52>>0]=1,s=r+16|0,t=e[s>>2]|0,!t){if(e[s>>2]=n,e[r+24>>2]=o,e[r+36>>2]=1,!((o|0)==1&&(e[r+48>>2]|0)==1))break;d[r+54>>0]=1;break}if((t|0)!=(n|0)){o=r+36|0,e[o>>2]=(e[o>>2]|0)+1,d[r+54>>0]=1;break}t=r+24|0,s=e[t>>2]|0,(s|0)==2&&(e[t>>2]=o,s=o),(s|0)==1&&(e[r+48>>2]|0)==1&&(d[r+54>>0]=1)}while(!1)}function Qg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){if(U=e[t+12>>2]|0,c=t+16+(U<<3)|0,Tr(t+16|0,r,n,s,o),l=t+24|0,(U|0)<=1)break;if(a=e[t+8>>2]|0,!(a&2|0)&&(m=r+36|0,(e[m>>2]|0)!=1)){if(!(a&1)){for(a=r+54|0;;)if(d[a>>0]|0||(e[m>>2]|0)==1||(Tr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+24|0,t=r+54|0;;)if(d[t>>0]|0||(e[m>>2]|0)==1&&(e[a>>2]|0)==1||(Tr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+54|0;;)if(d[a>>0]|0||(Tr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}if((e[r+16>>2]|0)!=(n|0)&&(E=r+20|0,(e[E>>2]|0)!=(n|0))){if(e[r+32>>2]=s,p=r+44|0,(e[p>>2]|0)==4)break;a=e[t+12>>2]|0,c=t+16+(a<<3)|0,m=r+52|0,s=r+53|0,T=r+54|0,A=t+8|0,D=r+24|0;i:do if((a|0)>0)for(a=0,l=0,t=t+16|0;;){if(d[m>>0]=0,d[s>>0]=0,y1(t,r,n,n,1,o),d[T>>0]|0){U=20;break i}do if(d[s>>0]|0){if(!(d[m>>0]|0))if(e[A>>2]&1){l=1;break}else{l=1,U=20;break i}if((e[D>>2]|0)==1)break i;if(e[A>>2]&2)a=1,l=1;else break i}while(!1);if(t=t+8|0,t>>>0>=c>>>0){U=20;break}}else a=0,l=0,U=20;while(!1);do if((U|0)==20){if(!a&&(e[E>>2]=n,n=r+40|0,e[n>>2]=(e[n>>2]|0)+1,(e[r+36>>2]|0)==1)&&(e[D>>2]|0)==2){if(d[T>>0]=1,l)break}else U=24;if((U|0)==24&&l)break;e[p>>2]=4;break e}while(!1);e[p>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function y1(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;c=e[t+4>>2]|0,a=c>>8,c&1&&(a=e[(e[s>>2]|0)+a>>2]|0),t=e[t>>2]|0,Vt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s+a|0,c&2|0?o:2,l)}function Tr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;a=e[t+4>>2]|0,l=a>>8,a&1&&(l=e[(e[n>>2]|0)+l>>2]|0),t=e[t>>2]|0,Rr[e[(e[t>>2]|0)+24>>2]&15](t,r,n+l|0,a&2|0?s:2,o)}function Hg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){c=e[t+8>>2]|0,Rr[e[(e[c>>2]|0)+24>>2]&15](c,r,n,s,o);break}if((e[r+16>>2]|0)!=(n|0)&&(a=r+20|0,(e[a>>2]|0)!=(n|0))){if(e[r+32>>2]=s,s=r+44|0,(e[s>>2]|0)==4)break;l=r+52|0,d[l>>0]=0,m=r+53|0,d[m>>0]=0,t=e[t+8>>2]|0,Vt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,n,1,o),d[m>>0]|0?d[l>>0]|0||(l=1,c=13):(l=0,c=13);do if((c|0)==13){if(e[a>>2]=n,m=r+40|0,e[m>>2]=(e[m>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2){if(d[r+54>>0]=1,l)break}else c=16;if((c|0)==16&&l)break;e[s>>2]=4;break e}while(!1);e[s>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function Yg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(a=r+28|0,(e[a>>2]|0)!=1)&&(e[a>>2]=s);else if((t|0)==(e[r>>2]|0)){if((e[r+16>>2]|0)!=(n|0)&&(l=r+20|0,(e[l>>2]|0)!=(n|0))){e[r+32>>2]=s,e[l>>2]=n,o=r+40|0,e[o>>2]=(e[o>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2&&(d[r+54>>0]=1),e[r+44>>2]=4;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function jg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;if((t|0)==(e[r+8>>2]|0))T1(0,r,n,s,o);else{p=r+52|0,T=d[p>>0]|0,D=r+53|0,E=d[D>>0]|0,A=e[t+12>>2]|0,a=t+16+(A<<3)|0,d[p>>0]=0,d[D>>0]=0,y1(t+16|0,r,n,s,o,l);e:do if((A|0)>1){c=r+24|0,m=t+8|0,A=r+54|0,t=t+24|0;do{if(d[A>>0]|0)break e;if(d[p>>0]|0){if((e[c>>2]|0)==1||!(e[m>>2]&2))break e}else if(d[D>>0]|0&&!(e[m>>2]&1|0))break e;d[p>>0]=0,d[D>>0]=0,y1(t,r,n,s,o,l),t=t+8|0}while(t>>>0>>0)}while(!1);d[p>>0]=T,d[D>>0]=E}}function Xg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)?T1(0,r,n,s,o):(t=e[t+8>>2]|0,Vt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s,o,l))}function Kg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)&&T1(0,r,n,s,o)}function Wg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,e[s>>2]=e[n>>2],t=ze[e[(e[t>>2]|0)+16>>2]&63](t,r,s)|0,t&&(e[n>>2]=e[s>>2]),y=o,t&1|0}function Zg(t){return t=t|0,t?t=(mn(t,656,704,0)|0)!=0:t=0,t&1|0}function yr(){var t=0;t=de(4)|0,Cg(t),Ne(t|0,592,78)}function Jg(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+48|0,a=o+32|0,n=o+24|0,c=o+16|0,l=o,o=o+36|0,t=un()|0,t|0&&(s=e[t>>2]|0,(s|0)!=0)&&(t=s+48|0,r=e[t>>2]|0,t=e[t+4>>2]|0,(r&-256|0)==1126902528&(t|0)==1129074247||(e[n>>2]=e[9257],Ft(51919,n)),(r|0)==1126902529&(t|0)==1129074247?t=e[s+44>>2]|0:t=s+80|0,e[o>>2]=t,s=e[s>>2]|0,t=e[s+4>>2]|0,ze[e[(e[152]|0)+16>>2]&63](608,s,o)|0?(c=e[o>>2]|0,o=e[9257]|0,c=Se[e[(e[c>>2]|0)+8>>2]&127](c)|0,e[l>>2]=o,e[l+4>>2]=t,e[l+8>>2]=c,Ft(51833,l)):(e[c>>2]=e[9257],e[c+4>>2]=t,Ft(51878,c))),Ft(51957,a)}function $g(){var t=0;if(t=y,y=y+16|0,$i(37020,184)|0)Ft(51730,t);else{y=t;return}}function ep(t){t=t|0;var r=0,n=0;n=(e[t>>2]|0)+-4|0,r=e[n>>2]|0,e[n>>2]=r+-1,(r+-1|0)<0&&l0((e[t>>2]|0)+-12|0)}function ip(t){t=t|0;var r=0;if(r=y,y=y+16|0,Ze(t),jn(e[9255]|0,0)|0)Ft(51780,r);else{y=r;return}}function Dr(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=Ep(t,r,n)|0,t|0}function dn(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=Fp(t,r,n)|0,t|0}function tp(){return 37296}function rp(){return 37300}function np(){return 37304}function Xt(t){return t=t|0,((t|0)==32|(t+-9|0)>>>0<5)&1|0}function sp(t){return t=t|0,(t+-48|0)>>>0<10?t=1:t=((t|32)+-97|0)>>>0<6,t&1|0}function di(){var t=0;return e[9258]|0?(t=(P1()|0)+60|0,t=e[t>>2]|0):t=37308,t|0}function gn(t){t=t|0;var r=0,n=0;for(r=0;;){if((N[51978+r>>0]|0)==(t|0)){n=2;break}if(r=r+1|0,(r|0)==87){r=87,t=52066,n=5;break}}if((n|0)==2&&(r?(t=52066,n=5):t=52066),(n|0)==5)for(;;){for(n=t;t=n+1|0,d[n>>0]|0;)n=t;if(r=r+-1|0,r)n=5;else break}return t|0}function pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0;switch(Qe=y,y=y+512|0,w0=Qe,r|0){case 0:{Y0=24,A0=-149,M=4;break}case 1:{Y0=53,A0=-1074,M=4;break}case 2:{Y0=53,A0=-1074,M=4;break}default:s=0}e:do if((M|0)==4){t0=t+4|0,K=t+100|0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0;while(Xt(r)|0);i:do switch(r|0){case 43:case 45:if(o=1-(((r|0)==45&1)<<1)|0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,S0=o;break i}else{r=si(t)|0,S0=o;break i}default:S0=1}while(!1);o=r,r=0;do{if((o|32|0)!=(d[53870+r>>0]|0))break;do if(r>>>0<7)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<8);i:do switch(r|0){case 8:break;case 3:{M=23;break}default:{if(a=(n|0)!=0,a&r>>>0>3){if((r|0)==8)break i;M=23;break i}t:do if(!r){r=0;do{if((o|32|0)!=(d[56747+r>>0]|0))break t;do if(r>>>0<2)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<3)}while(!1);switch(r|0){case 3:{if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==40)r=1;else{if(!(e[K>>2]|0)){s=m0;break e}e[t0>>2]=(e[t0>>2]|0)+-1,s=m0;break e}for(;o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=o+1,o=N[o>>0]|0):o=si(t)|0,!(!((o+-48|0)>>>0<10|(o+-65|0)>>>0<26)&&!((o|0)==95|(o+-97|0)>>>0<26));)r=r+1|0;if((o|0)==41){s=m0;break e}if(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!a){Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}if(!r){s=m0;break e}for(;;)if(r=r+-1|0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!r){s=m0;break e}}case 0:{do if((o|0)==48){if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|32|0)!=120){if(!(e[K>>2]|0)){r=48;break}e[t0>>2]=(e[t0>>2]|0)+-1,r=48;break}r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0,a=0):(r=si(t)|0,a=0);t:for(;;){switch(r|0){case 46:{M=74;break t}case 48:break;default:{R=0,c=0,O=0,o=0,A=a,p=0,q=0,m=1,a=0,s=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==74)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48){a=0,o=0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,a=Li(a|0,o|0,-1,-1)|0,o=D0;while((r|0)==48);R=0,c=0,O=a,A=1,p=1,q=0,m=1,a=0,s=0}else R=0,c=0,O=0,o=0,A=a,p=1,q=0,m=1,a=0,s=0;for(;;){if(U=r+-48|0,T=r|32,U>>>0>=10){if(V=(r|0)==46,!(V|(T+-97|0)>>>0<6)){T=O,U=R;break}if(V)if(!p)V=c,o=R,U=R,p=1,T=q,l=m;else{T=O,U=R,r=46;break}else M=86}else M=86;if((M|0)==86){M=0,r=(r|0)>57?T+-87|0:U;do if((R|0)<0|(R|0)==0&c>>>0<8)T=q,l=m,a=r+(a<<4)|0;else{if((R|0)<0|(R|0)==0&c>>>0<14){E=m*.0625,T=q,l=E,s=s+E*+(r|0);break}(q|0)!=0|(r|0)==0?(T=q,l=m):(T=1,l=m,s=s+m*.5)}while(!1);c=Li(c|0,R|0,1,0)|0,V=O,U=D0,A=1}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,R=U,O=V,r=N[r>>0]|0,q=T,m=l;continue}else{R=U,O=V,r=si(t)|0,q=T,m=l;continue}}if(!A){r=(e[K>>2]|0)==0,r||(e[t0>>2]=(e[t0>>2]|0)+-1),n?!r&&(F=e[t0>>2]|0,e[t0>>2]=F+-1,(p|0)!=0)&&(e[t0>>2]=F+-2):rt(t,0),s=+(S0|0)*0;break e}if(A=(p|0)==0,p=A?c:T,A=A?U:o,(U|0)<0|(U|0)==0&c>>>0<8){o=U;do a=a<<4,c=Li(c|0,o|0,1,0)|0,o=D0;while((o|0)<0|(o|0)==0&c>>>0<8)}if((r|32|0)==112){if(o=Un(t,n)|0,r=D0,(o|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break e}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0)}}else e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0);if(w0=pi(p|0,A|0,2)|0,w0=Li(w0|0,D0|0,-32,-1)|0,r=Li(w0|0,D0|0,o|0,r|0)|0,o=D0,!a){s=+(S0|0)*0;break e}if((o|0)>0|(o|0)==0&r>>>0>(0-A0|0)>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(S0|0)*17976931348623157e292*17976931348623157e292;break e}if(w0=A0+-106|0,s0=((w0|0)<0)<<31>>31,(o|0)<(s0|0)|(o|0)==(s0|0)&r>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(S0|0)*22250738585072014e-324*22250738585072014e-324;break e}if((a|0)>-1){do s0=!(s>=.5),w0=s0&1|a<<1,a=w0^1,s=s+(s0?s:s+-1),r=Li(r|0,o|0,-1,-1)|0,o=D0;while((w0|0)>-1);c=r,m=s}else c=r,m=s;r=Ji(32,0,A0|0,((A0|0)<0)<<31>>31|0)|0,r=Li(c|0,o|0,r|0,D0|0)|0,A0=D0,0>(A0|0)|(A0|0)==0&Y0>>>0>r>>>0?(r|0)<0?(r=0,M=127):M=125:(r=Y0,M=125),(M|0)==125&&((r|0)<53?M=127:(o=r,l=+(S0|0),s=0)),(M|0)==127&&(s=+(S0|0),o=r,l=s,s=+vn(+Ir(1,84-r|0),s)),Y0=(a&1|0)==0&(m!=0&(o|0)<32),s=l*(Y0?0:m)+(s+l*+(((Y0&1)+a|0)>>>0))-s,s==0&&(Y0=di()|0,e[Y0>>2]=34),s=+Cn(s,c);break e}else r=o;while(!1);J=A0+Y0|0,s0=0-J|0,a=0;t:for(;;){switch(r|0){case 46:{M=138;break t}case 48:break;default:{o=0,T=0,p=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==138)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)for(o=0,r=0;;)if(o=Li(o|0,r|0,-1,-1)|0,a=D0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)r=a;else{T=a,a=1,p=1;break}else o=0,T=0,p=1;e[w0>>2]=0,A=r+-48|0,c=(r|0)==46;t:do if(c|A>>>0<10){X=w0+496|0,R=0,V=0,q=c,M=T,U=a,F=p,a=0,c=0,p=0;r:for(;;){do if(q)if(!F)o=R,T=V,F=1;else{T=M,r=R,A=V;break r}else{if(q=Li(R|0,V|0,1,0)|0,V=D0,O=(r|0)!=48,(c|0)>=125){if(!O){T=M,R=q;break}e[X>>2]=e[X>>2]|1,T=M,R=q;break}T=w0+(c<<2)|0,a&&(A=r+-48+((e[T>>2]|0)*10|0)|0),e[T>>2]=A,a=a+1|0,A=(a|0)==9,T=M,R=q,U=1,a=A?0:a,c=(A&1)+c|0,p=O?q:p}while(!1);if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,A=r+-48|0,q=(r|0)==46,q|A>>>0<10)M=T;else{A=F,M=161;break t}}U=(U|0)!=0,M=169}else R=0,V=0,U=a,A=p,a=0,c=0,p=0,M=161;while(!1);do if((M|0)==161){if(X=(A|0)==0,o=X?R:o,T=X?V:T,U=(U|0)!=0,!((r|32|0)==101&U))if((r|0)>-1){r=R,A=V,M=169;break}else{r=R,A=V,M=171;break}if(A=Un(t,n)|0,r=D0,(A|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,A=0,r=0):(A=0,r=0)}o=Li(A|0,r|0,o|0,T|0)|0,U=R,T=D0,A=V,M=173}while(!1);(M|0)==169&&(e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,U?(U=r,M=173):M=172):M=171),(M|0)==171&&(U?(U=r,M=173):M=172);do if((M|0)==172)Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;else if((M|0)==173){if(r=e[w0>>2]|0,!r){s=+(S0|0)*0;break}if(((A|0)<0|(A|0)==0&U>>>0<10)&((o|0)==(U|0)&(T|0)==(A|0))&&Y0>>>0>30|(r>>>Y0|0)==0){s=+(S0|0)*+(r>>>0);break}if(t=(A0|0)/-2|0,t0=((t|0)<0)<<31>>31,(T|0)>(t0|0)|(T|0)==(t0|0)&o>>>0>t>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(S0|0)*17976931348623157e292*17976931348623157e292;break}if(t=A0+-106|0,t0=((t|0)<0)<<31>>31,(T|0)<(t0|0)|(T|0)==(t0|0)&o>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(S0|0)*22250738585072014e-324*22250738585072014e-324;break}if(a){if((a|0)<9){A=w0+(c<<2)|0,r=e[A>>2]|0;do r=r*10|0,a=a+1|0;while((a|0)!=9);e[A>>2]=r}c=c+1|0}if((p|0)<9&&(p|0)<=(o|0)&(o|0)<18){if((o|0)==9){s=+(S0|0)*+((e[w0>>2]|0)>>>0);break}if((o|0)<9){s=+(S0|0)*+((e[w0>>2]|0)>>>0)/+(e[37312+(8-o<<2)>>2]|0);break}if(t=Y0+27+(W(o,-3)|0)|0,r=e[w0>>2]|0,(t|0)>30|(r>>>t|0)==0){s=+(S0|0)*+(r>>>0)*+(e[37312+(o+-10<<2)>>2]|0);break}}if(r=(o|0)%9|0,!r)a=0,r=0;else{if(U=(o|0)>-1?r:r+9|0,A=e[37312+(8-U<<2)>>2]|0,c){p=1e9/(A|0)|0,a=0,r=0,T=0;do K=w0+(T<<2)|0,t0=e[K>>2]|0,t=((t0>>>0)/(A>>>0)|0)+r|0,e[K>>2]=t,r=W((t0>>>0)%(A>>>0)|0,p)|0,t=(T|0)==(a|0)&(t|0)==0,T=T+1|0,o=t?o+-9|0:o,a=t?T&127:a;while((T|0)!=(c|0));r&&(e[w0+(c<<2)>>2]=r,c=c+1|0)}else a=0,c=0;r=0,o=9-U+o|0}t:for(;;){V=(o|0)<18,q=(o|0)==18,O=w0+(a<<2)|0;do{if(!V){if(!q)break t;if((e[O>>2]|0)>>>0>=9007199){o=18;break t}}for(A=0,p=c+127|0;U=p&127,T=w0+(U<<2)|0,p=pi(e[T>>2]|0,0,29)|0,p=Li(p|0,D0|0,A|0,0)|0,A=D0,A>>>0>0|(A|0)==0&p>>>0>1e9?(t=Ar(p|0,A|0,1e9,0)|0,p=v1(p|0,A|0,1e9,0)|0,A=t):A=0,e[T>>2]=p,t=(U|0)==(a|0),c=(U|0)!=(c+127&127|0)|t||p|0?c:U,!t;)p=U+-1|0;r=r+-29|0}while(!(A|0));a=a+127&127,(a|0)==(c|0)&&(t=c+127&127,c=w0+((c+126&127)<<2)|0,e[c>>2]=e[c>>2]|e[w0+(t<<2)>>2],c=t),e[w0+(a<<2)>>2]=A,o=o+9|0}t:for(;;){for(R=c+1&127,O=w0+((c+127&127)<<2)|0;;){for(V=(o|0)==18,q=(o|0)>27?9:1,U=V^1;;){p=a&127,T=(p|0)==(c|0);do if(T)M=219;else{if(A=e[w0+(p<<2)>>2]|0,A>>>0<9007199){M=219;break}if(A>>>0>9007199)break;if(A=a+1&127,(A|0)==(c|0)){M=219;break}if(A=e[w0+(A<<2)>>2]|0,A>>>0<254740991){M=219;break}if(!(A>>>0>254740991|U)){o=p;break t}}while(!1);if((M|0)==219&&(M=0,V)){M=220;break t}if(r=r+q|0,(a|0)==(c|0))a=c;else break}for(U=(1<>>q,p=a,A=0,T=a;t0=w0+(T<<2)|0,t=e[t0>>2]|0,a=(t>>>q)+A|0,e[t0>>2]=a,A=W(t&U,V)|0,a=(T|0)==(p|0)&(a|0)==0,T=T+1&127,o=a?o+-9|0:o,a=a?T:p,(T|0)!=(c|0);)p=a;if(A){if((R|0)!=(a|0))break;e[O>>2]=e[O>>2]|1}}e[w0+(c<<2)>>2]=A,c=R}(M|0)==220&&(T?(e[w0+(R+-1<<2)>>2]=0,o=c,c=R):o=p),s=+((e[w0+(o<<2)>>2]|0)>>>0),o=a+1&127,(o|0)==(c|0)&&(c=a+2&127,e[w0+(c+-1<<2)>>2]=0),E=+(S0|0),l=E*(s*1e9+ +((e[w0+(o<<2)>>2]|0)>>>0)),V=r+53|0,T=V-A0|0,U=(T|0)<(Y0|0),o=U&1,p=U?(T|0)<0?0:T:Y0,(p|0)<53?(Re=+vn(+Ir(1,105-p|0),l),m=+wn(l,+Ir(1,53-p|0)),D=Re,s=m,m=Re+(l-m)):(D=0,s=0,m=l),A=a+2&127;do if((A|0)==(c|0))l=s;else{A=e[w0+(A<<2)>>2]|0;do if(A>>>0>=5e8){if(A>>>0>5e8){s=E*.75+s;break}if((a+3&127|0)==(c|0)){s=E*.5+s;break}else{s=E*.75+s;break}}else{if(!(A|0)&&(a+3&127|0)==(c|0))break;s=E*.25+s}while(!1);if((53-p|0)<=1){l=s;break}if(+wn(s,1)!=0){l=s;break}l=s+1}while(!1);s=m+l-D;do if((V&2147483647|0)>(-2-J|0)){if(+C0(+s)>=9007199254740992&&(o=U&(p|0)==(T|0)?0:o,r=r+1|0,s=s*.5),(r+50|0)<=(s0|0)&&!(l!=0&(o|0)!=0))break;Y0=di()|0,e[Y0>>2]=34}while(!1);s=+Cn(s,r)}while(!1);break e}default:{e[K>>2]|0&&(e[t0>>2]=(e[t0>>2]|0)+-1),Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}}}}while(!1);if((M|0)==23&&(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),(n|0)!=0&r>>>0>3))do o||(e[t0>>2]=(e[t0>>2]|0)+-1),r=r+-1|0;while(r>>>0>3);s=+(S0|0)*v0}while(!1);return y=Qe,+s}function An(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;e:do if(r>>>0>36)o=di()|0,e[o>>2]=22,o=0,s=0;else{U=t+4|0,E=t+100|0;do l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);i:do switch(l|0){case 43:case 45:if(a=((l|0)==45)<<31>>31,l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0){e[U>>2]=l+1,l=N[l>>0]|0,D=a;break i}else{l=si(t)|0,D=a;break i}default:D=0}while(!1);a=(r|0)==0;do if((r&-17|0)==0&(l|0)==48){if(l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|32|0)!=120)if(a){r=8,p=46;break}else{p=32;break}if(r=e[U>>2]|0,r>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,(N[53879+(l+1)>>0]|0)>15){if(s=(e[E>>2]|0)==0,s||(e[U>>2]=(e[U>>2]|0)+-1),!n){rt(t,0),o=0,s=0;break e}if(s){o=0,s=0;break e}e[U>>2]=(e[U>>2]|0)+-1,o=0,s=0;break e}else r=16,p=46}else if(r=a?10:r,(N[53879+(l+1)>>0]|0)>>>0>>0)p=32;else{e[E>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),rt(t,0),o=di()|0,e[o>>2]=22,o=0,s=0;break e}while(!1);if((p|0)==32)if((r|0)==10){if(r=l+-48|0,r>>>0<10){for(l=0;;)if(a=(l*10|0)+r|0,r=e[U>>2]|0,r>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,r=l+-48|0,r>>>0<10&a>>>0<429496729)l=a;else{r=a;break}a=0}else r=0,a=0;if(n=l+-48|0,n>>>0<10){for(;;){if(c=Ht(r|0,a|0,10,0)|0,m=D0,A=((n|0)<0)<<31>>31,T=~A,m>>>0>T>>>0|(m|0)==(T|0)&c>>>0>~n>>>0){c=r;break}if(r=Li(c|0,m|0,n|0,A|0)|0,a=D0,l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,n=l+-48|0,!(n>>>0<10&(a>>>0<429496729|(a|0)==429496729&r>>>0<2576980378))){c=r;break}}n>>>0>9?(l=c,r=D):(r=10,p=72)}else l=r,r=D}else p=46;i:do if((p|0)==46){if(!(r+-1&r)){if(p=d[54136+((r*23|0)>>>5&7)>>0]|0,a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n|l<>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<134217728&n>>>0>>0;)l=c;n=0}else n=0,c=0;if(m=It(-1,-1,p|0)|0,A=D0,(a&255)>>>0>=r>>>0|(n>>>0>A>>>0|(n|0)==(A|0)&c>>>0>m>>>0)){a=n,p=72;break}else l=n;for(;;)if(c=pi(c|0,l|0,p|0)|0,n=D0,c=a&255|c,l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0|(n>>>0>A>>>0|(n|0)==(A|0)&c>>>0>m>>>0)){a=n,p=72;break i}else l=n}if(a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n+(W(l,r)|0)|0,l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<119304647&n>>>0>>0;)l=c;n=0}else c=0,n=0;if((a&255)>>>0>>0)for(p=Ar(-1,-1,r|0,0)|0,T=D0,A=n;;){if(A>>>0>T>>>0|(A|0)==(T|0)&c>>>0>p>>>0){a=A,p=72;break i}if(n=Ht(c|0,A|0,r|0,0)|0,m=D0,a=a&255,m>>>0>4294967295|(m|0)==-1&n>>>0>~a>>>0){a=A,p=72;break i}if(c=Li(a|0,0,n|0,m|0)|0,n=D0,l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0){a=n,p=72;break}else A=n}else a=n,p=72}while(!1);if((p|0)==72)if((N[53879+(l+1)>>0]|0)>>>0>>0){do l=e[U>>2]|0,l>>>0<(e[E>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while((N[53879+(l+1)>>0]|0)>>>0>>0);a=di()|0,e[a>>2]=34,a=o,l=s,r=(s&1|0)==0&!0?D:0}else l=c,r=D;if(e[E>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),!(a>>>0>>0|(a|0)==(o|0)&l>>>0>>0)){if(!((s&1|0)!=0|!1|(r|0)!=0)){U=di()|0,e[U>>2]=34,s=Li(s|0,o|0,-1,-1)|0,o=D0;break}if(a>>>0>o>>>0|(a|0)==(o|0)&l>>>0>s>>>0){U=di()|0,e[U>>2]=34;break}}s=((r|0)<0)<<31>>31,s=Ji(l^r|0,a^s|0,r|0,s|0)|0,o=D0}while(!1);return D0=o,s|0}function rt(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;e[t+104>>2]=r,n=e[t+4>>2]|0,s=e[t+8>>2]|0,o=s-n|0,e[t+108>>2]=o,(r|0)!=0&(o|0)>(r|0)?e[t+100>>2]=n+r:e[t+100>>2]=s}function si(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return n=t+104|0,l=e[n>>2]|0,l|0&&(e[t+108>>2]|0)>=(l|0)?a=4:(r=D1(t)|0,(r|0)>=0?(o=e[n>>2]|0,n=t+8|0,o?(s=e[n>>2]|0,l=e[t+4>>2]|0,n=s,o=o-(e[t+108>>2]|0)+-1|0,(n-l|0)>(o|0)?e[t+100>>2]=l+o:a=9):(s=e[n>>2]|0,n=s,a=9),(a|0)==9&&(e[t+100>>2]=n),n=e[t+4>>2]|0,s&&(t=t+108|0,e[t>>2]=s+1-n+(e[t>>2]|0)),n=n+-1|0,(N[n>>0]|0|0)!=(r|0)&&(d[n>>0]=r)):a=4),(a|0)==4&&(e[t+100>>2]=0,r=-1),r|0}function Kt(t){t=t|0;var r=0;return t>>>0>4294963200&&(r=di()|0,e[r>>2]=0-t,t=-1),t|0}function mA(t){return t=t|0,0}function op(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s|0}function Sn(t,r){return t=t|0,r=r|0,-1}function lp(t){t=t|0,Ze(t)}function ap(t,r){return t=t|0,r=r|0,(t+-48|0)>>>0<10|0}function fp(t,r){return t=t|0,r=r|0,sp(t)|0}function up(t,r,n){return t=t|0,r=r|0,n=n|0,d[r>>0]|0&&Ln(r,58885)|0&&Ln(r,54145)|0?n=0:n||(n=w4(1,4)|0),n|0}function nt(t){t=t|0;var r=0,n=0;return r=(P1()|0)+176|0,n=e[r>>2]|0,t&&(e[r>>2]=t),n|0}function cp(t,r){t=+t,r=+r;var n=0,s=0;return j[G>>3]=t,s=e[G>>2]|0,n=e[G+4>>2]|0,j[G>>3]=r,n=e[G+4>>2]&-2147483648|n&2147483647,e[G>>2]=s,e[G+4>>2]=n,+ +j[G>>3]}function vn(t,r){return t=+t,r=+r,+ +cp(t,r)}function hp(t,r){t=+t,r=+r;var n=0,s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;j[G>>3]=t,n=e[G>>2]|0,A=e[G+4>>2]|0,j[G>>3]=r,p=e[G>>2]|0,T=e[G+4>>2]|0,s=It(n|0,A|0,52)|0,s=s&2047,c=It(p|0,T|0,52)|0,c=c&2047,D=A&-2147483648,a=pi(p|0,T|0,1)|0,m=D0;e:do if(!((a|0)==0&(m|0)==0)&&(l=T&2147483647,!(l>>>0>2146435072|(l|0)==2146435072&p>>>0>0|(s|0)==2047))){if(o=pi(n|0,A|0,1)|0,l=D0,!(l>>>0>m>>>0|(l|0)==(m|0)&o>>>0>a>>>0))return+((o|0)==(a|0)&(l|0)==(m|0)?t*0:t);if(s)o=A&1048575|1048576;else{if(s=pi(n|0,A|0,12)|0,o=D0,(o|0)>-1|(o|0)==-1&s>>>0>4294967295){l=s,s=0;do s=s+-1|0,l=pi(l|0,o|0,1)|0,o=D0;while((o|0)>-1|(o|0)==-1&l>>>0>4294967295)}else s=0;n=pi(n|0,A|0,1-s|0)|0,o=D0}if(c)A=T&1048575|1048576;else{if(l=pi(p|0,T|0,12)|0,a=D0,(a|0)>-1|(a|0)==-1&l>>>0>4294967295){c=0;do c=c+-1|0,l=pi(l|0,a|0,1)|0,a=D0;while((a|0)>-1|(a|0)==-1&l>>>0>4294967295)}else c=0;p=pi(p|0,T|0,1-c|0)|0,A=D0}m=Ji(n|0,o|0,p|0,A|0)|0,a=D0,l=(a|0)>-1|(a|0)==-1&m>>>0>4294967295;i:do if((s|0)>(c|0)){for(;;){if(l){if((n|0)==(p|0)&(o|0)==(A|0))break;n=m,o=a}if(n=pi(n|0,o|0,1)|0,o=D0,s=s+-1|0,m=Ji(n|0,o|0,p|0,A|0)|0,a=D0,l=(a|0)>-1|(a|0)==-1&m>>>0>4294967295,(s|0)<=(c|0))break i}r=t*0;break e}while(!1);if(l)if((n|0)==(p|0)&(o|0)==(A|0)){r=t*0;break}else o=a,n=m;if(o>>>0<1048576|(o|0)==1048576&n>>>0<0)do n=pi(n|0,o|0,1)|0,o=D0,s=s+-1|0;while(o>>>0<1048576|(o|0)==1048576&n>>>0<0);(s|0)>0?(T=Li(n|0,o|0,0,-1048576)|0,n=D0,s=pi(s|0,0,52)|0,n=n|D0,s=T|s):(s=It(n|0,o|0,1-s|0)|0,n=D0),e[G>>2]=s,e[G+4>>2]=n|D,r=+j[G>>3]}else E=3;while(!1);return(E|0)==3&&(r=t*r,r=r/r),+r}function wn(t,r){return t=+t,r=+r,+ +hp(t,r)}function xn(t,r){t=+t,r=r|0;var n=0,s=0,o=0;switch(j[G>>3]=t,n=e[G>>2]|0,s=e[G+4>>2]|0,o=It(n|0,s|0,52)|0,o=o&2047,o|0){case 0:{t!=0?(t=+xn(t*18446744073709552e3,r),n=(e[r>>2]|0)+-64|0):n=0,e[r>>2]=n;break}case 2047:break;default:e[r>>2]=o+-1022,e[G>>2]=n,e[G+4>>2]=s&-2146435073|1071644672,t=+j[G>>3]}return+t}function mp(t,r){return t=+t,r=r|0,+ +xn(t,r)}function Ir(t,r){t=+t,r=r|0;var n=0;return(r|0)>1023?(t=t*898846567431158e293,n=r+-1023|0,(n|0)>1023&&(n=r+-2046|0,n=(n|0)>1023?1023:n,t=t*898846567431158e293)):(r|0)<-1022?(t=t*22250738585072014e-324,n=r+1022|0,(n|0)<-1022&&(n=r+2044|0,n=(n|0)<-1022?-1022:n,t=t*22250738585072014e-324)):n=r,n=pi(n+1023|0,0,52)|0,r=D0,e[G>>2]=n,e[G+4>>2]=r,+(t*+j[G>>3])}function Cn(t,r){return t=+t,r=r|0,+ +Ir(t,r)}function dp(t,r,n){return t=t|0,r=r|0,n=n|0,kr(0,t,r,n|0?n:37344)|0}function kr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;m=y,y=y+16|0,o=m,a=s|0?s:37348,s=e[a>>2]|0;e:do if(!r)s?c=15:s=0;else if(l=t|0?t:o,!n)s=-2;else{if(s)o=n,c=9;else{if(s=d[r>>0]|0,o=s&255,s<<24>>24>-1){e[l>>2]=o,s=s<<24>>24!=0&1;break}if(s=o+-194|0,s>>>0>50){c=15;break}s=e[37076+(s<<2)>>2]|0,o=n+-1|0,o&&(r=r+1|0,c=9)}i:do if((c|0)==9){if(t=d[r>>0]|0,A=(t&255)>>>3,(A+-16|A+(s>>26))>>>0>7){c=15;break e}for(;r=r+1|0,s=(t&255)+-128|s<<6,o=o+-1|0,!((s|0)>=0);){if(!o)break i;if(t=d[r>>0]|0,(t&-64)<<24>>24!=-128){c=15;break e}}e[a>>2]=0,e[l>>2]=s,s=n-o|0;break e}while(!1);e[a>>2]=s,s=-2}while(!1);return(c|0)==15&&(e[a>>2]=0,s=di()|0,e[s>>2]=84,s=-1),y=m,s|0}function gp(t){return t=t|0,t?t=(e[t>>2]|0)==0:t=1,t&1|0}function pp(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0;D=y,y=y+1040|0,A=D+8|0,T=D,m=e[r>>2]|0,e[T>>2]=m,p=(t|0)!=0,s=p?s:256,t=p?t:A,l=m;e:do if((s|0)!=0&(m|0)!=0){for(c=s,m=l,s=0;;){if(l=n>>>2,a=l>>>0>=c>>>0,!(n>>>0>131|a)){l=m;break e}if(l=a?c:l,n=n-l|0,l=Tn(t,T,l,o)|0,(l|0)==-1){s=n;break}if(E=(t|0)==(A|0),m=E?0:l,a=c-m|0,t=E?t:t+(l<<2)|0,s=l+s|0,l=e[T>>2]|0,(c|0)!=(m|0)&(l|0)!=0)c=a,m=l;else{c=a;break e}}n=s,c=0,l=e[T>>2]|0,s=-1}else c=s,s=0;while(!1);e:do if(l|0&&(c|0)!=0&(n|0)!=0){for(a=l,l=t;t=kr(l,a,n,o)|0,!((t+2|0)>>>0<3);)if(a=(e[T>>2]|0)+t|0,e[T>>2]=a,c=c+-1|0,s=s+1|0,(c|0)!=0&(n|0)!=(t|0))n=n-t|0,l=l+4|0;else break e;switch(t|0){case-1:{s=-1;break e}case 0:{e[T>>2]=0;break e}default:{e[o>>2]=0;break e}}}while(!1);return p&&(e[r>>2]=e[T>>2]),y=D,s|0}function Tn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0;o=e[r>>2]|0,s|0&&(l=e[s>>2]|0,(l|0)!=0)?t?(e[s>>2]=0,m=t,s=n,c=l,A=37):(s=n,a=o,A=16):t?(l=t,s=n,A=6):(s=n,A=7);e:for(;;)if((A|0)==6){if(s)t=l;else{A=26;break}for(;;){l=d[o>>0]|0;do if(((l&255)+-1|0)>>>0<127&&s>>>0>4&(o&3|0)==0){for(a=o;;){if(o=e[a>>2]|0,(o+-16843009|o)&-2139062144){l=o,o=a,A=32;break}if(e[t>>2]=o&255,e[t+4>>2]=N[a+1>>0],e[t+8>>2]=N[a+2>>0],o=a+4|0,l=t+16|0,e[t+12>>2]=N[a+3>>0],s=s+-4|0,s>>>0>4)t=l,a=o;else{A=31;break}}if((A|0)==31){t=l,l=d[o>>0]|0;break}else if((A|0)==32){l=l&255;break}}while(!1);if(l=l&255,(l+-1|0)>>>0>=127)break;if(o=o+1|0,e[t>>2]=l,s=s+-1|0,s)t=t+4|0;else{A=26;break e}}if(l=l+-194|0,l>>>0>50){A=48;break}m=t,c=e[37076+(l<<2)>>2]|0,o=o+1|0,A=37;continue}else if((A|0)==7){if(l=d[o>>0]|0,((l&255)+-1|0)>>>0<127&&!(o&3|0)){if(l=e[o>>2]|0,!((l+-16843009|l)&-2139062144))do o=o+4|0,s=s+-4|0,l=e[o>>2]|0;while(!((l+-16843009|l)&-2139062144|0));l=l&255}if(l=l&255,(l+-1|0)>>>0<127){s=s+-1|0,o=o+1|0,A=7;continue}if(l=l+-194|0,l>>>0>50){A=48;break}l=e[37076+(l<<2)>>2]|0,a=o+1|0,A=16;continue}else if((A|0)==16){if(A=(N[a>>0]|0)>>>3,(A+-16|A+(l>>26))>>>0>7){A=17;break}if(o=a+1|0,l&33554432){if((d[o>>0]&-64)<<24>>24!=-128){A=20;break}if(o=a+2|0,l&524288){if((d[o>>0]&-64)<<24>>24!=-128){A=23;break}o=a+3|0}}s=s+-1|0,A=7;continue}else if((A|0)==37){if(l=N[o>>0]|0,A=l>>>3,(A+-16|A+(c>>26))>>>0>7){A=38;break}if(a=o+1|0,t=l+-128|c<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){A=41;break}if(a=o+2|0,t=l+-128|t<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){A=44;break}t=l+-128|t<<6,o=o+3|0}else o=a}else o=a;e[m>>2]=t,l=m+4|0,s=s+-1|0,A=6;continue}return(A|0)==17||(A|0)==20||(A|0)==23?(o=a+-1|0,A=47):(A|0)==26?e[r>>2]=o:(A|0)==38?(t=m,l=c,o=o+-1|0,A=47):((A|0)==41||(A|0)==44)&&(s=m,n=o+-1|0,A=52),(A|0)==47&&(l?(s=t,n=o,A=52):A=48),(A|0)==48&&(d[o>>0]|0?(s=t,n=o,A=52):(t&&(e[t>>2]=0,e[r>>2]=0),n=n-s|0)),(A|0)==52&&(A=di()|0,e[A>>2]=84,s&&(e[r>>2]=n),n=-1),n|0}function Ap(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,s=a;e:do if(!r)s=0;else{do if(n){if(l=t|0?t:s,s=d[r>>0]|0,t=s&255,s<<24>>24>-1){e[l>>2]=t,s=s<<24>>24!=0&1;break e}if(s=t+-194|0,s>>>0<=50){if(t=r+1|0,o=e[37076+(s<<2)>>2]|0,n>>>0<4&&o&-2147483648>>>((n*6|0)+-6|0)|0)break;if(s=N[t>>0]|0,n=s>>>3,(n+-16|n+(o>>26))>>>0<=7){if(s=s+-128|o<<6,(s|0)>=0){e[l>>2]=s,s=2;break e}if(t=N[r+2>>0]|0,(t&192|0)==128){if(t=t+-128|s<<6,(t|0)>=0){e[l>>2]=t,s=3;break e}if(s=N[r+3>>0]|0,(s&192|0)==128){e[l>>2]=s+-128|t<<6,s=4;break e}}}}}while(!1);s=di()|0,e[s>>2]=84,s=-1}while(!1);return y=a,s|0}function Ut(t,r,n){t=t|0,r=r|0,n=n|0;do if(t){if(r>>>0<128){d[t>>0]=r,t=1;break}if(r>>>0<2048){d[t>>0]=r>>>6|192,d[t+1>>0]=r&63|128,t=2;break}if(r>>>0<55296|(r&-8192|0)==57344){d[t>>0]=r>>>12|224,d[t+1>>0]=r>>>6&63|128,d[t+2>>0]=r&63|128,t=3;break}if((r+-65536|0)>>>0<1048576){d[t>>0]=r>>>18|240,d[t+1>>0]=r>>>12&63|128,d[t+2>>0]=r>>>6&63|128,d[t+3>>0]=r&63|128,t=4;break}else{t=di()|0,e[t>>2]=84,t=-1;break}}else t=1;while(!1);return t|0}function Sp(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0;p=y,y=y+272|0,c=p+8|0,A=p,a=e[r>>2]|0,e[A>>2]=a,m=(t|0)!=0,o=m?s:256,s=m?t:c,t=a;e:do if((o|0)!=0&(a|0)!=0){for(a=o,l=t,o=0;;){if(t=n>>>0>=a>>>0,!(t|n>>>0>32)){t=l;break e}if(t=t?a:n,n=n-t|0,t=vp(s,A,t,0)|0,(t|0)==-1){o=n;break}if(D=(s|0)==(c|0),T=D?0:t,l=a-T|0,s=D?s:s+t|0,o=t+o|0,t=e[A>>2]|0,(a|0)!=(T|0)&(t|0)!=0)a=l,l=t;else{a=l;break e}}n=o,a=0,t=e[A>>2]|0,o=-1}else a=o,o=0;while(!1);e:do if(t|0&&(a|0)!=0&(n|0)!=0){for(l=t,t=s;s=Ut(t,e[l>>2]|0,0)|0,!((s+1|0)>>>0<2);)if(l=(e[A>>2]|0)+4|0,e[A>>2]=l,n=n+-1|0,o=o+1|0,(a|0)!=(s|0)&(n|0)!=0)a=a-s|0,t=t+s|0;else break e;s?o=-1:e[A>>2]=0}while(!1);return m&&(e[r>>2]=e[A>>2]),y=p,o|0}function vp(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;e:do if(t){i:do if(n>>>0>3){for(s=n,o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l)break;if(l=Ut(t,l,0)|0,(l|0)==-1){n=-1;break e}t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,s>>>0<=3)break i}d[t>>0]=0,e[r>>2]=0,n=n-s|0;break e}else s=n;while(!1);if(s){for(o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l){o=19;break}if(l=Ut(a,l,0)|0,(l|0)==-1){n=-1;break e}if(s>>>0>>0){o=22;break}Ut(t,e[o>>2]|0,0)|0,t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,!s)break e}if((o|0)==19){d[t>>0]=0,e[r>>2]=0,n=n-s|0;break}else if((o|0)==22){n=n-s|0;break}}}else if(t=e[r>>2]|0,s=e[t>>2]|0,!s)n=0;else{n=0;do{if(s>>>0>127){if(s=Ut(a,s,0)|0,(s|0)==-1){n=-1;break e}}else s=1;n=s+n|0,t=t+4|0,s=e[t>>2]|0}while(s|0)}while(!1);return y=c,n|0}function yn(t,r){return t=t|0,r=r|0,t?t=Ut(t,r,0)|0:t=0,t|0}function Mt(t){return t=t|0,0}function ht(t){t=t|0}function Dn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,m=0;m=y,y=y+16|0,c=m,a=r&255,d[c>>0]=a,s=t+16|0,o=e[s>>2]|0,o?l=4:En(t)|0?n=-1:(o=e[s>>2]|0,l=4);do if((l|0)==4){if(s=t+20|0,l=e[s>>2]|0,l>>>0>>0&&(n=r&255,(n|0)!=(d[t+75>>0]|0))){e[s>>2]=l+1,d[l>>0]=a;break}(ze[e[t+36>>2]&63](t,c,1)|0)==1?n=N[c>>0]|0:n=-1}while(!1);return y=m,n|0}function wp(t){t=t|0;var r=0,n=0;return r=y,y=y+16|0,n=r,e[n>>2]=e[t+60>>2],t=Kt(Xn(6,n|0)|0)|0,y=r,t|0}function xp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0;return A=y,y=y+48|0,l=A+16|0,o=A,s=A+32|0,e[s>>2]=r,a=s+4|0,m=t+48|0,p=e[m>>2]|0,e[a>>2]=n-((p|0)!=0&1),c=t+44|0,e[s+8>>2]=e[c>>2],e[s+12>>2]=p,e[9258]|0?(N1(185,t|0),e[o>>2]=e[t+60>>2],e[o+4>>2]=s,e[o+8>>2]=2,s=Kt(B1(145,o|0)|0)|0,U1(0)):(e[l>>2]=e[t+60>>2],e[l+4>>2]=s,e[l+8>>2]=2,s=Kt(B1(145,l|0)|0)|0),(s|0)>=1?(a=e[a>>2]|0,s>>>0>a>>>0&&(l=e[c>>2]|0,o=t+4|0,e[o>>2]=l,e[t+8>>2]=l+(s-a),e[m>>2]|0&&(e[o>>2]=l+1,d[r+(n+-1)>>0]=d[l>>0]|0),s=n)):(e[t>>2]=e[t>>2]|s&48^16,e[t+8>>2]=0,e[t+4>>2]=0),y=A,s|0}function Cp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return o=y,y=y+32|0,l=o,s=o+20|0,e[l>>2]=e[t+60>>2],e[l+4>>2]=0,e[l+8>>2]=r,e[l+12>>2]=s,e[l+16>>2]=n,(Kt(Zn(140,l|0)|0)|0)<0?(e[s>>2]=-1,t=-1):t=e[s>>2]|0,y=o,t|0}function In(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0;for(U=y,y=y+48|0,T=U+16|0,p=U,s=U+32|0,D=t+28|0,o=e[D>>2]|0,e[s>>2]=o,E=t+20|0,o=(e[E>>2]|0)-o|0,e[s+4>>2]=o,e[s+8>>2]=r,e[s+12>>2]=n,m=t+60|0,A=t+44|0,r=2,o=o+n|0;;){if(e[9258]|0?(N1(186,t|0),e[p>>2]=e[m>>2],e[p+4>>2]=s,e[p+8>>2]=r,a=Kt(q1(146,p|0)|0)|0,U1(0)):(e[T>>2]=e[m>>2],e[T+4>>2]=s,e[T+8>>2]=r,a=Kt(q1(146,T|0)|0)|0),(o|0)==(a|0)){o=6;break}if((a|0)<0){o=8;break}o=o-a|0,l=e[s+4>>2]|0,a>>>0<=l>>>0?(r|0)==2?(e[D>>2]=(e[D>>2]|0)+a,c=l,r=2):c=l:(c=e[A>>2]|0,e[D>>2]=c,e[E>>2]=c,c=e[s+12>>2]|0,a=a-l|0,s=s+8|0,r=r+-1|0),e[s>>2]=(e[s>>2]|0)+a,e[s+4>>2]=c-a}return(o|0)==6?(T=e[A>>2]|0,e[t+16>>2]=T+(e[t+48>>2]|0),t=T,e[D>>2]=t,e[E>>2]=t):(o|0)==8&&(e[t+16>>2]=0,e[D>>2]=0,e[E>>2]=0,e[t>>2]=e[t>>2]|32,(r|0)==2?n=0:n=n-(e[s+4>>2]|0)|0),y=U,n|0}function Tp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+80|0,s=o,e[t+36>>2]=8,!(e[t>>2]&64|0)&&(e[s>>2]=e[t+60>>2],e[s+4>>2]=21505,e[s+8>>2]=o+12,(Qn(54,s|0)|0)!=0)&&(d[t+75>>0]=-1),s=In(t,r,n)|0,y=o,s|0}function yp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return s=t+84|0,l=e[s>>2]|0,a=n+256|0,o=Pn(l,0,a)|0,o=o|0?o-l|0:a,n=o>>>0>>0?o:n,ei(r|0,l|0,n|0)|0,e[t+4>>2]=l+n,r=l+o|0,e[t+8>>2]=r,e[s>>2]=r,n|0}function kn(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=t+20|0,n=t+44|0,(e[r>>2]|0)>>>0>(e[n>>2]|0)>>>0&&ze[e[t+36>>2]&63](t,0,0)|0,e[t+16>>2]=0,e[t+28>>2]=0,e[r>>2]=0,r=e[t>>2]|0,r&20?(r&4&&(e[t>>2]=r|32),r=-1):(r=e[n>>2]|0,e[t+8>>2]=r,e[t+4>>2]=r,r=0),r|0}function En(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=e[t>>2]|0,r&8?(e[t>>2]=r|32,r=-1):(e[t+8>>2]=0,e[t+4>>2]=0,r=e[t+44>>2]|0,e[t+28>>2]=r,e[t+20>>2]=r,e[t+16>>2]=r+(e[t+48>>2]|0),r=0),r|0}function D1(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,!(e[t+8>>2]|0)&&kn(t)|0?r=-1:(ze[e[t+32>>2]&63](t,r,1)|0)==1?r=N[r>>0]|0:r=-1,y=n,r|0}function I1(t){t=t|0;var r=0,n=0;do if(t){if((e[t+76>>2]|0)<=-1){r=F1(t)|0;break}n=(Mt(t)|0)==0,r=F1(t)|0,n||ht(t)}else{if(e[9323]|0?r=I1(e[9323]|0)|0:r=0,Fi(37060),t=e[9264]|0,t)do(e[t+76>>2]|0)>-1?n=Mt(t)|0:n=0,(e[t+20>>2]|0)>>>0>(e[t+28>>2]|0)>>>0&&(r=F1(t)|0|r),n&&ht(t),t=e[t+56>>2]|0;while(t|0);Hn(37060)}while(!1);return r|0}function Dp(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;(e[r+76>>2]|0)>=0&&Mt(r)|0?((d[r+75>>0]|0)!=(t|0)&&(s=r+20|0,o=e[s>>2]|0,o>>>0<(e[r+16>>2]|0)>>>0)?(e[s>>2]=o+1,d[o>>0]=t,n=t&255):n=Dn(r,t)|0,ht(r)):a=3;do if((a|0)==3){if((d[r+75>>0]|0)!=(t|0)&&(l=r+20|0,n=e[l>>2]|0,n>>>0<(e[r+16>>2]|0)>>>0)){e[l>>2]=n+1,d[n>>0]=t,n=t&255;break}n=Dn(r,t)|0}while(!1);return n|0}function Ui(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;s=n+16|0,o=e[s>>2]|0,o?l=4:En(n)|0?s=0:(o=e[s>>2]|0,l=4);e:do if((l|0)==4){if(a=n+20|0,l=e[a>>2]|0,(o-l|0)>>>0>>0){s=ze[e[n+36>>2]&63](n,t,r)|0;break}i:do if((d[n+75>>0]|0)>-1){for(s=r;;){if(!s){o=l,s=0;break i}if(o=s+-1|0,(d[t+o>>0]|0)==10)break;s=o}if((ze[e[n+36>>2]&63](n,t,s)|0)>>>0>>0)break e;r=r-s|0,t=t+s|0,o=e[a>>2]|0}else o=l,s=0;while(!1);ei(o|0,t|0,r|0)|0,e[a>>2]=(e[a>>2]|0)+r,s=s+r|0}while(!1);return s|0}function dt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=W(n,r)|0,(e[s+76>>2]|0)>-1?(l=(Mt(s)|0)==0,t=Ui(t,o,s)|0,l||ht(s)):t=Ui(t,o,s)|0,(t|0)!=(o|0)&&(n=(t>>>0)/(r>>>0)|0),n|0}function Er(t){t=t|0;var r=0,n=0,s=0;(e[t+76>>2]|0)>=0&&Mt(t)|0?(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0?(e[r>>2]=n+1,r=N[n>>0]|0):r=D1(t)|0):s=3;do if((s|0)==3)if(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0){e[r>>2]=n+1,r=N[n>>0]|0;break}else{r=D1(t)|0;break}while(!1);return r|0}function Fn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=Mr(t,r,n,l)|0,y=o,s|0}function Mn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=y,y=y+16|0,o=s,e[o>>2]=n,n=Rn(t,r,o)|0,y=s,n|0}function Fr(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;do if((t|0)!=-1){if((e[r+76>>2]|0)>-1?o=Mt(r)|0:o=0,!(e[r+8>>2]|0)&&kn(r)|0||(l=6),(l|0)==6&&(n=r+4|0,s=e[n>>2]|0,s>>>0>((e[r+44>>2]|0)+-8|0)>>>0)){if(l=s+-1|0,e[n>>2]=l,d[l>>0]=t,e[r>>2]=e[r>>2]&-17,!o)break;ht(r);break}o&&ht(r),t=-1}else t=-1;while(!1);return t|0}function Ip(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,s=c,o=Ti(240)|0;do if(o){if(e[s>>2]=e[n>>2],s=Mr(o,240,r,s)|0,s>>>0<240){r=bt(o,s+1|0)|0,e[t>>2]=r|0?r:o;break}Ze(o),(s|0)>=0&&(a=s+1|0,l=Ti(a)|0,e[t>>2]=l,(l|0)!=0)?s=Mr(l,a,r,n)|0:s=-1}else s=-1;while(!1);return y=c,s|0}function _n(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0;V=y,y=y+224|0,T=V+80|0,U=V+96|0,E=V,D=V+136|0,s=U,o=s+40|0;do e[s>>2]=0,s=s+4|0;while((s|0)<(o|0));return e[T>>2]=e[n>>2],(o1(0,r,T,E,U)|0)<0?n=-1:((e[t+76>>2]|0)>-1?A=Mt(t)|0:A=0,n=e[t>>2]|0,p=n&32,(d[t+74>>0]|0)<1&&(e[t>>2]=n&-33),n=t+48|0,e[n>>2]|0?s=o1(t,r,T,E,U)|0:(o=t+44|0,l=e[o>>2]|0,e[o>>2]=D,a=t+28|0,e[a>>2]=D,c=t+20|0,e[c>>2]=D,e[n>>2]=80,m=t+16|0,e[m>>2]=D+80,s=o1(t,r,T,E,U)|0,l&&(ze[e[t+36>>2]&63](t,0,0)|0,s=e[c>>2]|0?s:-1,e[o>>2]=l,e[n>>2]=0,e[m>>2]=0,e[a>>2]=0,e[c>>2]=0)),n=e[t>>2]|0,e[t>>2]=n|p,A&&ht(t),n=n&32|0?-1:s),y=V,n|0}function kp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,m=0,A=0,p=0,T=0,D=0,E=0,U=0,V=0,q=0,O=0,R=0,F=0,M=0,X=0,K=0,t0=0,J=0,s0=0,w0=0,S0=0,A0=0,Y0=0,Qe=0,Re=0,$e=0,We=0,_e=0;We=y,y=y+304|0,s0=We+16|0,S0=We+8|0,w0=We+33|0,A0=We,O=We+32|0,(e[t+76>>2]|0)>-1?$e=Mt(t)|0:$e=0,s=d[r>>0]|0;e:do if(s<<24>>24){Y0=t+4|0,Qe=t+100|0,J=t+108|0,R=t+8|0,F=w0+10|0,M=w0+33|0,X=S0+4|0,K=w0+46|0,t0=w0+94|0,l=s,s=0,a=r,T=0,o=0,r=0;i:for(;;){t:do if(Xt(l&255)|0){for(;l=a+1|0,Xt(N[l>>0]|0)|0;)a=l;rt(t,0);do l=e[Y0>>2]|0,l>>>0<(e[Qe>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);l=e[Y0>>2]|0,e[Qe>>2]|0&&(l=l+-1|0,e[Y0>>2]=l),c=(e[J>>2]|0)+T+l-(e[R>>2]|0)|0}else{l=(d[a>>0]|0)==37;r:do if(l){A=a+1|0,c=d[A>>0]|0;n:do switch(c<<24>>24){case 37:break r;case 42:{q=0,c=a+2|0;break}default:{if(c=(c&255)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36){for(e[s0>>2]=e[n>>2];q=(e[s0>>2]|0)+3&-4,l=e[q>>2]|0,e[s0>>2]=q+4,c>>>0>1;)c=c+-1|0;q=l,c=a+3|0;break n}c=(e[n>>2]|0)+3&-4,q=e[c>>2]|0,e[n>>2]=c+4,c=A}}while(!1);if(l=d[c>>0]|0,a=l&255,(a+-48|0)>>>0<10)for(l=0;A=(l*10|0)+-48+a|0,c=c+1|0,l=d[c>>0]|0,a=l&255,!((a+-48|0)>>>0>=10);)l=A;else A=0;switch(l<<24>>24==109?(c=c+1|0,p=d[c>>0]|0,l=(q|0)!=0&1,o=0,r=0):(p=l,l=0),a=c+1|0,p&255|0){case 104:{V=(d[a>>0]|0)==104,a=V?c+2|0:a,c=V?-2:-1;break}case 108:{V=(d[a>>0]|0)==108,a=V?c+2|0:a,c=V?3:1;break}case 106:{c=3;break}case 116:case 122:{c=1;break}case 76:{c=2;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{a=c,c=0;break}default:{Re=152;break i}}switch(p=N[a>>0]|0,D=(p&47|0)==3,p=D?p|32:p,D=D?1:c,p|0){case 99:{V=T,U=(A|0)<1?1:A;break}case 91:{V=T,U=A;break}case 110:{if(!q){c=T;break t}switch(D|0){case-2:{d[q>>0]=T,c=T;break t}case-1:{k[q>>1]=T,c=T;break t}case 0:{e[q>>2]=T,c=T;break t}case 1:{e[q>>2]=T,c=T;break t}case 3:{c=q,e[c>>2]=T,e[c+4>>2]=((T|0)<0)<<31>>31,c=T;break t}default:{c=T;break t}}}default:{rt(t,0);do c=e[Y0>>2]|0,c>>>0<(e[Qe>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0;while(Xt(c)|0);c=e[Y0>>2]|0,e[Qe>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),V=(e[J>>2]|0)+T+c-(e[R>>2]|0)|0,U=A}}if(rt(t,U),c=e[Y0>>2]|0,A=e[Qe>>2]|0,c>>>0>>0)e[Y0>>2]=c+1;else{if((si(t)|0)<0){Re=152;break i}A=e[Qe>>2]|0}A&&(e[Y0>>2]=(e[Y0>>2]|0)+-1);n:do switch(p|0){case 91:case 99:case 115:{E=(p|0)==99;s:do if((p&239|0)==99)je(w0|0,-1,257)|0,d[w0>>0]=0,(p|0)==115&&(d[M>>0]=0,d[F>>0]=0,d[F+1>>0]=0,d[F+2>>0]=0,d[F+3>>0]=0,d[F+4>>0]=0);else{switch(_e=a+1|0,T=(d[_e>>0]|0)==94,c=T&1,p=T?_e:a,a=T?a+2|0:_e,je(w0|0,T&1|0,257)|0,d[w0>>0]=0,d[a>>0]|0){case 45:{T=(c^1)&255,d[K>>0]=T,a=p+2|0;break}case 93:{T=(c^1)&255,d[t0>>0]=T,a=p+2|0;break}default:T=(c^1)&255}for(;;){c=d[a>>0]|0;o:do switch(c<<24>>24){case 0:{Re=152;break i}case 93:break s;case 45:{switch(p=a+1|0,c=d[p>>0]|0,c<<24>>24){case 93:case 0:{c=45;break o}default:}if(a=d[a+-1>>0]|0,(a&255)<(c&255)){a=a&255;do a=a+1|0,d[w0+a>>0]=T,c=d[p>>0]|0;while((a|0)<(c&255|0));a=p}else a=p;break}default:}while(!1);d[w0+((c&255)+1)>>0]=T,a=a+1|0}}while(!1);p=E?U+1|0:31,T=(D|0)==1,D=(l|0)!=0;s:do if(T){if(D){if(r=Ti(p<<2)|0,!r){o=0,Re=152;break i}}else r=q;e[S0>>2]=0,e[X>>2]=0,o=0;o:for(;;){A=(r|0)==0;do{l:for(;;){if(c=e[Y0>>2]|0,c>>>0<(e[Qe>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0,!(d[w0+(c+1)>>0]|0))break o;switch(d[O>>0]=c,kr(A0,O,1,S0)|0){case-1:{o=0,Re=152;break i}case-2:break;default:break l}}A||(e[r+(o<<2)>>2]=e[A0>>2],o=o+1|0)}while(!(D&(o|0)==(p|0)));if(o=p<<1|1,c=bt(r,o<<2)|0,!c){o=0,Re=152;break i}_e=p,p=o,r=c,o=_e}if(gp(S0)|0)A=o,o=0;else{o=0,Re=152;break i}}else{if(D){if(o=Ti(p)|0,o)c=0;else{o=0,r=0,Re=152;break i}for(;;){do{if(r=e[Y0>>2]|0,r>>>0<(e[Qe>>2]|0)>>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){A=c,r=0;break s}d[o+c>>0]=r,c=c+1|0}while((c|0)!=(p|0));if(r=p<<1|1,c=bt(o,r)|0,c)_e=p,p=r,o=c,c=_e;else{r=0,Re=152;break i}}}if(q)for(o=0;;){if(r=e[Y0>>2]|0,r>>>0>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){A=o,o=q,r=0;break s}d[q+o>>0]=r,A=e[Qe>>2]|0,o=o+1|0}else for(o=A;;){if(r=e[Y0>>2]|0,r>>>0>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){A=0,o=0,r=0;break s}o=e[Qe>>2]|0}}while(!1);if(c=e[Y0>>2]|0,e[Qe>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),c=c-(e[R>>2]|0)+(e[J>>2]|0)|0,!c||!((c|0)==(U|0)|E^1))break i;do if(D)if(T){e[q>>2]=r;break}else{e[q>>2]=o;break}while(!1);if(!E){if(r&&(e[r+(A<<2)>>2]=0),!o){o=0;break n}d[o+A>>0]=0}break}case 120:case 88:case 112:{c=16,Re=134;break}case 111:{c=8,Re=134;break}case 117:case 100:{c=10,Re=134;break}case 105:{c=0,Re=134;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{if(m=+pn(t,D,0),(e[J>>2]|0)==((e[R>>2]|0)-(e[Y0>>2]|0)|0))break i;if(q)switch(D|0){case 0:{i0[q>>2]=m;break n}case 1:{j[q>>3]=m;break n}case 2:{j[q>>3]=m;break n}default:break n}break}default:}while(!1);n:do if((Re|0)==134){if(Re=0,c=An(t,c,0,-1,-1)|0,(e[J>>2]|0)==((e[R>>2]|0)-(e[Y0>>2]|0)|0))break i;if((q|0)!=0&(p|0)==112){e[q>>2]=c;break}if(q)switch(D|0){case-2:{d[q>>0]=c;break n}case-1:{k[q>>1]=c;break n}case 0:{e[q>>2]=c;break n}case 1:{e[q>>2]=c;break n}case 3:{_e=q,e[_e>>2]=c,e[_e+4>>2]=D0;break n}default:break n}}while(!1);s=((q|0)!=0&1)+s|0,c=(e[J>>2]|0)+V+(e[Y0>>2]|0)-(e[R>>2]|0)|0;break t}while(!1);if(a=a+(l&1)|0,rt(t,0),l=e[Y0>>2]|0,l>>>0<(e[Qe>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|0)!=(N[a>>0]|0)){Re=21;break i}c=T+1|0}while(!1);if(a=a+1|0,l=d[a>>0]|0,l<<24>>24)T=c;else break e}if((Re|0)==21){if(e[Qe>>2]|0&&(e[Y0>>2]=(e[Y0>>2]|0)+-1),(s|0)!=0|(l|0)>-1)break;s=0,Re=153}else(Re|0)==152&&(s||(s=l,Re=153));(Re|0)==153&&(l=s,s=-1),l&&(Ze(o),Ze(r))}else s=0;while(!1);return $e&&ht(t),y=We,s|0}function Mr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,m=0,A=0,p=0;p=y,y=y+128|0,o=p+112|0,A=p,l=A,a=37352,c=l+112|0;do e[l>>2]=e[a>>2],l=l+4|0,a=a+4|0;while((l|0)<(c|0));return(r+-1|0)>>>0>2147483646?r?(r=di()|0,e[r>>2]=75,r=-1):(r=1,m=4):(o=t,m=4),(m|0)==4&&(m=-2-o|0,m=r>>>0>m>>>0?m:r,e[A+48>>2]=m,t=A+20|0,e[t>>2]=o,e[A+44>>2]=o,r=o+m|0,o=A+16|0,e[o>>2]=r,e[A+28>>2]=r,r=_n(A,n,s)|0,m&&(n=e[t>>2]|0,d[n+(((n|0)==(e[o>>2]|0))<<31>>31)>>0]=0)),y=p,r|0}function Rn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=y,y=y+112|0,s=l,o=s,a=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));return e[s+32>>2]=29,e[s+44>>2]=t,e[s+76>>2]=-1,e[s+84>>2]=t,a=kp(s,r,n)|0,y=l,a|0}function k1(t,r,n){return t=t|0,r=r|0,n=n|0,+ +A4(t,r,2)}function Ep(t,r,n){return t=t|0,r=r|0,n=n|0,t=E2(t,r,n,-1,-1)|0,t|0}function Fp(t,r,n){return t=t|0,r=r|0,n=n|0,t=E2(t,r,n,0,-2147483648)|0,t|0}function Pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=r&255,s=(n|0)!=0;e:do if(s&(t&3|0)!=0)for(o=r&255;;){if((d[t>>0]|0)==o<<24>>24){a=6;break e}if(t=t+1|0,n=n+-1|0,s=(n|0)!=0,!(s&(t&3|0)!=0)){a=5;break}}else a=5;while(!1);(a|0)==5&&(s?a=6:n=0);e:do if((a|0)==6&&(o=r&255,(d[t>>0]|0)!=o<<24>>24)){s=W(l,16843009)|0;i:do if(n>>>0>3){for(;l=e[t>>2]^s,!((l&-2139062144^-2139062144)&l+-16843009);)if(t=t+4|0,n=n+-4|0,n>>>0<=3){a=11;break i}}else a=11;while(!1);if((a|0)==11&&!n){n=0;break}for(;;){if((d[t>>0]|0)==o<<24>>24)break e;if(t=t+1|0,n=n+-1|0,!n){n=0;break}}}while(!1);return(n|0?t:0)|0}function Mp(t,r){t=t|0,r=r|0;var n=0,s=0;n=r;e:do if((n^t)&3)s=8;else{if(n&3)do{if(n=d[r>>0]|0,d[t>>0]=n,!(n<<24>>24))break e;r=r+1|0,t=t+1|0}while(r&3|0);if(n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009))for(s=t;r=r+4|0,t=s+4|0,e[s>>2]=n,n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009);)s=t;s=8}while(!1);if((s|0)==8&&(s=d[r>>0]|0,d[t>>0]=s,s<<24>>24))do r=r+1|0,t=t+1|0,s=d[r>>0]|0,d[t>>0]=s;while(s<<24>>24);return t|0}function Ln(t,r){t=t|0,r=r|0;var n=0,s=0;if(s=d[t>>0]|0,n=d[r>>0]|0,!(s<<24>>24)||s<<24>>24!=n<<24>>24)r=s;else{do t=t+1|0,r=r+1|0,s=d[t>>0]|0,n=d[r>>0]|0;while(!(!(s<<24>>24)||s<<24>>24!=n<<24>>24));r=s}return(r&255)-(n&255)|0}function E1(t,r){return t=t|0,r=r|0,Mp(t,r)|0,t|0}function Ot(t){t=t|0;var r=0,n=0,s=0;s=t;e:do if(!(s&3))n=4;else for(r=t,t=s;;){if(!(d[r>>0]|0))break e;if(r=r+1|0,t=r,!(t&3)){t=r,n=4;break}}while(!1);if((n|0)==4){for(;r=e[t>>2]|0,!((r&-2139062144^-2139062144)&r+-16843009);)t=t+4|0;if((r&255)<<24>>24)do t=t+1|0;while(d[t>>0]|0)}return t-s|0}function _p(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(!n)r=0;else{s=d[t>>0]|0;e:do if(!(s<<24>>24))s=0;else for(;;){if(n=n+-1|0,o=d[r>>0]|0,!(s<<24>>24==o<<24>>24&((n|0)!=0&o<<24>>24!=0)))break e;if(t=t+1|0,r=r+1|0,s=d[t>>0]|0,!(s<<24>>24)){s=0;break}}while(!1);r=(s&255)-(N[r>>0]|0)|0}return r|0}function _r(t){t=t|0;var r=0;for(r=t;e[r>>2]|0;)r=r+4|0;return r-t>>2|0}function Nt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=e[r>>2],n;)r=r+4|0,s=s+4|0;return t|0}function Rp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(s=(n|0)==0,t-r>>2>>>0>>0){if(!s)do n=n+-1|0,e[t+(n<<2)>>2]=e[r+(n<<2)>>2];while(n|0)}else if(!s)for(s=r,r=t;n=n+-1|0,e[r>>2]=e[s>>2],n;)s=s+4|0,r=r+4|0;return t|0}function Pp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=r,n;)s=s+4|0;return t|0}function Un(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;switch(a=t+4|0,n=e[a>>2]|0,c=t+100|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,n|0){case 43:case 45:{s=(n|0)==45&1,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,(r|0)!=0&(n+-48|0)>>>0>9&&e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),l=s;break}default:l=0}if((n+-48|0)>>>0>9)e[c>>2]|0?(e[a>>2]=(e[a>>2]|0)+-1,s=-2147483648,n=0):(s=-2147483648,n=0);else{s=0;do s=n+-48+(s*10|0)|0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&(s|0)<214748364);if(r=((s|0)<0)<<31>>31,(n+-48|0)>>>0<10){do r=Ht(s|0,r|0,10,0)|0,s=D0,n=Li(n|0,((n|0)<0)<<31>>31|0,-48,-1)|0,s=Li(n|0,D0|0,r|0,s|0)|0,r=D0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&((r|0)<21474836|(r|0)==21474836&s>>>0<2061584302));o=s}else o=s;if((n+-48|0)>>>0<10)do n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10);e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),t=(l|0)!=0,n=Ji(0,0,o|0,r|0)|0,s=t?D0:r,n=t?n:o}return D0=s,n|0}function Lp(t){t=t|0,e[t+68>>2]|0||ht(t)}function Up(t){t=t|0,e[t+68>>2]|0||ht(t)}function F1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return r=t+20|0,l=t+28|0,(e[r>>2]|0)>>>0>(e[l>>2]|0)>>>0&&(ze[e[t+36>>2]&63](t,0,0)|0,(e[r>>2]|0)==0)?r=-1:(a=t+4|0,n=e[a>>2]|0,s=t+8|0,o=e[s>>2]|0,n>>>0>>0&&ze[e[t+40>>2]&63](t,n-o|0,1)|0,e[t+16>>2]=0,e[l>>2]=0,e[r>>2]=0,e[s>>2]=0,e[a>>2]=0,r=0),r|0}var Op=[kt,Xu,Zu,jc,Wc,eh,th,dr,gr,kt,kt,kt,kt,kt,kt,kt],Rr=[tr,B8,jf,Of,Df,df,nf,ja,Pa,Yg,Hg,Qg,tr,tr,tr,tr],Np=[en,oh,mh,en],Ce=[Xe,U8,O8,zf,Qf,Rf,Pf,xf,Cf,uf,cf,$a,ef,za,Qa,Ea,Fa,Sa,va,fa,ua,$l,ea,zl,Ql,Pl,Ll,Jo,$o,zo,Qo,xs,Cs,Eo,Ro,Fo,n3,Y2,s3,o3,no,so,hg,oo,Zs,Js,Os,Ns,bs,Gs,Ys,js,lo,ao,ho,mo,So,vo,To,yo,bo,Go,ll,al,ml,dl,vl,wl,yl,Dl,ba,Ga,l5,j8,tg,rg,mg,dg,Tg,yg,Cr,Eg,_g,Rg,Lg,Ng,Ug,Og,Vg,Bg,ir,E4,L4,ce,V4,H4,l1,o5,D5,V5,Z5,G2,J5,$5,i3,Q2,t3,r3,u3,j2,c3,h3,S3,v3,Bi,w3,x3,C3,y3,Uh,E3,F3,P3,L3,Y3,j3,s6,o6,A6,S6,nu,su,Du,Iu,Yu,ju,Ku,Wu,$u,ic,hc,mc,Tc,yc,Lc,Uc,Hc,Yc,Jc,$c,nh,sh,uh,hh,Ah,Sh,Ch,Th,I2,Fh,k2,Zh,Z2,g4,K2,W6,W2,Z6,T3,Lh,Nh,o4,M6,V6,Y6,j6,gg,an,ct,ws,m1,e3,Oo,Oa,ip,Lp,Up,T4,lp,Xc,ar,Oh,Id,Pd,Ld,Ud,Od,Nd,Vd,a0,ye,Ze,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe],Ke=[w1,V8,Yf,Uf,yf,mf,rf,Ya,Ra,wa,ca,ia,Hl,Ul,el,Ho,Ts,I5,ng,sg,F4,P4,B4,Q4,B5,nc,sc,oc,ac,uc,cc,pc,Ac,Sc,vc,xc,Cc,kc,Ec,Fc,Mc,Rc,Pc,Vc,Bc,qc,bc,zc,Qc,xh,Ih,tm,nm,om,rm,sm,lm,ms,pg,og,lg,fn,y5,Ms,Rs,l3,C5,d5,Uo,Xo,Fl,Vl,Xl,na,da,Ta,Ua,Ka,of,pf,kf,Vf,Kf,G8,eg,Ft,Z4,K4,T5,m3,W4,h5,S5,A5,jm,Xm,Km,Wm,Zm,Jm,d4,$m,ed,id,rd,nd,sd,od,ld,ad,ud,cd,hd,md,dd,gd,pd,Ad,Sd,vd,wd,xd,Cd,Td,yd,zd,w1,w1],rr=[Ii,U3,O3,N3,V3,B3,q3,b3,G3,z3,Q3,H3,X3,K3,W3,Z3,J3,$3,e6,i6,t6,r6,n6,u6,h6,C6,$f,lu,au,fu,uu,cu,Eu,Fu,Mu,_u,Ru,fh,ph,Bt,Qt,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii,Ii],Se=[Je,M5,_5,io,L5,X8,Dg,Fg,Pg,wp,M4,Q5,Y5,j5,z5,U4,O4,q4,P5,Y4,j4,d3,ou,am,um,hm,Sm,wm,dm,pm,ku,fm,cm,mm,vm,xm,gm,Am,tc,rc,fc,dc,gc,wc,Dc,Ic,_c,Oc,Nc,Gc,I6,k6,F6,J6,em,$6,im,u4,c4,m4,L6,U6,N6,G6,z6,H6,Z8,G0,li,ui,z2,H2,D8,I8,k8,nt,_r,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je],Vp=[tn,Kc,ih,tn],ze=[wi,k5,R5,O5,$4,e5,qg,S4,In,Cp,xp,Tp,q5,H5,_4,K5,G4,k3,R3,vh,yh,$h,i4,n4,Vh,Qh,Yh,Kh,_s,p4,N2,up,Qm,Ym,Ut,Ap,dp,Ip,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi],Bp=[rn,ah,gh,rn],Vt=[Et,$s,Kg,Xg,jg,b5,E5,wh,Dh,Et,Et,Et,Et,Et,Et,Et],qp=[vr,f6,d6,x6,iu,vr,vr,vr],bp=[wr,Zc,rh,lh,dh,wr,wr,wr],Ni=[Ri,N8,Hf,Lf,Tf,hf,tf,Ha,Ma,Ca,ma,ra,jl,Nl,tl,jo,Ds,to,ro,X5,R4,N4,W5,U5,z4,X4,N5,Jh,e4,t4,Gh,Hh,jh,Ag,ps,Ss,a3,Pi,f3,fp,ap,u5,g5,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri],nr=[ut,D3,M3,l6,a6,c6,p6,v6,w6,Jf,ru,s4,D6,E6,Wh,f4,h4,P6,O6,b6,Q6,Sp,pp,ut,ut,ut,ut,ut,ut,ut,ut,ut],Gp=[E8,Yd,Hd,Qd],zp=[Lt,ds,un,Di,_h,Rh,Ph,tp,np,rp,Lt,Lt,Lt,Lt,Lt,Lt],M1=[Yt,xa,ha,ta,Yl,Ol,il,Yo,ys,r4,Bh,qh,bh,Xh,W8,ig,_m,bm,Tn,op,kr,Jd,Zd,Wd,Kd,Xd,jd,Yt,Yt,Yt,Yt,Yt],Pr=[F8,J4,K8,g3,Sg,xt,M8,s5,O2,ag,t5,A3,Gm,zm,Hm,c1],On=[nn,_8,Jg,R8,$g,P8,yr,nn],Ct=[jt,hu,Pu,T6,y6,l4,a4,_6,R6,B6,q6,jt,jt,jt,jt,jt],Qp=[xr,m6,g6,eu,tu,xr,xr,xr],Lr=[Gi,Po,Lo,Mo,_o,eo,Vs,Bs,zs,Qs,Xs,Ks,fo,uo,go,po,wo,xo,Do,Io,ul,cl,pl,Al,xl,Cl,Il,kl,bg,Gg,zg,G5,F5,I3,_3,ls,n5,Is,ks,Es,Fs,Ps,Ls,Us,rl,nl,sl,ol,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi];return{_jpegls_encode:wg,___cxa_can_catch:Wg,_free:Ze,_jpegls_decode:vg,___cxa_is_pointer_type:Zg,_i64Add:Li,_memmove:pr,_i64Subtract:Ji,_memset:je,_malloc:Ti,_memcpy:ei,_bitshift64Lshr:It,_bitshift64Shl:pi,__GLOBAL__I_000101:y4,__GLOBAL__sub_I_jpegls_cpp:vs,__GLOBAL__sub_I_iostream_cpp:D4,runPostSets:$d,_emscripten_replace_memory:Jn,stackAlloc:$n,stackSave:es,stackRestore:is,establishStackSpace:ts,setThrew:rs,setTempRet0:ns,getTempRet0:ss,dynCall_iiiiiiii:i8,dynCall_viiiii:t8,dynCall_iiiiiid:r8,dynCall_vi:n8,dynCall_vii:s8,dynCall_iiiiiii:o8,dynCall_ii:l8,dynCall_iiiiiiiiiiii:a8,dynCall_iiii:f8,dynCall_viiiiiiiiiiiiiii:c8,dynCall_viiiiii:h8,dynCall_viiiiiii:m8,dynCall_viiiiiiiiii:d8,dynCall_iii:g8,dynCall_iiiiii:p8,dynCall_diii:A8,dynCall_i:S8,dynCall_iiiii:v8,dynCall_viii:w8,dynCall_v:x8,dynCall_iiiiiiiii:C8,dynCall_iiiiid:T8,dynCall_viiii:y8}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module._jpegls_encode=asm._jpegls_encode,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module._jpegls_decode=asm._jpegls_decode,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type;var _i64Add=Module._i64Add=asm._i64Add,_memmove=Module._memmove=asm._memmove,_i64Subtract=Module._i64Subtract=asm._i64Subtract,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_memcpy=Module._memcpy=asm._memcpy,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory;Module.runPostSets=asm.runPostSets,Module.__GLOBAL__sub_I_iostream_cpp=asm.__GLOBAL__sub_I_iostream_cpp;var _bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,__GLOBAL__sub_I_jpegls_cpp=Module.__GLOBAL__sub_I_jpegls_cpp=asm.__GLOBAL__sub_I_jpegls_cpp,__GLOBAL__I_000101=Module.__GLOBAL__I_000101=asm.__GLOBAL__I_000101,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl;Module.dynCall_iiiiiiii=asm.dynCall_iiiiiiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_iiiiiid=asm.dynCall_iiiiiid,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_vii=asm.dynCall_vii,Module.dynCall_iiiiiii=asm.dynCall_iiiiiii,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_iiiiiiiiiiii=asm.dynCall_iiiiiiiiiiii,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiiiiiiiiiiiii=asm.dynCall_viiiiiiiiiiiiiii,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiiiiii=asm.dynCall_viiiiiii,Module.dynCall_viiiiiiiiii=asm.dynCall_viiiiiiiiii,Module.dynCall_iii=asm.dynCall_iii,Module.dynCall_iiiiii=asm.dynCall_iiiiii,Module.dynCall_diii=asm.dynCall_diii,Module.dynCall_i=asm.dynCall_i,Module.dynCall_iiiii=asm.dynCall_iiiii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_iiiiiiiii=asm.dynCall_iiiiiiiii,Module.dynCall_iiiiid=asm.dynCall_iiiiid,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0;function ExitStatus(C){this.name="ExitStatus",this.message="Program terminated with exit("+C+")",this.status=C}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function C(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=C)},Module.callMain=Module.callMain=function C(u){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called"),u=u||[],ensureInitRuntime();var h=u.length+1;function g(){for(var I=0;I<3;I++)S.push(0)}var S=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];g();for(var v=0;v0||(preRun(),runDependencies>0)||Module.calledRun)return;function u(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(C),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),u()},1)):u()}Module.run=Module.run=run;function exit(C,u){if(!(u&&Module.noExitRuntime))throw Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(C)),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",function(){process.exit(C)}),console.log(" "),setTimeout(function(){process.exit(C)},500)):ENVIRONMENT_IS_SHELL&&typeof quit=="function"&&quit(C),new ExitStatus(C)}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(C){C!==void 0?(Module.print(C),Module.printErr(C),C=JSON.stringify(C)):C="",ABORT=!0;var u=` +If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,h="abort("+C+") at "+stackTrace()+u;throw abortDecorators&&abortDecorators.forEach(function(g){h=g(h,C)}),h}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),Module};module.exports&&(module.exports=CharLS)}(charLSDynamicMemoryBrowser)),charLSDynamicMemoryBrowser.exports}var hasRequiredJpegLs;function requireJpegLs(){return hasRequiredJpegLs||(hasRequiredJpegLs=1,function(C){var u=u||(typeof commonjsRequire<"u"?requireCharLSDynamicMemoryBrowser():null),h=function(){var g;function S(){}S.prototype={decodeJPEGLS:function(_,P){return I(_,P)}};function v(_,P){var L=g._malloc(_.length);g.writeArrayToMemory(_,L);var d=g._malloc(4),k=g._malloc(4),e=g._malloc(4),N=g._malloc(4),B=g._malloc(4),Q=g._malloc(4),i0=g._malloc(4),j=g._malloc(4),H=g._malloc(4),y=g.ccall("jpegls_decode","number",["number","number","number","number","number","number","number","number","number","number","number"],[L,_.length,d,k,e,N,B,Q,j,i0,H]),Y={result:y,width:g.getValue(e,"i32"),height:g.getValue(N,"i32"),bitsPerSample:g.getValue(B,"i32"),stride:g.getValue(Q,"i32"),components:g.getValue(j,"i32"),allowedLossyError:g.getValue(i0,"i32"),interleaveMode:g.getValue(H,"i32"),pixelData:void 0},G=g.getValue(d,"*");return Y.bitsPerSample<=8?(Y.pixelData=new Uint8Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint8Array(g.HEAP8.buffer,G,Y.pixelData.length))):P?(Y.pixelData=new Int16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Int16Array(g.HEAP16.buffer,G,Y.pixelData.length))):(Y.pixelData=new Uint16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint16Array(g.HEAP16.buffer,G,Y.pixelData.length))),g._free(L),g._free(G),g._free(d),g._free(k),g._free(e),g._free(N),g._free(B),g._free(Q),g._free(j),g._free(H),Y}function w(){if(typeof u>"u")throw"No JPEG-LS decoder loaded";if(!g&&(g=u(),!g||!g._jpegls_decode))throw"JPEG-LS failed to initialize"}function I(_,P){w();var L=v(_,P);if(L.result!==0&&L.result!==6)throw"JPEG-LS decoder failed to decode frame (error code "+L.result+")";var d={};return d.columns=L.width,d.rows=L.height,d.pixelData=L.pixelData,d}return S}();C.exports&&(C.exports=h)}(jpegLs)),jpegLs.exports}var parser={exports:{}},pako={},deflate$1={},deflate={},trees={},hasRequiredTrees;function requireTrees(){if(hasRequiredTrees)return trees;hasRequiredTrees=1;const C=4,u=0,h=1,g=2;function S(W){let U0=W.length;for(;--U0>=0;)W[U0]=0}const v=0,w=1,I=2,_=3,P=258,L=29,d=256,k=d+1+L,e=30,N=19,B=2*k+1,Q=15,i0=16,j=7,H=256,y=16,Y=17,G=18,Z=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),e0=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),z=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),f=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f0=512,o0=new Array((k+2)*2);S(o0);const c0=new Array(e*2);S(c0);const m0=new Array(f0);S(m0);const v0=new Array(P-_+1);S(v0);const g0=new Array(L);S(g0);const x0=new Array(e);S(x0);function T0(W,U0,X0,z0,oe){this.static_tree=W,this.extra_bits=U0,this.extra_base=X0,this.elems=z0,this.max_length=oe,this.has_stree=W&&W.length}let M0,ee,re;function Fe(W,U0){this.dyn_tree=W,this.max_code=0,this.stat_desc=U0}const Oe=W=>W<256?m0[W]:m0[256+(W>>>7)],ke=(W,U0)=>{W.pending_buf[W.pending++]=U0&255,W.pending_buf[W.pending++]=U0>>>8&255},D0=(W,U0,X0)=>{W.bi_valid>i0-X0?(W.bi_buf|=U0<>i0-W.bi_valid,W.bi_valid+=X0-i0):(W.bi_buf|=U0<{D0(W,X0[U0*2],X0[U0*2+1])},Ge=(W,U0)=>{let X0=0;do X0|=W&1,W>>>=1,X0<<=1;while(--U0>0);return X0>>>1},ti=W=>{W.bi_valid===16?(ke(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0):W.bi_valid>=8&&(W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8)},ai=(W,U0)=>{const X0=U0.dyn_tree,z0=U0.max_code,oe=U0.stat_desc.static_tree,ue=U0.stat_desc.has_stree,I0=U0.stat_desc.extra_bits,b0=U0.stat_desc.extra_base,n0=U0.stat_desc.max_length;let h0,Ee,u0,Me,L0,Ye,W0=0;for(Me=0;Me<=Q;Me++)W.bl_count[Me]=0;for(X0[W.heap[W.heap_max]*2+1]=0,h0=W.heap_max+1;h0n0&&(Me=n0,W0++),X0[Ee*2+1]=Me,!(Ee>z0)&&(W.bl_count[Me]++,L0=0,Ee>=b0&&(L0=I0[Ee-b0]),Ye=X0[Ee*2],W.opt_len+=Ye*(Me+L0),ue&&(W.static_len+=Ye*(oe[Ee*2+1]+L0)));if(W0!==0){do{for(Me=n0-1;W.bl_count[Me]===0;)Me--;W.bl_count[Me]--,W.bl_count[Me+1]+=2,W.bl_count[n0]--,W0-=2}while(W0>0);for(Me=n0;Me!==0;Me--)for(Ee=W.bl_count[Me];Ee!==0;)u0=W.heap[--h0],!(u0>z0)&&(X0[u0*2+1]!==Me&&(W.opt_len+=(Me-X0[u0*2+1])*X0[u0*2],X0[u0*2+1]=Me),Ee--)}},ri=(W,U0,X0)=>{const z0=new Array(Q+1);let oe=0,ue,I0;for(ue=1;ue<=Q;ue++)oe=oe+X0[ue-1]<<1,z0[ue]=oe;for(I0=0;I0<=U0;I0++){let b0=W[I0*2+1];b0!==0&&(W[I0*2]=Ge(z0[b0]++,b0))}},qe=()=>{let W,U0,X0,z0,oe;const ue=new Array(Q+1);for(X0=0,z0=0;z0>=7;z0{let U0;for(U0=0;U0{W.bi_valid>8?ke(W,W.bi_buf):W.bi_valid>0&&(W.pending_buf[W.pending++]=W.bi_buf),W.bi_buf=0,W.bi_valid=0},F0=(W,U0,X0,z0)=>{const oe=U0*2,ue=X0*2;return W[oe]{const z0=W.heap[X0];let oe=X0<<1;for(;oe<=W.heap_len&&(oe{let z0,oe,ue=0,I0,b0;if(W.sym_next!==0)do z0=W.pending_buf[W.sym_buf+ue++]&255,z0+=(W.pending_buf[W.sym_buf+ue++]&255)<<8,oe=W.pending_buf[W.sym_buf+ue++],z0===0?Ve(W,oe,U0):(I0=v0[oe],Ve(W,I0+d+1,U0),b0=Z[I0],b0!==0&&(oe-=g0[I0],D0(W,oe,b0)),z0--,I0=Oe(z0),Ve(W,I0,X0),b0=e0[I0],b0!==0&&(z0-=x0[I0],D0(W,z0,b0)));while(ue{const X0=U0.dyn_tree,z0=U0.stat_desc.static_tree,oe=U0.stat_desc.has_stree,ue=U0.stat_desc.elems;let I0,b0,n0=-1,h0;for(W.heap_len=0,W.heap_max=B,I0=0;I0>1;I0>=1;I0--)se(W,X0,I0);h0=ue;do I0=W.heap[1],W.heap[1]=W.heap[W.heap_len--],se(W,X0,1),b0=W.heap[1],W.heap[--W.heap_max]=I0,W.heap[--W.heap_max]=b0,X0[h0*2]=X0[I0*2]+X0[b0*2],W.depth[h0]=(W.depth[I0]>=W.depth[b0]?W.depth[I0]:W.depth[b0])+1,X0[I0*2+1]=X0[b0*2+1]=h0,W.heap[1]=h0++,se(W,X0,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],ai(W,U0),ri(X0,n0,W.bl_count)},me=(W,U0,X0)=>{let z0,oe=-1,ue,I0=U0[0*2+1],b0=0,n0=7,h0=4;for(I0===0&&(n0=138,h0=3),U0[(X0+1)*2+1]=65535,z0=0;z0<=X0;z0++)ue=I0,I0=U0[(z0+1)*2+1],!(++b0{let z0,oe=-1,ue,I0=U0[0*2+1],b0=0,n0=7,h0=4;for(I0===0&&(n0=138,h0=3),z0=0;z0<=X0;z0++)if(ue=I0,I0=U0[(z0+1)*2+1],!(++b0{let U0;for(me(W,W.dyn_ltree,W.l_desc.max_code),me(W,W.dyn_dtree,W.d_desc.max_code),R0(W,W.bl_desc),U0=N-1;U0>=3&&W.bl_tree[f[U0]*2+1]===0;U0--);return W.opt_len+=3*(U0+1)+5+5+4,U0},V0=(W,U0,X0,z0)=>{let oe;for(D0(W,U0-257,5),D0(W,X0-1,5),D0(W,z0-4,4),oe=0;oe{let U0=4093624447,X0;for(X0=0;X0<=31;X0++,U0>>>=1)if(U0&1&&W.dyn_ltree[X0*2]!==0)return u;if(W.dyn_ltree[9*2]!==0||W.dyn_ltree[10*2]!==0||W.dyn_ltree[13*2]!==0)return h;for(X0=32;X0{j0||(qe(),j0=!0),W.l_desc=new Fe(W.dyn_ltree,M0),W.d_desc=new Fe(W.dyn_dtree,ee),W.bl_desc=new Fe(W.bl_tree,re),W.bi_buf=0,W.bi_valid=0,be(W)},B0=(W,U0,X0,z0)=>{D0(W,(v<<1)+(z0?1:0),3),J0(W),ke(W,X0),ke(W,~X0),X0&&W.pending_buf.set(W.window.subarray(U0,U0+X0),W.pending),W.pending+=X0},pe=W=>{D0(W,w<<1,3),Ve(W,H,o0),ti(W)},q0=(W,U0,X0,z0)=>{let oe,ue,I0=0;W.level>0?(W.strm.data_type===g&&(W.strm.data_type=k0(W)),R0(W,W.l_desc),R0(W,W.d_desc),I0=O0(W),oe=W.opt_len+3+7>>>3,ue=W.static_len+3+7>>>3,ue<=oe&&(oe=ue)):oe=ue=X0+5,X0+4<=oe&&U0!==-1?B0(W,U0,X0,z0):W.strategy===C||ue===oe?(D0(W,(w<<1)+(z0?1:0),3),C0(W,o0,c0)):(D0(W,(I<<1)+(z0?1:0),3),V0(W,W.l_desc.max_code+1,W.d_desc.max_code+1,I0+1),C0(W,W.dyn_ltree,W.dyn_dtree)),be(W),z0&&J0(W)},K0=(W,U0,X0)=>(W.pending_buf[W.sym_buf+W.sym_next++]=U0,W.pending_buf[W.sym_buf+W.sym_next++]=U0>>8,W.pending_buf[W.sym_buf+W.sym_next++]=X0,U0===0?W.dyn_ltree[X0*2]++:(W.matches++,U0--,W.dyn_ltree[(v0[X0]+d+1)*2]++,W.dyn_dtree[Oe(U0)*2]++),W.sym_next===W.sym_end);return trees._tr_init=Q0,trees._tr_stored_block=B0,trees._tr_flush_block=q0,trees._tr_tally=K0,trees._tr_align=pe,trees}var adler32_1,hasRequiredAdler32;function requireAdler32(){return hasRequiredAdler32||(hasRequiredAdler32=1,adler32_1=(u,h,g,S)=>{let v=u&65535|0,w=u>>>16&65535|0,I=0;for(;g!==0;){I=g>2e3?2e3:g,g-=I;do v=v+h[S++]|0,w=w+v|0;while(--I);v%=65521,w%=65521}return v|w<<16|0}),adler32_1}var crc32_1,hasRequiredCrc32;function requireCrc32(){if(hasRequiredCrc32)return crc32_1;hasRequiredCrc32=1;const C=()=>{let g,S=[];for(var v=0;v<256;v++){g=v;for(var w=0;w<8;w++)g=g&1?3988292384^g>>>1:g>>>1;S[v]=g}return S},u=new Uint32Array(C());return crc32_1=(g,S,v,w)=>{const I=u,_=w+v;g^=-1;for(let P=w;P<_;P++)g=g>>>8^I[(g^S[P])&255];return g^-1},crc32_1}var messages,hasRequiredMessages;function requireMessages(){return hasRequiredMessages||(hasRequiredMessages=1,messages={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"}),messages}var constants,hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,constants={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),constants}var hasRequiredDeflate$1;function requireDeflate$1(){if(hasRequiredDeflate$1)return deflate;hasRequiredDeflate$1=1;const{_tr_init:C,_tr_stored_block:u,_tr_flush_block:h,_tr_tally:g,_tr_align:S}=requireTrees(),v=requireAdler32(),w=requireCrc32(),I=requireMessages(),{Z_NO_FLUSH:_,Z_PARTIAL_FLUSH:P,Z_FULL_FLUSH:L,Z_FINISH:d,Z_BLOCK:k,Z_OK:e,Z_STREAM_END:N,Z_STREAM_ERROR:B,Z_DATA_ERROR:Q,Z_BUF_ERROR:i0,Z_DEFAULT_COMPRESSION:j,Z_FILTERED:H,Z_HUFFMAN_ONLY:y,Z_RLE:Y,Z_FIXED:G,Z_DEFAULT_STRATEGY:Z,Z_UNKNOWN:e0,Z_DEFLATED:z}=requireConstants(),f=9,f0=15,o0=8,v0=256+1+29,g0=30,x0=19,T0=2*v0+1,M0=15,ee=3,re=258,Fe=re+ee+1,Oe=32,ke=42,D0=57,Ve=69,Ge=73,ti=91,ai=103,ri=113,qe=666,be=1,J0=2,F0=3,se=4,C0=3,R0=($,Z0)=>($.msg=I[Z0],Z0),me=$=>$*2-($>4?9:0),N0=$=>{let Z0=$.length;for(;--Z0>=0;)$[Z0]=0},O0=$=>{let Z0,p0,E0,d0=$.w_size;Z0=$.hash_size,E0=Z0;do p0=$.head[--E0],$.head[E0]=p0>=d0?p0-d0:0;while(--Z0);Z0=d0,E0=Z0;do p0=$.prev[--E0],$.prev[E0]=p0>=d0?p0-d0:0;while(--Z0)};let k0=($,Z0,p0)=>(Z0<<$.hash_shift^p0)&$.hash_mask;const j0=$=>{const Z0=$.state;let p0=Z0.pending;p0>$.avail_out&&(p0=$.avail_out),p0!==0&&($.output.set(Z0.pending_buf.subarray(Z0.pending_out,Z0.pending_out+p0),$.next_out),$.next_out+=p0,Z0.pending_out+=p0,$.total_out+=p0,$.avail_out-=p0,Z0.pending-=p0,Z0.pending===0&&(Z0.pending_out=0))},Q0=($,Z0)=>{h($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,Z0),$.block_start=$.strstart,j0($.strm)},B0=($,Z0)=>{$.pending_buf[$.pending++]=Z0},pe=($,Z0)=>{$.pending_buf[$.pending++]=Z0>>>8&255,$.pending_buf[$.pending++]=Z0&255},q0=($,Z0,p0,E0)=>{let d0=$.avail_in;return d0>E0&&(d0=E0),d0===0?0:($.avail_in-=d0,Z0.set($.input.subarray($.next_in,$.next_in+d0),p0),$.state.wrap===1?$.adler=v($.adler,Z0,d0,p0):$.state.wrap===2&&($.adler=w($.adler,Z0,d0,p0)),$.next_in+=d0,$.total_in+=d0,d0)},K0=($,Z0)=>{let p0=$.max_chain_length,E0=$.strstart,d0,we,He=$.prev_length,Le=$.nice_match;const P0=$.strstart>$.w_size-Fe?$.strstart-($.w_size-Fe):0,ci=$.window,Ei=$.w_mask,zi=$.prev,Fi=$.strstart+re;let $i=ci[E0+He-1],ae=ci[E0+He];$.prev_length>=$.good_match&&(p0>>=2),Le>$.lookahead&&(Le=$.lookahead);do if(d0=Z0,!(ci[d0+He]!==ae||ci[d0+He-1]!==$i||ci[d0]!==ci[E0]||ci[++d0]!==ci[E0+1])){E0+=2,d0++;do;while(ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&ci[++E0]===ci[++d0]&&E0He){if($.match_start=Z0,He=we,we>=Le)break;$i=ci[E0+He-1],ae=ci[E0+He]}}while((Z0=zi[Z0&Ei])>P0&&--p0!==0);return He<=$.lookahead?He:$.lookahead},W=$=>{const Z0=$.w_size;let p0,E0,d0;do{if(E0=$.window_size-$.lookahead-$.strstart,$.strstart>=Z0+(Z0-Fe)&&($.window.set($.window.subarray(Z0,Z0+Z0-E0),0),$.match_start-=Z0,$.strstart-=Z0,$.block_start-=Z0,$.insert>$.strstart&&($.insert=$.strstart),O0($),E0+=Z0),$.strm.avail_in===0)break;if(p0=q0($.strm,$.window,$.strstart+$.lookahead,E0),$.lookahead+=p0,$.lookahead+$.insert>=ee)for(d0=$.strstart-$.insert,$.ins_h=$.window[d0],$.ins_h=k0($,$.ins_h,$.window[d0+1]);$.insert&&($.ins_h=k0($,$.ins_h,$.window[d0+ee-1]),$.prev[d0&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=d0,d0++,$.insert--,!($.lookahead+$.insert{let p0=$.pending_buf_size-5>$.w_size?$.w_size:$.pending_buf_size-5,E0,d0,we,He=0,Le=$.strm.avail_in;do{if(E0=65535,we=$.bi_valid+42>>3,$.strm.avail_outd0+$.strm.avail_in&&(E0=d0+$.strm.avail_in),E0>we&&(E0=we),E0>8,$.pending_buf[$.pending-2]=~E0,$.pending_buf[$.pending-1]=~E0>>8,j0($.strm),d0&&(d0>E0&&(d0=E0),$.strm.output.set($.window.subarray($.block_start,$.block_start+d0),$.strm.next_out),$.strm.next_out+=d0,$.strm.avail_out-=d0,$.strm.total_out+=d0,$.block_start+=d0,E0-=d0),E0&&(q0($.strm,$.strm.output,$.strm.next_out,E0),$.strm.next_out+=E0,$.strm.avail_out-=E0,$.strm.total_out+=E0)}while(He===0);return Le-=$.strm.avail_in,Le&&(Le>=$.w_size?($.matches=2,$.window.set($.strm.input.subarray($.strm.next_in-$.w_size,$.strm.next_in),0),$.strstart=$.w_size,$.insert=$.strstart):($.window_size-$.strstart<=Le&&($.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,$.insert>$.strstart&&($.insert=$.strstart)),$.window.set($.strm.input.subarray($.strm.next_in-Le,$.strm.next_in),$.strstart),$.strstart+=Le,$.insert+=Le>$.w_size-$.insert?$.w_size-$.insert:Le),$.block_start=$.strstart),$.high_water<$.strstart&&($.high_water=$.strstart),He?se:Z0!==_&&Z0!==d&&$.strm.avail_in===0&&$.strstart===$.block_start?J0:(we=$.window_size-$.strstart,$.strm.avail_in>we&&$.block_start>=$.w_size&&($.block_start-=$.w_size,$.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,we+=$.w_size,$.insert>$.strstart&&($.insert=$.strstart)),we>$.strm.avail_in&&(we=$.strm.avail_in),we&&(q0($.strm,$.window,$.strstart,we),$.strstart+=we,$.insert+=we>$.w_size-$.insert?$.w_size-$.insert:we),$.high_water<$.strstart&&($.high_water=$.strstart),we=$.bi_valid+42>>3,we=$.pending_buf_size-we>65535?65535:$.pending_buf_size-we,p0=we>$.w_size?$.w_size:we,d0=$.strstart-$.block_start,(d0>=p0||(d0||Z0===d)&&Z0!==_&&$.strm.avail_in===0&&d0<=we)&&(E0=d0>we?we:d0,He=Z0===d&&$.strm.avail_in===0&&E0===d0?1:0,u($,$.block_start,E0,He),$.block_start+=E0,j0($.strm)),He?F0:be)},X0=($,Z0)=>{let p0,E0;for(;;){if($.lookahead=ee&&($.ins_h=k0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),p0!==0&&$.strstart-p0<=$.w_size-Fe&&($.match_length=K0($,p0)),$.match_length>=ee)if(E0=g($,$.strstart-$.match_start,$.match_length-ee),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=ee){$.match_length--;do $.strstart++,$.ins_h=k0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=k0($,$.ins_h,$.window[$.strstart+1]);else E0=g($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(E0&&(Q0($,!1),$.strm.avail_out===0))return be}return $.insert=$.strstart{let p0,E0,d0;for(;;){if($.lookahead=ee&&($.ins_h=k0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),$.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=ee-1,p0!==0&&$.prev_length<$.max_lazy_match&&$.strstart-p0<=$.w_size-Fe&&($.match_length=K0($,p0),$.match_length<=5&&($.strategy===H||$.match_length===ee&&$.strstart-$.match_start>4096)&&($.match_length=ee-1)),$.prev_length>=ee&&$.match_length<=$.prev_length){d0=$.strstart+$.lookahead-ee,E0=g($,$.strstart-1-$.prev_match,$.prev_length-ee),$.lookahead-=$.prev_length-1,$.prev_length-=2;do++$.strstart<=d0&&($.ins_h=k0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart);while(--$.prev_length!==0);if($.match_available=0,$.match_length=ee-1,$.strstart++,E0&&(Q0($,!1),$.strm.avail_out===0))return be}else if($.match_available){if(E0=g($,0,$.window[$.strstart-1]),E0&&Q0($,!1),$.strstart++,$.lookahead--,$.strm.avail_out===0)return be}else $.match_available=1,$.strstart++,$.lookahead--}return $.match_available&&(E0=g($,0,$.window[$.strstart-1]),$.match_available=0),$.insert=$.strstart{let p0,E0,d0,we;const He=$.window;for(;;){if($.lookahead<=re){if(W($),$.lookahead<=re&&Z0===_)return be;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=ee&&$.strstart>0&&(d0=$.strstart-1,E0=He[d0],E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0])){we=$.strstart+re;do;while(E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&E0===He[++d0]&&d0$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=ee?(p0=g($,1,$.match_length-ee),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(p0=g($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),p0&&(Q0($,!1),$.strm.avail_out===0))return be}return $.insert=0,Z0===d?(Q0($,!0),$.strm.avail_out===0?F0:se):$.sym_next&&(Q0($,!1),$.strm.avail_out===0)?be:J0},ue=($,Z0)=>{let p0;for(;;){if($.lookahead===0&&(W($),$.lookahead===0)){if(Z0===_)return be;break}if($.match_length=0,p0=g($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,p0&&(Q0($,!1),$.strm.avail_out===0))return be}return $.insert=0,Z0===d?(Q0($,!0),$.strm.avail_out===0?F0:se):$.sym_next&&(Q0($,!1),$.strm.avail_out===0)?be:J0};function I0($,Z0,p0,E0,d0){this.good_length=$,this.max_lazy=Z0,this.nice_length=p0,this.max_chain=E0,this.func=d0}const b0=[new I0(0,0,0,0,U0),new I0(4,4,8,4,X0),new I0(4,5,16,8,X0),new I0(4,6,32,32,X0),new I0(4,4,16,16,z0),new I0(8,16,32,32,z0),new I0(8,16,128,128,z0),new I0(8,32,128,256,z0),new I0(32,128,258,1024,z0),new I0(32,258,258,4096,z0)],n0=$=>{$.window_size=2*$.w_size,N0($.head),$.max_lazy_match=b0[$.level].max_lazy,$.good_match=b0[$.level].good_length,$.nice_match=b0[$.level].nice_length,$.max_chain_length=b0[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=ee-1,$.match_available=0,$.ins_h=0};function h0(){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=z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(T0*2),this.dyn_dtree=new Uint16Array((2*g0+1)*2),this.bl_tree=new Uint16Array((2*x0+1)*2),N0(this.dyn_ltree),N0(this.dyn_dtree),N0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(M0+1),this.heap=new Uint16Array(2*v0+1),N0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*v0+1),N0(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ee=$=>{if(!$)return 1;const Z0=$.state;return!Z0||Z0.strm!==$||Z0.status!==ke&&Z0.status!==D0&&Z0.status!==Ve&&Z0.status!==Ge&&Z0.status!==ti&&Z0.status!==ai&&Z0.status!==ri&&Z0.status!==qe?1:0},u0=$=>{if(Ee($))return R0($,B);$.total_in=$.total_out=0,$.data_type=e0;const Z0=$.state;return Z0.pending=0,Z0.pending_out=0,Z0.wrap<0&&(Z0.wrap=-Z0.wrap),Z0.status=Z0.wrap===2?D0:Z0.wrap?ke:ri,$.adler=Z0.wrap===2?0:1,Z0.last_flush=-2,C(Z0),e},Me=$=>{const Z0=u0($);return Z0===e&&n0($.state),Z0},L0=($,Z0)=>Ee($)||$.state.wrap!==2?B:($.state.gzhead=Z0,e),Ye=($,Z0,p0,E0,d0,we)=>{if(!$)return B;let He=1;if(Z0===j&&(Z0=6),E0<0?(He=0,E0=-E0):E0>15&&(He=2,E0-=16),d0<1||d0>f||p0!==z||E0<8||E0>15||Z0<0||Z0>9||we<0||we>G||E0===8&&He!==1)return R0($,B);E0===8&&(E0=9);const Le=new h0;return $.state=Le,Le.strm=$,Le.status=ke,Le.wrap=He,Le.gzhead=null,Le.w_bits=E0,Le.w_size=1<Ye($,Z0,z,f0,o0,Z),ie=($,Z0)=>{if(Ee($)||Z0>k||Z0<0)return $?R0($,B):B;const p0=$.state;if(!$.output||$.avail_in!==0&&!$.input||p0.status===qe&&Z0!==d)return R0($,$.avail_out===0?i0:B);const E0=p0.last_flush;if(p0.last_flush=Z0,p0.pending!==0){if(j0($),$.avail_out===0)return p0.last_flush=-1,e}else if($.avail_in===0&&me(Z0)<=me(E0)&&Z0!==d)return R0($,i0);if(p0.status===qe&&$.avail_in!==0)return R0($,i0);if(p0.status===ke&&p0.wrap===0&&(p0.status=ri),p0.status===ke){let d0=z+(p0.w_bits-8<<4)<<8,we=-1;if(p0.strategy>=y||p0.level<2?we=0:p0.level<6?we=1:p0.level===6?we=2:we=3,d0|=we<<6,p0.strstart!==0&&(d0|=Oe),d0+=31-d0%31,pe(p0,d0),p0.strstart!==0&&(pe(p0,$.adler>>>16),pe(p0,$.adler&65535)),$.adler=1,p0.status=ri,j0($),p0.pending!==0)return p0.last_flush=-1,e}if(p0.status===D0){if($.adler=0,B0(p0,31),B0(p0,139),B0(p0,8),p0.gzhead)B0(p0,(p0.gzhead.text?1:0)+(p0.gzhead.hcrc?2:0)+(p0.gzhead.extra?4:0)+(p0.gzhead.name?8:0)+(p0.gzhead.comment?16:0)),B0(p0,p0.gzhead.time&255),B0(p0,p0.gzhead.time>>8&255),B0(p0,p0.gzhead.time>>16&255),B0(p0,p0.gzhead.time>>24&255),B0(p0,p0.level===9?2:p0.strategy>=y||p0.level<2?4:0),B0(p0,p0.gzhead.os&255),p0.gzhead.extra&&p0.gzhead.extra.length&&(B0(p0,p0.gzhead.extra.length&255),B0(p0,p0.gzhead.extra.length>>8&255)),p0.gzhead.hcrc&&($.adler=w($.adler,p0.pending_buf,p0.pending,0)),p0.gzindex=0,p0.status=Ve;else if(B0(p0,0),B0(p0,0),B0(p0,0),B0(p0,0),B0(p0,0),B0(p0,p0.level===9?2:p0.strategy>=y||p0.level<2?4:0),B0(p0,C0),p0.status=ri,j0($),p0.pending!==0)return p0.last_flush=-1,e}if(p0.status===Ve){if(p0.gzhead.extra){let d0=p0.pending,we=(p0.gzhead.extra.length&65535)-p0.gzindex;for(;p0.pending+we>p0.pending_buf_size;){let Le=p0.pending_buf_size-p0.pending;if(p0.pending_buf.set(p0.gzhead.extra.subarray(p0.gzindex,p0.gzindex+Le),p0.pending),p0.pending=p0.pending_buf_size,p0.gzhead.hcrc&&p0.pending>d0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0)),p0.gzindex+=Le,j0($),p0.pending!==0)return p0.last_flush=-1,e;d0=0,we-=Le}let He=new Uint8Array(p0.gzhead.extra);p0.pending_buf.set(He.subarray(p0.gzindex,p0.gzindex+we),p0.pending),p0.pending+=we,p0.gzhead.hcrc&&p0.pending>d0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0)),p0.gzindex=0}p0.status=Ge}if(p0.status===Ge){if(p0.gzhead.name){let d0=p0.pending,we;do{if(p0.pending===p0.pending_buf_size){if(p0.gzhead.hcrc&&p0.pending>d0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0)),j0($),p0.pending!==0)return p0.last_flush=-1,e;d0=0}p0.gzindexd0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0)),p0.gzindex=0}p0.status=ti}if(p0.status===ti){if(p0.gzhead.comment){let d0=p0.pending,we;do{if(p0.pending===p0.pending_buf_size){if(p0.gzhead.hcrc&&p0.pending>d0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0)),j0($),p0.pending!==0)return p0.last_flush=-1,e;d0=0}p0.gzindexd0&&($.adler=w($.adler,p0.pending_buf,p0.pending-d0,d0))}p0.status=ai}if(p0.status===ai){if(p0.gzhead.hcrc){if(p0.pending+2>p0.pending_buf_size&&(j0($),p0.pending!==0))return p0.last_flush=-1,e;B0(p0,$.adler&255),B0(p0,$.adler>>8&255),$.adler=0}if(p0.status=ri,j0($),p0.pending!==0)return p0.last_flush=-1,e}if($.avail_in!==0||p0.lookahead!==0||Z0!==_&&p0.status!==qe){let d0=p0.level===0?U0(p0,Z0):p0.strategy===y?ue(p0,Z0):p0.strategy===Y?oe(p0,Z0):b0[p0.level].func(p0,Z0);if((d0===F0||d0===se)&&(p0.status=qe),d0===be||d0===F0)return $.avail_out===0&&(p0.last_flush=-1),e;if(d0===J0&&(Z0===P?S(p0):Z0!==k&&(u(p0,0,0,!1),Z0===L&&(N0(p0.head),p0.lookahead===0&&(p0.strstart=0,p0.block_start=0,p0.insert=0))),j0($),$.avail_out===0))return p0.last_flush=-1,e}return Z0!==d?e:p0.wrap<=0?N:(p0.wrap===2?(B0(p0,$.adler&255),B0(p0,$.adler>>8&255),B0(p0,$.adler>>16&255),B0(p0,$.adler>>24&255),B0(p0,$.total_in&255),B0(p0,$.total_in>>8&255),B0(p0,$.total_in>>16&255),B0(p0,$.total_in>>24&255)):(pe(p0,$.adler>>>16),pe(p0,$.adler&65535)),j0($),p0.wrap>0&&(p0.wrap=-p0.wrap),p0.pending!==0?e:N)},Ci=$=>{if(Ee($))return B;const Z0=$.state.status;return $.state=null,Z0===ri?R0($,Q):e},y0=($,Z0)=>{let p0=Z0.length;if(Ee($))return B;const E0=$.state,d0=E0.wrap;if(d0===2||d0===1&&E0.status!==ke||E0.lookahead)return B;if(d0===1&&($.adler=v($.adler,Z0,p0,0)),E0.wrap=0,p0>=E0.w_size){d0===0&&(N0(E0.head),E0.strstart=0,E0.block_start=0,E0.insert=0);let P0=new Uint8Array(E0.w_size);P0.set(Z0.subarray(p0-E0.w_size,p0),0),Z0=P0,p0=E0.w_size}const we=$.avail_in,He=$.next_in,Le=$.input;for($.avail_in=p0,$.next_in=0,$.input=Z0,W(E0);E0.lookahead>=ee;){let P0=E0.strstart,ci=E0.lookahead-(ee-1);do E0.ins_h=k0(E0,E0.ins_h,E0.window[P0+ee-1]),E0.prev[P0&E0.w_mask]=E0.head[E0.ins_h],E0.head[E0.ins_h]=P0,P0++;while(--ci);E0.strstart=P0,E0.lookahead=ee-1,W(E0)}return E0.strstart+=E0.lookahead,E0.block_start=E0.strstart,E0.insert=E0.lookahead,E0.lookahead=0,E0.match_length=E0.prev_length=ee-1,E0.match_available=0,$.next_in=He,$.input=Le,$.avail_in=we,E0.wrap=d0,e};return deflate.deflateInit=W0,deflate.deflateInit2=Ye,deflate.deflateReset=Me,deflate.deflateResetKeep=u0,deflate.deflateSetHeader=L0,deflate.deflate=ie,deflate.deflateEnd=Ci,deflate.deflateSetDictionary=y0,deflate.deflateInfo="pako deflate (from Nodeca project)",deflate}var common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;const C=(u,h)=>Object.prototype.hasOwnProperty.call(u,h);return common.assign=function(u){const h=Array.prototype.slice.call(arguments,1);for(;h.length;){const g=h.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(const S in g)C(g,S)&&(u[S]=g[S])}}return u},common.flattenChunks=u=>{let h=0;for(let S=0,v=u.length;S=252?6:g>=248?5:g>=240?4:g>=224?3:g>=192?2:1;u[254]=u[254]=1,strings.string2buf=g=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(g);let S,v,w,I,_,P=g.length,L=0;for(I=0;I>>6,S[_++]=128|v&63):v<65536?(S[_++]=224|v>>>12,S[_++]=128|v>>>6&63,S[_++]=128|v&63):(S[_++]=240|v>>>18,S[_++]=128|v>>>12&63,S[_++]=128|v>>>6&63,S[_++]=128|v&63);return S};const h=(g,S)=>{if(S<65534&&g.subarray&&C)return String.fromCharCode.apply(null,g.length===S?g:g.subarray(0,S));let v="";for(let w=0;w{const v=S||g.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(g.subarray(0,S));let w,I;const _=new Array(v*2);for(I=0,w=0;w4){_[I++]=65533,w+=L-1;continue}for(P&=L===2?31:L===3?15:7;L>1&&w1){_[I++]=65533;continue}P<65536?_[I++]=P:(P-=65536,_[I++]=55296|P>>10&1023,_[I++]=56320|P&1023)}return h(_,I)},strings.utf8border=(g,S)=>{S=S||g.length,S>g.length&&(S=g.length);let v=S-1;for(;v>=0&&(g[v]&192)===128;)v--;return v<0||v===0?S:v+u[g[v]]>S?v:S},strings}var zstream,hasRequiredZstream;function requireZstream(){if(hasRequiredZstream)return zstream;hasRequiredZstream=1;function C(){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}return zstream=C,zstream}var hasRequiredDeflate;function requireDeflate(){if(hasRequiredDeflate)return deflate$1;hasRequiredDeflate=1;const C=requireDeflate$1(),u=requireCommon(),h=requireStrings(),g=requireMessages(),S=requireZstream(),v=Object.prototype.toString,{Z_NO_FLUSH:w,Z_SYNC_FLUSH:I,Z_FULL_FLUSH:_,Z_FINISH:P,Z_OK:L,Z_STREAM_END:d,Z_DEFAULT_COMPRESSION:k,Z_DEFAULT_STRATEGY:e,Z_DEFLATED:N}=requireConstants();function B(H){this.options=u.assign({level:k,method:N,chunkSize:16384,windowBits:15,memLevel:8,strategy:e},H||{});let y=this.options;y.raw&&y.windowBits>0?y.windowBits=-y.windowBits:y.gzip&&y.windowBits>0&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let Y=C.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(Y!==L)throw new Error(g[Y]);if(y.header&&C.deflateSetHeader(this.strm,y.header),y.dictionary){let G;if(typeof y.dictionary=="string"?G=h.string2buf(y.dictionary):v.call(y.dictionary)==="[object ArrayBuffer]"?G=new Uint8Array(y.dictionary):G=y.dictionary,Y=C.deflateSetDictionary(this.strm,G),Y!==L)throw new Error(g[Y]);this._dict_set=!0}}B.prototype.push=function(H,y){const Y=this.strm,G=this.options.chunkSize;let Z,e0;if(this.ended)return!1;for(y===~~y?e0=y:e0=y===!0?P:w,typeof H=="string"?Y.input=h.string2buf(H):v.call(H)==="[object ArrayBuffer]"?Y.input=new Uint8Array(H):Y.input=H,Y.next_in=0,Y.avail_in=Y.input.length;;){if(Y.avail_out===0&&(Y.output=new Uint8Array(G),Y.next_out=0,Y.avail_out=G),(e0===I||e0===_)&&Y.avail_out<=6){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(Z=C.deflate(Y,e0),Z===d)return Y.next_out>0&&this.onData(Y.output.subarray(0,Y.next_out)),Z=C.deflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===L;if(Y.avail_out===0){this.onData(Y.output);continue}if(e0>0&&Y.next_out>0){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(Y.avail_in===0)break}return!0},B.prototype.onData=function(H){this.chunks.push(H)},B.prototype.onEnd=function(H){H===L&&(this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=H,this.msg=this.strm.msg};function Q(H,y){const Y=new B(y);if(Y.push(H,!0),Y.err)throw Y.msg||g[Y.err];return Y.result}function i0(H,y){return y=y||{},y.raw=!0,Q(H,y)}function j(H,y){return y=y||{},y.gzip=!0,Q(H,y)}return deflate$1.Deflate=B,deflate$1.deflate=Q,deflate$1.deflateRaw=i0,deflate$1.gzip=j,deflate$1.constants=requireConstants(),deflate$1}var inflate$1={},inflate={},inffast,hasRequiredInffast;function requireInffast(){if(hasRequiredInffast)return inffast;hasRequiredInffast=1;const C=16209,u=16191;return inffast=function(g,S){let v,w,I,_,P,L,d,k,e,N,B,Q,i0,j,H,y,Y,G,Z,e0,z,f,f0,o0;const c0=g.state;v=g.next_in,f0=g.input,w=v+(g.avail_in-5),I=g.next_out,o0=g.output,_=I-(S-g.avail_out),P=I+(g.avail_out-257),L=c0.dmax,d=c0.wsize,k=c0.whave,e=c0.wnext,N=c0.window,B=c0.hold,Q=c0.bits,i0=c0.lencode,j=c0.distcode,H=(1<>>24,B>>>=G,Q-=G,G=Y>>>16&255,G===0)o0[I++]=Y&65535;else if(G&16){Z=Y&65535,G&=15,G&&(Q>>=G,Q-=G),Q<15&&(B+=f0[v++]<>>24,B>>>=G,Q-=G,G=Y>>>16&255,G&16){if(e0=Y&65535,G&=15,QL){g.msg="invalid distance too far back",c0.mode=C;break e}if(B>>>=G,Q-=G,G=I-_,e0>G){if(G=e0-G,G>k&&c0.sane){g.msg="invalid distance too far back",c0.mode=C;break e}if(z=0,f=N,e===0){if(z+=d-G,G2;)o0[I++]=f[z++],o0[I++]=f[z++],o0[I++]=f[z++],Z-=3;Z&&(o0[I++]=f[z++],Z>1&&(o0[I++]=f[z++]))}else{z=I-e0;do o0[I++]=o0[z++],o0[I++]=o0[z++],o0[I++]=o0[z++],Z-=3;while(Z>2);Z&&(o0[I++]=o0[z++],Z>1&&(o0[I++]=o0[z++]))}}else if(G&64){g.msg="invalid distance code",c0.mode=C;break e}else{Y=j[(Y&65535)+(B&(1<>3,v-=Z,Q-=Z<<3,B&=(1<{const H=j.bits;let y=0,Y=0,G=0,Z=0,e0=0,z=0,f=0,f0=0,o0=0,c0=0,m0,v0,g0,x0,T0,M0=null,ee;const re=new Uint16Array(C+1),Fe=new Uint16Array(C+1);let Oe=null,ke,D0,Ve;for(y=0;y<=C;y++)re[y]=0;for(Y=0;Y=1&&re[Z]===0;Z--);if(e0>Z&&(e0=Z),Z===0)return B[Q++]=1<<24|64<<16|0,B[Q++]=1<<24|64<<16|0,j.bits=1,0;for(G=1;G0&&(d===g||Z!==1))return-1;for(Fe[1]=0,y=1;yu||d===v&&o0>h)return 1;for(;;){ke=y-f,i0[Y]+1=ee?(D0=Oe[i0[Y]-ee],Ve=M0[i0[Y]-ee]):(D0=96,Ve=0),m0=1<>f)+v0]=ke<<24|D0<<16|Ve|0;while(v0!==0);for(m0=1<>=1;if(m0!==0?(c0&=m0-1,c0+=m0):c0=0,Y++,--re[y]===0){if(y===Z)break;y=k[e+i0[Y]]}if(y>e0&&(c0&x0)!==g0){for(f===0&&(f=e0),T0+=G,z=y-f,f0=1<u||d===v&&o0>h)return 1;g0=c0&x0,B[g0]=e0<<24|z<<16|T0-Q|0}}return c0!==0&&(B[T0+c0]=y-f<<24|64<<16|0),j.bits=e0,0},inftrees}var hasRequiredInflate$1;function requireInflate$1(){if(hasRequiredInflate$1)return inflate;hasRequiredInflate$1=1;const C=requireAdler32(),u=requireCrc32(),h=requireInffast(),g=requireInftrees(),S=0,v=1,w=2,{Z_FINISH:I,Z_BLOCK:_,Z_TREES:P,Z_OK:L,Z_STREAM_END:d,Z_NEED_DICT:k,Z_STREAM_ERROR:e,Z_DATA_ERROR:N,Z_MEM_ERROR:B,Z_BUF_ERROR:Q,Z_DEFLATED:i0}=requireConstants(),j=16180,H=16181,y=16182,Y=16183,G=16184,Z=16185,e0=16186,z=16187,f=16188,f0=16189,o0=16190,c0=16191,m0=16192,v0=16193,g0=16194,x0=16195,T0=16196,M0=16197,ee=16198,re=16199,Fe=16200,Oe=16201,ke=16202,D0=16203,Ve=16204,Ge=16205,ti=16206,ai=16207,ri=16208,qe=16209,be=16210,J0=16211,F0=852,se=592,R0=15,me=I0=>(I0>>>24&255)+(I0>>>8&65280)+((I0&65280)<<8)+((I0&255)<<24);function N0(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O0=I0=>{if(!I0)return 1;const b0=I0.state;return!b0||b0.strm!==I0||b0.modeJ0?1:0},V0=I0=>{if(O0(I0))return e;const b0=I0.state;return I0.total_in=I0.total_out=b0.total=0,I0.msg="",b0.wrap&&(I0.adler=b0.wrap&1),b0.mode=j,b0.last=0,b0.havedict=0,b0.flags=-1,b0.dmax=32768,b0.head=null,b0.hold=0,b0.bits=0,b0.lencode=b0.lendyn=new Int32Array(F0),b0.distcode=b0.distdyn=new Int32Array(se),b0.sane=1,b0.back=-1,L},k0=I0=>{if(O0(I0))return e;const b0=I0.state;return b0.wsize=0,b0.whave=0,b0.wnext=0,V0(I0)},j0=(I0,b0)=>{let n0;if(O0(I0))return e;const h0=I0.state;return b0<0?(n0=0,b0=-b0):(n0=(b0>>4)+5,b0<48&&(b0&=15)),b0&&(b0<8||b0>15)?e:(h0.window!==null&&h0.wbits!==b0&&(h0.window=null),h0.wrap=n0,h0.wbits=b0,k0(I0))},Q0=(I0,b0)=>{if(!I0)return e;const n0=new N0;I0.state=n0,n0.strm=I0,n0.window=null,n0.mode=j;const h0=j0(I0,b0);return h0!==L&&(I0.state=null),h0},B0=I0=>Q0(I0,R0);let pe=!0,q0,K0;const W=I0=>{if(pe){q0=new Int32Array(512),K0=new Int32Array(32);let b0=0;for(;b0<144;)I0.lens[b0++]=8;for(;b0<256;)I0.lens[b0++]=9;for(;b0<280;)I0.lens[b0++]=7;for(;b0<288;)I0.lens[b0++]=8;for(g(v,I0.lens,0,288,q0,0,I0.work,{bits:9}),b0=0;b0<32;)I0.lens[b0++]=5;g(w,I0.lens,0,32,K0,0,I0.work,{bits:5}),pe=!1}I0.lencode=q0,I0.lenbits=9,I0.distcode=K0,I0.distbits=5},U0=(I0,b0,n0,h0)=>{let Ee;const u0=I0.state;return u0.window===null&&(u0.wsize=1<=u0.wsize?(u0.window.set(b0.subarray(n0-u0.wsize,n0),0),u0.wnext=0,u0.whave=u0.wsize):(Ee=u0.wsize-u0.wnext,Ee>h0&&(Ee=h0),u0.window.set(b0.subarray(n0-h0,n0-h0+Ee),u0.wnext),h0-=Ee,h0?(u0.window.set(b0.subarray(n0-h0,n0),0),u0.wnext=h0,u0.whave=u0.wsize):(u0.wnext+=Ee,u0.wnext===u0.wsize&&(u0.wnext=0),u0.whave{let n0,h0,Ee,u0,Me,L0,Ye,W0,ie,Ci,y0,$,Z0,p0,E0=0,d0,we,He,Le,P0,ci,Ei,zi;const Fi=new Uint8Array(4);let $i,ae;const Ae=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O0(I0)||!I0.output||!I0.input&&I0.avail_in!==0)return e;n0=I0.state,n0.mode===c0&&(n0.mode=m0),Me=I0.next_out,Ee=I0.output,Ye=I0.avail_out,u0=I0.next_in,h0=I0.input,L0=I0.avail_in,W0=n0.hold,ie=n0.bits,Ci=L0,y0=Ye,zi=L;e:for(;;)switch(n0.mode){case j:if(n0.wrap===0){n0.mode=m0;break}for(;ie<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0),W0=0,ie=0,n0.mode=H;break}if(n0.head&&(n0.head.done=!1),!(n0.wrap&1)||(((W0&255)<<8)+(W0>>8))%31){I0.msg="incorrect header check",n0.mode=qe;break}if((W0&15)!==i0){I0.msg="unknown compression method",n0.mode=qe;break}if(W0>>>=4,ie-=4,Ei=(W0&15)+8,n0.wbits===0&&(n0.wbits=Ei),Ei>15||Ei>n0.wbits){I0.msg="invalid window size",n0.mode=qe;break}n0.dmax=1<>8&1),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,ie=0,n0.mode=y;case y:for(;ie<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,Fi[2]=W0>>>16&255,Fi[3]=W0>>>24&255,n0.check=u(n0.check,Fi,4,0)),W0=0,ie=0,n0.mode=Y;case Y:for(;ie<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>8),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,ie=0,n0.mode=G;case G:if(n0.flags&1024){for(;ie<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,ie=0}else n0.head&&(n0.head.extra=null);n0.mode=Z;case Z:if(n0.flags&1024&&($=n0.length,$>L0&&($=L0),$&&(n0.head&&(Ei=n0.head.extra_len-n0.length,n0.head.extra||(n0.head.extra=new Uint8Array(n0.head.extra_len)),n0.head.extra.set(h0.subarray(u0,u0+$),Ei)),n0.flags&512&&n0.wrap&4&&(n0.check=u(n0.check,h0,$,u0)),L0-=$,u0+=$,n0.length-=$),n0.length))break e;n0.length=0,n0.mode=e0;case e0:if(n0.flags&2048){if(L0===0)break e;$=0;do Ei=h0[u0+$++],n0.head&&Ei&&n0.length<65536&&(n0.head.name+=String.fromCharCode(Ei));while(Ei&&$>9&1,n0.head.done=!0),I0.adler=n0.check=0,n0.mode=c0;break;case f0:for(;ie<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=ie&7,ie-=ie&7,n0.mode=ti;break}for(;ie<3;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=1,ie-=1,W0&3){case 0:n0.mode=v0;break;case 1:if(W(n0),n0.mode=re,b0===P){W0>>>=2,ie-=2;break e}break;case 2:n0.mode=T0;break;case 3:I0.msg="invalid block type",n0.mode=qe}W0>>>=2,ie-=2;break;case v0:for(W0>>>=ie&7,ie-=ie&7;ie<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>16^65535)){I0.msg="invalid stored block lengths",n0.mode=qe;break}if(n0.length=W0&65535,W0=0,ie=0,n0.mode=g0,b0===P)break e;case g0:n0.mode=x0;case x0:if($=n0.length,$){if($>L0&&($=L0),$>Ye&&($=Ye),$===0)break e;Ee.set(h0.subarray(u0,u0+$),Me),L0-=$,u0+=$,Ye-=$,Me+=$,n0.length-=$;break}n0.mode=c0;break;case T0:for(;ie<14;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=5,ie-=5,n0.ndist=(W0&31)+1,W0>>>=5,ie-=5,n0.ncode=(W0&15)+4,W0>>>=4,ie-=4,n0.nlen>286||n0.ndist>30){I0.msg="too many length or distance symbols",n0.mode=qe;break}n0.have=0,n0.mode=M0;case M0:for(;n0.have>>=3,ie-=3}for(;n0.have<19;)n0.lens[Ae[n0.have++]]=0;if(n0.lencode=n0.lendyn,n0.lenbits=7,$i={bits:n0.lenbits},zi=g(S,n0.lens,0,19,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,zi){I0.msg="invalid code lengths set",n0.mode=qe;break}n0.have=0,n0.mode=ee;case ee:for(;n0.have>>24,we=E0>>>16&255,He=E0&65535,!(d0<=ie);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=d0,ie-=d0,n0.lens[n0.have++]=He;else{if(He===16){for(ae=d0+2;ie>>=d0,ie-=d0,n0.have===0){I0.msg="invalid bit length repeat",n0.mode=qe;break}Ei=n0.lens[n0.have-1],$=3+(W0&3),W0>>>=2,ie-=2}else if(He===17){for(ae=d0+3;ie>>=d0,ie-=d0,Ei=0,$=3+(W0&7),W0>>>=3,ie-=3}else{for(ae=d0+7;ie>>=d0,ie-=d0,Ei=0,$=11+(W0&127),W0>>>=7,ie-=7}if(n0.have+$>n0.nlen+n0.ndist){I0.msg="invalid bit length repeat",n0.mode=qe;break}for(;$--;)n0.lens[n0.have++]=Ei}}if(n0.mode===qe)break;if(n0.lens[256]===0){I0.msg="invalid code -- missing end-of-block",n0.mode=qe;break}if(n0.lenbits=9,$i={bits:n0.lenbits},zi=g(v,n0.lens,0,n0.nlen,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,zi){I0.msg="invalid literal/lengths set",n0.mode=qe;break}if(n0.distbits=6,n0.distcode=n0.distdyn,$i={bits:n0.distbits},zi=g(w,n0.lens,n0.nlen,n0.ndist,n0.distcode,0,n0.work,$i),n0.distbits=$i.bits,zi){I0.msg="invalid distances set",n0.mode=qe;break}if(n0.mode=re,b0===P)break e;case re:n0.mode=Fe;case Fe:if(L0>=6&&Ye>=258){I0.next_out=Me,I0.avail_out=Ye,I0.next_in=u0,I0.avail_in=L0,n0.hold=W0,n0.bits=ie,h(I0,y0),Me=I0.next_out,Ee=I0.output,Ye=I0.avail_out,u0=I0.next_in,h0=I0.input,L0=I0.avail_in,W0=n0.hold,ie=n0.bits,n0.mode===c0&&(n0.back=-1);break}for(n0.back=0;E0=n0.lencode[W0&(1<>>24,we=E0>>>16&255,He=E0&65535,!(d0<=ie);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Le)],d0=E0>>>24,we=E0>>>16&255,He=E0&65535,!(Le+d0<=ie);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Le,ie-=Le,n0.back+=Le}if(W0>>>=d0,ie-=d0,n0.back+=d0,n0.length=He,we===0){n0.mode=Ge;break}if(we&32){n0.back=-1,n0.mode=c0;break}if(we&64){I0.msg="invalid literal/length code",n0.mode=qe;break}n0.extra=we&15,n0.mode=Oe;case Oe:if(n0.extra){for(ae=n0.extra;ie>>=n0.extra,ie-=n0.extra,n0.back+=n0.extra}n0.was=n0.length,n0.mode=ke;case ke:for(;E0=n0.distcode[W0&(1<>>24,we=E0>>>16&255,He=E0&65535,!(d0<=ie);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Le)],d0=E0>>>24,we=E0>>>16&255,He=E0&65535,!(Le+d0<=ie);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Le,ie-=Le,n0.back+=Le}if(W0>>>=d0,ie-=d0,n0.back+=d0,we&64){I0.msg="invalid distance code",n0.mode=qe;break}n0.offset=He,n0.extra=we&15,n0.mode=D0;case D0:if(n0.extra){for(ae=n0.extra;ie>>=n0.extra,ie-=n0.extra,n0.back+=n0.extra}if(n0.offset>n0.dmax){I0.msg="invalid distance too far back",n0.mode=qe;break}n0.mode=Ve;case Ve:if(Ye===0)break e;if($=y0-Ye,n0.offset>$){if($=n0.offset-$,$>n0.whave&&n0.sane){I0.msg="invalid distance too far back",n0.mode=qe;break}$>n0.wnext?($-=n0.wnext,Z0=n0.wsize-$):Z0=n0.wnext-$,$>n0.length&&($=n0.length),p0=n0.window}else p0=Ee,Z0=Me-n0.offset,$=n0.length;$>Ye&&($=Ye),Ye-=$,n0.length-=$;do Ee[Me++]=p0[Z0++];while(--$);n0.length===0&&(n0.mode=Fe);break;case Ge:if(Ye===0)break e;Ee[Me++]=n0.length,Ye--,n0.mode=Fe;break;case ti:if(n0.wrap){for(;ie<32;){if(L0===0)break e;L0--,W0|=h0[u0++]<{if(O0(I0))return e;let b0=I0.state;return b0.window&&(b0.window=null),I0.state=null,L},oe=(I0,b0)=>{if(O0(I0))return e;const n0=I0.state;return n0.wrap&2?(n0.head=b0,b0.done=!1,L):e},ue=(I0,b0)=>{const n0=b0.length;let h0,Ee,u0;return O0(I0)||(h0=I0.state,h0.wrap!==0&&h0.mode!==o0)?e:h0.mode===o0&&(Ee=1,Ee=C(Ee,b0,n0,0),Ee!==h0.check)?N:(u0=U0(I0,b0,n0,n0),u0?(h0.mode=be,B):(h0.havedict=1,L))};return inflate.inflateReset=k0,inflate.inflateReset2=j0,inflate.inflateResetKeep=V0,inflate.inflateInit=B0,inflate.inflateInit2=Q0,inflate.inflate=X0,inflate.inflateEnd=z0,inflate.inflateGetHeader=oe,inflate.inflateSetDictionary=ue,inflate.inflateInfo="pako inflate (from Nodeca project)",inflate}var gzheader,hasRequiredGzheader;function requireGzheader(){if(hasRequiredGzheader)return gzheader;hasRequiredGzheader=1;function C(){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}return gzheader=C,gzheader}var hasRequiredInflate;function requireInflate(){if(hasRequiredInflate)return inflate$1;hasRequiredInflate=1;const C=requireInflate$1(),u=requireCommon(),h=requireStrings(),g=requireMessages(),S=requireZstream(),v=requireGzheader(),w=Object.prototype.toString,{Z_NO_FLUSH:I,Z_FINISH:_,Z_OK:P,Z_STREAM_END:L,Z_NEED_DICT:d,Z_STREAM_ERROR:k,Z_DATA_ERROR:e,Z_MEM_ERROR:N}=requireConstants();function B(j){this.options=u.assign({chunkSize:1024*64,windowBits:15,to:""},j||{});const H=this.options;H.raw&&H.windowBits>=0&&H.windowBits<16&&(H.windowBits=-H.windowBits,H.windowBits===0&&(H.windowBits=-15)),H.windowBits>=0&&H.windowBits<16&&!(j&&j.windowBits)&&(H.windowBits+=32),H.windowBits>15&&H.windowBits<48&&(H.windowBits&15||(H.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let y=C.inflateInit2(this.strm,H.windowBits);if(y!==P)throw new Error(g[y]);if(this.header=new v,C.inflateGetHeader(this.strm,this.header),H.dictionary&&(typeof H.dictionary=="string"?H.dictionary=h.string2buf(H.dictionary):w.call(H.dictionary)==="[object ArrayBuffer]"&&(H.dictionary=new Uint8Array(H.dictionary)),H.raw&&(y=C.inflateSetDictionary(this.strm,H.dictionary),y!==P)))throw new Error(g[y])}B.prototype.push=function(j,H){const y=this.strm,Y=this.options.chunkSize,G=this.options.dictionary;let Z,e0,z;if(this.ended)return!1;for(H===~~H?e0=H:e0=H===!0?_:I,w.call(j)==="[object ArrayBuffer]"?y.input=new Uint8Array(j):y.input=j,y.next_in=0,y.avail_in=y.input.length;;){for(y.avail_out===0&&(y.output=new Uint8Array(Y),y.next_out=0,y.avail_out=Y),Z=C.inflate(y,e0),Z===d&&G&&(Z=C.inflateSetDictionary(y,G),Z===P?Z=C.inflate(y,e0):Z===e&&(Z=d));y.avail_in>0&&Z===L&&y.state.wrap>0&&j[y.next_in]!==0;)C.inflateReset(y),Z=C.inflate(y,e0);switch(Z){case k:case e:case d:case N:return this.onEnd(Z),this.ended=!0,!1}if(z=y.avail_out,y.next_out&&(y.avail_out===0||Z===L))if(this.options.to==="string"){let f=h.utf8border(y.output,y.next_out),f0=y.next_out-f,o0=h.buf2string(y.output,f);y.next_out=f0,y.avail_out=Y-f0,f0&&y.output.set(y.output.subarray(f,f+f0),0),this.onData(o0)}else this.onData(y.output.length===y.next_out?y.output:y.output.subarray(0,y.next_out));if(!(Z===P&&z===0)){if(Z===L)return Z=C.inflateEnd(this.strm),this.onEnd(Z),this.ended=!0,!0;if(y.avail_in===0)break}}return!0},B.prototype.onData=function(j){this.chunks.push(j)},B.prototype.onEnd=function(j){j===P&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=j,this.msg=this.strm.msg};function Q(j,H){const y=new B(H);if(y.push(j),y.err)throw y.msg||g[y.err];return y.result}function i0(j,H){return H=H||{},H.raw=!0,Q(j,H)}return inflate$1.Inflate=B,inflate$1.inflate=Q,inflate$1.inflateRaw=i0,inflate$1.ungzip=Q,inflate$1.constants=requireConstants(),inflate$1}var hasRequiredPako;function requirePako(){if(hasRequiredPako)return pako;hasRequiredPako=1;const{Deflate:C,deflate:u,deflateRaw:h,gzip:g}=requireDeflate(),{Inflate:S,inflate:v,inflateRaw:w,ungzip:I}=requireInflate(),_=requireConstants();return pako.Deflate=C,pako.deflate=u,pako.deflateRaw=h,pako.gzip=g,pako.Inflate=S,pako.inflate=v,pako.inflateRaw=w,pako.ungzip=I,pako.constants=_,pako}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(C){var u=u||{};u.Tag=u.Tag||(typeof commonjsRequire<"u"?requireTag():null),u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary=u.Dictionary||(typeof commonjsRequire<"u"?requireDictionary():null),u.Image=u.Image||(typeof commonjsRequire<"u"?requireImage():null);var h=h||(typeof commonjsRequire<"u"?requirePako():null);u.Parser=u.Parser||function(){this.littleEndian=!0,this.explicit=!0,this.metaFound=!1,this.metaFinished=!1,this.metaFinishedOffset=-1,this.needsDeflate=!1,this.inflated=null,this.encapsulation=!1,this.level=0,this.error=null},u.Parser.verbose=!1,u.Parser.MAGIC_COOKIE_OFFSET=128,u.Parser.MAGIC_COOKIE=[68,73,67,77],u.Parser.VRS=["AE","AS","AT","CS","DA","DS","DT","FL","FD","IS","LO","LT","OB","OD","OF","OW","PN","SH","SL","SS","ST","TM","UI","UL","UN","US","UT","UC"],u.Parser.DATA_VRS=["OB","OW","OF","SQ","UT","UN","UC"],u.Parser.RAW_DATA_VRS=["OB","OD","OF","OW","UN"],u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE="1.2.840.10008.1.2",u.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE="1.2.840.10008.1.2.1",u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG="1.2.840.10008.1.2.2",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG="1.2.840.10008.1.2.4",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS="1.2.840.10008.1.2.4.57",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS_SEL1="1.2.840.10008.1.2.4.70",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_8BIT="1.2.840.10008.1.2.4.50",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_12BIT="1.2.840.10008.1.2.4.51",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS_LOSSLESS="1.2.840.10008.1.2.4.80",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS="1.2.840.10008.1.2.4.81",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000_LOSSLESS="1.2.840.10008.1.2.4.90",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000="1.2.840.10008.1.2.4.91",u.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE="1.2.840.10008.1.2.5",u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE="1.2.840.10008.1.2.1.99",u.Parser.UNDEFINED_LENGTH=4294967295,u.Parser.isMagicCookieFound=function(g){var S=u.Parser.MAGIC_COOKIE_OFFSET,v=u.Parser.MAGIC_COOKIE.length,w;for(w=0;w=this.metaFinishedOffset&&(this.needsDeflate=!1,I=g.buffer.slice(0,w.offsetEnd),_=g.buffer.slice(w.offsetEnd),this.inflated=u.Utils.concatArrayBuffers(I,h.inflateRaw(_)),g=new DataView(this.inflated)),w=this.getNextTag(g,w.offsetEnd)}catch(P){this.error=P}return S!==null&&(S.littleEndian=this.littleEndian),S},u.Parser.prototype.parseEncapsulated=function(g){var S=0,v,w=[];this.encapsulation=!0;try{for(v=this.getNextTag(g,S);v!==null;)v.isSublistItem()&&w.push(v),u.Parser.verbose&&console.log(v.toString()),v=this.getNextTag(g,v.offsetEnd)}catch(I){this.error=I}return w},u.Parser.prototype.testForValidTag=function(g){var S,v=null;try{S=this.findFirstTagOffset(g),v=this.getNextTag(g,S,!1)}catch(w){this.error=w}return v},u.Parser.prototype.getNextTag=function(g,S,v){var w=0,I,_=null,P=S,L,d=0,k=!0,e=null,N;if(S>=g.byteLength)return null;this.metaFinished?(k=this.littleEndian,w=g.getUint16(S,k)):(w=g.getUint16(S,!0),this.metaFinishedOffset!==-1&&S>=this.metaFinishedOffset||w!==2?(this.metaFinished=!0,k=this.littleEndian,w=g.getUint16(S,k)):k=!0),!this.metaFound&&w===2&&(this.metaFound=!0),S+=2,I=g.getUint16(S,k),S+=2,this.explicit||!this.metaFinished?(e=u.Utils.getStringAt(g,S,2),!this.metaFound&&this.metaFinished&&u.Parser.VRS.indexOf(e)===-1?(e=u.Dictionary.getVR(w,I),d=g.getUint32(S,k),S+=4,this.explicit=!1):(S+=2,u.Parser.DATA_VRS.indexOf(e)!==-1?(S+=2,d=g.getUint32(S,k),S+=4):(d=g.getUint16(S,k),S+=2))):(e=u.Dictionary.getVR(w,I),d=g.getUint32(S,k),d===u.Parser.UNDEFINED_LENGTH&&(e="SQ"),S+=4),L=S;var B=w===u.Tag.TAG_PIXEL_DATA[0]&&I===u.Tag.TAG_PIXEL_DATA[1],Q=w===40&&I>=4609&&I<4864;if(e==="SQ"||!Q&&!B&&!this.encapsulation&&u.Parser.DATA_VRS.indexOf(e)!==-1&&e!=="UC"?(_=this.parseSublist(g,S,d,e!=="SQ"),d===u.Parser.UNDEFINED_LENGTH&&(d=_[_.length-1].offsetEnd-S)):d>0&&!v&&(d===u.Parser.UNDEFINED_LENGTH&&B&&(d=g.byteLength-S),_=g.buffer.slice(S,S+d)),S+=d,N=new u.Tag(w,I,e,_,P,L,S,this.littleEndian,this.charset),N.value){if(N.isTransformSyntax())this.transformSyntaxAlreadyExist=!0,N.value[0]===u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE?(this.explicit=!1,this.littleEndian=!0):N.value[0]===u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG?(this.explicit=!0,this.littleEndian=!1):N.value[0]===u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE?(this.needsDeflate=!0,this.explicit=!0,this.littleEndian=!0):(this.explicit=!0,this.littleEndian=!0);else if(N.isMetaLength())this.metaFinishedOffset=N.value[0]+S;else if(N.isCharset()){var i0=N.value;i0.length==2?i0=(i0[0]||"ISO 2022 IR 6")+"\\"+i0[1]:i0.length==1&&(i0=i0[0]),this.charset=i0}}return N},u.Parser.prototype.parseSublist=function(g,S,v,w){var I,_=S+v,P=[];if(this.level++,v===u.Parser.UNDEFINED_LENGTH){for(I=this.parseSublistItem(g,S,w);!I.isSequenceDelim();)P.push(I),S=I.offsetEnd,I=this.parseSublistItem(g,S,w);P.push(I)}else for(;S<_;)I=this.parseSublistItem(g,S,w),P.push(I),S=I.offsetEnd;return this.level--,P},u.Parser.prototype.parseSublistItem=function(g,S,v){var w,I,_,P,L,d=S,k=null,e,N,B=[];if(w=g.getUint16(S,this.littleEndian),S+=2,I=g.getUint16(S,this.littleEndian),S+=2,_=g.getUint32(S,this.littleEndian),S+=4,e=S,_===u.Parser.UNDEFINED_LENGTH){for(L=this.getNextTag(g,S);L&&!L.isSublistItemDelim();)B.push(L),S=L.offsetEnd,L=this.getNextTag(g,S);L&&B.push(L),L&&(S=L.offsetEnd)}else if(v)k=g.buffer.slice(S,S+_),S=S+_;else for(P=S+_;Su.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&e>N&&e>B?P=L:N>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&N>e&&N>B?P=d:B>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&B>e&&B>N?P=k:P=null,P},u.Image.prototype.getCols=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_COLS[0],u.Tag.TAG_COLS[1]),0)},u.Image.prototype.getRows=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ROWS[0],u.Tag.TAG_ROWS[1]),0)},u.Image.prototype.getSeriesDescription=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_DESCRIPTION[0],u.Tag.TAG_SERIES_DESCRIPTION[1]),0)},u.Image.prototype.getSeriesInstanceUID=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_INSTANCE_UID[0],u.Tag.TAG_SERIES_INSTANCE_UID[1]),0)},u.Image.prototype.getSeriesNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_NUMBER[0],u.Tag.TAG_SERIES_NUMBER[1]),0)},u.Image.prototype.getEchoNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ECHO_NUMBER[0],u.Tag.TAG_ECHO_NUMBER[1]),0)},u.Image.prototype.getImagePosition=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]))},u.Image.prototype.getImageDirections=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_ORIENTATION[0],u.Tag.TAG_IMAGE_ORIENTATION[1]))},u.Image.prototype.getImagePositionSliceDir=function(w){var I=u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]));return I&&w>=0?I[w]:0},u.Image.prototype.getModality=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_MODALITY[0],u.Tag.TAG_MODALITY[1]),0)},u.Image.prototype.getSliceLocation=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION[0],u.Tag.TAG_SLICE_LOCATION[1]),0)},u.Image.prototype.getSliceLocationVector=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION_VECTOR[0],u.Tag.TAG_SLICE_LOCATION_VECTOR[1]))},u.Image.prototype.getImageNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_NUM[0],u.Tag.TAG_IMAGE_NUM[1]),0)},u.Image.prototype.getTemporalPosition=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TEMPORAL_POSITION[0],u.Tag.TAG_TEMPORAL_POSITION[1]),0)},u.Image.prototype.getTemporalNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)},u.Image.prototype.getSliceGap=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_GAP[0],u.Tag.TAG_SLICE_GAP[1]),0)},u.Image.prototype.getSliceThickness=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_THICKNESS[0],u.Tag.TAG_SLICE_THICKNESS[1]),0)},u.Image.prototype.getImageMax=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MAX[0],u.Tag.TAG_IMAGE_MAX[1]),0)},u.Image.prototype.getImageMin=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MIN[0],u.Tag.TAG_IMAGE_MIN[1]),0)},u.Image.prototype.getDataScaleSlope=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_SLOPE[0],u.Tag.TAG_DATA_SCALE_SLOPE[1]),0)},u.Image.prototype.getDataScaleIntercept=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_INTERCEPT[0],u.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)},u.Image.prototype.getDataScaleElscint=function(){var w=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_ELSCINT[0],u.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);w||(w=1);var I=this.getPixelBandwidth();return w=Math.sqrt(I)/(10*w),w<=0&&(w=1),w},u.Image.prototype.getWindowWidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_WIDTH[0],u.Tag.TAG_WINDOW_WIDTH[1]),0)},u.Image.prototype.getWindowCenter=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_CENTER[0],u.Tag.TAG_WINDOW_CENTER[1]),0)},u.Image.prototype.getPixelBandwidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_PIXEL_BANDWIDTH[0],u.Tag.TAG_PIXEL_BANDWIDTH[1]),0)},u.Image.prototype.getSeriesId=function(){var w=this.getSeriesDescription(),I=this.getSeriesInstanceUID(),_=this.getSeriesNumber(),P=this.getEchoNumber(),L=this.getOrientation(),d=this.getCols(),k=this.getRows(),e="";return w!==null&&(e+=" "+w),I!==null&&(e+=" "+I),_!==null&&(e+=" "+_),P!==null&&(e+=" "+P),L!==null&&(e+=" "+L),e+=" ("+d+" x "+k+")",e},u.Image.prototype.getPixelSpacing=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_PIXEL_SPACING[0],u.Tag.TAG_PIXEL_SPACING[1]))},u.Image.prototype.getImageType=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_TYPE[0],u.Tag.TAG_IMAGE_TYPE[1]))},u.Image.prototype.getBitsStored=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_STORED[0],u.Tag.TAG_BITS_STORED[1]),0)},u.Image.prototype.getBitsAllocated=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_ALLOCATED[0],u.Tag.TAG_BITS_ALLOCATED[1]),0)},u.Image.prototype.getFrameTime=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_FRAME_TIME[0],u.Tag.TAG_FRAME_TIME[1]),0)},u.Image.prototype.getAcquisitionMatrix=function(){var w,I,_,P,L;return w=[0,0],w[0]=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ACQUISITION_MATRIX[0],u.Tag.TAG_ACQUISITION_MATRIX[1]),0),this.privateDataAll===null&&(this.privateDataAll=this.getAllInterpretedPrivateData()),this.privateDataAll!==null&&this.privateDataAll.length>0&&(_=this.privateDataAll.indexOf("AcquisitionMatrixText"),_!==-1&&(P=this.privateDataAll.indexOf(` +`,_),P!==-1&&(L=this.privateDataAll.substring(_,P),I=L.match(/\d+/g),I!==null&&I.length===2?(w[0]=I[0],w[1]=I[1]):I!==null&&I.length===1&&(w[0]=I[0])))),w[1]===0&&(w[1]=w[0]),w},u.Image.prototype.getTR=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TR,u.Tag.TAG_TR[1]),0)},u.Image.prototype.putTag=function(w){this.tags[w.id]&&this.tags[w.id].value[0]!==w.value[0]||(this.tags[w.id]=w,this.putFlattenedTag(this.tagsFlat,w))},u.Image.prototype.putFlattenedTag=function(w,I){var _;if(I.sublist)for(_=0;_H&&(H=y,G=m0);return I?{data:e,min:j,minIndex:Y,max:H,maxIndex:G,numCols:this.getCols(),numRows:this.getRows()}:e},u.Image.prototype.convertPalette=function(){var w,I,_,P,L,d,k,e,N,B,Q,i0;if(w=this.tags[u.Tag.createId(u.Tag.TAG_PIXEL_DATA[0],u.Tag.TAG_PIXEL_DATA[1])].value,I=this.getPalleteValues(u.Tag.TAG_PALETTE_RED),_=this.getPalleteValues(u.Tag.TAG_PALETTE_GREEN),P=this.getPalleteValues(u.Tag.TAG_PALETTE_BLUE),I!==null&&I.length>0&&_!==null&&_.length>0&&P!==null&&P.length>0&&!this.convertedPalette){if(L=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3)),d=parseInt(Math.ceil(this.getBitsAllocated()/8)),k=w.byteLength/d,d===1)for(e=0;eN&&(N=Math.abs(I[_]),k=_);for(N=0;_<6;_+=1)Math.abs(I[_])>N&&(N=Math.abs(I[_]),e=_);switch(k){case 0:B+="X",e===4?B+="YZ":B+="ZY";break;case 1:B+="Y",e===3?B+="XZ":B+="ZX";break;case 2:B+="Z",e===3?B+="XY":B+="YX";break}switch(k){case 0:I[k]>0?B+="-":B+="+",e===4?I[e]>0?B+="-":B+="+":I[e]>0?B+="+":B+="-";break;case 1:I[k]>0?B+="-":B+="+",e===3?I[e]>0?B+="-":B+="+":I[e]>0?B+="+":B+="-";break;case 2:I[k]>0?B+="+":B+="-",I[e]>0?B+="-":B+="+";break}if(L===0)B+="+",w=B;else{if(d)switch(B.charAt(2)){case"X":L>0?B+="-":B+="+";break;case"Y":case"Z":L>0?B+="+":B+="-";break}else switch(B.charAt(2)){case"X":L>0?B+="+":B+="-";break;case"Y":case"Z":L>0?B+="-":B+="+";break}w=B}return w},u.Image.prototype.isMosaic=function(){var w,I=!1,_,P,L;if(w=this.getImageType(),w!==null){for(P=0;P0&&(L[0]1?d[_]=u.Utils.concatArrayBuffers2(L[_]):d[_]=L[_][0],L[_]=null;return d},u.Image.prototype.getRLE=function(){var w,I,_,P=[];if(w=this.getEncapsulatedData(),w)for(I=w.length,_=1;_");return P=P.replace(/\n\s*\n/g,` +`),P=P.replace(/(?:\r\n|\r|\n)/g,"
"),P},u.Image.prototype.getPalleteValues=function(w){var I,_,P,L,d,k,e,N,B,Q,i0;if(I=null,_=null,P=u.Image.getValueSafely(this.getTag(w[0],w[1])),P!==null){for(L=P.buffer.byteLength/2,I=[],_=[],d=0;d255||I<0)for(L=255/(_-I),d=I,P=0;P1&&h[0].getTemporalPosition()!==null,P=g>1&&h[0].getTemporalNumber()!==null&&h[0].getTemporalNumber()===g,_&&P)for(L=0;L1||this.isMosaic&&this.images[0].length>1,this.isMultiFrameVolume=!1,this.isMultiFrameTimeseries=!1,this.isImplicitTimeseries=!1,this.isMultiFrame&&(h=this.images[0].getFrameTime()>0,this.isMosaic?this.isMultiFrameTimeseries=!0:h?this.isMultiFrameTimeseries=!0:this.numberOfFramesInFile>1?(this.isMultiFrameTimeseries=!0,this.numberOfFrames=this.images.length):this.isMultiFrameVolume=!0),!this.isMosaic&&this.numberOfFrames<=1){for(d=this.images[0].getImagePosition()||[],S=d.toString(),this.numberOfFrames=0,g=0;g1&&(this.isImplicitTimeseries=!0)}this.sliceDir=this.images[0].getAcquiredSliceDirection(),u.Series.useExplicitOrdering?v=this.images.slice():v=u.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir),w=v[0].getImagePositionSliceDir(this.sliceDir),I=v[v.length-1].getImagePositionSliceDir(this.sliceDir),_=I-w,u.Series.useExplicitOrdering?this.sliceSense=!1:this.isMosaic?this.sliceSense=!0:this.isMultiFrame?(P=v[0].getSliceLocationVector(),P!==null?(L=v[0].getOrientation(),L.charAt(2)==="Z"?this.sliceSense=P[0]-P[P.length-1]<0:this.sliceSense=P[0]-P[P.length-1]>0):this.sliceSense=!(w<0)):this.sliceDir===u.Image.SLICE_DIRECTION_SAGITTAL||this.sliceDir===u.Image.SLICE_DIRECTION_CORONAL?_>0?this.sliceSense=!1:this.sliceSense=!0:_>0?this.sliceSense=!0:this.sliceSense=!1,this.imagesOriginalOrder=this.images,this.images=v},u.Series.prototype.concatenateImageData=function(h,g){var S,v,w;this.isMosaic?v=this.getMosaicData(this.images[0],this.images[0].getPixelDataBytes()):v=this.images[0].getPixelDataBytes(),w=this.validatePixelDataLength(this.images[0]),this.images[0].clearPixelData(),S=new Uint8Array(new ArrayBuffer(w*this.images.length)),S.set(new Uint8Array(v,0,w),0),setTimeout(u.Utils.bind(this,function(){this.concatenateNextImageData(S,w,h,1,g)}),0)},u.Series.prototype.concatenateNextImageData=function(h,g,S,v,w){var I,_;v>=this.images.length?(S&&S.drawProgress(1,"Reading DICOM Images"),w(h.buffer)):(S&&S.drawProgress(v/this.images.length,"Reading DICOM Images"),this.isMosaic?I=this.getMosaicData(this.images[v],this.images[v].getPixelDataBytes()):I=this.images[v].getPixelDataBytes(),_=this.validatePixelDataLength(this.images[v]),this.images[v].clearPixelData(),h.set(new Uint8Array(I,0,_),g*v),setTimeout(u.Utils.bind(this,function(){this.concatenateNextImageData(h,g,S,v+1,w)}),0))},u.Series.prototype.validatePixelDataLength=function(h){var g=h.getPixelDataBytes().byteLength,S=h.getCols()*h.getRows();return g%S===0?g:S*h.getNumberOfFrames()*h.getNumberOfSamplesPerPixel()*(h.getBitsAllocated()/8)},u.Series.prototype.getMosaicData=function(h,g){var S,v,w,I,_,P,L,d,k,e,N,B,Q,i0,j,H,y,Y=0;for(L=parseInt(this.images[0].getBitsAllocated()/8),N=this.images[0].getMosaicCols()*this.images[0].getMosaicRows(),B=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows()),Q=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols()),S=this.images[0].getCols(),v=this.images[0].getRows(),w=this.images[0].getMosaicRows(),I=this.images[0].getMosaicCols(),_=parseInt(v/w),P=parseInt(S/I),i0=new Uint8Array(new ArrayBuffer(N*B*Q*L)),j=new Uint8Array(g),d=0;du in C?__defProp(C,u,{enumerable:!0,configurable:!0,writable:!0,value:h}):C[u]=h,__export=(C,u)=>{for(var h in u)__defProp(C,h,{get:u[h],enumerable:!0})},__publicField=(C,u,h)=>__defNormalProp(C,typeof u!="symbol"?u+"":u,h),version="0.44.2",_Log=class lt{constructor({name:u="niivue",level:h="info"}={}){__publicField(this,"level"),__publicField(this,"name"),this.name=`${u}`,this.level=h}debug(...u){lt.levels[this.level]>lt.levels.debug||console.debug(`${this.name}-debug`,...u)}info(...u){lt.levels[this.level]>lt.levels.info||console.info(`${this.name}-info`,...u)}warn(...u){lt.levels[this.level]>lt.levels.warn||console.warn(`${this.name}-warn`,...u)}error(...u){lt.levels[this.level]>lt.levels.error||console.error(`${this.name}-error`,...u)}fatal(...u){lt.levels[this.level]>lt.levels.fatal||console.error(`${this.name}-fatal`,...u)}setLogLevel(u){this.level=u}setName(u){this.name=u}};__publicField(_Log,"levels",{debug:0,info:1,warn:2,error:3,fatal:4,silent:1/0});var Log=_Log,log=new Log({name:"niivue",level:"info"}),compileShader=function(C,u,h){const g=C.createShader(C.VERTEX_SHADER);C.shaderSource(g,u),C.compileShader(g);const S=C.createShader(C.FRAGMENT_SHADER);C.shaderSource(S,h),C.compileShader(S);const v=C.createProgram();if(C.attachShader(v,g),C.attachShader(v,S),C.linkProgram(v),!C.getProgramParameter(v,C.LINK_STATUS))throw log.error(C.getProgramInfoLog(v)),new Error("Shader failed to link, see console for log");return v},Shader=class{constructor(C,u,h){__publicField(this,"program"),__publicField(this,"uniforms",{}),__publicField(this,"isMatcap"),this.program=compileShader(C,u,h);const g=/uniform[^;]+[ ](\w+);/g,S=/uniform[^;]+[ ](\w+);/,v=u.match(g),w=h.match(g);v&&v.forEach(I=>{const _=I.match(S);this.uniforms[_[1]]=-1}),w&&w.forEach(I=>{const _=I.match(S);this.uniforms[_[1]]=-1});for(const I in this.uniforms)this.uniforms[I]=C.getUniformLocation(this.program,I)}use(C){C.useProgram(this.program)}},vertRenderShader=`#version 300 es +#line 4 +layout(location=0) in vec3 pos; +layout(location=1) in vec3 texCoords; +uniform mat4 mvpMtx; +out vec3 vColor; +void main(void) { + gl_Position = mvpMtx * vec4(pos, 1.0); + vColor = texCoords; +}`,kDrawFunc=` + vec4 drawColor(float scalar, float drawOpacity) { + float nlayer = float(textureSize(colormap, 0).y); + float layer = (nlayer - 0.5) / nlayer; + vec4 dcolor = texture(colormap, vec2((scalar * 255.0)/256.0 + 0.5/256.0, layer)).rgba; + dcolor.a *= drawOpacity; + return dcolor; +}`,kRenderFunc=`vec3 GetBackPosition(vec3 startPositionTex) { + vec3 startPosition = startPositionTex * volScale; + vec3 invR = 1.0 / rayDir; + vec3 tbot = invR * (vec3(0.0)-startPosition); + vec3 ttop = invR * (volScale-startPosition); + vec3 tmax = max(ttop, tbot); + vec2 t = min(tmax.xx, tmax.yz); + vec3 endPosition = startPosition + (rayDir * min(t.x, t.y)); + //convert world position back to texture position: + endPosition = endPosition / volScale; + return endPosition; +} + +vec4 applyClip (vec3 dir, inout vec4 samplePos, inout float len, inout bool isClip) { + float cdot = dot(dir,clipPlane.xyz); + isClip = false; + if ((clipPlane.a > 1.0) || (cdot == 0.0)) return samplePos; + bool frontface = (cdot > 0.0); + float dis = (-clipPlane.a - dot(clipPlane.xyz, samplePos.xyz-0.5)) / cdot; + float thick = clipThick; + if (thick <= 0.0) thick = 2.0; + float disBackFace = (-(clipPlane.a-thick) - dot(clipPlane.xyz, samplePos.xyz-0.5)) / cdot; + if (((frontface) && (dis >= len)) || ((!frontface) && (dis <= 0.0))) { + samplePos.a = len + 1.0; + return samplePos; + } + if (frontface) { + dis = max(0.0, dis); + samplePos = vec4(samplePos.xyz+dir * dis, dis); + if (dis > 0.0) isClip = true; + len = min(disBackFace, len); + } + if (!frontface) { + len = min(dis, len); + disBackFace = max(0.0, disBackFace); + if (len == dis) isClip = true; + samplePos = vec4(samplePos.xyz+dir * disBackFace, disBackFace); + } + return samplePos; +} + +void clipVolume(inout vec3 startPos, inout vec3 backPos, int dim, float frac, bool isLo) { + vec3 dir = backPos - startPos; + float len = length(dir); + dir = normalize(dir); + // Discard if both startPos and backPos are outside the clipping plane + if (isLo && startPos[dim] < frac && backPos[dim] < frac) { + discard; + } + if (!isLo && startPos[dim] > frac && backPos[dim] > frac) { + discard; + } + vec4 plane = vec4(0.0, 0.0, 0.0, 0.5 - frac); + plane[dim] = 1.0; + float cdot = dot(dir, plane.xyz); + float dis = (-plane.w - dot(plane.xyz, startPos - vec3(0.5))) / cdot; + // Adjust startPos or backPos based on the intersection with the plane + bool isFrontFace = (cdot > 0.0); + if (!isLo) + isFrontFace = !isFrontFace; + if (dis > 0.0) { + if (isFrontFace) { + if (dis <= len) { + startPos = startPos + dir * dis; + } + } else { + if (dis < len) { + backPos = startPos + dir * dis; + } + } + } +} + +void clipVolumeStart (inout vec3 startPos, inout vec3 backPos) { + // vec3 clipLo = vec3(0.1, 0.2, 0.4); + // vec3 clipHi = vec3(0.8, 0.7, 0.7); + for (int i = 0; i < 3; i++) { + if (clipLo[i] > 0.0) + clipVolume(startPos, backPos, i, clipLo[i], true); + } + for (int i = 0; i < 3; i++) { + if (clipHi[i] < 1.0) + clipVolume(startPos, backPos, i, clipHi[i], false); + } +} + +float frac2ndc(vec3 frac) { +//https://stackoverflow.com/questions/7777913/how-to-render-depth-linearly-in-modern-opengl-with-gl-fragcoord-z-in-fragment-sh + vec4 pos = vec4(frac.xyz, 1.0); //fraction + vec4 dim = vec4(vec3(textureSize(volume, 0)), 1.0); + pos = pos * dim; + vec4 shim = vec4(-0.5, -0.5, -0.5, 0.0); + pos += shim; + vec4 mm = transpose(matRAS) * pos; + float z_ndc = (mvpMtx * vec4(mm.xyz, 1.0)).z; + return (z_ndc + 1.0) / 2.0; +}`+kDrawFunc,kRenderInit=`void main() { + if (fColor.x > 2.0) { + fColor = vec4(1.0, 0.0, 0.0, 0.5); + return; + } + fColor = vec4(0.0,0.0,0.0,0.0); + vec4 clipPlaneColorX = clipPlaneColor; + //if (clipPlaneColor.a < 0.0) + // clipPlaneColorX.a = - 1.0; + bool isColorPlaneInVolume = false; + if (clipPlaneColorX.a < 0.0) { + isColorPlaneInVolume = true; + clipPlaneColorX.a = 0.0; + } + //fColor = vec4(vColor.rgb, 1.0); return; + vec3 start = vColor; + gl_FragDepth = 0.0; + vec3 backPosition = GetBackPosition(start); + // fColor = vec4(backPosition, 1.0); return; + vec3 dir = normalize(backPosition - start); + clipVolumeStart(start, backPosition); + dir = normalize(dir); + float len = length(backPosition - start); + float lenVox = length((texVox * start) - (texVox * backPosition)); + if ((lenVox < 0.5) || (len > 3.0)) { //length limit for parallel rays + return; + } + float sliceSize = len / lenVox; //e.g. if ray length is 1.0 and traverses 50 voxels, each voxel is 0.02 in unit cube + float stepSize = sliceSize; //quality: larger step is faster traversal, but fewer samples + float opacityCorrection = stepSize/sliceSize; + vec4 deltaDir = vec4(dir.xyz * stepSize, stepSize); + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + float lenNoClip = len; + bool isClip = false; + vec4 clipPos = applyClip(dir, samplePos, len, isClip); + //if ((clipPos.a != samplePos.a) && (len < 3.0)) { + //start: OPTIONAL fast pass: rapid traversal until first hit + float stepSizeFast = sliceSize * 1.9; + vec4 deltaDirFast = vec4(dir.xyz * stepSizeFast, stepSizeFast); + while (samplePos.a <= len) { + float val = texture(volume, samplePos.xyz).a; + if (val > 0.01) + break; + samplePos += deltaDirFast; //advance ray position + } + float drawOpacityA = renderDrawAmbientOcclusionXY.y; + if ((samplePos.a >= len) && (((overlays < 1.0) && (drawOpacityA <= 0.0) ) || (backgroundMasksOverlays > 0))) { + if (isClip) + fColor += clipPlaneColorX; + return; + } + fColor = vec4(1.0, 1.0, 1.0, 1.0); + //gl_FragDepth = frac2ndc(samplePos.xyz); //crude due to fast pass resolution + samplePos -= deltaDirFast; + if (samplePos.a < 0.0) + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + //end: fast pass + vec4 colAcc = vec4(0.0,0.0,0.0,0.0); + vec4 firstHit = vec4(0.0,0.0,0.0,2.0 * lenNoClip); + const float earlyTermination = 0.95; + float backNearest = len; //assume no hit + float ran = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453); + samplePos += deltaDir * ran; //jitter ray +`,kRenderTail=` + if (firstHit.a < len) + gl_FragDepth = frac2ndc(firstHit.xyz); + colAcc.a = (colAcc.a / earlyTermination) * backOpacity; + fColor = colAcc; + //if (isClip) //CR + if ((isColorPlaneInVolume) && (clipPos.a != samplePos.a) && (abs(firstHit.a - clipPos.a) < deltaDir.a)) + fColor.rgb = mix(fColor.rgb, clipPlaneColorX.rgb, abs(clipPlaneColor.a)); + //fColor.rgb = mix(fColor.rgb, clipPlaneColorX.rgb, clipPlaneColorX.a * 0.65); + float renderDrawAmbientOcclusionX = renderDrawAmbientOcclusionXY.x; + float drawOpacity = renderDrawAmbientOcclusionXY.y; + if ((overlays < 1.0) && (drawOpacity <= 0.0)) + return; + //overlay pass + len = lenNoClip; + samplePos = vec4(start.xyz, 0.0); //ray position + //start: OPTIONAL fast pass: rapid traversal until first hit + stepSizeFast = sliceSize * 1.0; + deltaDirFast = vec4(dir.xyz * stepSizeFast, stepSizeFast); + while (samplePos.a <= len) { + float val = texture(overlay, samplePos.xyz).a; + if (drawOpacity > 0.0) + val = max(val, texture(drawing, samplePos.xyz).r); + if (val > 0.001) + break; + samplePos += deltaDirFast; //advance ray position + } + if (samplePos.a >= len) { + if (isClip && (fColor.a == 0.0)) + fColor += clipPlaneColorX; + return; + } + samplePos -= deltaDirFast; + if (samplePos.a < 0.0) + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + //end: fast pass + float overFarthest = len; + colAcc = vec4(0.0, 0.0, 0.0, 0.0); + + samplePos += deltaDir * ran; //jitter ray + vec4 overFirstHit = vec4(0.0,0.0,0.0,2.0 * len); + if (backgroundMasksOverlays > 0) + samplePos = firstHit; + bool firstDraw = true; + while (samplePos.a <= len) { + vec4 colorSample = texture(overlay, samplePos.xyz); + if ((colorSample.a < 0.01) && (drawOpacity > 0.0)) { + float val = texture(drawing, samplePos.xyz).r; + vec4 draw = drawColor(val, drawOpacity); + if ((draw.a > 0.0) && (firstDraw)) { + firstDraw = false; + float sum = 0.0; + const float mn = 1.0 / 256.0; + const float sampleRadius = 1.1; + float dx = sliceSize * sampleRadius; + vec3 center = samplePos.xyz; + //six neighbors that share a face + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,0.0,+dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,0.0,-dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,+dx,0.0), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,-dx,0.0), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(+dx,0.0,0.0), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(-dx,0.0,0.0), dir)).r, mn); + //float proportion = (sum / mn) / 6.0; + + //12 neighbors that share an edge + dx = sliceSize * sampleRadius * sqrt(2.0) * 0.5; + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,+dx,+dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(+dx,0.0,+dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(+dx,+dx,0.0), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,-dx,-dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(-dx,0.0,-dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(-dx,-dx,0.0), dir)).r, mn); + + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,+dx,-dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(+dx,0.0,-dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(+dx,-dx,0.0), dir)).r, mn); + + sum += min(texture(drawing, center.xyz + cross(vec3(0.0,-dx,+dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(-dx,0.0,+dx), dir)).r, mn); + sum += min(texture(drawing, center.xyz + cross(vec3(-dx,+dx,0.0), dir)).r, mn); + float proportion = (sum / mn) / 18.0; //proportion of six neighbors is non-zero + + //a high proportion of hits means crevice + //since the AO term adds shadows that darken most voxels, it will result in dark surfaces + //the term brighten adds a little illumination to balance this + // without brighten, only the most extreme ridges will not be darker + const float brighten = 1.2; + vec3 ao = draw.rgb * (1.0 - proportion) * brighten; + draw.rgb = mix (draw.rgb, ao , renderDrawAmbientOcclusionX); + } + colorSample = draw; + } + samplePos += deltaDir; //advance ray position + if (colorSample.a >= 0.01) { + if (overFirstHit.a > len) + overFirstHit = samplePos; + colorSample.a *= renderOverlayBlend; + colorSample.a = 1.0-pow((1.0 - colorSample.a), opacityCorrection); + colorSample.rgb *= colorSample.a; + colAcc= (1.0 - colAcc.a) * colorSample + colAcc; + overFarthest = samplePos.a; + if ( colAcc.a > earlyTermination ) + break; + } + } + //if (samplePos.a >= len) { + if (colAcc.a <= 0.0) { + if (isClip && (fColor.a == 0.0)) + fColor += clipPlaneColorX; + return; + } + if (overFirstHit.a < firstHit.a) + gl_FragDepth = frac2ndc(overFirstHit.xyz); + float overMix = colAcc.a; + float overlayDepth = 0.3; + if (fColor.a <= 0.0) + overMix = 1.0; + else if (((overFarthest) > backNearest)) { + float dx = (overFarthest - backNearest)/1.73; + dx = fColor.a * pow(dx, overlayDepth); + overMix *= 1.0 - dx; + } + fColor.rgb = mix(fColor.rgb, colAcc.rgb, overMix); + fColor.a = max(fColor.a, colAcc.a); +}`,fragRenderSliceShader=`#version 300 es +#line 215 +precision highp int; +precision highp float; +uniform vec3 rayDir; +uniform vec3 texVox; +uniform int backgroundMasksOverlays; +uniform vec3 volScale; +uniform vec4 clipPlane; +uniform highp sampler3D volume, overlay; +uniform float overlays; +uniform float clipThick; +uniform vec3 clipLo; +uniform vec3 clipHi; +uniform float backOpacity; +uniform mat4 mvpMtx; +uniform mat4 matRAS; +uniform vec4 clipPlaneColor; +uniform float renderOverlayBlend; +uniform highp sampler3D drawing; +uniform highp sampler2D colormap; +uniform vec2 renderDrawAmbientOcclusionXY; +in vec3 vColor; +out vec4 fColor; +`+kRenderFunc+` + void main() { + vec3 start = vColor; + gl_FragDepth = 0.0; + vec3 backPosition = GetBackPosition(start); + vec3 dir = normalize(backPosition - start); + clipVolumeStart(start, backPosition); + float len = length(backPosition - start); + float lenVox = length((texVox * start) - (texVox * backPosition)); + if ((lenVox < 0.5) || (len > 3.0)) { //length limit for parallel rays + fColor = vec4(0.0,0.0,0.0,0.0); + return; + } + float sliceSize = len / lenVox; //e.g. if ray length is 1.0 and traverses 50 voxels, each voxel is 0.02 in unit cube + float stepSize = sliceSize; //quality: larger step is faster traversal, but fewer samples + float opacityCorrection = stepSize/sliceSize; + vec4 deltaDir = vec4(dir.xyz * stepSize, stepSize); + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + vec4 colAcc = vec4(0.0,0.0,0.0,0.0); + vec4 firstHit = vec4(0.0,0.0,0.0,2.0 * len); + const float earlyTermination = 0.95; + float backNearest = len; //assume no hit + float dis = len; + //check if axial plane is closest + vec4 aClip = vec4(0.0, 0.0, 1.0, (1.0- clipPlane.z) - 0.5); + float adis = (-aClip.a - dot(aClip.xyz, samplePos.xyz-0.5)) / dot(dir,aClip.xyz); + if (adis > 0.0) + dis = min(adis, dis); + //check of coronal plane is closest + vec4 cClip = vec4(0.0, 1.0, 0.0, (1.0- clipPlane.y) - 0.5); + float cdis = (-cClip.a - dot(cClip.xyz, samplePos.xyz-0.5)) / dot(dir,cClip.xyz); + if (cdis > 0.0) + dis = min(cdis, dis); + //check if coronal slice is closest + vec4 sClip = vec4(1.0, 0.0, 0.0, (1.0- clipPlane.x) - 0.5); + float sdis = (-sClip.a - dot(sClip.xyz, samplePos.xyz-0.5)) / dot(dir,sClip.xyz); + if (sdis > 0.0) + dis = min(sdis, dis); + if ((dis > 0.0) && (dis < len)) { + samplePos = vec4(samplePos.xyz+dir * dis, dis); + colAcc = texture(volume, samplePos.xyz); + colAcc.a = earlyTermination; + firstHit = samplePos; + backNearest = min(backNearest, samplePos.a); + } + //the following are only used by overlays + vec4 clipPlaneColorX = clipPlaneColor; + bool isColorPlaneInVolume = false; + float lenNoClip = len; + bool isClip = false; + vec4 clipPos = applyClip(dir, samplePos, len, isClip); + float stepSizeFast = sliceSize * 1.9; + vec4 deltaDirFast = vec4(dir.xyz * stepSizeFast, stepSizeFast); + if (samplePos.a < 0.0) + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + float ran = fract(sin(gl_FragCoord.x * 12.9898 + gl_FragCoord.y * 78.233) * 43758.5453); + samplePos += deltaDir * ran; //jitter ray +`+kRenderTail,fragRenderShader=`#version 300 es +#line 215 +precision highp int; +precision highp float; +uniform vec3 rayDir; +uniform vec3 texVox; +uniform int backgroundMasksOverlays; +uniform vec3 volScale; +uniform vec4 clipPlane; +uniform highp sampler3D volume, overlay; +uniform float overlays; +uniform float clipThick; +uniform vec3 clipLo; +uniform vec3 clipHi; +uniform float backOpacity; +uniform mat4 mvpMtx; +uniform mat4 matRAS; +uniform vec4 clipPlaneColor; +uniform float renderOverlayBlend; +uniform highp sampler3D drawing; +uniform highp sampler2D colormap; +uniform vec2 renderDrawAmbientOcclusionXY; +in vec3 vColor; +out vec4 fColor; +`+kRenderFunc+kRenderInit+`while (samplePos.a <= len) { + vec4 colorSample = texture(volume, samplePos.xyz); + samplePos += deltaDir; //advance ray position + if (colorSample.a >= 0.01) { + if (firstHit.a > lenNoClip) + firstHit = samplePos; + backNearest = min(backNearest, samplePos.a); + colorSample.a = 1.0-pow((1.0 - colorSample.a), opacityCorrection); + colorSample.rgb *= colorSample.a; + colAcc= (1.0 - colAcc.a) * colorSample + colAcc; + if ( colAcc.a > earlyTermination ) + break; + } + } +`+kRenderTail,fragRenderGradientShader=`#version 300 es +#line 215 +precision highp int; +precision highp float; +uniform vec3 rayDir; +uniform vec3 texVox; +uniform int backgroundMasksOverlays; +uniform vec3 volScale; +uniform vec4 clipPlane; +uniform highp sampler3D volume, overlay; +uniform float overlays; +uniform float clipThick; +uniform vec3 clipLo; +uniform vec3 clipHi; +uniform float backOpacity; +uniform mat4 mvpMtx; +uniform mat4 normMtx; +uniform mat4 matRAS; +uniform vec4 clipPlaneColor; +uniform float renderOverlayBlend; +uniform highp sampler3D drawing, gradient; +uniform highp sampler2D colormap; +uniform highp sampler2D matCap; +uniform vec2 renderDrawAmbientOcclusionXY; +uniform float gradientAmount; +in vec3 vColor; +out vec4 fColor; +`+kRenderFunc+kRenderInit+` + float startPos = samplePos.a; + float clipClose = clipPos.a + 3.0 * deltaDir.a; //do not apply gradients near clip plane + float brighten = 2.0; //modulating makes average intensity darker 0.5 * 0.5 = 0.25 + //vec4 prevGrad = vec4(0.0); + while (samplePos.a <= len) { + vec4 colorSample = texture(volume, samplePos.xyz); + if (colorSample.a >= 0.0) { + vec4 grad = texture(gradient, samplePos.xyz); + grad.rgb = normalize(grad.rgb*2.0 - 1.0); + //if (grad.a < prevGrad.a) + // grad.rgb = prevGrad.rgb; + //prevGrad = grad; + vec3 n = mat3(normMtx) * grad.rgb; + n.y = - n.y; + vec4 mc = vec4(texture(matCap, n.xy * 0.5 + 0.5).rgb, 1.0) * brighten; + mc = mix(vec4(1.0), mc, gradientAmount); + if (samplePos.a > clipClose) + colorSample.rgb *= mc.rgb; + if (firstHit.a > lenNoClip) + firstHit = samplePos; + backNearest = min(backNearest, samplePos.a); + colorSample.a = 1.0-pow((1.0 - colorSample.a), opacityCorrection); + colorSample.rgb *= colorSample.a; + colAcc= (1.0 - colAcc.a) * colorSample + colAcc; + if ( colAcc.a > earlyTermination ) + break; + } + samplePos += deltaDir; //advance ray position + } +`+kRenderTail,vertSliceMMShader=`#version 300 es +#line 392 +layout(location=0) in vec3 pos; +uniform int axCorSag; +uniform mat4 mvpMtx; +uniform mat4 frac2mm; +uniform float slice; +out vec3 texPos; +void main(void) { + texPos = vec3(pos.x, pos.y, slice); + if (axCorSag > 1) + texPos = vec3(slice, pos.x, pos.y); + else if (axCorSag > 0) + texPos = vec3(pos.x, slice, pos.y); + vec4 mm = frac2mm * vec4(texPos, 1.0); + gl_Position = mvpMtx * mm; +}`,kFragSliceHead=`#version 300 es +#line 411 +precision highp int; +precision highp float; +uniform highp sampler3D volume, overlay; +uniform int backgroundMasksOverlays; +uniform float overlayOutlineWidth; +uniform float overlayAlphaShader; +uniform int axCorSag; +uniform float overlays; +uniform float opacity; +uniform float drawOpacity; +uniform bool isAlphaClipDark; +uniform highp sampler3D drawing; +uniform highp sampler2D colormap; +in vec3 texPos; +out vec4 color;`+kDrawFunc+`void main() { + //color = vec4(1.0, 0.0, 1.0, 1.0);return; + vec4 background = texture(volume, texPos); + color = vec4(background.rgb, opacity); + if ((isAlphaClipDark) && (background.a == 0.0)) color.a = 0.0; //FSLeyes clipping range + vec4 ocolor = vec4(0.0); + float overlayAlpha = overlayAlphaShader; + if (overlays > 0.0) { + ocolor = texture(overlay, texPos); + //dFdx for "boxing" issue 435 has aliasing on some implementations (coarse vs fine) + //however, this only identifies 50% of the edges due to aliasing effects + // http://www.aclockworkberry.com/shader-derivative-functions/ + // https://bgolus.medium.com/distinctive-derivative-differences-cce38d36797b + //if ((ocolor.a >= 1.0) && ((dFdx(ocolor.a) != 0.0) || (dFdy(ocolor.a) != 0.0) )) + // ocolor.rbg = vec3(0.0, 0.0, 0.0); + bool isOutlineBelowNotAboveThreshold = true; + if (isOutlineBelowNotAboveThreshold) { + if ((overlayOutlineWidth > 0.0) && (ocolor.a < 1.0)) { //check voxel neighbors for edge + vec3 vx = (overlayOutlineWidth ) / vec3(textureSize(overlay, 0)); + //6 voxel neighbors that share a face + vec3 vxR = vec3(texPos.x+vx.x, texPos.y, texPos.z); + vec3 vxL = vec3(texPos.x-vx.x, texPos.y, texPos.z); + vec3 vxA = vec3(texPos.x, texPos.y+vx.y, texPos.z); + vec3 vxP = vec3(texPos.x, texPos.y-vx.y, texPos.z); + vec3 vxS = vec3(texPos.x, texPos.y, texPos.z+vx.z); + vec3 vxI = vec3(texPos.x, texPos.y, texPos.z-vx.z); + float a = 0.0; + if (axCorSag != 2) { + a = max(a, texture(overlay, vxR).a); + a = max(a, texture(overlay, vxL).a); + } + if (axCorSag != 1) { + a = max(a, texture(overlay, vxA).a); + a = max(a, texture(overlay, vxP).a); + } + if (axCorSag != 0) { + a = max(a, texture(overlay, vxS).a); + a = max(a, texture(overlay, vxI).a); + } + bool isCheckCorners = true; + if (isCheckCorners) { + //12 voxel neighbors that share an edge + vec3 vxRA = vec3(texPos.x+vx.x, texPos.y+vx.y, texPos.z); + vec3 vxLA = vec3(texPos.x-vx.x, texPos.y+vx.y, texPos.z); + vec3 vxRP = vec3(texPos.x+vx.x, texPos.y-vx.y, texPos.z); + vec3 vxLP = vec3(texPos.x-vx.x, texPos.y-vx.y, texPos.z); + vec3 vxRS = vec3(texPos.x+vx.x, texPos.y, texPos.z+vx.z); + vec3 vxLS = vec3(texPos.x-vx.x, texPos.y, texPos.z+vx.z); + vec3 vxRI = vec3(texPos.x+vx.x, texPos.y, texPos.z-vx.z); + vec3 vxLI = vec3(texPos.x-vx.x, texPos.y, texPos.z-vx.z); + vec3 vxAS = vec3(texPos.x, texPos.y+vx.y, texPos.z+vx.z); + vec3 vxPS = vec3(texPos.x, texPos.y-vx.y, texPos.z+vx.z); + vec3 vxAI = vec3(texPos.x, texPos.y+vx.y, texPos.z-vx.z); + vec3 vxPI = vec3(texPos.x, texPos.y-vx.y, texPos.z-vx.z); + + if (axCorSag == 0) { //axial corners + a = max(a, texture(overlay, vxRA).a); + a = max(a, texture(overlay, vxLA).a); + a = max(a, texture(overlay, vxRP).a); + a = max(a, texture(overlay, vxLP).a); + } + if (axCorSag == 1) { //coronal corners + a = max(a, texture(overlay, vxRS).a); + a = max(a, texture(overlay, vxLS).a); + a = max(a, texture(overlay, vxRI).a); + a = max(a, texture(overlay, vxLI).a); + } + if (axCorSag == 2) { //sagittal corners + a = max(a, texture(overlay, vxAS).a); + a = max(a, texture(overlay, vxPS).a); + a = max(a, texture(overlay, vxAI).a); + a = max(a, texture(overlay, vxPI).a); + } + } + if (a >= 1.0) { + ocolor = vec4(0.0, 0.0, 0.0, 1.0); + overlayAlpha = 1.0; + } + } + + } else { + if ((overlayOutlineWidth > 0.0) && (ocolor.a >= 1.0)) { //check voxel neighbors for edge + vec3 vx = (overlayOutlineWidth ) / vec3(textureSize(overlay, 0)); + vec3 vxR = vec3(texPos.x+vx.x, texPos.y, texPos.z); + vec3 vxL = vec3(texPos.x-vx.x, texPos.y, texPos.z); + vec3 vxA = vec3(texPos.x, texPos.y+vx.y, texPos.z); + vec3 vxP = vec3(texPos.x, texPos.y-vx.y, texPos.z); + vec3 vxS = vec3(texPos.x, texPos.y, texPos.z+vx.z); + vec3 vxI = vec3(texPos.x, texPos.y, texPos.z-vx.z); + float a = 1.0; + if (axCorSag != 2) { + a = min(a, texture(overlay, vxR).a); + a = min(a, texture(overlay, vxL).a); + } + if (axCorSag != 1) { + a = min(a, texture(overlay, vxA).a); + a = min(a, texture(overlay, vxP).a); + } + if (axCorSag != 0) { + a = min(a, texture(overlay, vxS).a); + a = min(a, texture(overlay, vxI).a); + } + if (a < 1.0) { + ocolor = vec4(0.0, 0.0, 0.0, 1.0); + overlayAlpha = 1.0; + } + } + } //outline above threshold + } + +`,kFragSliceTail=` ocolor.a *= overlayAlpha; + vec4 dcolor = drawColor(texture(drawing, texPos).r, drawOpacity); + if (dcolor.a > 0.0) { + color.rgb = mix(color.rgb, dcolor.rgb, dcolor.a); + color.a = max(drawOpacity, color.a); + } + if ((backgroundMasksOverlays > 0) && (background.a == 0.0)) + return; + float a = color.a + ocolor.a * (1.0 - color.a); // premultiplied alpha + if (a == 0.0) return; + color.rgb = mix(color.rgb, ocolor.rgb, ocolor.a / a); + color.a = a; +}`,fragSliceMMShader=kFragSliceHead+kFragSliceTail,fragSliceV1Shader=kFragSliceHead+` if (ocolor.a > 0.0) { + //https://gamedev.stackexchange.com/questions/102889/is-it-possible-to-convert-vec4-to-int-in-glsl-using-opengl-es + uint alpha = uint(ocolor.a * 255.0); + vec3 xyzFlip = vec3(float((uint(1) & alpha) > uint(0)), float((uint(2) & alpha) > uint(0)), float((uint(4) & alpha) > uint(0))); + //convert from 0 and 1 to -1 and 1 + xyzFlip = (xyzFlip * 2.0) - 1.0; + //https://math.stackexchange.com/questions/1905533/find-perpendicular-distance-from-point-to-line-in-3d + //v1 principle direction of tensor for this voxel + vec3 v1 = ocolor.rgb; + //flips encode polarity to convert from 0..1 to -1..1 (27 bits vs 24 bit precision) + v1 = normalize( v1 * xyzFlip); + vec3 vxl = fract(texPos * vec3(textureSize(volume, 0))) - 0.5; + //vxl coordinates now -0.5..+0.5 so 0,0,0 is origin + vxl.x = -vxl.x; + float t = dot(vxl,v1); + vec3 P = t * v1; + float dx = length(P-vxl); + ocolor.a = 1.0 - smoothstep(0.2,0.25, dx); + //if modulation was applied, use that to scale alpha not color: + ocolor.a *= length(ocolor.rgb); + ocolor.rgb = normalize(ocolor.rgb); + //compute distance one half voxel closer to viewer: + float pan = 0.5; + if (axCorSag == 0) + vxl.z -= pan; + if (axCorSag == 1) + vxl.y -= pan; + if (axCorSag == 2) + vxl.x += pan; + t = dot(vxl,v1); + P = t * v1; + float dx2 = length(P-vxl); + ocolor.rgb += (dx2-dx-(0.5 * pan)) * 1.0; + } +`+kFragSliceTail,fragRectShader=`#version 300 es +#line 480 +precision highp int; +precision highp float; +uniform vec4 lineColor; +out vec4 color; +void main() { + color = lineColor; +}`,vertColorbarShader=`#version 300 es +#line 490 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform vec4 leftTopWidthHeight; +out vec2 vColor; +void main(void) { + //convert pixel x,y space 1..canvasWidth,1..canvasHeight to WebGL 1..-1,-1..1 + vec2 frac; + frac.x = (leftTopWidthHeight.x + (pos.x * leftTopWidthHeight.z)) / canvasWidthHeight.x; //0..1 + frac.y = 1.0 - ((leftTopWidthHeight.y + ((1.0 - pos.y) * leftTopWidthHeight.w)) / canvasWidthHeight.y); //1..0 + frac = (frac * 2.0) - 1.0; + gl_Position = vec4(frac, 0.0, 1.0); + vColor = pos.xy; +}`,fragColorbarShader=`#version 300 es +#line 506 +precision highp int; +precision highp float; +uniform highp sampler2D colormap; +uniform float layer; +in vec2 vColor; +out vec4 color; +void main() { + float nlayer = float(textureSize(colormap, 0).y); + float fmap = (0.5 + layer) / nlayer; + color = vec4(texture(colormap, vec2(vColor.x, fmap)).rgb, 1.0); +}`,vertRectShader=`#version 300 es +#line 520 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform vec4 leftTopWidthHeight; +void main(void) { + //convert pixel x,y space 1..canvasWidth,1..canvasHeight to WebGL 1..-1,-1..1 + vec2 frac; + frac.x = (leftTopWidthHeight.x + (pos.x * leftTopWidthHeight.z)) / canvasWidthHeight.x; //0..1 + frac.y = 1.0 - ((leftTopWidthHeight.y + ((1.0 - pos.y) * leftTopWidthHeight.w)) / canvasWidthHeight.y); //1..0 + frac = (frac * 2.0) - 1.0; + gl_Position = vec4(frac, 0.0, 1.0); +}`,vertLineShader=`#version 300 es +#line 534 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform float thickness; +uniform vec4 startXYendXY; +void main(void) { + vec2 posXY = mix(startXYendXY.xy, startXYendXY.zw, pos.x); + vec2 dir = normalize(startXYendXY.xy - startXYendXY.zw); + posXY += vec2(-dir.y, dir.x) * thickness * (pos.y - 0.5); + posXY.x = (posXY.x) / canvasWidthHeight.x; //0..1 + posXY.y = 1.0 - (posXY.y / canvasWidthHeight.y); //1..0 + gl_Position = vec4((posXY * 2.0) - 1.0, 0.0, 1.0); +}`,vertLine3DShader=`#version 300 es +#line 534 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform float thickness; +uniform vec2 startXY; +uniform vec3 endXYZ; // transformed XYZ point +void main(void) { + vec2 posXY = mix(startXY.xy, endXYZ.xy, pos.x); + vec2 startDiff = endXYZ.xy - startXY.xy; + float startDistance = length(startDiff); + vec2 diff = endXYZ.xy - posXY; + float currentDistance = length(diff); + vec2 dir = normalize(startXY.xy - endXYZ.xy); + posXY += vec2(-dir.y, dir.x) * thickness * (pos.y - 0.5); + posXY.x = (posXY.x) / canvasWidthHeight.x; //0..1 + posXY.y = 1.0 - (posXY.y / canvasWidthHeight.y); //1..0 + float z = endXYZ.z * ( 1.0 - abs(currentDistance/startDistance)); + gl_Position = vec4((posXY * 2.0) - 1.0, z, 1.0); +}`,vertBmpShader=`#version 300 es +#line 549 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform vec4 leftTopWidthHeight; +out vec2 vUV; +void main(void) { + //convert pixel x,y space 1..canvasWidth,1..canvasHeight to WebGL 1..-1,-1..1 + vec2 frac; + frac.x = (leftTopWidthHeight.x + (pos.x * leftTopWidthHeight.z)) / canvasWidthHeight.x; //0..1 + frac.y = 1.0 - ((leftTopWidthHeight.y + ((1.0 - pos.y) * leftTopWidthHeight.w)) / canvasWidthHeight.y); //1..0 + frac = (frac * 2.0) - 1.0; + gl_Position = vec4(frac, 0.0, 1.0); + vUV = vec2(pos.x, 1.0 - pos.y); +}`,fragBmpShader=`#version 300 es +#line 565 +precision highp int; +precision highp float; +uniform highp sampler2D bmpTexture; +in vec2 vUV; +out vec4 color; +void main() { + color = texture(bmpTexture, vUV); +}`,vertFontShader=`#version 300 es +#line 576 +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform vec4 leftTopWidthHeight; +uniform vec4 uvLeftTopWidthHeight; +out vec2 vUV; +void main(void) { + //convert pixel x,y space 1..canvasWidth,1..canvasHeight to WebGL 1..-1,-1..1 + vec2 frac; + frac.x = (leftTopWidthHeight.x + (pos.x * leftTopWidthHeight.z)) / canvasWidthHeight.x; //0..1 + frac.y = 1.0 - ((leftTopWidthHeight.y + ((1.0 - pos.y) * leftTopWidthHeight.w)) / canvasWidthHeight.y); //1..0 + frac = (frac * 2.0) - 1.0; + gl_Position = vec4(frac, 0.0, 1.0); + vUV = vec2(uvLeftTopWidthHeight.x + (pos.x * uvLeftTopWidthHeight.z), uvLeftTopWidthHeight.y + ((1.0 - pos.y) * uvLeftTopWidthHeight.w) ); +}`,fragFontShader=`#version 300 es +#line 593 +precision highp int; +precision highp float; +uniform highp sampler2D fontTexture; +uniform vec4 fontColor; +uniform float screenPxRange; +in vec2 vUV; +out vec4 color; +float median(float r, float g, float b) { + return max(min(r, g), min(max(r, g), b)); +} +void main() { + vec3 msd = texture(fontTexture, vUV).rgb; + float sd = median(msd.r, msd.g, msd.b); + float screenPxDistance = screenPxRange*(sd - 0.5); + float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0); + color = vec4(fontColor.rgb , fontColor.a * opacity); +}`,vertCircleShader=`#version 300 es +layout(location=0) in vec3 pos; +uniform vec2 canvasWidthHeight; +uniform vec4 leftTopWidthHeight; +uniform vec4 uvLeftTopWidthHeight; +out vec2 vUV; +void main(void) { + //convert pixel x,y space 1..canvasWidth,1..canvasHeight to WebGL 1..-1,-1..1 + vec2 frac; + frac.x = (leftTopWidthHeight.x + (pos.x * leftTopWidthHeight.z)) / canvasWidthHeight.x; //0..1 + frac.y = 1.0 - ((leftTopWidthHeight.y + ((1.0 - pos.y) * leftTopWidthHeight.w)) / canvasWidthHeight.y); //1..0 + frac = (frac * 2.0) - 1.0; + gl_Position = vec4(frac, 0.0, 1.0); + vUV = pos.xy; +}`,fragCircleShader=`#version 300 es +precision highp int; +precision highp float; +uniform vec4 circleColor; +uniform float fillPercent; +in vec2 vUV; +out vec4 color; +void main() { + /* Check if the pixel is inside the circle + and color it with a gradient. Otherwise, color it + transparent */ + float distance = length(vUV-vec2(0.5,0.5)); + if ( distance < 0.5 && distance >= (1.0 - fillPercent) / 2.0){ + color = vec4(circleColor.r,circleColor.g,circleColor.b,circleColor.a) ; + }else{ + color = vec4(0.0,0.0,0.0,0.0); + } +} +`,vertOrientShader=`#version 300 es +#line 613 +precision highp int; +precision highp float; +in vec3 vPos; +out vec2 TexCoord; +void main() { + TexCoord = vPos.xy; + gl_Position = vec4( (vPos.xy-vec2(0.5,0.5)) * 2.0, 0.0, 1.0); +}`,fragOrientShaderU=`#version 300 es +uniform highp usampler3D intensityVol; +`,fragOrientShaderI=`#version 300 es +uniform highp isampler3D intensityVol; +`,fragOrientShaderF=`#version 300 es +uniform highp sampler3D intensityVol; +`,fragOrientShaderAtlas=`#line 636 +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform float layer; +uniform highp sampler2D colormap; +uniform lowp sampler3D blend3D; +uniform float opacity; +uniform vec4 xyzaFrac; +uniform mat4 mtx; +void main(void) { + vec4 vx = vec4(TexCoord.x, TexCoord.y, coordZ, 1.0) * mtx; + uint idx = uint(texture(intensityVol, vx.xyz).r); + FragColor = vec4(0.0, 0.0, 0.0, 0.0); + if (idx == uint(0)) + return; + //idx = ((idx - uint(1)) % uint(100))+uint(1); + float textureWidth = float(textureSize(colormap, 0).x); + float fx = (float(idx)+0.5) / textureWidth; + float nlayer = float(textureSize(colormap, 0).y); + float y = ((2.0 * layer) + 1.5)/nlayer; + FragColor = texture(colormap, vec2(fx, y)).rgba; + float alpha = FragColor.a; + FragColor.a *= opacity; + if (xyzaFrac.a > 0.0) { //outline + vx = vec4(TexCoord.x+xyzaFrac.x, TexCoord.y, coordZ, 1.0) * mtx; + uint R = uint(texture(intensityVol, vx.xyz).r); + vx = vec4(TexCoord.x-xyzaFrac.x, TexCoord.y, coordZ, 1.0) * mtx; + uint L = uint(texture(intensityVol, vx.xyz).r); + vx = vec4(TexCoord.x, TexCoord.y+xyzaFrac.y, coordZ, 1.0) * mtx; + uint A = uint(texture(intensityVol, vx.xyz).r); + vx = vec4(TexCoord.x, TexCoord.y-xyzaFrac.y, coordZ, 1.0) * mtx; + uint P = uint(texture(intensityVol, vx.xyz).r); + vx = vec4(TexCoord.x, TexCoord.y, coordZ+xyzaFrac.z, 1.0) * mtx; + uint S = uint(texture(intensityVol, vx.xyz).r); + vx = vec4(TexCoord.x, TexCoord.y, coordZ-xyzaFrac.z, 1.0) * mtx; + uint I = uint(texture(intensityVol, vx.xyz).r); + if ((idx != R) || (idx != L) || (idx != A) || (idx != P) || (idx != S) || (idx != I)) + FragColor.a = alpha * xyzaFrac.a; + } +}`,fragOrientShader=`#line 691 +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform float layer; +uniform float scl_slope; +uniform float scl_inter; +uniform float cal_max; +uniform float cal_min; +uniform float cal_maxNeg; +uniform float cal_minNeg; +uniform bool isAlphaThreshold; +uniform bool isAdditiveBlend; +uniform highp sampler2D colormap; +uniform lowp sampler3D blend3D; +uniform int modulation; +uniform highp sampler3D modulationVol; +uniform float opacity; +uniform mat4 mtx; +void main(void) { + vec4 vx = vec4(TexCoord.xy, coordZ, 1.0) * mtx; + if ((vx.x < 0.0) || (vx.x > 1.0) || (vx.y < 0.0) || (vx.y > 1.0) || (vx.z < 0.0) || (vx.z > 1.0)) { + //set transparent if out of range + //https://webglfundamentals.org/webgl/webgl-3d-textures-repeat-clamp.html + FragColor = texture(blend3D, vec3(TexCoord.xy, coordZ)); + return; + } + float f = (scl_slope * float(texture(intensityVol, vx.xyz).r)) + scl_inter; + float mn = cal_min; + float mx = cal_max; + if (isAlphaThreshold) + mn = 0.0; + float r = max(0.00001, abs(mx - mn)); + mn = min(mn, mx); + float txl = mix(0.0, 1.0, (f - mn) / r); + //https://stackoverflow.com/questions/5879403/opengl-texture-coordinates-in-pixel-space + float nlayer = float(textureSize(colormap, 0).y); + //each volume has two color maps: + // (layer*2) = negative and (layer * 2) + 1 = postive + float y = ((2.0 * layer) + 1.5)/nlayer; + FragColor = texture(colormap, vec2(txl, y)).rgba; + //negative colors + mn = cal_minNeg; + mx = cal_maxNeg; + if (isAlphaThreshold) + mx = 0.0; + //if ((!isnan(cal_minNeg)) && ( f < mx)) { + if ((cal_minNeg < cal_maxNeg) && ( f < mx)) { + r = max(0.00001, abs(mx - mn)); + mn = min(mn, mx); + txl = 1.0 - mix(0.0, 1.0, (f - mn) / r); + y = ((2.0 * layer) + 0.5)/nlayer; + FragColor = texture(colormap, vec2(txl, y)); + } + if (layer > 0.7) + FragColor.a = step(0.00001, FragColor.a); + //if (modulation > 10) + // FragColor.a *= texture(modulationVol, vx.xyz).r; + // FragColor.rgb *= texture(modulationVol, vx.xyz).r; + if (isAlphaThreshold) { + if ((cal_minNeg != cal_maxNeg) && ( f < 0.0) && (f > cal_maxNeg)) + FragColor.a = pow(-f / -cal_maxNeg, 2.0); + else if ((f > 0.0) && (cal_min > 0.0)) + FragColor.a *= pow(f / cal_min, 2.0); //issue435: A = (V/X)**2 + //FragColor.g = 0.0; + } + if (modulation == 1) { + FragColor.rgb *= texture(modulationVol, vx.xyz).r; + } else if (modulation == 2) { + FragColor.a = texture(modulationVol, vx.xyz).r; + } + FragColor.a *= opacity; + if (layer < 1.0) return; + vec4 prevColor = texture(blend3D, vec3(TexCoord.xy, coordZ)); + // https://en.wikipedia.org/wiki/Alpha_compositing + float aout = FragColor.a + (1.0 - FragColor.a) * prevColor.a; + if (aout <= 0.0) return; + if (isAdditiveBlend) + FragColor.rgb = ((FragColor.rgb * FragColor.a) + (prevColor.rgb * prevColor.a)) / aout; + else + FragColor.rgb = ((FragColor.rgb * FragColor.a) + (prevColor.rgb * prevColor.a * (1.0 - FragColor.a))) / aout; + FragColor.a = aout; +}`,fragRGBOrientShader=`#line 773 +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform float layer; +uniform float scl_slope; +uniform float scl_inter; +uniform float cal_max; +uniform float cal_min; +uniform highp sampler2D colormap; +uniform lowp sampler3D blend3D; +uniform float opacity; +uniform mat4 mtx; +uniform bool hasAlpha; +uniform int modulation; +uniform highp sampler3D modulationVol; +void main(void) { + vec4 vx = vec4(TexCoord.xy, coordZ, 1.0) * mtx; + uvec4 aColor = texture(intensityVol, vx.xyz); + FragColor = vec4(float(aColor.r) / 255.0, float(aColor.g) / 255.0, float(aColor.b) / 255.0, float(aColor.a) / 255.0); + if (modulation == 1) + FragColor.rgb *= texture(modulationVol, vx.xyz).r; + if (!hasAlpha) { + FragColor.a = (FragColor.r * 0.21 + FragColor.g * 0.72 + FragColor.b * 0.07); + //next line: we could binarize alpha, but see rendering of visible human + //FragColor.a = step(0.01, FragColor.a); + } + if (modulation == 2) + FragColor.a = texture(modulationVol, vx.xyz).r; + FragColor.a *= opacity; +}`,vertGrowCutShader=`#version 300 es +#line 808 +precision highp int; +precision highp float; +in vec3 vPos; +out vec2 TexCoord; +void main() { + TexCoord = vPos.xy; + gl_Position = vec4((vPos.x - 0.5) * 2.0, (vPos.y - 0.5) * 2.0, 0.0, 1.0); +}`,fragGrowCutShader=`#version 300 es +#line 829 + precision highp float; + precision highp int; + precision highp isampler3D; + layout(location = 0) out int label; + layout(location = 1) out int strength; + in vec2 TexCoord; + uniform int finalPass; + uniform float coordZ; + uniform lowp sampler3D in3D; + uniform highp isampler3D backTex; // background + uniform highp isampler3D labelTex; // label + uniform highp isampler3D strengthTex; // strength +void main(void) { + vec3 interpolatedTextureCoordinate = vec3(TexCoord.xy, coordZ); + ivec3 size = textureSize(backTex, 0); + ivec3 texelIndex = ivec3(floor(interpolatedTextureCoordinate * vec3(size))); + int background = texelFetch(backTex, texelIndex, 0).r; + label = texelFetch(labelTex, texelIndex, 0).r; + strength = texelFetch(strengthTex, texelIndex, 0).r; + for (int k = -1; k <= 1; k++) { + for (int j = -1; j <= 1; j++) { + for (int i = -1; i <= 1; i++) { + if (i != 0 && j != 0 && k != 0) { + ivec3 neighborIndex = texelIndex + ivec3(i,j,k); + int neighborBackground = texelFetch(backTex, neighborIndex, 0).r; + int neighborStrength = texelFetch(strengthTex, neighborIndex, 0).r; + int strengthCost = abs(neighborBackground - background); + int takeoverStrength = neighborStrength - strengthCost; + if (takeoverStrength > strength) { + strength = takeoverStrength; + label = texelFetch(labelTex, neighborIndex, 0).r; + } + } + } + } + } + if (finalPass < 1) + return; + int ok = 1; + ivec4 labelCount = ivec4(0,0,0,0); + for (int k = -1; k <= 1; k++) + for (int j = -1; j <= 1; j++) + for (int i = -1; i <= 1; i++) { + ivec3 neighborIndex = texelIndex + ivec3(i,j,k); + int ilabel = texelFetch(labelTex, neighborIndex, 0).r; + if ((ilabel < 0) || (ilabel > 3)) + ok = 0; + else + labelCount[ilabel]++; + } + if (ok != 1) { + return; + } + int maxIdx = 0; + for (int i = 1; i < 4; i++) { + if (labelCount[i] > labelCount[maxIdx]) + maxIdx = i; + } + label = maxIdx; +}`,vertSurfaceShader=`#version 300 es +layout(location=0) in vec3 pos; +uniform mat4 mvpMtx; +void main(void) { + gl_Position = mvpMtx * vec4(pos, 1.0); +}`,fragSurfaceShader=`#version 300 es +precision highp int; +precision highp float; +uniform vec4 surfaceColor; +out vec4 color; +void main() { + color = surfaceColor; +}`,vertFiberShader=`#version 300 es +layout(location=0) in vec3 pos; +layout(location=1) in vec4 clr; +out vec4 vClr; +uniform mat4 mvpMtx; +void main(void) { + gl_Position = mvpMtx * vec4(pos, 1.0); + vClr = clr; +}`,fragFiberShader=`#version 300 es +precision highp int; +precision highp float; +in vec4 vClr; +out vec4 color; +uniform float opacity; +void main() { + color = vec4(vClr.rgb, opacity); +}`,vertMeshShader=`#version 300 es +layout(location=0) in vec3 pos; +layout(location=1) in vec4 norm; +layout(location=2) in vec4 clr; +uniform mat4 mvpMtx; +//uniform mat4 modelMtx; +uniform mat4 normMtx; +out vec4 vClr; +out vec3 vN; +out vec4 vPc; +void main(void) { + vec3 lightPosition = vec3(0.0, 0.0, -10.0); + vPc = mvpMtx * vec4(pos, 1.0); + gl_Position = vPc; + vN = normalize((normMtx * vec4(norm.xyz,1.0)).xyz); + //vV = -vec3(modelMtx*vec4(pos,1.0)); + vClr = clr; +}`,fragMeshDepthShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +out vec4 color; +vec4 packFloatToVec4i(const float value) { + const vec4 bitSh = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0); + const vec4 bitMsk = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0); + vec4 res = fract(value * bitSh); + res -= res.xxyz * bitMsk; + return res; +} +void main() { + color = packFloatToVec4i(gl_FragCoord.z); +}`,fragMeshToonShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +float stepmix(float edge0, float edge1, float E, float x){ + float T = clamp(0.5 * (x - edge0 + E) / E, 0.0, 1.0); + return mix(edge0, edge1, T); +} +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); + float ambient = 0.3; + float diffuse = 0.6; + float specular = 0.5; + float shininess = 50.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float df = max(0.0, dot(n, l)); + float sf = pow(max(dot(reflect(l, n), r), 0.0), shininess); + const float A = 0.1; + const float B = 0.3; + const float C = 0.6; + const float D = 1.0; + float E = fwidth(df); + if (df > A - E && df < A + E) df = stepmix(A, B, E, df); + else if (df > B - E && df < B + E) df = stepmix(B, C, E, df); + else if (df > C - E && df < C + E) df = stepmix(C, D, E, df); + else if (df < A) df = 0.0; + else if (df < B) df = B; + else if (df < C) df = C; + else df = D; + E = fwidth(sf); + if (sf > 0.5 - E && sf < 0.5 + E) + sf = smoothstep(0.5 - E, 0.5 + E, sf); + else + sf = step(0.5, sf); + vec3 a = vClr.rgb * ambient; + vec3 d = max(df, 0.0) * vClr.rgb * diffuse; + color.rgb = a + d + (specular * sf); + color.a = opacity; +}`,fragMeshOutlineShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.3; + float diffuse = 0.6; + float specular = 0.25; + float shininess = 10.0; + float PenWidth = 0.6; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + float view = abs(dot(n,r)); //with respect to viewer + if (PenWidth < view) discard; + vec3 a = vClr.rgb * ambient; + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color.rgb = a + d + s; + color.a = opacity; +}`,fragMeshEdgeShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float diffuse = 1.0; + float specular = 0.2; + float shininess = 10.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 0.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = max(dot(n, l), 0.0); + vec3 d = lightNormDot * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color = vec4(d + s, opacity); +}`,fragMeshDiffuseEdgeShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + float diffuse = 1.4; + vec3 l = vec3(0.0, 0.0, -1.0); + float lightNormDot = max(dot(normalize(vN), l), 0.0); + color = vec4(lightNormDot * vClr.rgb * diffuse, opacity); +}`,fragMeshSpecularEdgeShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + float specularRGB = 0.7; + float specularWhite = 0.3; + float shininess = 10.0; + float diffuse = 1.0; + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + vec3 n = normalize(vN); + vec3 l = vec3(0.0, 0.0, -1.0); + float lightNormDot = max(dot(n, l), 0.0); + vec3 d3 = lightNormDot * vClr.rgb * diffuse; + float s = pow(max(dot(reflect(l, n), r), 0.0), shininess); + vec3 s3 = specularRGB * s * vClr.rgb; + s *= specularWhite; + color = vec4(d3 + s3 + s, opacity); +}`,fragMeshShaderCrevice=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +in vec4 vPc; +out vec4 color; +void main() { + vec3 n = normalize(vN); + // Compute curvature + vec3 dx = dFdx(n); + vec3 dy = dFdy(n); + vec3 xneg = n - dx; + vec3 xpos = n + dx; + vec3 yneg = n - dy; + vec3 ypos = n + dy; + float depth = length(vPc.xyz); + float curv = (cross(xneg, xpos).y - cross(yneg, ypos).x) / depth; + //at this stage 0.5 for flat, with valleys dark and ridges bright + curv = 1.0 - (curv + 0.5); + //clamp + curv = min(max(curv, 0.0), 1.0); + // easing function + curv = pow(curv, 0.5); + //modulate ambient and diffuse with curvature + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.6; + float diffuse = 0.6; + float specular = 0.2; + float shininess = 10.0; + vec3 lightPosition = vec3(0.0, 10.0, -2.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + vec3 a = vClr.rgb * ambient * curv; + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color = vec4(a + d + s, opacity); +}`,fragMeshShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.35; + float diffuse = 0.5; + float specular = 0.2; + float shininess = 10.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + vec3 a = vClr.rgb * ambient; + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color = vec4(a + d + s, opacity); +}`,fragMeshMatcapShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +uniform sampler2D matCap; +out vec4 color; +void main() { + vec3 n = normalize(vN); + vec2 uv = n.xy * 0.5 + 0.5; + uv.y = 1.0 - uv.y; + vec3 clr = texture(matCap,uv.xy).rgb * vClr.rgb; + color = vec4(clr, opacity); +}`,fragMeshMatteShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + float ambient = 0.35; + float diffuse = 0.6; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + vec3 a = vClr.rgb * ambient; + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + color = vec4(a + d, opacity); +}`,fragMeshHemiShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.35; + float diffuse = 0.5; + float specular = 0.2; + float shininess = 10.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + vec3 up = vec3(0.0, 1.0, 0.0); + float ax = dot(n, up) * 0.5 + 0.5; //Shreiner et al. (2013) OpenGL Programming Guide, 8th Ed., p 388. ISBN-10: 0321773039 + vec3 upClr = vec3(1.0, 1.0, 0.95); + vec3 downClr = vec3(0.4, 0.4, 0.6); + vec3 a = vClr.rgb * ambient; + a *= mix(downClr, upClr, ax); + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color = vec4(a + d + s, opacity); +}`,fragMeshShaderSHBlue=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +in vec3 vN; +out vec4 color; +//Spherical harmonics constants +const float C1 = 0.429043; +const float C2 = 0.511664; +const float C3 = 0.743125; +const float C4 = 0.886227; +const float C5 = 0.247708; +//Spherical harmonics coefficients +// Ramamoorthi, R., and P. Hanrahan. 2001b. "An Efficient Representation for Irradiance Environment Maps." In Proceedings of SIGGRAPH 2001, pp. 497–500. +// https://github.com/eskimoblood/processingSketches/blob/master/data/shader/shinyvert.glsl +// https://github.com/eskimoblood/processingSketches/blob/master/data/shader/shinyvert.glsl +// Constants for Eucalyptus Grove lighting +const vec3 L00 = vec3( 0.3783264, 0.4260425, 0.4504587); +const vec3 L1m1 = vec3( 0.2887813, 0.3586803, 0.4147053); +const vec3 L10 = vec3( 0.0379030, 0.0295216, 0.0098567); +const vec3 L11 = vec3(-0.1033028, -0.1031690, -0.0884924); +const vec3 L2m2 = vec3(-0.0621750, -0.0554432, -0.0396779); +const vec3 L2m1 = vec3( 0.0077820, -0.0148312, -0.0471301); +const vec3 L20 = vec3(-0.0935561, -0.1254260, -0.1525629); +const vec3 L21 = vec3(-0.0572703, -0.0502192, -0.0363410); +const vec3 L22 = vec3( 0.0203348, -0.0044201, -0.0452180); +vec3 SH(vec3 vNormal) { + vNormal = vec3(vNormal.x,vNormal.z,vNormal.y); + vec3 diffuseColor = C1 * L22 * (vNormal.x * vNormal.x - vNormal.y * vNormal.y) + + C3 * L20 * vNormal.z * vNormal.z + + C4 * L00 - + C5 * L20 + + 2.0 * C1 * L2m2 * vNormal.x * vNormal.y + + 2.0 * C1 * L21 * vNormal.x * vNormal.z + + 2.0 * C1 * L2m1 * vNormal.y * vNormal.z + + 2.0 * C2 * L11 * vNormal.x + + 2.0 * C2 * L1m1 * vNormal.y + + 2.0 * C2 * L10 * vNormal.z; + return diffuseColor; +} +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.3; + float diffuse = 0.6; + float specular = 0.1; + float shininess = 10.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + vec3 a = vClr.rgb * ambient; + vec3 d = vClr.rgb * diffuse * SH(-reflect(n, vec3(l.x, l.y, -l.z)) ); + color = vec4(a + d + s, opacity); +}`,vertFlatMeshShader=`#version 300 es +layout(location=0) in vec3 pos; +layout(location=1) in vec4 norm; +layout(location=2) in vec4 clr; +uniform mat4 mvpMtx; +//uniform mat4 modelMtx; +uniform mat4 normMtx; +out vec4 vClr; +flat out vec3 vN; +void main(void) { + gl_Position = mvpMtx * vec4(pos, 1.0); + vN = normalize((normMtx * vec4(norm.xyz,1.0)).xyz); + //vV = -vec3(modelMtx*vec4(pos,1.0)); + vClr = clr; +}`,fragFlatMeshShader=`#version 300 es +precision highp int; +precision highp float; +uniform float opacity; +in vec4 vClr; +flat in vec3 vN; +out vec4 color; +void main() { + vec3 r = vec3(0.0, 0.0, 1.0); //rayDir: for orthographic projections moving in Z direction (no need for normal matrix) + float ambient = 0.35; + float diffuse = 0.5; + float specular = 0.2; + float shininess = 10.0; + vec3 n = normalize(vN); + vec3 lightPosition = vec3(0.0, 10.0, -5.0); + vec3 l = normalize(lightPosition); + float lightNormDot = dot(n, l); + vec3 a = vClr.rgb * ambient; + vec3 d = max(lightNormDot, 0.0) * vClr.rgb * diffuse; + float s = specular * pow(max(dot(reflect(l, n), r), 0.0), shininess); + color = vec4(a + d + s, opacity); +}`,fragVolumePickingShader=`#version 300 es +#line 1260 +//precision highp int; +precision highp float; +uniform vec3 rayDir; +uniform vec3 volScale; +uniform vec3 texVox; +uniform vec4 clipPlane; +uniform highp sampler3D volume, overlay; +uniform float overlays; +uniform float clipThick; +uniform vec3 clipLo; +uniform vec3 clipHi; +uniform mat4 matRAS; +uniform mat4 mvpMtx; +uniform float drawOpacity, renderOverlayBlend; +uniform highp sampler3D drawing; +uniform highp sampler2D colormap; +uniform int backgroundMasksOverlays; +in vec3 vColor; +out vec4 fColor; +`+kRenderFunc+` +void main() { + int id = 254; + vec3 start = vColor; + gl_FragDepth = 0.0; + fColor = vec4(0.0, 0.0, 0.0, 0.0); //assume no hit: ID = 0 + float fid = float(id & 255)/ 255.0; + vec3 backPosition = GetBackPosition(start); + vec3 dir = normalize(backPosition - start); + clipVolumeStart(start, backPosition); + float len = length(backPosition - start); + float lenVox = length((texVox * start) - (texVox * backPosition)); + if ((lenVox < 0.5) || (len > 3.0)) return;//discard; //length limit for parallel rays + float sliceSize = len / lenVox; //e.g. if ray length is 1.0 and traverses 50 voxels, each voxel is 0.02 in unit cube + float stepSize = sliceSize; //quality: larger step is faster traversal, but fewer samples + float opacityCorrection = stepSize/sliceSize; + dir = normalize(dir); + vec4 samplePos = vec4(start.xyz, 0.0); //ray position + float lenNoClip = len; + bool isClip = false; + vec4 clipPos = applyClip(dir, samplePos, len, isClip); + if (isClip) fColor = vec4(samplePos.xyz, 253.0 / 255.0); //assume no hit: ID = 0 + //start: OPTIONAL fast pass: rapid traversal until first hit + float stepSizeFast = sliceSize * 1.9; + vec4 deltaDirFast = vec4(dir.xyz * stepSizeFast, stepSizeFast); + while (samplePos.a <= len) { + float val = texture(volume, samplePos.xyz).a; + if (val > 0.01) { + fColor = vec4(samplePos.rgb, fid); + gl_FragDepth = frac2ndc(samplePos.xyz); + break; + } + samplePos += deltaDirFast; //advance ray position + } + //end: fast pass + if ((overlays < 1.0) || (backgroundMasksOverlays > 0)) { + return; //background hit, no overlays + } + //overlay pass + len = min(lenNoClip, samplePos.a); //only find overlay closer than background + samplePos = vec4(start.xyz, 0.0); //ray position + while (samplePos.a <= len) { + float val = texture(overlay, samplePos.xyz).a; + if (val > 0.01) { + fColor = vec4(samplePos.rgb, fid); + gl_FragDepth = frac2ndc(samplePos.xyz); + return; + } + samplePos += deltaDirFast; //advance ray position + } + //if (fColor.a == 0.0) discard; //no hit in either background or overlays + //you only get here if there is a hit with the background that is closer than any overlay +}`,vertOrientCubeShader=`#version 300 es +// an attribute is an input (in) to a vertex shader. +// It will receive data from a buffer +layout(location=0) in vec3 a_position; +layout(location=1) in vec3 a_color; +// A matrix to transform the positions by +uniform mat4 u_matrix; +out vec3 vColor; +// all shaders have a main function +void main() { + // Multiply the position by the matrix. + vec4 pos = vec4(a_position, 1.0); + gl_Position = u_matrix * vec4(pos); + vColor = a_color; +} +`,fragOrientCubeShader=`#version 300 es +precision highp float; +uniform vec4 u_color; +in vec3 vColor; +out vec4 outColor; +void main() { + outColor = vec4(vColor, 1.0); +}`,vertPassThroughShader=`#version 300 es +#line 1359 +precision highp int; +precision highp float; +in vec3 vPos; +out vec2 TexCoord; +void main() { + TexCoord = vPos.xy; + vec2 viewCoord = (vPos.xy - 0.5) * 2.0; + gl_Position = vec4((vPos.xy - 0.5) * 2.0, 0.0, 1.0); +}`,fragPassThroughShader=`#version 300 es +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform lowp sampler3D in3D; +void main(void) { + FragColor = texture(in3D, vec3(TexCoord.xy, coordZ)); +}`,blurVertShader=`#version 300 es +#line 286 +precision highp int; +precision highp float; +in vec3 vPos; +out vec2 TexCoord; +void main() { + TexCoord = vPos.xy; + gl_Position = vec4( (vPos.xy-vec2(0.5,0.5))* 2.0, 0.0, 1.0); +}`,blurFragShader=`#version 300 es +#line 298 +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform float dX; +uniform float dY; +uniform float dZ; +uniform highp sampler3D intensityVol; +void main(void) { + vec3 vx = vec3(TexCoord.xy, coordZ); + vec4 samp = texture(intensityVol,vx+vec3(+dX,+dY,+dZ)); + samp += texture(intensityVol,vx+vec3(+dX,+dY,-dZ)); + samp += texture(intensityVol,vx+vec3(+dX,-dY,+dZ)); + samp += texture(intensityVol,vx+vec3(+dX,-dY,-dZ)); + samp += texture(intensityVol,vx+vec3(-dX,+dY,+dZ)); + samp += texture(intensityVol,vx+vec3(-dX,+dY,-dZ)); + samp += texture(intensityVol,vx+vec3(-dX,-dY,+dZ)); + samp += texture(intensityVol,vx+vec3(-dX,-dY,-dZ)); + FragColor = samp*0.125; +}`,sobelFragShader=`#version 300 es +#line 323 +precision highp int; +precision highp float; +in vec2 TexCoord; +out vec4 FragColor; +uniform float coordZ; +uniform float dX; +uniform float dY; +uniform float dZ; +uniform highp sampler3D intensityVol; +void main(void) { + vec3 vx = vec3(TexCoord.xy, coordZ); + //Neighboring voxels 'T'op/'B'ottom, 'A'nterior/'P'osterior, 'R'ight/'L'eft + float TAR = texture(intensityVol,vx+vec3(+dX,+dY,+dZ)).r; + float TAL = texture(intensityVol,vx+vec3(+dX,+dY,-dZ)).r; + float TPR = texture(intensityVol,vx+vec3(+dX,-dY,+dZ)).r; + float TPL = texture(intensityVol,vx+vec3(+dX,-dY,-dZ)).r; + float BAR = texture(intensityVol,vx+vec3(-dX,+dY,+dZ)).r; + float BAL = texture(intensityVol,vx+vec3(-dX,+dY,-dZ)).r; + float BPR = texture(intensityVol,vx+vec3(-dX,-dY,+dZ)).r; + float BPL = texture(intensityVol,vx+vec3(-dX,-dY,-dZ)).r; + vec4 gradientSample = vec4 (0.0, 0.0, 0.0, 0.0); + gradientSample.r = BAR+BAL+BPR+BPL -TAR-TAL-TPR-TPL; + gradientSample.g = TPR+TPL+BPR+BPL -TAR-TAL-BAR-BAL; + gradientSample.b = TAL+TPL+BAL+BPL -TAR-TPR-BAR-BPR; + gradientSample.a = (abs(gradientSample.r)+abs(gradientSample.g)+abs(gradientSample.b))*0.29; + gradientSample.rgb = normalize(gradientSample.rgb); + gradientSample.rgb = (gradientSample.rgb * 0.5)+0.5; + FragColor = gradientSample; +}`,orientCube=new Float32Array([-1,-1,-1,.28,.28,.28,-1,-1,-1,.28,.28,.28,-1,1,-1,.28,.28,.28,1,-1,-1,.28,.28,.28,1,1,-1,.28,.28,.28,1,1,-1,.28,.28,.28,-1,-1,1,.8,.8,.8,-1,-1,1,.8,.8,.8,1,-1,1,.8,.8,.8,-1,1,1,.8,.8,.8,1,1,1,.8,.8,.8,1,1,1,.8,.8,.8,-1,1,-1,0,0,.74,-1,1,-1,0,0,.74,-1,1,1,0,0,.74,1,1,-1,0,0,.74,1,1,1,0,0,.74,1,1,1,0,0,.74,-1,-1,-1,.42,0,.42,-1,-1,-1,.42,0,.42,1,-1,-1,.42,0,.42,-1,-1,1,.42,0,.42,1,-1,1,.42,0,.42,1,-1,1,.42,0,.42,-1,-1,-1,.64,0,0,-1,-1,-1,.64,0,0,-1,-1,1,.64,0,0,-1,1,-1,.64,0,0,-1,1,1,.64,0,0,-1,1,1,.64,0,0,1,-1,-1,0,.5,0,1,-1,-1,0,.5,0,1,1,-1,0,.5,0,1,-1,1,0,.5,0,1,1,1,0,.5,0,1,1,1,0,.5,0,-.45,1,-.8,0,0,0,-.45,1,-.8,0,0,0,-.45,1,.8,0,0,0,-.25,1,-.8,0,0,0,-.25,1,.8,0,0,0,-.25,1,.8,0,0,0,-.25,1,.6,0,0,0,-.25,1,.6,0,0,0,-.25,1,.8,0,0,0,.45,1,.6,0,0,0,.25,1,.8,0,0,0,.25,1,.8,0,0,0,.25,1,.1,0,0,0,.25,1,.1,0,0,0,.25,1,.6,0,0,0,.45,1,.1,0,0,0,.45,1,.6,0,0,0,.45,1,.6,0,0,0,-.25,1,-.1,0,0,0,-.25,1,-.1,0,0,0,-.25,1,.1,0,0,0,.25,1,-.1,0,0,0,.45,1,.1,0,0,0,.45,1,.1,0,0,0,.45,-1,-.8,0,0,0,.45,-1,-.8,0,0,0,.05,-1,.8,0,0,0,.25,-1,-.8,0,0,0,-.15,-1,.8,0,0,0,-.15,-1,.8,0,0,0,-.25,-1,-.8,0,0,0,-.25,-1,-.8,0,0,0,.05,-1,.8,0,0,0,-.45,-1,-.8,0,0,0,-.15,-1,.8,0,0,0,-.15,-1,.8,0,0,0,.13,-1,-.3,0,0,0,.13,-1,-.3,0,0,0,.07,-1,-.1,0,0,0,-.33,-1,-.3,0,0,0,-.27,-1,-.1,0,0,0,-.27,-1,-.1,0,0,0,-.45,.6,1,0,0,0,-.45,.6,1,0,0,0,-.45,.4,1,0,0,0,-.25,.8,1,0,0,0,-.25,.4,1,0,0,0,-.25,.4,1,0,0,0,-.25,.8,1,0,0,0,-.25,.8,1,0,0,0,-.25,.6,1,0,0,0,.25,.8,1,0,0,0,.45,.6,1,0,0,0,.45,.6,1,0,0,0,.25,.8,1,0,0,0,.25,.8,1,0,0,0,.25,-.1,1,0,0,0,.45,.6,1,0,0,0,.45,.1,1,0,0,0,.45,.1,1,0,0,0,-.25,.1,1,0,0,0,-.25,.1,1,0,0,0,-.45,-.1,1,0,0,0,.25,.1,1,0,0,0,.25,-.1,1,0,0,0,.25,-.1,1,0,0,0,-.45,-.1,1,0,0,0,-.45,-.1,1,0,0,0,-.45,-.6,1,0,0,0,-.25,-.1,1,0,0,0,-.25,-.8,1,0,0,0,-.25,-.8,1,0,0,0,-.25,-.6,1,0,0,0,-.25,-.6,1,0,0,0,-.25,-.8,1,0,0,0,.45,-.6,1,0,0,0,.25,-.8,1,0,0,0,.25,-.8,1,0,0,0,.25,-.4,1,0,0,0,.25,-.4,1,0,0,0,.25,-.6,1,0,0,0,.45,-.4,1,0,0,0,.45,-.6,1,0,0,0,.45,-.6,1,0,0,0,-.1,-.8,-1,0,0,0,-.1,-.8,-1,0,0,0,-.1,.8,-1,0,0,0,.1,-.8,-1,0,0,0,.1,.8,-1,0,0,0,.1,.8,-1,0,0,0,-1,-.45,-.8,0,0,0,-1,-.45,-.8,0,0,0,-1,-.45,.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,.8,0,0,0,-1,-.25,.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,-.6,0,0,0,-1,.45,-.8,0,0,0,-1,.45,-.6,0,0,0,-1,.45,-.6,0,0,0,1,.45,-.8,0,0,0,1,.45,-.8,0,0,0,1,.45,.8,0,0,0,1,.25,-.8,0,0,0,1,.25,.8,0,0,0,1,.25,.8,0,0,0,1,.25,.6,0,0,0,1,.25,.6,0,0,0,1,.25,.8,0,0,0,1,-.45,.6,0,0,0,1,-.25,.8,0,0,0,1,-.25,.8,0,0,0,1,-.25,.1,0,0,0,1,-.25,.1,0,0,0,1,-.25,.6,0,0,0,1,-.45,.1,0,0,0,1,-.45,.6,0,0,0,1,-.45,.6,0,0,0,1,.25,-.1,0,0,0,1,.25,-.1,0,0,0,1,.25,.1,0,0,0,1,-.25,-.1,0,0,0,1,-.45,.1,0,0,0,1,-.45,.1,0,0,0,1,-.25,-.8,0,0,0,1,-.25,-.8,0,0,0,1,-.05,-.1,0,0,0,1,-.45,-.8,0,0,0,1,-.25,-.1,0,0,0,1,-.25,-.1,0,0,0]),_NiivueObject3D=class{constructor(u,h,g,S,v=null,w=null){__publicField(this,"sphereIdx",[]),__publicField(this,"sphereVtx",[]),__publicField(this,"renderShaders",[]),__publicField(this,"isVisible",!0),__publicField(this,"isPickable",!0),__publicField(this,"vertexBuffer"),__publicField(this,"indexCount"),__publicField(this,"indexBuffer"),__publicField(this,"vao"),__publicField(this,"mode"),__publicField(this,"glFlags",0),__publicField(this,"id"),__publicField(this,"colorId"),__publicField(this,"modelMatrix",create$3()),__publicField(this,"scale",[1,1,1]),__publicField(this,"position",[0,0,0]),__publicField(this,"rotation",[0,0,0]),__publicField(this,"rotationRadians",0),__publicField(this,"extentsMin",[]),__publicField(this,"extentsMax",[]),__publicField(this,"furthestVertexFromOrigin"),__publicField(this,"originNegate"),__publicField(this,"fieldOfViewDeObliqueMM"),__publicField(this,"mm"),this.vertexBuffer=h,this.indexCount=S,this.indexBuffer=v,this.vao=w,this.mode=g,this.id=u,this.colorId=[(u>>0&255)/255,(u>>8&255)/255,(u>>16&255)/255,(u>>24&255)/255]}};__publicField(_NiivueObject3D,"BLEND",1);__publicField(_NiivueObject3D,"CULL_FACE",2);__publicField(_NiivueObject3D,"CULL_FRONT",4);__publicField(_NiivueObject3D,"CULL_BACK",8);__publicField(_NiivueObject3D,"ENABLE_DEPTH_TEST",16);__publicField(_NiivueObject3D,"generateCrosshairs",function(C,u,h,g,S,v,w=20,I=0){const _=_NiivueObject3D.generateCrosshairsGeometry(C,h,g,S,v,w,I);return new _NiivueObject3D(u,_.vertexBuffer,C.TRIANGLES,_.indexCount,_.indexBuffer,_.vao)});__publicField(_NiivueObject3D,"generateCrosshairsGeometry",function(C,u,h,g,S,v=20,w=0){const I=[],_=[],P=S*w;if(P<=0){let e=fromValues$2(h[0],u[1],u[2]),N=fromValues$2(g[0],u[1],u[2]);_NiivueObject3D.makeCylinder(I,_,e,N,S,v),e=fromValues$2(u[0],h[1],u[2]),N=fromValues$2(u[0],g[1],u[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v),e=fromValues$2(u[0],u[1],h[2]),N=fromValues$2(u[0],u[1],g[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v)}else{let e=fromValues$2(h[0],u[1],u[2]),N=fromValues$2(u[0]-P,u[1],u[2]);_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1),e=fromValues$2(u[0]+P,u[1],u[2]),N=fromValues$2(g[0],u[1],u[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1),e=fromValues$2(u[0],h[1],u[2]),N=fromValues$2(u[0],u[1]-P,u[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1),e=fromValues$2(u[0],u[1]+P,u[2]),N=fromValues$2(u[0],g[1],u[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1),e=fromValues$2(u[0],u[1],h[2]),N=fromValues$2(u[0],u[1],u[2]-P),_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1),e=fromValues$2(u[0],u[1],u[2]+P),N=fromValues$2(u[0],u[1],g[2]),_NiivueObject3D.makeCylinder(I,_,e,N,S,v,!1)}const L=C.createBuffer();if(L===null)throw new Error("could not instantiate vertex buffer");C.bindBuffer(C.ARRAY_BUFFER,L),C.bufferData(C.ARRAY_BUFFER,new Float32Array(I),C.STATIC_DRAW);const d=C.createBuffer();if(d===null)throw new Error("could not instantiate index buffer");C.bindBuffer(C.ELEMENT_ARRAY_BUFFER,d),C.bufferData(C.ELEMENT_ARRAY_BUFFER,new Uint32Array(_),C.STATIC_DRAW);const k=C.createVertexArray();return C.bindVertexArray(k),C.bindBuffer(C.ELEMENT_ARRAY_BUFFER,d),C.bindBuffer(C.ARRAY_BUFFER,L),C.enableVertexAttribArray(0),C.vertexAttribPointer(0,3,C.FLOAT,!1,0,0),C.bindVertexArray(null),{vertexBuffer:L,indexBuffer:d,indexCount:_.length,vao:k}});__publicField(_NiivueObject3D,"getFirstPerpVector",function(C){const u=fromValues$2(0,0,0);return C[0]===0?u[0]=1:C[1]===0?u[1]=1:C[2]===0?u[2]=1:(u[0]=C[2],u[1]=C[2],u[2]=-(C[0]+C[1]),normalize$1(u,u)),u});__publicField(_NiivueObject3D,"subdivide",function(C,u){let h=C.length/3,g=u.length/3;const S=g,v=create$2(),w=create$2();for(let I=0;Iitksnap_default,$slicer3d:()=>slicer3d_default,actc:()=>actc_default,afni_blues_inv:()=>afni_blues_inv_default,afni_reds_inv:()=>afni_reds_inv_default,bcgwhw:()=>bcgwhw_default,bcgwhw_dark:()=>bcgwhw_dark_default,blue:()=>blue_default,blue2cyan:()=>blue2cyan_default,blue2magenta:()=>blue2magenta_default,blue2red:()=>blue2red_default,bluegrn:()=>bluegrn_default,bone:()=>bone_default,bronze:()=>bronze_default,cet_l17:()=>cet_l17_default,cividis:()=>cividis_default,cool:()=>cool_default,copper:()=>copper_default,copper2:()=>copper2_default,ct_airways:()=>ct_airways_default,ct_artery:()=>ct_artery_default,ct_bones:()=>ct_bones_default,ct_brain:()=>ct_brain_default,ct_brain_gray:()=>ct_brain_gray_default,ct_cardiac:()=>ct_cardiac_default,ct_head:()=>ct_head_default,ct_kidneys:()=>ct_kidneys_default,ct_liver:()=>ct_liver_default,ct_muscles:()=>ct_muscles_default,ct_scalp:()=>ct_scalp_default,ct_skull:()=>ct_skull_default,ct_soft:()=>ct_soft_default,ct_soft_tissue:()=>ct_soft_tissue_default,ct_surface:()=>ct_surface_default,ct_vessels:()=>ct_vessels_default,ct_w_contrast:()=>ct_w_contrast_default,cubehelix:()=>cubehelix_default,electric_blue:()=>electric_blue_default,freesurfer:()=>freesurfer_default,ge_color:()=>ge_color_default,gold:()=>gold_default,gray:()=>gray_default,green:()=>green_default,green2cyan:()=>green2cyan_default,green2orange:()=>green2orange_default,hot:()=>hot_default,hotiron:()=>hotiron_default,hsv:()=>hsv_default,inferno:()=>inferno_default,jet:()=>jet_default,linspecer:()=>linspecer_default,magma:()=>magma_default,mako:()=>mako_default,nih:()=>nih_default,plasma:()=>plasma_default,random:()=>random_default,red:()=>red_default,redyell:()=>redyell_default,rocket:()=>rocket_default,roi_i256:()=>roi_i256_default,surface:()=>surface_default,turbo:()=>turbo_default,violet:()=>violet_default,viridis:()=>viridis_default,warm:()=>warm_default,winter:()=>winter_default,x_rain:()=>x_rain_default});var itksnap_default={R:[0,255,0,0,255,0,255,255,0,205,210,102,0,0,46,255,106,221,233,165,255,147,218,75,255,60,255,255,218,0,188,255,255,222,127,139,124,255,70,0,238,238,240,245,184,32,255,25,112,34,248,245,255,144,173,65,255,250,128,50,244,255,123,255,173,255,127,255,143,220,253,255,0,0,128,255,250,148,178,255,135,100,240,250,255,107,135,0,139,245,186,255,255,0,210,255,47,72,175,128,176,255,139,240,255,216,119,219,72,255,199,154,189,240,230,0,85,64,153,205,250,95,0,255,224,176,138,30,240,152,160],G:[0,0,255,0,255,255,0,239,0,133,180,205,0,139,139,228,90,160,150,42,250,112,112,0,182,179,235,228,165,128,143,105,218,184,255,69,252,255,130,100,130,232,255,222,134,178,20,25,128,139,248,255,160,238,255,105,99,240,0,205,164,255,104,165,216,192,255,140,188,20,245,250,206,255,0,250,128,0,34,127,206,149,230,235,245,142,206,0,0,245,85,228,222,191,105,248,79,61,238,128,224,240,0,255,215,191,136,112,209,0,21,205,183,248,230,250,107,224,50,92,250,158,128,69,255,196,43,144,128,251,82],B:[0,0,0,255,0,255,255,213,205,63,140,170,128,139,87,225,205,221,122,42,250,219,214,130,193,113,205,196,32,128,143,180,185,135,0,19,0,224,180,0,238,170,240,179,11,170,147,112,144,34,255,250,122,144,47,225,71,230,0,50,96,240,238,0,230,203,212,0,143,60,230,240,209,127,128,205,114,211,34,80,235,237,140,215,238,35,250,139,139,220,211,181,173,255,30,220,79,139,238,0,230,245,0,255,0,216,153,147,204,255,133,50,107,255,250,154,47,208,204,92,210,160,0,0,255,222,226,255,128,152,45],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130]},slicer3d_default={labels:["background","tissue","bone","skin","connective tissue","blood","organ","mass","muscle","foreign object","waste","teeth","fat","gray matter","white matter","nerve","vein","artery","capillary","ligament","tendon","cartilage","meniscus","lymph node","lymphatic vessel","cerebro-spinal fluid","bile","urine","feces","gas","fluid","edema","bleeding","necrosis","clot","embolism","head","central nervous system","brain","gray matter of brain","telencephalon","cerebral cortex","right frontal lobe","left frontal lobe","right temporal lobe","left temporal lobe","right parietal lobe","left parietal lobe","right occipital lobe","left occipital lobe","right insular lobe","left insular lobe","right limbic lobe","left limbic lobe","right striatum","left striatum","right caudate nucleus","left caudate nucleus","right putamen","left putamen","right pallidum","left pallidum","right amygdaloid complex","left amygdaloid complex","diencephalon","thalamus","right thalamus","left thalamus","pineal gland","midbrain","substantia nigra","right substantia nigra","left substantia nigra","cerebral white matter","right superior longitudinal fasciculus","left superior longitudinal fasciculus","right inferior longitudinal fasciculus","left inferior longitudinal fasciculus","right arcuate fasciculus","left arcuate fasciculus","right uncinate fasciculus","left uncinate fasciculus","right cingulum bundle","left cingulum bundle","projection fibers","right corticospinal tract","left corticospinal tract","right optic radiation","left optic radiation","right medial lemniscus","left medial lemniscus","right superior cerebellar peduncle","left superior cerebellar peduncle","right middle cerebellar peduncle","left middle cerebellar peduncle","right inferior cerebellar peduncle","left inferior cerebellar peduncle","optic chiasm","right optic tract","left optic tract","right fornix","left fornix","commissural fibers","corpus callosum","posterior commissure","cerebellar white matter","CSF space","ventricles of brain","right lateral ventricle","left lateral ventricle","right third ventricle","left third ventricle","cerebral aqueduct","fourth ventricle","subarachnoid space","spinal cord","gray matter of spinal cord","white matter of spinal cord","endocrine system of brain","pituitary gland","adenohypophysis","neurohypophysis","meninges","dura mater","arachnoid","pia mater","muscles of head","salivary glands","lips","nose","tongue","soft palate","right inner ear","left inner ear","right external ear","left external ear","right middle ear","left middle ear","right eyeball","left eyeball","skull","right frontal bone","left frontal bone","right parietal bone","left parietal bone","right temporal bone","left temporal bone","right sphenoid bone","left sphenoid bone","right ethmoid bone","left ethmoid bone","occipital bone","maxilla","right zygomatic bone","right lacrimal bone","vomer bone","right palatine bone","left palatine bone","mandible","neck","muscles of neck","pharynx","larynx","thyroid gland","right parathyroid glands","left parathyroid glands","skeleton of neck","hyoid bone","cervical vertebral column","thorax","trachea","bronchi","right lung","left lung","superior lobe of right lung","superior lobe of left lung","middle lobe of right lung","inferior lobe of right lung","inferior lobe of left lung","pleura","heart","right atrium","left atrium","atrial septum","ventricular septum","right ventricle of heart","left ventricle of heart","mitral valve","tricuspid valve","aortic valve","pulmonary valve","aorta","pericardium","pericardial cavity","esophagus","thymus","mediastinum","skin of thoracic wall","muscles of thoracic wall","skeleton of thorax","thoracic vertebral column","ribs","sternum","right clavicle","left clavicle","abdominal cavity","abdomen","peritoneum","omentum","peritoneal cavity","retroperitoneal space","stomach","duodenum","small bowel","colon","anus","liver","biliary tree","gallbladder","pancreas","spleen","urinary system","right kidney","left kidney","right ureter","left ureter","urinary bladder","urethra","right adrenal gland","left adrenal gland","female internal genitalia","uterus","right fallopian tube","left fallopian tube","right ovary","left ovary","vagina","male internal genitalia","prostate","right seminal vesicle","left seminal vesicle","right deferent duct","left deferent duct","skin of abdominal wall","muscles of abdominal wall","skeleton of abdomen","lumbar vertebral column","female external genitalia","male external genitalia","skeleton of upper limb","muscles of upper limb","right upper limb","left upper limb","right shoulder","left shoulder","right arm"],R:[0,128,241,177,111,216,221,144,192,220,78,255,230,200,250,244,0,216,183,183,152,111,178,68,111,85,0,214,78,218,170,140,188,216,145,150,177,244,250,200,68,128,83,83,162,162,141,141,182,182,188,188,154,154,177,177,30,30,210,210,48,48,98,98,69,166,122,122,253,145,46,0,0,250,127,127,159,159,125,125,106,106,154,154,126,201,201,78,78,174,174,139,139,148,148,186,186,99,156,156,64,64,138,97,126,194,85,88,88,88,88,88,88,88,88,244,200,250,82,57,60,92,255,255,255,255,201,70,188,177,166,182,229,229,174,174,201,201,194,194,241,203,203,229,229,255,255,209,209,248,248,255,196,255,255,255,242,242,222,177,213,184,150,62,62,62,242,250,255,177,182,175,197,197,172,172,202,224,224,255,206,210,203,233,195,181,152,159,166,218,225,224,255,184,211,47,255,173,188,255,226,253,244,205,205,186,177,255,234,204,180,216,255,205,204,255,221,0,139,249,157,203,185,185,247,247,222,124,249,249,244,255,255,227,213,213,193,216,230,245,245,241,241,177,171,217,212,185,185,198,194,177,177,177,177,177],G:[0,174,214,122,184,101,130,238,104,245,63,250,220,200,250,214,151,101,156,214,189,184,212,172,197,188,145,230,63,255,250,224,65,191,60,98,122,214,250,200,131,174,146,146,115,115,93,93,166,166,135,135,150,150,140,140,111,111,157,157,129,129,153,153,110,113,101,101,135,92,101,108,108,250,150,150,116,116,102,102,174,174,146,146,126,160,160,152,152,140,140,126,126,120,120,135,135,106,171,171,123,123,95,113,161,195,188,106,106,106,106,106,106,106,106,214,200,250,174,157,143,162,244,244,244,244,121,163,91,122,84,105,147,147,122,122,112,112,142,142,213,179,179,204,204,243,243,185,185,223,223,230,172,255,250,237,217,217,198,122,124,105,208,162,162,162,206,210,255,122,228,216,165,165,138,138,164,186,186,245,110,115,108,138,100,85,55,63,70,123,130,97,244,122,171,150,244,121,95,239,202,232,217,179,179,124,122,255,234,142,119,132,253,167,168,224,130,145,150,180,108,136,102,102,182,182,154,186,186,186,170,181,190,153,141,141,123,146,158,172,172,172,172,124,85,198,188,135,135,175,98,122,122,122,122,122],B:[0,128,145,101,210,79,101,144,88,20,0,220,70,235,210,49,206,79,220,211,207,210,242,100,131,255,30,130,0,255,250,228,28,216,66,83,101,49,225,215,98,128,164,164,105,105,137,137,110,110,166,166,201,201,190,190,85,85,166,166,126,126,112,112,53,137,38,38,192,109,131,112,112,225,88,88,163,163,154,154,155,155,83,83,55,133,133,141,141,103,103,177,177,72,72,135,135,24,108,108,147,147,74,158,197,164,255,215,215,215,215,215,215,215,215,49,215,225,128,110,83,109,209,209,209,209,77,117,95,101,94,107,118,118,90,90,73,73,0,0,144,77,77,109,109,152,152,85,85,131,131,138,68,167,160,145,123,123,101,101,109,108,243,114,114,114,142,139,207,101,255,244,145,145,115,115,140,162,162,217,84,89,81,112,73,57,13,27,38,97,104,76,209,154,143,103,209,88,76,172,134,158,154,108,108,161,101,220,194,178,153,105,229,142,143,199,101,30,98,111,162,116,83,83,164,164,132,223,150,150,147,158,165,130,113,113,103,127,140,147,147,151,151,92,68,131,102,134,134,125,79,101,101,101,101,101],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},actc_default={R:[0,0,24,248,255],G:[0,0,177,254,0],B:[0,136,0,0,0],A:[0,32,64,78,128],I:[0,64,128,156,255]},bcgwhw_dark_default={R:[0,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[0,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[0,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},bcgwhw_default={R:[255,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[255,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[255,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},blue2red_default={R:[0,0,0,0,196,255],G:[0,32,128,128,128,32],B:[0,255,196,0,0,0],A:[0,128,64,64,64,128],I:[0,1,64,128,192,255]},blue2magenta_default={R:[0,255],G:[0,0],B:[255,255],A:[0,128],I:[0,255]},blue2cyan_default={R:[0,0],G:[0,255],B:[255,255],A:[0,128],I:[0,255]},bluegrn_default={R:[0,0,0,0],G:[0,1,128,255],B:[0,222,127,32],A:[0,0,64,128],I:[0,1,128,255]},blue_default={R:[0,0,0],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},bone_default={R:[0,103,255],G:[0,126,255],B:[0,165,255],A:[0,76,128],I:[0,153,255]},bronze_default={R:[0,43,103,199,216,255],G:[0,0,37,155,213,255],B:[0,0,20,97,201,255],A:[0,44,48,54,56,56],I:[0,64,128,196,240,255]},cet_l17_default={R:[0,9,24,33,40,46,52,57,62,66,70,74,78,81,85,88,91,94,98,101,103,106,109,112,114,117,119,121,124,126,128,130,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,164,166,168,169,171,172,174,175,177,178,180,181,183,184,186,187,189,190,191,193,194,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,222,223,224,224,225,226,226,227,228,228,229,229,230,231,231,232,233,233,234,234,235,235,236,236,236,237,237,237,238,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,243,243,243,243,243,244,244,244,244,244,244,244,244,244,244,244,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,243,243,243,243,243,243,243,243,243,243,243,243,242,242,242,242,242,242,242,242,241,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,243,243,244,244,245,246,246,247,247,248,249,249,250,250,251,251,252,252,253,253,254,254,254],G:[42,41,41,41,40,40,40,39,39,39,38,38,37,37,36,36,35,35,34,34,33,32,32,31,30,30,30,30,29,29,29,29,28,28,28,27,27,27,26,26,26,25,25,25,24,24,24,24,24,25,25,26,27,27,28,28,29,30,30,31,31,32,33,33,34,34,35,36,36,37,38,39,40,42,43,44,45,47,48,49,50,51,53,54,55,56,57,58,59,60,62,63,64,65,66,68,69,71,72,73,75,76,77,79,80,81,83,84,85,87,88,89,90,92,93,94,95,97,98,100,101,102,104,105,107,108,109,111,112,113,115,116,117,119,120,121,122,124,125,126,128,129,130,132,133,134,136,137,138,140,141,142,144,145,146,147,149,150,151,153,154,155,156,158,159,160,161,163,164,165,167,168,169,170,172,173,174,175,176,178,179,180,181,183,184,185,186,187,189,190,191,192,193,194,196,197,198,199,200,201,203,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,238,239,240,241,241,242,243,244,244,245,246,247,248,248,249,250,251,251,252,253,254,255],B:[167,167,166,166,166,165,165,165,164,164,164,163,163,162,162,162,161,161,161,160,160,160,159,159,158,158,157,157,156,155,155,154,154,153,153,152,151,151,150,150,149,149,148,147,147,146,146,145,144,144,143,143,142,141,141,140,139,139,138,137,137,136,135,135,134,133,133,132,131,131,130,130,129,128,128,127,127,126,125,125,124,124,123,123,122,121,121,120,119,119,118,118,117,116,116,116,115,115,114,114,113,113,113,112,112,111,111,110,110,109,109,109,108,108,107,107,106,106,106,106,106,105,105,105,105,105,105,105,104,104,104,104,104,103,103,103,103,103,102,102,102,103,103,103,103,104,104,104,104,104,105,105,105,105,106,106,106,106,106,107,107,107,107,108,108,109,110,111,111,112,113,113,114,115,115,116,117,117,118,119,120,120,121,122,122,123,124,125,126,128,129,130,131,132,134,135,136,137,138,140,141,142,143,144,146,147,148,149,150,152,153,155,157,158,160,162,163,165,167,168,170,172,173,175,177,178,180,182,183,185,187,188,190,193,196,199,201,204,207,210,212,215,218,221,224,226,229,232,235,238,240,243,246,249,252,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},cividis_default={R:[0,86,166,255],G:[32,92,156,233],B:[76,108,117,69],A:[0,56,80,88],I:[0,64,192,255]},cool_default={R:[0,0,0],G:[127,196,254],B:[255,255,255],A:[0,64,128],I:[0,128,255]},copper2_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,255],B:[0,25,51,76,102,255],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},copper_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,203],B:[0,25,51,76,102,127],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},ct_airways_default={min:-643,max:-235,R:[0,0,0],G:[154,154,154],B:[179,179,101],A:[0,32,0],I:[0,163,255]},ct_artery_default={min:114,max:800,R:[0,255,255,255],G:[0,0,129,255],B:[0,0,0,255],A:[0,64,88,228],I:[0,80,160,255]},ct_bones_default={min:180,max:600,R:[0,0,113,255],G:[0,0,109,250],B:[0,0,101,245],A:[0,0,100,160],I:[0,1,128,255]},ct_brain_gray_default={min:-10,max:110,R:[0,127,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_brain_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_cardiac_default={min:-80,max:1e3,R:[0,189,150,150,150,150,255],G:[0,169,54,54,54,54,240],B:[0,153,52,52,52,52,242],A:[0,32,64,0,0,64,64],I:[0,1,82,92,234,242,255]},ct_head_default={min:-590,max:600,R:[0,241,241,248,248,178,178,232,255,255,255],G:[0,156,156,222,222,36,36,51,255,255,255],B:[0,130,130,169,169,24,24,37,255,255,255],A:[0,8,0,0,0,64,64,0,0,222,222],I:[0,2,3,64,122,142,172,182,252,253,255]},ct_kidneys_default={min:114,max:302,R:[0,255,255],G:[0,129,255],B:[0,0,255],A:[0,88,228],I:[0,103,255]},ct_liver_default={min:-23,max:246,R:[0,44,255,255,255],G:[0,128,90,255,255],B:[0,0,70,0,255],A:[0,0,82,184,228],I:[0,64,131,196,255]},ct_muscles_default={min:-100,max:246,R:[0,128,159,255,255,255,255],G:[0,0,56,90,0,255,255],B:[0,0,41,70,0,0,255],A:[0,63,105,135,167,184,228],I:[0,100,128,155,180,209,255]},ct_scalp_default={min:-590,max:600,R:[0,241,241,248,248,178,232,255,255],G:[0,156,156,222,222,36,51,255,255],B:[0,130,130,169,169,24,37,255,255],A:[0,63,105,135,167,184,228,228,228],I:[0,1,52,127,137,162,172,252,255]},ct_skull_default={min:140,max:1024,R:[0,2,113,255],G:[0,1,109,250],B:[0,1,101,245],A:[0,1,96,168],I:[0,1,128,255]},ct_soft_default={min:-923,max:679,R:[0,0,0,0,0,255,255,255],G:[154,154,154,154,0,0,254,255],B:[179,179,179,179,0,0,0,255],A:[0,3,8,0,0,10,15,20],I:[0,30,62,88,170,200,232,255]},ct_soft_tissue_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_surface_default={min:-600,max:100,R:[0,134,255],G:[0,109,250],B:[0,101,245],A:[0,60,148],I:[0,128,255]},ct_vessels_default={min:114,max:246,R:[0,255,255],G:[0,128,255],B:[0,128,255],A:[0,64,96],I:[0,87,255]},ct_w_contrast_default={min:50,max:1e3,R:[98,210,169,128,255],G:[94,26,77,128,255],B:[45,21,74,128,255],A:[0,25,0,4,168],I:[0,41,87,154,255]},cubehelix_default={R:[0,13,21,26,27,25,22,21,22,28,39,54,75,98,124,148,171,189,202,210,213,211,206,200,195,193,195,201,211,225,240,255],G:[0,5,11,20,31,44,58,72,86,99,109,116,120,122,122,122,121,121,124,129,137,147,161,175,190,205,218,229,238,245,251,255],B:[0,14,30,46,61,71,77,78,75,68,60,52,48,47,53,65,83,105,131,157,183,205,222,235,241,243,242,240,239,240,245,255],A:[0,4,8,12,17,21,25,29,33,37,41,45,50,54,58,62,66,70,74,78,83,87,91,95,99,103,107,111,116,120,124,128],I:[0,8,16,25,33,41,49,58,66,74,82,90,99,107,115,123,132,140,148,156,165,173,181,189,197,206,214,222,230,239,247,255]},electric_blue_default={R:[0,10,136,255],G:[0,39,220,255],B:[0,223,253,255],A:[0,48,64,70],I:[0,92,192,255]},freesurfer_default={R:[0,245,205,120,196,220,230,0,122,236,12,204,42,119,220,103,60,255,165,160,0,245,205,120,196,220,230,0,122,236,13,220,103,255,165,160,0,120,200,255,255,164,164,164,234,0,0,0,0,0],G:[0,245,62,18,58,248,148,118,186,13,48,182,204,159,216,255,60,165,42,32,200,245,62,18,58,248,148,118,186,13,48,216,255,165,42,32,200,190,70,148,148,108,108,108,169,0,0,0,0,0],B:[0,245,78,134,250,164,34,14,220,176,255,142,164,176,20,255,60,0,42,240,200,245,78,134,250,164,34,14,220,176,255,20,255,0,42,240,221,150,255,10,10,226,226,226,30,64,112,160,208,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,2,3,4,5,7,8,10,11,12,13,14,15,16,17,18,24,26,28,30,31,41,42,43,44,46,47,49,50,51,52,53,54,58,60,62,63,72,77,78,79,80,81,82,85,251,252,253,254,255]},ge_color_default={R:[0,0,128,255,255],G:[0,128,0,128,255],B:[0,125,255,0,255],A:[0,32,64,96,128],I:[0,63,128,192,255]},gold_default={R:[0,142,227,255],G:[0,85,170,255],B:[0,14,76,255],A:[0,42,84,128],I:[0,85,170,255]},gray_default={R:[0,255],G:[0,255],B:[0,255],A:[0,128],I:[0,255]},green_default={R:[0,0,0],G:[0,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},green2cyan_default={R:[0,0,0],G:[72,72,255],B:[0,255,255],A:[0,64,128],I:[0,88,255]},green2orange_default={R:[0,255,255],G:[72,88,255],B:[0,0,0],A:[0,64,128],I:[0,88,255]},hotiron_default={R:[0,255,255,255],G:[0,0,126,255],B:[0,0,0,255],A:[0,64,96,128],I:[0,128,191,255]},hot_default={R:[3,255,255,255],G:[0,0,255,255],B:[0,0,0,255],A:[0,48,96,128],I:[0,95,191,255]},hsv_default={R:[255,255,0,0,0,255,255],G:[0,255,255,255,0,0,0],B:[0,0,0,255,255,255,0],A:[0,14,28,43,57,71,85],I:[0,43,85,128,170,213,255]},inferno_default={R:[0,120,237,240],G:[0,28,105,249],B:[4,109,37,33],A:[0,56,80,88],I:[0,64,192,255]},jet_default={R:[0,0,127,255,127],G:[0,127,255,127,0],B:[127,255,127,0,0],A:[0,32,64,96,128],I:[0,63,128,192,255]},linspecer_default={R:[94,50,90,152,215,238,249,254,252,241,209,158],G:[79,131,186,214,240,244,237,210,157,100,57,1],B:[162,189,167,164,155,169,168,123,86,68,79,66],A:[0,12,23,35,47,58,70,81,93,105,116,128],I:[0,23,46,70,93,116,139,162,185,209,232,255]},magma_default={R:[0,148,183,223,247,252],G:[0,44,55,74,112,253],B:[4,128,121,104,92,191],A:[0,44,53,64,75,107],I:[0,107,128,154,179,255]},mako_default={R:[11,59,55,222],G:[4,45,165,245],B:[5,91,172,229],A:[0,23,70,107],I:[0,56,167,255]},nih_default={R:[0,85,0,0,0,0,0,0,85,255,255,255,172],G:[0,0,0,0,85,170,255,255,255,255,85,0,0],B:[0,170,85,255,255,170,170,0,85,0,0,0,0],A:[0,5,10,21,26,32,37,42,48,53,64,72,85],I:[0,15,31,63,79,95,111,127,143,159,191,217,255]},plasma_default={R:[13,156,237,240],G:[8,23,121,249],B:[135,158,83,33],A:[0,56,80,88],I:[0,64,192,255]},random_default={R:[208,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248],G:[182,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21],B:[191,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},red_default={R:[0,128,255],G:[0,0,0],B:[0,0,0],A:[0,64,128],I:[0,128,255]},redyell_default={R:[192,224,255],G:[1,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},rocket_default={R:[3,112,144,188,236,246,255],G:[5,31,29,22,76,158,250],B:[26,87,91,86,62,117,235],A:[0,30,38,49,67,85,107],I:[0,73,92,118,160,205,255]},surface_default={R:[1,240,255],G:[1,128,255],B:[1,128,255],A:[0,76,128],I:[0,153,255]},turbo_default={R:[48,48,64,70,65,25,132,195,244,254,218,122],G:[18,18,64,107,150,226,255,241,199,158,57,4],B:[59,59,162,227,255,187,81,52,58,47,7,3],A:[0,22,26,30,34,43,52,57,63,67,77,86],I:[0,1,16,32,49,83,118,140,164,181,219,255]},violet_default={R:[0,128,255],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},viridis_default={R:[68,49,53,253],G:[1,104,183,231],B:[84,142,121,37],A:[0,56,80,88],I:[0,64,192,255]},warm_default={R:[255,255,255],G:[127,196,254],B:[0,0,0],A:[0,64,128],I:[0,128,255]},winter_default={R:[0,0,0],G:[0,128,255],B:[255,196,128],A:[0,64,128],I:[0,128,255]},x_rain_default={R:[3,64,0,0,255,255,255],G:[0,0,0,255,255,192,3],B:[0,32,48,56,64,96,128],A:[0,8,16,24,32,52,80],I:[0,32,64,96,160,192,255]},afni_blues_inv_default={min:0,max:0,R:[0,37],G:[242,0],B:[255,255],A:[0,64],I:[0,255]},afni_reds_inv_default={R:[255,255],G:[255,11],B:[0,0],A:[0,64],I:[0,255]},roi_i256_default={min:0,max:0,R:[65,10,223,120,216,207,251,93,252,217,21,253,131,165,173,143,144,217,86,89,63,254,172,1,142,107,42,78,221,8,222,71,127,126,167,33,104,2,208,216,0,251,7,105,2,101,248,190,253,62,255,224,166,37,110,138,45,34,6,37,69,201,43,122,199,37,173,194,103,211,75,159,96,4,239,98,110,193,253,166,40,255,48,130,140,243,101,9,177,220,133,32,4,81,48,48,210,109,60,132,1,119,1,159,247,33,212,187,253,144,196,254,168,79,64,196,39,97,73,173,104,216,217,43,101,119,254,5,237,103,203,122,57,87,251,164,19,75,200,2,252,150,66,0,255,157,23,254,55,16,240,161,69,253,207,195,5,60,255,251,200,217,134,123,253,180,27,246,130,136,250,232,4,125,140,22,253,255,13,180,123,61,254,111,10,185,76,192,255,223,186,61,198,5,172,13,83,172,171,6,23,73,134,133,109,61,213,55,57,132,36,209,2,144,1,253,68,155,3,160,2,77,121,70,67,176,223,131,4,162,232,255,150,94,235,191,207,10,246,0,225,4,209,116,57,112,172,253,1,6,92,227,73,62,135,223],G:[162,50,112,245,4,124,176,243,56,125,183,139,182,68,189,4,225,10,20,223,7,46,31,193,225,250,219,41,2,100,83,181,34,150,72,223,168,248,80,253,7,117,214,2,248,10,3,59,179,160,90,244,146,4,207,4,125,255,96,100,1,208,130,51,116,181,236,53,244,5,165,28,181,86,96,42,254,1,134,194,214,92,41,204,137,86,207,3,143,3,100,239,164,94,65,251,131,244,173,57,143,107,217,53,210,0,148,250,45,198,81,40,61,218,252,88,171,0,248,24,248,4,41,100,187,46,208,145,43,168,121,46,175,250,125,107,233,112,207,231,174,215,53,9,43,153,52,124,128,65,210,147,255,147,63,200,148,254,0,179,241,42,239,2,230,8,82,135,87,16,3,87,86,151,254,8,255,86,53,19,7,192,171,201,253,247,197,103,251,126,0,149,54,183,61,126,79,113,10,103,184,75,11,195,222,136,149,131,8,99,240,177,252,255,198,16,7,68,178,66,191,150,73,26,211,109,78,209,240,254,1,166,247,131,2,0,167,127,133,10,43,99,235,3,214,142,176,82,132,38,10,249,255,215,44,81],B:[176,182,248,37,117,35,96,69,32,152,108,20,237,250,2,89,141,216,111,251,211,149,10,44,214,103,31,251,3,32,252,246,97,1,219,167,197,4,36,116,206,118,106,43,205,204,114,69,127,205,87,80,41,251,145,204,253,161,247,1,149,9,43,253,97,72,136,161,171,181,26,255,108,80,218,214,231,255,84,31,109,4,218,3,217,36,68,85,241,39,221,2,240,2,173,42,206,5,110,46,103,27,212,184,2,207,246,45,116,72,110,253,38,105,248,159,243,81,192,93,141,145,24,157,234,131,57,178,62,75,65,176,148,40,253,66,76,240,51,154,17,251,139,253,207,9,114,49,200,254,96,73,138,118,204,102,137,89,145,161,4,112,66,234,147,178,212,205,185,11,203,131,2,250,118,169,1,185,154,53,171,197,61,175,249,96,15,254,95,5,222,75,246,194,2,61,180,25,133,165,15,233,59,35,221,140,109,7,114,255,198,0,115,168,252,23,242,80,75,142,137,255,12,182,68,201,4,111,37,228,83,248,24,192,249,5,54,223,160,122,160,114,145,119,252,31,253,250,10,214,8,47,0,142,222,70],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},ColorTables=class{constructor(){__publicField(this,"gamma",1),__publicField(this,"version",.1),__publicField(this,"cluts",{});const u=Object.keys(cmaps_exports).filter(h=>!h.startsWith("$")).sort(new Intl.Collator("en").compare);for(const h of u)this.cluts[h]=cmaps_exports[h]}addColormap(C,u){this.cluts[C]=u}colormaps(){return Object.keys(this.cluts)}colorMaps(){return this.colormaps()}colormapFromKey(C){let u=this.cluts[C];return u!==void 0||(u=this.cluts[C.toLowerCase()],u!==void 0)?u:(C.length>0&&log.warn("No color map named "+C),{min:0,max:0,R:[0,255],G:[0,255],B:[0,255],A:[0,255],I:[0,255]})}colormap(C="",u=!1){const h=this.colormapFromKey(C);return this.makeLut(h.R,h.G,h.B,h.A,h.I,u)}makeLabelLut(C,u=255){if(C.R===void 0||C.G===void 0||C.B===void 0)throw new Error(`Invalid colormap table: ${C}`);const h=C.R.length,g=C.I??[...Array(h).keys()];if(h!==C.G.length||h!==C.B.length||h!==g.length)throw new Error(`colormap does not make sense: ${C}`);let S=new Uint8ClampedArray(h).fill(u);S[0]=0,C.A!==void 0&&(S=Uint8ClampedArray.from(C.A));const v=Math.min(...g),w=Math.max(...g),I=w-v+1,_=new Uint8ClampedArray(I*4).fill(0);for(let L=0;L0)for(let w=0;w"u"){d=new Uint8ClampedArray(w).fill(0);for(let e=0;e"u"&&(L=new Uint8ClampedArray(w).fill(64),L[0]=0);for(let e=0;e0&&(g[w]=!0);const S=u.length/3;let v=0;for(let w=0;w{document.body.removeChild(S),URL.revokeObjectURL(g)},0)}static saveMesh(C,u,h=".mz3",g=!1){let S=new ArrayBuffer(0);return/\.obj$/i.test(h)?S=this.createOBJ(C,u):/\.stl$/i.test(h)?S=this.createSTL(C,u):(/\.mz3$/i.test(h)||(h+=".mz3"),S=this.createMZ3(C,u,g)),h.length>4&&this.downloadArrayBuffer(S,h),S}static getClusterBoundary(C,u){const h=new Uint32Array(C.buffer),g=new Array(h.length).fill(!1),S=u.length/3;let v=0;for(let w=0;w0&&(Q=1/Math.sqrt(Q),h[0]*=Q,h[1]*=Q,h[2]*=Q),N[g]=h[0],N[g+1]=h[1],N[g+2]=h[2]}return N}},NVUtilities=class sr{static arrayBufferToBase64(u){const h=new Uint8Array(u);return sr.uint8tob64(h)}static readMatV4(u){let h=u.byteLength;if(h<40)throw new Error("File too small to be MAT v4: bytes = "+u.byteLength);let g=new DataView(u),S=g.getUint16(0,!0),v=u;if(S===35615||S===8075){const e=decompressSync$1(new Uint8Array(u));g=new DataView(e.buffer),S=g.getUint16(0,!0),v=e.buffer,h=v.byteLength}const w=new TextDecoder("utf-8"),I=new Uint8Array(v);let _=0;const P={};function L(e){return Math.floor(e/10)%10}function d(e,N,B){const Q=new Uint8Array(I.subarray(N,B));return e===1?new Float32Array(Q.buffer):e===2?new Int32Array(Q.buffer):e===3?new Int16Array(Q.buffer):e===4?new Uint16Array(Q.buffer):e===5?new Uint8Array(Q.buffer):new Float64Array(Q.buffer)}function k(){const e=g.getUint32(_,!0),N=g.getUint32(_+4,!0),B=g.getUint32(_+8,!0),Q=g.getUint32(_+12,!0),i0=g.getUint32(_+16,!0);if(_+=20,Q!==0)throw new Error("Matlab V4 reader does not support imaginary numbers");const j=N*B;if(j<1)throw new Error("mrows * ncols must be greater than one");const H=new Uint8Array(I.subarray(_,_+i0)),y=w.decode(H).trim().replaceAll("\0",""),Y=L(e);let G=8;if(Y>=1&&Y<=2)G=4;else if(Y>=3&&Y<=4)G=2;else if(Y===5)G=1;else if(Y!==0)throw new Error("impossible Matlab v4 datatype");if(_+=i0,e>50)throw new Error("Does not appear to be little-endian V4 Matlab file");const Z=_+j*G;P[y]=d(Y,_,Z),_=Z}for(;_+20>18,_=(d&258048)>>12,P=(d&4032)>>6,L=d&63,h+=g[I]+g[_]+g[P]+g[L];return v===1?(d=u[w],I=(d&252)>>2,_=(d&3)<<4,h+=g[I]+g[_]+"=="):v===2&&(d=u[w]<<8|u[w+1],I=(d&64512)>>10,_=(d&1008)>>4,P=(d&15)<<2,h+=g[I]+g[_]+g[P]+"="),h}static download(u,h,g){const S=document.createElement("a"),v=Array.isArray(u)?u:[u],w=new Blob(v,{type:g});S.href=URL.createObjectURL(w),S.download=h,S.click()}static readFileAsync(u){return new Promise((h,g)=>{const S=new FileReader;S.onload=()=>{h(S.result)},S.onerror=g,S.readAsArrayBuffer(u)})}static blobToBase64(u){return new Promise(h=>{const g=new FileReader;g.onloadend=()=>h(g.result),g.readAsDataURL(u)})}static async decompressBase64String(u){const h=atob(u),g=new ArrayBuffer(h.length),S=new Uint8Array(g);for(let v=0;v{const S=strToU8$1(u);gzip$1(S,(v,w)=>{v?g(v):h(w.buffer)})})}static isArrayBufferCompressed(u){if(u&&u.byteLength){const h=new Uint8Array(u);return(h[0]<<8|h[1])===8075}else return!1}static async decompressArrayBuffer(u){return new Promise((h,g)=>{const S=new Uint8Array(u);decompress$1(S,(v,w)=>{if(v)g(v);else{const I=strFromU8$1(w);h(I)}})})}static arraysAreEqual(u,h){return arrayEqual$1(u,h)}static range(u,h,g){return Array.from({length:(h-u)/g+1},(S,v)=>u+v*g)}static sph2cartDeg(u,h){const g=-h*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(g)*Math.cos(S),Math.cos(g)*Math.sin(S),Math.sin(g)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}static vox2mm(u,h){const g=clone$2(h);transpose(g,g);const S=fromValues$1(u[0],u[1],u[2],1);return transformMat4(S,S,g),fromValues$2(S[0],S[1],S[2])}},utiltiesLogger=log,NVMeshLoaders=class Xi{static readTRACT(u){const h=u.byteLength;if(h<20)throw new Error("File too small to be niml.tract: bytes = "+h);const g=new DataView(u),S=new Uint8Array(u);let v=0;function w(){for(;v>10,Q=N&1023;return(N>>15?-1:1)*(B?B===31?Q?NaN:1/0:Math.pow(2,B-15)*(1+Q/1024):6103515625e-14*(Q/1024))}let g=0,S=0,v=new Float32Array([]);const w=[],I=[],_=[],P=[];let L=[],d=!1;const k=unzipSync$1(new Uint8Array(u),{filter(N){return N.originalSize>0}}),e=Object.keys(k);for(let N=0,B=e.length;N2||v!==1e3||g!==1128354388)throw new Error("Not a valid TRK file");const w=h.getInt16(36,!0),I=[];for(let f0=0;f00)for(let g0=0;g00)for(let o0=0;o0=P);Q++)L[d]=parseFloat(B[Q]),d++}const k=[];for(w++;S[w].length<1;)w++;if(I=S[w].trim().split(/\s+/),w++,I[0].includes("LINES")){const N=parseInt(I[1]);if(N<1)throw new Error("Corrupted VTK ASCII");let B=S[w].trim();const Q=[];let i0=[];if(B.startsWith("OFFSETS")){w++;let j=0;for(;j=N));y++);}i0=Array.from(L)}else{let j=function(){B=S[w].trim();const G=B.trim().split(/\s+/);y=[];for(let Z=0;Z=y.length&&j();const Z=y[Y++];H+=Z,Q[G+1]=H;for(let e0=0;e0=y.length&&j();const z=y[Y++]*3;i0.push(L[z+0]),i0.push(L[z+1]),i0.push(L[z+2])}}}return{pts:Float32Array.from(i0),offsetPt0:Uint32Array.from(Q)}}else if(I[0].includes("TRIANGLE_STRIPS")){const N=parseInt(I[1]);for(let B=0;B1&&j.pop()&&(H=H.split(".").slice(0,-1).join("."));const y=Xi.readTSF(h,i0);g.dpv||(g.dpv=[]);const Y=y.reduce((Z,e0)=>Math.min(Z,e0)),G=y.reduce((Z,e0)=>Math.max(Z,e0));return g.dpv.push({id:H,vals:Float32Array.from(y.slice()),global_min:Y,global_max:G,cal_min:Y,cal_max:G}),d}if(N<3){log.error("n_vert < 3 in layer");return}if(e==="MZ3")d.values=Xi.readMZ3(h,N);else if(e==="ANNOT"){const i0=Xi.readANNOT(h,N,!0);i0 instanceof Uint32Array?d.values=i0:(d.values=i0.scalars,d.colormapLabel=i0.colormapLabel)}else if(e==="CRV"||e==="CURV")d.values=Xi.readCURV(h,N),d.isTransparentBelowCalMin=!1;else if(e==="GII"){const i0=Xi.readGII(h,N);d.values=i0.scalars,d.colormapLabel=i0.colormapLabel}else if(e==="MGH"||e==="MGZ"){const i0=Xi.readMGH(h,N,!0);"scalars"in i0?(d.values=i0.scalars,d.colormapLabel=i0.colormapLabel):d.values=i0}else if(e==="NII")d.values=Xi.readNII(h,N,g.anatomicalStructurePrimary);else if(e==="SMP")d.values=Xi.readSMP(h,N);else if(e==="STC")d.values=Xi.readSTC(h,N);else return log.warn("Unknown layer overlay format "+u),d;if(!d.values){log.error("no values in layer");return}d.nFrame4D=d.values.length/N,d.frame4D=0,d.outlineBorder=L;let B=d.values[0],Q=d.values[0];for(let i0=0;i05){const d=decompressSync$1(new Uint8Array(u));S=new DataView(d.buffer),v=S.getUint16(0,!0),u=d.buffer}v>5&&log.error("Unsupported or invalid BrainVoyager SMP version "+v);const w=S.getUint32(2,!0);w!==h&&log.error("SMP file has "+w+" vertices, background mesh has "+h);const I=S.getUint16(6,!0),_=new Float32Array(w*I);let P=9;function L(){const d=P;for(;P=3&&k.mapType===3&&(k.nLags=S.getUint32(P,!0),P+=4,k.mnLag=S.getUint32(P,!0),P+=4,k.mxLag=S.getUint32(P,!0),P+=4,k.ccOverlay=S.getUint32(P,!0),P+=4),k.clusterSize=S.getUint32(P,!0),P+=4,k.clusterCheck=S.getUint8(P),P+=1,k.critThresh=S.getFloat32(P,!0),P+=4,k.maxThresh=S.getFloat32(P,!0),P+=4,v>=4&&(k.includeValuesGreaterThreshMax=S.getUint32(P,!0),P+=4),k.df1=S.getUint32(P,!0),P+=4,k.df2=S.getUint32(P,!0),P+=4,v>=5?(k.posNegFlag=S.getUint32(P,!0),P+=4):k.posNegFlag=3,k.cortexBonferroni=S.getUint32(P,!0),P+=4,k.posMinRGB=[0,0,0],k.posMaxRGB=[0,0,0],k.negMinRGB=[0,0,0],k.negMaxRGB=[0,0,0],v>=2&&(k.posMinRGB[0]=S.getUint8(P),P++,k.posMinRGB[1]=S.getUint8(P),P++,k.posMinRGB[2]=S.getUint8(P),P++,k.posMaxRGB[0]=S.getUint8(P),P++,k.posMaxRGB[1]=S.getUint8(P),P++,k.posMaxRGB[2]=S.getUint8(P),P++,v>=4&&(k.negMinRGB[0]=S.getUint8(P),P++,k.negMinRGB[1]=S.getUint8(P),P++,k.negMinRGB[2]=S.getUint8(P),P++,k.negMaxRGB[0]=S.getUint8(P),P++,k.negMaxRGB[1]=S.getUint8(P),P++,k.negMaxRGB[2]=S.getUint8(P),P++),k.enableSMPColor=S.getUint8(P),P++,v>=4&&(k.lut=L()),k.colorAlpha=S.getFloat32(P,!0),P+=4),k.name=L();const e=new Float32Array(u,P,w);_.set(e,d*w),P+=w*4}return _}static readSTC(u,h){const g=new DataView(u),S=g.getInt32(8,!1);if(S!==h)throw new Error("Overlay has "+S+" vertices, expected "+h);let v=12+S*4;const w=g.getUint32(v,!1);v+=4;const I=new Float32Array(w*S);for(let _=0;_0)return _;const k=S.getInt32(I+=4,!1),e=S.getInt32(I+=4,!1);I+=e;const N=S.getInt32(I+=4,!1);if(N<1)return _;const B={R:Array(k).fill(0),G:Array(k).fill(0),B:Array(k).fill(0),A:Array(k).fill(0),I:Array(k).fill(0),labels:Array(k).fill("")};for(let H=0;H=k){log.warn("annot entry out of range");continue}B.R[y]=Z,B.G[y]=e0,B.B[y]=z,B.A[y]=f,B.I[y]=(f<<24)+(z<<16)+(e0<<8)+Z,B.labels[y]=G}const Q=new Float32Array(v);Q.fill(-1);let i0=0;for(let H=0;H0&&log.error(`annot vertex colors do not match ${i0} of ${v} vertices.`);for(let H=0;H=I*3)break;d[P+2]=parseInt(e[0])-1,d[P+1]=parseInt(e[1])-1,d[P+0]=parseInt(e[2])-1,P+=3}return{positions:L,indices:d}}static readASC(u){const h=u.byteLength,g=new Uint8Array(u);let S=0;function v(){for(;S65535)throw new Error("Invalid VTK binary polygons using little-endian data (MRtrix)");S+=4;const j=k.getInt32(S,!1);S+=4;let H=k.getInt32(S,!1);S+=4;for(let y=0;y=0&&(k=new Float32Array(u,_,I*3)),{positions:d,indices:L,colors:k}}static readMZ3(u,h=0){if(u.byteLength<20)throw new Error("File too small to be mz3: bytes = "+u.byteLength);let g=new DataView(u),S=g.getUint16(0,!0),v=u;if(S===35615||S===8075){const G=decompressSync$1(new Uint8Array(u));g=new DataView(G.buffer),S=g.getUint16(0,!0),v=G.buffer}const w=g.getUint16(2,!0),I=g.getUint32(4,!0);let _=g.getUint32(8,!0);const P=g.getUint32(12,!0);if(utiltiesLogger.debug("MZ3 magic %d attr %d face %d vert %d skip %d",S,w,I,_,P),S!==23117)throw new Error("Invalid MZ3 file");const L=(w&1)!==0,d=(w&2)!==0,k=(w&4)!==0;let e=(w&8)!==0;const N=(w&16)!==0;if(w>63)throw new Error("Unsupported future version of MZ3 file");let B=4;N&&(B=8);let Q=0;if(h>0&&!L&&I<1&&!k&&(e=!0),e){let G=h;h===0&&(G=_);const Z=16+P+(L?1:0)*I*12+(d?1:0)*G*12+(k?1:0)*G*4,e0=Math.floor((v.byteLength-Z)/B);_!==h&&e0%h===0&&(log.warn("Issue 729: mz3 mismatch scalar NVERT does not match mesh NVERT"),_=h),Q=Math.floor(e0/_),Q<1&&(log.warn("Corrupt MZ3: file reports NSCALAR but not enough bytes"),e=!1)}if(_<3&&h<3)throw new Error("Not a mesh MZ3 file (maybe scalar)");h>0&&h!==_&&log.warn("Layer has "+_+"vertices, but background mesh has "+h);let i0=16+P,j=null;L&&(j=new Uint32Array(v,i0,I*3),i0+=I*3*4);let H=null;d&&(H=new Float32Array(v,i0,_*3),i0+=_*3*4);let y=null;if(k){y=new Float32Array(_*3);const G=new Uint8Array(v,i0,_*4);i0+=_*4;let Z=0,e0=0;for(let z=0;z<_;z++){for(let f=0;f<3;f++)y[Z]=G[e0]/255,Z++,e0++;e0++}}let Y=new Float32Array;if(!k&&e&&Q>0){if(N){const G=new Float64Array(v,i0,Q*_);Y=Float32Array.from(G)}else Y=new Float32Array(v,i0,Q*_);i0+=B*Q*_}return h>0?Y:{positions:H,indices:j,scalars:Y,colors:y}}static readPLY(u){const h=u.byteLength,g=new Uint8Array(u);let S=0;function v(){for(;Sf.length){const x0=new Uint32Array(f.length+f.length);x0.set(f),f=x0.slice()}const v0=parseInt(c0[i0+1]);let g0=parseInt(c0[i0+2]);for(let x0=0;x01&&log.warn("This is not a valid FreeSurfer ICO/TRI mesh.");const w=parseInt(v[0]),I=new Float32Array(w*3);let _=1;for(let d=0;d=w){log.error("ICO vertices corrupted");break}e*=3,I[e]=N,I[e+1]=B,I[e+2]=Q}v=S[_].trim().split(/\s+/),_++;const P=parseInt(v[0]),L=new Uint32Array(P*3);for(let d=0;d=P){log.error("ICO indices corrupted");break}e*=3,L[e]=N,L[e+1]=B,L[e+2]=Q}for(let d=0;d1||L!==P*3)&&log.warn("Multi-part BYU/GEO header or not a triangular mesh.");const d=[];_*=3;let k=0,e=2;for(;k<_;){const j=v[e].trim().split(/\s+/);e++;for(let H=0;H=_));H++);}const N=[];P*=3;let B=0;for(;B=P));H++);}if(h)for(let j=0;j2)&&log.warn("This is not a valid MNI OBJ mesh.");let d=1;L===1?d=P:L===1&&(d=w),v+=d*4,v+=P;const k=P*3,e=new Uint32Array(k);for(let N=0;N1056964608&&(H[k+0]=(Z>>16&255)/255,H[k+1]=(Z>>8&255)/255,H[k+2]=(Z&255)/255),Z===0&&(H[k+0]=e,H[k+1]=N,H[k+2]=B),Z===1&&(H[k+0]=Q,H[k+1]=i0,H[k+2]=j),k+=3}d+=v*4;for(let G=0;G=3e3&&k<=3099&&P>580){let Q=function(){for(;z"))return g0;for(;z");)g0+=Q();return g0},j=function(g0,x0=!1){const T0=f.indexOf(g0);if(T0<0)return 1;const M0=f.indexOf('"',T0)+1,ee=f.indexOf('"',M0),re=f.slice(M0,ee);return x0?re:parseInt(re)},H=0,y=0,Y=0,G="",Z=new Uint32Array;const e0=new Uint8Array(u);let z=552,f;const f0=B[5],o0=new Float32Array(h*f0);for(;z"));)if(f.includes("")||(f=i0()),!f.startsWith("")||!f.endsWith(""))return log.warn("Unable to find CIfTI "),o0;f=f.slice(15,-16);const M0=f.trim().split(/\s+/);M0.length4)&&log.warn("Not a valid MGH file");let N=I*_*P*L,B=[];if(N=this.decimateLayerVertices(N,h),N%h!==0)return log.warn("Vertices in layer ("+N+") is not a multiple of number of vertices ("+h+")"),B;if(d===3){B=new Float32Array(N);for(let Z=0;Z0)return log.warn("unsupported CTABreadFromBinaryV1"),B;if(z=-z,z!==2)return log.warn("CTABreadFromBinary: unknown version"),B;const f=S.getInt32(k+=4,e);if(f<0)return log.warn("CTABreadFromBinaryV2: nentries was ",f),B;const f0=S.getInt32(k+=4,e);k+=f0;const o0=S.getInt32(k+=4,e);if(o0<0)return B;const c0={R:[],G:[],B:[],A:[],I:[],labels:[]};for(let m0=0;m0"))if(w.startsWith(""))for(;S");)w+=v();else for(;S");)w+=v();const H=I("USE");if(H.length>1){H in i0?B=i0[H]:log.warn("Unable to find DEF for "+H);return}const y=_("diffuseColor");if(y.length<3)return;B[0]=Math.round(y[0]*255),B[1]=Math.round(y[1]*255),B[2]=Math.round(y[2]*255);const Y=I("DEF");Y.length<1||(i0[Y]=B)}for(;S=0?(L.push(Y[f0]+Z),L.push(Y[e0-1]+Z),L.push(Y[e0-0]+Z),e0+=1):(e0+=3,f0=e0-2)}else for(;e0=0?(L.push(Y[e0-2]+Z),L.push(Y[e0-1]+Z),L.push(Y[e0-0]+Z),e0+=1):e0+=3;P=[...P,...G];const z=Math.floor(G.length/3),f=Array(z).fill(B).flat();if(k.length===z*3){let f0=0,o0=0;for(let c0=0;c0";)v++;if(o0=S[v-1]==="/",c0+1=g)break}const m0=new TextDecoder().decode(u.slice(c0+1,v)).trim(),v0=m0.split(" ")[0].trim(),g0=v;let x0=v,T0=v;if(S[c0+1]!=="?"&&S[c0+1]!=="!"){const M0="";x0=S.indexOf(M0,g0),T0=x0+M0.length-1}return{name:m0,startPos:c0,contentStartPos:g0,contentEndPos:x0,endPos:T0}}let I=w();if(!I.name.startsWith("?xml"))throw new Error("readGII: Invalid XML file");for(;!I.name.startsWith("GIFTI")&&I.endPos1;){if(I=w(),I.name.startsWith("Label Key")&&(Z=I.name,f.I.push(e0("Key=")),f.R.push(Math.round(255*e0("Red=",!0))),f.G.push(Math.round(255*e0("Green=",!0))),f.B.push(Math.round(255*e0("Blue=",!0))),f.A.push(Math.round(255*e0("Alpha",!0))),Z=new TextDecoder().decode(u.slice(I.contentStartPos+1,I.contentEndPos)).trim(),f.labels.push(z(""u"){let c0=function(m0){const v0=atob(m0),g0=v0.length,x0=new Uint8Array(g0);for(let T0=0;T01&&(f0=cmapper.makeLabelLut(f)),h>0)return{scalars:L,colormapLabel:f0,anatomicalStructurePrimary:d};if(_.length>2&&!G&&(i0[0]!==0||i0[1]!==0||i0[2]!==0)){Y=Math.floor(_.length/3);let o0=0;for(let c0=0;c01?1:v,this.visible=w,this.meshShaderIndex=0,this.indexBuffer=I.createBuffer(),this.vertexBuffer=I.createBuffer(),this.vao=I.createVertexArray(),I.bindVertexArray(this.vao),I.bindBuffer(I.ELEMENT_ARRAY_BUFFER,this.indexBuffer),I.bindBuffer(I.ARRAY_BUFFER,this.vertexBuffer),I.enableVertexAttribArray(0),I.enableVertexAttribArray(1),this.f32PerVertex!==7?(I.vertexAttribPointer(0,3,I.FLOAT,!1,20,0),I.vertexAttribPointer(1,4,I.BYTE,!0,20,12),I.enableVertexAttribArray(2),I.vertexAttribPointer(2,4,I.UNSIGNED_BYTE,!0,20,16)):(I.vertexAttribPointer(0,3,I.FLOAT,!1,28,0),I.vertexAttribPointer(1,3,I.FLOAT,!1,28,12),I.enableVertexAttribArray(2),I.vertexAttribPointer(2,4,I.UNSIGNED_BYTE,!0,28,24)),I.bindVertexArray(null),this.vaoFiber=I.createVertexArray(),this.offsetPt0=null,this.hasConnectome=!1,this.colormapInvert=!1,this.fiberGroupColormap=null,this.pts=u,this.layers=[],this.type="mesh",this.tris=h,S[3]<1){this.rgba255=S,this.fiberLength=2,this.fiberDither=.1,this.fiberColor="Global",this.fiberDecimationStride=1,this.fiberMask=[],this.colormap=_,this.dpg=P,this.dps=L,this.dpv=d,P&&this.initValuesArray(P),L&&this.initValuesArray(L),d&&this.initValuesArray(d),this.offsetPt0=new Uint32Array(h),this.tris=new Uint32Array(0),this.updateFibers(I),I.bindVertexArray(this.vaoFiber),I.bindBuffer(I.ELEMENT_ARRAY_BUFFER,this.indexBuffer),I.bindBuffer(I.ARRAY_BUFFER,this.vertexBuffer),I.enableVertexAttribArray(0),I.vertexAttribPointer(0,3,I.FLOAT,!1,16,0),I.enableVertexAttribArray(1),I.vertexAttribPointer(1,4,I.UNSIGNED_BYTE,!0,16,12),I.bindVertexArray(null);return}if(_){this.connectome=_,this.hasConnectome=!0;const Q=Object.keys(_);for(let i0=0,j=Q.length;i0Math.min(v,w)),S=u[h].vals.reduce((v,w)=>Math.max(v,w));u[h].global_min=g,u[h].global_max=S,u[h].cal_min=g,u[h].cal_max=S}return u}linesToCylinders(u,h,g){function S(z){return fromValues$2(z[0],z[1],z[2])}const v=Math.pow(2,32)-1,w=g.length;let I=0,_=0;for(let z=0;z 1 requires f32PerVertex == 5");const k=new Float32Array(L*d),e=new Uint8Array(k.buffer);let N=0,B=create$1(),Q=create$1(),i0=create$1();const j=create$2();let H=create$2(),y=0;const Y=this.fiberRadius;for(let z=0;z=G)&&(j[Y]=y[Y-1]+y[Y]+y[Y]+y[Y+1]);Y=-1,y=j.slice();for(let e0=0;e0=G)&&(j[Y]=y[Y-H]+y[Y]+y[Y]+y[Y+H]);const Z=H*H;Y=-1,y=j.slice();for(let e0=0;e0=G)&&(j[Y]=y[Y-Z]+y[Y]+y[Y]+y[Z]);return j}_=N(_,S),_=N(_,S);let B=0,Q=1/0;const i0=S*S*S;for(let j=0;j0){const G=parseInt(N.substring(3));G0){const G=parseInt(N.substring(3));G=this.dpg.length||e0.A[z]<1||(Z[f]=!0,f*=4,G[f]=e0.R[z],G[f+1]=e0.G[z],G[f+2]=e0.B[z],G[f+3]=255)}i0.fill(-1);for(let z=0;z0){let G=function(Z,e0){const z=e0*(Z&255),f=e0*(Z>>8&255),f0=e0*(Z>>16&255);return z+(f<<8)+(f0<<16)};this.createFiberDensityMap();for(let Z=0;Z2&&this.fiberRadius>0?this.linesToCylinders(u,w,y):(this.indexCount=y.length,u.bindBuffer(u.ARRAY_BUFFER,this.vertexBuffer),u.bufferData(u.ARRAY_BUFFER,Uint32Array.from(I),u.STATIC_DRAW),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,this.indexBuffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,Uint32Array.from(y),u.STATIC_DRAW))}indexNearestXYZmm(u,h,g){const S=this.pts,v=this.pts.length/3;let w=0,I=1/0,_=0;for(let P=0;P0)for(let h=0;h0)for(let h=0;h0)for(let h=0;h0)for(let P=0;PL.cal_max)continue;if(L.outlineBorder===void 0&&(L.outlineBorder=0),L.isAdditiveBlend===void 0&&(L.isAdditiveBlend=!1),L.colormapLabel&&L.colormapLabel.R&&!L.colormapLabel.lut&&(L.colormapLabel=cmapper.makeLabelLut(L.colormapLabel)),L.colormapLabel&&L.colormapLabel.lut){const H=L.colormapLabel.lut,y=Math.floor(H.length/4),Y=Math.min(Math.max(L.frame4D,0),L.nFrame4D-1),G=v*Y,Z=new Uint8Array(v*4);let e0=0;for(let f=0;f0&&(z=NVMeshUtilities.getClusterBoundary(Z,this.tris)),e0=0;for(let f=0;f0&&(H=NVMeshUtilities.getClusterBoundary(j,this.tris));let y=0;for(let Y=0;Y0)for(let P=0;P=h;w--){const I=Math.pow(4,w+1)*(S-2)+2,_=Math.pow(4,w)*(S-2)+2,P=g.length/3,L=Math.pow(4,w)*v;console.log(`order ${w+1} -> ${w} vertices ${I} -> ${_} faces ${P} -> ${L}`);const d=Array.from({length:I},(e,N)=>N+1);for(let e=0;e=g)return log.warn(`Unable to decimate mesh: input order (${g}) must be larger than downsampled order (${h})`),!1;const S=this.pts.length/3,w=Math.pow(4,h)*(12-2)+2;if(this.pts=new Float32Array(this.pts.slice(0,w*3)),this.decimateFaces(g,h),this.layers&&this.layers.length>0)for(let I=0;I"u"){const Q=new Float32Array([0,0,0,0,0,0]),i0=new Uint32Array([0]);L={pts:Q,offsetPt0:i0},log.error("Creating empty tracts")}return v[3]=0,new pt(L.pts,L.offsetPt0,h,v,S,w,g,"inferno",L.dpg||null,L.dps||null,L.dpv||null)}if(k==="GII")L=NVMeshLoaders.readGII(u);else if(k==="MZ3")L=NVMeshLoaders.readMZ3(u),(L instanceof Float32Array||L.positions===null)&&log.warn("MZ3 does not have positions (statistical overlay?)");else if(k==="ASC")L=NVMeshLoaders.readASC(u);else if(k==="DFS")L=NVMeshLoaders.readDFS(u);else if(k==="BYU"||k==="G")L=NVMeshLoaders.readGEO(u);else if(k==="GEO")L=NVMeshLoaders.readGEO(u,!0);else if(k==="ICO"||k==="TRI")L=NVMeshLoaders.readICO(u);else if(k==="OFF")L=NVMeshLoaders.readOFF(u);else if(k==="NV")L=NVMeshLoaders.readNV(u);else if(k==="OBJ")L=NVMeshLoaders.readOBJ(u);else if(k==="PLY")L=NVMeshLoaders.readPLY(u);else if(k==="X3D")L=NVMeshLoaders.readX3D(u);else if(k==="FIB"||k==="VTK"){if(L=NVMeshLoaders.readVTK(u),"offsetPt0"in L)return v[3]=0,new pt(L.pts,L.offsetPt0,h,v,S,w,g,"inferno")}else k==="SRF"?L=NVMeshLoaders.readSRF(u):k==="STL"?L=NVMeshLoaders.readSTL(u):L=NVMeshLoaders.readFreeSurfer(u);if(L.anatomicalStructurePrimary&&(P=L.anatomicalStructurePrimary),L instanceof Float32Array)throw new Error("fatal: unknown mesh type loaded");if(!L.positions)throw new Error("positions not loaded");if(!L.indices)throw new Error("indices not loaded");if(_=L.positions,I=L.indices,"rgba255"in L&&L.rgba255.length>0&&(v=L.rgba255),"colors"in L&&L.colors&&L.colors.length===_.length){const Q=_.length/3;v=new Uint8Array(Q*4);let i0=0,j=0;for(let H=0;H0&&(NVMeshLoaders.readLayer(h,u,B,S,"gray"),B.updateMesh(g)),B}static async loadLayer(u,h){let g;function S(N){const B=window.atob(N),Q=B.length,i0=new Uint8Array(Q);for(let j=0;j-1&&(v=v.slice(0,v.indexOf("?")));let I=.5;"opacity"in u&&(I=u.opacity);let _="warm";"colormap"in u&&(_=u.colormap);let P="winter";"colormapNegative"in u&&(P=u.colormapNegative);let L=!1;"useNegativeCmap"in u&&(L=u.useNegativeCmap);let d=null;"cal_min"in u&&(d=u.cal_min);let k=null;"cal_max"in u&&(k=u.cal_max);const e=NVMeshLoaders.readLayer(v,g,h,I,_,P,L,d,k);e&&h.layers.push(e)}static async loadFromUrl({url:u="",headers:h={},gl:g,name:S="",opacity:v=1,rgba255:w=[255,255,255,255],visible:I=!0,layers:_=[],buffer:P=new ArrayBuffer(0)}={}){let L=u.split("/");if(S===""){try{L=new URL(u).pathname.split("/")}catch{L=u.split("/")}S=L.slice(-1)[0],S.indexOf("?")>-1&&(S=S.slice(0,S.indexOf("?")))}if(u==="")throw Error("url must not be empty");if(!g)throw Error("gl context is null");let d;if(P.byteLength>0)d=P;else{const e=await fetch(u,{headers:h});if(!e.ok)throw Error(e.statusText);d=await e.arrayBuffer()}const k=await this.readMesh(d,S,g,v,new Uint8Array(w),I);if(!_||_.length<1)return k;for(let e=0;e<_.length;e++)await pt.loadLayer(_[e],k);return k.updateMesh(g),k}static async readFileAsync(u){return new Promise((h,g)=>{const S=new FileReader;S.onload=()=>{h(S.result)},S.onerror=g,S.readAsArrayBuffer(u)})}static async loadFromFile({file:u,gl:h,name:g="",opacity:S=1,rgba255:v=[255,255,255,255],visible:w=!0,layers:I=[]}={}){if(!u)throw new Error("file must be set");if(!h)throw new Error("rendering context must be set");const _=await pt.readFileAsync(u),P=pt.readMesh(_,g,h,S,new Uint8Array(v),w);if(!I||I.length<1)return P;for(let L=0;L{const C=new ArrayBuffer(2);return new DataView(C).setInt16(0,256,!0),new Int16Array(C)[0]===256},ImageType=(C=>(C[C.UNKNOWN=0]="UNKNOWN",C[C.NII=1]="NII",C[C.DCM=2]="DCM",C[C.DCM_MANIFEST=3]="DCM_MANIFEST",C[C.MIH=4]="MIH",C[C.MIF=5]="MIF",C[C.NHDR=6]="NHDR",C[C.NRRD=7]="NRRD",C[C.MHD=8]="MHD",C[C.MHA=9]="MHA",C[C.MGH=10]="MGH",C[C.MGZ=11]="MGZ",C[C.V=12]="V",C[C.V16=13]="V16",C[C.VMR=14]="VMR",C[C.HEAD=15]="HEAD",C[C.DCM_FOLDER=16]="DCM_FOLDER",C[C.SRC=17]="SRC",C[C.FIB=18]="FIB",C))(ImageType||{}),NVIMAGE_TYPE=Object.freeze({...ImageType,parse:C=>{let u=0;switch(C.toUpperCase()){case"":case"DCM":u=2;break;case"TXT":u=3;break;case"FIB":u=18;break;case"NII":u=1;break;case"MIH":u=4;break;case"MIF":u=5;break;case"NHDR":u=6;break;case"NRRD":u=7;break;case"MHD":u=8;break;case"MHA":u=9;break;case"MGH":u=10;break;case"MGZ":u=11;break;case"SRC":u=17;break;case"V":u=12;break;case"V16":u=13;break;case"VMR":u=14;break;case"HEAD":u=15;break}return u}}),NVImageFromUrlOptions=(C,u="",h="",g="gray",S=1,v=NaN,w=NaN,I=!0,_=.02,P=!1,L=!1,d="",k=0,e=NVIMAGE_TYPE.UNKNOWN,N=NaN,B=NaN,Q=!0,i0=!1,j=null)=>({url:C,urlImageData:u,name:h,colormap:g,colorMap:g,opacity:S,cal_min:v,cal_max:w,trustCalMinMax:I,percentileFrac:_,ignoreZeroVoxels:P,useQFormNotSForm:L,colormapNegative:d,imageType:e,cal_minNeg:N,cal_maxNeg:B,colorbarVisible:Q,frame4D:k,alphaThreshold:i0,colormapLabel:j});function getBestTransform(C,u,h){const g=C;let S=null;if(g){const v={colSize:u[0],rowSize:u[1],sliceSize:u[2]},w=h,I=[g[0],g[1],g[2]],_=[g[3],g[4],g[5]],P=[I[1]*_[2]-I[2]*_[1],I[2]*_[0]-I[0]*_[2],I[0]*_[1]-I[1]*_[0]];S=[[I[0]*v.colSize*-1,_[0]*v.rowSize*-1,P[0]*v.sliceSize*-1,-1*w[0]],[I[1]*v.colSize*-1,_[1]*v.rowSize*-1,P[1]*v.sliceSize*-1,-1*w[1]],[I[2]*v.colSize,_[2]*v.rowSize,P[2]*v.sliceSize,w[2]],[0,0,0,1]]}return S}function str2Buffer(C,u=80){C=C.replace(/[`$]/g,"");const h=[],g=Math.min(u,C.length);for(let S=0;S=I)break;let k=!0;for(let e=0;e<3;++e)S[e]>g[e]&&(k=!1),v[e]{}),__publicField(this,"onOpacityChange",()=>{}),__publicField(this,"mm000"),__publicField(this,"mm100"),__publicField(this,"mm010"),__publicField(this,"mm001"),__publicField(this,"cal_min"),__publicField(this,"cal_max"),__publicField(this,"robust_min"),__publicField(this,"robust_max"),__publicField(this,"global_min"),__publicField(this,"global_max"),__publicField(this,"urlImgData"),__publicField(this,"isManifest"),__publicField(this,"limitFrames4D"),this.name=h,this.id=v4(),this._colormap=g,this._opacity=S>1?1:S,this.percentileFrac=P,this.ignoreZeroVoxels=L,this.trustCalMinMax=_,this.colormapNegative=k,this.colormapLabel=j,this.frame4D=e,this.cal_minNeg=B,this.cal_maxNeg=Q,this.colorbarVisible=i0,this.useQFormNotSForm=d,!u)return;const H=/(?:\.([^.]+))?$/;let y=H.exec(h)[1]||"";y=y.toUpperCase(),y==="GZ"&&(y=H.exec(h.slice(0,-3))[1],y=y.toUpperCase());let Y=null;switch(N===NVIMAGE_TYPE.UNKNOWN&&(N=NVIMAGE_TYPE.parse(y)),this.imageType=N,N){case NVIMAGE_TYPE.DCM_FOLDER:case NVIMAGE_TYPE.DCM_MANIFEST:case NVIMAGE_TYPE.DCM:Y=this.readDICOM(u);break;case NVIMAGE_TYPE.FIB:[Y,this.v1]=this.readFIB(u);break;case NVIMAGE_TYPE.MIH:case NVIMAGE_TYPE.MIF:Y=this.readMIF(u,v);break;case NVIMAGE_TYPE.NHDR:case NVIMAGE_TYPE.NRRD:Y=this.readNRRD(u,v);break;case NVIMAGE_TYPE.MHD:case NVIMAGE_TYPE.MHA:Y=this.readMHA(u,v);break;case NVIMAGE_TYPE.MGH:case NVIMAGE_TYPE.MGZ:Y=this.readMGH(u);break;case NVIMAGE_TYPE.SRC:Y=this.readSRC(u);break;case NVIMAGE_TYPE.V:Y=this.readECAT(u);break;case NVIMAGE_TYPE.V16:Y=this.readV16(u);break;case NVIMAGE_TYPE.VMR:Y=this.readVMR(u);break;case NVIMAGE_TYPE.HEAD:Y=this.readHEAD(u,v);break;case NVIMAGE_TYPE.NII:this.hdr=nifti.readHeader(u),this.hdr!==null&&(this.hdr.cal_min===0&&this.hdr.cal_max===255&&(this.hdr.cal_max=0),nifti.isCompressed(u)?Y=nifti.readImage(this.hdr,nifti.decompress(u)):Y=nifti.readImage(this.hdr,u));break;default:throw new Error("Image type not supported")}if(this.hdr&&typeof this.hdr.magic=="number"&&(this.hdr.magic="n+1"),this.nFrame4D=1,this.hdr)for(let z=4;z<7;z++)this.hdr.dims[z]>1&&(this.nFrame4D*=this.hdr.dims[z]);if(this.frame4D=Math.min(this.frame4D,this.nFrame4D-1),this.nTotalFrame4D=this.nFrame4D,!this.hdr||!Y)return;this.nVox3D=this.hdr.dims[1]*this.hdr.dims[2]*this.hdr.dims[3];const G=this.nVox3D*(this.hdr.numBitsPerVoxel/8),Z=Y.byteLength/G;Z!==this.nFrame4D&&(Z>0&&Z*G===Y.byteLength?log.debug("Loading the first "+Z+" of "+this.nFrame4D+" volumes"):log.warn("This header does not match voxel data",this.hdr,Y.byteLength),this.nFrame4D=Z),(this.hdr.intent_code===1007||this.hdr.intent_code===2003)&&this.nFrame4D===3&&this.hdr.datatypeCode===16&&(Y=this.float32V1asRGBA(new Float32Array(Y))),(this.hdr.pixDims[1]===0||this.hdr.pixDims[2]===0||this.hdr.pixDims[3]===0)&&log.error("pixDims not plausible",this.hdr),(isNaN(this.hdr.scl_slope)||this.hdr.scl_slope===0)&&(this.hdr.scl_slope=1),isNaN(this.hdr.scl_inter)&&(this.hdr.scl_inter=0);let e0=isAffineOK(this.hdr.affine);if(d||!e0||this.hdr.qform_code>this.hdr.sform_code){log.debug("spatial transform based on QForm");const z=this.hdr.quatern_b,f=this.hdr.quatern_c,f0=this.hdr.quatern_d,o0=Math.sqrt(1-(Math.pow(z,2)+Math.pow(f,2)+Math.pow(f0,2))),c0=this.hdr.pixDims[0]===0?1:this.hdr.pixDims[0],m0=[[o0*o0+z*z-f*f-f0*f0,2*z*f-2*o0*f0,2*z*f0+2*o0*f],[2*z*f+2*o0*f0,o0*o0+f*f-z*z-f0*f0,2*f*f0-2*o0*z],[2*z*f0-2*o0*f,2*f*f0+2*o0*z,o0*o0+f0*f0-f*f-z*z]],v0=this.hdr.affine;for(let g0=0;g0<3;g0+=1)for(let x0=0;x0<3;x0+=1)v0[g0][x0]=m0[g0][x0]*this.hdr.pixDims[x0+1],x0===2&&(v0[g0][x0]*=c0);v0[0][3]=this.hdr.qoffset_x,v0[1][3]=this.hdr.qoffset_y,v0[2][3]=this.hdr.qoffset_z,this.hdr.affine=v0}if(e0=isAffineOK(this.hdr.affine),!e0){log.debug("Defective NIfTI: spatial transform does not make sense");let z=this.hdr.pixDims[1],f=this.hdr.pixDims[2],f0=this.hdr.pixDims[3];(isNaN(z)||z===0)&&(z=1),(isNaN(f)||f===0)&&(f=1),(isNaN(f0)||f0===0)&&(f0=1),this.hdr.pixDims[1]=z,this.hdr.pixDims[2]=f,this.hdr.pixDims[3]=f0;const o0=[[z,0,0,0],[0,f,0,0],[0,0,f0,0],[0,0,0,1]];this.hdr.affine=o0}if(this.hdr.datatypeCode!==128&&this.hdr.datatypeCode!==2304&&this.hdr.littleEndian!==isPlatformLittleEndian()&&this.hdr.numBitsPerVoxel>8){if(this.hdr.numBitsPerVoxel===16){const z=new Uint16Array(Y);for(let f=0;f>8&255)<<16>>16}}else if(this.hdr.numBitsPerVoxel===32){const z=new Uint32Array(Y);for(let f=0;f>8&65280|f0>>24&255}}else if(this.hdr.numBitsPerVoxel===64){const z=this.hdr.numBitsPerVoxel/8,f=new Uint8Array(Y);for(let f0=0;f0.01?log.warn("Warning voxels not aligned with world space: "+L+` degrees from plumb. +`):L=0,L}float32V1asRGBA(u){u.length!==this.nVox3D*3&&log.warn("float32V1asRGBA() expects "+this.nVox3D*3+"voxels, got ",+u.length);const h=u.slice();this.hdr.datatypeCode=2304,this.nFrame4D=1;for(let _=4;_<7;_++)this.hdr.dims[_]=1;this.hdr.dims[0]=3;const g=new Uint8Array(this.nVox3D*4);let S=1;for(let _=0;_0)*1,e=+(L>0)*2,N=+(d>0)*4;let B=248+k+e+N;Math.abs(P)+Math.abs(L)+Math.abs(d)<.1&&(B=0),g[I+3]=B,I+=4}return g}loadImgV1(u=!1,h=!1,g=!1){let S=this.v1;if(!S&&this.nFrame4D===3&&this.img.constructor===Float32Array&&(S=this.img.slice()),!S)return log.warn("Image does not have V1 data"),!1;if(u)for(let v=0;v.1&&log.warn("Warning: voxels are rhomboidal, maximum shear is %f degrees.",this.maxShearDeg);const P=fromValues$1(this.dimsRAS[1],this.dimsRAS[2],this.dimsRAS[3],1),L=clone$2(this.matRAS);transpose(L,L);const d=fromValues$1(-.5,-.5,-.5,0);translate(L,L,fromValues$2(d[0],d[1],d[2])),L[0]*=P[0],L[1]*=P[0],L[2]*=P[0],L[4]*=P[1],L[5]*=P[1],L[6]*=P[1],L[8]*=P[2],L[9]*=P[2],L[10]*=P[2],this.frac2mm=clone$2(L);const k=this.pixDimsRAS[1],e=this.pixDimsRAS[2],N=this.pixDimsRAS[3],B=clone$2(L);B[0]=k*P[0],B[1]=0,B[2]=0,B[4]=0,B[5]=e*P[1],B[6]=0,B[8]=0,B[9]=0,B[10]=N*P[2];const Q=this.mm2vox([0,0,0],!0);B[12]=(-Q[0]-.5)*k,B[13]=(-Q[1]-.5)*e,B[14]=(-Q[2]-.5)*N,this.frac2mmOrtho=clone$2(B),this.extentsMinOrtho=[B[12],B[13],B[14]],this.extentsMaxOrtho=[B[0]+B[12],B[5]+B[13],B[10]+B[14]],this.mm2ortho=create$3(),invert(this.mm2ortho,v)}THD_daxes_to_NIFTI(u,h,g){const S=this.hdr;if(S===null)throw new Error("HDR is not set");S.sform_code=2;const v="xxyyzzg";let w=-1,I=-1,_=-1;const P=["x","y","z"];P[0]=v[g[0]],P[1]=v[g[1]],P[2]=v[g[2]];const L=u.slice(0,3),d=h.slice(0,3);for(let k=0;k<3;k++)P[k]==="x"?w=k:P[k]==="y"?I=k:_=k;w<0||I<0||_<0||w===I||w===_||I===_||(S.pixDims[1]=Math.abs(L[0]),S.pixDims[2]=Math.abs(L[1]),S.pixDims[3]=Math.abs(L[2]),S.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],S.affine[0][w]=-L[w],S.affine[1][I]=-L[I],S.affine[2][_]=L[_],S.affine[0][3]=-d[w],S.affine[1][3]=-d[I],S.affine[2][3]=d[_])}SetPixDimFromSForm(){if(!this.hdr)throw new Error("hdr not defined");const u=this.hdr.affine,h=fromValues$3(u[0][0],u[0][1],u[0][2],u[0][3],u[1][0],u[1][1],u[1][2],u[1][3],u[2][0],u[2][1],u[2][2],u[2][3],u[3][0],u[3][1],u[3][2],u[3][3]),g=this.vox2mm([0,0,0],h),S=this.vox2mm([1,0,0],h);subtract$1(S,S,g);const v=this.vox2mm([0,1,0],h);subtract$1(v,v,g);const w=this.vox2mm([0,0,1],h);subtract$1(w,w,g),this.hdr.pixDims[1]=length$1(S),this.hdr.pixDims[2]=length$1(v),this.hdr.pixDims[3]=length$1(w)}readDICOM(u){if(this.series=new daikon.Series,Array.isArray(u))for(let d=0;d1&&(h.dims[3]>1&&log.debug("To Do: multiple slices per file and multiple files (XA30 DWI)"),h.dims[3]=this.series.images.length);const g=this.series.images[0].getPixelSpacing();if(h.pixDims[1]=g[0],h.pixDims[2]=g[1],this.series.images.length>1){const d=fromValues$2(...this.series.images[0].getImagePosition()),k=fromValues$2(...this.series.images[1].getImagePosition()),e=fromValues$2(0,0,0);subtract$1(e,d,k),h.pixDims[3]=length$1(e)}else h.pixDims[3]=this.series.images[0].getSliceThickness();h.pixDims[4]=this.series.images[0].getTR()/1e3;const S=this.series.images[0].getDataType(),v=this.series.images[0].getBitsAllocated();h.numBitsPerVoxel=v,this.hdr.littleEndian=this.series.images[0].littleEndian,v===8&&S===2?h.datatypeCode=256:v===8&&S===3?h.datatypeCode=2:v===16&&S===2?h.datatypeCode=4:v===16&&S===3?h.datatypeCode=512:v===32&&S===2?h.datatypeCode=8:v===32&&S===3?h.datatypeCode=768:v===32&&S===4?h.datatypeCode=16:v===64&&S===4?h.datatypeCode=64:v===1?h.datatypeCode=1:log.warn("Unsupported DICOM format: "+S+" "+v);const w=h.pixDims.slice(1,4),I=getBestTransform(this.series.images[0].getImageDirections(),w,this.series.images[0].getImagePosition());I&&(h.sform_code=1,h.affine=[[I[0][0],I[0][1],I[0][2],I[0][3]],[I[1][0],I[1][1],I[1][2],I[1][3]],[I[2][0],I[2][1],I[2][2],I[2][3]],[0,0,0,1]]);let _,P=this.series.validatePixelDataLength(this.series.images[0]);const L=new Uint8Array(new ArrayBuffer(P*this.series.images.length));for(let d=0;d14)throw new Error("Not a valid ECAT file");let w=512,I=0;const _=[];let P=new Float32Array;for(;;){const L=g.getInt32(w,!1),d=g.getInt32(w+12,!1);if(L+d!==31)break;let k=w+20,e=0,N=0;for(;e<31&&(N=g.getInt32(k,!1),k+=16,N!==0);){e++;let B=N*512;const Q=B-512,i0=g.getUint16(Q,!1);h.dims[1]=g.getUint16(Q+4,!1),h.dims[2]=g.getUint16(Q+6,!1),h.dims[3]=g.getUint16(Q+8,!1);const j=g.getFloat32(Q+26,!1);h.pixDims[1]=g.getFloat32(Q+34,!1)*10,h.pixDims[2]=g.getFloat32(Q+38,!1)*10,h.pixDims[3]=g.getFloat32(Q+42,!1)*10,h.pixDims[4]=g.getUint32(Q+46,!1)/1e3,_.push(h.pixDims[4]);const H=h.dims[1]*h.dims[2]*h.dims[3],y=new Float32Array(H);if(i0===1)for(let G=0;G1){h.dims[0]=4;let L=!1;for(let d=0;d=4){let w=8+v;const I=g.getUint32(w+88,!0);if(w=w+92,I>0){const _=u.byteLength;for(let P=0;P4)&&log.warn("Not a valid MGH file"),L===0?(h.numBitsPerVoxel=8,h.datatypeCode=2):L===4?(h.numBitsPerVoxel=16,h.datatypeCode=4):L===1?(h.numBitsPerVoxel=32,h.datatypeCode=8):L===3&&(h.numBitsPerVoxel=32,h.datatypeCode=16),h.dims[1]=w,h.dims[2]=I,h.dims[3]=_,h.dims[4]=P,P>1&&(h.dims[0]=4),h.pixDims[1]=d,h.pixDims[2]=k,h.pixDims[3]=e,h.vox_offset=284,h.sform_code=1;const f=fromValues$3(N*h.pixDims[1],i0*h.pixDims[2],y*h.pixDims[3],0,B*h.pixDims[1],j*h.pixDims[2],Y*h.pixDims[3],0,Q*h.pixDims[1],H*h.pixDims[2],G*h.pixDims[3],0,0,0,0,1),f0=[h.dims[1]/2,h.dims[2]/2,h.dims[3]/2,1],o0=[0,0,0,0];for(let m0=0;m0<3;m0++){o0[m0]=0;for(let v0=0;v0<3;v0++)o0[m0]=o0[m0]+f[v0+m0*4]*f0[v0]}h.affine=[[f[0],f[1],f[2],Z-o0[0]],[f[4],f[5],f[6],e0-o0[1]],[f[8],f[9],f[10],z-o0[2]],[0,0,0,1]];const c0=h.dims[1]*h.dims[2]*h.dims[3]*h.dims[4]*(h.numBitsPerVoxel/8);return g.slice(h.vox_offset,h.vox_offset+c0)}readFIB(u){this.hdr=new nifti.NIFTI1;const h=this.hdr;h.littleEndian=!1,h.dims=[3,1,1,1,0,0,0,0],h.pixDims=[1,1,1,1,1,0,0,0];const g=NVUtilities.readMatV4(u);if(!("dimension"in g)||!("dti_fa"in g))throw new Error("Not a valid DSIstudio FIB file");const S="index0"in g&&"index1"in g&&"index2"in g;h.numBitsPerVoxel=32,h.datatypeCode=16,h.dims[1]=g.dimension[0],h.dims[2]=g.dimension[1],h.dims[3]=g.dimension[2],h.dims[4]=1,h.pixDims[1]=g.voxel_size[0],h.pixDims[2]=g.voxel_size[1],h.pixDims[3]=g.voxel_size[2],h.sform_code=1;const v=(h.dims[1]-1)*.5*h.pixDims[1],w=(h.dims[2]-1)*.5*h.pixDims[2],I=(h.dims[3]-1)*.5*h.pixDims[3];h.affine=[[h.pixDims[1],0,0,-v],[0,-h.pixDims[2],0,w],[0,0,h.pixDims[2],-I],[0,0,0,1]],h.littleEndian=!0;const _=h.dims[1]*h.dims[2]*h.dims[3],P=_*Math.ceil(h.numBitsPerVoxel/8),L=P*h.dims[4],d=new Uint8Array(new ArrayBuffer(_*4*3));if(S){const B=h.dims[1]*h.dims[2]*h.dims[3],Q=new Float32Array(B),i0=new Float32Array(B),j=new Float32Array(B),H=g.index0,y=g.odf_vertices;for(let Y=0;Y1&&(h.dims[0]=4),h.pixDims[1]=g.voxel_size[0],h.pixDims[2]=g.voxel_size[1],h.pixDims[3]=g.voxel_size[2],h.sform_code=1;const w=(h.dims[1]-1)*.5*h.pixDims[1],I=(h.dims[2]-1)*.5*h.pixDims[2],_=(h.dims[3]-1)*.5*h.pixDims[3];h.affine=[[h.pixDims[1],0,0,-w],[0,-h.pixDims[2],0,I],[0,0,h.pixDims[2],-_],[0,0,0,1]],h.littleEndian=!0;const P=h.dims[1]*h.dims[2]*h.dims[3]*(h.numBitsPerVoxel/8),L=P*h.dims[4],d=new Uint8Array(new ArrayBuffer(L));let k=0;for(let e=0;e2&&(B=B.slice(2)),_.startsWith("BinaryDataByteOrderMSB")&&B[0].includes("False")&&(P.littleEndian=!0),_.startsWith("BinaryDataByteOrderMSB")&&B[0].includes("True")&&(P.littleEndian=!1),_.startsWith("CompressedData")&&B[0].includes("True")&&(L=!0),_.startsWith("TransformMatrix"))for(let Q=0;Q<9;Q++)k[Q]=parseFloat(B[Q]);if(_.startsWith("Offset"))for(let Q=0;Q2||o0.length!==4)break;g.affine[d][0]=parseFloat(o0[0]),g.affine[d][1]=parseFloat(o0[1]),g.affine[d][2]=parseFloat(o0[2]),g.affine[d][3]=parseFloat(o0[3]),d++;break;case"comments":g.description=o0[0].substring(0,Math.min(79,o0[0].length));break;case"RepetitionTime":k=parseFloat(o0[0]);break;case"file":e=!o0[0].startsWith(". "),e||(o0=o0[0].split(" "),g.vox_offset=parseInt(o0[1]));break}}const N=g.dims[0];N>5&&log.warn("reader only designed for a maximum of 5 dimensions (XYZTD)");let B=1;for(let o0=0;o00&&(g.pixDims[4]=k),e&&!h&&log.warn("MIH header provided without paired image data");let Q;if(h&&e)Q=h.slice(0);else if(L){g.numBitsPerVoxel=8;const o0=new Uint8Array(B),c0=u.slice(g.vox_offset,g.vox_offset+Math.ceil(B/8)),m0=new Uint8Array(c0);let v0=0;for(let g0=0;g0>7-x0&1,x0===7&&v0++}Q=o0.buffer}else Q=u.slice(g.vox_offset,g.vox_offset+B*(g.numBitsPerVoxel/8));P.length!==g.dims[0]&&log.warn("dims does not match layout");let i0=1;const j=[1,1,1,1,1],H=[!1,!1,!1,!1,!1];for(let o0=0;o0g[0]&&(S[0]=2),g[6]>g[0]&&g[6]>g[3]&&(S[0]=3),S[1]=1,S[0]===1?g[4]>g[7]?S[1]=2:S[1]=3:S[0]===2?g[1]>g[7]?S[1]=1:S[1]=3:g[1]>g[4]?S[1]=1:S[1]=2,S[2]=6-S[1]-S[0];let v=[1,2,3];v[S[0]-1]=1,v[S[1]-1]=2,v[S[2]-1]=3;let w=fromValues$3(u[0][0],u[0][1],u[0][2],u[0][3],u[1][0],u[1][1],u[1][2],u[1][3],u[2][0],u[2][1],u[2][2],u[2][3],0,0,0,1);this.mm000=this.vox2mm([-.5,-.5,-.5],w),this.mm100=this.vox2mm([h.dims[1]-.5,-.5,-.5],w),this.mm010=this.vox2mm([-.5,h.dims[2]-.5,-.5],w),this.mm001=this.vox2mm([-.5,-.5,h.dims[3]-.5],w);const I=create$3();copy$1(I,w);for(let Q=0;Q<3;Q++)for(let i0=0;i0<3;i0++)I[Q*4+i0]=w[Q*4+v[i0]-1];const _=[0,0,0];I[0]<0&&(_[0]=1),I[5]<0&&(_[1]=1),I[10]<0&&(_[2]=1),this.dimsRAS=[h.dims[0],h.dims[v[0]],h.dims[v[1]],h.dims[v[2]]],this.pixDimsRAS=[h.pixDims[0],h.pixDims[v[0]],h.pixDims[v[1]],h.pixDims[v[2]]],this.permRAS=v.slice();for(let Q=0;Q<3;Q++)_[Q]===1&&(this.permRAS[Q]=-this.permRAS[Q]);if(this.arrayEquals(v,[1,2,3])&&this.arrayEquals(_,[0,0,0])){this.toRAS=create$3(),this.matRAS=clone$2(w),this.calculateOblique(),this.img2RASstep=[1,this.dimsRAS[1],this.dimsRAS[1]*this.dimsRAS[2]],this.img2RASstart=[0,0,0];return}identity(w),w[0+0*4]=1-_[0]*2,w[1+1*4]=1-_[1]*2,w[2+2*4]=1-_[2]*2,w[3+0*4]=(h.dims[v[0]]-1)*_[0],w[3+1*4]=(h.dims[v[1]]-1)*_[1],w[3+2*4]=(h.dims[v[2]]-1)*_[2];const P=create$3();invert(P,w),multiply(P,P,I),this.matRAS=clone$2(P),w=fromValues$3(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),w[v[0]-1+0*4]=-_[0]*2+1,w[v[1]-1+1*4]=-_[1]*2+1,w[v[2]-1+2*4]=-_[2]*2+1,w[3+0*4]=_[0],w[3+1*4]=_[1],w[3+2*4]=_[2],this.toRAS=clone$2(w),w[3]=0,w[7]=0,w[11]=0,w[12]=0,(this.permRAS[0]===-1||this.permRAS[1]===-1||this.permRAS[2]===-1)&&(w[12]=h.dims[1]-1),w[13]=0,(this.permRAS[0]===-2||this.permRAS[1]===-2||this.permRAS[2]===-2)&&(w[13]=h.dims[2]-1),w[14]=0,(this.permRAS[0]===-3||this.permRAS[1]===-3||this.permRAS[2]===-3)&&(w[14]=h.dims[3]-1),this.toRASvox=clone$2(w),log.debug(this.hdr.dims),log.debug(this.dimsRAS);const L=this.hdr;v=this.permRAS;const d=[Math.abs(v[0]),Math.abs(v[1]),Math.abs(v[2])],k=[L.dims[d[0]],L.dims[d[1]],L.dims[d[2]]],e=[1,L.dims[1],L.dims[1]*L.dims[2]],N=[e[d[0]-1],e[d[1]-1],e[d[2]-1]],B=[0,0,0];for(let Q=0;Q<3;Q++)v[Q]<0&&(B[Q]=N[Q]*(k[Q]-1),N[Q]=-N[Q]);this.img2RASstep=N,this.img2RASstart=B,this.calculateOblique()}img2RAS(){if(!this.permRAS)throw new Error("permRAS undefined");if(!this.img)throw new Error("img undefined");if(!this.hdr)throw new Error("hdr undefined");const u=this.permRAS.slice();if(u[0]===1&&u[1]===2&&u[2]===3)return this.img;const h=this.hdr,g=this.img.slice(0,h.dims[1]*h.dims[1]*h.dims[2]*h.dims[3]),S=[Math.abs(u[0]),Math.abs(u[1]),Math.abs(u[2])],v=[h.dims[S[0]],h.dims[S[1]],h.dims[S[2]]],w=[1,h.dims[1],h.dims[1]*h.dims[2]],I=[w[S[0]-1],w[S[1]-1],w[S[2]-1]],_=[0,0,0];for(let L=0;L<3;L++)u[L]<0&&(_[L]=I[L]*(v[L]-1),I[L]=-I[L]);let P=0;for(let L=0;Lg===h[S])}setColormap(u){this._colormap=u,this.calMinMax(),this.onColormapChange&&this.onColormapChange(this)}setColormapLabel(u){this.colormapLabel=cmapper.makeLabelLut(u)}async setColormapLabelFromUrl(u){this.colormapLabel=await cmapper.makeLabelLutFromUrl(u)}get colormap(){return this._colormap}get colorMap(){return this._colormap}set colormap(u){this.setColormap(u)}set colorMap(u){this.setColormap(u)}get opacity(){return this._opacity}set opacity(u){this._opacity=u,this.onOpacityChange&&this.onOpacityChange(this)}calMinMax(){if(!this.hdr)throw new Error("hdr undefined");if(!this.img)throw new Error("img undefined");let u=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,g=0,S=0;const v=this.img.length,w=this.img.constructor!==Float64Array&&this.img.constructor!==Float32Array&&this.ignoreZeroVoxels;if(w)for(let Z=0;Z0&&(u=0);const I=this.intensityRaw2Scaled(u),_=this.intensityRaw2Scaled(h),P=cmapper.colormapFromKey(this._colormap);let L=0,d=0;if(P.min!==void 0&&(L=P.min),P.max!==void 0&&(d=P.max),L===d&&this.trustCalMinMax&&isFinite(this.hdr.cal_min)&&isFinite(this.hdr.cal_max)&&this.hdr.cal_max>this.hdr.cal_min)return this.cal_min=this.hdr.cal_min,this.cal_max=this.hdr.cal_max,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=I,this.global_max=_,[this.hdr.cal_min,this.hdr.cal_max,this.hdr.cal_min,this.hdr.cal_max];if(L!==d)return this.cal_min=L,this.cal_max=d,this.robust_min=this.cal_min,this.robust_max=this.cal_max,[L,d,L,d];const k=100*g/v;let e=!1;k>60&&!this.ignoreZeroVoxels&&(log.warn(`${Math.round(k)}% of voxels are zero: ignoring zeros for cal_max`),e=!0,this.ignoreZeroVoxels=!0),this.ignoreZeroVoxels||(g=0),g+=S;const N=Math.round((v-g)*this.percentileFrac);if(N<1||u===h)return log.debug("no variability in image intensity?"),this.cal_min=I,this.cal_max=_,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=I,this.global_max=_,[I,_,I,_];const B=1001,Q=(B-1)/(h-u),i0=new Array(B);for(let Z=0;Z0&&(H--,i0[H]>0&&(Z=0)),Z!==0&&y0&&(Z=0)),H===0&&y===B-1&&(Z=0)}let Y=this.intensityRaw2Scaled(H/Q+u),G=this.intensityRaw2Scaled(y/Q+u);return this.hdr.cal_min=I&&this.hdr.cal_max<=_&&(Y=this.hdr.cal_min,G=this.hdr.cal_max),e&&(Y=Math.min(Y,0)),this.cal_min=Y,this.cal_max=G,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=I,this.global_max=_,[Y,G,I,_]}intensityRaw2Scaled(u){if(!this.hdr)throw new Error("hdr undefined");return this.hdr.scl_slope===0&&(this.hdr.scl_slope=1),u*this.hdr.scl_slope+this.hdr.scl_inter}intensityScaled2Raw(u){if(!this.hdr)throw new Error("hdr undefined");return this.hdr.scl_slope===0&&(this.hdr.scl_slope=1),(u-this.hdr.scl_inter)/this.hdr.scl_slope}saveToUint8Array(u,h=null){if(!this.hdr)throw new Error("hdr undefined");if(!this.img)throw new Error("img undefined");const g=h!==null,S=hdrToArrayBuffer(this.hdr,g),v=new Uint8Array(4);let w=new Uint8Array(this.img.buffer);g&&(w=new Uint8Array(h.buffer));const I=new Uint8Array(S.length+v.length+w.length);I.set(S),I.set(v,S.length),I.set(w,S.length+v.length);let _=null;return u.endsWith(".gz")?_=gzipSync$1(I,{filename:u,mtime:Date.now(),level:6}):_=I,_}saveToDisk(u="",h=null){const g=this.saveToUint8Array(u,h);if(u==="")return log.debug("saveToDisk: empty file name, returning data as Uint8Array rather than triggering download"),g;const S=new Blob([g.buffer],{type:"application/octet-stream"}),v=URL.createObjectURL(S),w=document.createElement("a");return w.setAttribute("href",v),w.setAttribute("download",u),w.style.visibility="hidden",document.body.appendChild(w),w.click(),document.body.removeChild(w),g}static async fetchDicomData(u,h={}){if(u==="")throw Error("url must not be empty");let S=/^(?:[a-z+]+:)?\/\//i.test(u)?u:new URL(u,window.location.href);/(?:.([^.]+))?$/.exec(S.pathname)||(S=new URL("niivue-manifest.txt",u));let I=await fetch(S,{headers:h});if(!I.ok)throw Error(I.statusText);const P=(await I.text()).split(` +`),d=/(.*\/).*/.exec(S)[0],k=[];for(const e of P){const N=new URL(e,d);if(I=await fetch(N,{headers:h}),!I.ok)throw Error(I.statusText);const B=await I.arrayBuffer();k.push(B)}return k}static async fetchPartial(u,h,g={}){try{return await fetch(u,{headers:{range:`bytes=0-'${h}`,stream:"true",...g}})}catch(S){return log.error(S),log.error("fetchPartial failed, trying again without range header"),await fetch(u,{headers:g})}}static async loadFromUrl({url:u="",urlImgData:h="",headers:g={},name:S="",colormap:v="gray",opacity:w=1,cal_min:I=NaN,cal_max:_=NaN,trustCalMinMax:P=!0,percentileFrac:L=.02,ignoreZeroVoxels:d=!1,useQFormNotSForm:k=!1,colormapNegative:e="",frame4D:N=0,isManifest:B=!1,limitFrames4D:Q=NaN,imageType:i0=NVIMAGE_TYPE.UNKNOWN,colorbarVisible:j=!0,buffer:H=new ArrayBuffer(0)}={}){if(u==="")throw Error("url must not be empty");let y=null,Y=null;if(u instanceof Uint8Array&&(u=u.buffer),H.byteLength>0&&(u=H),u instanceof ArrayBuffer)if(Y=u,S!=="")u=S;else{u="array.nii";const f=new Uint8Array(Y);f[0]===31&&f[1]===139&&(u="array.nii.gz")}if(!isNaN(Q)){let f=await this.fetchPartial(u,512,g);Y=await f.arrayBuffer();let f0=new Uint8Array(Y),o0=!1;f0[0]===31&&f0[1]===139&&(o0=!0,new Decompress$1(v0=>{f0=v0}).push(f0),Y=f0.buffer);let c0=f0[0]===92&&f0[1]===1;if(c0||(c0=f0[1]===92&&f0[0]===1),!c0)Y=null;else{const m0=nifti.readHeader(Y);if(m0===null)throw new Error("could not read nifti header");const v0=m0.numBitsPerVoxel/8;let g0=1;for(let ee=1;ee<4;ee++)m0.dims[ee]>1&&(g0*=m0.dims[ee]);let x0=1;for(let ee=4;ee<7;ee++)m0.dims[ee]>1&&(x0*=m0.dims[ee]);const T0=Math.max(Math.min(Q,x0),1),M0=m0.vox_offset+T0*g0*v0;if(Y.byteLength{ee=Fe}).push(ee),Y=ee.buffer}Y.byteLength-1&&(S=S.slice(0,S.indexOf("?")))}let z=null;if(h.length>0){let f=await fetch(h,{headers:g});f.status===404&&h.lastIndexOf("BRIK")!==-1&&(f=await fetch(h+".gz",{headers:g})),z=await f.arrayBuffer()}if(!Y)throw new Error("Unable to load buffer properly from volume");return y=new Wt(Y,S,v,w,z,I,_,P,L,d,k,e,N,i0),y.url=u,y.colorbarVisible=j,y}static readFileAsync(u,h=NaN){return new Promise((g,S)=>{const v=new FileReader;v.onload=()=>{u.name.lastIndexOf("gz")!==-1&&isNaN(h)?g(nifti.decompress(v.result)):g(v.result)},v.onerror=S,isNaN(h)?v.readAsArrayBuffer(u):v.readAsArrayBuffer(u.slice(0,h))})}static async loadFromFile({file:u,name:h="",colormap:g="gray",opacity:S=1,urlImgData:v=null,cal_min:w=NaN,cal_max:I=NaN,trustCalMinMax:_=!0,percentileFrac:P=.02,ignoreZeroVoxels:L=!1,useQFormNotSForm:d=!1,colormapNegative:k="",frame4D:e=0,limitFrames4D:N=NaN,imageType:B=NVIMAGE_TYPE.UNKNOWN}){let Q=null,i0=[];try{if(Array.isArray(u))for(let H=0;H{H=Z}).push(H),i0=H.buffer);let Y=H[0]===92&&H[1]===1;if(Y||(Y=H[1]===92&&H[0]===1),!Y)i0=await this.readFileAsync(u);else{const G=nifti.readHeader(i0);if(!G)throw new Error("could not read nifti header");const Z=G.numBitsPerVoxel/8;let e0=1;for(let o0=1;o0<4;o0++)G.dims[o0]>1&&(e0*=G.dims[o0]);let z=1;for(let o0=4;o0<7;o0++)G.dims[o0]>1&&(z*=G.dims[o0]);const f=Math.max(Math.min(N,z),1),f0=G.vox_offset+f*e0*Z;if(i0.byteLength{o0=m0}).push(o0),i0=o0.buffer}if(i0.byteLength"u")return v;if(!h){const I=clone$2(this.frac2mmOrtho);return invert(I,I),transformMat4(g,g,I),v[0]=g[0],v[1]=g[1],v[2]=g[2],v}if(S[1]<1||S[2]<1||S[3]<1)return v;const w=clone$2(this.matRAS);return invert(w,w),transpose(w,w),transformMat4(g,g,w),v[0]=(g[0]+.5)/S[1],v[1]=(g[1]+.5)/S[2],v[2]=(g[2]+.5)/S[3],v}},SLICE_TYPE=(C=>(C[C.AXIAL=0]="AXIAL",C[C.CORONAL=1]="CORONAL",C[C.SAGITTAL=2]="SAGITTAL",C[C.MULTIPLANAR=3]="MULTIPLANAR",C[C.RENDER=4]="RENDER",C))(SLICE_TYPE||{}),SHOW_RENDER=(C=>(C[C.NEVER=0]="NEVER",C[C.ALWAYS=1]="ALWAYS",C[C.AUTO=2]="AUTO",C))(SHOW_RENDER||{}),MULTIPLANAR_TYPE=(C=>(C[C.AUTO=0]="AUTO",C[C.COLUMN=1]="COLUMN",C[C.GRID=2]="GRID",C[C.ROW=3]="ROW",C))(MULTIPLANAR_TYPE||{}),DRAG_MODE=(C=>(C[C.none=0]="none",C[C.contrast=1]="contrast",C[C.measurement=2]="measurement",C[C.pan=3]="pan",C[C.slicer3D=4]="slicer3D",C[C.callbackOnly=5]="callbackOnly",C))(DRAG_MODE||{}),DEFAULT_OPTIONS={textHeight:.06,colorbarHeight:.05,crosshairWidth:1,crosshairGap:0,rulerWidth:4,show3Dcrosshair:!1,backColor:[0,0,0,1],crosshairColor:[1,0,0,1],fontColor:[.5,.5,.5,1],selectionBoxColor:[1,1,1,.5],clipPlaneColor:[.7,0,.7,.5],clipThick:2,clipVolumeLow:[0,0,0],clipVolumeHigh:[1,1,1],rulerColor:[1,0,0,.8],colorbarMargin:.05,trustCalMinMax:!0,clipPlaneHotKey:"KeyC",viewModeHotKey:"KeyV",doubleTouchTimeout:500,longTouchTimeout:1e3,keyDebounceTime:50,isNearestInterpolation:!1,isResizeCanvas:!0,atlasOutline:0,isRuler:!1,isColorbar:!1,isOrientCube:!1,multiplanarPadPixels:0,multiplanarForceRender:!1,multiplanarShowRender:2,isRadiologicalConvention:!1,meshThicknessOn2D:1/0,dragMode:1,yoke3Dto2DZoom:!1,isDepthPickMesh:!1,isCornerOrientationText:!1,sagittalNoseLeft:!1,isSliceMM:!1,isV1SliceShader:!1,isHighResolutionCapable:!0,logLevel:"info",loadingText:"waiting for images...",isForceMouseClickToVoxelCenters:!1,dragAndDropEnabled:!0,drawingEnabled:!1,penValue:1,floodFillNeighbors:6,isFilledPen:!1,thumbnail:"",maxDrawUndoBitmaps:8,sliceType:3,meshXRay:0,isAntiAlias:null,limitFrames4D:NaN,isAdditiveBlend:!1,showLegend:!0,legendBackgroundColor:[.3,.3,.3,.5],legendTextColor:[1,1,1,1],multiplanarLayout:0,renderOverlayBlend:1,sliceMosaicString:"",centerMosaic:!1,clickToSegment:!1,clickToSegmentRadius:2,clickToSegmentSteps:10,clickToSegmentBright:!0},INITIAL_SCENE_DATA={azimuth:110,elevation:10,crosshairPos:create$2(),clipPlane:[0,0,0,0],clipPlaneDepthAziElev:[2,0,0],volScaleMultiplier:1,pan2Dxyzmm:create$1(),clipThick:2,clipVolumeLow:[0,0,0],clipVolumeHigh:[1,1,1]},NVDocument=class Zt{constructor(){__publicField(this,"data",{title:"Untitled document",imageOptionsArray:[],meshOptionsArray:[],opts:{...DEFAULT_OPTIONS},previewImageDataURL:"",labels:[],encodedImageBlobs:[],encodedDrawingBlob:""}),__publicField(this,"scene"),__publicField(this,"volumes",[]),__publicField(this,"meshDataObjects"),__publicField(this,"meshes",[]),__publicField(this,"drawBitmap",null),__publicField(this,"imageOptionsMap",new Map),__publicField(this,"meshOptionsMap",new Map),this.scene={onAzimuthElevationChange:()=>{},onZoom3DChange:()=>{},sceneData:{...INITIAL_SCENE_DATA,pan2Dxyzmm:fromValues$1(0,0,0,1),crosshairPos:fromValues$2(.5,.5,.5)},get renderAzimuth(){return this.sceneData.azimuth},set renderAzimuth(u){this.sceneData.azimuth=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get renderElevation(){return this.sceneData.elevation},set renderElevation(u){this.sceneData.elevation=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get volScaleMultiplier(){return this.sceneData.volScaleMultiplier},set volScaleMultiplier(u){this.sceneData.volScaleMultiplier=u,this.onZoom3DChange(u)},get crosshairPos(){return this.sceneData.crosshairPos},set crosshairPos(u){this.sceneData.crosshairPos=u},get clipPlane(){return this.sceneData.clipPlane},set clipPlane(u){this.sceneData.clipPlane=u},get clipPlaneDepthAziElev(){return this.sceneData.clipPlaneDepthAziElev},set clipPlaneDepthAziElev(u){this.sceneData.clipPlaneDepthAziElev=u},get pan2Dxyzmm(){return this.sceneData.pan2Dxyzmm},set pan2Dxyzmm(u){this.sceneData.pan2Dxyzmm=u}}}get title(){return this.data.title}get previewImageDataURL(){return this.data.previewImageDataURL}set previewImageDataURL(u){this.data.previewImageDataURL=u}set title(u){this.data.title=u}get imageOptionsArray(){return this.data.imageOptionsArray}get encodedImageBlobs(){return this.data.encodedImageBlobs}get encodedDrawingBlob(){return this.data.encodedDrawingBlob}get opts(){return this.data.opts}set opts(u){this.data.opts={...u}}get labels(){return this.data.labels}set labels(u){this.data.labels=u}get customData(){return this.data.customData}set customData(u){this.data.customData=u}hasImage(u){return this.volumes.find(h=>h.id===u.id)!==void 0}hasImageFromUrl(u){return this.data.imageOptionsArray.find(h=>h.url===u)!==void 0}addImageOptions(u,h){if(!this.hasImage(u)&&!h.name)if(h.url){const S=/^(?:[a-z+]+:)?\/\//i.test(h.url)?new URL(h.url):new URL(h.url,window.location.href);h.name=S.pathname.split("/").pop(),h.name.toLowerCase().endsWith(".gz")&&(h.name=h.name.slice(0,-3)),h.name.toLowerCase().endsWith(".nii")||(h.name+=".nii")}else h.name="untitled.nii";h.imageType=NVIMAGE_TYPE.NII,this.data.imageOptionsArray.push(h),this.imageOptionsMap.set(u.id,this.data.imageOptionsArray.length-1)}removeImage(u){if(this.imageOptionsMap.has(u.id)){const h=this.imageOptionsMap.get(u.id);this.data.imageOptionsArray.length>h&&this.data.imageOptionsArray.splice(h,1),this.imageOptionsMap.delete(u.id)}this.volumes=this.volumes.filter(h=>h.id!==u.id)}getImageOptions(u){return this.imageOptionsMap.has(u.id)?this.data.imageOptionsArray[this.imageOptionsMap.get(u.id)]:null}json(){const u={encodedImageBlobs:[],previewImageDataURL:this.data.previewImageDataURL,imageOptionsMap:new Map},h=[];if(u.sceneData={...this.scene.sceneData},u.opts={...this.opts},this.opts.meshThicknessOn2D===1/0&&(u.opts.meshThicknessOn2D="infinity"),u.labels=[...this.data.labels],u.customData=this.customData,this.volumes.length){let S=this.imageOptionsArray[0];if(S||(log.debug("no image options for base image"),S={name:"",colormap:"gray",opacity:1,pairedImgData:null,cal_min:NaN,cal_max:NaN,trustCalMinMax:!0,percentileFrac:.02,ignoreZeroVoxels:!1,useQFormNotSForm:!1,colormapNegative:"",colormapLabel:null,imageType:NVIMAGE_TYPE.NII,frame4D:0,limitFrames4D:NaN,url:"",urlImageData:"",alphaThreshold:!1,cal_minNeg:NaN,cal_maxNeg:NaN,colorbarVisible:!0}),S.colormap=this.volumes[0].colormap,S.opacity=this.volumes[0].opacity,S.cal_max=this.volumes[0].cal_max||NaN,S.cal_min=this.volumes[0].cal_min||NaN,S){h.push(S);const v=NVUtilities.uint8tob64(this.volumes[0].toUint8Array());u.encodedImageBlobs.push(v),this.drawBitmap&&(u.encodedDrawingBlob=NVUtilities.uint8tob64(this.volumes[0].toUint8Array(this.drawBitmap))),u.imageOptionsMap.set(this.volumes[0].id,0)}else throw new Error("image options for base layer not found");for(let v=1;v({values:w.values,nFrame4D:w.nFrame4D,frame4D:0,outlineBorder:w.outlineBorder,global_min:w.global_min,global_max:w.global_max,cal_min:w.cal_min,cal_max:w.cal_max,opacity:w.opacity,colormap:w.colormap,colormapNegative:w.colormapNegative,colormapLabel:w.colormapLabel,useNegativeCmap:w.useNegativeCmap})),hasConnectome:S.hasConnectome,edgeColormap:S.edgeColormap,edgeColormapNegative:S.edgeColormapNegative,edgeMax:S.edgeMax,edgeMin:S.edgeMin,edges:S.edges&&Array.isArray(S.edges)?[...S.edges]:[],extentsMax:S.extentsMax,extentsMin:S.extentsMin,furthestVertexFromOrigin:S.furthestVertexFromOrigin,nodeColormap:S.nodeColormap,nodeColormapNegative:S.nodeColormapNegative,nodeMaxColor:S.nodeMaxColor,nodeMinColor:S.nodeMinColor,nodeScale:S.nodeScale,legendLineThickness:S.legendLineThickness,offsetPt0:S.offsetPt0,nodes:S.nodes};S.offsetPt0&&S.offsetPt0.length>0&&(v.offsetPt0=S.offsetPt0,v.fiberGroupColormap=S.fiberGroupColormap,v.fiberColor=S.fiberColor,v.fiberDither=S.fiberDither,v.fiberRadius=S.fiberRadius,v.colormap=S.colormap),g.push(v)}return u.meshesString=JSON.stringify(serialize(g)),u}async download(u,h){const g=this.json(),S=JSON.stringify(g),v=h?"application/gzip":"application/json";let w;h?w=await NVUtilities.compressStringToArrayBuffer(S):w=JSON.stringify(g),NVUtilities.download(w,u,v)}static deserializeMeshDataObjects(u){if(u.data.meshesString){u.meshDataObjects=deserialize(JSON.parse(u.data.meshesString));for(const h of u.meshDataObjects)for(const g of h.layers)"colorMap"in g&&(g.colormap=g.colorMap,delete g.colorMap),"colorMapNegative"in g&&(g.colormapNegative=g.colorMapNegative,delete g.colorMapNegative)}}static async loadFromUrl(u){const g=await(await fetch(u)).arrayBuffer();let S;if(NVUtilities.isArrayBufferCompressed(g)){const v=await NVUtilities.decompressArrayBuffer(g);S=JSON.parse(v)}else{const v=new TextDecoder;S=JSON.parse(v.decode(g))}return Zt.loadFromJSON(S)}static async loadFromFile(u){const h=await NVUtilities.readFileAsync(u);let g;const S=new Zt;return NVUtilities.isArrayBufferCompressed(h)?g=await NVUtilities.decompressArrayBuffer(h):g=new TextDecoder().decode(h),S.data=JSON.parse(g),S.data.opts.meshThicknessOn2D==="infinity"&&(S.data.opts.meshThicknessOn2D=1/0),S.scene.sceneData={...INITIAL_SCENE_DATA,...S.data.sceneData},Zt.deserializeMeshDataObjects(S),S}static loadFromJSON(u){const h=new Zt;return h.data=u,h.data.opts.meshThicknessOn2D==="infinity"&&(h.data.opts.meshThicknessOn2D=1/0),h.scene.sceneData={...INITIAL_SCENE_DATA,...u.sceneData},Zt.deserializeMeshDataObjects(h),h}},NVLabel3D=class{constructor(C,u,h){__publicField(this,"text"),__publicField(this,"style"),__publicField(this,"points"),this.text=C,this.style=u,this.points=h}},defaultOptions={name:"untitled connectome",nodeColormap:"warm",nodeColormapNegative:"winter",nodeMinColor:0,nodeMaxColor:4,nodeScale:3,edgeColormap:"warm",edgeColormapNegative:"winter",edgeMin:2,edgeMax:6,edgeScale:1,legendLineThickness:0},NVConnectome=class Nn extends NVMesh2{constructor(u,h){super(new Float32Array([]),new Uint32Array([]),h.name,new Uint8Array([]),1,!0,u,h),__publicField(this,"gl"),__publicField(this,"nodesChanged"),this.gl=u,this.type="connectome",this.nodes&&this.updateLabels(),this.nodesChanged=new EventTarget}static convertLegacyConnectome(u){const h={nodes:[],edges:[],...defaultOptions};for(const S in u)if(S in defaultOptions){const v=S;h[v]=u[v]}const g=u.nodes;for(let S=0;S({name:Array.isArray(w.comments)&&w.comments.length>0&&"text"in w.comments[0]?w.comments[0].text:"",x:w.coordinates.x,y:w.coordinates.y,z:w.coordinates.z,colorValue:1,sizeValue:1,metadata:w.comments}));return{...defaultOptions,nodeColormap:h,edgeColormap:h,nodes:S,edges:[]}}updateLabels(){const u=this.nodes;if(u&&u.length>0){const h=u.reduce((P,L)=>P.sizeValue>L.sizeValue?P:L).sizeValue,g=this.nodeMinColor?this.nodeMinColor:u.reduce((P,L)=>P.colorValueP.colorValue>L.colorValue?P:L).colorValue,v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),I="nodeColormapNegative"in this,_=this.legendLineThickness?this.legendLineThickness:0;for(let P=0;Pe/255),log.debug("adding label for ",u[P]),u[P].label=new NVLabel3D(u[P].name,{textColor:k,bulletScale:u[P].sizeValue/h,bulletColor:k,lineWidth:_,lineColor:k,textScale:1,textAlignment:"left",lineTerminator:"none"},[u[P].x,u[P].y,u[P].z]),log.debug("label for node:",u[P].label)}}}addConnectomeNode(u){if(log.debug("adding node",u),!this.nodes)throw new Error("nodes not defined");this.nodes.push(u),this.updateLabels(),this.nodesChanged.dispatchEvent(new CustomEvent("nodeAdded",{detail:{node:u}}))}deleteConnectomeNode(u){const h=this.nodes.indexOf(u),g=this.edges;g&&(this.edges=g.filter(S=>S.first!==h&&S.second!==h)),this.nodes=this.nodes.filter(S=>S!==u),this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeDeleted",{detail:{node:u}}))}updateConnectomeNodeByIndex(u,h){this.nodes[u]=h,this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeChanged",{detail:{node:h}}))}updateConnectomeNodeByPoint(u,h){const g=this.nodes;if(!g)throw new Error("Node to update does not exist");const S=g.find(w=>NVUtilities.arraysAreEqual([w.x,w.y,w.z],u));if(!S)throw new Error(`Node with point ${u} to update does not exist`);const v=g.findIndex(w=>w===S);this.updateConnectomeNodeByIndex(v,h)}addConnectomeEdge(u,h,g){const S=this.edges;let v=S.find(w=>(w.first===u||w.second===u)&&w.first+w.second===u+h);return v||(v={first:u,second:h,colorValue:g},S.push(v),this.updateConnectome(this.gl),v)}deleteConnectomeEdge(u,h){const g=this.edges,S=g.find(v=>(v.first===u||v.first===h)&&v.first+v.second===u+h);if(S)this.edges=g.filter(v=>v!==S);else throw new Error(`edge between ${u} and ${h} not found`);return this.updateConnectome(this.gl),S}findClosestConnectomeNode(u,h){const g=this.nodes;if(!g||g.length===0)return null;const S=g.map((v,w)=>({node:v,distance:Math.sqrt(Math.pow(v.x-u[0],2)+Math.pow(v.y-u[1],2)+Math.pow(v.z-u[2],2)),index:w})).filter(v=>v.distancev.distance-w.distance);return S.length>0?S[0].node:null}updateConnectome(u){const h=[],g=[],S=[];let v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),I="nodeColormapNegative"in this;if(this.nodeMinColor===void 0||this.nodeMaxColor===void 0)throw new Error("nodeMinColor or nodeMaxColor is undefined");if(this.edgeMin===void 0||this.edgeMax===void 0)throw new Error("edgeMin or edgeMax undefined");let _=this.nodeMinColor,P=this.nodeMaxColor;const L=this.nodes,d=L.length;for(let i0=0;i0v&&([S,v]=[v,S]),[S,v]}function swizzleVec3(C,u=[0,1,2]){const h=create$2();return h[0]=C[u[0]],h[1]=C[u[1]],h[2]=C[u[2]],h}function isRadiological(C){const u=fromValues$1(1,0,0,0),h=create$1();return transformMat4(h,u,C),h[0]}function unProject(C,u,h,g){const S=fromValues$1(C,u,h,1),v=clone$2(g);invert(v,v),S[0]=S[0]*2-1,S[1]=S[1]*2-1,S[2]=S[2]*2-1;const w=create$1();return transformMat4(w,S,v),w[3]===0||(w[0]/=w[3],w[1]/=w[3],w[2]/=w[3]),w}function unpackFloatFromVec4i(C){const u=[5960464477539063e-23,152587890625e-16,.00390625,1];return(C[0]*u[0]+C[1]*u[1]+C[2]*u[2]+C[3]*u[3])/255}function clamp(C,u,h){return Math.min(Math.max(C,u),h)}function encodeRLE(C){const u=C.length;let h=0;const g=new Uint8Array(u+Math.ceil(.01*u)),S=new Int8Array(g.buffer);let v=0;for(;h1){S[v]=-I+1,v++,g[v]=w,v++;continue}for(;h127||h+2 "+v+" bytes (x"+u/v+")"),g.slice(0,v)}function decodeRLE(C,u){const h=new Uint8Array(C.buffer),g=new Int8Array(h.buffer);let S=0;const v=new Uint8Array(u);let w=0;for(;S{}),__publicField(this,"onMouseUp",()=>{}),__publicField(this,"onLocationChange",()=>{}),__publicField(this,"onIntensityChange",()=>{}),__publicField(this,"onClickToSegment",()=>{}),__publicField(this,"onImageLoaded",()=>{}),__publicField(this,"onMeshLoaded",()=>{}),__publicField(this,"onFrameChange",()=>{}),__publicField(this,"onError",()=>{}),__publicField(this,"onColormapChange",()=>{}),__publicField(this,"onInfo",()=>{}),__publicField(this,"onWarn",()=>{}),__publicField(this,"onDebug",()=>{}),__publicField(this,"onVolumeAddedFromUrl",()=>{}),__publicField(this,"onVolumeWithUrlRemoved",()=>{}),__publicField(this,"onVolumeUpdated",()=>{}),__publicField(this,"onMeshAddedFromUrl",()=>{}),__publicField(this,"onMeshAdded",()=>{}),__publicField(this,"onMeshWithUrlRemoved",()=>{}),__publicField(this,"onZoom3DChange",()=>{}),__publicField(this,"onAzimuthElevationChange",()=>{}),__publicField(this,"onClipPlaneChange",()=>{}),__publicField(this,"onCustomMeshShaderAdded",()=>{}),__publicField(this,"onMeshShaderChanged",()=>{}),__publicField(this,"onMeshPropertyChanged",()=>{}),__publicField(this,"onDocumentLoaded",()=>{}),__publicField(this,"document",new NVDocument),__publicField(this,"mediaUrlMap",new Map),__publicField(this,"initialized",!1),__publicField(this,"currentDrawUndoBitmap"),__publicField(this,"loadingText");for(const h in u)typeof u[h]=="function"?this[h]=u[h]:this.opts[h]=DEFAULT_OPTIONS[h]===void 0?DEFAULT_OPTIONS[h]:u[h];this.opts.isHighResolutionCapable?this.uiData.dpr=window.devicePixelRatio||1:this.uiData.dpr=1,this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,this.opts.drawingEnabled&&this.createEmptyDrawing(),this.opts.thumbnail.length>0&&(this.thumbnailVisible=!0),this.loadingText=this.opts.loadingText,log.setLogLevel(this.opts.logLevel)}get scene(){return this.document.scene}get opts(){return this.document.opts}get sliceMosaicString(){return this.document.opts.sliceMosaicString||""}set sliceMosaicString(u){this.document.opts.sliceMosaicString=u}get volumes(){return this.document.volumes}set volumes(u){this.document.volumes=u}get meshes(){return this.document.meshes}set meshes(u){this.document.meshes=u}get drawBitmap(){return this.document.drawBitmap}set drawBitmap(u){this.document.drawBitmap=u}get volScaleMultiplier(){return this.scene.volScaleMultiplier}set volScaleMultiplier(u){this.setScale(u)}async saveScene(u="niivue.png"){function h(S,v){const w=document.createElement("a");document.body.appendChild(w),w.style.display="none";const I=window.URL.createObjectURL(S);w.href=I,w.download=v,w.click(),w.remove()}const g=this.canvas;if(!g)throw new Error("canvas not defined");this.drawScene(),g.toBlob(S=>{S&&(u===""&&(u=`niivue-screenshot-${new Date().toString()}.png`,u=u.replace(/\s/g,"_")),h(S,u))})}async attachTo(u,h=null){return await this.attachToCanvas(document.getElementById(u),h),log.debug("attached to element with id: ",u),this}async attachToCanvas(u,h=null){return this.canvas=u,h===null&&(h=navigator.hardwareConcurrency>6,log.debug("AntiAlias ",h," Threads ",navigator.hardwareConcurrency)),this.gl=this.canvas.getContext("webgl2",{alpha:!0,antialias:h}),log.info("NIIVUE VERSION ",version),this.canvas.parentElement.style.backgroundColor="black",this.opts.isResizeCanvas&&(this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,window.addEventListener("resize",this.resizeListener.bind(this)),this.resizeObserver=new ResizeObserver(this.resizeListener.bind(this)),this.resizeObserver.observe(this.canvas.parentElement)),this.registerInteractions(),await this.init(),this.drawScene(),this}syncWith(u,h={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts={...h}}broadcastTo(u,h={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts=h}sync(){if(!this.gl||!this.otherNV||typeof this.otherNV>"u"||!this.gl.canvas.matches(":focus"))return;const u=this.frac2mm(this.scene.crosshairPos);if(this.otherNV instanceof Vn)this.syncOpts["2d"]&&(this.otherNV.scene.crosshairPos=this.otherNV.mm2frac(u),this.otherNV.scene.pan2Dxyzmm=clone(this.scene.pan2Dxyzmm)),this.syncOpts["3d"]&&(this.otherNV.scene.renderAzimuth=this.scene.renderAzimuth,this.otherNV.scene.renderElevation=this.scene.renderElevation,this.otherNV.scene.volScaleMultiplier=this.scene.volScaleMultiplier),this.otherNV.drawScene(),this.otherNV.createOnLocationChange();else if(Array.isArray(this.otherNV))for(let h=0;hg===h[S])}resizeListener(){if(!(!this.canvas||!this.gl)){if(!this.opts.isResizeCanvas){this.opts.isHighResolutionCapable&&(log.warn("isHighResolutionCapable requires isResizeCanvas"),this.opts.isHighResolutionCapable=!1),this.uiData.dpr=1,this.drawScene();return}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.opts.isHighResolutionCapable?(this.uiData.dpr=window.devicePixelRatio||1,log.debug("devicePixelRatio: "+this.uiData.dpr)):this.uiData.dpr=1,"width"in this.canvas.parentElement?(this.canvas.width=this.canvas.parentElement.width*this.uiData.dpr,this.canvas.height=this.canvas.parentElement.height*this.uiData.dpr):(this.canvas.width=this.canvas.offsetWidth*this.uiData.dpr,this.canvas.height=this.canvas.offsetHeight*this.uiData.dpr),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.drawScene()}}getRelativeMousePosition(u,h){if(h=h||u.target,!h)return;const g=h.getBoundingClientRect();return{x:u.clientX-g.left,y:u.clientY-g.top}}getNoPaddingNoBorderCanvasRelativeMousePosition(u,h){return h=h||u.target,this.getRelativeMousePosition(u,h)}mouseContextMenuListener(u){u.preventDefault()}mouseDownListener(u){u.preventDefault(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,this.uiData.mousedown=!0,log.debug("mouse down"),log.debug(u);const h=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!h)return;const[g,S]=[h.x*this.uiData.dpr,h.y*this.uiData.dpr],v=this.getLabelAtPoint([g,S]);if(v){for(const w of this.meshes)if(w.type==="connectome")for(const I of w.nodes)I.label===v&&(this.scene.crosshairPos=this.mm2frac([I.x,I.y,I.z]),this.updateGLVolume(),this.drawScene())}this.uiData.clickedTile=this.tileIndex(g,S),u.button===LEFT_MOUSE_BUTTON&&u.shiftKey?(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u)):u.button===LEFT_MOUSE_BUTTON?(this.uiData.mouseButtonLeftDown=!0,this.mouseLeftButtonHandler(u)):u.button===RIGHT_MOUSE_BUTTON?(this.uiData.mouseButtonRightDown=!0,this.mouseRightButtonHandler(u)):u.button===CENTER_MOUSE_BUTTON&&(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u))}mouseLeftButtonHandler(u){const h=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mouseDown(h.x,h.y),this.mouseClick(h.x,h.y)}mouseCenterButtonHandler(u){const h=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[h.x*this.uiData.dpr,h.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(h.x,h.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}mouseRightButtonHandler(u){const h=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[h.x*this.uiData.dpr,h.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(h.x,h.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}calculateMinMaxVoxIdx(u){if(u.length>2)throw new Error("array must not contain more than two values");return[Math.floor(Math.min(u[0],u[1])),Math.floor(Math.max(u[0],u[1]))]}calculateNewRange({volIdx:u=0}={}){if(this.opts.sliceType===4&&this.sliceMosaicString.length<1||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;let h=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]);if(h[0]<0)return;const g=this.frac2vox(h,u);if(h=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]),h[0]<0)return;const S=this.frac2vox(h,u);let v=-Number.MAX_VALUE,w=Number.MAX_VALUE;const I=this.calculateMinMaxVoxIdx([g[0],S[0]]),_=this.calculateMinMaxVoxIdx([g[1],S[1]]),P=this.calculateMinMaxVoxIdx([g[2],S[2]]);g[0]-S[0]===0?I[1]=g[0]+1:g[1]-S[1]===0?_[1]=g[1]+1:g[2]-S[2]===0&&(P[1]=g[2]+1);const L=this.volumes[u].hdr,d=this.volumes[u].img;if(!L||!d)return;const k=L.dims[1],e=L.dims[2];for(let Q=P[0];Qd[Y]&&(w=d[Y]),v=v)return;const N=intensityRaw2Scaled(L,w),B=intensityRaw2Scaled(L,v);this.volumes[u].cal_min=N,this.volumes[u].cal_max=B,this.onIntensityChange(this.volumes[u])}generateMouseUpCallback(u,h){const g=this.tileIndex(this.uiData.dragStart[0],this.uiData.dragStart[1]),S=this.tileIndex(this.uiData.dragEnd[0],this.uiData.dragEnd[1]);let v=-1;g===S&&(v=S);let w=-1;v>=0&&(w=this.screenSlices[v].axCorSag);const I=this.frac2mm(u),_=this.frac2mm(h),P=create$2();sub$1(P,fromValues$2(I[0],I[1],I[2]),fromValues$2(_[0],_[1],_[2]));const L=len(P),d=this.frac2vox(u),k=this.frac2vox(h);this.onDragRelease({fracStart:u,fracEnd:h,voxStart:d,voxEnd:k,mmStart:I,mmEnd:_,mmLength:L,tileIdx:v,axCorSag:w})}mouseUpListener(){function u(S){return Object.prototype.toString.call(S).indexOf("Function")>-1}const h={mouseButtonRightDown:this.uiData.mouseButtonRightDown,mouseButtonCenterDown:this.uiData.mouseButtonCenterDown,isDragging:this.uiData.isDragging,mousePos:this.mousePos,fracPos:this.canvasPos2frac(this.mousePos)};this.uiData.mousedown=!1,this.uiData.mouseButtonRightDown=!1;const g=this.uiData.mouseButtonCenterDown;if(this.uiData.mouseButtonCenterDown=!1,this.uiData.mouseButtonLeftDown=!1,this.drawPenFillPts.length>0?this.drawPenFilled():this.drawPenAxCorSag>=0&&this.drawAddUndoBitmap(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,u(this.onMouseUp)&&this.onMouseUp(h),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===5&&this.drawScene();const S=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),v=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);if(this.generateMouseUpCallback(S,v),this.opts.dragMode!==1||g||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;this.calculateNewRange({volIdx:0}),this.refreshLayers(this.volumes[0],0)}this.drawScene()}checkMultitouch(u){if(this.uiData.touchdown&&!this.uiData.multiTouchGesture){const h=this.canvas.getBoundingClientRect();this.mouseDown(u.touches[0].clientX-h.left,u.touches[0].clientY-h.top),this.mouseClick(u.touches[0].clientX-h.left,u.touches[0].clientY-h.top)}}touchStartListener(u){u.preventDefault(),this.uiData.touchTimer||(this.uiData.touchTimer=setTimeout(()=>{this.resetBriCon(u)},this.opts.longTouchTimeout)),this.uiData.touchdown=!0,this.uiData.currentTouchTime=new Date().getTime();const h=this.uiData.currentTouchTime-this.uiData.lastTouchTime;if(h0){this.uiData.doubleTouch=!0,this.setDragStart(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.resetBriCon(u),this.uiData.lastTouchTime=this.uiData.currentTouchTime;return}else this.uiData.doubleTouch=!1,this.setDragStart(0,0),this.setDragEnd(0,0),this.uiData.lastTouchTime=this.uiData.currentTouchTime;this.uiData.touchdown&&u.touches.length<2?this.uiData.multiTouchGesture=!1:this.uiData.multiTouchGesture=!0,setTimeout(this.checkMultitouch.bind(this),1,u)}touchEndListener(u){if(u.preventDefault(),this.uiData.touchdown=!1,this.uiData.lastTwoTouchDistance=0,this.uiData.multiTouchGesture=!1,this.uiData.touchTimer&&(clearTimeout(this.uiData.touchTimer),this.uiData.touchTimer=null),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===1&&(this.calculateNewRange(),this.refreshLayers(this.volumes[0],0));const h=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),g=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);this.generateMouseUpCallback(h,g)}this.mouseUpListener()}mouseMoveListener(u){if(this.uiData.mousedown){const h=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!h)return;const g=h.x*this.uiData.dpr,S=h.y*this.uiData.dpr;if(this.tileIndex(g,S)!==this.uiData.clickedTile)return;this.uiData.mouseButtonLeftDown?(this.mouseMove(h.x,h.y),this.mouseClick(h.x,h.y)):(this.uiData.mouseButtonRightDown||this.uiData.mouseButtonCenterDown)&&this.setDragEnd(h.x,h.y),this.drawScene(),this.uiData.prevX=this.uiData.currX,this.uiData.prevY=this.uiData.currY}}resetBriCon(u=null){if(this.uiData.isDragging)return;let h=!1;this.opts.sliceType===4&&(h=!0);let g=0,S=0;if(u!==null&&("targetTouches"in u?(g=u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,S=u.targetTouches[0].clientY-u.target.getBoundingClientRect().top):(g=u.offsetX,S=u.offsetY),g*=this.uiData.dpr,S*=this.uiData.dpr,this.inRenderTile(g,S)>=0&&(h=!0)),h){this.uiData.mouseDepthPicker=!0,this.drawScene(),this.drawScene();return}this.opts.dragMode!==4&&(this.volumes.length<1||this.uiData.doubleTouch||(this.volumes[0].cal_min=this.volumes[0].robust_min,this.volumes[0].cal_max=this.volumes[0].robust_max,this.onIntensityChange(this.volumes[0]),this.refreshLayers(this.volumes[0],0),this.drawScene()))}setDragStart(u,h){u*=this.uiData.dpr,h*=this.uiData.dpr,this.uiData.dragStart[0]=u,this.uiData.dragStart[1]=h}setDragEnd(u,h){u*=this.uiData.dpr,h*=this.uiData.dpr,this.uiData.dragEnd[0]=u,this.uiData.dragEnd[1]=h}touchMoveListener(u){if(this.uiData.touchdown&&u.touches.length<2){const h=this.canvas.getBoundingClientRect();if(this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.doubleTouch&&this.uiData.isDragging){this.setDragEnd(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.drawScene();return}this.mouseClick(u.touches[0].clientX-h.left,u.touches[0].clientY-h.top),this.mouseMove(u.touches[0].clientX-h.left,u.touches[0].clientY-h.top)}else this.handlePinchZoom(u)}handlePinchZoom(u){if(u.targetTouches.length===2&&u.changedTouches.length===2){const h=Math.hypot(u.touches[0].pageX-u.touches[1].pageX,u.touches[0].pageY-u.touches[1].pageY),g=this.canvas.getBoundingClientRect();this.mousePos=[u.touches[0].clientX-g.left,u.touches[0].clientY-g.top],hthis.opts.keyDebounceTime){switch(this.currentClipPlaneIndex=(this.currentClipPlaneIndex+1)%7,this.currentClipPlaneIndex){case 0:this.scene.clipPlaneDepthAziElev=[2,0,0];break;case 1:this.scene.clipPlaneDepthAziElev=[0,270,0];break;case 2:this.scene.clipPlaneDepthAziElev=[0,90,0];break;case 3:this.scene.clipPlaneDepthAziElev=[0,0,0];break;case 4:this.scene.clipPlaneDepthAziElev=[0,180,0];break;case 5:this.scene.clipPlaneDepthAziElev=[0,0,-90];break;case 6:this.scene.clipPlaneDepthAziElev=[0,0,90];break}this.setClipPlane(this.scene.clipPlaneDepthAziElev)}this.lastCalled=h}else if(u.code===this.opts.viewModeHotKey){const h=new Date().getTime();h-this.lastCalled>this.opts.keyDebounceTime&&(this.setSliceType((this.opts.sliceType+1)%5),this.lastCalled=h)}}keyDownListener(u){u.code==="KeyH"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth-1,this.scene.renderElevation):u.code==="KeyL"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth+1,this.scene.renderElevation):u.code==="KeyJ"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation+1):u.code==="KeyK"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation-1):u.code==="KeyH"&&this.opts.sliceType!==4?this.moveCrosshairInVox(-1,0,0):u.code==="KeyL"&&this.opts.sliceType!==4?this.moveCrosshairInVox(1,0,0):u.code==="KeyU"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,1):u.code==="KeyD"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,-1):u.code==="KeyJ"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,-1,0):u.code==="KeyK"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,1,0):u.code==="KeyM"&&this.opts.sliceType!==4?(this.opts.dragMode++,this.opts.dragMode>=4&&(this.opts.dragMode=0),log.info("drag mode changed to ",DRAG_MODE[this.opts.dragMode])):u.code==="ArrowLeft"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D-1):u.code==="ArrowRight"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D+1):u.code==="Slash"&&u.shiftKey&&alert(`NIIVUE VERSION: ${version}`)}wheelListener(u){if(u.preventDefault(),u.stopPropagation(),this.thumbnailVisible)return;const h=this.canvas.getBoundingClientRect();u.deltaY<0?this.sliceScroll2D(-.01,u.clientX-h.left,u.clientY-h.top):this.sliceScroll2D(.01,u.clientX-h.left,u.clientY-h.top)}registerInteractions(){if(!this.canvas)throw new Error("canvas undefined");this.canvas.addEventListener("mousedown",this.mouseDownListener.bind(this)),this.canvas.addEventListener("mouseup",this.mouseUpListener.bind(this)),this.canvas.addEventListener("mousemove",this.mouseMoveListener.bind(this)),this.canvas.addEventListener("touchstart",this.touchStartListener.bind(this)),this.canvas.addEventListener("touchend",this.touchEndListener.bind(this)),this.canvas.addEventListener("touchmove",this.touchMoveListener.bind(this)),this.canvas.addEventListener("wheel",this.wheelListener.bind(this)),this.canvas.addEventListener("contextmenu",this.mouseContextMenuListener.bind(this)),this.canvas.addEventListener("dblclick",this.resetBriCon.bind(this)),this.canvas.addEventListener("dragenter",this.dragEnterListener.bind(this),!1),this.canvas.addEventListener("dragover",this.dragOverListener.bind(this),!1),this.canvas.addEventListener("drop",this.dropListener.bind(this),!1),this.canvas.setAttribute("tabindex","0"),this.canvas.addEventListener("keyup",this.keyUpListener.bind(this),!1),this.canvas.addEventListener("keydown",this.keyDownListener.bind(this),!1)}dragEnterListener(u){u.stopPropagation(),u.preventDefault()}dragOverListener(u){u.stopPropagation(),u.preventDefault()}getFileExt(u,h=!0){log.debug("fullname: ",u);const g=/(?:\.([^.]+))?$/;let S=g.exec(u)[1];return S=S.toUpperCase(),S==="GZ"&&(S=g.exec(u.slice(0,-3))[1],S=S.toUpperCase()),h?S:S.toLowerCase()}async addVolumeFromUrl(u){const h=await NVImage.loadFromUrl(u);return this.document.addImageOptions(h,u),h.onColormapChange=this.onColormapChange,this.mediaUrlMap.set(h,u.url),this.onVolumeAddedFromUrl&&this.onVolumeAddedFromUrl(u,h),this.addVolume(h),h}async addVolumesFromUrl(u){const h=u.map(async S=>{const v={url:S.url,headers:S.headers,name:S.name,colormap:S.colormap?S.colormap:S.colorMap,colormapNegative:S.colormapNegative?S.colormapNegative:S.colorMapNegative,opacity:S.opacity,urlImgData:S.urlImgData,cal_min:S.cal_min,cal_max:S.cal_max,trustCalMinMax:this.opts.trustCalMinMax,isManifest:S.isManifest,frame4D:S.frame4D,limitFrames4D:S.limitFrames4D||this.opts.limitFrames4D,colorbarVisible:S.colorbarVisible},w=await NVImage.loadFromUrl(v);return this.document.addImageOptions(w,v),w.onColormapChange=this.onColormapChange,this.mediaUrlMap.set(w,v.url),this.onVolumeAddedFromUrl&&this.onVolumeAddedFromUrl(v,w),w}),g=await Promise.all(h);for(let S=0;Sh[1]===u).map(h=>h[0]).pop()}removeVolumeByUrl(u){const h=this.getMediaByUrl(u);if(h)this.removeVolume(h);else throw new Error("No volume with URL present")}readDirectory(u){const h=u.createReader();let g=[];const S=async w=>{const I=[],_=async P=>new Promise((L,d)=>P.file(L,d));for(let P=0;P{h.readEntries(w=>{w.length?(g=g.concat(w),v()):S(g).then(I=>{NVImage.loadFromFile({file:I,name:u.name,urlImgData:null,imageType:NVIMAGE_TYPE.DCM_FOLDER}).then(_=>{this.addVolume(_),this.setDrawingEnabled(!0)}).catch(_=>{throw _})}).catch(I=>{throw I})})};return v(),g}isMeshExt(u){const h=this.getFileExt(u);return log.debug("dropped ext"),log.debug(h),MESH_EXTENSIONS.includes(h)}async loadFromArrayBuffer(u,h){const g=this.getFileExt(h);if(MESH_EXTENSIONS.includes(g)){await this.addMeshFromUrl({url:h,buffer:u});return}const S=NVImageFromUrlOptions(h);S.buffer=u,S.name=h,await this.addVolumeFromUrl(S)}async loadFromFile(u){const h=this.getFileExt(u.name);if(MESH_EXTENSIONS.includes(h)){await NVMesh2.loadFromFile({file:u,gl:this.gl,name:u.name}).then(g=>{this.addMesh(g)});return}await NVImage.loadFromFile({file:u,name:u.name}).then(g=>{this.addVolume(g)})}dropListener(u){if(u.stopPropagation(),u.preventDefault(),!this.opts.dragAndDropEnabled)return;const h=u.dataTransfer;if(!h)return;const g=h.getData("text/uri-list");if(g){const S=NVImageFromUrlOptions(g),v=this.getFileExt(g);log.debug("dropped ext"),log.debug(v),MESH_EXTENSIONS.includes(v)?this.addMeshFromUrl({url:g}).catch(w=>{throw w}):v==="NVD"?this.loadDocumentFromUrl(g).catch(w=>{throw w}):this.addVolumeFromUrl(S).catch(w=>{throw w})}else{const S=h.items;if(S.length>0){!u.shiftKey&&!u.altKey&&(this.volumes=[],this.overlays=[],this.meshes=[]),this.closeDrawing();for(const v of Array.from(S)){const w=v.webkitGetAsEntry();if(log.debug(w),!w)throw new Error("could not get entry from file");if(w.isFile){const I=this.getFileExt(w.name);if(I==="PNG"){w.file(P=>{this.loadBmpTexture(P).catch(L=>{throw L})});continue}let _;if(w.name.lastIndexOf("HEAD")!==-1)for(const P of Array.from(S)){const L=P.webkitGetAsEntry();if(!L)throw new Error("could not get paired entry");const d=w.name.substring(0,w.name.lastIndexOf("HEAD")),k=L.name.substring(0,L.name.lastIndexOf("BRIK"));d===k&&(_=L)}if(w.name.lastIndexOf("BRIK")!==-1)continue;if(MESH_EXTENSIONS.includes(I)){w.file(P=>{NVMesh2.loadFromFile({file:P,gl:this.gl,name:P.name}).then(L=>{this.addMesh(L)}).catch(L=>{throw L})});continue}else if(I==="NVD"){w.file(P=>{NVDocument.loadFromFile(P).then(L=>{this.loadDocument(L),log.debug("loaded document")}).catch(L=>{throw L})});break}w.file(P=>{_?_.file(L=>{NVImage.loadFromFile({file:P,urlImgData:L,limitFrames4D:this.opts.limitFrames4D}).then(d=>{this.addVolume(d)}).catch(d=>{throw d})}):NVImage.loadFromFile({file:P,urlImgData:_,limitFrames4D:this.opts.limitFrames4D}).then(L=>{u.altKey?(log.debug("alt key detected: assuming this is a drawing overlay"),this.drawClearAllUndoBitmaps(),this.loadDrawing(L)):this.addVolume(L)}).catch(L=>{throw L})})}else w.isDirectory&&this.readDirectory(w)}}}this.drawScene()}setMultiplanarPadPixels(u){this.opts.multiplanarPadPixels=u,this.drawScene()}setMultiplanarLayout(u){typeof u=="string"&&(u=parseInt(u)),this.opts.multiplanarLayout=u,this.drawScene()}setCornerOrientationText(u){this.opts.isCornerOrientationText=u,this.updateGLVolume()}setRadiologicalConvention(u){this.opts.isRadiologicalConvention=u,this.updateGLVolume()}setDefaults(u={},h=!1){this.document.opts={...DEFAULT_OPTIONS},this.scene.sceneData={...INITIAL_SCENE_DATA};for(const g in u)typeof u[g]=="function"?this[g]=u[g]:this.opts[g]=DEFAULT_OPTIONS[g]===void 0?DEFAULT_OPTIONS[g]:u[g];if(this.scene.pan2Dxyzmm=[0,0,0,1],h&&this.volumes&&this.volumes.length>0)for(let g=0;g=this.opts.maxDrawUndoBitmaps&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap]=encodeRLE(this.drawBitmap)}drawClearAllUndoBitmaps(){if(this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,!(!this.drawUndoBitmaps||this.drawUndoBitmaps.length<1))for(let u=this.drawUndoBitmaps.length-1;u>=0;u--)this.drawUndoBitmaps[u]=new Uint8Array}drawUndo(){if(this.drawUndoBitmaps.length<1){log.debug("undo bitmaps not loaded");return}if(this.currentDrawUndoBitmap--,this.currentDrawUndoBitmap<0&&(this.currentDrawUndoBitmap=this.drawUndoBitmaps.length-1),this.currentDrawUndoBitmap>=this.drawUndoBitmaps.length&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap].length<2){log.debug("drawUndo is misbehaving");return}this.drawBitmap=decodeRLE(this.drawUndoBitmaps[this.currentDrawUndoBitmap],this.drawBitmap.length),this.refreshDrawing(!0)}loadDrawing(u){if(this.drawBitmap&&log.debug("Overwriting open drawing!"),!this.back)throw new Error("back undefined");this.drawClearAllUndoBitmaps();const h=u.hdr.dims;if(h[1]!==this.back.hdr.dims[1]||h[2]!==this.back.hdr.dims[2]||h[3]!==this.back.hdr.dims[3])return log.debug("drawing dimensions do not match background image"),!1;u.img.constructor!==Uint8Array&&log.debug("Drawings should be UINT8");const g=u.permRAS,S=h[1]*h[2]*h[3];this.drawBitmap=new Uint8Array(S),this.drawTexture=this.r8Tex(this.drawTexture,TEXTURE7_DRAW,this.back.dims,!0);const v=[0,0,0];for(let B=0;B<3;B++)for(let Q=0;Q<3;Q++)Math.abs(g[B])-1===Q&&(v[Q]=B*Math.sign(g[B]));let w=1;const I=[1,1,1],_=[!1,!1,!1];for(let B=0;BArray(S).fill(0)),B=Array(S).fill(0).map(()=>Array(S).fill(0));for(let j=1;j3)for(let j=0;jQ&&(i0[0]=j,i0[1]=H,i0[2]=y,Q=Y)}else if(u===3)for(let j=0;jQ&&(i0[0]=j,i0[1]=H,Q=y)}else for(let j=0;jQ&&(i0[0]=j,Q=H)}return[L(i0[0]),L(i0[1]),L(i0[2])]}drawOtsu(u=2){if(this.volumes.length===0)return;const h=this.volumes[0].img.length,g=this.findOtsu(u);if(g.length<3)return;this.drawBitmap||this.createEmptyDrawing();const S=this.drawBitmap,v=this.volumes[0].img;for(let w=0;wg[0]&&(S[w]=1),I>g[1]&&(S[w]=2),I>g[2]&&(S[w]=3)}this.drawAddUndoBitmap(),this.refreshDrawing(!0)}removeHaze(u=5,h=0){const g=this.volumes[h].img,S=this.volumes[h].hdr,v=g.length;let w=2;(u===5||u===1)&&(w=4),(u===4||u===2)&&(w=3);const I=this.findOtsu(w);if(I.length<3)return;let _=I[0];u===1&&(_=I[2]),u===2&&(_=I[1]);const P=S.scl_inter,L=S.scl_slope,d=this.volumes[h].global_min;for(let k=0;k=this.meshes.length?-1:u;const h=this.meshes.length;for(let g=0;gg)return;const S=this.getVolumeIndexByID(u.id);h===0?(this.volumes.splice(S,1),this.volumes.unshift(u),this.back=this.volumes[0],this.overlays=this.volumes.slice(1)):h<0?(this.volumes.splice(this.getVolumeIndexByID(u.id),1),this.back=this.volumes[0],this.volumes.length>1?this.overlays=this.volumes.slice(1):this.overlays=[]):(this.volumes.splice(S,1),this.volumes.splice(h,0,u),this.overlays=this.volumes.slice(1),this.back=this.volumes[0]),this.updateGLVolume()}setMesh(u,h=0){this.meshes.forEach(v=>{log.debug("MESH: ",v.name)});const g=this.meshes.length;if(h>g)return;const S=this.getMeshIndexByID(u.id);h===0?(this.meshes.splice(S,1),this.meshes.unshift(u)):h<0?this.meshes.splice(this.getMeshIndexByID(u.id),1):(this.meshes.splice(S,1),this.meshes.splice(h,0,u)),this.updateGLVolume(),this.meshes.forEach(v=>{log.debug(v.name)})}removeVolume(u){if(this.setVolume(u,-1),this.mediaUrlMap.has(u)){const h=this.mediaUrlMap.get(u);this.onVolumeWithUrlRemoved(h),this.mediaUrlMap.delete(u)}this.drawScene()}removeVolumeByIndex(u){if(u>=this.volumes.length)throw new Error("Index of volume out of bounds");this.removeVolume(this.volumes[u])}removeMesh(u){if(u.unloadMesh(this.gl),this.setMesh(u,-1),this.mediaUrlMap.has(u)){const h=this.mediaUrlMap.get(u);this.onMeshWithUrlRemoved(h),this.mediaUrlMap.delete(u)}}removeMeshByUrl(u){const h=this.getMediaByUrl(u);h&&(this.removeMesh(h),this.mediaUrlMap.delete(h),this.onMeshWithUrlRemoved(u))}moveVolumeToBottom(u){this.setVolume(u,0)}moveVolumeUp(u){const h=this.getVolumeIndexByID(u.id);this.setVolume(u,h+1)}moveVolumeDown(u){const h=this.getVolumeIndexByID(u.id);this.setVolume(u,h-1)}moveVolumeToTop(u){this.setVolume(u,this.volumes.length-1)}mouseDown(u,h){u*=this.uiData.dpr,h*=this.uiData.dpr,this.mousePos=[u,h]}mouseMove(u,h){u*=this.uiData.dpr,h*=this.uiData.dpr;const g=(u-this.mousePos[0])/this.uiData.dpr,S=(h-this.mousePos[1])/this.uiData.dpr;this.mousePos=[u,h],!(this.inRenderTile(u,h)<0)&&(Math.abs(g)<1&&Math.abs(S)<1||(this.scene.renderAzimuth+=g,this.scene.renderElevation+=S,this.drawScene()))}sph2cartDeg(u,h){const g=-h*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(g)*Math.cos(S),Math.cos(g)*Math.sin(S),Math.sin(g)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}setClipPlane(u){const h=this.sph2cartDeg(u[1]+180,u[2]);this.scene.clipPlane=[h[0],h[1],h[2],u[0]],this.scene.clipPlaneDepthAziElev=u,this.onClipPlaneChange(this.scene.clipPlane),this.drawScene()}setCrosshairColor(u){this.opts.crosshairColor=u,this.drawScene()}setCrosshairWidth(u){this.opts.crosshairWidth=u,this.crosshairs3D&&(this.crosshairs3D.mm[0]=NaN),this.drawScene()}setDrawColormap(u){this.drawLut=cmapper.makeDrawLut(u),this.updateGLVolume()}setDrawingEnabled(u){this.opts.drawingEnabled=u,this.opts.drawingEnabled&&(this.drawBitmap||this.createEmptyDrawing()),this.drawScene()}setPenValue(u,h=!1){this.opts.penValue=u,this.opts.isFilledPen=h,this.drawScene()}setDrawOpacity(u){this.drawOpacity=u,this.drawScene()}setSelectionBoxColor(u){this.opts.selectionBoxColor=u}sliceScroll2D(u,h,g,S=!0){if(this.inGraphTile(h,g)){let v=this.volumes[0].frame4D;u>0&&v++,u<0&&v--,this.setFrame4D(this.volumes[0].id,v);return}if(u!==0&&this.opts.dragMode===3&&this.inRenderTile(this.uiData.dpr*h,this.uiData.dpr*g)===-1){let v=this.scene.pan2Dxyzmm[3]*(1+10*u);v=Math.round(v*10)/10;const w=this.scene.pan2Dxyzmm[3]-v;this.opts.yoke3Dto2DZoom&&(this.scene.volScaleMultiplier=v),this.scene.pan2Dxyzmm[3]=v;const I=this.frac2mm(this.scene.crosshairPos);this.scene.pan2Dxyzmm[0]+=w*I[0],this.scene.pan2Dxyzmm[1]+=w*I[1],this.scene.pan2Dxyzmm[2]+=w*I[2],this.drawScene(),this.canvas.focus(),this.sync();return}this.mouseClick(h,g,u,S)}setSliceType(u){return this.opts.sliceType=u,this.drawScene(),this}setOpacity(u,h){if(this.volumes[u].opacity=h,u===0){this.drawScene();return}this.updateGLVolume()}setScale(u){this.scene.volScaleMultiplier=u,this.drawScene()}setClipPlaneColor(u){this.opts.clipPlaneColor=u,this.renderShader.use(this.gl),this.gl.uniform4fv(this.renderShader.uniforms.clipPlaneColor,this.opts.clipPlaneColor),this.drawScene()}setClipPlaneThick(u){this.opts.clipThick=u,this.renderShader.use(this.gl),this.gl.uniform1f(this.renderShader.uniforms.clipThick,this.opts.clipThick),this.drawScene()}setClipVolume(u,h){this.opts.clipVolumeLow=[Math.min(u[0],h[0]),Math.min(u[1],h[1]),Math.min(u[2],h[2])],this.opts.clipVolumeHigh=[Math.max(u[0],h[0]),Math.max(u[1],h[1]),Math.max(u[2],h[2])],this.renderShader.use(this.gl),this.gl.uniform3fv(this.renderShader.uniforms.clipLo,this.opts.clipVolumeLow),this.gl.uniform3fv(this.renderShader.uniforms.clipHi,this.opts.clipVolumeHigh),this.pickingImageShader.use(this.gl),this.gl.uniform3fv(this.pickingImageShader.uniforms.clipLo,this.opts.clipVolumeLow),this.gl.uniform3fv(this.pickingImageShader.uniforms.clipHi,this.opts.clipVolumeHigh),this.drawScene()}async setVolumeRenderIllumination(u=0){this.renderShader=this.renderVolumeShader,u>0&&(this.renderShader=this.renderGradientShader),u<0&&(this.renderShader=this.renderSliceShader),this.initRenderShader(this.renderShader,u),this.renderShader.use(this.gl),this.setClipPlaneColor(this.opts.clipPlaneColor),this.gradientTextureAmount=u,this.refreshLayers(this.volumes[0],0),this.drawScene()}overlayRGBA(u){const h=u.hdr,g=h.dims[1]*h.dims[2]*h.dims[3],S=new Uint8ClampedArray(g*4),v=.2*Math.min(Math.min(h.dims[1],h.dims[2]),h.dims[3]),w=.5*h.dims[1],I=.5*h.dims[2],_=.5*h.dims[3];let P=0;for(let L=0;L0&&(this.back=this.volumes[0]);const S=u.encodedDrawingBlob;if(S){const v=u.imageOptionsArray[0],w=NVImage.loadFromBase64({base64:S,...v});w&&this.loadDrawing(w)}for(const v of u.meshDataObjects??[]){const w={gl:this.gl,...v};v.offsetPt0&&(w.rgba255[3]=0,w.tris=new Uint32Array(v.offsetPt0)),log.debug(w);const I=new NVMesh2(w.pts,w.tris,w.name,w.rgba255,w.opacity,w.visible,this.gl,w.connectome,w.dpg,w.dps,w.dpv);v.offsetPt0&&(I.fiberGroupColormap=v.fiberGroupColormap,I.fiberColor=v.fiberColor,I.fiberDither=v.fiberDither,I.fiberRadius=v.fiberRadius,I.colormap=v.colormap),I.meshShaderIndex=w.meshShaderIndex,I.layers=w.layers,I.updateMesh(this.gl),log.debug(I),this.addMesh(I)}if(u.data.connectomes)for(const v of u.data.connectomes){const w=JSON.parse(v),I=this.loadConnectomeAsMesh(w);I.updateMesh(this.gl),this.addMesh(I)}return this.updateGLVolume(),this.drawScene(),this.onDocumentLoaded(u),this}async generateLoadDocumentJavaScript(u,h){const g=this.json(),S=await NVUtilities.compressToBase64String(JSON.stringify(g));return` + ${h} + + async function saveNiivueAsHtml(pageName) { + //get new docstring + const docString = nv1.json(); + const html = + document.getElementsByTagName("html")[0] + .innerHTML.replace(base64, await NVUtilities.compressToBase64String(JSON.stringify(docString))); + NVUtilities.download(html, pageName, "application/html"); + } + + var nv1 = new Niivue(); + nv1.attachTo("${u}"); + var base64 = "${S}"; + NVUtilities.decompressBase64String(base64).then((jsonText) => { + var json = JSON.parse(jsonText); // string -> JSON + var doc = NVDocument.loadFromJSON(json); + nv1.loadDocument(doc); + nv1.updateGLVolume(); + }); + + `}async generateHTML(u="gl1",h){return` + + + + + + Save as HTML + + + + +

+ Save the current scene as HTML + +
+
+ +
+ + + + +
+ + + + + + + +
+
+ +
+ + +