var CanvasKitInit = (() => { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; return ( function(CanvasKitInit) { CanvasKitInit = CanvasKitInit || {}; null;var Module=typeof CanvasKitInit!=="undefined"?CanvasKitInit:{};var objAssign=Object.assign;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});function Debug(msg){}var IsDebug=false;(function(CanvasKit){CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){CanvasKit.MakeSWCanvasSurface=function(idOrElement){var canvas=idOrElement;if(canvas.tagName!=="CANVAS"){canvas=document.getElementById(idOrElement);if(!canvas){throw"Canvas with id "+idOrElement+" was not found"}}var surface=CanvasKit.MakeSurface(canvas.width,canvas.height);if(surface){surface._canvas=canvas}return surface};if(!CanvasKit.MakeCanvasSurface){CanvasKit.MakeCanvasSurface=CanvasKit.MakeSWCanvasSurface}CanvasKit.MakeSurface=function(width,height){var imageInfo={"width":width,"height":height,"colorType":CanvasKit.ColorType.RGBA_8888,"alphaType":CanvasKit.AlphaType.Unpremul,"colorSpace":CanvasKit.ColorSpace.SRGB};var pixelLen=width*height*4;var pixelPtr=CanvasKit._malloc(pixelLen);var surface=CanvasKit.Surface._makeRasterDirect(imageInfo,pixelPtr,width*4);if(surface){surface._canvas=null;surface._width=width;surface._height=height;surface._pixelLen=pixelLen;surface._pixelPtr=pixelPtr;surface.getCanvas().clear(CanvasKit.TRANSPARENT)}return surface};CanvasKit.MakeRasterDirectSurface=function(imageInfo,mallocObj,bytesPerRow){return CanvasKit.Surface._makeRasterDirect(imageInfo,mallocObj["byteOffset"],bytesPerRow)};CanvasKit.Surface.prototype.flush=function(dirtyRect){CanvasKit.setCurrentContext(this._context);this._flush();if(this._canvas){var pixels=new Uint8ClampedArray(CanvasKit.HEAPU8.buffer,this._pixelPtr,this._pixelLen);var imageData=new ImageData(pixels,this._width,this._height);if(!dirtyRect){this._canvas.getContext("2d").putImageData(imageData,0,0)}else{this._canvas.getContext("2d").putImageData(imageData,0,0,dirtyRect[0],dirtyRect[1],dirtyRect[2]-dirtyRect[0],dirtyRect[3]-dirtyRect[1])}}};CanvasKit.Surface.prototype.dispose=function(){if(this._pixelPtr){CanvasKit._free(this._pixelPtr)}this.delete()};CanvasKit.setCurrentContext=CanvasKit.setCurrentContext||function(){}})})(Module);(function(CanvasKit){CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){function get(obj,attr,defaultValue){if(obj&&obj.hasOwnProperty(attr)){return obj[attr]}return defaultValue}CanvasKit.GetWebGLContext=function(canvas,attrs){if(!canvas){throw"null canvas passed into makeWebGLContext"}var contextAttributes={"alpha":get(attrs,"alpha",1),"depth":get(attrs,"depth",1),"stencil":get(attrs,"stencil",8),"antialias":get(attrs,"antialias",0),"premultipliedAlpha":get(attrs,"premultipliedAlpha",1),"preserveDrawingBuffer":get(attrs,"preserveDrawingBuffer",0),"preferLowPowerToHighPerformance":get(attrs,"preferLowPowerToHighPerformance",0),"failIfMajorPerformanceCaveat":get(attrs,"failIfMajorPerformanceCaveat",0),"enableExtensionsByDefault":get(attrs,"enableExtensionsByDefault",1),"explicitSwapControl":get(attrs,"explicitSwapControl",0),"renderViaOffscreenBackBuffer":get(attrs,"renderViaOffscreenBackBuffer",0)};if(attrs&&attrs["majorVersion"]){contextAttributes["majorVersion"]=attrs["majorVersion"]}else{contextAttributes["majorVersion"]=typeof WebGL2RenderingContext!=="undefined"?2:1}if(contextAttributes["explicitSwapControl"]){throw"explicitSwapControl is not supported"}var handle=GL.createContext(canvas,contextAttributes);if(!handle){return 0}GL.makeContextCurrent(handle);return handle};CanvasKit.deleteContext=function(handle){GL.deleteContext(handle)};CanvasKit._setTextureCleanup({"deleteTexture":function(webglHandle,texHandle){var tex=GL.textures[texHandle];if(tex){GL.getContext(webglHandle).GLctx.deleteTexture(tex)}GL.textures[texHandle]=null}});CanvasKit.MakeGrContext=function(ctx){if(!this.setCurrentContext(ctx)){return null}var grCtx=this._MakeGrContext();if(!grCtx){return null}grCtx._context=ctx;return grCtx};CanvasKit.MakeOnScreenGLSurface=function(grCtx,w,h,colorspace){if(!this.setCurrentContext(grCtx._context)){return null}var surface=this._MakeOnScreenGLSurface(grCtx,w,h,colorspace);if(!surface){return null}surface._context=grCtx._context;return surface};CanvasKit.MakeRenderTarget=function(){var grCtx=arguments[0];if(!this.setCurrentContext(grCtx._context)){return null}var surface;if(arguments.length===3){surface=this._MakeRenderTargetWH(grCtx,arguments[1],arguments[2]);if(!surface){return null}}else if(arguments.length===2){surface=this._MakeRenderTargetII(grCtx,arguments[1]);if(!surface){return null}}else{Debug("Expected 2 or 3 params");return null}surface._context=grCtx._context;return surface};CanvasKit.MakeWebGLCanvasSurface=function(idOrElement,colorSpace,attrs){colorSpace=colorSpace||null;var canvas=idOrElement;var isHTMLCanvas=typeof HTMLCanvasElement!=="undefined"&&canvas instanceof HTMLCanvasElement;var isOffscreenCanvas=typeof OffscreenCanvas!=="undefined"&&canvas instanceof OffscreenCanvas;if(!isHTMLCanvas&&!isOffscreenCanvas){canvas=document.getElementById(idOrElement);if(!canvas){throw"Canvas with id "+idOrElement+" was not found"}}var ctx=this.GetWebGLContext(canvas,attrs);if(!ctx||ctx<0){throw"failed to create webgl context: err "+ctx}var grcontext=this.MakeGrContext(ctx);var surface=this.MakeOnScreenGLSurface(grcontext,canvas.width,canvas.height,colorSpace);if(!surface){Debug("falling back from GPU implementation to a SW based one");var newCanvas=canvas.cloneNode(true);var parent=canvas.parentNode;parent.replaceChild(newCanvas,canvas);newCanvas.classList.add("ck-replaced");return CanvasKit.MakeSWCanvasSurface(newCanvas)}return surface};CanvasKit.MakeCanvasSurface=CanvasKit.MakeWebGLCanvasSurface;function pushTexture(tex){var texHandle=GL.getNewId(GL.textures);GL.textures[texHandle]=tex;return texHandle}CanvasKit.Surface.prototype.makeImageFromTexture=function(tex,info){CanvasKit.setCurrentContext(this._context);var texHandle=pushTexture(tex);var img=this._makeImageFromTexture(this._context,texHandle,info);if(img){img._tex=texHandle}return img};function getHeight(src){return src["naturalHeight"]||src["videoHeight"]||src["displayHeight"]||src["height"]}function getWidth(src){return src["naturalWidth"]||src["videoWidth"]||src["displayWidth"]||src["width"]}CanvasKit.Surface.prototype.makeImageFromTextureSource=function(src,info){if(!info){info={"height":getHeight(src),"width":getWidth(src),"colorType":CanvasKit.ColorType.RGBA_8888,"alphaType":CanvasKit.AlphaType.Unpremul}}if(!info["colorSpace"]){info["colorSpace"]=CanvasKit.ColorSpace.SRGB}if(info["colorType"]!==CanvasKit.ColorType.RGBA_8888){Debug("colorType currently has no impact on makeImageFromTextureSource")}CanvasKit.setCurrentContext(this._context);var glCtx=GL.currentContext.GLctx;var newTex=glCtx.createTexture();glCtx.bindTexture(glCtx.TEXTURE_2D,newTex);if(GL.currentContext.version===2){glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,info["width"],info["height"],0,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}else{glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}glCtx.bindTexture(glCtx.TEXTURE_2D,null);return this.makeImageFromTexture(newTex,info)};CanvasKit.Surface.prototype.updateTextureFromSource=function(img,src){if(!img._tex){Debug("Image is not backed by a user-provided texture");return}CanvasKit.setCurrentContext(this._context);var glCtx=GL.currentContext.GLctx;var tex=GL.textures[img._tex];glCtx.bindTexture(glCtx.TEXTURE_2D,tex);if(GL.currentContext.version===2){glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,getWidth(src),getHeight(src),0,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}else{glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}glCtx.bindTexture(glCtx.TEXTURE_2D,null);this._resetContext();GL.textures[img._tex]=null;img._tex=pushTexture(tex);var ii=img.getImageInfo();ii["colorSpace"]=img.getColorSpace();var newImg=this._makeImageFromTexture(this._context,img._tex,ii);var oldPtr=img.$$.ptr;var oldSmartPtr=img.$$.smartPtr;img.$$.ptr=newImg.$$.ptr;img.$$.smartPtr=newImg.$$.smartPtr;newImg.$$.ptr=oldPtr;newImg.$$.smartPtr=oldSmartPtr;newImg.delete();ii["colorSpace"].delete()};CanvasKit.MakeLazyImageFromTextureSource=function(src,info){if(!info){info={"height":getHeight(src),"width":getWidth(src),"colorType":CanvasKit.ColorType.RGBA_8888,"alphaType":CanvasKit.AlphaType.Unpremul}}if(!info["colorSpace"]){info["colorSpace"]=CanvasKit.ColorSpace.SRGB}if(info["colorType"]!==CanvasKit.ColorType.RGBA_8888){Debug("colorType currently has no impact on MakeLazyImageFromTextureSource")}var callbackObj={"makeTexture":function(){var ctx=GL.currentContext;var glCtx=ctx.GLctx;var newTex=glCtx.createTexture();glCtx.bindTexture(glCtx.TEXTURE_2D,newTex);if(ctx.version===2){glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,info["width"],info["height"],0,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}else{glCtx.texImage2D(glCtx.TEXTURE_2D,0,glCtx.RGBA,glCtx.RGBA,glCtx.UNSIGNED_BYTE,src)}glCtx.bindTexture(glCtx.TEXTURE_2D,null);return pushTexture(newTex)},"freeSrc":function(){}};if(src.constructor.name==="VideoFrame"){callbackObj["freeSrc"]=function(){src.close()}}return CanvasKit.Image._makeFromGenerator(info,callbackObj)};CanvasKit.setCurrentContext=function(ctx){if(!ctx){return false}return GL.makeContextCurrent(ctx)}})})(Module);(function(CanvasKit){CanvasKit.Color=function(r,g,b,a){if(a===undefined){a=1}return CanvasKit.Color4f(clamp(r)/255,clamp(g)/255,clamp(b)/255,a)};CanvasKit.ColorAsInt=function(r,g,b,a){if(a===undefined){a=255}return(clamp(a)<<24|clamp(r)<<16|clamp(g)<<8|clamp(b)<<0&268435455)>>>0};CanvasKit.Color4f=function(r,g,b,a){if(a===undefined){a=1}return Float32Array.of(r,g,b,a)};Object.defineProperty(CanvasKit,"TRANSPARENT",{get:function(){return CanvasKit.Color4f(0,0,0,0)}});Object.defineProperty(CanvasKit,"BLACK",{get:function(){return CanvasKit.Color4f(0,0,0,1)}});Object.defineProperty(CanvasKit,"WHITE",{get:function(){return CanvasKit.Color4f(1,1,1,1)}});Object.defineProperty(CanvasKit,"RED",{get:function(){return CanvasKit.Color4f(1,0,0,1)}});Object.defineProperty(CanvasKit,"GREEN",{get:function(){return CanvasKit.Color4f(0,1,0,1)}});Object.defineProperty(CanvasKit,"BLUE",{get:function(){return CanvasKit.Color4f(0,0,1,1)}});Object.defineProperty(CanvasKit,"YELLOW",{get:function(){return CanvasKit.Color4f(1,1,0,1)}});Object.defineProperty(CanvasKit,"CYAN",{get:function(){return CanvasKit.Color4f(0,1,1,1)}});Object.defineProperty(CanvasKit,"MAGENTA",{get:function(){return CanvasKit.Color4f(1,0,1,1)}});CanvasKit.getColorComponents=function(color){return[Math.floor(color[0]*255),Math.floor(color[1]*255),Math.floor(color[2]*255),color[3]]};CanvasKit.parseColorString=function(colorStr,colorMap){colorStr=colorStr.toLowerCase();if(colorStr.startsWith("#")){var r,g,b,a=255;switch(colorStr.length){case 9:a=parseInt(colorStr.slice(7,9),16);case 7:r=parseInt(colorStr.slice(1,3),16);g=parseInt(colorStr.slice(3,5),16);b=parseInt(colorStr.slice(5,7),16);break;case 5:a=parseInt(colorStr.slice(4,5),16)*17;case 4:r=parseInt(colorStr.slice(1,2),16)*17;g=parseInt(colorStr.slice(2,3),16)*17;b=parseInt(colorStr.slice(3,4),16)*17;break}return CanvasKit.Color(r,g,b,a/255)}else if(colorStr.startsWith("rgba")){colorStr=colorStr.slice(5,-1);var nums=colorStr.split(",");return CanvasKit.Color(+nums[0],+nums[1],+nums[2],valueOrPercent(nums[3]))}else if(colorStr.startsWith("rgb")){colorStr=colorStr.slice(4,-1);var nums=colorStr.split(",");return CanvasKit.Color(+nums[0],+nums[1],+nums[2],valueOrPercent(nums[3]))}else if(colorStr.startsWith("gray(")){}else if(colorStr.startsWith("hsl")){}else if(colorMap){var nc=colorMap[colorStr];if(nc!==undefined){return nc}}Debug("unrecognized color "+colorStr);return CanvasKit.BLACK};function isCanvasKitColor(ob){if(!ob){return false}return ob.constructor===Float32Array&&ob.length===4}function toUint32Color(c){return(clamp(c[3]*255)<<24|clamp(c[0]*255)<<16|clamp(c[1]*255)<<8|clamp(c[2]*255)<<0)>>>0}function assureIntColors(arr){if(wasMalloced(arr)){return arr}else if(arr instanceof Float32Array){var count=Math.floor(arr.length/4);var result=new Uint32Array(count);for(var i=0;icont.length()){cont.delete();cont=meas.next();if(!cont){str=str.substring(0,i);break}dist=width/2}cont.getPosTan(dist,xycs);var cx=xycs[0];var cy=xycs[1];var cosT=xycs[2];var sinT=xycs[3];var adjustedX=cx-width/2*cosT;var adjustedY=cy-width/2*sinT;rsx.push(cosT,sinT,adjustedX,adjustedY);dist+=width/2}var retVal=this.MakeFromRSXform(str,rsx,font);cont&&cont.delete();meas.delete();return retVal};CanvasKit.TextBlob.MakeFromRSXform=function(str,rsxForms,font){var strLen=lengthBytesUTF8(str)+1;var strPtr=CanvasKit._malloc(strLen);stringToUTF8(str,strPtr,strLen);var rPtr=copy1dArray(rsxForms,"HEAPF32");var blob=CanvasKit.TextBlob._MakeFromRSXform(strPtr,strLen-1,rPtr,font);CanvasKit._free(strPtr);if(!blob){Debug('Could not make textblob from string "'+str+'"');return null}return blob};CanvasKit.TextBlob.MakeFromRSXformGlyphs=function(glyphs,rsxForms,font){var glyphPtr=copy1dArray(glyphs,"HEAPU16");var bytesPerGlyph=2;var rPtr=copy1dArray(rsxForms,"HEAPF32");var blob=CanvasKit.TextBlob._MakeFromRSXformGlyphs(glyphPtr,glyphs.length*bytesPerGlyph,rPtr,font);freeArraysThatAreNotMallocedByUsers(glyphPtr,glyphs);if(!blob){Debug('Could not make textblob from glyphs "'+glyphs+'"');return null}return blob};CanvasKit.TextBlob.MakeFromGlyphs=function(glyphs,font){var glyphPtr=copy1dArray(glyphs,"HEAPU16");var bytesPerGlyph=2;var blob=CanvasKit.TextBlob._MakeFromGlyphs(glyphPtr,glyphs.length*bytesPerGlyph,font);freeArraysThatAreNotMallocedByUsers(glyphPtr,glyphs);if(!blob){Debug('Could not make textblob from glyphs "'+glyphs+'"');return null}return blob};CanvasKit.TextBlob.MakeFromText=function(str,font){var strLen=lengthBytesUTF8(str)+1;var strPtr=CanvasKit._malloc(strLen);stringToUTF8(str,strPtr,strLen);var blob=CanvasKit.TextBlob._MakeFromText(strPtr,strLen-1,font);CanvasKit._free(strPtr);if(!blob){Debug('Could not make textblob from string "'+str+'"');return null}return blob};CanvasKit.MallocGlyphIDs=function(numGlyphIDs){return CanvasKit.Malloc(Uint16Array,numGlyphIDs)}});CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){CanvasKit.MakePicture=function(data){data=new Uint8Array(data);var iptr=CanvasKit._malloc(data.byteLength);CanvasKit.HEAPU8.set(data,iptr);var pic=CanvasKit._MakePicture(iptr,data.byteLength);if(!pic){Debug("Could not decode picture");return null}return pic}});CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){CanvasKit.RuntimeEffect.Make=function(sksl,errorCallback){var callbackObj={"onError":errorCallback||function(err){console.log("RuntimeEffect error",err)}};return CanvasKit.RuntimeEffect._Make(sksl,callbackObj)};CanvasKit.RuntimeEffect.prototype.makeShader=function(floats,isOpaque,localMatrix){var fptr=copy1dArray(floats,"HEAPF32");var localMatrixPtr=copy3x3MatrixToWasm(localMatrix);return this._makeShader(fptr,floats.length*4,!!isOpaque,localMatrixPtr)};CanvasKit.RuntimeEffect.prototype.makeShaderWithChildren=function(floats,isOpaque,childrenShaders,localMatrix){var fptr=copy1dArray(floats,"HEAPF32");var localMatrixPtr=copy3x3MatrixToWasm(localMatrix);var barePointers=[];for(var i=0;i1){return}this._globalAlpha=newAlpha}});Object.defineProperty(this,"globalCompositeOperation",{enumerable:true,get:function(){switch(this._globalCompositeOperation){case CanvasKit.BlendMode.SrcOver:return"source-over";case CanvasKit.BlendMode.DstOver:return"destination-over";case CanvasKit.BlendMode.Src:return"copy";case CanvasKit.BlendMode.Dst:return"destination";case CanvasKit.BlendMode.Clear:return"clear";case CanvasKit.BlendMode.SrcIn:return"source-in";case CanvasKit.BlendMode.DstIn:return"destination-in";case CanvasKit.BlendMode.SrcOut:return"source-out";case CanvasKit.BlendMode.DstOut:return"destination-out";case CanvasKit.BlendMode.SrcATop:return"source-atop";case CanvasKit.BlendMode.DstATop:return"destination-atop";case CanvasKit.BlendMode.Xor:return"xor";case CanvasKit.BlendMode.Plus:return"lighter";case CanvasKit.BlendMode.Multiply:return"multiply";case CanvasKit.BlendMode.Screen:return"screen";case CanvasKit.BlendMode.Overlay:return"overlay";case CanvasKit.BlendMode.Darken:return"darken";case CanvasKit.BlendMode.Lighten:return"lighten";case CanvasKit.BlendMode.ColorDodge:return"color-dodge";case CanvasKit.BlendMode.ColorBurn:return"color-burn";case CanvasKit.BlendMode.HardLight:return"hard-light";case CanvasKit.BlendMode.SoftLight:return"soft-light";case CanvasKit.BlendMode.Difference:return"difference";case CanvasKit.BlendMode.Exclusion:return"exclusion";case CanvasKit.BlendMode.Hue:return"hue";case CanvasKit.BlendMode.Saturation:return"saturation";case CanvasKit.BlendMode.Color:return"color";case CanvasKit.BlendMode.Luminosity:return"luminosity"}},set:function(newMode){switch(newMode){case"source-over":this._globalCompositeOperation=CanvasKit.BlendMode.SrcOver;break;case"destination-over":this._globalCompositeOperation=CanvasKit.BlendMode.DstOver;break;case"copy":this._globalCompositeOperation=CanvasKit.BlendMode.Src;break;case"destination":this._globalCompositeOperation=CanvasKit.BlendMode.Dst;break;case"clear":this._globalCompositeOperation=CanvasKit.BlendMode.Clear;break;case"source-in":this._globalCompositeOperation=CanvasKit.BlendMode.SrcIn;break;case"destination-in":this._globalCompositeOperation=CanvasKit.BlendMode.DstIn;break;case"source-out":this._globalCompositeOperation=CanvasKit.BlendMode.SrcOut;break;case"destination-out":this._globalCompositeOperation=CanvasKit.BlendMode.DstOut;break;case"source-atop":this._globalCompositeOperation=CanvasKit.BlendMode.SrcATop;break;case"destination-atop":this._globalCompositeOperation=CanvasKit.BlendMode.DstATop;break;case"xor":this._globalCompositeOperation=CanvasKit.BlendMode.Xor;break;case"lighter":this._globalCompositeOperation=CanvasKit.BlendMode.Plus;break;case"plus-lighter":this._globalCompositeOperation=CanvasKit.BlendMode.Plus;break;case"plus-darker":throw"plus-darker is not supported";case"multiply":this._globalCompositeOperation=CanvasKit.BlendMode.Multiply;break;case"screen":this._globalCompositeOperation=CanvasKit.BlendMode.Screen;break;case"overlay":this._globalCompositeOperation=CanvasKit.BlendMode.Overlay;break;case"darken":this._globalCompositeOperation=CanvasKit.BlendMode.Darken;break;case"lighten":this._globalCompositeOperation=CanvasKit.BlendMode.Lighten;break;case"color-dodge":this._globalCompositeOperation=CanvasKit.BlendMode.ColorDodge;break;case"color-burn":this._globalCompositeOperation=CanvasKit.BlendMode.ColorBurn;break;case"hard-light":this._globalCompositeOperation=CanvasKit.BlendMode.HardLight;break;case"soft-light":this._globalCompositeOperation=CanvasKit.BlendMode.SoftLight;break;case"difference":this._globalCompositeOperation=CanvasKit.BlendMode.Difference;break;case"exclusion":this._globalCompositeOperation=CanvasKit.BlendMode.Exclusion;break;case"hue":this._globalCompositeOperation=CanvasKit.BlendMode.Hue;break;case"saturation":this._globalCompositeOperation=CanvasKit.BlendMode.Saturation;break;case"color":this._globalCompositeOperation=CanvasKit.BlendMode.Color;break;case"luminosity":this._globalCompositeOperation=CanvasKit.BlendMode.Luminosity;break;default:return}this._paint.setBlendMode(this._globalCompositeOperation)}});Object.defineProperty(this,"imageSmoothingEnabled",{enumerable:true,get:function(){return true},set:function(a){}});Object.defineProperty(this,"imageSmoothingQuality",{enumerable:true,get:function(){return"high"},set:function(a){}});Object.defineProperty(this,"lineCap",{enumerable:true,get:function(){switch(this._paint.getStrokeCap()){case CanvasKit.StrokeCap.Butt:return"butt";case CanvasKit.StrokeCap.Round:return"round";case CanvasKit.StrokeCap.Square:return"square"}},set:function(newCap){switch(newCap){case"butt":this._paint.setStrokeCap(CanvasKit.StrokeCap.Butt);return;case"round":this._paint.setStrokeCap(CanvasKit.StrokeCap.Round);return;case"square":this._paint.setStrokeCap(CanvasKit.StrokeCap.Square);return}}});Object.defineProperty(this,"lineDashOffset",{enumerable:true,get:function(){return this._lineDashOffset},set:function(newOffset){if(!isFinite(newOffset)){return}this._lineDashOffset=newOffset}});Object.defineProperty(this,"lineJoin",{enumerable:true,get:function(){switch(this._paint.getStrokeJoin()){case CanvasKit.StrokeJoin.Miter:return"miter";case CanvasKit.StrokeJoin.Round:return"round";case CanvasKit.StrokeJoin.Bevel:return"bevel"}},set:function(newJoin){switch(newJoin){case"miter":this._paint.setStrokeJoin(CanvasKit.StrokeJoin.Miter);return;case"round":this._paint.setStrokeJoin(CanvasKit.StrokeJoin.Round);return;case"bevel":this._paint.setStrokeJoin(CanvasKit.StrokeJoin.Bevel);return}}});Object.defineProperty(this,"lineWidth",{enumerable:true,get:function(){return this._paint.getStrokeWidth()},set:function(newWidth){if(newWidth<=0||!newWidth){return}this._strokeWidth=newWidth;this._paint.setStrokeWidth(newWidth)}});Object.defineProperty(this,"miterLimit",{enumerable:true,get:function(){return this._paint.getStrokeMiter()},set:function(newLimit){if(newLimit<=0||!newLimit){return}this._paint.setStrokeMiter(newLimit)}});Object.defineProperty(this,"shadowBlur",{enumerable:true,get:function(){return this._shadowBlur},set:function(newBlur){if(newBlur<0||!isFinite(newBlur)){return}this._shadowBlur=newBlur}});Object.defineProperty(this,"shadowColor",{enumerable:true,get:function(){return colorToString(this._shadowColor)},set:function(newColor){this._shadowColor=parseColor(newColor)}});Object.defineProperty(this,"shadowOffsetX",{enumerable:true,get:function(){return this._shadowOffsetX},set:function(newOffset){if(!isFinite(newOffset)){return}this._shadowOffsetX=newOffset}});Object.defineProperty(this,"shadowOffsetY",{enumerable:true,get:function(){return this._shadowOffsetY},set:function(newOffset){if(!isFinite(newOffset)){return}this._shadowOffsetY=newOffset}});Object.defineProperty(this,"strokeStyle",{enumerable:true,get:function(){return colorToString(this._strokeStyle)},set:function(newStyle){if(typeof newStyle==="string"){this._strokeStyle=parseColor(newStyle)}else if(newStyle._getShader){this._strokeStyle=newStyle}}});this.arc=function(x,y,radius,startAngle,endAngle,ccw){arc(this._currentPath,x,y,radius,startAngle,endAngle,ccw)};this.arcTo=function(x1,y1,x2,y2,radius){arcTo(this._currentPath,x1,y1,x2,y2,radius)};this.beginPath=function(){this._currentPath.delete();this._currentPath=new CanvasKit.Path};this.bezierCurveTo=function(cp1x,cp1y,cp2x,cp2y,x,y){bezierCurveTo(this._currentPath,cp1x,cp1y,cp2x,cp2y,x,y)};this.clearRect=function(x,y,width,height){this._paint.setStyle(CanvasKit.PaintStyle.Fill);this._paint.setBlendMode(CanvasKit.BlendMode.Clear);this._canvas.drawRect(CanvasKit.XYWHRect(x,y,width,height),this._paint);this._paint.setBlendMode(this._globalCompositeOperation)};this.clip=function(path,fillRule){if(typeof path==="string"){fillRule=path;path=this._currentPath}else if(path&&path._getPath){path=path._getPath()}if(!path){path=this._currentPath}var clip=path.copy();if(fillRule&&fillRule.toLowerCase()==="evenodd"){clip.setFillType(CanvasKit.FillType.EvenOdd)}else{clip.setFillType(CanvasKit.FillType.Winding)}this._canvas.clipPath(clip,CanvasKit.ClipOp.Intersect,true);clip.delete()};this.closePath=function(){closePath(this._currentPath)};this.createImageData=function(){if(arguments.length===1){var oldData=arguments[0];var byteLength=4*oldData.width*oldData.height;return new ImageData(new Uint8ClampedArray(byteLength),oldData.width,oldData.height)}else if(arguments.length===2){var width=arguments[0];var height=arguments[1];var byteLength=4*width*height;return new ImageData(new Uint8ClampedArray(byteLength),width,height)}else{throw"createImageData expects 1 or 2 arguments, got "+arguments.length}};this.createLinearGradient=function(x1,y1,x2,y2){if(!allAreFinite(arguments)){return}var lcg=new LinearCanvasGradient(x1,y1,x2,y2);this._toCleanUp.push(lcg);return lcg};this.createPattern=function(image,repetition){var cp=new CanvasPattern(image,repetition);this._toCleanUp.push(cp);return cp};this.createRadialGradient=function(x1,y1,r1,x2,y2,r2){if(!allAreFinite(arguments)){return}var rcg=new RadialCanvasGradient(x1,y1,r1,x2,y2,r2);this._toCleanUp.push(rcg);return rcg};this.drawImage=function(img){if(img instanceof HTMLImage){img=img.getSkImage()}var iPaint=this._fillPaint();if(arguments.length===3||arguments.length===5){var destRect=CanvasKit.XYWHRect(arguments[1],arguments[2],arguments[3]||img.width(),arguments[4]||img.height());var srcRect=CanvasKit.XYWHRect(0,0,img.width(),img.height())}else if(arguments.length===9){var destRect=CanvasKit.XYWHRect(arguments[5],arguments[6],arguments[7],arguments[8]);var srcRect=CanvasKit.XYWHRect(arguments[1],arguments[2],arguments[3],arguments[4])}else{throw"invalid number of args for drawImage, need 3, 5, or 9; got "+arguments.length}this._canvas.drawImageRect(img,srcRect,destRect,iPaint,false);iPaint.dispose()};this.ellipse=function(x,y,radiusX,radiusY,rotation,startAngle,endAngle,ccw){ellipse(this._currentPath,x,y,radiusX,radiusY,rotation,startAngle,endAngle,ccw)};this._fillPaint=function(){var paint=this._paint.copy();paint.setStyle(CanvasKit.PaintStyle.Fill);if(isCanvasKitColor(this._fillStyle)){var alphaColor=CanvasKit.multiplyByAlpha(this._fillStyle,this._globalAlpha);paint.setColor(alphaColor)}else{var shader=this._fillStyle._getShader(this._currentTransform);paint.setColor(CanvasKit.Color(0,0,0,this._globalAlpha));paint.setShader(shader)}paint.dispose=function(){this.delete()};return paint};this.fill=function(path,fillRule){if(typeof path==="string"){fillRule=path;path=this._currentPath}else if(path&&path._getPath){path=path._getPath()}if(fillRule==="evenodd"){this._currentPath.setFillType(CanvasKit.FillType.EvenOdd)}else if(fillRule==="nonzero"||!fillRule){this._currentPath.setFillType(CanvasKit.FillType.Winding)}else{throw"invalid fill rule"}if(!path){path=this._currentPath}var fillPaint=this._fillPaint();var shadowPaint=this._shadowPaint(fillPaint);if(shadowPaint){this._canvas.save();this._applyShadowOffsetMatrix();this._canvas.drawPath(path,shadowPaint);this._canvas.restore();shadowPaint.dispose()}this._canvas.drawPath(path,fillPaint);fillPaint.dispose()};this.fillRect=function(x,y,width,height){var fillPaint=this._fillPaint();var shadowPaint=this._shadowPaint(fillPaint);if(shadowPaint){this._canvas.save();this._applyShadowOffsetMatrix();this._canvas.drawRect(CanvasKit.XYWHRect(x,y,width,height),shadowPaint);this._canvas.restore();shadowPaint.dispose()}this._canvas.drawRect(CanvasKit.XYWHRect(x,y,width,height),fillPaint);fillPaint.dispose()};this.fillText=function(text,x,y,maxWidth){var fillPaint=this._fillPaint();var blob=CanvasKit.TextBlob.MakeFromText(text,this._font);var shadowPaint=this._shadowPaint(fillPaint);if(shadowPaint){this._canvas.save();this._applyShadowOffsetMatrix();this._canvas.drawTextBlob(blob,x,y,shadowPaint);this._canvas.restore();shadowPaint.dispose()}this._canvas.drawTextBlob(blob,x,y,fillPaint);blob.delete();fillPaint.dispose()};this.getImageData=function(x,y,w,h){var pixels=this._canvas.readPixels(x,y,{"width":w,"height":h,"colorType":CanvasKit.ColorType.RGBA_8888,"alphaType":CanvasKit.AlphaType.Unpremul,"colorSpace":CanvasKit.ColorSpace.SRGB});if(!pixels){return null}return new ImageData(new Uint8ClampedArray(pixels.buffer),w,h)};this.getLineDash=function(){return this._lineDashList.slice()};this._mapToLocalCoordinates=function(pts){var inverted=CanvasKit.Matrix.invert(this._currentTransform);CanvasKit.Matrix.mapPoints(inverted,pts);return pts};this.isPointInPath=function(x,y,fillmode){var args=arguments;if(args.length===3){var path=this._currentPath}else if(args.length===4){var path=args[0];x=args[1];y=args[2];fillmode=args[3]}else{throw"invalid arg count, need 3 or 4, got "+args.length}if(!isFinite(x)||!isFinite(y)){return false}fillmode=fillmode||"nonzero";if(!(fillmode==="nonzero"||fillmode==="evenodd")){return false}var pts=this._mapToLocalCoordinates([x,y]);x=pts[0];y=pts[1];path.setFillType(fillmode==="nonzero"?CanvasKit.FillType.Winding:CanvasKit.FillType.EvenOdd);return path.contains(x,y)};this.isPointInStroke=function(x,y){var args=arguments;if(args.length===2){var path=this._currentPath}else if(args.length===3){var path=args[0];x=args[1];y=args[2]}else{throw"invalid arg count, need 2 or 3, got "+args.length}if(!isFinite(x)||!isFinite(y)){return false}var pts=this._mapToLocalCoordinates([x,y]);x=pts[0];y=pts[1];var temp=path.copy();temp.setFillType(CanvasKit.FillType.Winding);temp.stroke({"width":this.lineWidth,"miter_limit":this.miterLimit,"cap":this._paint.getStrokeCap(),"join":this._paint.getStrokeJoin(),"precision":.3});var retVal=temp.contains(x,y);temp.delete();return retVal};this.lineTo=function(x,y){lineTo(this._currentPath,x,y)};this.measureText=function(text){const ids=this._font.getGlyphIDs(text);const widths=this._font.getGlyphWidths(ids);let totalWidth=0;for(const w of widths){totalWidth+=w}return{"width":totalWidth}};this.moveTo=function(x,y){moveTo(this._currentPath,x,y)};this.putImageData=function(imageData,x,y,dirtyX,dirtyY,dirtyWidth,dirtyHeight){if(!allAreFinite([x,y,dirtyX,dirtyY,dirtyWidth,dirtyHeight])){return}if(dirtyX===undefined){this._canvas.writePixels(imageData.data,imageData.width,imageData.height,x,y);return}dirtyX=dirtyX||0;dirtyY=dirtyY||0;dirtyWidth=dirtyWidth||imageData.width;dirtyHeight=dirtyHeight||imageData.height;if(dirtyWidth<0){dirtyX=dirtyX+dirtyWidth;dirtyWidth=Math.abs(dirtyWidth)}if(dirtyHeight<0){dirtyY=dirtyY+dirtyHeight;dirtyHeight=Math.abs(dirtyHeight)}if(dirtyX<0){dirtyWidth=dirtyWidth+dirtyX;dirtyX=0}if(dirtyY<0){dirtyHeight=dirtyHeight+dirtyY;dirtyY=0}if(dirtyWidth<=0||dirtyHeight<=0){return}var img=CanvasKit.MakeImage({"width":imageData.width,"height":imageData.height,"alphaType":CanvasKit.AlphaType.Unpremul,"colorType":CanvasKit.ColorType.RGBA_8888,"colorSpace":CanvasKit.ColorSpace.SRGB},imageData.data,4*imageData.width);var src=CanvasKit.XYWHRect(dirtyX,dirtyY,dirtyWidth,dirtyHeight);var dst=CanvasKit.XYWHRect(x+dirtyX,y+dirtyY,dirtyWidth,dirtyHeight);var inverted=CanvasKit.Matrix.invert(this._currentTransform);this._canvas.save();this._canvas.concat(inverted);this._canvas.drawImageRect(img,src,dst,null,false);this._canvas.restore();img.delete()};this.quadraticCurveTo=function(cpx,cpy,x,y){quadraticCurveTo(this._currentPath,cpx,cpy,x,y)};this.rect=function(x,y,width,height){rect(this._currentPath,x,y,width,height)};this.resetTransform=function(){this._currentPath.transform(this._currentTransform);var inverted=CanvasKit.Matrix.invert(this._currentTransform);this._canvas.concat(inverted);this._currentTransform=this._canvas.getTotalMatrix()};this.restore=function(){var newState=this._canvasStateStack.pop();if(!newState){return}var combined=CanvasKit.Matrix.multiply(this._currentTransform,CanvasKit.Matrix.invert(newState.ctm));this._currentPath.transform(combined);this._paint.delete();this._paint=newState.paint;this._lineDashList=newState.ldl;this._strokeWidth=newState.sw;this._strokeStyle=newState.ss;this._fillStyle=newState.fs;this._shadowOffsetX=newState.sox;this._shadowOffsetY=newState.soy;this._shadowBlur=newState.sb;this._shadowColor=newState.shc;this._globalAlpha=newState.ga;this._globalCompositeOperation=newState.gco;this._lineDashOffset=newState.ldo;this._fontString=newState.fontstr;this._canvas.restore();this._currentTransform=this._canvas.getTotalMatrix()};this.rotate=function(radians){if(!isFinite(radians)){return}var inverted=CanvasKit.Matrix.rotated(-radians);this._currentPath.transform(inverted);this._canvas.rotate(radiansToDegrees(radians),0,0);this._currentTransform=this._canvas.getTotalMatrix()};this.save=function(){if(this._fillStyle._copy){var fs=this._fillStyle._copy();this._toCleanUp.push(fs)}else{var fs=this._fillStyle}if(this._strokeStyle._copy){var ss=this._strokeStyle._copy();this._toCleanUp.push(ss)}else{var ss=this._strokeStyle}this._canvasStateStack.push({ctm:this._currentTransform.slice(),ldl:this._lineDashList.slice(),sw:this._strokeWidth,ss:ss,fs:fs,sox:this._shadowOffsetX,soy:this._shadowOffsetY,sb:this._shadowBlur,shc:this._shadowColor,ga:this._globalAlpha,ldo:this._lineDashOffset,gco:this._globalCompositeOperation,paint:this._paint.copy(),fontstr:this._fontString});this._canvas.save()};this.scale=function(sx,sy){if(!allAreFinite(arguments)){return}var inverted=CanvasKit.Matrix.scaled(1/sx,1/sy);this._currentPath.transform(inverted);this._canvas.scale(sx,sy);this._currentTransform=this._canvas.getTotalMatrix()};this.setLineDash=function(dashes){for(var i=0;i1||!isFinite(offset)){throw"offset must be between 0 and 1 inclusively"}color=parseColor(color);var idx=this._pos.indexOf(offset);if(idx!==-1){this._colors[idx]=color}else{for(idx=0;idxoffset){break}}this._pos.splice(idx,0,offset);this._colors.splice(idx,0,color)}};this._copy=function(){var lcg=new LinearCanvasGradient(x1,y1,x2,y2);lcg._colors=this._colors.slice();lcg._pos=this._pos.slice();return lcg};this._dispose=function(){if(this._shader){this._shader.delete();this._shader=null}};this._getShader=function(currentTransform){var pts=[x1,y1,x2,y2];CanvasKit.Matrix.mapPoints(currentTransform,pts);var sx1=pts[0];var sy1=pts[1];var sx2=pts[2];var sy2=pts[3];this._dispose();this._shader=CanvasKit.Shader.MakeLinearGradient([sx1,sy1],[sx2,sy2],this._colors,this._pos,CanvasKit.TileMode.Clamp);return this._shader}}function arc(skpath,x,y,radius,startAngle,endAngle,ccw){ellipse(skpath,x,y,radius,radius,0,startAngle,endAngle,ccw)}function arcTo(skpath,x1,y1,x2,y2,radius){if(!allAreFinite([x1,y1,x2,y2,radius])){return}if(radius<0){throw"radii cannot be negative"}if(skpath.isEmpty()){skpath.moveTo(x1,y1)}skpath.arcToTangent(x1,y1,x2,y2,radius)}function bezierCurveTo(skpath,cp1x,cp1y,cp2x,cp2y,x,y){if(!allAreFinite([cp1x,cp1y,cp2x,cp2y,x,y])){return}if(skpath.isEmpty()){skpath.moveTo(cp1x,cp1y)}skpath.cubicTo(cp1x,cp1y,cp2x,cp2y,x,y)}function closePath(skpath){if(skpath.isEmpty()){return}var bounds=skpath.getBounds();if(bounds[3]-bounds[1]||bounds[2]-bounds[0]){skpath.close()}}function _ellipseHelper(skpath,x,y,radiusX,radiusY,startAngle,endAngle){var sweepDegrees=radiansToDegrees(endAngle-startAngle);var startDegrees=radiansToDegrees(startAngle);var oval=CanvasKit.LTRBRect(x-radiusX,y-radiusY,x+radiusX,y+radiusY);if(almostEqual(Math.abs(sweepDegrees),360)){var halfSweep=sweepDegrees/2;skpath.arcToOval(oval,startDegrees,halfSweep,false);skpath.arcToOval(oval,startDegrees+halfSweep,halfSweep,false);return}skpath.arcToOval(oval,startDegrees,sweepDegrees,false)}function ellipse(skpath,x,y,radiusX,radiusY,rotation,startAngle,endAngle,ccw){if(!allAreFinite([x,y,radiusX,radiusY,rotation,startAngle,endAngle])){return}if(radiusX<0||radiusY<0){throw"radii cannot be negative"}var tao=2*Math.PI;var newStartAngle=startAngle%tao;if(newStartAngle<0){newStartAngle+=tao}var delta=newStartAngle-startAngle;startAngle=newStartAngle;endAngle+=delta;if(!ccw&&endAngle-startAngle>=tao){endAngle=startAngle+tao}else if(ccw&&startAngle-endAngle>=tao){endAngle=startAngle-tao}else if(!ccw&&startAngle>endAngle){endAngle=startAngle+(tao-(startAngle-endAngle)%tao)}else if(ccw&&startAngle1||!isFinite(offset)){throw"offset must be between 0 and 1 inclusively"}color=parseColor(color);var idx=this._pos.indexOf(offset);if(idx!==-1){this._colors[idx]=color}else{for(idx=0;idxoffset){break}}this._pos.splice(idx,0,offset);this._colors.splice(idx,0,color)}};this._copy=function(){var rcg=new RadialCanvasGradient(x1,y1,r1,x2,y2,r2);rcg._colors=this._colors.slice();rcg._pos=this._pos.slice();return rcg};this._dispose=function(){if(this._shader){this._shader.delete();this._shader=null}};this._getShader=function(currentTransform){var pts=[x1,y1,x2,y2];CanvasKit.Matrix.mapPoints(currentTransform,pts);var sx1=pts[0];var sy1=pts[1];var sx2=pts[2];var sy2=pts[3];var sx=currentTransform[0];var sy=currentTransform[4];var scaleFactor=(Math.abs(sx)+Math.abs(sy))/2;var sr1=r1*scaleFactor;var sr2=r2*scaleFactor;this._dispose();this._shader=CanvasKit.Shader.MakeTwoPointConicalGradient([sx1,sy1],sr1,[sx2,sy2],sr2,this._colors,this._pos,CanvasKit.TileMode.Clamp);return this._shader}}})()})(Module);var moduleOverrides=objAssign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}var fs;var nodePath;var requireNodeFS;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}requireNodeFS=(()=>{if(!nodePath){fs=require("fs");nodePath=require("path")}});read_=function shell_read(filename,binary){requireNodeFS();filename=nodePath["normalize"](filename);return fs.readFileSync(filename,binary?null:"utf8")};readBinary=(filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret});readAsync=((filename,onload,onerror)=>{requireNodeFS();filename=nodePath["normalize"](filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})});if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=((status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)});Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=(url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText});if(ENVIRONMENT_IS_WORKER){readBinary=(url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)})}readAsync=((url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=(()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()});xhr.onerror=onerror;xhr.send(null)})}setWindowTitle=(title=>document.title=title)}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);objAssign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var tempRet0=0;var setTempRet0=value=>{tempRet0=value};var getTempRet0=()=>tempRet0;var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||134217728;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){{if(Module["onAbort"]){Module["onAbort"](what)}}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="canvaskit.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["bd"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["ed"];addOnInit(Module["asm"]["cd"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){getWasmTableEntry(func)()}else{getWasmTableEntry(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function getWasmTableEntry(funcPtr){return wasmTable.get(funcPtr)}function ___cxa_allocate_exception(size){return _malloc(size+16)+16}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-16;this.set_type=function(type){HEAP32[this.ptr+4>>2]=type};this.get_type=function(){return HEAP32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAP32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAP32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_fstat64(fd,buf){}function ___syscall_fstatat64(dirfd,path,buf,flags){}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_lstat64(path,buf){}function zeroMemory(address,size){HEAPU8.fill(0,address,address+size)}function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_memalign(65536,size);if(!ptr)return 0;zeroMemory(ptr,size);return ptr}function syscallMmap2(addr,len,prot,flags,fd,off){off<<=12;var ptr;var allocated=false;if((flags&16)!==0&&addr%65536!==0){return-28}if((flags&32)!==0){ptr=mmapAlloc(len);if(!ptr)return-48;allocated=true}else{return-52}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,prot:prot,flags:flags,offset:off};return ptr}function ___syscall_mmap2(addr,len,prot,flags,fd,off){return syscallMmap2(addr,len,prot,flags,fd,off)}function syscallMunmap(addr,len){var info=SYSCALLS.mappings[addr];if(len===0||!info){return-28}if(len===info.len){SYSCALLS.mappings[addr]=null;if(info.allocated){_free(info.malloc)}}return 0}function ___syscall_munmap(addr,len){return syscallMunmap(addr,len)}function ___syscall_open(path,flags,varargs){SYSCALLS.varargs=varargs}function ___syscall_stat64(path,buf){}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return function(){null;return body.apply(this,arguments)}}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationGroup=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if("undefined"===typeof FinalizationGroup){attachFinalizer=(handle=>handle);return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn("object already deleted: "+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=(handle=>{finalizationGroup.register(handle,handle.$$,handle.$$);return handle});detachFinalizer=(handle=>{finalizationGroup.unregister(handle.$$)});return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}var delayFunction=undefined;var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}return getWasmTableEntry(ptr).apply(null,args)}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=(()=>{throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)});whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function __embind_register_constant(name,type,value){name=readLatin1String(name);whenDependentTypesAreResolved([],[type],function(type){type=type[0];Module[name]=type["fromWireType"](value);return[]})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function _embind_repr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=(value=>value<>>bitshift)}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_smart_ptr(rawType,rawPointeeType,name,sharingPolicy,getPointeeSignature,rawGetPointee,constructorSignature,rawConstructor,shareSignature,rawShare,destructorSignature,rawDestructor){name=readLatin1String(name);rawGetPointee=embind__requireFunction(getPointeeSignature,rawGetPointee);rawConstructor=embind__requireFunction(constructorSignature,rawConstructor);rawShare=embind__requireFunction(shareSignature,rawShare);rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);whenDependentTypesAreResolved([rawType],[rawPointeeType],function(pointeeType){pointeeType=pointeeType[0];var registeredPointer=new RegisteredPointer(name,pointeeType.registeredClass,false,false,true,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor);return[registeredPointer]})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;ilengthBytesUTF8(value))}else{getLength=(()=>value.length)}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;iHEAPU16);shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=(()=>HEAPU32);shift=2}registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value==="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function __emscripten_throw_longjmp(){throw"longjmp"}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);HEAP32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}function __emval_allocateDestructors(destructorsRef){var destructors=[];HEAP32[destructorsRef>>2]=Emval.toHandle(destructors);return destructors}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_method(caller,handle,methodName,destructorsRef,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);return caller(handle,methodName,__emval_allocateDestructors(destructorsRef),args)}function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function emval_get_global(){if(typeof globalThis==="object"){return globalThis}function testGlobal(obj){obj["$$$embind_global$$$"]=obj;var success=typeof $$$embind_global$$$==="object"&&obj["$$$embind_global$$$"]===obj;if(!success){delete obj["$$$embind_global$$$"]}return success}if(typeof $$$embind_global$$$==="object"){return $$$embind_global$$$}if(typeof global==="object"&&testGlobal(global)){$$$embind_global$$$=global}else if(typeof self==="object"&&testGlobal(self)){$$$embind_global$$$=self}if(typeof $$$embind_global$$$==="object"){return $$$embind_global$$$}throw Error("unable to get global object.")}function __emval_get_global(name){if(name===0){return Emval.toHandle(emval_get_global())}else{name=getStringOrSymbol(name);return Emval.toHandle(emval_get_global()[name])}}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2)+i],"parameter "+i)}return a}var emval_registeredMethods=[];function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var argN=new Array(argCount-1);var invokerFunction=(handle,name,destructors,args)=>{var offset=0;for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function craftEmvalAllocator(argCount){var argsList=new Array(argCount+1);return function(constructor,argTypes,args){argsList[0]=constructor;for(var i=0;i>2)+i],"parameter "+i);argsList[i+1]=argType["readValueFromPointer"](args);args+=argType["argPackAdvance"]}var obj=new(constructor.bind.apply(constructor,argsList));return Emval.toHandle(obj)}}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=Emval.toValue(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_array(){return Emval.toHandle([])}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v))}function __emval_new_object(){return Emval.toHandle({})}function __emval_not(object){object=Emval.toValue(object);return!object}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value}function __emval_take_value(type,argv){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](argv);return Emval.toHandle(v)}function _abort(){abort("")}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=(()=>{var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6})}else _emscripten_get_now=(()=>performance.now());var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function __webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)};return 1}}function __webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)};return 1}}function __webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){ext["drawBuffersWEBGL"](n,bufs)};return 1}}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"))}var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){if(!canvas.getContextSafariWebGL2Fixed){canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=function(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver=="webgl"==gl instanceof WebGLRenderingContext?gl:null}}var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(context.version>=2){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query_webgl2")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query")}__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes("lose_context")&&!ext.includes("debug")){GLctx.getExtension(ext)}})}};function _emscripten_glActiveTexture(x0){GLctx["activeTexture"](x0)}function _emscripten_glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _emscripten_glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _emscripten_glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _emscripten_glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _emscripten_glBindSampler(unit,sampler){GLctx["bindSampler"](unit,GL.samplers[sampler])}function _emscripten_glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _emscripten_glBindVertexArray(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _emscripten_glBindVertexArrayOES(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _emscripten_glBlendColor(x0,x1,x2,x3){GLctx["blendColor"](x0,x1,x2,x3)}function _emscripten_glBlendEquation(x0){GLctx["blendEquation"](x0)}function _emscripten_glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _emscripten_glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){GLctx["blitFramebuffer"](x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)}function _emscripten_glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _emscripten_glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _emscripten_glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _emscripten_glClear(x0){GLctx["clear"](x0)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296}function _emscripten_glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx["deleteSampler"](sampler);sampler.name=0;GL.samplers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedBaseInstanceWEBGL(mode,first,count,instanceCount,baseInstance){GLctx.dibvbi["drawArraysInstancedBaseInstanceWEBGL"](mode,first,count,instanceCount,baseInstance)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode,count,type,offset,instanceCount,baseVertex,baseinstance){GLctx.dibvbi["drawElementsInstancedBaseVertexBaseInstanceWEBGL"](mode,count,type,offset,instanceCount,baseVertex,baseinstance)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}function _emscripten_glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)=="]"&&name.lastIndexOf("[")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex>2]}GLctx["invalidateFramebuffer"](target,list)}function _emscripten_glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateSubFramebuffer"](target,list,x,y,width,height)}function _emscripten_glIsSync(sync){return GLctx.isSync(GL.syncs[sync])}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}function _emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL(mode,firsts,counts,instanceCounts,baseInstances,drawCount){GLctx.mdibvbi["multiDrawArraysInstancedBaseInstanceWEBGL"](mode,HEAP32,firsts>>2,HEAP32,counts>>2,HEAP32,instanceCounts>>2,HEAPU32,baseInstances>>2,drawCount)}function _emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode,counts,type,offsets,instanceCounts,baseVertices,baseInstances,drawCount){GLctx.mdibvbi["multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL"](mode,HEAP32,counts>>2,type,HEAP32,offsets>>2,HEAP32,instanceCounts>>2,HEAP32,baseVertices>>2,HEAPU32,baseInstances>>2,drawCount)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glReadBuffer(x0){GLctx["readBuffer"](x0)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _emscripten_glSamplerParameteri(sampler,pname,param){GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function webglGetUniformLocation(location){var p=GLctx.currentProgram;if(p){var webglLoc=p.uniformLocsById[location];if(typeof webglLoc==="number"){p.uniformLocsById[location]=webglLoc=GLctx.getUniformLocation(p,p.uniformArrayNamesById[location]+(webglLoc>0?"["+webglLoc+"]":""))}return webglLoc}else{GL.recordError(1282)}}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1fv(webglGetUniformLocation(location),HEAPF32,value>>2,count);return}if(count<=288){var view=miniTempWebGLFloatBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1iv(webglGetUniformLocation(location),HEAP32,value>>2,count);return}if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(webglGetUniformLocation(location),v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(webglGetUniformLocation(location),v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2iv(webglGetUniformLocation(location),HEAP32,value>>2,count*2);return}if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(webglGetUniformLocation(location),v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(webglGetUniformLocation(location),v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3iv(webglGetUniformLocation(location),HEAP32,value>>2,count*3);return}if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(webglGetUniformLocation(location),view)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(webglGetUniformLocation(location),v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(webglGetUniformLocation(location),v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)}function _emscripten_glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_glWaitSync(sync,flags,timeoutLo,timeoutHi){GLctx.waitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}function _emscripten_webgl_get_current_context(){return _emscripten_webgl_do_get_current_context()}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator==="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}function _exit(status){exit(status)}function _fd_close(fd){return 0}function _fd_pread(fd,iov,iovcnt,offset_low,offset_high,pnum){var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt,offset_low);HEAP32[pnum>>2]=num;return 0}function _fd_read(fd,iov,iovcnt,pnum){var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAP32[iov+4>>2];iov+=8;for(var j=0;j>2]=num;return 0}function _getTempRet0(){return getTempRet0()}function _setTempRet0(val){setTempRet0(val)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_RegisteredPointer();init_embind();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"Z":___cxa_allocate_exception,"Y":___cxa_throw,"X":___syscall_fcntl64,"ad":___syscall_fstat64,"$c":___syscall_fstatat64,"_c":___syscall_ioctl,"Zc":___syscall_lstat64,"Yc":___syscall_mmap2,"Xc":___syscall_munmap,"W":___syscall_open,"Wc":___syscall_stat64,"w":__embind_finalize_value_object,"$":__embind_register_bigint,"Sc":__embind_register_bool,"m":__embind_register_class,"e":__embind_register_class_class_function,"x":__embind_register_class_constructor,"d":__embind_register_class_function,"U":__embind_register_constant,"Rc":__embind_register_emval,"l":__embind_register_enum,"k":__embind_register_enum_value,"T":__embind_register_float,"s":__embind_register_function,"z":__embind_register_integer,"q":__embind_register_memory_view,"o":__embind_register_smart_ptr,"S":__embind_register_std_string,"I":__embind_register_std_wstring,"v":__embind_register_value_object,"i":__embind_register_value_object_field,"Qc":__embind_register_void,"Pc":__emscripten_throw_longjmp,"C":__emval_as,"D":__emval_call_method,"B":__emval_call_void_method,"H":__emval_decref,"Oc":__emval_get_global,"y":__emval_get_method_caller,"R":__emval_get_property,"G":__emval_incref,"Nc":__emval_new,"Mc":__emval_new_array,"Lc":__emval_new_cstring,"Kc":__emval_new_object,"Jc":__emval_not,"Ic":__emval_run_destructors,"u":__emval_set_property,"t":__emval_take_value,"a":_abort,"Hc":_clock_gettime,"Gc":_emscripten_glActiveTexture,"Fc":_emscripten_glAttachShader,"Ec":_emscripten_glBindAttribLocation,"Dc":_emscripten_glBindBuffer,"Q":_emscripten_glBindFramebuffer,"Cc":_emscripten_glBindRenderbuffer,"Bc":_emscripten_glBindSampler,"Ac":_emscripten_glBindTexture,"zc":_emscripten_glBindVertexArray,"yc":_emscripten_glBindVertexArrayOES,"xc":_emscripten_glBlendColor,"wc":_emscripten_glBlendEquation,"vc":_emscripten_glBlendFunc,"uc":_emscripten_glBlitFramebuffer,"tc":_emscripten_glBufferData,"sc":_emscripten_glBufferSubData,"rc":_emscripten_glCheckFramebufferStatus,"P":_emscripten_glClear,"O":_emscripten_glClearColor,"N":_emscripten_glClearStencil,"qc":_emscripten_glClientWaitSync,"pc":_emscripten_glColorMask,"oc":_emscripten_glCompileShader,"nc":_emscripten_glCompressedTexImage2D,"mc":_emscripten_glCompressedTexSubImage2D,"lc":_emscripten_glCopyTexSubImage2D,"kc":_emscripten_glCreateProgram,"jc":_emscripten_glCreateShader,"ic":_emscripten_glCullFace,"hc":_emscripten_glDeleteBuffers,"gc":_emscripten_glDeleteFramebuffers,"fc":_emscripten_glDeleteProgram,"ec":_emscripten_glDeleteRenderbuffers,"dc":_emscripten_glDeleteSamplers,"cc":_emscripten_glDeleteShader,"bc":_emscripten_glDeleteSync,"ac":_emscripten_glDeleteTextures,"$b":_emscripten_glDeleteVertexArrays,"_b":_emscripten_glDeleteVertexArraysOES,"Zb":_emscripten_glDepthMask,"Yb":_emscripten_glDisable,"Xb":_emscripten_glDisableVertexAttribArray,"Wb":_emscripten_glDrawArrays,"Vb":_emscripten_glDrawArraysInstanced,"Ub":_emscripten_glDrawArraysInstancedBaseInstanceWEBGL,"Tb":_emscripten_glDrawBuffers,"Sb":_emscripten_glDrawElements,"Rb":_emscripten_glDrawElementsInstanced,"Qb":_emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL,"Pb":_emscripten_glDrawRangeElements,"Ob":_emscripten_glEnable,"Nb":_emscripten_glEnableVertexAttribArray,"Mb":_emscripten_glFenceSync,"Lb":_emscripten_glFinish,"Kb":_emscripten_glFlush,"Jb":_emscripten_glFramebufferRenderbuffer,"Ib":_emscripten_glFramebufferTexture2D,"Hb":_emscripten_glFrontFace,"Gb":_emscripten_glGenBuffers,"Fb":_emscripten_glGenFramebuffers,"Eb":_emscripten_glGenRenderbuffers,"Db":_emscripten_glGenSamplers,"Cb":_emscripten_glGenTextures,"Bb":_emscripten_glGenVertexArrays,"Ab":_emscripten_glGenVertexArraysOES,"zb":_emscripten_glGenerateMipmap,"yb":_emscripten_glGetBufferParameteriv,"xb":_emscripten_glGetError,"wb":_emscripten_glGetFramebufferAttachmentParameteriv,"F":_emscripten_glGetIntegerv,"vb":_emscripten_glGetProgramInfoLog,"ub":_emscripten_glGetProgramiv,"tb":_emscripten_glGetRenderbufferParameteriv,"sb":_emscripten_glGetShaderInfoLog,"rb":_emscripten_glGetShaderPrecisionFormat,"qb":_emscripten_glGetShaderiv,"M":_emscripten_glGetString,"pb":_emscripten_glGetStringi,"ob":_emscripten_glGetUniformLocation,"nb":_emscripten_glInvalidateFramebuffer,"mb":_emscripten_glInvalidateSubFramebuffer,"lb":_emscripten_glIsSync,"kb":_emscripten_glIsTexture,"jb":_emscripten_glLineWidth,"ib":_emscripten_glLinkProgram,"hb":_emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL,"gb":_emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL,"fb":_emscripten_glPixelStorei,"eb":_emscripten_glReadBuffer,"db":_emscripten_glReadPixels,"cb":_emscripten_glRenderbufferStorage,"bb":_emscripten_glRenderbufferStorageMultisample,"ab":_emscripten_glSamplerParameteri,"$a":_emscripten_glSamplerParameteriv,"_a":_emscripten_glScissor,"Za":_emscripten_glShaderSource,"Ya":_emscripten_glStencilFunc,"Xa":_emscripten_glStencilFuncSeparate,"Wa":_emscripten_glStencilMask,"Va":_emscripten_glStencilMaskSeparate,"Ua":_emscripten_glStencilOp,"Ta":_emscripten_glStencilOpSeparate,"Sa":_emscripten_glTexImage2D,"Ra":_emscripten_glTexParameterf,"Qa":_emscripten_glTexParameterfv,"Pa":_emscripten_glTexParameteri,"Oa":_emscripten_glTexParameteriv,"Na":_emscripten_glTexStorage2D,"Ma":_emscripten_glTexSubImage2D,"La":_emscripten_glUniform1f,"Ka":_emscripten_glUniform1fv,"Ja":_emscripten_glUniform1i,"Ia":_emscripten_glUniform1iv,"Ha":_emscripten_glUniform2f,"Ga":_emscripten_glUniform2fv,"Fa":_emscripten_glUniform2i,"Ea":_emscripten_glUniform2iv,"Da":_emscripten_glUniform3f,"Ca":_emscripten_glUniform3fv,"Ba":_emscripten_glUniform3i,"Aa":_emscripten_glUniform3iv,"za":_emscripten_glUniform4f,"ya":_emscripten_glUniform4fv,"xa":_emscripten_glUniform4i,"wa":_emscripten_glUniform4iv,"va":_emscripten_glUniformMatrix2fv,"ua":_emscripten_glUniformMatrix3fv,"ta":_emscripten_glUniformMatrix4fv,"sa":_emscripten_glUseProgram,"ra":_emscripten_glVertexAttrib1f,"qa":_emscripten_glVertexAttrib2fv,"pa":_emscripten_glVertexAttrib3fv,"oa":_emscripten_glVertexAttrib4fv,"na":_emscripten_glVertexAttribDivisor,"ma":_emscripten_glVertexAttribIPointer,"la":_emscripten_glVertexAttribPointer,"ka":_emscripten_glViewport,"ja":_emscripten_glWaitSync,"ia":_emscripten_resize_heap,"ha":_emscripten_webgl_get_current_context,"Vc":_environ_get,"Uc":_environ_sizes_get,"ga":_exit,"J":_fd_close,"ba":_fd_pread,"Tc":_fd_read,"aa":_fd_seek,"V":_fd_write,"b":_getTempRet0,"h":invoke_ii,"n":invoke_iii,"g":invoke_iiii,"A":invoke_iiiii,"fa":invoke_iiiiii,"L":invoke_iiiiiii,"K":invoke_iiiiiiiiii,"E":invoke_v,"j":invoke_vi,"r":invoke_vii,"f":invoke_viii,"p":invoke_viiii,"ea":invoke_viiiii,"da":invoke_viiiiii,"ca":invoke_viiiiiiiii,"c":_setTempRet0,"_":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["cd"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["dd"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["fd"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["gd"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["hd"]).apply(null,arguments)};var ___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=function(){return(___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=Module["asm"]["id"]).apply(null,arguments)};var _memalign=Module["_memalign"]=function(){return(_memalign=Module["_memalign"]=Module["asm"]["jd"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["kd"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["ld"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["md"]).apply(null,arguments)};var dynCall_iiiji=Module["dynCall_iiiji"]=function(){return(dynCall_iiiji=Module["dynCall_iiiji"]=Module["asm"]["nd"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["od"]).apply(null,arguments)};var dynCall_iiji=Module["dynCall_iiji"]=function(){return(dynCall_iiji=Module["dynCall_iiji"]=Module["asm"]["pd"]).apply(null,arguments)};var dynCall_iijjiii=Module["dynCall_iijjiii"]=function(){return(dynCall_iijjiii=Module["dynCall_iijjiii"]=Module["asm"]["qd"]).apply(null,arguments)};var dynCall_iij=Module["dynCall_iij"]=function(){return(dynCall_iij=Module["dynCall_iij"]=Module["asm"]["rd"]).apply(null,arguments)};var dynCall_vijjjii=Module["dynCall_vijjjii"]=function(){return(dynCall_vijjjii=Module["dynCall_vijjjii"]=Module["asm"]["sd"]).apply(null,arguments)};var dynCall_viji=Module["dynCall_viji"]=function(){return(dynCall_viji=Module["dynCall_viji"]=Module["asm"]["td"]).apply(null,arguments)};var dynCall_vijiii=Module["dynCall_vijiii"]=function(){return(dynCall_vijiii=Module["dynCall_vijiii"]=Module["asm"]["ud"]).apply(null,arguments)};var dynCall_viiiiij=Module["dynCall_viiiiij"]=function(){return(dynCall_viiiiij=Module["dynCall_viiiiij"]=Module["asm"]["vd"]).apply(null,arguments)};var dynCall_jii=Module["dynCall_jii"]=function(){return(dynCall_jii=Module["dynCall_jii"]=Module["asm"]["wd"]).apply(null,arguments)};var dynCall_iiij=Module["dynCall_iiij"]=function(){return(dynCall_iiij=Module["dynCall_iiij"]=Module["asm"]["xd"]).apply(null,arguments)};var dynCall_iiiij=Module["dynCall_iiiij"]=function(){return(dynCall_iiiij=Module["dynCall_iiiij"]=Module["asm"]["yd"]).apply(null,arguments)};var dynCall_viij=Module["dynCall_viij"]=function(){return(dynCall_viij=Module["dynCall_viij"]=Module["asm"]["zd"]).apply(null,arguments)};var dynCall_viiij=Module["dynCall_viiij"]=function(){return(dynCall_viiij=Module["dynCall_viiij"]=Module["asm"]["Ad"]).apply(null,arguments)};var dynCall_vij=Module["dynCall_vij"]=function(){return(dynCall_vij=Module["dynCall_vij"]=Module["asm"]["Bd"]).apply(null,arguments)};var dynCall_jiiii=Module["dynCall_jiiii"]=function(){return(dynCall_jiiii=Module["dynCall_jiiii"]=Module["asm"]["Cd"]).apply(null,arguments)};var dynCall_jiiiiii=Module["dynCall_jiiiiii"]=function(){return(dynCall_jiiiiii=Module["dynCall_jiiiiii"]=Module["asm"]["Dd"]).apply(null,arguments)};var dynCall_jiiiiji=Module["dynCall_jiiiiji"]=function(){return(dynCall_jiiiiji=Module["dynCall_jiiiiji"]=Module["asm"]["Ed"]).apply(null,arguments)};var dynCall_iijj=Module["dynCall_iijj"]=function(){return(dynCall_iijj=Module["dynCall_iijj"]=Module["asm"]["Fd"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["Gd"]).apply(null,arguments)};var dynCall_viijii=Module["dynCall_viijii"]=function(){return(dynCall_viijii=Module["dynCall_viijii"]=Module["asm"]["Hd"]).apply(null,arguments)};var dynCall_iiiiij=Module["dynCall_iiiiij"]=function(){return(dynCall_iiiiij=Module["dynCall_iiiiij"]=Module["asm"]["Id"]).apply(null,arguments)};var dynCall_iiiiijj=Module["dynCall_iiiiijj"]=function(){return(dynCall_iiiiijj=Module["dynCall_iiiiijj"]=Module["asm"]["Jd"]).apply(null,arguments)};var dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=function(){return(dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=Module["asm"]["Kd"]).apply(null,arguments)};function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){EXITSTATUS=status;if(keepRuntimeAlive()){}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); return CanvasKitInit.ready } ); })(); if (typeof exports === 'object' && typeof module === 'object') module.exports = CanvasKitInit; else if (typeof define === 'function' && define['amd']) define([], function() { return CanvasKitInit; }); else if (typeof exports === 'object') exports["CanvasKitInit"] = CanvasKitInit;