text: "use strict";window.g_aqN=class{constructor(c,a){this.g_aqO=c,this.g_aqP=a,this.g_aqQ=!1,this.g_act=()=>this.g_Gv()}g_aqR(){}g_aqS(e,a,b,c){this.g_aqO.g_aqT(this.g_aqP,e,a,!!b,c)}g_aqU(e,a,b,c){return this.g_aqO.g_aqV(this.g_aqP,e,a,!!b,c)}g_aqW(d,a,b){this.g_aqO.g_aqX()?this.g_aqS(d,a,b):this.g_aqO.g_aqY()._OnMessageFromDOM({type:"event",component:this.g_aqP,handler:d,dispatchRuntimeEvent:b,data:a,responseId:null})}g_aqZ(c,a){this.g_aqO.g_aq_(this.g_aqP,c,a)}g_aq$(d){for(const[a,b]of d)this.g_aqZ(a,b)}g_ara(){return this.g_aqO}g_arb(){return this.g_aqP}g_UM(){this.g_aqQ||(this.g_aqO.g_arc(this.g_act),this.g_aqQ=!0)}g_UA(){this.g_aqQ&&(this.g_aqO.g_ard(this.g_act),this.g_aqQ=!1)}g_Gv(){}},"use strict",window.g_are=class extends g_aqN{constructor(c,a){super(c,a),this.g_arf=new Map,this.g_arg=!0,this.g_aqZ("create",b=>this.g_arh(b)),this.g_aqZ("destroy",b=>this.g_ari(b)),this.g_aqZ("set-visible",b=>this.g_arj(b)),this.g_aqZ("update-position",b=>this.g_ark(b)),this.g_aqZ("update-state",b=>this.g_arl(b)),this.g_aqZ("focus",b=>this.g_arm(b)),this.g_aqZ("set-css-style",b=>this.g_arn(b))}g_aro(b){this.g_arg=!!b}g_arp(c,e){this.g_aqZ(c,b=>{const a=b.elementId,c=this.g_arf.get(a);return e(c,b)})}g_arh(d){const a=d.elementId,b=this.g_Vk(a,d);this.g_arf.set(a,b),this.g_arg&&document.body.appendChild(b)}g_Vk(){throw new Error("required override")}g_arq(){}g_ari(d){const a=d.elementId,b=this.g_arf.get(a);this.g_arq(b),this.g_arg&&b.parentElement.removeChild(b),this.g_arf.delete(a)}g_arr(d,a,b){b||(b={}),b.elementId=a,this.g_aqS(d,b)}g_ars(d,a,b){b||(b={}),b.elementId=a,this.g_aqW(d,b)}g_arj(c){if(this.g_arg){const a=this.g_arf.get(c.elementId);a.style.display=c.isVisible?"":"none"}}g_ark(d){if(this.g_arg){const a=this.g_arf.get(d.elementId);a.style.left=d.left+"px",a.style.top=d.top+"px",a.style.width=d.width+"px",a.style.height=d.height+"px";const b=d.fontSize;null!==b&&(a.style.fontSize=b+"em")}}g_arl(c){const a=this.g_arf.get(c.elementId);this.g_art(a,c)}g_art(){throw new Error("required override")}g_arm(c){const a=this.g_arf.get(c.elementId);c.focus?a.focus():a.blur()}g_arn(c){const a=this.g_arf.get(c.elementId);a.style[c.prop]=c.val}g_aru(b){return this.g_arf.get(b)}},"use strict";{function p(e){return new Promise((a,b)=>{const c=document.createElement("script");c.onload=a,c.onerror=b,c.async=!1,c.src=e,document.head.appendChild(c)})}function q(e){return new Promise((f,b)=>{const a=new FileReader;a.onload=b=>f(b.target.result),a.onerror=c=>b(c),a.readAsText(e)})}function r(e){return new Promise((f,b)=>{const a=new FileReader;a.onload=b=>f(b.target.result),a.onerror=c=>b(c),a.readAsArrayBuffer(e)})}function s(d){if(!d)return"";const a=d.split(".");if(2>a.length)return"";const b=a[a.length-1].toLowerCase();return g.get(b)||""}const a=/(iphone|ipod|ipad)/i.test(navigator.userAgent);let b=new Audio;const c={"audio/webm; codecs=opus":!!b.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!b.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!b.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!b.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!b.canPlayType("audio/mp4"),"audio/mpeg":!!b.canPlayType("audio/mpeg")};b=null;const d=[];let e=0;const f=Math.max(navigator.hardwareConcurrency||0,8),g=new Map([["mp4","video/mp4"],["webm","video/webm"],["m4a","audio/mp4"],["mp3","audio/mpeg"],["js","application/javascript"],["wasm","application/wasm"]]),h=[],i=new Map,j=new Map;let k=0;window.g_arv=class b{constructor(b){this.g_arw=b.g_arx,this.g_ary=null,this.g_abx="",this.g_arz={},this.g_arA=null,this.g_arB=null,this.g_arC=[],this.g_arD=null,this.g_$x=null,this.g_ada=null,this.g_aae=-1,this.g_arE=()=>this.g_arF(),this.g_arG=[],this.g_abC=b.g_arH,this.g_arI=!1,"html5"===this.g_abC&&"file"===location.protocol.substr(0,4)&&alert("Exported games won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)"),this.g_aq_("runtime","cordova-fetch-local-file",b=>this.g_arJ(b)),this.g_aq_("runtime","create-job-worker",b=>this.g_arK(b)),"cordova"===this.g_abC?document.addEventListener("deviceready",()=>this.g_TF(b)):this.g_TF(b)}g_eC(){this.g_arL(),this.g_ary&&(this.g_ary.onmessage=null,this.g_ary=null),this.g_arA&&(this.g_arA.terminate(),this.g_arA=null),this.g_arB&&(this.g_arB.g_eC(),this.g_arB=null),this.g_$x&&(this.g_$x.parentElement.removeChild(this.g_$x),this.g_$x=null)}g_arM(){return this.g_$x}g_ft(){return this.g_abx}g_aqX(){return this.g_arw}g_aeC(){return this.g_abC}g_aeD(){return"cordova"===this.g_abC&&a}g_arN(){if(!this.g_aeD())return!1;const d=window.devicePixelRatio,a=window.screen.width*d,b=window.screen.height*d;return 1125==a&&2436==b}async g_TF(d){if(d.g_arO)this.g_abx=d.g_arO;else{this.g_abx=location.origin+location.pathname;const b=this.g_abx.lastIndexOf("/");-1!==b&&(this.g_abx=this.g_abx.substr(0,b+1))}if(d.g_arP)for(const[a,b]of Object.entries(d.g_arP))this.g_arz[a]=URL.createObjectURL(b);const a=new MessageChannel;this.g_ary=a.port1,this.g_ary.onmessage=b=>this._OnMessageFromRuntime(b.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(b=>this.g_arQ(b)),this.g_ada=new self.g_arR(this),await this.g_ada.g_Zc(),this.g_arS(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),await this.g_arT(),this.g_arw?await this.g_arU(d,a.port2):await this.g_arV(d,a.port2)}g_arW(b){return this.g_arz.hasOwnProperty(b)?this.g_arz[b]:b}async g_arX(f,a,g){if(f.startsWith("blob:"))return new Worker(f,g);if(this.g_aeD()){const a=await this.g_yx(f);return new Worker(URL.createObjectURL(a),g)}const c=new URL(f,a),b=location.origin!==c.origin;if(b){const d=await fetch(c);if(!d.ok)throw new Error("failed to fetch worker script");const a=await d.blob();return new Worker(URL.createObjectURL(a),g)}return new Worker(c,g)}g_arS(){if(this.g_arN()){const d=window.innerWidth>window.innerHeight,a=document.documentElement.style,b=document.body.style;d?(b.height=a.height="375px",b.width=a.width="812px"):(b.width=a.width="375px",b.height=a.height="812px")}}g_arY(d){return{baseUrl:this.g_abx,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,isFullscreen:b.g_aaC(),projectData:d.g_arZ,previewImageBlobs:window.cr_previewImageBlobs,previewProjectFileBlobs:window.cr_previewProjectFileBlobs,shaders:self.C3_Shaders,exportType:d.g_arH,isDebug:-1<self.location.search.indexOf("debug"),ife:!!self.g_ar_,jobScheduler:this.g_ada.g_ar$(),supportedAudioFormats:c,opusWasmScriptUrl:window.cr_opusWasmScriptUrl||"scripts/opus.wasm.js",opusWasmBinaryUrl:window.cr_opusWasmBinaryUrl||"scripts/opus.wasm.wasm",isWKWebView:this.g_aeD(),isFBInstantAvailable:"undefined"!=typeof self.FBInstant}}async g_arU(d,a){this.g_arA=await this.g_arX(d.g_asa,this.g_abx,{name:"Runtime"}),this.g_$x=document.createElement("canvas"),this.g_$x.style.display="none";const b=this.g_$x.transferControlToOffscreen();document.body.appendChild(this.g_$x),this.g_arA.postMessage(Object.assign(this.g_arY(d),{type:"init-runtime",isInWorker:!0,messagePort:a,canvas:b,workerDependencyScripts:d.g_asb||[],engineScripts:d.g_asc}),[a,b,...this.g_ada.g_asd()]),this.g_arC=h.map(b=>new b(this)),this.g_ase()}async g_arV(a,b){this.g_$x=document.createElement("canvas"),this.g_$x.style.display="none",document.body.appendChild(this.g_$x),this.g_arC=h.map(b=>new b(this)),this.g_ase();const c=a.g_asc.map(b=>new URL(b,this.g_abx).toString());await Promise.all(c.map(a=>p(a)));const d=Object.assign(this.g_arY(a),{isInWorker:!1,messagePort:b,canvas:this.g_$x});this.g_arB=self.C3_CreateRuntime(d),await self.C3_InitRuntime(this.g_arB,d)}async g_arK(){const b=await this.g_ada.g_asf();return{outputPort:b,transferables:[b]}}g_aqY(){if(this.g_arw)throw new Error("not available in worker mode");return this.g_arB}g_aqT(f,a,b,c,d){this.g_ary.postMessage({type:"event",component:f,handler:a,dispatchRuntimeEvent:c,data:b,responseId:null},this.g_arI?void 0:d)}g_aqV(h,a,b,c,d){const e=k++,f=new Promise((c,a)=>{j.set(e,{resolve:c,reject:a})});return this.g_ary.postMessage({type:"event",component:h,handler:a,dispatchRuntimeEvent:c,data:b,responseId:e},this.g_arI?void 0:d),f}["_OnMessageFromRuntime"](c){const a=c.type;if("event"===a)this.g_asg(c);else if("result"===a)this.g_ash(c);else if("runtime-ready"===a)this.g_asi();else throw new Error(`unknown message '${a}'`)}g_asg(j){const k=j.component,b=j.handler,a=j.data,c=j.responseId,d=i.get(k);if(!d)return void console.warn(`[DOM] No event handlers for component '${k}'`);const e=d.get(b);if(!e)return void console.warn(`[DOM] No handler '${b}' for component '${k}'`);let f=null;try{f=e(a)}catch(d){return console.error(`Exception in '${k}' handler '${b}':`,d),void(null!==c&&this.g_asj(c,!1,d.toString()))}null!==c&&(f&&f.then?f.then(b=>this.g_asj(c,!0,b)).catch(d=>{console.error(`Rejection from '${k}' handler '${b}':`,d),this.g_asj(c,!1,d.toString())}):this.g_asj(c,!0,f))}g_asj(e,a,b){let c;b&&b.transferables&&(c=b.transferables),this.g_ary.postMessage({type:"result",responseId:e,isOk:a,result:b},c)}g_ash(f){const a=f.responseId,b=f.isOk,c=f.result,d=j.get(a);b?d.resolve(c):d.reject(c),j.delete(a)}g_aq_(e,a,b){let c=i.get(e);if(c||(c=new Map,i.set(e,c)),c.has(a))throw new Error(`[DOM] Component '${e}' already has handler '${a}'`);c.set(a,b)}static g_ask(b){if(h.includes(b))throw new Error("DOM handler already added");h.push(b)}g_ase(){for(const b of this.g_arC)if("runtime"===b.g_arb())return void(this.g_arD=b);throw new Error("cannot find runtime DOM handler")}g_arQ(b){this.g_aqT("debugger","message",b)}g_asi(){for(const b of this.g_arC)b.g_aqR()}static g_aaC(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)}g_arc(b){this.g_arG.push(b),this.g_asl()}g_ard(c){const a=this.g_arG.indexOf(c);if(-1===a)throw new Error("invalid callback");this.g_arG.splice(a,1),this.g_arG.length||this.g_arL()}g_asl(){-1===this.g_aae&&this.g_arG.length&&(this.g_aae=requestAnimationFrame(this.g_arE))}g_arL(){-1!==this.g_aae&&(cancelAnimationFrame(this.g_aae),this.g_aae=-1)}g_arF(){this.g_aae=-1;for(const b of this.g_arG)b();this.g_asl()}g_asm(c,a){this.g_arD.g_asm(c,a)}g_asn(b){this.g_arD.g_asn(b)}g_aso(){this.g_arD.g_aso()}g_asp(b){this.g_arD.g_asp(b)}g_yX(b){return!!c[b]}async g_add(c){const a=await this.g_aqV("runtime","opus-decode",{arrayBuffer:c},!1,[c]);return new Float32Array(a)}g_ge(b){return /^(?:[a-z]+:)?\/\//.test(b)||"data:"===b.substr(0,5)||"blob:"===b.substr(0,5)}g_gf(b){return!this.g_ge(b)}async g_arJ(c){const a=c.filename;switch(c.as){case"text":return await this.g_yB(a);case"blob":return await this.g_yx(a);case"blob-url":return await this.g_asq(a);default:throw new Error("unsupported type");}}g_asr(c){const d=window.cordova.file.applicationDirectory+"www/"+c;return new Promise((e,a)=>{window.resolveLocalFileSystemURL(d,c=>{c.file(e,a)},a)})}async g_yB(b){const a=await this.g_asr(b);return await q(a)}g_ass(){if(d.length&&!(e>=f)){e++;const b=d.shift();this.g_ast(b.filename,b.g_asu,b.g_asv)}}g_asw(f){return new Promise((g,b)=>{d.push({filename:f,g_asu:b=>{e--,this.g_ass(),g(b)},g_asv:c=>{e--,this.g_ass(),b(c)}}),this.g_ass()})}async g_ast(c,a,b){try{const b=await this.g_asr(c),d=await r(b);a(d)}catch(c){b(c)}}async g_yx(d,a){a||(a=s(d));const e=await this.g_asw(d);return new Blob([e],{type:a})}async g_asq(c){const a=await this.g_yx(c);return URL.createObjectURL(a)}g_arT(){let e=null;const f=new Promise(a=>e=a),b=new ArrayBuffer(1),c=new MessageChannel;return c.port2.onmessage=a=>{a.data&&a.data.arrayBuffer||(this.g_arI=!0,console.warn("MessageChannel transfers determined to be broken. Disabling transferables.")),e()},c.port1.postMessage({arrayBuffer:b},[b]),f}}}{function g(b){return b.sourceCapabilities&&b.sourceCapabilities.firesTouchEvents||b.originalEvent&&b.originalEvent.sourceCapabilities&&b.originalEvent.sourceCapabilities.firesTouchEvents}function a(e){return new Promise((a,b)=>{const c=new Image;c.onload=()=>a(c),c.onerror=c=>b(c),c.src=e})}async function h(b){const d=URL.createObjectURL(b);try{return await a(d)}finally{URL.revokeObjectURL(d)}}function b(){return window.parent&&window.parent.document.hasFocus()}self.C3_RasterSvgImage=async function(f,a,b){const c=document.createElement("canvas");c.width=a,c.height=b;const d=c.getContext("2d");return d.drawImage(f,0,0,a,b),c};let c=!1;document.addEventListener("pause",()=>c=!0),document.addEventListener("resume",()=>c=!1);const d=class extends g_aqN{constructor(c){super(c,"runtime"),this.g_asx=!0,this.g_asy="any",this.g_asz=null,c.g_aq_("canvas","update-size",b=>this.g_asA(b)),c.g_aq_("runtime","invoke-download",b=>this.g_asB(b)),c.g_aq_("runtime","raster-svg-image",b=>this.g_asC(b)),c.g_aq_("runtime","set-target-orientation",b=>this.g_asD(b)),c.g_aq_("runtime","register-sw",()=>this.g_asE()),c.g_aq_("runtime","post-to-debugger",b=>this.g_asF(b)),c.g_aq_("runtime","before-start-ticking",()=>this.g_asG()),c.g_aq_("runtime","debug-highlight",b=>this.g_asH(b));const a=c.g_arM();a.addEventListener("contextmenu",b=>b.preventDefault()),a.addEventListener("selectstart",b=>b.preventDefault()),a.addEventListener("gesturehold",b=>b.preventDefault()),a.addEventListener("touchstart",b=>b.preventDefault()),window.addEventListener("mousedown",b=>{1===b.button&&b.preventDefault()}),window.addEventListener("resize",()=>this.g_aav()),this.g_asI=new Set,this.g_asJ=new WeakSet,this.g_asK=!1}g_asG(){return window.addEventListener("visibilitychange",()=>this.g_adc(document.hidden)),document.addEventListener("pause",()=>this.g_adc(!0)),document.addEventListener("resume",()=>this.g_adc(!1)),{isSuspended:!!(document.hidden||c)}}g_aqR(){window.addEventListener("focus",()=>this.g_asL("window-focus")),window.addEventListener("blur",()=>this.g_asL("window-blur",{parentHasFocus:b()})),window.addEventListener("fullscreenchange",()=>this.g_aaw()),window.addEventListener("webkitfullscreenchange",()=>this.g_aaw()),window.addEventListener("mozfullscreenchange",()=>this.g_aaw()),window.addEventListener("fullscreenerror",b=>this.g_aax(b)),window.addEventListener("webkitfullscreenerror",b=>this.g_aax(b)),window.addEventListener("mozfullscreenerror",b=>this.g_aax(b)),window.addEventListener("keydown",b=>this.g_asM("keydown",b)),window.addEventListener("keyup",b=>this.g_asM("keyup",b)),window.addEventListener("mousemove",b=>this.g_asN("mousemove",b)),window.addEventListener("mousedown",b=>this.g_asN("mousedown",b)),window.addEventListener("mouseup",b=>this.g_asN("mouseup",b)),window.addEventListener("dblclick",b=>this.g_asN("dblclick",b)),window.addEventListener("wheel",b=>this.g_asO("wheel",b)),"undefined"==typeof g_asP?(window.addEventListener("touchstart",b=>this.g_asQ("pointerdown",b)),window.addEventListener("touchmove",b=>this.g_asQ("pointermove",b)),window.addEventListener("touchend",b=>this.g_asQ("pointerup",b)),window.addEventListener("touchcancel",b=>this.g_asQ("pointercancel",b))):(window.addEventListener("pointerdown",b=>this.g_asR("pointerdown",b)),window.addEventListener("pointermove",b=>this.g_asR("pointermove",b)),window.addEventListener("pointerup",b=>this.g_asR("pointerup",b)),window.addEventListener("pointercancel",b=>this.g_asR("pointercancel",b))),window.addEventListener("deviceorientation",b=>this.g_asS(b)),window.addEventListener("devicemotion",b=>this.g_asT(b));const c=()=>this.g_aso();window.addEventListener("pointerup",c,!0),window.addEventListener("touchend",c,!0),window.addEventListener("click",c,!0),window.addEventListener("keydown",c,!0),window.addEventListener("gamepadconnected",c,!0)}g_asL(c,a){this.g_aqS(c,a||null,!0)}g_aav(){this.g_aqS("window-resize",{innerWidth:window.innerWidth,innerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio},!0)}g_asD(b){this.g_asy=b.targetOrientation}g_asU(){const c=this.g_asy;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(c).catch(b=>console.warn("[Construct 3] Failed to lock orientation: ",b));else try{let a=!1;screen.lockOrientation?a=screen.lockOrientation(c):screen.webkitLockOrientation?a=screen.webkitLockOrientation(c):screen.mozLockOrientation?a=screen.mozLockOrientation(c):screen.msLockOrientation&&(a=screen.msLockOrientation(c)),a||console.warn("[Construct 3] Failed to lock orientation")}catch(b){console.warn("[Construct 3] Failed to lock orientation: ",b)}}g_aaw(){const b=g_arv.g_aaC();b&&"any"!==this.g_asy&&this.g_asU(),this.g_aqS("fullscreenchange",{isFullscreen:b,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_aax(b){console.warn("[Construct 3] Fullscreen request failed: ",b),this.g_aqS("fullscreenerror",{isFullscreen:g_arv.g_aaC(),innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_adc(b){b?this.g_aqO.g_arL():this.g_aqO.g_asl(),this.g_aqS("visibilitychange",{hidden:b})}g_asM(c,a){this.g_aqW(c,{code:a.code,key:a.key,which:a.which,repeat:a.repeat,altKey:a.altKey,ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey,timeStamp:a.timeStamp},!0)}g_asN(a,b){g(b)||("mousedown"===a&&window!==window.top&&window.focus(),this.g_aqW(a,{button:b.button,clientX:b.clientX,clientY:b.clientY,timeStamp:b.timeStamp},!0))}g_asO(c,a){this.g_aqS(c,{clientX:a.clientX,clientY:a.clientY,deltaX:a.deltaX,deltaY:a.deltaY,deltaZ:a.deltaZ,deltaMode:a.deltaMode,timeStamp:a.timeStamp},!0)}g_asR(c,a){"pointerdown"===c&&window!==window.top&&window.focus(),this.g_aqW(c,{pointerId:a.pointerId,pointerType:a.pointerType,clientX:a.clientX,clientY:a.clientY,width:a.width||0,height:a.height||0,pressure:a.pressure||0,tangentialPressure:a.tangentialPressure||0,tiltX:a.tiltX||0,tiltY:a.tiltY||0,twist:a.twist||0,timeStamp:a.timeStamp},!0)}g_asQ(e,a){"pointerdown"===e&&window!==window.top&&window.focus();for(let b=0,c=a.changedTouches.length;b<c;++b){const c=a.changedTouches[b];this.g_aqW(e,{pointerId:c.identifier,pointerType:"touch",clientX:c.clientX,clientY:c.clientY,width:2*(c.radiusX||c.webkitRadiusX||c.mozRadiusX||c.msRadiusX||0),height:2*(c.radiusY||c.webkitRadiusY||c.mozRadiusY||c.msRadiusY||0),pressure:c.force||c.webkitForce||c.mozForce||c.msForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:c.rotationAngle||0,timeStamp:a.timeStamp},!0)}}g_asS(b){this.g_aqS("deviceorientation",{alpha:b.alpha||0,beta:b.beta||0,gamma:b.gamma||0,timeStamp:b.timeStamp},!0)}g_asT(j){let a=0,k=0,l=0,m=0,n=0,o=0;const p=j.accelerationIncludingGravity;p&&(a=p.x||0,k=p.y||0,l=p.z||0);const h=j.acceleration;h&&(m=h.x||0,n=h.y||0,o=h.z||0),this.g_aqS("devicemotion",{acceleration:{x:m,y:n,z:o},accelerationWithG:{x:a,y:k,z:l},timeStamp:j.timeStamp},!0)}g_asA(d){const a=this.g_ara(),b=a.g_arM();b.style.width=d.styleWidth+"px",b.style.height=d.styleHeight+"px",b.style.marginLeft=d.marginLeft+"px",b.style.marginTop=d.marginTop+"px",a.g_arS(),this.g_asx&&(b.style.display="",this.g_asx=!1)}g_asB(f){const b=f.url,c=f.filename,d=document.createElement("a"),e=document.body;d.textContent=c,d.href=b,d.download=c,e.appendChild(d),d.click(),e.removeChild(d)}async g_asC(c){const a=c.blob,b=c.width,d=c.height,e=await h(a),f=await self.C3_RasterSvgImage(e,b,d);return await createImageBitmap(f)}g_aso(){const c=[...this.g_asI];if(this.g_asI.clear(),!this.g_asK)for(const d of c){const b=d.play();b&&b.catch(()=>{this.g_asJ.has(d)||this.g_asI.add(d)})}}g_asm(d,a){if("function"!=typeof d.play)throw new Error("missing play function");if(this.g_asJ.delete(d),a)return void this.g_asI.add(d);let b;try{b=d.play()}catch(a){return void this.g_asI.add(d)}b&&b.catch(()=>{this.g_asJ.has(d)||this.g_asI.add(d)})}g_asn(b){this.g_asI.delete(b),this.g_asJ.add(b)}g_asp(b){this.g_asK=!!b}g_asH(d){const a=d.show;if(!a)return void(this.g_asz&&(this.g_asz.style.display="none"));this.g_asz||(this.g_asz=document.createElement("div"),this.g_asz.id="inspectOutline",document.body.appendChild(this.g_asz));const b=this.g_asz;b.style.display="",b.style.left=d.left-1+"px",b.style.top=d.top-1+"px",b.style.width=d.width+2+"px",b.style.height=d.height+2+"px",b.textContent=d.name}g_asE(){window.C3_RegisterSW&&window.C3_RegisterSW()}g_asF(b){window.c3_postToMessagePort&&(b.from="runtime",window.c3_postToMessagePort(b))}};g_arv.g_ask(d)}{const c=document.currentScript.src;self.g_arR=class{constructor(a){this.g_asV=a,this.g_abx=c.substr(0,c.lastIndexOf("/")+1),this.g_aff=Math.min(navigator.hardwareConcurrency||2,16),this.g_asW=null,this.g_asX=[],this.g_afd=null,this.g_asY=null}async g_Zc(){if(this.g_asZ)throw new Error("already initialised");this.g_asZ=!0;const c=this.g_asV.g_arW("dispatchWorker.js");this.g_asW=await this.g_asV.g_arX(c,this.g_abx,{name:"DispatchWorker"});const a=new MessageChannel;this.g_afd=a.port1,this.g_asW.postMessage({type:"_init","in-port":a.port2},[a.port2]),this.g_asY=await this.g_asf()}async g_asf(){const f=this.g_asX.length,a=this.g_asV.g_arW("jobWorker.js"),b=await this.g_asV.g_arX(a,this.g_abx,{name:"JobWorker"+f}),c=new MessageChannel,d=new MessageChannel;return this.g_asW.postMessage({type:"_addJobWorker",port:c.port1},[c.port1]),b.postMessage({type:"init",number:f,"dispatch-port":c.port2,"output-port":d.port2},[c.port2,d.port2]),this.g_asX.push(b),d.port1}g_ar$(){return{inputPort:this.g_afd,outputPort:this.g_asY,maxNumWorkers:this.g_aff}}g_asd(){return[this.g_afd,this.g_asY]}}}if("use strict",window.C3_IsSupported){"undefined"!=typeof OffscreenCanvas;window.c3_runtimeInterface=new g_arv({g_arx:!1,g_asa:"workerMain.js",g_asc:["scripts/c3runtime.js"],g_arH:"html5"})}{const b=class extends g_aqN{constructor(b){super(b,"stranianelli_htmlelement"),this.g_aqZ("prova",b=>this.g_as_(b))}g_as_(b){console.log(b)}};g_arv.g_ask(b)}