Файловый менеджер - Редактировать - /home/jogoso94/public_html/jogos/crypto_melon/scripts/main.js
�азад
// Generated by Construct, the game and animation creation tool // Visit: https://www.construct.net "use strict";window.i=class{constructor(t,s){this.h=t,this.o=s,this.l=!1,this.u=()=>this.m()}g(){}v(t,s,e,i){this.h.S(this.o,t,s,e,i)}A(t,s,e,i){return this.h._(this.o,t,s,e,i)}O(t,s,e){this.h.I()?this.v(t,s,e):this.h.R()._OnMessageFromDOM({type:"event",component:this.o,handler:t,dispatchOpts:e||null,data:s,responseId:null})}C(t,s){this.h.P(this.o,t,s)}T(t){for(const[s,e]of t)this.C(s,e)}L(){return this.h}M(){return this.o}D(){this.l||(this.h.F(this.u),this.l=!0)}U(){this.l&&(this.h.G(this.u),this.l=!1)}m(){}},window.W=class{constructor(t,s){this.H=t,this.B=s,this.N=-1,this.V=-1/0,this.j=()=>this.$(),this.K=!1,this.Z=!1}Y(t){this.Z=!!t}J(){if(-1===this.N){const t=Date.now(),s=t-this.V,e=this.B;e<=s&&this.Z?(this.V=t,this.X()):this.N=self.setTimeout(this.j,Math.max(e-s,4))}}X(){this.K=!0,this.H(),this.K=!1}tt(){this.K||(this.st(),this.V=Date.now())}$(){this.N=-1,this.V=Date.now(),this.X()}st(){-1!==this.N&&(self.clearTimeout(this.N),this.N=-1)}et(){this.st(),this.H=null,this.j=null}};{class y{constructor(t){this.it=t,this.nt=!1,this.ht=!0,this.rt=-1,this.ot=-1,this.lt=-1}ct(t){this.ht=!!t}dt(){return this.ht}ut(){return this.nt}wt(){this.nt=!0}ft(){return this.rt}yt(t){this.rt=t}gt(){return this.ot}vt(t){this.ot=t}bt(t){this.lt=t}St(){return this.lt}At(){return this.it}}window._t=class extends self.i{constructor(t,s){super(t,s),this.Ot=new Map,this.It=!0,this.T([["create",t=>this.Rt(t)],["destroy",t=>this.Ct(t)],["set-visible",t=>this.kt(t)],["update-position",t=>this.Pt(t)],["update-state",t=>this.Tt(t)],["focus",t=>this.Lt(t)],["set-css-style",t=>this.Mt(t)],["set-attribute",t=>this.xt(t)],["remove-attribute",t=>this.Et(t)]]),this.Dt("get-element",t=>t)}Ft(t){this.It=!!t}Dt(t,i){this.C(t,t=>{const s=t.elementId,e=this.Ut(s);return i(e,t)})}Gt(t){for(const[s,e]of t)this.Dt(s,e)}Rt(t){const s=t.elementId,e=this.Wt(s,t),i=new y(e),n=(this.Ot.set(s,i),e.style.boxSizing="border-box",e.style.display="none",i.ct(t.isVisible),this.Ht(e)),h=(n.addEventListener("focus",t=>this.Bt(s)),n.addEventListener("blur",t=>this.Nt(s)),t.htmlIndex);if(i.yt(h),i.bt(t.htmlZIndex),this.It){const r=this.L().Vt(h),o=(i.vt(r),this.L().qt(r));o.appendChild(e)}}Wt(t,s){throw new Error("required override")}zt(t){}Ct(t){const s=t.elementId,e=this.Ut(s);this.zt(e),this.It&&e.parentElement.removeChild(e),this.Ot.delete(s)}jt(t,s,e){(e=e||{}).elementId=s,this.v(t,e)}$t(t,s,e){(e=e||{}).elementId=s,this.O(t,e)}kt(t){if(this.It){const s=this.Ot.get(t.elementId),e=s.At();s.ut()?e.style.display=t.isVisible?"":"none":s.ct(t.isVisible)}}Pt(t){if(this.It){const s=this.Ot.get(t.elementId),e=s.At(),i=this.L(),n=(e.style.left=t.left+"px",e.style.top=t.top+"px",e.style.width=t.width+"px",e.style.height=t.height+"px",t.fontSize),h=(null!==n&&(e.style.fontSize=n+"em"),t.htmlIndex),r=(s.yt(h),i.Vt(h));if(r!==s.gt()){e.remove();const a=i.qt(r);a.appendChild(e),s.vt(r),i.Kt()}const o=t.htmlZIndex;o!==s.St()&&(s.bt(o),i.Kt()),s.ut()||(s.wt(),s.dt()&&(e.style.display=""))}}Zt(){if(this.It)for(const t of this.Ot.values()){const s=this.L().Vt(t.ft()),e=t.gt();if(-1!==s&&-1!==e&&s!==e){const i=t.At(),n=(i.remove(),this.L().qt(s));n.appendChild(i),t.vt(s)}}}Yt(){return this.It?[...this.Ot.values()]:null}Tt(t){const s=this.Ut(t.elementId);this.Jt(s,t)}Jt(t,s){throw new Error("required override")}Ht(t){return t}Bt(t){this.jt("elem-focused",t)}Nt(t){this.jt("elem-blurred",t)}Lt(t){const s=this.Ht(this.Ut(t.elementId));t.focus?s.focus():s.blur()}Mt(t){const s=this.Ut(t.elementId),e=t.prop,i=t.val;e.startsWith("--")?s.style.setProperty(e,i):s.style[e]=i}xt(t){const s=this.Ut(t.elementId);s.setAttribute(t.name,t.val)}Et(t){const s=this.Ut(t.elementId);s.removeAttribute(t.name)}Ut(t){const s=this.Ot.get(t);if(s)return s.At();throw new Error("no element with id "+t)}}}{const b0=/(iphone|ipod|ipad|macos|macintosh|mac os x)/i.test(navigator.userAgent),c0=/android/i.test(navigator.userAgent),d0=/safari/i.test(navigator.userAgent)&&!/(chrome|chromium|edg\/|OPR\/|nwjs)/i.test(navigator.userAgent);let n=0;function AddScript(e){const i=document.createElement("script");return i.async=!1,i.type="module",e.Xt?new Promise(t=>{const s="c3_resolve_"+n;++n,self[s]=t,i.textContent=e.str+` self["${s}"]();`,document.head.appendChild(i)}):new Promise((t,s)=>{i.onload=t,i.onerror=s,i.src=e,document.head.appendChild(i)})}async function CheckSupportsWorkerMode(){if(!navigator.userActivation||"undefined"==typeof OffscreenCanvas)return!1;try{let t=!1;const s=new Blob([` self.addEventListener("message", () => { try { const offscreenCanvas = new OffscreenCanvas(32, 32); const gl = offscreenCanvas.getContext("webgl"); self.postMessage(!!gl); } catch (err) { console.warn("Feature detection worker error:", err); self.postMessage(false); } });`],{type:"text/javascript"}),e=new Worker(URL.createObjectURL(s),{get type(){t=!0}}),i=await new Promise(s=>{e.addEventListener("message",t=>{e.terminate(),s(t.data)}),e.postMessage("")});return t&&i}catch(t){return console.warn("Error feature detecting worker mode: ",t),!1}}let t=new Audio;const g0={"audio/webm; codecs=opus":!!t.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!t.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!t.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!t.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!t.canPlayType("audio/mp4"),"audio/mpeg":!!t.canPlayType("audio/mpeg")};async function BlobToString(t){const s=await BlobToArrayBuffer(t),e=new TextDecoder("utf-8");return e.decode(s)}function BlobToArrayBuffer(i){return new Promise((s,e)=>{const t=new FileReader;t.onload=t=>s(t.target.result),t.onerror=t=>e(t),t.readAsArrayBuffer(i)})}t=null;const h0=[];let i=0;const j0=8,k0=(window.RealFile=window.File,[]),l0=new Map,m0=new Map;let o=0;const o0=[],p0=(self.runOnStartup=function(t){if("function"!=typeof t)throw new Error("runOnStartup called without a function");o0.push(t)},new Set(["cordova","playable-ad-single-file","playable-ad-zip","instant-games"]));function IsWebViewExportType(t){return p0.has(t)}let s=!1;window.Qt=class P0{constructor(t){if(this.ts=t.ss,this.es=null,this.ns="",this.hs=t.scriptFolder,this.rs=null,this.os=null,this.ls=[],this.cs=null,this.ds=!0,this.us=[],this.ws=[],this.fs=!1,this.ps=()=>this.ys(),this.gs=!1,this.vs=0,this.bs=null,this.Ss=-1,this.As=()=>this._s(),this.Os=new Set,this.Is=null,this.Rs=[],this.Cs=t.exportType,this.ks="file"===location.protocol.substr(0,4),this.Ps=[],"playable-ad-single-file"!==this.Cs&&"playable-ad-zip"!==this.Cs&&"instant-games"!==this.Cs||(this.ts=!1),d0&&(this.ts=!1),"cordova"===this.Cs&&this.ts&&c0){const s=/Chrome\/(\d+)/i.exec(navigator.userAgent);s&&90<=parseInt(s[1],10)||(this.ts=!1)}this.Ts()?self.chrome.webview.addEventListener("message",t=>this.Ls(t.data,t.additionalObjects)):"macos-wkwebview"===this.Cs?self.C3WrapperOnMessage=t=>this.Ls(JSON.parse(t)):"linux-cef"===this.Cs&&self.c3_linux_cef_set_message_callback(t=>this.Ls(JSON.parse(t))),this.Ms=null,this.xs=null,"html5"!==this.Cs||window.isSecureContext||console.warn("[Construct] Warning: the browser indicates this is not a secure context. Some features may be unavailable. Use secure (HTTPS) hosting to ensure all features are available."),this.P("canvas","update-size",t=>this.Es(t)),this.P("canvas","set-html-layer-count",t=>this._OnSetHTMLLayerCount(t)),this.P("canvas","cleanup-html-layers",()=>this.Ds()),this.P("canvas","update-html-layer-dom-state",t=>this.Fs(t.layersDomState)),this.P("runtime","cordova-fetch-local-file",t=>this.Us(t)),this.P("runtime","create-job-worker",t=>this.Gs(t)),this.P("runtime","send-wrapper-extension-message",t=>this.Ws(t)),"cordova"===this.Cs?document.addEventListener("deviceready",()=>this.Hs(t)):this.Hs(t),this.Bs=0}et(){this.Ns(),this.es&&(this.es.onmessage=null,this.es=null),this.rs&&(this.rs.terminate(),this.rs=null),this.os&&(this.os.et(),this.os=null);for(const{canvas:t,Vs:s}of this.us)t.remove(),s.remove();this.us.length=0}qs(){return this.us[0].canvas}Vt(t){return Math.min(t,this.us.length-1)}qt(t){if(t<0||t>=this.us.length)throw new RangeError("invalid canvas layer");return this.us[t].Vs}["_GetHTMLWrapElement"](t){return this.qt(t)}zs(){return this.ns}I(){return this.ts}js(){return this.Cs}$s(){return this.ks}Ks(){return this.hs}Zs(){return b0&&"cordova"===this.Cs}Ys(){const t=navigator.userAgent;return b0&&IsWebViewExportType(this.Cs)||navigator.standalone||/crios\/|fxios\/|edgios\//i.test(t)}Js(){return c0}Xs(){return c0&&IsWebViewExportType(this.Cs)}Qs(){return"windows-webview2"===this.Cs||!!("preview"===this.Cs&&window.chrome&&window.chrome.webview&&window.chrome.webview.postMessage)}Ts(){return this.Qs()||"xbox-uwp-webview2"===this.Cs}te(){this.Xs()&&this.Bs++}se(){return this.ee().next().value}*ee(){if(!this.Xs())return!0;yield 0===this.Bs,0<this.Bs&&this.Bs--}async Hs(t){if(this.ts){const e=await CheckSupportsWorkerMode();e||(this.ts=!1)}if("macos-wkwebview"===this.Cs&&this.ie({type:"ready"}),this.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs){this.ne();const i=await this.he();this.Rs=i.registeredComponentIds}if("playable-ad-single-file"===this.Cs&&(this.Ms=self.c3_base64files,this.xs={},await this.re()),"nwjs"===this.Cs&&self.nw){const n=self.nw.Window.get();if(n.on("close",()=>self.nw.App.quit()),self.nw.App.manifest["c3-steam-mode"]){let t=0;this.F(()=>{t++,document.documentElement.style.opacity=t%2==0?"1":"0.999"})}}if(t.runtimeBaseUrl)this.ns=t.runtimeBaseUrl;else{const h=location.origin,r=(this.ns=("null"===h?"file:///":h)+location.pathname,this.ns.lastIndexOf("/"));-1!==r&&(this.ns=this.ns.substr(0,r+1))}const s=new MessageChannel;if(this.es=s.port1,this.es.onmessage=t=>this._OnMessageFromRuntime(t.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(t=>this.oe(t)),this.bs=new self.ae(this),await this.bs.le(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),"object"==typeof window.AndroidFullScreen)try{await new Promise((t,s)=>{window.AndroidFullScreen.immersiveMode(t,s)})}catch(t){console.error("Failed to enter Android immersive mode: ",t)}this.ts?await this.ce(t,s.port2):await this.de(t,s.port2)}ue(t){return{runtimeBaseUrl:this.ns,previewUrl:location.href,windowInnerWidth:this.we(),windowInnerHeight:this.fe(),cssDisplayMode:this.me(),devicePixelRatio:window.devicePixelRatio,isFullscreen:P0.pe(),swClientId:window.cr_swClientId||"",exportType:t.exportType,isNWjs:"undefined"!=typeof nw,fileMap:globalThis.c3_swFileMap??new Map(Object.entries(this.Ms??{})),scriptFolder:this.hs,isDebug:new URLSearchParams(self.location.search).has("debug"),ife:!!self.ife,jobScheduler:this.bs.ye(),supportedAudioFormats:g0,isFileProtocol:this.ks,isiOSCordova:this.Zs(),isiOSWebView:this.Ys(),isWindowsWebView2:this.Qs(),isAnyWebView2Wrapper:this.Ts(),wrapperComponentIds:this.Rs,isFBInstantAvailable:void 0!==self.FBInstant}}async ce(t,s){const n=t.ge,e=("preview"===this.Cs?(this.rs=new Worker("previewworker.js",{type:"module",name:"Runtime"}),await new Promise((s,e)=>{const i=t=>{this.rs.removeEventListener("message",i),(t.data&&"ok"===t.data.type?s:e)()};this.rs.addEventListener("message",i),this.rs.postMessage({type:"construct-worker-init",import:new URL(n,this.ns).toString()})})):this.rs=await this.ve(n,{type:"module",name:"Runtime"}),document.createElement("canvas")),i=(e.style.display="none",e.transferControlToOffscreen()),h=(document.body.appendChild(e),document.createElement("div"));h.className="c3htmlwrap",h.setAttribute("interactive",""),document.body.appendChild(h),this.us.push({canvas:e,Vs:h,be:{isVisible:!0,opacity:1,isInteractive:!0}}),window.c3canvas=e,self.C3_InsertHTMLPlaceholders&&self.C3_InsertHTMLPlaceholders(),this.rs.postMessage(Object.assign(this.ue(t),{type:"init-runtime",isInWorker:!0,messagePort:s,canvas:i,runtimeScriptList:t.runtimeScriptList,projectMainScriptPath:t.projectMainScriptPath,scriptsInEventsPath:t.scriptsInEventsPath}),[s,i,...this.bs.Se()]),this.ls=k0.map(t=>new t(this)),this.Ae(),this.cs._e(e),this.cs.Oe(h),this.cs.Ie(),self.c3_callFunction=(t,s)=>this.cs.Re(t,s),"preview"===this.Cs&&(self.goToLastErrorScript=()=>this.S("runtime","go-to-last-error-script"))}async de(t,s){const e=document.createElement("canvas"),i=(e.style.display="none",document.body.appendChild(e),document.createElement("div")),n=(i.className="c3htmlwrap",i.setAttribute("interactive",""),document.body.appendChild(i),this.us.push({canvas:e,Vs:i,be:{isVisible:!0,opacity:1,isInteractive:!0}}),window.c3canvas=e,self.C3_InsertHTMLPlaceholders&&self.C3_InsertHTMLPlaceholders(),this.ls=k0.map(t=>new t(this)),this.Ae(),this.cs._e(e),this.cs.Oe(i),await Promise.all(t.runtimeScriptList.map(t=>this.Ce(t)))),h=(await Promise.all(n.map(t=>AddScript(t))),t.projectMainScriptPath),r=t.scriptsInEventsPath;if(h)try{if(await AddScript(h),"preview"===this.Cs&&!globalThis.C3_ProjectMainScriptOK)throw new Error("main script did not run to completion")}catch(t){this.ke(),console.error("Error loading project main script: ",t),alert(`Failed to load the project main script (${h}). Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the script. Press F12 and check the console for error details.`)}if(r)try{if(await AddScript(r),"preview"===this.Cs&&!globalThis.C3.ScriptsInEvents)throw new Error("scripts in events did not run to completion")}catch(t){this.ke(),console.error("Error loading scripts in events: ",t),alert("Failed to load scripts in events. Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the 'Imports for events' script. Press F12 and check the console for error details.")}const o=Object.assign(this.ue(t),{isInWorker:!1,messagePort:s,canvas:e,runOnStartupFunctions:o0});this.cs.Ie(),this.Pe(),this.os=self.C3_CreateRuntime(o),await self.C3_InitRuntime(this.os,o)}async ve(t,s){if(t.startsWith("blob:"))return new Worker(t,s);if("cordova"===this.Cs&&this.ks){const n=await this.Te(t),h=new Blob([n],{type:"application/javascript"});return new Worker(URL.createObjectURL(h),s)}if("playable-ad-single-file"===this.Cs){const r=this.Ms[t];if(r)return new Worker(URL.createObjectURL(r),s);throw new Error("missing script: "+t)}const e=new URL(t,location.href),i=location.origin!==e.origin;if(i){const o=await fetch(e);if(!o.ok)throw new Error("failed to fetch worker script");const a=await o.blob();return new Worker(URL.createObjectURL(a),s)}return new Worker(e,s)}we(){return Math.max(window.innerWidth,1)}fe(){return Math.max(window.innerHeight,1)}me(){if(this.Ts())return"standalone";const t=this.js(),s=new Set(["cordova","nwjs","macos-wkwebview","linux-cef"]);return s.has(t)?"standalone":window.matchMedia("(display-mode: fullscreen)").matches?"fullscreen":window.matchMedia("(display-mode: standalone)").matches?"standalone":window.matchMedia("(display-mode: minimal-ui)").matches?"minimal-ui":navigator.standalone?"standalone":"browser"}Pe(){this.ke()}ke(){const t=window.cr_previewLoadingElem;t&&(t.parentElement.removeChild(t),window.cr_previewLoadingElem=null)}async Gs(t){const s=await this.bs.Le();return{outputPort:s,transferables:[s]}}Es(t){if(!this.Me()){const s=t.styleWidth+"px",e=t.styleHeight+"px",i=t.marginLeft+"px",n=t.marginTop+"px";for(const{canvas:h,Vs:r}of this.us)h.style.width=s,h.style.height=e,h.style.marginLeft=i,h.style.marginTop=n,r.style.width=s,r.style.height=e,r.style.marginLeft=i,r.style.marginTop=n,this.ds&&(h.style.display="",r.style.display="");document.documentElement.style.setProperty("--construct-scale",t.displayScale),this.ds=!1}}["_OnSetHTMLLayerCount"](t){const e=t.count,s=t.layersDomState,i=t.immediate,n=t.styleWidth+"px",h=t.styleHeight+"px",r=t.marginLeft+"px",o=t.marginTop+"px",a=[],l=[];if(e<this.us.length)for(;this.us.length>e;){const{canvas:c,Vs:d}=this.us.pop();d.remove(),this.ts&&!i?this.ws.push(c):c.remove()}else if(e>this.us.length)for(let t=0,s=e-this.us.length;t<s;++t){const u=document.createElement("canvas");if(u.classList.add("c3overlay"),this.ts){const f=u.transferControlToOffscreen();a.push(f),l.push(f)}else a.push(u);document.body.appendChild(u);const w=document.createElement("div");w.classList.add("c3htmlwrap","c3overlay"),w.setAttribute("interactive",""),document.body.appendChild(w),u.style.width=n,u.style.height=h,u.style.marginLeft=r,u.style.marginTop=o,w.style.width=n,w.style.height=h,w.style.marginLeft=r,w.style.marginTop=o,this.cs._e(u),this.cs.Oe(w),this.us.push({canvas:u,Vs:w,be:{isVisible:!0,opacity:1,isInteractive:!0}})}this.Fs(s);for(const m of this.ls)m instanceof window._t&&m.Zt();return this.Kt(),{addedCanvases:a,transferables:l}}Fs(e){for(let t=0,s=Math.min(this.us.length,e.length);t<s;++t){const{Vs:i,be:n}=this.us[t],h=e[t],r=h.isVisible,o=h.opacity,a=h.isInteractive;r!==n.isVisible&&(i.style.display=r?"":"none",n.isVisible=r),o!==n.opacity&&(i.style.opacity=1===o?"":String(o),n.opacity=o),a!==n.isInteractive&&(i.style.pointerEvents=a?"":"none",a?i.setAttribute("interactive",""):i.removeAttribute("interactive"),n.isInteractive=a)}}Ds(){for(const t of this.ws)t.remove();this.ws.length=0}Kt(){this.fs||(this.fs=!0,this.F(this.ps))}ys(){this.G(this.ps),this.fs=!1;let t=[];for(const h of this.ls)if(h instanceof window._t){const r=h.Yt();r&&t.push(...r)}t.sort((t,s)=>{const e=t.gt(),i=s.gt();if(e!==i)return e-i;const n=t.St(),h=s.St();return n-h});let s=0,e=0,i=0,n=t.length;for(;i<n;++i){const o=t[i];o.gt()!==s&&(this.xe(s,t.slice(e,i)),s=o.gt(),e=i)}e<i&&this.xe(s,t.slice(e,i))}xe(t,s){if(!(s.length<=1||t>=this.us.length)){const i=s.map(t=>t.At()),e=new Set(i),n=this.qt(t),h=Array.from(n.children).filter(t=>e.has(t));for(let t=0,s=0,e=i.length;t<e;++t){const r=i[t],o=h[s];r===o?++s:n.insertBefore(r,o)}}}R(){if(this.ts)throw new Error("not available in worker mode");return this.os}S(t,s,e,i,n){this.es.postMessage({type:"event",component:t,handler:s,dispatchOpts:i||null,data:e,responseId:null},n)}_(t,s,e,i,n){const h=o++,r=new Promise((t,s)=>{m0.set(h,{resolve:t,reject:s})});return this.es.postMessage({type:"event",component:t,handler:s,dispatchOpts:i||null,data:e,responseId:h},n),r}["_OnMessageFromRuntime"](t){const s=t.type;if("event"===s)return this.Ee(t);if("result"===s)this.De(t);else if("runtime-ready"===s)this.Fe();else if("alert-error"===s)this.ke(),alert(t.message);else{if("creating-runtime"!==s)throw new Error(`unknown message '${s}'`);this.Pe()}}Ee(s){const e=s.component,i=s.handler,n=s.data,h=s.responseId,t=l0.get(e);if(t){const r=t.get(i);if(r){let t=null;try{t=r(n)}catch(s){return console.error(`Exception in '${e}' handler '${i}':`,s),void(null!==h&&this.Ue(h,!1,""+s))}if(null===h)return t;t&&t.then?t.then(t=>this.Ue(h,!0,t)).catch(t=>{console.error(`Rejection from '${e}' handler '${i}':`,t),this.Ue(h,!1,""+t)}):this.Ue(h,!0,t)}else console.warn(`[DOM] No handler '${i}' for component '${e}'`)}else console.warn(`[DOM] No event handlers for component '${e}'`)}Ue(t,s,e){let i;e&&e.transferables&&(i=e.transferables),this.es.postMessage({type:"result",responseId:t,isOk:s,result:e},i)}De(t){const s=t.responseId,e=t.isOk,i=t.result,n=m0.get(s);e?n.resolve(i):n.reject(i),m0.delete(s)}P(t,s,e){let i=l0.get(t);if(i||(i=new Map,l0.set(t,i)),i.has(s))throw new Error(`[DOM] Component '${t}' already has handler '${s}'`);i.set(s,e)}static Ge(t){if(k0.includes(t))throw new Error("DOM handler already added");k0.push(t)}Ae(){for(const t of this.ls)if("runtime"===t.M())return void(this.cs=t);throw new Error("cannot find runtime DOM handler")}oe(t){this.S("debugger","message",t)}Fe(){for(const t of this.ls)t.g()}static pe(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||s)}static We(t){s=!!t}async He(){return this._("runtime","get-remote-preview-status-info")}F(t){this.Os.add(t),this.Be()}G(t){this.Os.delete(t),0===this.Os.size&&this.Ns()}Be(){-1===this.Ss&&0<this.Os.size&&(this.Ss=requestAnimationFrame(this.As))}Ns(){-1!==this.Ss&&(cancelAnimationFrame(this.Ss),this.Ss=-1)}_s(){this.Ss=-1;for(const t of this.Os)t();this.Be()}Ne(t){this.cs.Ne(t)}Ve(t){this.cs.Ve(t)}qe(){this.cs.qe()}ze(t){this.cs.ze(t)}je(t){return!!g0[t]}$e(t){this.gs=!0,this.vs=t}Me(){return this.gs}Ke(){return this.vs}Ze(t){return/^(?:[a-z\-]+:)?\/\//.test(t)||"data:"===t.substr(0,5)||"blob:"===t.substr(0,5)}Ye(t){return!this.Ze(t)}async Ce(s){if("cordova"===this.Cs&&(s.startsWith("file:")||this.ks&&this.Ye(s))){let t=s;t.startsWith(this.ns)&&(t=t.substr(this.ns.length));const e=await this.Te(t),i=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(i)}if("playable-ad-single-file"!==this.Cs)return s;if(this.xs.hasOwnProperty(s))return{Xt:!0,str:this.xs[s]};if(this.Ms.hasOwnProperty(s))return URL.createObjectURL(this.Ms[s]);throw new Error("missing script: "+s)}async Us(t){const s=t.filename;switch(t.as){case"text":return this.Je(s);case"buffer":return this.Te(s);default:throw new Error("unsupported type")}}Xe(t){const i=window.cordova.file.applicationDirectory+"www/"+t;return new Promise((s,e)=>{window.resolveLocalFileSystemURL(i,t=>{t.file(s,e)},e)})}async Je(t){const s=await this.Xe(t);return BlobToString(s)}Qe(){if(h0.length&&!(i>=j0)){i++;const t=h0.shift();this.ti(t.filename,t.si,t.ei)}}Te(t){return new Promise((s,e)=>{h0.push({filename:t,si:t=>{i--,this.Qe(),s(t)},ei:t=>{i--,this.Qe(),e(t)}}),this.Qe()})}async ti(t,s,e){try{const i=await this.Xe(t),n=await BlobToArrayBuffer(i);s(n)}catch(t){e(t)}}["_PlayableAdFetchBlob"](t){if(this.Ms.hasOwnProperty(t))return this.Ms[t];throw new Error("missing file: "+t)}ii(){const t=window.cordova&&window.cordova.plugins&&window.cordova.plugins.permissions;if("object"!=typeof t)throw new Error("Permission API is not loaded");return t}ni(t,s){const e=t[s];if("string"!=typeof e)throw new Error("Invalid permission name");return e}hi(e){const i=this.ii();return new Promise((s,t)=>i.checkPermission(this.ni(i,e),t=>s(!!t.hasPermission),t))}ri(e){const i=this.ii();return new Promise((s,t)=>i.requestPermission(this.ni(i,e),t=>s(!!t.hasPermission),t))}async oi(t){if("cordova"===this.js()&&!this.Zs())for(const s of t){const e=await this.hi(s);if(!e){const i=await this.ri(s);if(!1===i)return!1}}return!0}async ai(...t){if(!1===await this.oi(t))throw new Error("Permission not granted")}Ls(t,s){if("object"==typeof t&&t){const e=t.type;if("directory-handles"===e)this.Ps=s;else if("wrapper-init-response"===e)this.Is(t),this.Is=null;else if("fullscreen-change"===e)P0.We(t.isFullscreen),this.cs.li();else if("log-to-console"===e)switch(t.logType){case"error":console.error(t.message);break;case"warning":console.warn(t.message);break;default:console.log(t.message)}else"extension-message"===e?this.S("runtime","wrapper-extension-message",t):console.warn("Unknown wrapper message: ",t)}else console.warn("Unknown wrapper message: ",t)}Ws(t){this.ie({type:"extension-message",componentId:t.componentId,messageId:t.messageId,params:t.params||[],asyncId:t.asyncId})}ie(t){this.Ts()?window.chrome.webview.postMessage(JSON.stringify(t)):"macos-wkwebview"===this.Cs?window.webkit.messageHandlers.C3Wrapper.postMessage(JSON.stringify(t)):"linux-cef"===this.Cs&&window.c3_linux_cef_sendmessage(JSON.stringify(t))}ne(){window.moveTo=(t,s)=>{this.ie({type:"set-window-position",windowX:Math.ceil(t),windowY:Math.ceil(s)})},window.resizeTo=(t,s)=>{this.ie({type:"set-window-size",windowWidth:Math.ceil(t),windowHeight:Math.ceil(s)})}}he(){return new Promise(t=>{this.Is=t,this.ie({type:"wrapper-init"})})}ci(){return this.Ps}async re(){const t=[];for(const[s,e]of Object.entries(this.Ms))t.push(this.di(s,e));await Promise.all(t)}async di(s,e){if("object"==typeof e)this.Ms[s]=new Blob([e.str],{type:e.type}),this.xs[s]=e.str;else{let t=await this.wi(e);t=t||this.fi(e),this.Ms[s]=t}}async wi(t){try{const s=await fetch(t);return await s.blob()}catch(t){return console.warn("Failed to fetch a data: URI. Falling back to a slower workaround. This is probably because the Content Security Policy unnecessarily blocked it. Allow data: URIs in your CSP to avoid this.",t),null}}fi(t){const s=this.mi(t);return this.pi(s.data,s.yi)}mi(t){const s=t.indexOf(",");if(s<0)throw new URIError("expected comma in data: uri");const e=t.substring(5,s),i=t.substring(s+1),n=e.split(";"),h=n[0]||"",r=n[1],o=n[2];return{yi:h,data:("base64"===r||"base64"===o?atob:decodeURIComponent)(i)}}pi(t,s){let e=t.length,i=e>>2,n=new Uint8Array(e),h=new Uint32Array(n.buffer,0,i),r,o;for(r=0,o=0;r<i;++r)h[r]=t.charCodeAt(o++)|t.charCodeAt(o++)<<8|t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<24;let a=3&e;for(;a--;)n[o]=t.charCodeAt(o),++o;return new Blob([n],{type:s})}}}{const Md=self.Qt;function IsCompatibilityMouseEvent(t){return t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents||t.originalEvent&&t.originalEvent.sourceCapabilities&&t.originalEvent.sourceCapabilities.firesTouchEvents}const Nd=new Map([["OSLeft","MetaLeft"],["OSRight","MetaRight"]]),Od={dispatchRuntimeEvent:!0,dispatchUserScriptEvent:!0},Pd={dispatchUserScriptEvent:!0},Qd={dispatchRuntimeEvent:!0};function AddStyleSheet(i){return new Promise((t,s)=>{const e=document.createElement("link");e.onload=()=>t(e),e.onerror=t=>s(t),e.rel="stylesheet",e.href=i,document.head.appendChild(e)})}function FetchImage(i){return new Promise((t,s)=>{const e=new Image;e.onload=()=>t(e),e.onerror=t=>s(t),e.src=i})}async function BlobToImage(t){const s=URL.createObjectURL(t);try{return await FetchImage(s)}finally{URL.revokeObjectURL(s)}}function BlobToString(i){return new Promise((s,e)=>{let t=new FileReader;t.onload=t=>s(t.target.result),t.onerror=t=>e(t),t.readAsText(i)})}function IsInContentEditable(t){do{if(t.parentNode&&t.hasAttribute("contenteditable"))return!0}while(t=t.parentNode);return!1}const Rd=new Set(["input","textarea","datalist","select"]);function IsKeyboardInputElement(t){return Rd.has(t.tagName.toLowerCase())||IsInContentEditable(t)}const Sd=new Set(["canvas","body","html"]);function PreventDefaultOnCanvasOrDoc(t){if(t.target.tagName){const s=t.target.tagName.toLowerCase();Sd.has(s)&&t.preventDefault()}}function PreventDefaultOnHTMLWrap(t){t.target.tagName&&t.target.classList.contains("c3htmlwrap")&&t.preventDefault()}function BlockWheelZoom(t){(t.metaKey||t.ctrlKey)&&t.preventDefault()}self.C3_GetSvgImageSize=async function(t){const s=await BlobToImage(t);if(0<s.width&&0<s.height)return[s.width,s.height];{s.style.position="absolute",s.style.left="0px",s.style.top="0px",s.style.visibility="hidden",document.body.appendChild(s);const e=s.getBoundingClientRect();return document.body.removeChild(s),[e.width,e.height]}};let t=!(self.C3_RasterSvgImageBlob=async function(t,s,e,i,n){const h=await BlobToImage(t),r=document.createElement("canvas"),o=(r.width=i,r.height=n,r.getContext("2d"));return o.drawImage(h,0,0,s,e),r});function ParentHasFocus(){try{return window.parent&&window.parent.document.hasFocus()}catch(t){return!1}}document.addEventListener("pause",()=>t=!0),document.addEventListener("resume",()=>t=!1);const Ud="runtime",Vd=class extends self.i{constructor(t){super(t,Ud),this.gi=!1,this.vi=-1,this.bi="any",this.Si=!1,this.Ai=!1,this._i=!1,this.Oi=document.createElement("div"),this.Oi.className="c3-screen-reader-text",this.Oi.setAttribute("aria-live","polite"),document.body.appendChild(this.Oi),this.Ii=null,this.Ri=!1,this.Ci="",this.ki=-1,this.Pi=!1,this.Ti=t.we(),this.Li=t.fe(),this.Mi=0,this.xi=0,t.P("runtime","invoke-download",t=>this.Ei(t)),t.P("runtime","load-webfonts",t=>this.Di(t)),t.P("runtime","raster-svg-image",t=>this.Fi(t)),t.P("runtime","get-svg-image-size",t=>this.Ui(t)),t.P("runtime","set-target-orientation",t=>this.Gi(t)),t.P("runtime","register-sw",()=>this.Wi()),t.P("runtime","post-to-debugger",t=>this.Hi(t)),t.P("runtime","go-to-script",t=>this.Hi(t)),t.P("runtime","before-start-ticking",()=>this.Bi()),t.P("runtime","debug-highlight",t=>this.Ni(t)),t.P("runtime","enable-device-orientation",()=>this.Vi()),t.P("runtime","enable-device-motion",()=>this.zi()),t.P("runtime","add-stylesheet",t=>this.ji(t)),t.P("runtime","script-create-worker",t=>this.$i(t)),t.P("runtime","alert",t=>this.Ki(t)),t.P("runtime","screen-reader-text",t=>this.Zi(t)),t.P("runtime","hide-cordova-splash",()=>this.Yi()),t.P("runtime","set-exporting-to-video",t=>this.Ji(t)),t.P("runtime","export-to-video-progress",t=>this.Xi(t)),t.P("runtime","exported-to-video",t=>this.Qi(t)),t.P("runtime","exported-to-image-sequence",t=>this.tn(t));const i=new Set(["input","textarea","datalist"]);if(window.addEventListener("contextmenu",t=>{const s=t.target,e=s.tagName.toLowerCase();i.has(e)||IsInContentEditable(s)||t.preventDefault()}),window.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),window.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),window.addEventListener("touchstart",PreventDefaultOnCanvasOrDoc,{passive:!1}),window.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc,{passive:!1}),this.sn=0,window.addEventListener("mousedown",t=>{1===t.button&&t.preventDefault()}),window.addEventListener("mousewheel",BlockWheelZoom,{passive:!1}),window.addEventListener("wheel",BlockWheelZoom,{passive:!1}),window.addEventListener("resize",()=>this.en()),window.addEventListener("fullscreenchange",()=>this.li()),window.addEventListener("webkitfullscreenchange",()=>this.li()),window.addEventListener("mozfullscreenchange",()=>this.li()),window.addEventListener("fullscreenerror",t=>this.nn(t)),window.addEventListener("webkitfullscreenerror",t=>this.nn(t)),window.addEventListener("mozfullscreenerror",t=>this.nn(t)),t.Ys()){let s=1/0;window.visualViewport.addEventListener("resize",()=>{const t=window.visualViewport.height;t>s&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0),s=t}),document.documentElement.setAttribute("ioswebview","")}this.hn=new Set,this.rn=new WeakSet,this.an=!1}_e(t){t.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),t.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),t.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc)}Oe(t){t.addEventListener("selectstart",PreventDefaultOnHTMLWrap),t.addEventListener("gesturehold",PreventDefaultOnHTMLWrap),t.addEventListener("touchstart",PreventDefaultOnHTMLWrap)}Bi(){return self.setTimeout(()=>{this.Pi=!0},1e3),"cordova"===this.h.js()?(document.addEventListener("pause",()=>this.ln(!0)),document.addEventListener("resume",()=>this.ln(!1))):document.addEventListener("visibilitychange",()=>this.ln("hidden"===document.visibilityState)),this._i=!("hidden"!==document.visibilityState&&!t),{isSuspended:this._i}}g(){window.addEventListener("focus",()=>this.cn("window-focus")),window.addEventListener("blur",()=>{this.cn("window-blur",{parentHasFocus:ParentHasFocus()}),this.sn=0}),window.addEventListener("focusin",t=>{IsKeyboardInputElement(t.target)&&this.cn("keyboard-blur")}),window.addEventListener("keydown",t=>this.dn("keydown",t)),window.addEventListener("keyup",t=>this.dn("keyup",t)),window.addEventListener("mousedown",t=>this.un("mousedown",t,Pd)),window.addEventListener("mousemove",t=>this.un("mousemove",t,Pd)),window.addEventListener("mouseup",t=>this.un("mouseup",t,Pd)),window.addEventListener("dblclick",t=>this.un("dblclick",t,Od)),window.addEventListener("wheel",t=>this.wn("wheel",t,Od)),window.addEventListener("pointerdown",t=>{this.fn(t),this.mn("pointerdown",t)}),this.h.I()&&void 0!==window.onpointerrawupdate&&self===self.top?window.addEventListener("pointerrawupdate",t=>this.pn(t)):window.addEventListener("pointermove",t=>this.mn("pointermove",t)),window.addEventListener("pointerup",t=>this.mn("pointerup",t)),window.addEventListener("pointercancel",t=>this.mn("pointercancel",t));const t=()=>this.qe();window.addEventListener("pointerup",t,!0),window.addEventListener("touchend",t,!0),window.addEventListener("click",t,!0),window.addEventListener("keydown",t,!0),window.addEventListener("gamepadconnected",t,!0),this.h.Js()&&!this.h.Xs()&&navigator.virtualKeyboard&&(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",()=>{this.yn(this.fe(),navigator.virtualKeyboard.boundingRect.height)})),this.h.Ys()&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0)}yn(s,e){if(document.body.style.position="",document.body.style.overflow="",document.body.style.transform="",(this.xi=0)<e){const i=document.activeElement;if(i){const n=i.getBoundingClientRect(),h=(n.top+n.bottom)/2,r=(s-e)/2;let t=h-r;0<(t=(t=e<t?e:t)<0?0:t)&&(document.body.style.position="absolute",document.body.style.overflow="visible",document.body.style.transform=`translateY(${-t}px)`,this.xi=t)}}}cn(t,s){this.v(t,s||null,Qd)}we(){return this.h.we()}fe(){return this.h.fe()}Ie(){this.gi=!0,this.Ti=this.h.we(),this.Li=this.h.fe()}en(){if(!this.Ri&&this.gi){const t=this.we(),s=this.fe();if(this.h.Xs()){if(this.Pi){const e=this.h.se();if(e&&this.Ti===t&&s<this.Li)return this.Mi=this.Li-s,void this.yn(this.Li,this.Mi);0<this.Mi&&(this.Mi=0,this.yn(s,this.Mi))}this.Ti=t,this.Li=s}this.v("window-resize",{innerWidth:t,innerHeight:s,devicePixelRatio:window.devicePixelRatio,isFullscreen:Md.pe(),cssDisplayMode:this.h.me()}),this.h.Ys()&&(-1!==this.vi&&clearTimeout(this.vi),this.gn(t,s,0))}}vn(t,s,e){-1!==this.vi&&clearTimeout(this.vi),this.vi=setTimeout(()=>this.gn(t,s,e),48)}gn(t,s,e){const i=this.we(),n=this.fe();this.vi=-1,i!=t||n!=s?this.v("window-resize",{innerWidth:i,innerHeight:n,devicePixelRatio:window.devicePixelRatio,isFullscreen:Md.pe(),cssDisplayMode:this.h.me()}):e<10&&this.vn(i,n,e+1)}Gi(t){this.bi=t.targetOrientation}bn(){const s=this.bi;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(s).catch(t=>console.warn("[Construct] Failed to lock orientation: ",t));else try{let t=!1;screen.lockOrientation?t=screen.lockOrientation(s):screen.webkitLockOrientation?t=screen.webkitLockOrientation(s):screen.mozLockOrientation?t=screen.mozLockOrientation(s):screen.msLockOrientation&&(t=screen.msLockOrientation(s)),t||console.warn("[Construct] Failed to lock orientation")}catch(t){console.warn("[Construct] Failed to lock orientation: ",t)}}li(){if(!this.Ri){const t=Md.pe();t&&"any"!==this.bi&&this.bn(),this.v("fullscreenchange",{isFullscreen:t,innerWidth:this.we(),innerHeight:this.fe()})}}nn(t){console.warn("[Construct] Fullscreen request failed: ",t),this.v("fullscreenerror",{isFullscreen:Md.pe(),innerWidth:this.we(),innerHeight:this.fe()})}ln(t){if(this._i!==t&&((this._i=t)?this.h.Ns():this.h.Be(),this.v("visibilitychange",{hidden:t}),!t)&&this.h.Ys()){const s=()=>{document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0};setTimeout(s,50),setTimeout(s,100),setTimeout(s,250),setTimeout(s,500)}}dn(t,s){if(void 0!==s.key&&("Backspace"===s.key&&PreventDefaultOnCanvasOrDoc(s),"nwjs"===this.h.js()&&"u"===s.key&&(s.ctrlKey||s.metaKey)&&s.preventDefault(),!this.Ri)){const e=Nd.get(s.code)||s.code;this.O(t,{code:e,key:s.key,which:s.which,repeat:s.repeat,altKey:s.altKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,shiftKey:s.shiftKey,timeStamp:s.timeStamp},Od)}}wn(t,s,e){this.Ri||this.v(t,{clientX:s.clientX,clientY:s.clientY+this.xi,pageX:s.pageX,pageY:s.pageY+this.xi,deltaX:s.deltaX,deltaY:s.deltaY,deltaZ:s.deltaZ,deltaMode:s.deltaMode,timeStamp:s.timeStamp},e)}un(t,s,e){this.Ri||IsCompatibilityMouseEvent(s)||this.O(t,{button:s.button,buttons:s.buttons,clientX:s.clientX,clientY:s.clientY+this.xi,pageX:s.pageX,pageY:s.pageY+this.xi,movementX:s.movementX||0,movementY:s.movementY||0,timeStamp:s.timeStamp},e)}mn(s,e){if(!this.Ri){let t=0;"mouse"===e.pointerType&&(t=this.sn),this.O(s,{pointerId:e.pointerId,pointerType:e.pointerType,button:e.button,buttons:e.buttons,lastButtons:t,clientX:e.clientX,clientY:e.clientY+this.xi,pageX:e.pageX,pageY:e.pageY+this.xi,movementX:e.movementX||0,movementY:e.movementY||0,width:e.width||0,height:e.height||0,pressure:e.pressure||0,tangentialPressure:e.tangentialPressure||0,tiltX:e.tiltX||0,tiltY:e.tiltY||0,twist:e.twist||0,timeStamp:e.timeStamp},Od),"mouse"===e.pointerType&&(this.sn=e.buttons)}}pn(t){this.mn("pointermove",t)}Sn(e,i){if(!this.Ri)for(let t=0,s=i.changedTouches.length;t<s;++t){const n=i.changedTouches[t];this.O(e,{pointerId:n.identifier,pointerType:"touch",button:0,buttons:0,lastButtons:0,clientX:n.clientX,clientY:n.clientY+this.xi,pageX:n.pageX,pageY:n.pageY+this.xi,movementX:i.movementX||0,movementY:i.movementY||0,width:2*(n.radiusX||n.webkitRadiusX||0),height:2*(n.radiusY||n.webkitRadiusY||0),pressure:n.force||n.webkitForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:n.rotationAngle||0,timeStamp:i.timeStamp},Od)}}fn(t){window!==window.top&&window.focus(),this.An(t.target)&&document.activeElement&&!this.An(document.activeElement)&&document.activeElement.blur()}An(t){return!t||t===document||t===window||t===document.body||"canvas"===t.tagName.toLowerCase()}Vi(){this.Si||(this.Si=!0,window.addEventListener("deviceorientation",t=>this._n(t)),window.addEventListener("deviceorientationabsolute",t=>this.On(t)))}zi(){this.Ai||(this.Ai=!0,window.addEventListener("devicemotion",t=>this.In(t)))}_n(t){this.Ri||this.v("deviceorientation",{absolute:!!t.absolute,alpha:t.alpha||0,beta:t.beta||0,gamma:t.gamma||0,timeStamp:t.timeStamp,webkitCompassHeading:t.webkitCompassHeading,webkitCompassAccuracy:t.webkitCompassAccuracy},Od)}On(t){this.Ri||this.v("deviceorientationabsolute",{absolute:!!t.absolute,alpha:t.alpha||0,beta:t.beta||0,gamma:t.gamma||0,timeStamp:t.timeStamp},Od)}In(i){if(!this.Ri){let t=null;const n=i.acceleration;n&&(t={x:n.x||0,y:n.y||0,z:n.z||0});let s=null;const h=i.accelerationIncludingGravity;h&&(s={x:h.x||0,y:h.y||0,z:h.z||0});let e=null;const r=i.rotationRate;r&&(e={alpha:r.alpha||0,beta:r.beta||0,gamma:r.gamma||0}),this.v("devicemotion",{acceleration:t,accelerationIncludingGravity:s,rotationRate:e,interval:i.interval,timeStamp:i.timeStamp},Od)}}Ei(t){const s=t.url,e=t.filename,i=document.createElement("a"),n=document.body;i.textContent=e,i.href=s,i.download=e,n.appendChild(i),i.click(),n.removeChild(i)}async Di(t){const s=t.webfonts;await Promise.all(s.map(async t=>{const s=new FontFace(t.name,`url('${t.url}')`);document.fonts.add(s),await s.load()}))}async Fi(t){const s=t.blob,e=t.imageWidth,i=t.imageHeight,n=t.surfaceWidth,h=t.surfaceHeight,r=t.imageBitmapOpts,o=await self.C3_RasterSvgImageBlob(s,e,i,n,h);let a;return{imageBitmap:a=r?await createImageBitmap(o,r):await createImageBitmap(o),transferables:[a]}}async Ui(t){return self.C3_GetSvgImageSize(t.blob)}async ji(t){await AddStyleSheet(t.url)}qe(){const t=[...this.hn];if(this.hn.clear(),!this.an)for(const s of t){const e=s.play();e&&e.catch(t=>{this.rn.has(s)||this.hn.add(s)})}}Ne(s){if("function"!=typeof s.play)throw new Error("missing play function");this.rn.delete(s);let t;try{t=s.play()}catch(t){return void this.hn.add(s)}t&&t.catch(t=>{this.rn.has(s)||this.hn.add(s)})}Ve(t){this.hn.delete(t),this.rn.add(t)}ze(t){this.an=!!t}Yi(){navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide()}Ni(t){const s=t.show;if(s){this.Ii||(this.Ii=document.createElement("div"),this.Ii.id="inspectOutline",document.body.appendChild(this.Ii));const e=this.Ii;e.style.display="",e.style.left=t.left-1+"px",e.style.top=t.top-1+"px",e.style.width=t.width+2+"px",e.style.height=t.height+2+"px",e.textContent=t.name}else this.Ii&&(this.Ii.style.display="none")}Wi(){window.C3_RegisterSW&&window.C3_RegisterSW()}Hi(t){window.c3_postToMessagePort&&(t.from="runtime",window.c3_postToMessagePort(t))}Re(t,s){return this.A("js-invoke-function",{name:t,params:s})}$i(t){const s=t.url,e=t.opts,i=t.port2,n=new Worker(s,e);n.postMessage({type:"construct-worker-init",port2:i},[i])}Ki(t){alert(t.message)}Zi(t){const s=t.type;if("create"===s){const e=document.createElement("p");e.id="c3-sr-"+t.id,e.textContent=t.text,this.Oi.appendChild(e)}else if("update"===s){const i=document.getElementById("c3-sr-"+t.id);i?i.textContent=t.text:console.warn("[Construct] Missing screen reader text with id "+t.id)}else if("release"===s){const n=document.getElementById("c3-sr-"+t.id);n?n.remove():console.warn("[Construct] Missing screen reader text with id "+t.id)}else console.warn(`[Construct] Unknown screen reader text update '${s}'`)}Ji(t){this.Ri=!0;const s=document.createElement("h1");s.id="exportToVideoMessage",s.textContent=t.message,document.body.prepend(s),document.body.classList.add("exportingToVideo"),this.L().qs().style.display="",this.h.$e(t.duration)}Xi(t){this.Ci=t.message,-1===this.ki&&(this.ki=setTimeout(()=>this.Rn(),250))}Rn(){this.ki=-1;const t=document.getElementById("exportToVideoMessage");t&&(t.textContent=this.Ci)}Qi(t){window.c3_postToMessagePort({type:"exported-video",arrayBuffer:t.arrayBuffer,contentType:t.contentType,time:t.time})}tn(t){window.c3_postToMessagePort({type:"exported-image-sequence",blobArr:t.blobArr,time:t.time,gif:t.gif})}};Md.Ge(Vd)}{const Af="dispatchworker.js",Bf="jobworker.js";self.ae=class{constructor(t){this.Cn=t,this.kn=Math.min(navigator.hardwareConcurrency||2,16),this.Pn=null,this.Tn=[],this.Ln=null,this.Mn=null}async le(){if(this.xn)throw new Error("already initialised");this.xn=!0;const t=this.Cn.Ks()+Af,s=(this.Pn=await this.Cn.ve(t,{name:"DispatchWorker"}),new MessageChannel);this.Ln=s.port1,this.Pn.postMessage({type:"_init","in-port":s.port2},[s.port2]),this.Mn=await this.Le()}async Le(){const t=this.Tn.length,s=this.Cn.Ks()+Bf,e=await this.Cn.ve(s,{name:"JobWorker"+t}),i=new MessageChannel,n=new MessageChannel;return this.Pn.postMessage({type:"_addJobWorker",port:i.port1},[i.port1]),e.postMessage({type:"init",number:t,"dispatch-port":i.port2,"output-port":n.port2},[i.port2,n.port2]),this.Tn.push(e),n.port1}ye(){return{inputPort:this.Ln,outputPort:this.Mn,maxNumWorkers:this.kn}}Se(){return[this.Ln,this.Mn]}}}{const Kf="touch",Lf=class extends self.i{constructor(t){super(t,Kf),this.C("request-permission",t=>this.En(t))}async En(t){const s=t.type;let e=!0;0===s?e=await this.Dn():1===s&&(e=await this.Fn()),this.v("permission-result",{type:s,result:e})}async Dn(){if(!self.DeviceOrientationEvent||!self.DeviceOrientationEvent.requestPermission)return!0;try{const t=await self.DeviceOrientationEvent.requestPermission();return"granted"===t}catch(t){return console.warn("[Touch] Failed to request orientation permission: ",t),!1}}async Fn(){if(!self.DeviceMotionEvent||!self.DeviceMotionEvent.requestPermission)return!0;try{const t=await self.DeviceMotionEvent.requestPermission();return"granted"===t}catch(t){return console.warn("[Touch] Failed to request motion permission: ",t),!1}}};self.Qt.Ge(Lf)}{const Vf="keyboard",Wf=class extends self.i{constructor(t){super(t,Vf),this.Un=!(!navigator.keyboard||!navigator.keyboard.lock),this.T([["init",()=>this.Gn()],["lock-keyboard",t=>this.Wn(t)],["unlock-keyboard",()=>this.Hn()]])}Gn(){return{isKeyboardLockSupported:this.Un}}async Wn(t){const s=t.keysArr;try{return 0===s.length?await navigator.keyboard.lock():await navigator.keyboard.lock(s),{isOk:!0}}catch(t){return console.error("Error locking keyboard:",t),{isOk:!1}}}Hn(){try{navigator.keyboard.unlock()}catch(t){console.error("Error unlocking keyboard:",t)}}};self.Qt.Ge(Wf)}{let s=null,e=null;function elemsForSelector(t,s){if(t){if(s)return Array.from(document.querySelectorAll(t));{const e=document.querySelector(t);return e?[e]:[]}}return[document.documentElement]}function noop(){}window.addEventListener("beforeinstallprompt",t=>(t.preventDefault(),s=t,e&&e.Bn(),!1));const c5="browser",d5=class extends self.i{constructor(t){super(t,c5),this.Cs="",this.T([["get-initial-state",t=>this.Nn(t)],["ready-for-sw-messages",()=>this.Vn()],["alert",t=>this.Ki(t)],["close",()=>this.qn()],["set-focus",t=>this.Lt(t)],["vibrate",t=>this.zn(t)],["lock-orientation",t=>this.jn(t)],["unlock-orientation",()=>this.$n()],["navigate",t=>this.Kn(t)],["request-fullscreen",t=>this.Zn(t)],["exit-fullscreen",()=>this.Yn()],["set-hash",t=>this.Jn(t)],["set-document-css-style",t=>this.Xn(t)],["get-document-css-style",t=>this.Qn(t)],["set-window-size",t=>this.th(t)],["set-window-position",t=>this.sh(t)],["request-install",()=>this.eh()],["set-warn-on-close",t=>this.ih(t)]]),window.addEventListener("online",()=>this.nh(!0)),window.addEventListener("offline",()=>this.nh(!1)),window.addEventListener("hashchange",()=>this.hh()),this.rh=t=>t.preventDefault(),document.addEventListener("backbutton",()=>this.oh())}g(){s?this.Bn():e=this,window.addEventListener("appinstalled",()=>this.ah())}Nn(t){return this.Cs=t.exportType,{location:location.toString(),isOnline:!!navigator.onLine,referrer:document.referrer,title:document.title,isCookieEnabled:!!navigator.cookieEnabled,screenWidth:screen.width,screenHeight:screen.height,windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight,isConstructArcade:void 0!==window.is_scirra_arcade,windowHasFocus:document.hasFocus()}}Vn(){window.C3_RegisterSW&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(t=>this.v("sw-message",t.data))}Bn(){this.v("install-available")}async eh(){if(!s)return{result:"unavailable"};try{s.prompt();const t=await s.userChoice;return{result:t.outcome}}catch(t){return console.error("[Construct] Requesting install failed: ",t),{result:"failed"}}}ah(){this.v("app-installed")}nh(t){this.v("online-state",{isOnline:t})}oh(){this.v("backbutton")}lh(){return"nwjs"===this.Cs?nw.Window.get():null}Ki(t){alert(t.message)}qn(){navigator.app&&navigator.app.exitApp?navigator.app.exitApp():navigator.device&&navigator.device.exitApp?navigator.device.exitApp():self.nw?self.nw.App.quit():window.close()}Lt(t){const s=t.isFocus;if("nwjs"===this.Cs){const e=this.lh();s?e.focus():e.blur()}else s?window.focus():window.blur()}zn(t){navigator.vibrate&&navigator.vibrate(t.pattern)}jn(t){const s=t.orientation;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(s).catch(t=>console.warn("[Construct] Failed to lock orientation: ",t));else try{let t=!1;screen.lockOrientation?t=screen.lockOrientation(s):screen.webkitLockOrientation?t=screen.webkitLockOrientation(s):screen.mozLockOrientation?t=screen.mozLockOrientation(s):screen.msLockOrientation&&(t=screen.msLockOrientation(s)),t||console.warn("[Construct] Failed to lock orientation")}catch(t){console.warn("[Construct] Failed to lock orientation: ",t)}}$n(){try{screen.orientation&&screen.orientation.unlock?screen.orientation.unlock():screen.unlockOrientation?screen.unlockOrientation():screen.webkitUnlockOrientation?screen.webkitUnlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()}catch(t){}}Kn(t){const s=t.type;if("back"===s)navigator.app&&navigator.app.backHistory?navigator.app.backHistory():window.history.back();else if("forward"===s)window.history.forward();else if("reload"===s)location.reload();else if("url"===s){const e=t.url,i=t.target,n=t.exportType;self.cordova&&self.cordova.InAppBrowser?self.cordova.InAppBrowser.open(e,"_system"):"preview"===n||"macos-wkwebiew"===n||"linux-cef"===n||this.h.Ts()?window.open(e,"_blank"):this._isConstructArcade||(2===i?window.top.location=e:1===i?window.parent.location=e:window.location=e)}else if("new-window"===s){const h=t.url,r=t.tag;self.cordova&&self.cordova.InAppBrowser?self.cordova.InAppBrowser.open(h,"_system"):window.open(h,r)}}Zn(s){if(this.h.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs)self.Qt.We(!0),this.h.ie({type:"set-fullscreen",fullscreen:!0});else{const e={navigationUI:"auto"},i=s.navUI,n=(1===i?e.navigationUI="hide":2===i&&(e.navigationUI="show"),document.documentElement);let t;n.requestFullscreen?t=n.requestFullscreen(e):n.mozRequestFullScreen?t=n.mozRequestFullScreen(e):n.msRequestFullscreen?t=n.msRequestFullscreen(e):n.webkitRequestFullScreen&&(t=void 0!==Element.ALLOW_KEYBOARD_INPUT?n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):n.webkitRequestFullScreen()),t instanceof Promise&&t.catch(noop)}}Yn(){if(this.h.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs)self.Qt.We(!1),this.h.ie({type:"set-fullscreen",fullscreen:!1});else{let t;document.exitFullscreen?t=document.exitFullscreen():document.mozCancelFullScreen?t=document.mozCancelFullScreen():document.msExitFullscreen?t=document.msExitFullscreen():document.webkitCancelFullScreen&&(t=document.webkitCancelFullScreen()),t instanceof Promise&&t.catch(noop)}}Jn(t){location.hash=t.hash}hh(){this.v("hashchange",{location:location.toString()})}Xn(t){const s=t.prop,e=t.value,i=t.selector,n=t["is-all"];try{const h=elemsForSelector(i,n);for(const t of h)s.startsWith("--")?t.style.setProperty(s,e):t.style[s]=e}catch(t){console.warn("[Browser] Failed to set style: ",t)}}Qn(t){const s=t.prop,e=t.selector;try{const i=document.querySelector(e);if(i){const n=window.getComputedStyle(i);return{isOk:!0,result:n.getPropertyValue(s)}}return{isOk:!1}}catch(t){return console.warn("[Browser] Failed to get style: ",t),{isOk:!1}}}th(t){window.resizeTo(t.windowWidth,t.windowHeight)}sh(t){window.moveTo(t.windowX,t.windowY)}ih(t){const s=t.enabled;s?window.addEventListener("beforeunload",this.rh):window.removeEventListener("beforeunload",this.rh)}};self.Qt.Ge(d5)}{const ng="localstorage",og=class extends self.i{constructor(t){super(t,ng),this.T([["init",()=>this.Hs()],["request-persistent",()=>this.dh()]])}async Hs(){let s=!1;try{s=await navigator.storage.persisted()}catch(t){s=!1,console.warn("[Construct] Error checking storage persisted state: ",t)}return{isPersistent:s}}async dh(){try{const t=await navigator.storage.persist();return{isOk:!0,isPersistent:t}}catch(t){return console.error("[Construct] Error requesting persistent storage: ",t),{isOk:!1}}}};self.Qt.Ge(og)}{const ug=180/Math.PI,vg="audio";self.uh=class extends self.i{constructor(t){super(t,vg),this.wh=null,this.fh=null,this.mh=!1,this.ph=!1,this.yh=()=>this.gh(),this.bh=[],this.Sh=[],this.Ah=null,this._h=[],this.Oh=new Set,this.Ih=-1,this.Rh=new Map,this.Ch=1,this.an=!1,this.kh=0,this.Ph=1,this.Th=0,this.Lh="HRTF",this.Mh="inverse",this.xh=600,this.Eh=1e4,this.Dh=1,this.Fh=[0,0,0],this.Uh=[0,0,-1,0,1,0],this.Gh=!1,this.Wh=null,this.Hh=new Map,this.Bh=new Set,this.Nh=!1,this.Vh=!1,this.qh="",this.zh=null,self.C3Audio_OnMicrophoneStream=(t,s)=>this.jh(t,s),this.$h=null,self.C3Audio_GetOutputStream=()=>this.Kh(),(self.C3Audio_DOMInterface=this).T([["create-audio-context",t=>this.Zh(t)],["play",t=>this.Yh(t)],["stop",t=>this.Jh(t)],["stop-all",()=>this.Xh()],["set-paused",t=>this.Qh(t)],["set-volume",t=>this.tr(t)],["fade-volume",t=>this.sr(t)],["set-master-volume",t=>this.er(t)],["set-muted",t=>this.ir(t)],["set-silent",t=>this.nr(t)],["set-looping",t=>this.hr(t)],["set-playback-rate",t=>this.rr(t)],["set-stereo-pan",t=>this.ar(t)],["seek",t=>this.lr(t)],["preload",t=>this.cr(t)],["unload",t=>this.dr(t)],["unload-all",()=>this.ur()],["set-suspended",t=>this.wr(t)],["add-effect",t=>this.mr(t)],["set-effect-param",t=>this.pr(t)],["remove-effects",t=>this.yr(t)],["tick",t=>this.gr(t)],["load-state",t=>this.vr(t)],["offline-render-audio",t=>this.br(t)],["offline-render-finish",()=>this.Sr()]])}async Zh(t){t.usePlayMusicAsSoundWorkaround&&(this.Gh=!0),this.kh=t.timeScaleMode,this.Lh=["equalpower","HRTF","soundfield"][t.panningModel],this.Mh=["linear","inverse","exponential"][t.distanceModel],this.xh=t.refDistance,this.Eh=t.maxDistance,this.Dh=t.rolloffFactor,this.h.Me()?(this.Gh=!0,this.wh=new OfflineAudioContext({numberOfChannels:2,sampleRate:48e3,length:Math.ceil(48e3*this.h.Ke())})):(this.wh=new AudioContext({latencyHint:t.latencyHint}),this.Ar(),this.wh.onstatechange=()=>{"running"!==this.wh.state&&this.Ar(),this.v("audiocontext-state",{audioContextState:this.wh.state})}),this.fh=this.wh.createGain(),this.fh.connect(this.wh.destination);const s=t.listenerPos;this.Fh[0]=s[0],this.Fh[1]=s[1],this.Fh[2]=s[2],this.wh.listener.setPosition(s[0],s[1],s[2]),this.wh.listener.setOrientation(...this.Uh),self.C3_GetAudioContextCurrentTime=()=>this._r();try{await Promise.all(t.preloadList.map(t=>this.Or(t.originalUrl,t.url,t.type,!1)))}catch(t){console.error("[Construct] Preloading sounds failed: ",t)}return{sampleRate:this.wh.sampleRate,audioContextState:this.wh.state,outputLatency:this.wh.outputLatency||0}}Ar(){this.ph||(this.mh=!1,window.addEventListener("pointerup",this.yh,!0),window.addEventListener("touchend",this.yh,!0),window.addEventListener("click",this.yh,!0),window.addEventListener("keydown",this.yh,!0),this.ph=!0)}Ir(){this.ph&&(this.mh=!0,window.removeEventListener("pointerup",this.yh,!0),window.removeEventListener("touchend",this.yh,!0),window.removeEventListener("click",this.yh,!0),window.removeEventListener("keydown",this.yh,!0),this.ph=!1)}gh(){if(!this.mh){const t=this.wh,s=("suspended"===t.state&&t.resume&&t.resume(),t.createBuffer(1,220,22050)),e=t.createBufferSource();e.buffer=s,e.connect(t.destination),e.start(0),"running"===t.state&&this.Ir()}}Rr(s,t){for(const e of t){let t=!1;for(const i of s)if(self.uh.Cr(i,e)){t=!0;break}if(!t)return!1}return!0}kr(){return this.wh}_r(){return this.wh.currentTime}Pr(){return this.fh}["GetAudioContextExtern"](){return this.kr()}["GetDestinationNodeExtern"](){return this.Pr()}Tr(t){const s=this.Hh.get(t.toLowerCase());return s?s[0].Lr():this.Pr()}Mr(t,s){t=t.toLowerCase();let e=this.Hh.get(t);e||(e=[],this.Hh.set(t,e)),s.Er(e.length),s.Dr(t),e.push(s),this.Fr(t)}Fr(t){t=t.toLowerCase();let s=this.Pr();const e=this.Hh.get(t);if(e&&e.length){s=e[0].Lr();for(let t=0,s=e.length;t<s;++t){const i=e[t];t+1===s?i.Ur(this.Pr()):i.Ur(e[t+1].Lr())}}for(const n of this.Gr(t))n.Wr(s);this.zh&&this.qh===t&&(this.zh.disconnect(),this.zh.connect(s))}Hr(){return this.Ch}Br(){return this.an}Nr(){return this.kh}Vr(){return this.Ph}qr(){return this.Th}zr(){return this.Gh}jr(){return this.Lh}$r(){return this.Mh}Kr(){return this.xh}Zr(){return this.Eh}Yr(){return this.Dh}Ne(t){this.h.Ne(t)}Ve(t){this.h.Ve(t)}Jr(e){let i=0;for(let t=0,s=this.Sh.length;t<s;++t){const n=this.Sh[t];(this.Sh[i]=n).Xr()===e?n.et():++i}this.Sh.length=i}Qr(){let e=0;for(let t=0,s=this.bh.length;t<s;++t){const i=this.bh[t];(this.bh[e]=i).so()&&i!==this.Wh?i.et():++e}this.bh.length=e}*eo(t){if(0<t.length)for(const s of this.Sh)this.Rr(s.io(),t)&&(yield s);else this.Ah&&!this.Ah.no()&&(yield this.Ah)}*Gr(t){if(t)for(const s of this.Sh)self.uh.Cr(s.ho(),t)&&(yield s);else this.Ah&&!this.Ah.no()&&(yield this.Ah)}async Or(t,s,e,i,n){for(const r of this.bh)if(r.ro()===s)return i&&this.Gh&&(this.Wh=r),await r.oo(),r;if(n)return null;i&&this.Gh&&this.Qr();const h=self.lo.ao(this,t,s,e,i);return this.bh.push(h),i&&this.Gh&&(this.Wh=h),await h.oo(),this.Oh.has(t)||(this.v("buffer-metadata",{originalUrl:t,duration:h.co()}),this.Oh.add(t)),h}async do(t,s,e,i,n){for(const o of this.Sh)if(o.ro()===s&&(o.uo()||n))return n&&this.Gh&&(this.Wh=o.Xr()),o.wo(i),o;const h=await this.Or(t,s,e,n);if(h.fo())throw new Error(`buffer '${t}' unloaded while loading`);const r=h.mo(i);return this.Sh.push(r),r}po(t){const e=t.join(" ");let i=this.Rh.get(e);if(!i){let s=null;const n=new Promise(t=>s=t);i={yo:0,promise:n,resolve:s},this.Rh.set(e,i)}i.yo++}vo(t){const s=t.join(" "),e=this.Rh.get(s);if(!e)throw new Error("expected pending tag");e.yo--,0===e.yo&&(e.resolve(),this.Rh.delete(s))}bo(t){const s=(0===t.length?this._h:t).join(" "),e=this.Rh.get(s);return e?e.promise:Promise.resolve()}So(){if(0<this.Bh.size)this.D();else for(const t of this.Sh)if(t.Ao())return void this.D()}m(){for(const e of this.Bh)e.m();const t=this._r();for(const i of this.Sh)i.m(t);const s=this.Sh.filter(t=>t.Ao()).map(t=>t._o());this.v("state",{tickCount:this.Ih,outputLatency:this.wh.outputLatency||0,audioInstances:s,analysers:[...this.Bh].map(t=>t.Oo())}),0===s.length&&0===this.Bh.size&&this.U()}Io(t,s,e){this.v("trigger",{type:t,tags:s,aiid:e})}async Yh(t){const s=t.originalUrl,e=t.url,i=t.type,n=t.isMusic,h=t.tags,r=t.isLooping,o=t.vol,a=t.pos,l=t.panning,c=t.stereoPan;let d=t.off;if(0<d&&!t.trueClock)if(this.wh.getOutputTimestamp){const u=this.wh.getOutputTimestamp();d=d-u.performanceTime/1e3+u.contextTime}else d=d-performance.now()/1e3+this.wh.currentTime;this._h=h.slice(0),this.po(h);try{this.Ah=await this.do(s,e,i,h,n),l?(this.Ah.Ro(!0),this.Ah.Co(l.x,l.y,l.z,l.angle,l.innerAngle,l.outerAngle,l.outerGain),l.hasOwnProperty("uid")&&this.Ah.ko(l.uid)):"number"==typeof c&&0!==c?(this.Ah.Po(!0),this.Ah.To(c)):(this.Ah.Ro(!1),this.Ah.Po(!1)),this.Ah.Play(r,o,a,d)}catch(t){return void console.error("[Construct] Audio: error starting playback: ",t)}finally{this.vo(h)}this.D()}Jh(t){const s=t.tags;for(const e of this.eo(s))e.Lo()}Xh(){for(const t of this.Sh)t.Lo()}Qh(t){const s=t.tags,e=t.paused;for(const i of this.eo(s))e?i.Mo():i.xo();this.So()}tr(t){const s=t.tags,e=t.vol;for(const i of this.eo(s))i.Eo(e)}ar(t){const s=t.tags,e=t.p;for(const i of this.eo(s))i.Po(!0),i.To(e)}async sr(t){const s=t.tags,e=t.vol,i=t.duration,n=t.stopOnEnd;await this.bo(s);for(const h of this.eo(s))h.Do(e,i,n);this.So()}er(t){this.Ch=t.vol,this.fh.gain.value=this.Ch}ir(t){const s=t.tags,e=t.isMuted;for(const i of this.eo(s))i.Fo(e)}nr(t){this.an=t.isSilent,this.h.ze(this.an);for(const s of this.Sh)s.Uo()}hr(t){const s=t.tags,e=t.isLooping;for(const i of this.eo(s))i.Go(e)}async rr(t){const s=t.tags,e=t.rate;await this.bo(s);for(const i of this.eo(s))i.Wo(e)}async lr(t){const s=t.tags,e=t.pos;await this.bo(s);for(const i of this.eo(s))i.Ho(e)}async cr(t){const s=t.originalUrl,e=t.url,i=t.type,n=t.isMusic;try{await this.do(s,e,i,"",n)}catch(t){console.error("[Construct] Audio: error preloading: ",t)}}async dr(t){const s=t.url,e=t.type,i=t.isMusic,n=await this.Or("",s,e,i,!0);if(n){n.et(),this.Wh===n&&(this.Wh=null);const h=this.bh.indexOf(n);-1!==h&&this.bh.splice(h,1)}}ur(){for(const t of this.bh)t.et(),this.Wh===t&&(this.Wh=null);this.bh.length=0}wr(t){const s=t.isSuspended;!s&&this.wh.resume&&this.wh.resume();for(const e of this.Sh)e.Bo(s);s&&this.wh.suspend&&this.wh.suspend()}gr(t){if(this.Ph=t.timeScale,this.Th=t.gameTime,this.Ih=t.tickCount,0!==this.kh)for(const i of this.Sh)i.No();const s=t.listenerPos,e=(!s||this.Fh[0]===s[0]&&this.Fh[1]===s[1]&&this.Fh[2]===s[2]||(this.Fh[0]=s[0],this.Fh[1]=s[1],this.Fh[2]=s[2],this.wh.listener.setPosition(s[0],s[1],s[2])),t.listenerOrientation);if(e&&(this.Uh[0]!==e[0]||this.Uh[1]!==e[1]||this.Uh[2]!==e[2]||this.Uh[3]!==e[3]||this.Uh[4]!==e[4]||this.Uh[5]!==e[5])){for(let t=0;t<6;++t)this.Uh[t]=e[t];this.wh.listener.setOrientation(...this.Uh)}for(const n of t.instPans){const h=n.uid;for(const r of this.Sh)r.Vo()===h&&r.qo(n.x,n.y,n.z,n.angle)}}async mr(t){const s=t.type,e=t.hasOwnProperty("tags")?t.tags:[t.tag],i=t.params;let n,h;if("convolution"===s)try{h=await this.Or(t.bufferOriginalUrl,t.bufferUrl,t.bufferType,!1)}catch(t){return void console.log("[Construct] Audio: error loading convolution: ",t)}for(const r of e){if("filter"===s)n=new self.zo(this,...i);else if("delay"===s)n=new self.jo(this,...i);else if("convolution"===s)(n=new self.Ko(this,h.Zo(),...i)).$o(t.bufferOriginalUrl,t.bufferUrl,t.bufferType);else if("flanger"===s)n=new self.Yo(this,...i);else if("phaser"===s)n=new self.Jo(this,...i);else if("gain"===s)n=new self.Xo(this,...i);else if("stereopan"===s)n=new self.Qo(this,...i);else if("tremolo"===s)n=new self.ta(this,...i);else if("ringmod"===s)n=new self.sa(this,...i);else if("distortion"===s)n=new self.ea(this,...i);else if("compressor"===s)n=new self.ia(this,...i);else{if("analyser"!==s)throw new Error("invalid effect type");n=new self.na(this,...i)}this.Mr(r,n)}this.ha()}pr(t){const s=t.tags,e=t.index,i=t.param,n=t.value,h=t.ramp,r=t.time;for(const o of s){const a=this.Hh.get(o.toLowerCase());!a||e<0||e>=a.length||a[e].ra(i,n,h,r)}this.ha()}yr(t){const s=t.tags;for(const e of s){const i=e.toLowerCase(),n=this.Hh.get(i);if(!n||!n.length)return;for(const h of n)h.et();this.Hh.delete(i),this.Fr(i)}}oa(t){this.Bh.add(t),this.So()}aa(t){this.Bh.delete(t)}ha(){this.Nh||(this.Nh=!0,Promise.resolve().then(()=>this.la()))}la(){const t={};for(const[s,e]of this.Hh)t[s]=e.map(t=>t._o());this.v("fxstate",{fxstate:t}),this.Nh=!1}async vr(t){const s=t.saveLoadMode;if(3!==s){const h=[];for(const r of this.Sh)r.so()&&1===s||!r.so()&&2===s?h.push(r):r.et();this.Sh=h}for(const o of this.Hh.values())for(const a of o)a.et();this.Hh.clear(),this.Ph=t.timeScale,this.Th=t.gameTime;const e=t.listenerPos,i=(this.Fh[0]=e[0],this.Fh[1]=e[1],this.Fh[2]=e[2],this.wh.listener.setPosition(e[0],e[1],e[2]),t.listenerOrientation);if(Array.isArray(i)){for(let t=0;t<6;++t)this.Uh[t]=i[t];this.wh.listener.setOrientation(...this.Uh)}this.an=t.isSilent,this.h.ze(this.an),this.Ch=t.masterVolume,this.fh.gain.value=this.Ch;const n=[];for(const l of Object.values(t.effects))n.push(Promise.all(l.map(t=>this.mr(t))));await Promise.all(n),await Promise.all(t.playing.map(t=>this.ca(t,s))),this.So()}async ca(s,e){if(3!==e){const i=s.bufferOriginalUrl,n=s.bufferUrl,h=s.bufferType,r=s.isMusic,o=s.tags,a=s.isLooping,l=s.volume,c=s.playbackTime;if((!r||1!==e)&&(r||2!==e)){let t=null;try{t=await this.do(i,n,h,o,r)}catch(e){return void console.error("[Construct] Audio: error loading audio state: ",e)}t.da(s.pan),t.ua(s.stereoPan),t.Play(a,l,c,0),s.isPlaying||t.Mo(),t.wa(s)}}}jh(t,s){this.zh&&this.zh.disconnect(),this.qh=s.toLowerCase(),this.zh=this.wh.createMediaStreamSource(t),this.zh.connect(this.Tr(this.qh))}Kh(){return this.$h||(this.$h=this.wh.createMediaStreamDestination(),this.fh.connect(this.$h)),this.$h.stream}async br(t){try{const s=t.time,e=this.wh.suspend(s);this.Vh?this.wh.resume():(this.wh.startRendering().then(t=>this.fa(t)).catch(t=>this.ma(t)),this.Vh=!0),await e}catch(t){this.ma(t)}}Sr(){this.wh.resume()}fa(e){const i=[];for(let t=0,s=e.numberOfChannels;t<s;++t){const n=e.getChannelData(t);i.push(n.buffer)}this.h.S("runtime","offline-audio-render-completed",{duration:e.duration,length:e.length,numberOfChannels:e.numberOfChannels,sampleRate:e.sampleRate,channelData:i},null,i)}ma(t){console.error("[Audio] Offline rendering error: ",t)}static Cr(t,s){return t===s||t.normalize().toLowerCase()===s.normalize().toLowerCase()}static pa(t){return t*ug}static ya(t){return Math.pow(10,t/20)}static ga(t){return Math.max(Math.min(self.uh.ya(t),1),0)}static va(t){return Math.log(t)/Math.log(10)*20}static ba(t){return self.uh.va(Math.max(Math.min(t,1),0))}static Sa(t,s){return 1-Math.exp(-s*t)}},self.Qt.Ge(self.uh)}self.lo=class{constructor(t,s,e,i,n){this.Aa=t,this._a=s,this.Oa=e,this.Ia=i,this.Ra=n,this.Ca="",this.ka="not-loaded",this.Pa=null}et(){this.ka="not-loaded",this.Aa=null,this.Pa=null}fo(){return!this.Aa}static ao(t,s,e,i,n){return new(!n||t.zr()?self.Ta:self.La)(t,s,e,i,n)}mo(t){return new("html5"===this.Ca?self.Ma:self.xa)(this.Aa,this,t)}Ea(){}oo(){return this.Pa||(this.Pa=this.Ea()),this.Pa}Da(){}Fa(){}Ua(){return"failed"===this.ka}kr(){return this.Aa.kr()}Ga(){return this.Ca}Wa(){return this._a}ro(){return this.Oa}Ha(){return this.Ia}so(){return this.Ra}co(){}},self.La=class extends self.lo{constructor(t,s,e,i,n){super(t,s,e,i,n),this.Ca="html5",this.Ba=new Audio,this.Ba.crossOrigin="anonymous",this.Ba.autoplay=!1,this.Ba.preload="auto",this.Na=null,this.Va=null,this.qa=!1,this.Ba.addEventListener("canplaythrough",()=>this.qa=!0),this.za=this.kr().createGain(),this.ja=null,this.Ba.addEventListener("canplay",()=>{this.Na&&(this.ka="loaded",this.Na(),this.Na=null,this.Va=null),!this.ja&&this.Ba&&(this.ja=this.kr().createMediaElementSource(this.Ba),this.ja.connect(this.za))}),this.onended=null,this.Ba.addEventListener("ended",()=>{this.onended&&this.onended()}),this.Ba.addEventListener("error",t=>this.$a(t))}et(){this.Aa.Jr(this),this.za.disconnect(),this.za=null,this.ja.disconnect(),this.ja=null,this.Ba&&!this.Ba.paused&&this.Ba.pause(),this.onended=null,this.Ba=null,super.et()}Ea(){return this.ka="loading",new Promise((t,s)=>{this.Na=t,this.Va=s,this.Ba.src=this.Oa})}$a(t){console.error(`[Construct] Audio '${this.Oa}' error: `,t),this.Va&&(this.ka="failed",this.Va(t),this.Na=null,this.Va=null)}Da(){const t=4<=this.Ba.readyState;return t&&(this.qa=!0),t||this.qa}Fa(){return this.Da()}Ka(){return this.Ba}Za(){return this.za}co(){return this.Ba.duration}},self.Ta=class extends self.lo{constructor(t,s,e,i,n){super(t,s,e,i,n),this.Ca="webaudio",this.Ya=null,this.Ja=null}et(){this.Aa.Jr(this),this.Ya=null,this.Ja=null,super.et()}async Xa(){if(this.Ya)return this.Ya;const t=this.Aa.L();if("cordova"===t.js()&&t.Ye(this.Oa)&&t.$s())this.Ya=await t.Te(this.Oa);else if("playable-ad-single-file"===t.js()&&t.Ye(this.Oa)){const s=t._PlayableAdFetchBlob(this.Oa);this.Ya=await s.arrayBuffer()}else{const e=await fetch(this.Oa);if(!e.ok)throw new Error(`error fetching audio data: ${e.status} `+e.statusText);this.Ya=await e.arrayBuffer()}}async Qa(){if(this.Ja)return this.Ja;const t=this.Aa.kr();this.Ja=await t.decodeAudioData(this.Ya),this.Ya=null}async Ea(){try{this.ka="loading",await this.Xa(),this.fo()||(await this.Qa(),this.ka="loaded")}catch(t){this.ka="failed",console.error(`[Construct] Failed to load audio '${this.Oa}': `,t)}}Da(){return!(!this.Ya&&!this.Ja)}Fa(){return!!this.Ja}Zo(){return this.Ja}co(){return this.Ja?this.Ja.duration:0}};{let n=0;self.tl=class{constructor(t,s,e){this.Aa=t,this.sl=s,this.el=e,this.il=n++,this.nl=this.kr().createGain(),this.nl.connect(this.Pr()),this.hl=null,this.rl=!1,this.ol=[0,0,0],this.al=[0,0,0],this.ll=[0,0,0],this.cl=null,this.dl=!1,this.ul=0,this.wl=!0,this.fl=!1,this.ml=!1,this.pl=!1,this.yl=1,this.gl=!1,this.vl=1;const i=this.Aa.Nr();this.bl=1===i&&!this.so()||2===i,this.Sl=-1,this.Al=-1,this._l=!1}et(){this.Aa=null,this.sl=null,this.hl&&(this.hl.disconnect(),this.hl=null),this.cl&&(this.cl.disconnect(),this.cl=null),this.nl.disconnect(),this.nl=null}kr(){return this.Aa.kr()}wo(t){this.el=t}io(){return this.el}ho(){return 0<this.el.length?this.el[0]:""}Pr(){return this.Aa.Tr(this.ho())}Ol(){return this.bl?this.Aa.qr():performance.now()/1e3}Wa(){return this.sl.Wa()}ro(){return this.sl.ro()}Ha(){return this.sl.Ha()}Xr(){return this.sl}so(){return this.sl.so()}Il(){return this.il}no(){}uo(){}IsPlaying(){return!this.wl&&!this.fl&&!this.no()}Ao(){return!this.wl&&!this.no()}Rl(){}co(t){let s=this.sl.co();return t&&(s/=this.vl||.001),s}Play(t,s,e,i){}Lo(){}Mo(){}Cl(){return this.fl}xo(){}Eo(t){this.yl=t,this.nl.gain.cancelScheduledValues(0),this.Al=-1,this.nl.gain.value=this.kl()}Do(t,s,e){if(!this.Pl()){const i=this.nl.gain,n=(i.cancelScheduledValues(0),this.Aa._r()),h=n+s;i.setValueAtTime(i.value,n),i.linearRampToValueAtTime(t,h),this.yl=t,this.Al=h,this._l=e}}Tl(){this.Eo(this.yl)}m(t){-1!==this.Al&&t>=this.Al&&(this.Al=-1,this._l&&this.Lo(),this.Aa.Io("fade-ended",this.el,this.il))}kl(){const t=this.yl;return isFinite(t)?t:0}Fo(t){this.gl!==(t=!!t)&&(this.gl=t,this.Uo())}Pl(){return this.gl}Br(){return this.Aa.Br()}Uo(){}Go(t){}Ll(){return this.pl}Wo(t){this.vl!==t&&(this.vl=t,this.No())}No(){}Ml(){return this.vl}Ho(t){}Bo(t){}Ro(t){this.rl!==(t=!!t)&&(this.rl=t,(this.rl?(this.Po(!1),this.hl||(this.hl=this.kr().createPanner(),this.hl.panningModel=this.Aa.jr(),this.hl.distanceModel=this.Aa.$r(),this.hl.refDistance=this.Aa.Kr(),this.hl.maxDistance=this.Aa.Zr(),this.hl.rolloffFactor=this.Aa.Yr()),this.nl.disconnect(),this.nl.connect(this.hl),this.hl):(this.hl.disconnect(),this.nl.disconnect(),this.nl)).connect(this.Pr()))}Co(t,s,e,i,n,h,r){if(this.rl){this.qo(t,s,e,i);const o=self.uh.pa;this.ll[0]!==o(n)&&(this.ll[0]=o(n),this.hl.coneInnerAngle=o(n)),this.ll[1]!==o(h)&&(this.ll[1]=o(h),this.hl.coneOuterAngle=o(h)),this.ll[2]!==r&&(this.ll[2]=r,this.hl.coneOuterGain=r)}}qo(t,s,e,i){if(this.rl){const n=this.ol,h=this.al,r=Math.cos(i),o=Math.sin(i);n[0]===t&&n[1]===s&&n[2]===e||(n[0]=t,n[1]=s,n[2]=e,this.hl.setPosition(...n)),h[0]===r&&h[1]===o&&0===h[2]||(h[0]=r,h[1]=o,h[2]=0,this.hl.setOrientation(...h))}}Po(t){this.dl!==(t=!!t)&&(this.dl=t,(this.dl?(this.Ro(!1),this.cl=this.kr().createStereoPanner(),this.nl.disconnect(),this.nl.connect(this.cl),this.cl):(this.cl.disconnect(),this.cl=null,this.nl.disconnect(),this.nl)).connect(this.Pr()))}To(t){this.dl&&this.ul!==t&&(this.cl.pan.value=t,this.ul=t)}ko(t){this.Sl=t}Vo(){return this.Sl}xl(){}Wr(t){const s=this.cl||this.hl||this.nl;s.disconnect(),s.connect(t)}_o(){return{aiid:this.Il(),tags:this.el,duration:this.co(),volume:-1===this.Al?this.yl:this.nl.gain.value,isPlaying:this.IsPlaying(),playbackTime:this.Rl(),playbackRate:this.Ml(),uid:this.Sl,bufferOriginalUrl:this.Wa(),bufferUrl:"",bufferType:this.Ha(),isMusic:this.so(),isLooping:this.Ll(),isMuted:this.Pl(),resumePosition:this.xl(),pan:this.El(),stereoPan:this.Dl()}}wa(t){this.Wo(t.playbackRate),this.Fo(t.isMuted)}El(){if(!this.hl)return null;const t=this.hl;return{pos:this.ol,orient:this.al,cia:t.coneInnerAngle,coa:t.coneOuterAngle,cog:t.coneOuterGain,uid:this.Sl}}da(t){if(t){this.Ro(!0);const s=this.hl,e=t.pos,i=(this.ol[0]=e[0],this.ol[1]=e[1],this.ol[2]=e[2],t.orient);this.al[0]=i[0],this.al[1]=i[1],this.al[2]=i[2],s.setPosition(...this.ol),s.setOrientation(...this.al),this.ll[0]=t.cia,this.ll[1]=t.coa,this.ll[2]=t.cog,s.coneInnerAngle=t.cia,s.coneOuterAngle=t.coa,s.coneOuterGain=t.cog,this.Sl=t.uid}else this.Ro(!1)}Dl(){return this.cl?this.ul:null}ua(t){"number"!=typeof t?this.Po(!1):(this.Po(!0),this.To(t))}}}self.Ma=class extends self.tl{constructor(t,s,e){super(t,s,e),this.sl.Za().connect(this.nl),this.sl.onended=()=>this.Fl()}et(){this.Lo(),this.sl.Za().disconnect(),super.et()}Ka(){return this.sl.Ka()}Fl(){this.wl=!0,this.Sl=-1,this.Aa.Io("ended",this.el,this.il)}no(){return this.Ka().ended}uo(){return!!this.wl||this.no()}Rl(){let t=this.Ka().currentTime;return this.pl?t:Math.min(t,this.co())}Play(t,s,e,i){const n=this.Ka();if(1!==n.playbackRate&&(n.playbackRate=1),n.loop!==t&&(n.loop=t),this.Eo(s),this.gl=!1,n.muted&&(n.muted=!1),n.currentTime!==e)try{n.currentTime=e}catch(t){console.warn(`[Construct] Exception seeking audio '${this.sl.ro()}' to position '${e}': `,t)}this.Aa.Ne(n),this.wl=!1,this.fl=!1,this.pl=t,this.vl=1}Lo(){const t=this.Ka();t.paused||t.pause(),this.Aa.Ve(t),this.wl=!0,this.fl=!1,this.Sl=-1}Mo(){if(!(this.fl||this.wl||this.no())){const t=this.Ka();t.paused||t.pause(),this.Aa.Ve(t),this.fl=!0}}xo(){!this.fl||this.wl||this.no()||(this.Aa.Ne(this.Ka()),this.fl=!1)}Uo(){this.Ka().muted=this.gl||this.Br()}Go(t){this.pl!==(t=!!t)&&(this.pl=t,this.Ka().loop=t)}No(){let s=this.vl;this.bl&&(s*=this.Aa.Vr());try{this.Ka().playbackRate=s}catch(t){console.warn(`[Construct] Unable to set playback rate '${s}':`,t)}}Ho(s){if(!this.wl&&!this.no())try{this.Ka().currentTime=s}catch(t){console.warn(`[Construct] Error seeking audio to '${s}': `,t)}}xl(){return this.Rl()}Bo(t){t?this.IsPlaying()?(this.Ka().pause(),this.ml=!0):this.ml=!1:this.ml&&(this.Aa.Ne(this.Ka()),this.ml=!1)}},self.xa=class extends self.tl{constructor(t,s,e){super(t,s,e),this.Ul=null,this.Gl=t=>this.Fl(t),this.Wl=!0,this.Hl=null,this.Bl=0,this.Nl=0,this.Vl=0,this.ql=1}et(){this.Lo(),this.zl(),this.Gl=null,super.et()}zl(){this.Ul&&(this.Ul.onended=null,this.Ul.disconnect(),this.Ul.buffer=null),this.Ul=null,this.Hl=null}Fl(t){this.fl||this.ml||t.target===this.Hl&&(this.Wl=!0,this.wl=!0,this.Sl=-1,this.zl(),this.Aa.Io("ended",this.el,this.il))}no(){return!(!this.wl&&this.Ul&&this.Ul.loop||this.fl)&&this.Wl}uo(){return!(this.Ul&&!this.wl)||this.no()}Rl(){let t=0;return t=this.fl?this.Vl:this.Nl+(this.Ol()-this.Bl)*this.vl,this.pl?t:Math.min(t,this.co())}Play(t,s,e,i){this.gl=!1,this.ql=1,this.Eo(s),this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=t,this.Ul.start(i,e),this.Wl=!1,this.wl=!1,this.fl=!1,this.pl=t,this.vl=1,this.Bl=this.Ol(),this.Nl=e}Lo(){if(this.Ul)try{this.Ul.stop(0)}catch(t){}this.wl=!0,this.fl=!1,this.Sl=-1}Mo(){this.fl||this.wl||this.no()||(this.Vl=this.Rl(),this.pl&&(this.Vl%=this.co()),this.fl=!0,this.Ul.stop(0))}xo(){!this.fl||this.wl||this.no()||(this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=this.pl,this.Tl(),this.No(),this.Ul.start(0,this.Vl),this.Bl=this.Ol(),this.Nl=this.Vl,this.fl=!1)}kl(){return super.kl()*this.ql}Uo(){this.ql=this.gl||this.Br()?0:1,this.Tl()}Go(t){this.pl!==(t=!!t)&&(this.pl=t,this.Ul)&&(this.Ul.loop=t)}No(){let t=this.vl;this.bl&&(t*=this.Aa.Vr()),this.Ul&&(this.Ul.playbackRate.value=t)}Ho(t){this.wl||this.no()||(this.fl?this.Vl=t:(this.Mo(),this.Vl=t,this.xo()))}xl(){return this.Vl}Bo(t){t?this.IsPlaying()?(this.ml=!0,this.Vl=this.Rl(),this.pl&&(this.Vl%=this.co()),this.Ul.stop(0)):this.ml=!1:this.ml&&(this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=this.pl,this.Tl(),this.No(),this.Ul.start(0,this.Vl),this.Bl=this.Ol(),this.Nl=this.Vl,this.ml=!1)}wa(t){super.wa(t),this.Vl=t.resumePosition}};{class p9{constructor(t){this.Aa=t,this.wh=t.kr(),this.jl=-1,this.$l="",this.Ia="",this.Kl=null}et(){this.wh=null}Er(t){this.jl=t}Zl(){return this.jl}Dr(t){this.$l=t}Yl(){return this.$l}Jl(){return this.wh.createGain()}Lr(){}Ur(t){}Xl(t,s,e,i){if(t.cancelScheduledValues(0),0===i)t.value=s;else{const n=this.wh.currentTime;switch(i+=n,e){case 0:t.setValueAtTime(s,i);break;case 1:t.setValueAtTime(t.value,n),t.linearRampToValueAtTime(s,i);break;case 2:t.setValueAtTime(t.value,n),t.exponentialRampToValueAtTime(s,i)}}}_o(){return{type:this.Ia,tag:this.$l,params:this.Kl}}}self.zo=class extends p9{constructor(t,s,e,i,n,h,r){super(t),this.Ia="filter",this.Kl=[s,e,i,n,h,r],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=r,this.sc=this.Jl(),this.sc.gain.value=1-r,this.ec=this.wh.createBiquadFilter(),this.ec.type=s,this.ec.frequency.value=e,this.ec.detune.value=i,this.ec.Q.value=n,this.ec.gain.vlaue=h,this.Ql.connect(this.ec),this.Ql.connect(this.sc),this.ec.connect(this.tc)}et(){this.Ql.disconnect(),this.ec.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[5]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 1:this.Kl[1]=s,this.Xl(this.ec.frequency,s,e,i);break;case 2:this.Kl[2]=s,this.Xl(this.ec.detune,s,e,i);break;case 3:this.Kl[3]=s,this.Xl(this.ec.Q,s,e,i);break;case 4:this.Kl[4]=s,this.Xl(this.ec.gain,s,e,i)}}},self.jo=class extends p9{constructor(t,s,e,i){super(t),this.Ia="delay",this.Kl=[s,e,i],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=i,this.sc=this.Jl(),this.sc.gain.value=1-i,this.ic=this.Jl(),this.nc=this.wh.createDelay(s),this.nc.delayTime.value=s,this.hc=this.Jl(),this.hc.gain.value=e,this.Ql.connect(this.ic),this.Ql.connect(this.sc),this.ic.connect(this.tc),this.ic.connect(this.nc),this.nc.connect(this.hc),this.hc.connect(this.ic)}et(){this.Ql.disconnect(),this.tc.disconnect(),this.sc.disconnect(),this.ic.disconnect(),this.nc.disconnect(),this.hc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){const n=self.uh.ga;switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[2]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 4:this.Kl[1]=n(s),this.Xl(this.hc.gain,n(s),e,i);break;case 5:this.Kl[0]=s,this.Xl(this.nc.delayTime,s,e,i)}}},self.Ko=class extends p9{constructor(t,s,e,i){super(t),this.Ia="convolution",this.Kl=[e,i],this.rc="",this.oc="",this.ac="",this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=i,this.sc=this.Jl(),this.sc.gain.value=1-i,this.lc=this.wh.createConvolver(),this.lc.normalize=e,this.lc.buffer=s,this.Ql.connect(this.lc),this.Ql.connect(this.sc),this.lc.connect(this.tc)}et(){this.Ql.disconnect(),this.lc.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){0===t&&(s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i))}$o(t,s,e){this.rc=t,this.oc=s,this.ac=e}_o(){const t=super._o();return t.bufferOriginalUrl=this.rc,t.bufferUrl="",t.bufferType=this.ac,t}},self.Yo=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="flanger",this.Kl=[s,e,i,n,h],this.Ql=this.Jl(),this.sc=this.Jl(),this.sc.gain.value=1-h/2,this.tc=this.Jl(),this.tc.gain.value=h/2,this.cc=this.Jl(),this.cc.gain.value=n,this.nc=this.wh.createDelay(s+e),this.nc.delayTime.value=s,this.dc=this.wh.createOscillator(),this.dc.frequency.value=i,this.uc=this.Jl(),this.uc.gain.value=e,this.Ql.connect(this.nc),this.Ql.connect(this.sc),this.nc.connect(this.tc),this.nc.connect(this.cc),this.cc.connect(this.nc),this.dc.connect(this.uc),this.uc.connect(this.nc.delayTime),this.dc.start(0)}et(){this.dc.stop(0),this.Ql.disconnect(),this.nc.disconnect(),this.dc.disconnect(),this.uc.disconnect(),this.sc.disconnect(),this.tc.disconnect(),this.cc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[4]=s,this.Xl(this.tc.gain,s/2,e,i),this.Xl(this.sc.gain,1-s/2,e,i);break;case 6:this.Kl[1]=s/1e3,this.Xl(this.uc.gain,s/1e3,e,i);break;case 7:this.Kl[2]=s,this.Xl(this.dc.frequency,s,e,i);break;case 8:this.Kl[3]=s/100,this.Xl(this.cc.gain,s/100,e,i)}}},self.Jo=class extends p9{constructor(t,s,e,i,n,h,r){super(t),this.Ia="phaser",this.Kl=[s,e,i,n,h,r],this.Ql=this.Jl(),this.sc=this.Jl(),this.sc.gain.value=1-r/2,this.tc=this.Jl(),this.tc.gain.value=r/2,this.ec=this.wh.createBiquadFilter(),this.ec.type="allpass",this.ec.frequency.value=s,this.ec.detune.value=e,this.ec.Q.value=i,this.dc=this.wh.createOscillator(),this.dc.frequency.value=h,this.uc=this.Jl(),this.uc.gain.value=n,this.Ql.connect(this.ec),this.Ql.connect(this.sc),this.ec.connect(this.tc),this.dc.connect(this.uc),this.uc.connect(this.ec.frequency),this.dc.start(0)}et(){this.dc.stop(0),this.Ql.disconnect(),this.ec.disconnect(),this.dc.disconnect(),this.uc.disconnect(),this.sc.disconnect(),this.tc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[5]=s,this.Xl(this.tc.gain,s/2,e,i),this.Xl(this.sc.gain,1-s/2,e,i);break;case 1:this.Kl[0]=s,this.Xl(this.ec.frequency,s,e,i);break;case 2:this.Kl[1]=s,this.Xl(this.ec.detune,s,e,i);break;case 3:this.Kl[2]=s,this.Xl(this.ec.Q,s,e,i);break;case 6:this.Kl[3]=s,this.Xl(this.uc.gain,s,e,i);break;case 7:this.Kl[4]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.Xo=class extends p9{constructor(t,s){super(t),this.Ia="gain",this.Kl=[s],this.wc=this.Jl(),this.wc.gain.value=s}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){const n=self.uh.ga;4===t&&(this.Kl[0]=n(s),this.Xl(this.wc.gain,n(s),e,i))}},self.Qo=class extends p9{constructor(t,s){super(t),this.Ia="stereopan",this.Kl=[s],this.wc=this.wh.createStereoPanner(),this.wc.pan.value=s}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){s=Math.min(Math.max(s/100,-1),1),9===t&&(this.Kl[0]=s,this.Xl(this.wc.pan,s,e,i))}},self.ta=class extends p9{constructor(t,s,e){super(t),this.Ia="tremolo",this.Kl=[s,e],this.wc=this.Jl(),this.wc.gain.value=1-e/2,this.dc=this.wh.createOscillator(),this.dc.frequency.value=s,this.uc=this.Jl(),this.uc.gain.value=e/2,this.dc.connect(this.uc),this.uc.connect(this.wc.gain),this.dc.start(0)}et(){this.dc.stop(0),this.dc.disconnect(),this.uc.disconnect(),this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.wc.gain,1-s/2,e,i),this.Xl(this.uc.gain,s/2,e,i);break;case 7:this.Kl[0]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.sa=class extends p9{constructor(t,s,e){super(t),this.Ia="ringmod",this.Kl=[s,e],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=e,this.sc=this.Jl(),this.sc.gain.value=1-e,this.fc=this.Jl(),this.fc.gain.value=0,this.dc=this.wh.createOscillator(),this.dc.frequency.value=s,this.dc.connect(this.fc.gain),this.dc.start(0),this.Ql.connect(this.fc),this.Ql.connect(this.sc),this.fc.connect(this.tc)}et(){this.dc.stop(0),this.dc.disconnect(),this.fc.disconnect(),this.Ql.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 7:this.Kl[0]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.ea=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="distortion",this.Kl=[s,e,i,n,h],this.Ql=this.Jl(),this.mc=this.Jl(),this.yc=this.Jl(),this.vc(i,n),this.tc=this.Jl(),this.tc.gain.value=h,this.sc=this.Jl(),this.sc.gain.value=1-h,this.bc=this.wh.createWaveShaper(),this.Sc=new Float32Array(65536),this.Ac(s,e),this.bc.curve=this.Sc,this.Ql.connect(this.mc),this.Ql.connect(this.sc),this.mc.connect(this.bc),this.bc.connect(this.yc),this.yc.connect(this.tc)}et(){this.Ql.disconnect(),this.mc.disconnect(),this.bc.disconnect(),this.yc.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}vc(t,s){this.mc.gain.value=t=t<.01?.01:t,this.yc.gain.value=Math.pow(1/t,.6)*s}Ac(e,i){const n=32768;for(let s=0;s<n;++s){let t=s/n;t=this._c(t,e,i),this.Sc[n+s]=t,this.Sc[n-s-1]=-t}}_c(t,s,e){const i=1.05*e*s,n=i-s,h=t<0?-1:1,r=t<0?-t:t;let o=r<s?r:s+n*self.uh.Sa(r-s,1/n);return o*h}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){0===t&&(s=Math.max(Math.min(s/100,1),0),this.Kl[4]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i))}},self.ia=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="compressor",this.Kl=[s,e,i,n,h],this.wc=this.wh.createDynamicsCompressor(),this.wc.threshold.value=s,this.wc.knee.value=e,this.wc.ratio.value=i,this.wc.attack.value=n,this.wc.release.value=h}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){}},self.na=class extends p9{constructor(t,s,e){super(t),this.Ia="analyser",this.Kl=[s,e],this.wc=this.wh.createAnalyser(),this.wc.fftSize=s,this.wc.smoothingTimeConstant=e,this.Oc=new Float32Array(this.wc.frequencyBinCount),this.Ic=new Uint8Array(s),this.Rc=0,this.Cc=0,this.Aa.oa(this)}et(){this.Aa.aa(this),this.wc.disconnect(),super.et()}m(){this.wc.getFloatFrequencyData(this.Oc),this.wc.getByteTimeDomainData(this.Ic);const t=this.wc.fftSize;let e=this.Rc=0;for(let s=0;s<t;++s){let t=(this.Ic[s]-128)/128;t<0&&(t=-t),this.Rc<t&&(this.Rc=t),e+=t*t}const s=self.uh.ba;this.Rc=s(this.Rc),this.Cc=s(Math.sqrt(e/t))}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){}Oo(){return{tag:this.Yl(),index:this.Zl(),peak:this.Rc,rms:this.Cc,binCount:this.wc.frequencyBinCount,freqBins:this.Oc}}}}{const cm={};let o=null,t=null;const fm={banner:"ca-app-pub-3940256099942544/2934735716",interstitial:"ca-app-pub-3940256099942544/4411468910",rewarded:"ca-app-pub-3940256099942544/1712485313",rewardedInterstitial:"ca-app-pub-3940256099942544/6978759866"},gm=5e3;let i=!1;function Success(t,s){t(null,s)}function Failure(t,s){t(s,null)}function UpdateAdmobPlusRequest(t,s){cm[t]=s,self.admob.configRequest(cm)}async function StartAdmobPlus(i,n){return n=void 0!==n?n:o.debug,t=t||new Promise((e,t)=>{document.addEventListener("deviceready",async()=>{try{const t=setTimeout(()=>{e(!1),Failure(i,"failure to initialize")},gm);if(await self.admob.start(),clearTimeout(t),n){const s=await TestId();UpdateAdmobPlusRequest("testDeviceIds",[s])}e(!0)}catch(t){e(!1),Failure(i,"Initialization failure")}})})}function HasInitConfigurationOptions(){return!!o}function SetInitConfigureOptions(t,s,e,i,n,h,r){o||(o={id:t,kc:s,Pc:e,Tc:i,Lc:n,debug:h,Mc:r},Object.freeze(o))}async function TestId(){if("android"===self.cordova.platformId)return self.xc(self.device.uuid).toUpperCase();if("ios"===self.cordova.platformId){const t=self.cordova.plugins.idfa,s=await t.getInfo();if(!s.trackingLimited)return i=!0,self.xc(s.idfa).toUpperCase()}}function GetAdUnit(t,s){if("android"===self.cordova.platformId)return t;if("ios"===self.cordova.platformId){const e=!!fm[s];return o.debug&&!i&&e?(console.log("[C3 advert]","USING TEST AD UNITS"),fm[s]):t}}self.Ec={Dc:Success,Fc:Failure,Uc:StartAdmobPlus,Gc:UpdateAdmobPlusRequest,Wc:SetInitConfigureOptions,Hc:HasInitConfigurationOptions,Bc:GetAdUnit,get Nc(){return o},get Vc(){return TestId()}}}{const Hm=self.Ec,Im=Hm.Dc,Jm=Hm.Fc,Km=0,Lm=1,Mm=2,Nm=3,Om=4,Pm=5,Qm={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail}};class Rm{constructor(t,s,e,i,n,h){if(!t)return Jm(h,"Unit ID not specified");if(!s)return Jm(h,"Ad size not specified");if(!e)return Jm(h,"Ad position not specified");switch(this.jc=t,this.$c=e,this.Kc="",this.Zc=i,this.Yc=!!n,s){case"portrait":case"landscape":this.Kc=Pm;break;case"standard":this.Kc=Km;break;case"large":this.Kc=Lm;break;case"medium":this.Kc=Mm;break;case"full":this.Kc=Nm;break;case"leaderboard":this.Kc=Om;break;default:this.Kc=Pm}this.Jc=null,this.Xc=!1,this.Qc=!1,this.td=null,this.sd=null,this.ed=null}et(){this.td&&this.td(),this.td=null,this.sd=null,this.ed=null,this.Jc=null}oo(t,s){if(this.Jc)return Im(s,"banner ad loaded");_AddLoadListeners.call(this,s);const e={adUnitId:Hm.Bc(this.jc,"banner"),size:this.Kc,position:this.$c,npa:"NON_PERSONALIZED"===t?"1":"0"};this.Yc&&(e.offset=this.Zc),this.Jc=new self.admob.BannerAd(e),this.sd=new Promise(t=>this.ed=t),this.Jc.load()}async nd(t){return this.Jc?this.Xc?Jm(t,"banner ad still loading"):this.Qc?Im(t,"banner ad already shown"):(await this.Jc.show(),this.Qc=!0,Im(t,"banner shown"),void(this.Yc||self.C3MobileAdvertsAPI.real.forceResize())):Jm(t,"banner ad not created")}async hd(t){return this.Jc?this.Xc?Jm(t,"banner ad still loading"):this.Qc?(await this.Jc.hide(),this.Qc=!1,Im(t,"banner ad hidden"),void(this.Yc||self.C3MobileAdvertsAPI.real.forceResize())):Im(t,"banner ad not being shown"):Jm(t,"banner ad not created")}rd(){return this.Xc}od(){return this.Qc}ad(){return this.sd}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,Im(s,"banner ad loaded"),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),this.ed)&&this.ed()},i=t=>{t.ad===this.Jc&&(this.Jc=null,this.Xc=!1,Jm(s,"banner ad failed to load"),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),this.ed)&&this.ed()};this.td=()=>{document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i)},document.addEventListener(Qm.qc,e),document.addEventListener(Qm.zc,i)}self.ld=Rm}{const hn=self.Ec,jn=hn.Dc,kn=hn.Fc,ln={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss}};class mn{constructor(t,s){if(!t)return kn(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),document.addEventListener(ln.wd,async t=>{this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),await this.Jc.load()})}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:hn.Bc(this.jc,"interstitial"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.InterstitialAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?hn.Dc(s,"interstitial ad load"):hn.Fc(s,"interstitial ad failed to load")}async nd(t){if(!this.Jc)return kn(t,"interstitial ad not created");if(this.Qc)return jn(t,"interstitial ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):kn(t,"interstitial ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&jn(s,"interstitial ad load"),document.removeEventListener(ln.qc,e),document.removeEventListener(ln.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&kn(s,"interstitial ad failed to load"),document.removeEventListener(ln.qc,e),document.removeEventListener(ln.zc,i))};document.addEventListener(ln.qc,e),document.addEventListener(ln.zc,i)}function _AddShowListeners(s){const e=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime(),s&&jn(s,"interstitial ad show"),document.removeEventListener(ln.dd,e),document.removeEventListener(ln.ud,i))},i=t=>{t.ad===this.Jc&&(this.Qc=!1,s&&kn(s,"interstitial ad failed to show"),document.removeEventListener(ln.dd,e),document.removeEventListener(ln.ud,i))};document.addEventListener(ln.dd,e),document.addEventListener(ln.ud,i)}self.vd=mn}{const Jn=self.Ec,Kn=Jn.Dc,Ln=Jn.Fc,Mn={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss},get bd(){return self.admob.Events.adReward}};class Nn{constructor(t,s){if(!t)return Ln(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),this.Sd=null}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:Jn.Bc(this.jc,"rewarded"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.RewardedAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?Jn.Dc(s,"rewarded ad load"):Jn.Fc(s,"rewarded ad failed to load")}async nd(t){if(!this.Jc)return Ln(t,"rewarded ad not created");if(this.Qc)return Kn(t,"rewarded ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):Ln(t,"rewarded ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&Kn(s,"rewarded ad load"),document.removeEventListener(Mn.qc,e),document.removeEventListener(Mn.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&Ln(s,"rewarded ad failed to load"),document.removeEventListener(Mn.qc,e),document.removeEventListener(Mn.zc,i))};document.addEventListener(Mn.qc,e),document.addEventListener(Mn.zc,i)}function _AddShowListeners(i){const n=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime())},h=t=>{t.ad===this.Jc&&(this.Sd=t.reward)},r=t=>{t.ad===this.Jc&&(this.Qc=!1,i&&Ln(i,"rewarded ad failed to show"),document.removeEventListener(Mn.dd,n),document.removeEventListener(Mn.ud,r),document.removeEventListener(Mn.bd,h),document.removeEventListener(Mn.wd,o))},o=t=>{if(t.ad===this.Jc){if(null!==this.Sd){const s=String(this.Sd.type),e=String(this.Sd.amount);i&&Kn(i,JSON.stringify([s,e]))}else i&&Ln(i,"closed with no reward");this.Sd=null,this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),this.Jc.load(),document.removeEventListener(Mn.dd,n),document.removeEventListener(Mn.ud,r),document.removeEventListener(Mn.bd,h),document.removeEventListener(Mn.wd,o)}};document.addEventListener(Mn.dd,n),document.addEventListener(Mn.ud,r),document.addEventListener(Mn.bd,h),document.addEventListener(Mn.wd,o)}self.Ad=Nn}{const oo=self.Ec,po=oo.Dc,qo=oo.Fc,ro={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss},get bd(){return self.admob.Events.adReward}};class so{constructor(t,s){if(!t)return qo(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),this.Sd=null}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:oo.Bc(this.jc,"rewardedInterstitial"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.RewardedInterstitialAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?oo.Dc(s,"rewarded interstitial ad load"):oo.Fc(s,"rewarded interstitial ad failed to load")}async nd(t){if(!this.Jc)return qo(t,"rewarded interstitial ad not created");if(this.Qc)return po(t,"rewarded interstitial ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):qo(t,"rewarded interstitial ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&po(s,"rewarded interstitial ad load"),document.removeEventListener(ro.qc,e),document.removeEventListener(ro.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&qo(s,"rewarded interstitial ad failed to load"),document.removeEventListener(ro.qc,e),document.removeEventListener(ro.zc,i))};document.addEventListener(ro.qc,e),document.addEventListener(ro.zc,i)}function _AddShowListeners(i){const n=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime())},h=t=>{t.ad===this.Jc&&(this.Sd=t.reward)},r=t=>{t.ad===this.Jc&&(this.Qc=!1,i&&qo(i,"rewarded interstitial ad failed to show"),document.removeEventListener(ro.dd,n),document.removeEventListener(ro.ud,r),document.removeEventListener(ro.bd,h),document.removeEventListener(ro.wd,o))},o=t=>{if(t.ad===this.Jc){if(null!==this.Sd){const s=String(this.Sd.type),e=String(this.Sd.amount);i&&po(i,JSON.stringify([s,e]))}else i&&qo(i,"closed with no reward");this.Sd=null,this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),this.Jc.load(),document.removeEventListener(ro.dd,n),document.removeEventListener(ro.ud,r),document.removeEventListener(ro.bd,h),document.removeEventListener(ro.wd,o)}};document.addEventListener(ro.dd,n),document.addEventListener(ro.ud,r),document.addEventListener(ro.bd,h),document.addEventListener(ro.wd,o)}self._d=so}{const Uo=self.Ec,Vo=Uo.Dc,Wo=Uo.Fc,Xo=!!self.cordova&&"ios"===self.cordova.platformId,Yo=!!self.cordova&&"android"===self.cordova.platformId,Zo=0,$o=2,_o=1,ap=3;class bp{constructor(){this.Od="UNKNOWN",this.Id="",this.Rd=0,this.Cd="UNKNOWN",this.kd="not-determined",this.Pd=!1}async tt(){Uo.Nc.debug&&await self.consent.reset()}Td(){return this.Od}async Ld(){Xo&&await self.admob.requestTrackingAuthorization()}async Md(){if(Yo)return this.kd="not-determined";const t=self.cordova.plugins.idfa,s=await t.getInfo();if(!s.trackingLimited)return this.kd="authorized";switch(s.trackingPermission){case t.TRACKING_PERMISSION_NOT_DETERMINED:return this.kd="not-determined";case t.TRACKING_PERMISSION_RESTRICTED:case t.TRACKING_PERMISSION_DENIED:return this.kd="denied";case t.TRACKING_PERMISSION_AUTHORIZED:return this.kd="authorized"}}async xd(t){return Yo?Vo(t,"not-determined"):Xo?(await _UpdateRequestLocationInEEAorUnknown.call(this),"true"===this.Id?await this.Ld():(await this.Md(),"not-determined"===this.kd&&(await _HasConsentForm.call(this),this.Pd?await this.Ed():await this.Ld())),await this.Md(),Vo(t,this.kd)):void 0}async Dd(t,s,e){const i=await _RequestInfoUpdateForTesting.call(this,t,s,t=>{t?"object"==typeof t?Wo(e,t.message):Wo(e,t):Wo(e,"requestInfoUpdate error")});return i}async Fd(t,s,e){await _RequestInfoUpdateForTesting.call(this,t,s)}async Ud(t,s=!1){switch(await _UpdateConsentStatus.call(this),t){case"eu":{const e=await _HasConsentForm.call(this),i=_NeedsConsent.call(this);if(i&&e){const n=await self.consent.loadForm();await n.show()}break}case"always":{const h=await _HasConsentForm.call(this),r=await _UpdateRequestLocationInEEAorUnknown.call(this);if(h&&"true"===r){const o=await self.consent.loadForm();await o.show()}else if(h&&s){const a=await self.consent.loadForm();await a.show()}break}}await _UpdateConsentStatus.call(this),await _UpdateRequestLocationInEEAorUnknown.call(this),await _UpdateAdPersonalization.call(this)}async Ed(t){await this.Ud("always",!0)}async Gd(){await _UpdateConsentStatus.call(this),await _UpdateRequestLocationInEEAorUnknown.call(this),await _UpdateAdPersonalization.call(this)}async Wd(t){await this.Md(),Vo(t,`${this.Cd}&&${this.kd}&&`+this.Id)}async Hd(t,s){Wo(t,s)}async Bd(t){await this.Gd(),await this.Md(),Vo(t,`${this.Cd}&&${this.kd}&&`+this.Id)}}async function _HasConsentForm(){const t=await self.consent.getFormStatus();return this.Pd=t===self.consent.FormStatus.Available,this.Pd}async function _UpdateConsentStatus(){const t=await self.consent.getConsentStatus();switch(this.Rd=t,this.Rd){case _o:return this.Cd="REQUIRED";case $o:return this.Cd="NOT_REQUIRED";case ap:return this.Cd="OBTAINED";case Zo:return this.Cd="UNKNOWN"}}function _NeedsConsent(){switch(this.Rd){case _o:return!0;case $o:case ap:return!1;case Zo:return!0}}function _UpdateAdPersonalization(){switch(this.Rd){case _o:return this.Od="NON_PERSONALIZED";case $o:case ap:return this.Od="PERSONALIZED";case Zo:return this.Od="NON_PERSONALIZED"}}async function _UpdateRequestLocationInEEAorUnknown(){if(Yo)switch(this.Rd){case _o:return this.Id="true";case $o:return this.Id="false";case ap:case Zo:return this.Id="true"}if(Xo){const t=await _GetValueFromNativeStorage.call(this,"IABTCF_gdprApplies","getInt");return this.Id=t?"true":"false"}}async function _GetValueFromNativeStorage(e,i){return new Promise((s,t)=>{self.NativeStorage[i](e,t=>s(t),t=>s(1))})}async function _RequestInfoUpdateForTesting(t,s,e){let i="",n=null;if(t){switch(s){case"EEA":i=self.consent.DebugGeography.EEA;break;case"NOT_EEA":i=self.consent.DebugGeography.NotEEA;break;default:i=self.consent.DebugGeography.Disabled}const h=await Uo.Vc;n=[h]}try{return t?await self.consent.requestInfoUpdate({Nd:i,Vd:n}):await self.consent.requestInfoUpdate(),!0}catch(t){return e&&e(t),!1}}self.qd=new bp}{const Qp=(t,s)=>{let e=t[0],i=t[1],n=t[2],h=t[3];e=Sp(e,i,n,h,s[0],7,-680876936),h=Sp(h,e,i,n,s[1],12,-389564586),n=Sp(n,h,e,i,s[2],17,606105819),i=Sp(i,n,h,e,s[3],22,-1044525330),e=Sp(e,i,n,h,s[4],7,-176418897),h=Sp(h,e,i,n,s[5],12,1200080426),n=Sp(n,h,e,i,s[6],17,-1473231341),i=Sp(i,n,h,e,s[7],22,-45705983),e=Sp(e,i,n,h,s[8],7,1770035416),h=Sp(h,e,i,n,s[9],12,-1958414417),n=Sp(n,h,e,i,s[10],17,-42063),i=Sp(i,n,h,e,s[11],22,-1990404162),e=Sp(e,i,n,h,s[12],7,1804603682),h=Sp(h,e,i,n,s[13],12,-40341101),n=Sp(n,h,e,i,s[14],17,-1502002290),i=Sp(i,n,h,e,s[15],22,1236535329),e=Tp(e,i,n,h,s[1],5,-165796510),h=Tp(h,e,i,n,s[6],9,-1069501632),n=Tp(n,h,e,i,s[11],14,643717713),i=Tp(i,n,h,e,s[0],20,-373897302),e=Tp(e,i,n,h,s[5],5,-701558691),h=Tp(h,e,i,n,s[10],9,38016083),n=Tp(n,h,e,i,s[15],14,-660478335),i=Tp(i,n,h,e,s[4],20,-405537848),e=Tp(e,i,n,h,s[9],5,568446438),h=Tp(h,e,i,n,s[14],9,-1019803690),n=Tp(n,h,e,i,s[3],14,-187363961),i=Tp(i,n,h,e,s[8],20,1163531501),e=Tp(e,i,n,h,s[13],5,-1444681467),h=Tp(h,e,i,n,s[2],9,-51403784),n=Tp(n,h,e,i,s[7],14,1735328473),i=Tp(i,n,h,e,s[12],20,-1926607734),e=Up(e,i,n,h,s[5],4,-378558),h=Up(h,e,i,n,s[8],11,-2022574463),n=Up(n,h,e,i,s[11],16,1839030562),i=Up(i,n,h,e,s[14],23,-35309556),e=Up(e,i,n,h,s[1],4,-1530992060),h=Up(h,e,i,n,s[4],11,1272893353),n=Up(n,h,e,i,s[7],16,-155497632),i=Up(i,n,h,e,s[10],23,-1094730640),e=Up(e,i,n,h,s[13],4,681279174),h=Up(h,e,i,n,s[0],11,-358537222),n=Up(n,h,e,i,s[3],16,-722521979),i=Up(i,n,h,e,s[6],23,76029189),e=Up(e,i,n,h,s[9],4,-640364487),h=Up(h,e,i,n,s[12],11,-421815835),n=Up(n,h,e,i,s[15],16,530742520),i=Up(i,n,h,e,s[2],23,-995338651),e=Vp(e,i,n,h,s[0],6,-198630844),h=Vp(h,e,i,n,s[7],10,1126891415),n=Vp(n,h,e,i,s[14],15,-1416354905),i=Vp(i,n,h,e,s[5],21,-57434055),e=Vp(e,i,n,h,s[12],6,1700485571),h=Vp(h,e,i,n,s[3],10,-1894986606),n=Vp(n,h,e,i,s[10],15,-1051523),i=Vp(i,n,h,e,s[1],21,-2054922799),e=Vp(e,i,n,h,s[8],6,1873313359),h=Vp(h,e,i,n,s[15],10,-30611744),n=Vp(n,h,e,i,s[6],15,-1560198380),i=Vp(i,n,h,e,s[13],21,1309151649),e=Vp(e,i,n,h,s[4],6,-145523070),h=Vp(h,e,i,n,s[11],10,-1120210379),n=Vp(n,h,e,i,s[2],15,718787259),i=Vp(i,n,h,e,s[9],21,-343485551),t[0]=r(e,t[0]),t[1]=r(i,t[1]),t[2]=r(n,t[2]),t[3]=r(h,t[3])},Rp=(t,s,e,i,n,h)=>(s=r(r(s,t),r(i,h)),r(s<<n|s>>>32-n,e)),Sp=(t,s,e,i,n,h,r)=>Rp(s&e|~s&i,t,s,n,h,r),Tp=(t,s,e,i,n,h,r)=>Rp(s&i|e&~i,t,s,n,h,r),Up=(t,s,e,i,n,h,r)=>Rp(s^e^i,t,s,n,h,r),Vp=(t,s,e,i,n,h,r)=>Rp(e^(s|~i),t,s,n,h,r),Wp=t=>{const s=t.length,e=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=t.length;i+=64)Qp(e,Xp(t.substring(i-64,i)));t=t.substring(i-64);const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)n[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(n[i>>2]|=128<<(i%4<<3),55<i)for(Qp(e,n),i=0;i<16;i++)n[i]=0;return n[14]=8*s,Qp(e,n),e},Xp=s=>{const e=[];for(let t=0;t<64;t+=4)e[t>>2]=s.charCodeAt(t)+(s.charCodeAt(t+1)<<8)+(s.charCodeAt(t+2)<<16)+(s.charCodeAt(t+3)<<24);return e},Yp="0123456789abcdef".split(""),Zp=s=>{let e="";for(let t=0;t<4;t++)e+=Yp[s>>8*t+4&15]+Yp[s>>8*t&15];return e},$p=s=>{for(let t=0;t<s.length;t++)s[t]=Zp(s[t]);return s.join("")},_p=t=>$p(Wp(t));let r=(t,s)=>t+s&4294967295;if("5d41402abc4b2a76b9719d911017c592"!=_p("hello")){let t=(t,s)=>{const e=(65535&t)+(65535&s),i=(t>>16)+(s>>16)+(e>>16);return i<<16|65535&e}}self.xc=_p}{const ir=self.Ec,jr=self.qd,kr=self.ld,lr=self.vd,mr=self.Ad,nr=self._d;let l=null,r=null,a=null,c=null,o=null;const tr={},ur=(t,s)=>{tr[t]=s};ur("CreateBannerAdvert",async(t,s,e,i,n,h,r,o)=>{if(await ir.Uc(o,e)){n&&l&&(await l.ad(),await l.hd(()=>!0),l.et(),l=null);const a=await jr.Td();(l=l||new kr(t,s,i,h,r,o)).oo(a,o)}}),ur("ShowBannerAdvert",async t=>{if(!l)return ir.Fc(t,"banner ad not created");l.nd(t)}),ur("HideBannerAdvert",async t=>{if(!l)return ir.Fc(t,"banner ad not created");l.hd(t)}),ur("CreateInterstitialAdvert",async(t,s,e)=>{if(r){if(r.od())return ir.Dc(e,"interstitial ad already showing");if(r.rd()){const i=await r.pd();r.gd(i,e)}else{const n=await jr.Td();r.oo(n,e)}}else if(await ir.Uc(e,s)){const h=await jr.Td();(r=new lr(t,e)).oo(h,e)}}),ur("ShowInterstitialAdvert",async t=>{if(!r)return ir.Fc(t,"interstitial ad not created");r.nd(t)}),ur("CreateVideoAdvert",async(t,s,e)=>{if(a||c){if(c){if(c.od())return ir.Dc(e,"rewarded ad already showing");if(c.rd()){const i=await c.pd();c.gd(i,e)}else{const n=await jr.Td();c.oo(n,e)}return}if(a){if(a.od())return ir.Dc(e,"rewarded ad already showing");if(a.rd()){const h=await a.pd();a.gd(h,e)}else{const r=await jr.Td();a.oo(r,e)}return}}if(await ir.Uc(e,s)){const o=await jr.Td();(a=new mr(t,e)).oo(o,e)}}),ur("ShowVideoAdvert",async t=>{if(!a)return ir.Fc(t,"video ad not created");a.nd(t)}),ur("CreateRewardedAdvert",async(t,s,e)=>{if(c||a){if(c){if(c.od())return ir.Dc(e,"rewarded ad already showing");if(c.rd()){const i=await c.pd();c.gd(i,e)}else{const n=await jr.Td();c.oo(n,e)}return}if(a){if(a.od())return ir.Dc(e,"rewarded ad already showing");if(a.rd()){const h=await a.pd();a.gd(h,e)}else{const r=await jr.Td();a.oo(r,e)}return}}if(await ir.Uc(e,s)){const o=await jr.Td();(c=new mr(t,e)).oo(o,e)}}),ur("ShowRewardedAdvert",async t=>{if(!c)return ir.Fc(t,"rewarded ad not created");c.nd(t)}),ur("CreateRewardedInterstitialAdvert",async(t,s,e)=>{if(o){if(o.od())return ir.Dc(e,"rewarded interstitial ad already showing");if(o.rd()){const i=await o.pd();o.gd(i,e)}else{const n=await jr.Td();o.oo(n,e)}}else if(await ir.Uc(e,s)){const h=await jr.Td();(o=new nr(t,e)).oo(h,e)}}),ur("ShowRewardedInterstitialAdvert",async t=>{if(!o)return ir.Fc(t,"rewarded interstitial ad not created");o.nd(t)}),ur("Configure",async(t,s,e,i,n,h,r,o,a)=>{const l=!ir.Hc();return ir.Wc(t,s,e,i,n,h,r),await ir.Uc(a,h)?(l&&await jr.tt(),await jr.Dd(h,r,a)?(l?o?await jr.Ud("eu"):await jr.Gd():await jr.Ud("always"),void await jr.Wd(a)):jr.Hd(a,"failure to update consent information")):jr.Hd(a,"failure to initialize")}),ur("RequestConsent",async t=>{tr.Configure(ir.Nc.id,ir.Nc.kc,ir.Nc.Pc,ir.Nc.Tc,"always",ir.Nc.debug,ir.Nc.Mc,!1,t)}),ur("SetMaxAdContentRating",async(t,s)=>{if(await ir.Uc(s)){if(!t)return ir.Fc(s,"Label not specified");try{ir.Gc("maxAdContentRating",t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}}),ur("TagForChildDirectedTreatment",async(t,s)=>{if(await ir.Uc(s))try{ir.Gc("tagForChildDirectedTreatment",1===t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}),ur("TagForUnderAgeOfConsent",async(t,s)=>{if(await ir.Uc(s))try{ir.Gc("tagForUnderAgeOfConsent",1===t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}),ur("RequestIDFA",async t=>{await ir.Uc(t)&&jr.xd(t)}),ur("StatusUpdate",async(t,s,e)=>{if(!await ir.Uc(e,t))return jr.Hd(e,"failure to initialize");await jr.Fd(t,s,e),await jr.Bd(e)}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.real=tr}{const Hs="PERSONALIZED",Is={},Js=(t,s)=>Is[t]=s,Ks=s=>new Promise(t=>setTimeout(t,s));let e=null,i=null,n=null,h=null,r=null;function getArgument(t,s){const e=s.slice(0,-1),i=s[s.length-1];return console.log(t,e),[e,i]}Js("CreateBannerAdvert",async(...t)=>{const[,s]=getArgument("CreateBannerAdvert",t);await Ks(50),e?s("Banner already exists"):(e="ready",s(null,"Created banner"))}),Js("ShowBannerAdvert",async(...t)=>{const[,s]=getArgument("ShowBannerAdvert",t);await Ks(50),"ready"!=e?s("Banner cannot be shown"):(e="shown",s(null,"Showed banner"))}),Js("HideBannerAdvert",async(...t)=>{const[,s]=getArgument("HideBannerAdvert",t);await Ks(50),"shown"!=e?s("Banner cannot be hidden"):(e=null,s(null,"Hid banner"))}),Js("CreateInterstitialAdvert",async(...t)=>{const[,s]=getArgument("CreateInterstitialAdvert",t);await Ks(50),i?s("Intersitial already exists"):(i="ready",s(null,"Created interstitial"))}),Js("ShowInterstitialAdvert",async(...t)=>{const[,s]=getArgument("ShowInterstitialAdvert",t);await Ks(50),"ready"!=i?s("Cannot show interstitial"):(i=null,s(null,"Interstitial shown"))}),Js("CreateVideoAdvert",async(...t)=>{const[,s]=getArgument("CreateVideoAdvert",t);await Ks(50),n?s("Video already exists"):(n="ready",s(null,"Created video"))}),Js("ShowVideoAdvert",async(...t)=>{const[,s]=getArgument("ShowVideoAdvert",t);await Ks(50),"ready"!=n?s("Cannot show video"):(n=null,s(null,'["example type", 20]'))}),Js("CreateRewardedAdvert",async(...t)=>{const[,s]=getArgument("CreateRewardedAdvert",t);await Ks(50),h?s("Rewarded already exists"):(h="ready",s(null,"Created rewarded"))}),Js("ShowRewardedAdvert",async(...t)=>{const[,s]=getArgument("ShowRewardedAdvert",t);await Ks(50),"ready"!=h?s("Cannot show rewarded"):(h=null,s(null,'["example type", 20]'))}),Js("CreateRewardedInterstitialAdvert",async(...t)=>{const[,s]=getArgument("CreateRewardedInterstitialAdvert",t);await Ks(50),r?s("Rewarded intersitial already exists"):(r="ready",s(null,"Created rewarded interstitial"))}),Js("ShowRewardedInterstitialAdvert",async(...t)=>{const[,s]=getArgument("ShowRewardedInterstitialAdvert",t);await Ks(50),"ready"!=r?s("Cannot show rewarded interstitial"):(r=null,s(null,"Rewarded interstitial shown"))}),Js("Configure",async(...t)=>{const[,s]=getArgument("Configure",t);await Ks(50),s(null,Hs+"&&true")}),Js("RequestConsent",async(...t)=>{const[,s]=getArgument("RequestConsent",t);await Ks(50),s(null,Hs+"&&true")}),Js("RequestIDFA",async(...t)=>{const[,s]=getArgument("RequestIDFA",t);await Ks(50),s(null,"authorized")}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.fake=Is}{const yt=self.Ec,zt={},At=(t,s)=>{zt[t]=s};let s=!1,e=null;const Dt=async t=>zt.webAdsScriptLoaded?(s||(self.adsbygoogle=self.adsbygoogle||[],self.adBreak=self.adConfig=t=>self.adsbygoogle.push(t),s=!0),e=e||new Promise((t,s)=>{self.adConfig({preloadAdBreaks:"on",onReady:()=>t(!0)})})):(yt.Fc(t,"advert script not loaded, likely blocked by an ad blocker"),!1),Et=()=>{zt.suspendRuntime&&zt.suspendRuntime()},Ft=()=>{zt.resumeRuntime&&zt.resumeRuntime()};At("CreateBannerAdvert",async(t,s,e,i,n,h,r)=>{yt.Fc(r,"banner ads not supported in web platform")}),At("ShowBannerAdvert",async t=>{yt.Fc(t,"banner ads not supported in web platform")}),At("HideBannerAdvert",async t=>{yt.Fc(t,"banner ads not supported in web platform")}),At("CreateInterstitialAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"interstitial ad created")}),At("ShowInterstitialAdvert",async s=>{await Dt(s)&&self.adBreak({type:"next",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"interstitial ad show");break;default:console.table(t),yt.Fc(s,"interstitial ad failed to show")}}})}),At("CreateVideoAdvert",async(t,s,e)=>{yt.Fc(e,"video ads are deprecated")}),At("ShowVideoAdvert",async t=>{yt.Fc(t,"video ads are deprecated")}),At("CreateRewardedAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"rewarded ad created")}),At("ShowRewardedAdvert",async s=>{await Dt(s)&&self.adBreak({type:"reward",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"rewarded ad show");break;case"ignored":yt.Fc(s,"rewarded ad ignored");break;default:console.table(t),yt.Fc(s,"rewarded ad failed to show")}},beforeReward:t=>{t()},adDismissed:()=>{yt.Fc(s,"closed with no reward")},adViewed:()=>{yt.Dc(s,JSON.stringify(["Reward",1]))}})}),At("CreateRewardedInterstitialAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"rewarded interstitial ad created")}),At("ShowRewardedInterstitialAdvert",async s=>{await Dt(s)&&self.adBreak({type:"reward",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"rewarded interstitial ad show");break;case"ignored":yt.Fc(s,"rewarded interstitial ad ignored");break;default:console.table(t),yt.Fc(s,"rewarded interstitial ad failed to show")}},beforeReward:t=>{t()},adDismissed:()=>{yt.Fc(s,"closed with no reward")},adViewed:()=>{yt.Dc(s,JSON.stringify(["Reward",1]))}})}),At("Configure",async(t,s,e,i,n,h,r,o,a)=>{zt.webAdsScriptLoaded?yt.Dc(a,"UNKNOWN&¬-determined&&true"):yt.Fc(a,"advert script not loaded, likely blocked by an ad blocker")}),At("RequestConsent",async t=>{yt.Dc(t,"UNKNOWN&¬-determined&&true")}),At("SetMaxAdContentRating",async(t,s)=>{yt.Fc(s,"setting max ad content rating not supported in web platform")}),At("TagForChildDirectedTreatment",async(t,s)=>{yt.Fc(s,"tagging for children not supported in web platform")}),At("TagForUnderAgeOfConsent",async(t,s)=>{yt.Fc(s,"tagging for under age of consent not supported in web platform")}),At("RequestIDFA",async t=>{yt.Dc(t,"not-determined")}),At("StatusUpdate",async(t,s,e)=>{yt.Dc(e,"UNKNOWN&¬-determined&&true")}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.web=zt}{const Iu="advert",Ju=!1;let t=!1;const Lu=class extends self.i{constructor(t){super(t,Iu);const s=s=>[s,t=>this.zd(s,t)];this.T([s("CreateBannerAdvert"),s("ShowBannerAdvert"),s("HideBannerAdvert"),s("CreateInterstitialAdvert"),s("ShowInterstitialAdvert"),s("CreateVideoAdvert"),s("ShowVideoAdvert"),s("CreateRewardedAdvert"),s("ShowRewardedAdvert"),s("CreateRewardedInterstitialAdvert"),s("ShowRewardedInterstitialAdvert"),s("Configure"),s("RequestConsent"),s("SetUserPersonalisation"),s("SetMaxAdContentRating"),s("TagForChildDirectedTreatment"),s("TagForUnderAgeOfConsent"),s("RequestIDFA"),s("StatusUpdate"),["AddScript",t=>this.jd(t[0],t[1])]])}$d(){return self.cordova?self.C3MobileAdvertsAPI.real:(self.cordova,Ju?Ju?self.C3MobileAdvertsAPI.fake:void 0:self.C3MobileAdvertsAPI.web)}Kd(){const t=this.L();t.S("runtime","visibilitychange",{hidden:!0})}Zd(){const t=this.L();t.S("runtime","visibilitychange",{hidden:!1})}Yd(){const t=this.L();t&&(t.te(),t.S("runtime","window-resize",{innerWidth:t.we(),innerHeight:t.fe(),devicePixelRatio:self.devicePixelRatio,isFullscreen:self.Qt.pe(),cssDisplayMode:t.me()}))}async zd(s,n){const h=this.$d();if(h.suspendRuntime||(h.suspendRuntime=()=>this.Kd()),h.resumeRuntime||(h.resumeRuntime=()=>this.Zd()),h.forceResize||(h.forceResize=()=>this.Yd()),h)return new Promise((e,i)=>{const t=h[s];t(...n,(t,s)=>{t?i(t):e(s)})});throw t||(t=!0,console.warn("The Mobile Advert plugin is not loaded. Please note that it only works in Android or iOS exports")),new Error("advert plugin not loaded")}async jd(i,n=null){const h=this.$d();return h.webAdsScriptLoaded=!1,new Promise((s,t)=>{const e=document.createElement("script");if(n)for(let t in n)e.setAttribute(t,n[t]);e.onload=function(){h.webAdsScriptLoaded=!0,s()},e.onerror=function(t){h.webAdsScriptLoaded=!1,s()},e.src=i,document.head.appendChild(e)})}};self.Qt.Ge(Lu)}if(window.C3_Is_Supported){const iv=!0;window.c3_runtimeInterface=new self.Qt({ss:iv,ge:"workermain.js",runtimeScriptList:["scripts/c3main.js"],scriptFolder:"scripts/",exportType:"html5"})}
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0.01 |
proxy
|
phpinfo
|
�а�тройка