(()=>{var AH=Object.create;var{getPrototypeOf:TH,defineProperty:O7,getOwnPropertyNames:$G,getOwnPropertyDescriptor:wH}=Object,JG=Object.prototype.hasOwnProperty;var kK=(G,J,Z)=>{Z=G!=null?AH(TH(G)):{};let $=J||!G||!G.__esModule?O7(Z,"default",{value:G,enumerable:!0}):Z;for(let K of $G(G))if(!JG.call($,K))O7($,K,{get:()=>G[K],enumerable:!0});return $},e6=new WeakMap,_z=(G)=>{var J=e6.get(G),Z;if(J)return J;if(J=O7({},"__esModule",{value:!0}),G&&typeof G==="object"||typeof G==="function")$G(G).map(($)=>!JG.call(J,$)&&O7(J,$,{get:()=>G[$],enumerable:!(Z=wH(G,$))||Z.enumerable}));return e6.set(G,J),J},SK=(G,J)=>()=>(J||G((J={exports:{}}).exports,J),J.exports);var X8=(G,J)=>{for(var Z in J)O7(G,Z,{get:J[Z],enumerable:!0,configurable:!0,set:($)=>J[Z]=()=>$})};var YW=SK((a7,eQ)=>{(function(J,Z){if(typeof a7==="object"&&typeof eQ==="object")eQ.exports=Z();else if(typeof define==="function"&&define.amd)define([],Z);else if(typeof a7==="object")a7.rive=Z();else J.rive=Z()})(a7,()=>{return(()=>{var G=[,(K,Q,W)=>{W.r(Q),W.d(Q,{default:()=>q});var z=(()=>{var Y=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(X={}){var H=X,O,N;H.ready=new Promise((U,F)=>{O=U,N=F});function B(){function U(i){let $0=M;j=F=0,M=new Map,$0.forEach((z0)=>{try{z0(i)}catch(Q0){console.error(Q0)}}),this.ob(),v&&v.Qb()}let F=0,j=0,M=new Map,v=null,m=null;this.requestAnimationFrame=function(i){F||(F=requestAnimationFrame(U.bind(this)));let $0=++j;return M.set($0,i),$0},this.cancelAnimationFrame=function(i){M.delete(i),F&&M.size==0&&(cancelAnimationFrame(F),F=0)},this.Ob=function(i){m&&(document.body.remove(m),m=null),i||(m=document.createElement("div"),m.style.backgroundColor="black",m.style.position="fixed",m.style.right=0,m.style.top=0,m.style.color="white",m.style.padding="4px",m.innerHTML="RIVE FPS",i=function($0){m.innerHTML="RIVE FPS "+$0.toFixed(1)},document.body.appendChild(m)),v=new function(){let $0=0,z0=0;this.Qb=function(){var Q0=performance.now();z0?(++$0,Q0-=z0,1000>8,U.has(j)&&clearTimeout(U.get(j)),U.set(j,setTimeout(function(){U.delete(j),U.length==0?F=-1/0:j==F&&(F=Math.max(...U.keys()),console.assert(F{let m=H.ptrToFileAsset(v);return m.isImage?H.ptrToImageAsset(v):m.isFont?H.ptrToFontAsset(v):m.isAudio?H.ptrToAudioAsset(v):m},H.CustomFileAssetLoader=j.extend("CustomFileAssetLoader",{__construct:function({loadContents:v}){this.__parent.__construct.call(this),this.Eb=v},loadContents:function(v,m){return v=H.ptrToAsset(v),this.Eb(v,m)}}),H.CDNFileAssetLoader=j.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(v){let m=H.ptrToAsset(v);if(v=m.cdnUuid,v==="")return!1;return function(i,$0){var z0=new XMLHttpRequest;z0.responseType="arraybuffer",z0.onreadystatechange=function(){z0.readyState==4&&z0.status==200&&$0(z0)},z0.open("GET",i,!0),z0.send(null)}(m.cdnBaseUrl+"/"+v,(i)=>{m.decode(new Uint8Array(i.response))}),!0}}),H.FallbackFileAssetLoader=j.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(v){this.kb.push(v)},loadContents:function(v,m){for(let i of this.kb)if(i.loadContents(v,m))return!0;return!1}});let M=H.computeAlignment;H.computeAlignment=function(v,m,i,$0,z0=1){return M.call(this,v,m,i,$0,z0)}};let y=H.onRuntimeInitialized;H.onRuntimeInitialized=function(){function U(N0){this.F=N0,this.Db=N0.getContext("2d"),this.Gb=M,this.S=[],this.la=0,this.clear=function(){console.assert(this.la==0),this.S=[],v.delete(this)},this.save=function(){++this.la,this.S.push(M.save.bind(M))},this.restore=function(){0=Z1)){w0=1<<(0>=w0?0:32-Math.clz32(w0-1));for(t0=1<<(0>=t0?0:32-Math.clz32(t0-1));t0*w0PK.La-Y$.La),Z1=new H.DynamicRectanizer(N0);for(U8=0;U8t1){console.assert(K8>U8);break}R8.ra=t1&65535,R8.sa=t1>>16}R8=z0.push(Z1.drawWidth()),t1=Q0.push(Z1.drawHeight()),console.assert(R8>=Z1.drawWidth()),console.assert(t1>=Z1.drawHeight()),console.assert(R8<=N0),console.assert(t1<=N0),M.F.width!=R8&&(M.F.width=R8),M.F.height!=t1&&(M.F.height=t1),M.clear();for(R8=U8;R8{this.Hb||$0.call(this,N0.Gb)}):$0.call(this,N0)};let z0=new R,Q0=new R,I0=new B;H.requestAnimationFrame=I0.requestAnimationFrame.bind(I0),H.cancelAnimationFrame=I0.cancelAnimationFrame.bind(I0),H.enableFPSCounter=I0.Ob.bind(I0),I0.ob=j,H.resolveAnimationFrame=j;let f0=H.load;H.load=function(N0,w0,t0=!0){let Z1=new H.FallbackFileAssetLoader;return w0!==void 0&&Z1.addLoader(w0),t0&&(w0=new H.CDNFileAssetLoader,Z1.addLoader(w0)),Promise.resolve(f0(N0,Z1))};let d0=H.WebGL2Renderer.prototype.clear;H.WebGL2Renderer.prototype.clear=function(){BK(this.Na);let N0=this.F;if(this.Oa!=N0.width||this.ab!=N0.height)this.resize(N0.width,N0.height),this.Oa=N0.width,this.ab=N0.height;d0.call(this)},H.decodeImage=function(N0,w0){N0=H.decodeWebGL2Image(N0),w0(N0)};let G0=H.Renderer.prototype.align;H.Renderer.prototype.align=function(N0,w0,t0,Z1,L1=1){G0.call(this,N0,w0,t0,Z1,L1)}};var h=Object.assign({},H),C="./this.program",A=typeof window=="object",b=typeof importScripts=="function",x="",k,f;if(A||b)b?x=self.location.href:typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),Y&&(x=Y),x.indexOf("blob:")!==0?x=x.substr(0,x.replace(/[?#].*/,"").lastIndexOf("/")+1):x="",b&&(f=(U)=>{var F=new XMLHttpRequest;return F.open("GET",U,!1),F.responseType="arraybuffer",F.send(null),new Uint8Array(F.response)}),k=(U,F,j)=>{var M=new XMLHttpRequest;M.open("GET",U,!0),M.responseType="arraybuffer",M.onload=()=>{M.status==200||M.status==0&&M.response?F(M.response):j()},M.onerror=j,M.send(null)};var T=H.print||console.log.bind(console),_=H.printErr||console.error.bind(console);Object.assign(H,h),h=null,H.thisProgram&&(C=H.thisProgram);var d;H.wasmBinary&&(d=H.wasmBinary);var s=H.noExitRuntime||!0;typeof WebAssembly!="object"&&$1("no native wasm support detected");var t,e,Z0=!1,U0,H0,C0,B0,l,E0,h0,P0;function M0(){var U=t.buffer;H.HEAP8=U0=new Int8Array(U),H.HEAP16=C0=new Int16Array(U),H.HEAP32=l=new Int32Array(U),H.HEAPU8=H0=new Uint8Array(U),H.HEAPU16=B0=new Uint16Array(U),H.HEAPU32=E0=new Uint32Array(U),H.HEAPF32=h0=new Float32Array(U),H.HEAPF64=P0=new Float64Array(U)}var i0,A0=[],J1=[],e0=[];function G1(){var U=H.preRun.shift();A0.unshift(U)}var n0=0,F1=null,B1=null;function $1(U){if(H.onAbort)H.onAbort(U);throw U="Aborted("+U+")",_(U),Z0=!0,U=new WebAssembly.RuntimeError(U+". Build with -sASSERTIONS for more info."),N(U),U}function D1(U){return U.startsWith("data:application/octet-stream;base64,")}var f1="webgl2_advanced.wasm";if(!D1(f1)){var H1=f1;f1=H.locateFile?H.locateFile(H1,x):x+H1}function r(U){if(U==f1&&d)return new Uint8Array(d);if(f)return f(U);throw"both async and sync fetching of the wasm failed"}function o1(U){if(!d&&(A||b)){if(typeof fetch=="function"&&!U.startsWith("file://"))return fetch(U,{credentials:"same-origin"}).then((F)=>{if(!F.ok)throw"failed to load wasm binary file at '"+U+"'";return F.arrayBuffer()}).catch(()=>r(U));if(k)return new Promise((F,j)=>{k(U,(M)=>F(new Uint8Array(M)),j)})}return Promise.resolve().then(()=>r(U))}function y1(U,F,j){return o1(U).then((M)=>WebAssembly.instantiate(M,F)).then((M)=>M).then(j,(M)=>{_("failed to asynchronously prepare wasm: "+M),$1(M)})}function L8(U,F){var j=f1;return d||typeof WebAssembly.instantiateStreaming!="function"||D1(j)||j.startsWith("file://")||typeof fetch!="function"?y1(j,U,F):fetch(j,{credentials:"same-origin"}).then((M)=>WebAssembly.instantiateStreaming(M,U).then(F,function(v){return _("wasm streaming compile failed: "+v),_("falling back to ArrayBuffer instantiation"),y1(j,U,F)}))}var O1,g,V={535063:(U,F,j,M,v)=>{if(typeof window>"u"||(window.AudioContext||window.webkitAudioContext)===void 0)return 0;if(typeof window.h>"u"){window.h={Ga:0},window.h.I={},window.h.I.Ea=U,window.h.I.capture=F,window.h.I.Ra=j,window.h.ja={},window.h.ja.stopped=M,window.h.ja.xb=v;let m=window.h;m.D=[],m.rc=function(i){for(var $0=0;$0{i6($0.pb)},(z0)=>{console.error("Failed to resume audiocontext",z0)})}m.Za.map(function(z0){document.removeEventListener(z0,m.unlock,!0)})},m.Za.map(function(i){document.addEventListener(i,m.unlock,!0)})}return window.h.Ga+=1,1},537241:()=>{typeof window.h<"u"&&(window.h.Za.map(function(U){document.removeEventListener(U,window.h.unlock,!0)}),--window.h.Ga,window.h.Ga===0&&delete window.h)},537545:()=>navigator.mediaDevices!==void 0&&navigator.mediaDevices.getUserMedia!==void 0,537649:()=>{try{var U=new(window.AudioContext||window.webkitAudioContext),F=U.sampleRate;return U.close(),F}catch(j){return 0}},537820:(U,F,j,M,v,m)=>{if(typeof window.h>"u")return-1;var i={},$0={};return U==window.h.I.Ea&&j!=0&&($0.sampleRate=j),i.J=new(window.AudioContext||window.webkitAudioContext)($0),i.J.suspend(),i.state=window.h.ja.stopped,j=0,U!=window.h.I.Ea&&(j=F),i.Z=i.J.createScriptProcessor(M,j,F),i.Z.onaudioprocess=function(z0){if(i.wa==null||i.wa.length==0)i.wa=new Float32Array(h0.buffer,v,M*F);if(U==window.h.I.capture||U==window.h.I.Ra){for(var Q0=0;Q0window.h.va(U).J.sampleRate,540770:(U)=>{U=window.h.va(U),U.Z!==void 0&&(U.Z.onaudioprocess=function(){},U.Z.disconnect(),U.Z=void 0),U.Ha!==void 0&&(U.Ha.disconnect(),U.Ha=void 0),U.J.close(),U.J=void 0,U.pb=void 0},541170:(U)=>{window.h.Bb(U)},541220:(U)=>{U=window.h.va(U),U.J.resume(),U.state=window.h.ja.xb},541359:(U)=>{U=window.h.va(U),U.J.suspend(),U.state=window.h.ja.stopped}},D=(U)=>{for(;0{for(var j=0,M=U.length-1;0<=M;M--){var v=U[M];v==="."?U.splice(M,1):v===".."?(U.splice(M,1),j++):j&&(U.splice(M,1),j--)}if(F)for(;j;j--)U.unshift("..");return U},E=(U)=>{var F=U.charAt(0)==="/",j=U.substr(-1)==="/";return(U=L(U.split("/").filter((M)=>!!M),!F).join("/"))||F||(U="."),U&&j&&(U+="/"),(F?"/":"")+U},w=(U)=>{var F=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(U).slice(1);if(U=F[0],F=F[1],!U&&!F)return".";return F&&(F=F.substr(0,F.length-1)),U+F},p=(U)=>{if(U==="/")return"/";U=E(U),U=U.replace(/\/$/,"");var F=U.lastIndexOf("/");return F===-1?U:U.substr(F+1)},n=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return(U)=>crypto.getRandomValues(U);$1("initRandomDevice")},W0=(U)=>(W0=n())(U);function q0(){for(var U="",F=!1,j=arguments.length-1;-1<=j&&!F;j--){if(F=0<=j?arguments[j]:"/",typeof F!="string")throw TypeError("Arguments to path.resolve must be strings");if(!F)return"";U=F+"/"+U,F=F.charAt(0)==="/"}return U=L(U.split("/").filter((M)=>!!M),!F).join("/"),(F?"/":"")+U||"."}var L0=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,j0=(U,F,j)=>{var M=F+j;for(j=F;U[j]&&!(j>=M);)++j;if(16v?M+=String.fromCharCode(v):(v-=65536,M+=String.fromCharCode(55296|v>>10,56320|v&1023))}}else M+=String.fromCharCode(v)}return M},g0=[],p0=(U)=>{for(var F=0,j=0;j=M?F++:2047>=M?F+=2:55296<=M&&57343>=M?(F+=4,++j):F+=3}return F},z1=(U,F,j,M)=>{if(!(0=i){var $0=U.charCodeAt(++m);i=65536+((i&1023)<<10)|$0&1023}if(127>=i){if(j>=M)break;F[j++]=i}else{if(2047>=i){if(j+1>=M)break;F[j++]=192|i>>6}else{if(65535>=i){if(j+2>=M)break;F[j++]=224|i>>12}else{if(j+3>=M)break;F[j++]=240|i>>18,F[j++]=128|i>>12&63}F[j++]=128|i>>6&63}F[j++]=128|i&63}}return F[j]=0,j-v};function W1(U,F){var j=Array(p0(U)+1);return U=z1(U,j,0,j.length),F&&(j.length=U),j}var N1=[];function _0(U,F){N1[U]={input:[],G:[],V:F},W8(U,R1)}var R1={open:function(U){var F=N1[U.node.Fa];if(!F)throw new X0(43);U.s=F,U.seekable=!1},close:function(U){U.s.V.ua(U.s)},ua:function(U){U.s.V.ua(U.s)},read:function(U,F,j,M){if(!U.s||!U.s.V.jb)throw new X0(60);for(var v=0,m=0;m=F||(F=Math.max(F,j*(1048576>j?2:1.125)>>>0),j!=0&&(F=Math.max(F,256)),j=U.j,U.j=new Uint8Array(F),0=U.node.v)return 0;if(U=Math.min(U.node.v-v,M),8F)throw new X0(28);return F},ta(U,F,j){g1(U.node,F+j),U.node.v=Math.max(U.node.v,F+j)},lb(U,F,j,M,v){if((U.node.mode&61440)!==32768)throw new X0(43);if(U=U.node.j,v&2||U.buffer!==U0.buffer){if(0{if(U=q0(U),!U)return{path:"",node:null};if(F=Object.assign({hb:!0,Wa:0},F),8!!i);for(var j=h1,M="/",v=0;v{for(var F;;){if(U===U.parent)return U=U.U.mb,F?U[U.length-1]!=="/"?`${U}/${F}`:U+F:U;F=F?`${U.name}/${F}`:U.name,U=U.parent}},Q1=(U,F)=>{for(var j=0,M=0;M>>0)%X1.length},c1=(U,F)=>{var j;if(j=(j=v1(U,"x"))?j:U.l.ma?0:2)throw new X0(j,U);for(j=X1[Q1(U.id,F)];j;j=j.ec){var M=j.name;if(j.parent.id===U.id&&M===F)return j}return U.l.ma(U,F)},J8=(U,F,j,M)=>{return U=new p6(U,F,j,M),F=Q1(U.parent.id,U.name),U.ec=X1[F],X1[F]=U},s1=(U)=>{var F=["r","w","rw"][U&3];return U&512&&(F+="w"),F},v1=(U,F)=>{if(T0)return 0;if(!F.includes("r")||U.mode&292){if(F.includes("w")&&!(U.mode&146)||F.includes("x")&&!(U.mode&73))return 2}else return 2;return 0},_1=(U,F)=>{try{return c1(U,F),20}catch(j){}return v1(U,"wx")},n8=()=>{for(var U=0;4096>=U;U++)if(!l0[U])return U;throw new X0(33)},P1=(U)=>{if(U=l0[U],!U)throw new X0(8);return U},A8=(U,F=-1)=>{return a8||(a8=function(){this.h={}},a8.prototype={},Object.defineProperties(a8.prototype,{object:{get(){return this.node},set(j){this.node=j}},flags:{get(){return this.h.flags},set(j){this.h.flags=j}},position:{get(){return this.h.position},set(j){this.h.position=j}}})),U=Object.assign(new a8,U),F==-1&&(F=n8()),U.X=F,l0[F]=U},H9={open:(U)=>{U.m=U1[U.node.Fa].m,U.m.open&&U.m.open(U)},ba:()=>{throw new X0(70)}},W8=(U,F)=>{U1[U]={m:F}},$8=(U,F)=>{var j=F==="/",M=!F;if(j&&h1)throw new X0(10);if(!j&&!M){var v=m0(F,{hb:!1});if(F=v.path,v=v.node,v.Da)throw new X0(10);if((v.mode&61440)!==16384)throw new X0(54)}F={type:U,Nc:{},mb:F,dc:[]},U=U.U(F),U.U=F,F.root=U,j?h1=U:v&&(v.Da=F,v.U&&v.U.dc.push(F))},m1=(U,F,j)=>{var M=m0(U,{parent:!0}).node;if(U=p(U),!U||U==="."||U==="..")throw new X0(28);var v=_1(M,U);if(v)throw new X0(v);if(!M.l.Ca)throw new X0(63);return M.l.Ca(M,U,F,j)},x8=(U,F,j)=>{typeof j>"u"&&(j=F,F=438),m1(U,F|8192,j)},m9=(U,F)=>{if(!q0(U))throw new X0(44);var j=m0(F,{parent:!0}).node;if(!j)throw new X0(44);F=p(F);var M=_1(j,F);if(M)throw new X0(M);if(!j.l.Ia)throw new X0(63);j.l.Ia(j,F,U)},N8=(U)=>{if(U=m0(U).node,!U)throw new X0(44);if(!U.l.na)throw new X0(28);return q0(G8(U.parent),U.l.na(U))},a1=(U,F,j)=>{if(U==="")throw new X0(44);if(typeof F=="string"){var M={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[F];if(typeof M>"u")throw Error(`Unknown file open mode: ${F}`);F=M}if(j=F&64?(typeof j>"u"?438:j)&4095|32768:0,typeof U=="object")var v=U;else{U=E(U);try{v=m0(U,{gb:!(F&131072)}).node}catch(m){}}if(M=!1,F&64)if(v){if(F&128)throw new X0(20)}else v=m1(U,j,0),M=!0;if(!v)throw new X0(44);if((v.mode&61440)===8192&&(F&=-513),F&65536&&(v.mode&61440)!==16384)throw new X0(54);if(!M&&(j=v?(v.mode&61440)===40960?32:(v.mode&61440)===16384&&(s1(F)!=="r"||F&512)?31:v1(v,s1(F)):44))throw new X0(j);if(F&512&&!M){if(j=v,j=typeof j=="string"?m0(j,{gb:!0}).node:j,!j.l.P)throw new X0(63);if((j.mode&61440)===16384)throw new X0(31);if((j.mode&61440)!==32768)throw new X0(28);if(M=v1(j,"w"))throw new X0(M);j.l.P(j,{size:0,timestamp:Date.now()})}return F&=-131713,v=A8({node:v,path:G8(v),flags:F,seekable:!0,position:0,m:v.m,sc:[],error:!1}),v.m.open&&v.m.open(v),!H.logReadFiles||F&1||(h8||(h8={}),(U in h8)||(h8[U]=1)),v},r8=(U,F,j)=>{if(U.X===null)throw new X0(8);if(!U.seekable||!U.m.ba)throw new X0(70);if(j!=0&&j!=1&&j!=2)throw new X0(28);U.position=U.m.ba(U,F,j),U.sc=[]},H8=()=>{X0||(X0=function(U,F){this.name="ErrnoError",this.node=F,this.ic=function(j){this.aa=j},this.ic(U),this.message="FS error"},X0.prototype=Error(),X0.prototype.constructor=X0,[44].forEach((U)=>{s0[U]=new X0(U),s0[U].stack=""}))},S$,E8=(U,F,j)=>{U=E("/dev/"+U);var M=K1(!!F,!!j);u8||(u8=64);var v=u8++<<8|0;W8(v,{open:(m)=>{m.seekable=!1},close:()=>{j&&j.buffer&&j.buffer.length&&j(10)},read:(m,i,$0,z0)=>{for(var Q0=0,I0=0;I0{for(var Q0=0;Q0>2]}function WZ(U){if(U===void 0)return"_unknown";U=U.replace(/[^a-zA-Z0-9_]/g,"$");var F=U.charCodeAt(0);return 48<=F&&57>=F?`_${U}`:U}function IJ(U,F){return U=WZ(U),{[U]:function(){return F.apply(this,arguments)}}[U]}function PJ(){this.M=[void 0],this.ib=[]}var U9=new PJ,T$=void 0;function q1(U){throw new T$(U)}var z9=(U)=>{return U||q1("Cannot use deleted val. handle = "+U),U9.get(U).value},j9=(U)=>{switch(U){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return U9.ta({ub:1,value:U})}};function o$(U){var F=Error,j=IJ(U,function(M){this.name=U,this.message=M,M=Error(M).stack,M!==void 0&&(this.stack=this.toString()+` `+M.replace(/^Error(:[^\n]*)?\n/,""))});return j.prototype=Object.create(F.prototype),j.prototype.constructor=j,j.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},j}var G7=void 0,HZ=void 0;function Z8(U){for(var F="";H0[U];)F+=HZ[H0[U++]];return F}var i$=[];function W7(){for(;i$.length;){var U=i$.pop();U.g.ia=!1,U.delete()}}var n$=void 0,d9={};function kJ(U,F){for(F===void 0&&q1("ptr should not be undefined");U.A;)F=U.pa(F),U=U.A;return F}var H$={};function SJ(U){U=a6(U);var F=Z8(U);return X$(U),F}function U$(U,F){var j=H$[U];return j===void 0&&q1(F+" has unknown type "+SJ(U)),j}function AJ(){}var H7=!1;function UZ(U){--U.count.value,U.count.value===0&&(U.H?U.L.W(U.H):U.u.i.W(U.o))}function TJ(U,F,j){if(F===j)return U;if(j.A===void 0)return null;return U=TJ(U,F,j.A),U===null?null:j.Mb(U)}var U7={};function z7(U,F){return F=kJ(U,F),d9[F]}var zZ=void 0;function z$(U){throw new zZ(U)}function r$(U,F){return F.u&&F.o||z$("makeClassHandle requires ptr and ptrType"),!!F.L!==!!F.H&&z$("Both smartPtrType and smartPtr must be specified"),F.count={value:1},q$(Object.create(U,{g:{value:F}}))}function q$(U){if(typeof FinalizationRegistry>"u")return q$=(F)=>F,U;return H7=new FinalizationRegistry((F)=>{UZ(F.g)}),q$=(F)=>{var j=F.g;return j.H&&H7.register(F,{g:j},F),F},AJ=(F)=>{H7.unregister(F)},q$(U)}var wJ={};function a$(U){for(;U.length;){var F=U.pop();U.pop()(F)}}function w$(U){return this.fromWireType(l[U>>2])}var c9={},t$={};function i1(U,F,j){function M($0){$0=j($0),$0.length!==U.length&&z$("Mismatched type converter count");for(var z0=0;z0{H$.hasOwnProperty($0)?v[z0]=H$[$0]:(m.push($0),c9.hasOwnProperty($0)||(c9[$0]=[]),c9[$0].push(()=>{v[z0]=H$[$0],++i,i===m.length&&M(v)}))}),m.length===0&&M(v)}function q9(U){switch(U){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw TypeError(`Unknown type size: ${U}`)}}function q7(U,F,j={}){var M=F.name;if(U||q1(`type "${M}" must have a positive integer typeid pointer`),H$.hasOwnProperty(U)){if(j.Xb)return;q1(`Cannot register type '${M}' twice`)}H$[U]=F,delete t$[U],c9.hasOwnProperty(U)&&(F=c9[U],delete c9[U],F.forEach((v)=>v()))}function V9(U,F,j={}){if(!("argPackAdvance"in F))throw TypeError("registerType registeredInstance requires argPackAdvance");q7(U,F,j)}function f$(U){q1(U.g.u.i.name+" instance already deleted")}function p9(){}function S(U,F,j){if(U[F].B===void 0){var M=U[F];U[F]=function(){return U[F].B.hasOwnProperty(arguments.length)||q1(`Function '${j}' called with an invalid number of arguments (${arguments.length}) - expects one of (${U[F].B})!`),U[F].B[arguments.length].apply(this,arguments)},U[F].B=[],U[F].B[M.ha]=M}}function I(U,F,j){H.hasOwnProperty(U)?((j===void 0||H[U].B!==void 0&&H[U].B[j]!==void 0)&&q1(`Cannot register public name '${U}' twice`),S(H,U,U),H.hasOwnProperty(j)&&q1(`Cannot register multiple overloads of a function with the same number of arguments (${j})!`),H[U].B[j]=F):(H[U]=F,j!==void 0&&(H[U].Mc=j))}function u(U,F,j,M,v,m,i,$0){this.name=U,this.constructor=F,this.N=j,this.W=M,this.A=v,this.Rb=m,this.pa=i,this.Mb=$0,this.qb=[]}function c(U,F,j){for(;F!==j;)F.pa||q1(`Expected null or instance of ${j.name}, got an instance of ${F.name}`),U=F.pa(U),F=F.A;return U}function o(U,F){if(F===null)return this.Ta&&q1(`null is not a valid ${this.name}`),0;return F.g||q1(`Cannot pass "${F8(F)}" as a ${this.name}`),F.g.o||q1(`Cannot pass deleted object as a pointer of type ${this.name}`),c(F.g.o,F.g.u.i,this.i)}function a(U,F){if(F===null){if(this.Ta&&q1(`null is not a valid ${this.name}`),this.ya){var j=this.Va();return U!==null&&U.push(this.W,j),j}return 0}if(F.g||q1(`Cannot pass "${F8(F)}" as a ${this.name}`),F.g.o||q1(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.xa&&F.g.u.xa&&q1(`Cannot convert argument of type ${F.g.L?F.g.L.name:F.g.u.name} to parameter type ${this.name}`),j=c(F.g.o,F.g.u.i,this.i),this.ya)switch(F.g.H===void 0&&q1("Passing raw pointer to smart pointer is illegal"),this.mc){case 0:F.g.L===this?j=F.g.H:q1(`Cannot convert argument of type ${F.g.L?F.g.L.name:F.g.u.name} to parameter type ${this.name}`);break;case 1:j=F.g.H;break;case 2:if(F.g.L===this)j=F.g.H;else{var M=F.clone();j=this.hc(j,j9(function(){M.delete()})),U!==null&&U.push(this.W,j)}break;default:q1("Unsupporting sharing policy")}return j}function O0(U,F){if(F===null)return this.Ta&&q1(`null is not a valid ${this.name}`),0;return F.g||q1(`Cannot pass "${F8(F)}" as a ${this.name}`),F.g.o||q1(`Cannot pass deleted object as a pointer of type ${this.name}`),F.g.u.xa&&q1(`Cannot convert argument of type ${F.g.u.name} to parameter type ${this.name}`),c(F.g.o,F.g.u.i,this.i)}function K0(U,F,j,M){this.name=U,this.i=F,this.Ta=j,this.xa=M,this.ya=!1,this.W=this.hc=this.Va=this.sb=this.mc=this.fc=void 0,F.A!==void 0?this.toWireType=a:(this.toWireType=M?o:O0,this.K=null)}function F0(U,F,j){H.hasOwnProperty(U)||z$("Replacing nonexistant public symbol"),H[U].B!==void 0&&j!==void 0?H[U].B[j]=F:(H[U]=F,H[U].ha=j)}var Y0=[],k0=(U)=>{var F=Y0[U];return F||(U>=Y0.length&&(Y0.length=U+1),Y0[U]=F=i0.get(U)),F},a0=(U,F)=>{var j=[];return function(){if(j.length=0,Object.assign(j,arguments),U.includes("j")){var M=H["dynCall_"+U];M=j&&j.length?M.apply(null,[F].concat(j)):M.call(null,F)}else M=k0(F).apply(null,j);return M}};function o0(U,F){U=Z8(U);var j=U.includes("j")?a0(U,F):k0(F);return typeof j!="function"&&q1(`unknown function pointer with signature ${U}: ${F}`),j}var J0=void 0;function S0(U,F){function j(m){v[m]||H$[m]||(t$[m]?t$[m].forEach(j):(M.push(m),v[m]=!0))}var M=[],v={};throw F.forEach(j),new J0(`${U}: `+M.map(SJ).join([", "]))}function V0(U,F,j,M,v){var m=F.length;2>m&&q1("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=F[1]!==null&&j!==null,$0=!1;for(j=1;j>2]);return j}function A1(U,F,j){return U instanceof Object||q1(`${j} with invalid "this": ${U}`),U instanceof F.i.constructor||q1(`${j} incompatible with "this" of type ${U.constructor.name}`),U.g.o||q1(`cannot call emscripten binding method ${j} on deleted object`),c(U.g.o,U.g.u.i,F.i)}function v0(U){U>=U9.h&&--U9.get(U).ub===0&&U9.Wb(U)}function p1(U,F,j){switch(F){case 0:return function(M){return this.fromWireType((j?U0:H0)[M])};case 1:return function(M){return this.fromWireType((j?C0:B0)[M>>1])};case 2:return function(M){return this.fromWireType((j?l:E0)[M>>2])};default:throw TypeError("Unknown integer type: "+U)}}function F8(U){if(U===null)return"null";var F=typeof U;return F==="object"||F==="array"||F==="function"?U.toString():""+U}function t8(U,F){switch(F){case 2:return function(j){return this.fromWireType(h0[j>>2])};case 3:return function(j){return this.fromWireType(P0[j>>3])};default:throw TypeError("Unknown float type: "+U)}}function L$(U,F,j){switch(F){case 0:return j?function(M){return U0[M]}:function(M){return H0[M]};case 1:return j?function(M){return C0[M>>1]}:function(M){return B0[M>>1]};case 2:return j?function(M){return l[M>>2]}:function(M){return E0[M>>2]};default:throw TypeError("Unknown integer type: "+U)}}var S1=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,A9=(U,F)=>{var j=U>>1;for(var M=j+F/2;!(j>=M)&&B0[j];)++j;if(j<<=1,32=F/2);++M){var v=C0[U+2*M>>1];if(v==0)break;j+=String.fromCharCode(v)}return j},VK=(U,F,j)=>{if(j===void 0&&(j=2147483647),2>j)return 0;j-=2;var M=F;j=j<2*U.length?j/2:U.length;for(var v=0;v>1]=U.charCodeAt(v),F+=2;return C0[F>>1]=0,F-M},R0=(U)=>2*U.length,b0=(U,F)=>{for(var j=0,M="";!(j>=F/4);){var v=l[U+4*j>>2];if(v==0)break;++j,65536<=v?(v-=65536,M+=String.fromCharCode(55296|v>>10,56320|v&1023)):M+=String.fromCharCode(v)}return M},C1=(U,F,j)=>{if(j===void 0&&(j=2147483647),4>j)return 0;var M=F;j=M+j-4;for(var v=0;v=m){var i=U.charCodeAt(++v);m=65536+((m&1023)<<10)|i&1023}if(l[F>>2]=m,F+=4,F+4>j)break}return l[F>>2]=0,F-M},T1=(U)=>{for(var F=0,j=0;j=M&&++j,F+=4}return F},Y1={};function E1(U){var F=Y1[U];return F===void 0?Z8(U):F}var w1=[];function u1(U){var F=w1.length;return w1.push(U),F}function B9(U,F){for(var j=Array(U),M=0;M>2],"parameter "+M);return j}var j8=[],m8=[];function V8(U){U.Dc=U.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}function L7(U){U.Ic=U.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")}var F7=1,l9=[],b8=[],T9=[],R9=[],F$=[],r9=[],s9=[],B8=[],X7={};function d8(U){LZ||(LZ=U)}function qZ(U){for(var F=F7++,j=U.length;j"u"||F.Nb)&&PH(M),j}function BK(U){return a9=B8[U],H.Bc=D0=a9&&a9.C,!(U&&!D0)}function PH(U){if(U||(U=a9),!U.Yb){U.Yb=!0;var F=U.C;if(V8(F),L7(F),2<=U.version&&(F.eb=F.getExtension("EXT_disjoint_timer_query_webgl2")),2>U.version||!F.eb)F.eb=F.getExtension("EXT_disjoint_timer_query");g6(F),(F.getSupportedExtensions()||[]).forEach(function(j){j.includes("lose_context")||j.includes("debug")||F.getExtension(j)})}}var LZ,a9;function g6(U){U.Kc=U.getExtension("WEBGL_multi_draw")}var RK={},_6=()=>{if(!CK){var U={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:C||"./this.program"},F;for(F in RK)RK[F]===void 0?delete U[F]:U[F]=RK[F];var j=[];for(F in U)j.push(`${F}=${U[F]}`);CK=j}return CK},CK,MK=[];function Y7(U,F,j,M){for(var v=0;v>2]=i}}function kH(U,F){if(F){var j=void 0;switch(U){case 36346:j=1;break;case 36344:return;case 34814:case 36345:j=0;break;case 34466:var M=D0.getParameter(34467);j=M?M.length:0;break;case 33309:if(2>a9.version){d8(1282);return}j=2*(D0.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>a9.version){d8(1280);return}j=U==33307?3:0}if(j===void 0)switch(M=D0.getParameter(U),typeof M){case"number":j=M;break;case"boolean":j=M?1:0;break;case"string":d8(1280);return;case"object":if(M===null)switch(U){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:j=0;break;default:d8(1280);return}else{if(M instanceof Float32Array||M instanceof Uint32Array||M instanceof Int32Array||M instanceof Array){for(U=0;U>2]=M[U];return}try{j=M.name|0}catch(v){d8(1280),_("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter("+U+")! (error: "+v+")");return}}break;default:d8(1280),_("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v("+U+") and it returns "+M+" of type "+typeof M+"!");return}l[F>>2]=j}else d8(1281)}var FZ=(U)=>{var F=p0(U)+1,j=OZ(F);return j&&z1(U,H0,j,F),j};function u6(U){return U.slice(-1)=="]"&&U.lastIndexOf("[")}function m6(U){return U-=5120,U==0?U0:U==1?H0:U==2?C0:U==4?l:U==6?h0:U==5||U==28922||U==28520||U==30779||U==30782?E0:B0}var XZ=(U)=>U%4===0&&(U%100!==0||U%400===0),d6=[31,29,31,30,31,30,31,31,30,31,30,31],c6=[31,28,31,30,31,30,31,31,30,31,30,31],SH=(U,F,j,M)=>{function v(G0,N0,w0){for(G0=typeof G0=="number"?G0.toString():G0||"";G0.lengthZ1?-1:0t0-G0.getDate())N0-=t0-G0.getDate()+1,G0.setDate(1),11>w0?G0.setMonth(w0+1):(G0.setMonth(0),G0.setFullYear(G0.getFullYear()+1));else{G0.setDate(G0.getDate()+N0);break}}return w0=new Date(G0.getFullYear()+1,0,4),N0=$0(new Date(G0.getFullYear(),0,4)),w0=$0(w0),0>=i(N0,G0)?0>=i(w0,G0)?G0.getFullYear()+1:G0.getFullYear():G0.getFullYear()-1}var Q0=l[M+40>>2];M={pc:l[M>>2],oc:l[M+4>>2],Ja:l[M+8>>2],Xa:l[M+12>>2],Ka:l[M+16>>2],ea:l[M+20>>2],R:l[M+24>>2],da:l[M+28>>2],Pc:l[M+32>>2],nc:l[M+36>>2],qc:Q0?Q0?j0(H0,Q0):"":""},j=j?j0(H0,j):"",Q0={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var I0 in Q0)j=j.replace(new RegExp(I0,"g"),Q0[I0]);var f0="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d0="January February March April May June July August September October November December".split(" ");Q0={"%a":(G0)=>f0[G0.R].substring(0,3),"%A":(G0)=>f0[G0.R],"%b":(G0)=>d0[G0.Ka].substring(0,3),"%B":(G0)=>d0[G0.Ka],"%C":(G0)=>m((G0.ea+1900)/100|0,2),"%d":(G0)=>m(G0.Xa,2),"%e":(G0)=>v(G0.Xa,2," "),"%g":(G0)=>z0(G0).toString().substring(2),"%G":(G0)=>z0(G0),"%H":(G0)=>m(G0.Ja,2),"%I":(G0)=>{return G0=G0.Ja,G0==0?G0=12:12{for(var N0=0,w0=0;w0<=G0.Ka-1;N0+=(XZ(G0.ea+1900)?d6:c6)[w0++]);return m(G0.Xa+N0,3)},"%m":(G0)=>m(G0.Ka+1,2),"%M":(G0)=>m(G0.oc,2),"%n":()=>` `,"%p":(G0)=>0<=G0.Ja&&12>G0.Ja?"AM":"PM","%S":(G0)=>m(G0.pc,2),"%t":()=>"\t","%u":(G0)=>G0.R||7,"%U":(G0)=>m(Math.floor((G0.da+7-G0.R)/7),2),"%V":(G0)=>{var N0=Math.floor((G0.da+7-(G0.R+6)%7)/7);if(2>=(G0.R+371-G0.da-2)%7&&N0++,N0)N0==53&&(w0=(G0.R+371-G0.da)%7,w0==4||w0==3&&XZ(G0.ea)||(N0=1));else{N0=52;var w0=(G0.R+7-G0.da-1)%7;(w0==4||w0==5&&XZ(G0.ea%400-1))&&N0++}return m(N0,2)},"%w":(G0)=>G0.R,"%W":(G0)=>m(Math.floor((G0.da+7-(G0.R+6)%7)/7),2),"%y":(G0)=>(G0.ea+1900).toString().substring(2),"%Y":(G0)=>G0.ea+1900,"%z":(G0)=>{G0=G0.nc;var N0=0<=G0;return G0=Math.abs(G0)/60,(N0?"+":"-")+String("0000"+(G0/60*100+G0%60)).slice(-4)},"%Z":(G0)=>G0.qc,"%%":()=>"%"},j=j.replace(/%%/g,"\x00\x00");for(I0 in Q0)j.includes(I0)&&(j=j.replace(new RegExp(I0,"g"),Q0[I0](M)));if(j=j.replace(/\0\0/g,"%"),I0=W1(j,!1),I0.length>F)return 0;return U0.set(I0,U),I0.length-1};function p6(U,F,j,M){U||(U=this),this.parent=U,this.U=U.U,this.Da=null,this.id=r0++,this.name=F,this.mode=j,this.l={},this.m={},this.Fa=M}Object.defineProperties(p6.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(U){U?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(U){U?this.mode|=146:this.mode&=-147}}}),H8(),X1=Array(4096),$8(u0,"/"),m1("/tmp",16895,0),m1("/home",16895,0),m1("/home/web_user",16895,0),(()=>{m1("/dev",16895,0),W8(259,{read:()=>0,write:(M,v,m,i)=>i}),x8("/dev/null",259),_0(1280,I1),_0(1536,x1),x8("/dev/tty",1280),x8("/dev/tty1",1536);var U=new Uint8Array(1024),F=0,j=()=>{return F===0&&(F=W0(U).byteLength),U[--F]};E8("random",j),E8("urandom",j),m1("/dev/shm",16895,0),m1("/dev/shm/tmp",16895,0)})(),(()=>{m1("/proc",16895,0);var U=m1("/proc/self",16895,0);m1("/proc/self/fd",16895,0),$8({U:()=>{var F=J8(U,"fd",16895,73);return F.l={ma:(j,M)=>{var v=P1(+M);return j={parent:null,U:{mb:"fake"},l:{na:()=>v.path}},j.parent=j}},F}},"/proc/self/fd")})(),Object.assign(PJ.prototype,{get(U){return this.M[U]},has(U){return this.M[U]!==void 0},ta(U){var F=this.ib.pop()||this.M.length;return this.M[F]=U,F},Wb(U){this.M[U]=void 0,this.ib.push(U)}}),T$=H.BindingError=class extends Error{constructor(U){super(U);this.name="BindingError"}},U9.M.push({value:void 0},{value:null},{value:!0},{value:!1}),U9.h=U9.M.length,H.count_emval_handles=function(){for(var U=0,F=U9.h;FYZ;++YZ)l6[YZ]=String.fromCharCode(YZ);HZ=l6,H.getInheritedInstanceCount=function(){return Object.keys(d9).length},H.getLiveInheritedInstances=function(){var U=[],F;for(F in d9)d9.hasOwnProperty(F)&&U.push(d9[F]);return U},H.flushPendingDeletes=W7,H.setDelayFunction=function(U){n$=U,i$.length&&n$&&n$(W7)},zZ=H.InternalError=class extends Error{constructor(U){super(U);this.name="InternalError"}},p9.prototype.isAliasOf=function(U){if(!(this instanceof p9&&U instanceof p9))return!1;var F=this.g.u.i,j=this.g.o,M=U.g.u.i;for(U=U.g.o;F.A;)j=F.pa(j),F=F.A;for(;M.A;)U=M.pa(U),M=M.A;return F===M&&j===U},p9.prototype.clone=function(){if(this.g.o||f$(this),this.g.ka)return this.g.count.value+=1,this;var U=q$,F=Object,j=F.create,M=Object.getPrototypeOf(this),v=this.g;return U=U(j.call(F,M,{g:{value:{count:v.count,ia:v.ia,ka:v.ka,o:v.o,u:v.u,H:v.H,L:v.L}}})),U.g.count.value+=1,U.g.ia=!1,U},p9.prototype.delete=function(){this.g.o||f$(this),this.g.ia&&!this.g.ka&&q1("Object already scheduled for deletion"),AJ(this),UZ(this.g),this.g.ka||(this.g.H=void 0,this.g.o=void 0)},p9.prototype.isDeleted=function(){return!this.g.o},p9.prototype.deleteLater=function(){return this.g.o||f$(this),this.g.ia&&!this.g.ka&&q1("Object already scheduled for deletion"),i$.push(this),i$.length===1&&n$&&n$(W7),this.g.ia=!0,this},K0.prototype.Sb=function(U){return this.sb&&(U=this.sb(U)),U},K0.prototype.cb=function(U){this.W&&this.W(U)},K0.prototype.argPackAdvance=8,K0.prototype.readValueFromPointer=w$,K0.prototype.deleteObject=function(U){if(U!==null)U.delete()},K0.prototype.fromWireType=function(U){function F(){return this.ya?r$(this.i.N,{u:this.fc,o:j,L:this,H:U}):r$(this.i.N,{u:this,o:U})}var j=this.Sb(U);if(!j)return this.cb(U),null;var M=z7(this.i,j);if(M!==void 0){if(M.g.count.value===0)return M.g.o=j,M.g.H=U,M.clone();return M=M.clone(),this.cb(U),M}if(M=this.i.Rb(j),M=U7[M],!M)return F.call(this);M=this.xa?M.Jb:M.pointerType;var v=TJ(j,this.i,M.i);return v===null?F.call(this):this.ya?r$(M.i.N,{u:M,o:v,L:this,H:U}):r$(M.i.N,{u:M,o:v})},J0=H.UnboundTypeError=o$("UnboundTypeError");for(var D0,IK=0;32>IK;++IK)MK.push(Array(IK));var s6={__syscall_fcntl64:function(U,F,j){A$=j;try{var M=P1(U);switch(F){case 0:var v=E9();return 0>v?-28:A8(M,v).X;case 1:case 2:return 0;case 3:return M.flags;case 4:return v=E9(),M.flags|=v,0;case 5:return v=E9(),C0[v+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return l[o6()>>2]=28,-1;default:return-28}}catch(m){if(typeof T8>"u"||m.name!=="ErrnoError")throw m;return-m.aa}},__syscall_ioctl:function(U,F,j){A$=j;try{var M=P1(U);switch(F){case 21509:return M.s?0:-59;case 21505:if(!M.s)return-59;if(M.s.V.$b){F=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var v=E9();l[v>>2]=25856,l[v+4>>2]=5,l[v+8>>2]=191,l[v+12>>2]=35387;for(var m=0;32>m;m++)U0[v+m+17>>0]=F[m]||0}return 0;case 21510:case 21511:case 21512:return M.s?0:-59;case 21506:case 21507:case 21508:if(!M.s)return-59;if(M.s.V.ac)for(v=E9(),F=[],m=0;32>m;m++)F.push(U0[v+m+17>>0]);return 0;case 21519:if(!M.s)return-59;return v=E9(),l[v>>2]=0;case 21520:return M.s?-28:-59;case 21531:if(v=E9(),!M.m.Zb)throw new X0(59);return M.m.Zb(M,F,v);case 21523:if(!M.s)return-59;return M.s.V.bc&&(m=[24,80],v=E9(),C0[v>>1]=m[0],C0[v+2>>1]=m[1]),0;case 21524:return M.s?0:-59;case 21515:return M.s?0:-59;default:return-28}}catch(i){if(typeof T8>"u"||i.name!=="ErrnoError")throw i;return-i.aa}},__syscall_openat:function(U,F,j,M){A$=M;try{F=F?j0(H0,F):"";var v=F;if(v.charAt(0)==="/")F=v;else{var m=U===-100?"/":P1(U).path;if(v.length==0)throw new X0(44);F=E(m+"/"+v)}var i=M?E9():0;return a1(F,j,i).X}catch($0){if(typeof T8>"u"||$0.name!=="ErrnoError")throw $0;return-$0.aa}},_embind_create_inheriting_constructor:function(U,F,j){U=Z8(U),F=U$(F,"wrapper"),j=z9(j);var M=[].slice,v=F.i,m=v.N,i=v.A.N,$0=v.A.constructor;U=IJ(U,function(){v.A.qb.forEach(function(Q0){if(this[Q0]===i[Q0])throw new G7(`Pure virtual function ${Q0} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:m}),this.__construct.apply(this,M.call(arguments))}),m.__construct=function(){this===m&&q1("Pass correct 'this' to __construct");var Q0=$0.implement.apply(void 0,[this].concat(M.call(arguments)));AJ(Q0);var I0=Q0.g;Q0.notifyOnDestruction(),I0.ka=!0,Object.defineProperties(this,{g:{value:I0}}),q$(this),Q0=I0.o,Q0=kJ(v,Q0),d9.hasOwnProperty(Q0)?q1(`Tried to register registered instance: ${Q0}`):d9[Q0]=this},m.__destruct=function(){this===m&&q1("Pass correct 'this' to __destruct"),AJ(this);var Q0=this.g.o;Q0=kJ(v,Q0),d9.hasOwnProperty(Q0)?delete d9[Q0]:q1(`Tried to unregister unregistered instance: ${Q0}`)},U.prototype=Object.create(m);for(var z0 in j)U.prototype[z0]=j[z0];return j9(U)},_embind_finalize_value_object:function(U){var F=wJ[U];delete wJ[U];var{Va:j,W:M,fb:v}=F,m=v.map((i)=>i.Vb).concat(v.map((i)=>i.kc));i1([U],m,(i)=>{var $0={};return v.forEach((z0,Q0)=>{var I0=i[Q0],f0=z0.Tb,d0=z0.Ub,G0=i[Q0+v.length],N0=z0.jc,w0=z0.lc;$0[z0.Pb]={read:(t0)=>I0.fromWireType(f0(d0,t0)),write:(t0,Z1)=>{var L1=[];N0(w0,t0,G0.toWireType(L1,Z1)),a$(L1)}}}),[{name:F.name,fromWireType:function(z0){var Q0={},I0;for(I0 in $0)Q0[I0]=$0[I0].read(z0);return M(z0),Q0},toWireType:function(z0,Q0){for(var I0 in $0)if(!(I0 in Q0))throw TypeError(`Missing field: "${I0}"`);var f0=j();for(I0 in $0)$0[I0].write(f0,Q0[I0]);return z0!==null&&z0.push(M,f0),f0},argPackAdvance:8,readValueFromPointer:w$,K:M}]})},_embind_register_bigint:function(){},_embind_register_bool:function(U,F,j,M,v){var m=q9(j);F=Z8(F),V9(U,{name:F,fromWireType:function(i){return!!i},toWireType:function(i,$0){return $0?M:v},argPackAdvance:8,readValueFromPointer:function(i){if(j===1)var $0=U0;else if(j===2)$0=C0;else if(j===4)$0=l;else throw TypeError("Unknown boolean type size: "+F);return this.fromWireType($0[i>>m])},K:null})},_embind_register_class:function(U,F,j,M,v,m,i,$0,z0,Q0,I0,f0,d0){I0=Z8(I0),m=o0(v,m),$0&&($0=o0(i,$0)),Q0&&(Q0=o0(z0,Q0)),d0=o0(f0,d0);var G0=WZ(I0);I(G0,function(){S0(`Cannot construct ${I0} due to unbound types`,[M])}),i1([U,F,j],M?[M]:[],function(N0){if(N0=N0[0],M)var w0=N0.i,t0=w0.N;else t0=p9.prototype;N0=IJ(G0,function(){if(Object.getPrototypeOf(this)!==Z1)throw new T$("Use 'new' to construct "+I0);if(L1.$===void 0)throw new T$(I0+" has no accessible constructor");var U8=L1.$[arguments.length];if(U8===void 0)throw new T$(`Tried to invoke ctor of ${I0} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(L1.$).toString()}) parameters instead!`);return U8.apply(this,arguments)});var Z1=Object.create(t0,{constructor:{value:N0}});N0.prototype=Z1;var L1=new u(I0,N0,Z1,d0,w0,m,$0,Q0);L1.A&&(L1.A.qa===void 0&&(L1.A.qa=[]),L1.A.qa.push(L1)),w0=new K0(I0,L1,!0,!1),t0=new K0(I0+"*",L1,!1,!1);var K8=new K0(I0+" const*",L1,!1,!0);return U7[U]={pointerType:t0,Jb:K8},F0(G0,N0),[w0,t0,K8]})},_embind_register_class_class_function:function(U,F,j,M,v,m,i){var $0=k1(j,M);F=Z8(F),m=o0(v,m),i1([],[U],function(z0){function Q0(){S0(`Cannot call ${I0} due to unbound types`,$0)}z0=z0[0];var I0=`${z0.name}.${F}`;F.startsWith("@@")&&(F=Symbol[F.substring(2)]);var f0=z0.i.constructor;return f0[F]===void 0?(Q0.ha=j-1,f0[F]=Q0):(S(f0,F,I0),f0[F].B[j-1]=Q0),i1([],$0,function(d0){if(d0=V0(I0,[d0[0],null].concat(d0.slice(1)),null,m,i),f0[F].B===void 0?(d0.ha=j-1,f0[F]=d0):f0[F].B[j-1]=d0,z0.i.qa)for(let G0 of z0.i.qa)G0.constructor.hasOwnProperty(F)||(G0.constructor[F]=d0);return[]}),[]})},_embind_register_class_class_property:function(U,F,j,M,v,m,i,$0){F=Z8(F),m=o0(v,m),i1([],[U],function(z0){z0=z0[0];var Q0=`${z0.name}.${F}`,I0={get(){S0(`Cannot access ${Q0} due to unbound types`,[j])},enumerable:!0,configurable:!0};return I0.set=$0?()=>{S0(`Cannot access ${Q0} due to unbound types`,[j])}:()=>{q1(`${Q0} is a read-only property`)},Object.defineProperty(z0.i.constructor,F,I0),i1([],[j],function(f0){f0=f0[0];var d0={get(){return f0.fromWireType(m(M))},enumerable:!0};return $0&&($0=o0(i,$0),d0.set=(G0)=>{var N0=[];$0(M,f0.toWireType(N0,G0)),a$(N0)}),Object.defineProperty(z0.i.constructor,F,d0),[]}),[]})},_embind_register_class_constructor:function(U,F,j,M,v,m){var i=k1(F,j);v=o0(M,v),i1([],[U],function($0){$0=$0[0];var z0=`constructor ${$0.name}`;if($0.i.$===void 0&&($0.i.$=[]),$0.i.$[F-1]!==void 0)throw new T$(`Cannot register multiple constructors with identical number of parameters (${F-1}) for class '${$0.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return $0.i.$[F-1]=()=>{S0(`Cannot construct ${$0.name} due to unbound types`,i)},i1([],i,function(Q0){return Q0.splice(1,0,null),$0.i.$[F-1]=V0(z0,Q0,null,v,m),[]}),[]})},_embind_register_class_function:function(U,F,j,M,v,m,i,$0){var z0=k1(j,M);F=Z8(F),m=o0(v,m),i1([],[U],function(Q0){function I0(){S0(`Cannot call ${f0} due to unbound types`,z0)}Q0=Q0[0];var f0=`${Q0.name}.${F}`;F.startsWith("@@")&&(F=Symbol[F.substring(2)]),$0&&Q0.i.qb.push(F);var d0=Q0.i.N,G0=d0[F];return G0===void 0||G0.B===void 0&&G0.className!==Q0.name&&G0.ha===j-2?(I0.ha=j-2,I0.className=Q0.name,d0[F]=I0):(S(d0,F,f0),d0[F].B[j-2]=I0),i1([],z0,function(N0){return N0=V0(f0,N0,Q0,m,i),d0[F].B===void 0?(N0.ha=j-2,d0[F]=N0):d0[F].B[j-2]=N0,[]}),[]})},_embind_register_class_property:function(U,F,j,M,v,m,i,$0,z0,Q0){F=Z8(F),v=o0(M,v),i1([],[U],function(I0){I0=I0[0];var f0=`${I0.name}.${F}`,d0={get(){S0(`Cannot access ${f0} due to unbound types`,[j,i])},enumerable:!0,configurable:!0};return d0.set=z0?()=>{S0(`Cannot access ${f0} due to unbound types`,[j,i])}:()=>{q1(f0+" is a read-only property")},Object.defineProperty(I0.i.N,F,d0),i1([],z0?[j,i]:[j],function(G0){var N0=G0[0],w0={get(){var Z1=A1(this,I0,f0+" getter");return N0.fromWireType(v(m,Z1))},enumerable:!0};if(z0){z0=o0($0,z0);var t0=G0[1];w0.set=function(Z1){var L1=A1(this,I0,f0+" setter"),K8=[];z0(Q0,L1,t0.toWireType(K8,Z1)),a$(K8)}}return Object.defineProperty(I0.i.N,F,w0),[]}),[]})},_embind_register_emval:function(U,F){F=Z8(F),V9(U,{name:F,fromWireType:function(j){var M=z9(j);return v0(j),M},toWireType:function(j,M){return j9(M)},argPackAdvance:8,readValueFromPointer:w$,K:null})},_embind_register_enum:function(U,F,j,M){function v(){}j=q9(j),F=Z8(F),v.values={},V9(U,{name:F,constructor:v,fromWireType:function(m){return this.constructor.values[m]},toWireType:function(m,i){return i.value},argPackAdvance:8,readValueFromPointer:p1(F,j,M),K:null}),I(F,v)},_embind_register_enum_value:function(U,F,j){var M=U$(U,"enum");F=Z8(F),U=M.constructor,M=Object.create(M.constructor.prototype,{value:{value:j},constructor:{value:IJ(`${M.name}_${F}`,function(){})}}),U.values[j]=M,U[F]=M},_embind_register_float:function(U,F,j){j=q9(j),F=Z8(F),V9(U,{name:F,fromWireType:function(M){return M},toWireType:function(M,v){return v},argPackAdvance:8,readValueFromPointer:t8(F,j),K:null})},_embind_register_function:function(U,F,j,M,v,m){var i=k1(F,j);U=Z8(U),v=o0(M,v),I(U,function(){S0(`Cannot call ${U} due to unbound types`,i)},F-1),i1([],i,function($0){return F0(U,V0(U,[$0[0],null].concat($0.slice(1)),null,v,m),F-1),[]})},_embind_register_integer:function(U,F,j,M,v){F=Z8(F),v===-1&&(v=4294967295),v=q9(j);var m=($0)=>$0;if(M===0){var i=32-8*j;m=($0)=>$0<>>i}j=F.includes("unsigned")?function($0,z0){return z0>>>0}:function($0,z0){return z0},V9(U,{name:F,fromWireType:m,toWireType:j,argPackAdvance:8,readValueFromPointer:L$(F,v,M!==0),K:null})},_embind_register_memory_view:function(U,F,j){function M(m){m>>=2;var i=E0;return new v(i.buffer,i[m+1],i[m])}var v=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][F];j=Z8(j),V9(U,{name:j,fromWireType:M,argPackAdvance:8,readValueFromPointer:M},{Xb:!0})},_embind_register_std_string:function(U,F){F=Z8(F);var j=F==="std::string";V9(U,{name:F,fromWireType:function(M){var v=E0[M>>2],m=M+4;if(j)for(var i=m,$0=0;$0<=v;++$0){var z0=m+$0;if($0==v||H0[z0]==0){if(i=i?j0(H0,i,z0-i):"",Q0===void 0)var Q0=i;else Q0+=String.fromCharCode(0),Q0+=i;i=z0+1}}else{Q0=Array(v);for($0=0;$0>2]=i,j&&m)z1(v,H0,z0,i+1);else if(m)for(m=0;mB0,$0=1;else F===4&&(M=b0,v=C1,m=T1,i=()=>E0,$0=2);V9(U,{name:j,fromWireType:function(z0){for(var Q0=E0[z0>>2],I0=i(),f0,d0=z0+4,G0=0;G0<=Q0;++G0){var N0=z0+4+G0*F;if(G0==Q0||I0[N0>>$0]==0)d0=M(d0,N0-d0),f0===void 0?f0=d0:(f0+=String.fromCharCode(0),f0+=d0),d0=N0+F}return X$(z0),f0},toWireType:function(z0,Q0){typeof Q0!="string"&&q1(`Cannot pass non-string to C++ string type ${j}`);var I0=m(Q0),f0=OZ(4+I0+F);return E0[f0>>2]=I0>>$0,v(Q0,f0+4,I0+F),z0!==null&&z0.push(X$,f0),f0},argPackAdvance:8,readValueFromPointer:w$,K:function(z0){X$(z0)}})},_embind_register_value_object:function(U,F,j,M,v,m){wJ[U]={name:Z8(F),Va:o0(j,M),W:o0(v,m),fb:[]}},_embind_register_value_object_field:function(U,F,j,M,v,m,i,$0,z0,Q0){wJ[U].fb.push({Pb:Z8(F),Vb:j,Tb:o0(M,v),Ub:m,kc:i,jc:o0($0,z0),lc:Q0})},_embind_register_void:function(U,F){F=Z8(F),V9(U,{cc:!0,name:F,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(U,F,j){U=z9(U),F=U$(F,"emval::as");var M=[],v=j9(M);return E0[j>>2]=v,F.toWireType(M,U)},_emval_call_method:function(U,F,j,M,v){U=w1[U],F=z9(F),j=E1(j);var m=[];return E0[M>>2]=j9(m),U(F,j,m,v)},_emval_call_void_method:function(U,F,j,M){U=w1[U],F=z9(F),j=E1(j),U(F,j,null,M)},_emval_decref:v0,_emval_get_method_caller:function(U,F){var j=B9(U,F),M=j[0];F=M.name+"_$"+j.slice(1).map(function(i){return i.name}).join("_")+"$";var v=j8[F];if(v!==void 0)return v;var m=Array(U-1);return v=u1((i,$0,z0,Q0)=>{for(var I0=0,f0=0;f0{$1("")},beginPixelLocalStorageWEBGL:function(U,F,j){(U=B8[U].C.ca)&&U.beginPixelLocalStorageWEBGL(H.HEAPU32.subarray(j,j+F))},decode_image:function(U,F,j){var M=H.images;M||(M=new Map,H.images=M);var v=new Image;M.set(U,v),F=H.HEAP8.subarray(F,F+j),j=new Uint8Array(j),j.set(F),v.src=URL.createObjectURL(new Blob([j],{type:"image/png"})),v.onload=function(){H._setWebImage(U,v.width,v.height)}},delete_image:function(U){var F=H.images;F&&F.get(U)&&F.delete(U)},emscripten_asm_const_int:(U,F,j)=>{m8.length=0;var M;for(j>>=2;M=H0[F++];)j+=M!=105&j,m8.push(M==105?l[j]:P0[j++>>1]),++j;return V[U].apply(null,m8)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(U,F,j)=>H0.copyWithin(U,F,F+j),emscripten_resize_heap:(U)=>{var F=H0.length;if(U>>>=0,2147483648=j;j*=2){var M=F*(1+0.2/j);M=Math.min(M,U+100663296);var v=Math;M=Math.max(U,M);$:{v=v.min.call(v,2147483648,M+(65536-M%65536)%65536)-t.buffer.byteLength+65535>>>16;try{t.grow(v),M0();var m=1;break $}catch(i){}m=void 0}if(m)return!0}return!1},emscripten_webgl_enable_extension:function(U,F){return U=B8[U],F=F?j0(H0,F):"",F.startsWith("GL_")&&(F=F.substr(3)),F=="WEBGL_draw_instanced_base_vertex_base_instance"&&V8(D0),F=="WEBGL_multi_draw_instanced_base_vertex_base_instance"&&L7(D0),F=="WEBGL_multi_draw"&&g6(D0),!!U.C.getExtension(F)},emscripten_webgl_get_current_context:function(){return a9?a9.handle:0},emscripten_webgl_make_context_current:function(U){return BK(U)?0:-5},enable_WEBGL_provoking_vertex:function(U){return U=B8[U].C,U.rb=U.getExtension("WEBGL_provoking_vertex"),!!U.rb},enable_WEBGL_shader_pixel_local_storage_coherent:function(U){return U=B8[U].C,U.ca=U.getExtension("WEBGL_shader_pixel_local_storage"),!(!U.ca||!U.ca.isCoherent())},endPixelLocalStorageWEBGL:function(U,F,j){(U=B8[U].C.ca)&&U.endPixelLocalStorageWEBGL(H.HEAPU32.subarray(j,j+F))},environ_get:(U,F)=>{var j=0;return _6().forEach(function(M,v){var m=F+j;v=E0[U+4*v>>2]=m;for(m=0;m>0]=M.charCodeAt(m);U0[v>>0]=0,j+=M.length+1}),0},environ_sizes_get:(U,F)=>{var j=_6();E0[U>>2]=j.length;var M=0;return j.forEach(function(v){M+=v.length+1}),E0[F>>2]=M,0},fd_close:function(U){try{var F=P1(U);if(F.X===null)throw new X0(8);F.Sa&&(F.Sa=null);try{F.m.close&&F.m.close(F)}catch(j){throw j}finally{l0[F.X]=null}return F.X=null,0}catch(j){if(typeof T8>"u"||j.name!=="ErrnoError")throw j;return j.aa}},fd_read:function(U,F,j,M){try{$:{var v=P1(U);U=F;for(var m,i=F=0;i>2],z0=E0[U+4>>2];U+=8;var Q0=v,I0=$0,f0=z0,d0=m,G0=U0;if(0>f0||0>d0)throw new X0(28);if(Q0.X===null)throw new X0(8);if((Q0.flags&2097155)===1)throw new X0(8);if((Q0.node.mode&61440)===16384)throw new X0(31);if(!Q0.m.read)throw new X0(28);var N0=typeof d0<"u";if(!N0)d0=Q0.position;else if(!Q0.seekable)throw new X0(70);var w0=Q0.m.read(Q0,G0,I0,f0,d0);N0||(Q0.position+=w0);var t0=w0;if(0>t0){var Z1=-1;break $}if(F+=t0,t0>2]=Z1,0}catch(L1){if(typeof T8>"u"||L1.name!=="ErrnoError")throw L1;return L1.aa}},fd_seek:function(U,F,j,M,v){F=j+2097152>>>0<4194305-!!F?(F>>>0)+4294967296*j:NaN;try{if(isNaN(F))return 61;var m=P1(U);return r8(m,F,M),g=[m.position>>>0,(O1=m.position,1<=+Math.abs(O1)?0>>0:~~+Math.ceil((O1-+(~~O1>>>0))/4294967296)>>>0:0)],l[v>>2]=g[0],l[v+4>>2]=g[1],m.Sa&&F===0&&M===0&&(m.Sa=null),0}catch(i){if(typeof T8>"u"||i.name!=="ErrnoError")throw i;return i.aa}},fd_write:function(U,F,j,M){try{$:{var v=P1(U);U=F;for(var m,i=F=0;i>2],z0=E0[U+4>>2];U+=8;var Q0=v,I0=$0,f0=z0,d0=m,G0=U0;if(0>f0||0>d0)throw new X0(28);if(Q0.X===null)throw new X0(8);if((Q0.flags&2097155)===0)throw new X0(8);if((Q0.node.mode&61440)===16384)throw new X0(31);if(!Q0.m.write)throw new X0(28);Q0.seekable&&Q0.flags&1024&&r8(Q0,0,2);var N0=typeof d0<"u";if(!N0)d0=Q0.position;else if(!Q0.seekable)throw new X0(70);var w0=Q0.m.write(Q0,G0,I0,f0,d0,void 0);N0||(Q0.position+=w0);var t0=w0;if(0>t0){var Z1=-1;break $}F+=t0,typeof m<"u"&&(m+=t0)}Z1=F}return E0[M>>2]=Z1,0}catch(L1){if(typeof T8>"u"||L1.name!=="ErrnoError")throw L1;return L1.aa}},framebufferPixelLocalClearValuefvWEBGL:function(U,F,j,M,v,m){(U=B8[U].C.ca)&&U.framebufferPixelLocalClearValuefvWEBGL(F,[j,M,v,m])},framebufferTexturePixelLocalStorageWEBGL:function(U,F,j,M,v){(U=B8[U].C.ca)&&U.framebufferTexturePixelLocalStorageWEBGL(F,F$[j],M,v)},getFramebufferPixelLocalStorageParameterivWEBGL:function(U,F,j){return(U=B8[U].C.ca)?U.getFramebufferPixelLocalStorageParameterWEBGL(F,j):0},glActiveTexture:function(U){D0.activeTexture(U)},glAttachShader:function(U,F){D0.attachShader(b8[U],r9[F])},glBindBuffer:function(U,F){U==35051?D0.Pa=F:U==35052&&(D0.Qa=F),D0.bindBuffer(U,l9[F])},glBindBufferRange:function(U,F,j,M,v){D0.bindBufferRange(U,F,l9[j],M,v)},glBindFramebuffer:function(U,F){D0.bindFramebuffer(U,T9[F])},glBindRenderbuffer:function(U,F){D0.bindRenderbuffer(U,R9[F])},glBindTexture:function(U,F){D0.bindTexture(U,F$[F])},glBindVertexArray:function(U){D0.bindVertexArray(s9[U])},glBlendEquation:function(U){D0.blendEquation(U)},glBlendFunc:function(U,F){D0.blendFunc(U,F)},glBlitFramebuffer:function(U,F,j,M,v,m,i,$0,z0,Q0){D0.blitFramebuffer(U,F,j,M,v,m,i,$0,z0,Q0)},glBufferData:function(U,F,j,M){j&&F?D0.bufferData(U,H0,M,j,F):D0.bufferData(U,F,M)},glBufferSubData:function(U,F,j,M){j&&D0.bufferSubData(U,F,H0,M,j)},glClear:function(U){D0.clear(U)},glClearBufferfv:function(U,F,j){D0.clearBufferfv(U,F,h0,j>>2)},glClearBufferuiv:function(U,F,j){D0.clearBufferuiv(U,F,E0,j>>2)},glClearColor:function(U,F,j,M){D0.clearColor(U,F,j,M)},glClearDepthf:function(U){D0.clearDepth(U)},glClearStencil:function(U){D0.clearStencil(U)},glColorMask:function(U,F,j,M){D0.colorMask(!!U,!!F,!!j,!!M)},glCompileShader:function(U){D0.compileShader(r9[U])},glCreateProgram:function(){var U=qZ(b8),F=D0.createProgram();return F.name=U,F.Ba=F.za=F.Aa=0,F.Ya=1,b8[U]=F,U},glCreateShader:function(U){var F=qZ(r9);return r9[F]=D0.createShader(U),F},glCullFace:function(U){D0.cullFace(U)},glDeleteBuffers:function(U,F){for(var j=0;j>2],v=l9[M];v&&(D0.deleteBuffer(v),v.name=0,l9[M]=null,M==D0.Pa&&(D0.Pa=0),M==D0.Qa&&(D0.Qa=0))}},glDeleteFramebuffers:function(U,F){for(var j=0;j>2],v=T9[M];v&&(D0.deleteFramebuffer(v),v.name=0,T9[M]=null)}},glDeleteProgram:function(U){if(U){var F=b8[U];F?(D0.deleteProgram(F),F.name=0,b8[U]=null):d8(1281)}},glDeleteRenderbuffers:function(U,F){for(var j=0;j>2],v=R9[M];v&&(D0.deleteRenderbuffer(v),v.name=0,R9[M]=null)}},glDeleteShader:function(U){if(U){var F=r9[U];F?(D0.deleteShader(F),r9[U]=null):d8(1281)}},glDeleteTextures:function(U,F){for(var j=0;j>2],v=F$[M];v&&(D0.deleteTexture(v),v.name=0,F$[M]=null)}},glDeleteVertexArrays:function(U,F){for(var j=0;j>2];D0.deleteVertexArray(s9[M]),s9[M]=null}},glDepthFunc:function(U){D0.depthFunc(U)},glDepthMask:function(U){D0.depthMask(!!U)},glDepthRangef:function(U,F){D0.depthRange(U,F)},glDisable:function(U){D0.disable(U)},glDrawArrays:function(U,F,j){D0.drawArrays(U,F,j)},glDrawArraysInstanced:function(U,F,j,M){D0.drawArraysInstanced(U,F,j,M)},glDrawBuffers:function(U,F){for(var j=MK[U],M=0;M>2];D0.drawBuffers(j)},glDrawElements:function(U,F,j,M){D0.drawElements(U,F,j,M)},glDrawElementsInstanced:function(U,F,j,M,v){D0.drawElementsInstanced(U,F,j,M,v)},glEnable:function(U){D0.enable(U)},glEnableVertexAttribArray:function(U){D0.enableVertexAttribArray(U)},glFlush:function(){D0.flush()},glFramebufferRenderbuffer:function(U,F,j,M){D0.framebufferRenderbuffer(U,F,j,R9[M])},glFramebufferTexture2D:function(U,F,j,M,v){D0.framebufferTexture2D(U,F,j,F$[M],v)},glFrontFace:function(U){D0.frontFace(U)},glGenBuffers:function(U,F){Y7(U,F,"createBuffer",l9)},glGenFramebuffers:function(U,F){Y7(U,F,"createFramebuffer",T9)},glGenRenderbuffers:function(U,F){Y7(U,F,"createRenderbuffer",R9)},glGenTextures:function(U,F){Y7(U,F,"createTexture",F$)},glGenVertexArrays:function(U,F){Y7(U,F,"createVertexArray",s9)},glGenerateMipmap:function(U){D0.generateMipmap(U)},glGetError:function(){var U=D0.getError()||LZ;return LZ=0,U},glGetIntegerv:function(U,F){kH(U,F)},glGetProgramiv:function(U,F,j){if(j)if(U>=F7)d8(1281);else if(U=b8[U],F==35716)U=D0.getProgramInfoLog(U),U===null&&(U="(unknown error)"),l[j>>2]=U.length+1;else if(F==35719){if(!U.Ba)for(F=0;F>2]=U.Ba}else if(F==35722){if(!U.za)for(F=0;F>2]=U.za}else if(F==35381){if(!U.Aa)for(F=0;F>2]=U.Aa}else l[j>>2]=D0.getProgramParameter(U,F);else d8(1281)},glGetString:function(U){var F=X7[U];if(!F){switch(U){case 7939:F=D0.getSupportedExtensions()||[],F=F.concat(F.map(function(M){return"GL_"+M})),F=FZ(F.join(" "));break;case 7936:case 7937:case 37445:case 37446:(F=D0.getParameter(U))||d8(1280),F=F&&FZ(F);break;case 7938:F=FZ("OpenGL ES 3.0 ("+D0.getParameter(7938)+")");break;case 35724:F=D0.getParameter(35724);var j=F.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);j!==null&&(j[1].length==3&&(j[1]+="0"),F="OpenGL ES GLSL ES "+j[1]+" ("+F+")"),F=FZ(F);break;default:d8(1280)}X7[U]=F}return F},glGetUniformBlockIndex:function(U,F){return D0.getUniformBlockIndex(b8[U],F?j0(H0,F):"")},glGetUniformLocation:function(U,F){if(F=F?j0(H0,F):"",U=b8[U]){var j=U,M=j.oa,v=j.zb,m;if(!M)for(j.oa=M={},j.yb={},m=0;m>>0,v=F.slice(0,m)),(v=U.zb[v])&&M>2];D0.invalidateFramebuffer(U,M)},glLinkProgram:function(U){U=b8[U],D0.linkProgram(U),U.oa=0,U.zb={}},glPixelStorei:function(U,F){D0.pixelStorei(U,F)},glReadPixels:function(U,F,j,M,v,m,i){if(D0.Pa)D0.readPixels(U,F,j,M,v,m,i);else{var $0=m6(m);D0.readPixels(U,F,j,M,v,m,$0,i>>31-Math.clz32($0.BYTES_PER_ELEMENT))}},glRenderbufferStorageMultisample:function(U,F,j,M,v){D0.renderbufferStorageMultisample(U,F,j,M,v)},glScissor:function(U,F,j,M){D0.scissor(U,F,j,M)},glShaderSource:function(U,F,j,M){for(var v="",m=0;m>2]:-1,$0=l[j+4*m>>2];i=$0?j0(H0,$0,0>i?void 0:i):"",v+=i}D0.shaderSource(r9[U],v)},glStencilFunc:function(U,F,j){D0.stencilFunc(U,F,j)},glStencilFuncSeparate:function(U,F,j,M){D0.stencilFuncSeparate(U,F,j,M)},glStencilMask:function(U){D0.stencilMask(U)},glStencilOp:function(U,F,j){D0.stencilOp(U,F,j)},glStencilOpSeparate:function(U,F,j,M){D0.stencilOpSeparate(U,F,j,M)},glTexParameteri:function(U,F,j){D0.texParameteri(U,F,j)},glTexStorage2D:function(U,F,j,M,v){D0.texStorage2D(U,F,j,M,v)},glTexSubImage2D:function(U,F,j,M,v,m,i,$0,z0){if(D0.Qa)D0.texSubImage2D(U,F,j,M,v,m,i,$0,z0);else if(z0){var Q0=m6($0);D0.texSubImage2D(U,F,j,M,v,m,i,$0,Q0,z0>>31-Math.clz32(Q0.BYTES_PER_ELEMENT))}else D0.texSubImage2D(U,F,j,M,v,m,i,$0,null)},glUniform1i:function(U,F){var j=D0,M=j.uniform1i,v=D0.Kb;if(v){var m=v.oa[U];typeof m=="number"&&(v.oa[U]=m=D0.getUniformLocation(v,v.yb[U]+(0SH(U,F,j,M),upload_image:function(U,F){var j=H.images;j&&(F=j.get(F))&&(U=B8[U].C,U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),U.texImage2D(U.TEXTURE_2D,0,U.RGBA,U.RGBA,U.UNSIGNED_BYTE,F),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))}};(function(){function U(j){if(e=j=j.exports,t=e.memory,M0(),i0=e.__indirect_function_table,J1.unshift(e.__wasm_call_ctors),n0--,H.monitorRunDependencies&&H.monitorRunDependencies(n0),n0==0&&(F1!==null&&(clearInterval(F1),F1=null),B1)){var M=B1;B1=null,M()}return j}var F={env:s6,wasi_snapshot_preview1:s6};if(n0++,H.monitorRunDependencies&&H.monitorRunDependencies(n0),H.instantiateWasm)try{return H.instantiateWasm(F,U)}catch(j){_("Module.instantiateWasm callback failed with error: "+j),N(j)}return L8(F,function(j){U(j.instance)}).catch(N),{}})();var X$=(U)=>(X$=e.free)(U),OZ=(U)=>(OZ=e.malloc)(U);H._setWebImage=(U,F,j)=>(H._setWebImage=e.setWebImage)(U,F,j);var o6=()=>(o6=e.__errno_location)(),i6=H._ma_device__on_notification_unlocked=(U)=>(i6=H._ma_device__on_notification_unlocked=e.ma_device__on_notification_unlocked)(U);H._ma_malloc_emscripten=(U,F)=>(H._ma_malloc_emscripten=e.ma_malloc_emscripten)(U,F),H._ma_free_emscripten=(U,F)=>(H._ma_free_emscripten=e.ma_free_emscripten)(U,F);var n6=H._ma_device_process_pcm_frames_capture__webaudio=(U,F,j)=>(n6=H._ma_device_process_pcm_frames_capture__webaudio=e.ma_device_process_pcm_frames_capture__webaudio)(U,F,j),r6=H._ma_device_process_pcm_frames_playback__webaudio=(U,F,j)=>(r6=H._ma_device_process_pcm_frames_playback__webaudio=e.ma_device_process_pcm_frames_playback__webaudio)(U,F,j),a6=(U)=>(a6=e.__getTypeName)(U);H.__embind_initialize_bindings=()=>(H.__embind_initialize_bindings=e._embind_initialize_bindings)(),H.dynCall_iiiji=(U,F,j,M,v,m)=>(H.dynCall_iiiji=e.dynCall_iiiji)(U,F,j,M,v,m),H.dynCall_iij=(U,F,j,M)=>(H.dynCall_iij=e.dynCall_iij)(U,F,j,M),H.dynCall_iiji=(U,F,j,M,v)=>(H.dynCall_iiji=e.dynCall_iiji)(U,F,j,M,v),H.dynCall_jii=(U,F,j)=>(H.dynCall_jii=e.dynCall_jii)(U,F,j),H.dynCall_vijj=(U,F,j,M,v,m)=>(H.dynCall_vijj=e.dynCall_vijj)(U,F,j,M,v,m),H.dynCall_jiji=(U,F,j,M,v)=>(H.dynCall_jiji=e.dynCall_jiji)(U,F,j,M,v),H.dynCall_viijii=(U,F,j,M,v,m,i)=>(H.dynCall_viijii=e.dynCall_viijii)(U,F,j,M,v,m,i),H.dynCall_iiiiij=(U,F,j,M,v,m,i)=>(H.dynCall_iiiiij=e.dynCall_iiiiij)(U,F,j,M,v,m,i),H.dynCall_iiiiijj=(U,F,j,M,v,m,i,$0,z0)=>(H.dynCall_iiiiijj=e.dynCall_iiiiijj)(U,F,j,M,v,m,i,$0,z0),H.dynCall_iiiiiijj=(U,F,j,M,v,m,i,$0,z0,Q0)=>(H.dynCall_iiiiiijj=e.dynCall_iiiiiijj)(U,F,j,M,v,m,i,$0,z0,Q0),H.___start_em_js=532308,H.___stop_em_js=535063;var DZ;B1=function U(){DZ||t6(),DZ||(B1=U)};function t6(){function U(){if(!DZ&&(DZ=!0,H.calledRun=!0,!Z0)){if(H.noFSInit||S$||(S$=!0,H8(),H.stdin=H.stdin,H.stdout=H.stdout,H.stderr=H.stderr,H.stdin?E8("stdin",H.stdin):m9("/dev/tty","/dev/stdin"),H.stdout?E8("stdout",null,H.stdout):m9("/dev/tty","/dev/stdout"),H.stderr?E8("stderr",null,H.stderr):m9("/dev/tty1","/dev/stderr"),a1("/dev/stdin",0),a1("/dev/stdout",1),a1("/dev/stderr",1)),T0=!1,D(J1),O(H),H.onRuntimeInitialized)H.onRuntimeInitialized();if(H.postRun)for(typeof H.postRun=="function"&&(H.postRun=[H.postRun]);H.postRun.length;){var F=H.postRun.shift();e0.unshift(F)}D(e0)}}if(!(0{K.exports=JSON.parse(`{"name":"@rive-app/webgl2","version":"2.31.6","description":"Rive's webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso (https://rive.app)","Maxwell Talbot (https://rive.app)","Arthur Vivian (https://rive.app)","Umberto Sonnino (https://rive.app)","Matthew Sullivan (mailto:matt.j.sullivan@gmail.com)","Chris Dalton (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(K,Q,W)=>{W.r(Q),W.d(Q,{Animation:()=>z.Animation});var z=W(4)},(K,Q,W)=>{W.r(Q),W.d(Q,{Animation:()=>z});var z=function(){function q(Y,X,H,O){this.animation=Y,this.artboard=X,this.playing=O,this.loopCount=0,this.scrubTo=null,this.instance=new H.LinearAnimationInstance(Y,X)}return Object.defineProperty(q.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"time",{get:function(){return this.instance.time},set:function(Y){this.instance.time=Y},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),q.prototype.advance=function(Y){if(this.scrubTo===null)this.instance.advance(Y);else this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null},q.prototype.apply=function(Y){this.instance.apply(Y)},q.prototype.cleanup=function(){this.instance.delete()},q}()},(K,Q,W)=>{W.r(Q),W.d(Q,{AudioAssetWrapper:()=>Y.AudioAssetWrapper,AudioWrapper:()=>Y.AudioWrapper,BLANK_URL:()=>q.BLANK_URL,CustomFileAssetLoaderWrapper:()=>Y.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>Y.FileAssetWrapper,FileFinalizer:()=>Y.FileFinalizer,FontAssetWrapper:()=>Y.FontAssetWrapper,FontWrapper:()=>Y.FontWrapper,ImageAssetWrapper:()=>Y.ImageAssetWrapper,ImageWrapper:()=>Y.ImageWrapper,createFinalization:()=>Y.createFinalization,finalizationRegistry:()=>Y.finalizationRegistry,registerTouchInteractions:()=>z.registerTouchInteractions,sanitizeUrl:()=>q.sanitizeUrl});var z=W(6),q=W(7),Y=W(8)},(K,Q,W)=>{W.r(Q),W.d(Q,{registerTouchInteractions:()=>Y});var z=void 0,q=function(X,H){var O,N;if(["touchstart","touchmove"].indexOf(X.type)>-1&&((O=X.touches)===null||O===void 0?void 0:O.length)){if(!H)X.preventDefault();return{clientX:X.touches[0].clientX,clientY:X.touches[0].clientY}}else if(X.type==="touchend"&&((N=X.changedTouches)===null||N===void 0?void 0:N.length))return{clientX:X.changedTouches[0].clientX,clientY:X.changedTouches[0].clientY};else return{clientX:X.clientX,clientY:X.clientY}},Y=function(X){var{canvas:H,artboard:O,stateMachines:N}=X,B=N===void 0?[]:N,R=X.renderer,P=X.rive,y=X.fit,h=X.alignment,C=X.isTouchScrollEnabled,A=C===void 0?!1:C,b=X.layoutScaleFactor,x=b===void 0?1:b;if(!H||!B.length||!R||!P||!O||typeof window>"u")return null;var k=null,f=!1,T=function(d){if(f&&d instanceof MouseEvent){if(d.type=="mouseup")f=!1;return}f=A&&d.type==="touchend"&&k==="touchstart",k=d.type;var s=d.currentTarget.getBoundingClientRect(),t=q(d,A),e=t.clientX,Z0=t.clientY;if(!e&&!Z0)return;var U0=e-s.left,H0=Z0-s.top,C0=P.computeAlignment(y,h,{minX:0,minY:0,maxX:s.width,maxY:s.height},O.bounds,x),B0=new P.Mat2D;C0.invert(B0);var l=new P.Vec2D(U0,H0),E0=P.mapXY(B0,l),h0=E0.x(),P0=E0.y();switch(E0.delete(),B0.delete(),l.delete(),C0.delete(),d.type){case"mouseout":for(var M0=0,i0=B;M0{W.r(Q),W.d(Q,{BLANK_URL:()=>N,sanitizeUrl:()=>P});var z=/^([^\w]*)(javascript|data|vbscript)/im,q=/&#(\w+)(^\w|;)?/g,Y=/&(newline|tab);/gi,X=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,H=/^.+(:|:)/gim,O=[".","/"],N="about:blank";function B(y){return O.indexOf(y[0])>-1}function R(y){var h=y.replace(X,"");return h.replace(q,function(C,A){return String.fromCharCode(A)})}function P(y){if(!y)return N;var h=R(y).replace(Y,"").replace(X,"").trim();if(!h)return N;if(B(h))return h;var C=h.match(H);if(!C)return h;var A=C[0];if(z.test(A))return N;return h}},(K,Q,W)=>{W.r(Q),W.d(Q,{AudioAssetWrapper:()=>y,AudioWrapper:()=>O,CustomFileAssetLoaderWrapper:()=>B,FileAssetWrapper:()=>R,FileFinalizer:()=>q,FontAssetWrapper:()=>h,FontWrapper:()=>N,ImageAssetWrapper:()=>P,ImageWrapper:()=>H,createFinalization:()=>x,finalizationRegistry:()=>b});var z=function(){var k=function(f,T){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,d){_.__proto__=d}||function(_,d){for(var s in d)if(Object.prototype.hasOwnProperty.call(d,s))_[s]=d[s]},k(f,T)};return function(f,T){if(typeof T!=="function"&&T!==null)throw TypeError("Class extends value "+String(T)+" is not a constructor or null");k(f,T);function _(){this.constructor=f}f.prototype=T===null?Object.create(T):(_.prototype=T.prototype,new _)}}(),q=function(){function k(f){this.selfUnref=!1,this._file=f}return k.prototype.unref=function(){if(this._file)this._file.unref()},k}(),Y=function(){function k(f){this._finalizableObject=f}return k.prototype.unref=function(){this._finalizableObject.unref()},k}(),X=function(){function k(){this.selfUnref=!1}return k.prototype.unref=function(){},k}(),H=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeImage=T,_}return Object.defineProperty(f.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeImage.unref()},f}(X),O=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeAudio=T,_}return Object.defineProperty(f.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeAudio.unref()},f}(X),N=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeFont=T,_}return Object.defineProperty(f.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeFont.unref()},f}(X),B=function(){function k(f,T){this._assetLoaderCallback=T,this.assetLoader=new f.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return k.prototype.loadContents=function(f,T){var _;if(f.isImage)_=new P(f);else if(f.isAudio)_=new y(f);else if(f.isFont)_=new h(f);return this._assetLoaderCallback(_,T)},k}(),R=function(){function k(f){this._nativeFileAsset=f}return k.prototype.decode=function(f){this._nativeFileAsset.decode(f)},Object.defineProperty(k.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),k}(),P=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setRenderImage=function(T){this._nativeFileAsset.setRenderImage(T.nativeImage)},f}(R),y=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setAudioSource=function(T){this._nativeFileAsset.setAudioSource(T.nativeAudio)},f}(R),h=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setFont=function(T){this._nativeFileAsset.setFont(T.nativeFont)},f}(R),C=function(){function k(f){}return k.prototype.register=function(f){f.selfUnref=!0},k.prototype.unregister=function(f){},k}(),A=typeof FinalizationRegistry<"u"?FinalizationRegistry:C,b=new A(function(k){k===null||k===void 0||k.unref()}),x=function(k,f){var T=new Y(f);b.register(k,T)}}],J={};function Z(K){var Q=J[K];if(Q!==void 0)return Q.exports;var W=J[K]={exports:{}};return G[K](W,W.exports,Z),W.exports}(()=>{Z.d=(K,Q)=>{for(var W in Q)if(Z.o(Q,W)&&!Z.o(K,W))Object.defineProperty(K,W,{enumerable:!0,get:Q[W]})}})(),(()=>{Z.o=(K,Q)=>Object.prototype.hasOwnProperty.call(K,Q)})(),(()=>{Z.r=(K)=>{if(typeof Symbol<"u"&&Symbol.toStringTag)Object.defineProperty(K,Symbol.toStringTag,{value:"Module"});Object.defineProperty(K,"__esModule",{value:!0})}})();var $={};return(()=>{Z.r($),Z.d($,{Alignment:()=>P,DataEnum:()=>P0,EventType:()=>T,Fit:()=>R,Layout:()=>y,LoopType:()=>_,Rive:()=>E0,RiveEventType:()=>b,RiveFile:()=>l,RuntimeLoader:()=>h,StateMachineInput:()=>A,StateMachineInputType:()=>C,Testing:()=>o1,ViewModel:()=>h0,ViewModelInstance:()=>i0,ViewModelInstanceArtboard:()=>f1,ViewModelInstanceAssetImage:()=>D1,ViewModelInstanceBoolean:()=>G1,ViewModelInstanceColor:()=>$1,ViewModelInstanceEnum:()=>F1,ViewModelInstanceList:()=>B1,ViewModelInstanceNumber:()=>e0,ViewModelInstanceString:()=>J1,ViewModelInstanceTrigger:()=>n0,ViewModelInstanceValue:()=>A0,decodeAudio:()=>y1,decodeFont:()=>O1,decodeImage:()=>L8});var K=Z(1),Q=Z(2),W=Z(3),z=Z(5),q=function(){var g=function(V,D){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,E){L.__proto__=E}||function(L,E){for(var w in E)if(Object.prototype.hasOwnProperty.call(E,w))L[w]=E[w]},g(V,D)};return function(V,D){if(typeof D!=="function"&&D!==null)throw TypeError("Class extends value "+String(D)+" is not a constructor or null");g(V,D);function L(){this.constructor=V}V.prototype=D===null?Object.create(D):(L.prototype=D.prototype,new L)}}(),Y=function(){return Y=Object.assign||function(g){for(var V,D=1,L=arguments.length;D0&&w[w.length-1]))&&(q0[0]===6||q0[0]===2)){D=0;continue}if(q0[0]===3&&(!w||q0[1]>w[0]&&q0[1]0)(D=g.callBackQueue.shift())===null||D===void 0||D(g.runtime)}).catch(function(V){var D={message:(V===null||V===void 0?void 0:V.message)||"Unknown error",type:(V===null||V===void 0?void 0:V.name)||"Error",wasmError:V instanceof WebAssembly.CompileError||V instanceof WebAssembly.RuntimeError,originalError:V};console.debug("Rive WASM load error details:",D);var L="https://cdn.jsdelivr.net/npm/".concat(Q.name,"@").concat(Q.version,"/rive_fallback.wasm");if(g.wasmURL.toLowerCase()!==L)console.warn("Failed to load WASM from ".concat(g.wasmURL," (").concat(D.message,"), trying jsdelivr as a backup")),g.setWasmUrl(L),g.loadRuntime();else{var E=["Could not load Rive WASM file from ".concat(g.wasmURL," or ").concat(L,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible",` Error details:`,"- Type: ".concat(D.type),"- Message: ".concat(D.message),"- WebAssembly-specific error: ".concat(D.wasmError),` To resolve, you may need to:`,"1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.loadRuntime() again"].join(` `);console.error(E)}})},g.getInstance=function(V){if(!g.isLoading)g.isLoading=!0,g.loadRuntime();if(!g.runtime)g.callBackQueue.push(V);else V(g.runtime)},g.awaitInstance=function(){return new Promise(function(V){return g.getInstance(function(D){return V(D)})})},g.setWasmUrl=function(V){g.wasmURL=V},g.getWasmUrl=function(){return g.wasmURL},g.isLoading=!1,g.callBackQueue=[],g.wasmURL="https://unpkg.com/".concat(Q.name,"@").concat(Q.version,"/rive.wasm"),g}(),C;(function(g){g[g.Number=56]="Number",g[g.Trigger=58]="Trigger",g[g.Boolean=59]="Boolean"})(C||(C={}));var A=function(){function g(V,D){this.type=V,this.runtimeInput=D}return Object.defineProperty(g.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(V){this.runtimeInput.value=V},enumerable:!1,configurable:!0}),g.prototype.fire=function(){if(this.type===C.Trigger)this.runtimeInput.fire()},g.prototype.delete=function(){this.runtimeInput=null},g}(),b;(function(g){g[g.General=128]="General",g[g.OpenUrl=131]="OpenUrl"})(b||(b={}));var x=function(){function g(V){this.nativeArtboard=V}return g}(),k=function(){function g(V,D,L,E){this.stateMachine=V,this.playing=L,this.artboard=E,this.inputs=[],this.instance=new D.StateMachineInstance(V,E),this.initInputs(D)}return Object.defineProperty(g.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"statesChanged",{get:function(){var V=[];for(var D=0;D=0||W0>=0)if(n>=0)this.animations[n].playing=D;else this.stateMachines[W0].playing=D;else{var q0=this.artboard.animationByName(V[p]);if(q0){var L0=new W.Animation(q0,this.artboard,this.runtime,D);L0.advance(0),L0.apply(1),this.animations.push(L0)}else{var j0=this.artboard.stateMachineByName(V[p]);if(j0){var g0=new k(j0,this.runtime,D,this.artboard);this.stateMachines.push(g0)}}}}}if(L)if(D)this.eventManager.fire({type:T.Play,data:this.playing});else this.eventManager.fire({type:T.Pause,data:this.paused});return D?this.playing:this.paused},g.prototype.initLinearAnimations=function(V,D){var L=this.animations.map(function(W0){return W0.name});for(var E=0;E=0)this.animations[w].playing=D;else{var p=this.artboard.animationByName(V[E]);if(p){var n=new W.Animation(p,this.artboard,this.runtime,D);n.advance(0),n.apply(1),this.animations.push(n)}else console.error("Animation with name ".concat(V[E]," not found."))}}},g.prototype.initStateMachines=function(V,D){var L=this.stateMachines.map(function(W0){return W0.name});for(var E=0;E=0)this.stateMachines[w].playing=D;else{var p=this.artboard.stateMachineByName(V[E]);if(p){var n=new k(p,this.runtime,D,this.artboard);this.stateMachines.push(n)}else console.warn("State Machine with name ".concat(V[E]," not found.")),this.initLinearAnimations([V[E]],D)}}},g.prototype.play=function(V){return this.add(V,!0)},g.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(V){if(!V.playing)V.advanceAndApply(0)})},g.prototype.pause=function(V){return this.add(V,!1)},g.prototype.scrub=function(V,D){var L=this.animations.filter(function(E){return V.includes(E.name)});return L.forEach(function(E){return E.scrubTo=D}),L.map(function(E){return E.name})},Object.defineProperty(g.prototype,"playing",{get:function(){return this.animations.filter(function(V){return V.playing}).map(function(V){return V.name}).concat(this.stateMachines.filter(function(V){return V.playing}).map(function(V){return V.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"paused",{get:function(){return this.animations.filter(function(V){return!V.playing}).map(function(V){return V.name}).concat(this.stateMachines.filter(function(V){return!V.playing}).map(function(V){return V.name}))},enumerable:!1,configurable:!0}),g.prototype.stop=function(V){var D=this;V=r(V);var L=[];if(V.length===0)L=this.animations.map(function(p){return p.name}).concat(this.stateMachines.map(function(p){return p.name})),this.animations.forEach(function(p){return p.cleanup()}),this.stateMachines.forEach(function(p){return p.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var E=this.animations.filter(function(p){return V.includes(p.name)});E.forEach(function(p){p.cleanup(),D.animations.splice(D.animations.indexOf(p),1)});var w=this.stateMachines.filter(function(p){return V.includes(p.name)});w.forEach(function(p){p.cleanup(),D.stateMachines.splice(D.stateMachines.indexOf(p),1)}),L=E.map(function(p){return p.name}).concat(w.map(function(p){return p.name}))}return this.eventManager.fire({type:T.Stop,data:L}),L},Object.defineProperty(g.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(V,D){return V||D.playing},!1)||this.stateMachines.reduce(function(V,D){return V||D.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),g.prototype.atLeastOne=function(V,D){if(D===void 0)D=!0;var L;if(this.animations.length===0&&this.stateMachines.length===0){if(this.artboard.animationCount()>0)this.add([L=this.artboard.animationByIndex(0).name],V,D);else if(this.artboard.stateMachineCount()>0)this.add([L=this.artboard.stateMachineByIndex(0).name],V,D)}return L},g.prototype.handleLooping=function(){for(var V=0,D=this.animations.filter(function(E){return E.playing});V1)this.eventManager.fire({type:T.Loop,data:{animation:L.name,type:_.PingPong}}),L.loopCount=0}},g.prototype.handleStateChanges=function(){var V=[];for(var D=0,L=this.stateMachines.filter(function(w){return w.playing});D0)this.eventManager.fire({type:T.StateChange,data:V})},g.prototype.handleAdvancing=function(V){this.eventManager.fire({type:T.Advance,data:V})},g}(),T;(function(g){g.Load="load",g.LoadError="loaderror",g.Play="play",g.Pause="pause",g.Stop="stop",g.Loop="loop",g.Draw="draw",g.Advance="advance",g.StateChange="statechange",g.RiveEvent="riveevent",g.AudioStatusChange="audiostatuschange"})(T||(T={}));var _;(function(g){g.OneShot="oneshot",g.Loop="loop",g.PingPong="pingpong"})(_||(_={}));var d=function(){function g(V){if(V===void 0)V=[];this.listeners=V}return g.prototype.getListeners=function(V){return this.listeners.filter(function(D){return D.type===V})},g.prototype.add=function(V){if(!this.listeners.includes(V))this.listeners.push(V)},g.prototype.remove=function(V){for(var D=0;D0){var V=this.queue.shift();if(V===null||V===void 0?void 0:V.action)V.action();if(V===null||V===void 0?void 0:V.event)this.eventManager.fire(V.event)}},g}(),t;(function(g){g[g.AVAILABLE=0]="AVAILABLE",g[g.UNAVAILABLE=1]="UNAVAILABLE"})(t||(t={}));var e=function(g){q(V,g);function V(){var D=g!==null&&g.apply(this,arguments)||this;return D._started=!1,D._enabled=!1,D._status=t.UNAVAILABLE,D}return V.prototype.delay=function(D){return X(this,void 0,void 0,function(){return H(this,function(L){return[2,new Promise(function(E){return setTimeout(E,D)})]})})},V.prototype.timeout=function(){return X(this,void 0,void 0,function(){return H(this,function(D){return[2,new Promise(function(L,E){return setTimeout(E,50)})]})})},V.prototype.reportToListeners=function(){this.fire({type:T.AudioStatusChange}),this.removeAll()},V.prototype.enableAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(D){if(!this._enabled)this._enabled=!0,this._status=t.AVAILABLE,this.reportToListeners();return[2]})})},V.prototype.testAudio=function(){return X(this,void 0,void 0,function(){var D;return H(this,function(L){switch(L.label){case 0:if(!(this._status===t.UNAVAILABLE&&this._audioContext!==null))return[3,4];L.label=1;case 1:return L.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return L.sent(),this.enableAudio(),[3,4];case 3:return D=L.sent(),[3,4];case 4:return[2]}})})},V.prototype._establishAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(D){switch(D.label){case 0:if(this._started)return[3,5];if(this._started=!0,!(typeof window>"u"))return[3,1];return this.enableAudio(),[3,5];case 1:this._audioContext=new AudioContext,this.listenForUserAction(),D.label=2;case 2:if(this._status!==t.UNAVAILABLE)return[3,5];return[4,this.testAudio()];case 3:return D.sent(),[4,this.delay(1000)];case 4:return D.sent(),[3,2];case 5:return[2]}})})},V.prototype.listenForUserAction=function(){var D=this,L=function(){return X(D,void 0,void 0,function(){return H(this,function(E){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",L,{once:!0})},V.prototype.establishAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(D){return this._establishAudio(),[2]})})},Object.defineProperty(V.prototype,"systemVolume",{get:function(){if(this._status===t.UNAVAILABLE)return this.testAudio(),0;return 1},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),V}(d),Z0=new e,U0=function(){function g(){}return g.prototype.observe=function(){},g.prototype.unobserve=function(){},g.prototype.disconnect=function(){},g}(),H0=globalThis.ResizeObserver||U0,C0=function(){function g(){var V=this;this._elementsMap=new Map,this._onObservedEntry=function(D){var L=V._elementsMap.get(D.target);if(L!==null)L.onResize(D.target.clientWidth==0||D.target.clientHeight==0);else V._resizeObserver.unobserve(D.target)},this._onObserved=function(D){D.forEach(V._onObservedEntry)},this._resizeObserver=new H0(this._onObserved)}return g.prototype.add=function(V,D){var L={onResize:D,element:V};return this._elementsMap.set(V,L),this._resizeObserver.observe(V),L},g.prototype.remove=function(V){this._resizeObserver.unobserve(V.element),this._elementsMap.delete(V.element)},g}(),B0=new C0,l=function(){function g(V){if(this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.src=V.src,this.buffer=V.buffer,V.assetLoader)this.assetLoader=V.assetLoader;if(this.enableRiveAssetCDN=typeof V.enableRiveAssetCDN=="boolean"?V.enableRiveAssetCDN:!0,this.eventManager=new d,V.onLoad)this.on(T.Load,V.onLoad);if(V.onLoadError)this.on(T.LoadError,V.onLoadError)}return g.prototype.releaseFile=function(){var V;if(this.selfUnref)(V=this.file)===null||V===void 0||V.unref();this.file=null},g.prototype.initData=function(){return X(this,void 0,void 0,function(){var V,D,L,E,w;return H(this,function(p){switch(p.label){case 0:if(!this.src)return[3,2];return V=this,[4,H1(this.src)];case 1:V.buffer=p.sent(),p.label=2;case 2:if(this.destroyed)return[2];if(this.assetLoader)L=new z.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),D=L.assetLoader;return E=this,[4,this.runtime.load(new Uint8Array(this.buffer),D,this.enableRiveAssetCDN)];case 3:if(E.file=p.sent(),w=new z.FileFinalizer(this.file),z.finalizationRegistry.register(this,w),this.destroyed)return this.releaseFile(),[2];if(this.file!==null)this.eventManager.fire({type:T.Load,data:this});else this.fireLoadError(g.fileLoadErrorMessage);return[2]}})})},g.prototype.init=function(){return X(this,void 0,void 0,function(){var V,D;return H(this,function(L){switch(L.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(g.missingErrorMessage),[2];L.label=1;case 1:return L.trys.push([1,4,,5]),V=this,[4,h.awaitInstance()];case 2:if(V.runtime=L.sent(),this.destroyed)return[2];return[4,this.initData()];case 3:return L.sent(),[3,5];case 4:return D=L.sent(),this.fireLoadError(D instanceof Error?D.message:g.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},g.prototype.fireLoadError=function(V){throw this.eventManager.fire({type:T.LoadError,data:V}),Error(V)},g.prototype.on=function(V,D){this.eventManager.add({type:V,callback:D})},g.prototype.off=function(V,D){this.eventManager.remove({type:V,callback:D})},g.prototype.cleanup=function(){if(this.referenceCount-=1,this.referenceCount<=0)this.removeAllRiveEventListeners(),this.releaseFile(),this.destroyed=!0},g.prototype.removeAllRiveEventListeners=function(V){this.eventManager.removeAll(V)},g.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},g.prototype.destroyIfUnused=function(){if(this.referenceCount<=0)this.cleanup()},g.prototype.getArtboard=function(V){var D=this.file.artboardByName(V);if(D!=null)return new x(D);return null},g.missingErrorMessage="Rive source file or data buffer required",g.fileLoadErrorMessage="The file failed to load",g}(),E0=function(){function g(V){var D=this,L;if(this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(E){var w=D._hasZeroSize!==E;if(D._hasZeroSize=E,!E){if(w)D.resizeDrawingSurfaceToCanvas()}else if(!D._layout.maxX||!D._layout.maxY)D.resizeToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=V.canvas,V.canvas.constructor===HTMLCanvasElement)this._observed=B0.add(this.canvas,this.onCanvasResize);if(this.src=V.src,this.buffer=V.buffer,this.riveFile=V.riveFile,this.layout=(L=V.layout)!==null&&L!==void 0?L:new y,this.shouldDisableRiveListeners=!!V.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!V.isTouchScrollEnabled,this.automaticallyHandleEvents=!!V.automaticallyHandleEvents,this.enableRiveAssetCDN=V.enableRiveAssetCDN===void 0?!0:V.enableRiveAssetCDN,this.eventManager=new d,V.onLoad)this.on(T.Load,V.onLoad);if(V.onLoadError)this.on(T.LoadError,V.onLoadError);if(V.onPlay)this.on(T.Play,V.onPlay);if(V.onPause)this.on(T.Pause,V.onPause);if(V.onStop)this.on(T.Stop,V.onStop);if(V.onLoop)this.on(T.Loop,V.onLoop);if(V.onStateChange)this.on(T.StateChange,V.onStateChange);if(V.onAdvance)this.on(T.Advance,V.onAdvance);if(V.onload&&!V.onLoad)this.on(T.Load,V.onload);if(V.onloaderror&&!V.onLoadError)this.on(T.LoadError,V.onloaderror);if(V.onplay&&!V.onPlay)this.on(T.Play,V.onplay);if(V.onpause&&!V.onPause)this.on(T.Pause,V.onpause);if(V.onstop&&!V.onStop)this.on(T.Stop,V.onstop);if(V.onloop&&!V.onLoop)this.on(T.Loop,V.onloop);if(V.onstatechange&&!V.onStateChange)this.on(T.StateChange,V.onstatechange);if(V.assetLoader)this.assetLoader=V.assetLoader;this.taskQueue=new s(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:V.autoplay,autoBind:V.autoBind,animations:V.animations,stateMachines:V.stateMachines,artboard:V.artboard,useOffscreenRenderer:V.useOffscreenRenderer})}return Object.defineProperty(g.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),g.new=function(V){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new g(V)},g.prototype.onSystemAudioChanged=function(){this.volume=this._volume},g.prototype.init=function(V){var D=this,L=V.src,E=V.buffer,w=V.riveFile,p=V.animations,n=V.stateMachines,W0=V.artboard,q0=V.autoplay,L0=q0===void 0?!1:q0,j0=V.useOffscreenRenderer,g0=j0===void 0?!1:j0,p0=V.autoBind,z1=p0===void 0?!1:p0;if(this.destroyed)return;if(this.src=L,this.buffer=E,this.riveFile=w,!this.src&&!this.buffer&&!this.riveFile)throw new N(g.missingErrorMessage);var W1=r(p),N1=r(n);this.loaded=!1,this.readyForPlaying=!1,h.awaitInstance().then(function(_0){if(D.destroyed)return;if(D.runtime=_0,D.removeRiveListeners(),D.deleteRiveRenderer(),D.renderer=D.runtime.makeRenderer(D.canvas,g0),!(D.canvas.width||D.canvas.height))D.resizeDrawingSurfaceToCanvas();D.initData(W0,W1,N1,L0,z1).then(function(R1){if(R1)return D.setupRiveListeners()}).catch(function(R1){console.error(R1)})}).catch(function(_0){console.error(_0)})},g.prototype.setupRiveListeners=function(V){var D=this;if(this.eventCleanup)this.eventCleanup();if(!this.shouldDisableRiveListeners){var L=(this.animator.stateMachines||[]).filter(function(w){return w.playing&&D.runtime.hasListeners(w.instance)}).map(function(w){return w.instance}),E=this.isTouchScrollEnabled;if(V&&"isTouchScrollEnabled"in V)E=V.isTouchScrollEnabled;this.eventCleanup=(0,z.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:L,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:E,layoutScaleFactor:this._layout.layoutScaleFactor})}},g.prototype.removeRiveListeners=function(){if(this.eventCleanup)this.eventCleanup(),this.eventCleanup=null},g.prototype.initializeAudio=function(){var V=this,D;if(Z0.status==t.UNAVAILABLE){if(((D=this.artboard)===null||D===void 0?void 0:D.hasAudio)&&this._audioEventListener===null)this._audioEventListener={type:T.AudioStatusChange,callback:function(){return V.onSystemAudioChanged()}},Z0.add(this._audioEventListener),Z0.establishAudio()}},g.prototype.initArtboardSize=function(){if(!this.artboard)return;this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height},g.prototype.initData=function(V,D,L,E,w){return X(this,void 0,void 0,function(){var p,n,W0,q0;return H(this,function(L0){switch(L0.label){case 0:if(L0.trys.push([0,3,,4]),this.riveFile!=null)return[3,2];return p=new l({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=p,[4,p.init()];case 1:if(L0.sent(),this.destroyed)return p.destroyIfUnused(),[2,!1];L0.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(V,D,L,E,w),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:T.Load,data:(q0=this.src)!==null&&q0!==void 0?q0:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return n=L0.sent(),W0=B(n),console.warn(W0),this.eventManager.fire({type:T.LoadError,data:W0}),[2,Promise.reject(W0)];case 4:return[2]}})})},g.prototype.initArtboard=function(V,D,L,E,w){if(!this.file)return;var p=V?this.file.artboardByName(V):this.file.defaultArtboard();if(!p){var n="Invalid artboard name or no default artboard";console.warn(n),this.eventManager.fire({type:T.LoadError,data:n});return}this.artboard=p,p.volume=this._volume*Z0.systemVolume,this.animator=new f(this.runtime,this.artboard,this.eventManager);var W0;if(D.length>0||L.length>0)W0=D.concat(L),this.animator.initLinearAnimations(D,E),this.animator.initStateMachines(L,E);else W0=[this.animator.atLeastOne(E,!1)];if(this.taskQueue.add({event:{type:E?T.Play:T.Pause,data:W0}}),w){var q0=this.file.defaultArtboardViewModel(p);if(q0!==null){var L0=q0.defaultInstance();if(L0!==null){var j0=new i0(L0,null);this.bindViewModelInstance(j0)}}}},g.prototype.drawFrame=function(){var V,D;if((V=document===null||document===void 0?void 0:document.timeline)===null||V===void 0?void 0:V.currentTime){if(this.loaded&&this.artboard&&!this.frameRequestId)this._boundDraw(document.timeline.currentTime),(D=this.runtime)===null||D===void 0||D.resolveAnimationFrame()}else this.startRendering()},g.prototype.draw=function(V,D){var L;this.frameRequestId=null;var E=performance.now();if(!this.lastRenderTime)this.lastRenderTime=V;if(this.renderSecondTimer+=V-this.lastRenderTime,this.renderSecondTimer>5000)this.renderSecondTimer=0,D===null||D===void 0||D();var w=(V-this.lastRenderTime)/1000;this.lastRenderTime=V;var p=this.animator.animations.filter(function(h1){return h1.playing||h1.needsScrub}).sort(function(h1){return h1.needsScrub?-1:1});for(var n=0,W0=p;n0)this.animator.stateMachines.forEach(function(L){return L.bindViewModelInstance(V)});else this.artboard.bindViewModelInstance(V.runtimeInstance)}},Object.defineProperty(g.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),g.prototype.viewModelByIndex=function(V){var D=this.file.viewModelByIndex(V);if(D!==null)return new h0(D);return null},g.prototype.viewModelByName=function(V){var D=this.file.viewModelByName(V);if(D!==null)return new h0(D);return null},g.prototype.enums=function(){if(this._dataEnums===null){var V=this.file.enums();this._dataEnums=V.map(function(D){return new P0(D)})}return this._dataEnums},g.prototype.defaultViewModel=function(){if(this.artboard){var V=this.file.defaultArtboardViewModel(this.artboard);if(V)return new h0(V)}return null},g.prototype.getArtboard=function(V){var D,L;return(L=(D=this.riveFile)===null||D===void 0?void 0:D.getArtboard(V))!==null&&L!==void 0?L:null},g.missingErrorMessage="Rive source file or data buffer required",g.cleanupErrorMessage="Attempt to use file after calling cleanup.",g}(),h0=function(){function g(V){this._viewModel=V}return Object.defineProperty(g.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),g.prototype.instanceByIndex=function(V){var D=this._viewModel.instanceByIndex(V);if(D!==null)return new i0(D,null);return null},g.prototype.instanceByName=function(V){var D=this._viewModel.instanceByName(V);if(D!==null)return new i0(D,null);return null},g.prototype.defaultInstance=function(){var V=this._viewModel.defaultInstance();if(V!==null)return new i0(V,null);return null},g.prototype.instance=function(){var V=this._viewModel.instance();if(V!==null)return new i0(V,null);return null},Object.defineProperty(g.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),g}(),P0=function(){function g(V){this._dataEnum=V}return Object.defineProperty(g.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),g}(),M0;(function(g){g.Number="number",g.String="string",g.Boolean="boolean",g.Color="color",g.Trigger="trigger",g.Enum="enum",g.List="list",g.Image="image",g.Artboard="artboard"})(M0||(M0={}));var i0=function(){function g(V,D){if(this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=V,D!==null)this._parents.push(D)}return Object.defineProperty(g.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),g.prototype.handleCallbacks=function(){if(this._propertiesWithCallbacks.length!==0)this._propertiesWithCallbacks.forEach(function(V){V.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(V){V.clearChanges()});this._children.forEach(function(V){return V.handleCallbacks()})},g.prototype.addParent=function(V){if(!this._parents.includes(V)){if(this._parents.push(V),this._propertiesWithCallbacks.length>0||this._children.length>0)V.addToViewModelCallbacks(this)}},g.prototype.removeParent=function(V){var D=this._parents.indexOf(V);if(D!==-1){var L=this._parents[D];L.removeFromViewModelCallbacks(this),this._parents.splice(D,1)}},g.prototype.addToPropertyCallbacks=function(V){var D=this;if(!this._propertiesWithCallbacks.includes(V)){if(this._propertiesWithCallbacks.push(V),this._propertiesWithCallbacks.length>0)this._parents.forEach(function(L){L.addToViewModelCallbacks(D)})}},g.prototype.removeFromPropertyCallbacks=function(V){var D=this;if(this._propertiesWithCallbacks.includes(V)){if(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(L){return L!==V}),this._children.length===0&&this._propertiesWithCallbacks.length===0)this._parents.forEach(function(L){L.removeFromViewModelCallbacks(D)})}},g.prototype.addToViewModelCallbacks=function(V){var D=this;if(!this._children.includes(V))this._children.push(V),this._parents.forEach(function(L){L.addToViewModelCallbacks(D)})},g.prototype.removeFromViewModelCallbacks=function(V){var D=this;if(this._children.includes(V)){if(this._children=this._children.filter(function(L){return L!==V}),this._children.length===0&&this._propertiesWithCallbacks.length===0)this._parents.forEach(function(L){L.removeFromViewModelCallbacks(D)})}},g.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(V){V.clearCallbacks()})},g.prototype.propertyFromPath=function(V,D){var L=V.split("/");return this.propertyFromPathSegments(L,0,D)},g.prototype.viewModelFromPathSegments=function(V,D){var L=this.internalViewModelInstance(V[D]);if(L!==null)if(D==V.length-1)return L;else return L.viewModelFromPathSegments(V,D++);return null},g.prototype.propertyFromPathSegments=function(V,D,L){var E,w,p,n,W0,q0,L0,j0,g0,p0,z1,W1,N1,_0,R1,I1,x1,g1;if(D1?this.viewModelFromPathSegments(D.slice(0,D.length-1),0):this;if(L!=null)return L.internalViewModelInstance(D[D.length-1]);return null},g.prototype.internalReplaceViewModel=function(V,D){var L;if(D.runtimeInstance!==null){var E=((L=this._runtimeInstance)===null||L===void 0?void 0:L.replaceViewModel(V,D.runtimeInstance))||!1;if(E){D.internalIncrementReferenceCount();var w=this.internalViewModelInstance(V);if(w!==null){if(w.removeParent(this),this._children.includes(w))this._children=this._children.filter(function(p){return p!==w});w.cleanup()}this._viewModelInstances.set(V,D),D.addParent(this)}return E}return!1},g.prototype.replaceViewModel=function(V,D){var L,E=V.split("/"),w=E.length>1?this.viewModelFromPathSegments(E.slice(0,E.length-1),0):this;return(L=w===null||w===void 0?void 0:w.internalReplaceViewModel(E[E.length-1],D))!==null&&L!==void 0?L:!1},g.prototype.incrementReferenceCount=function(){var V;this._referenceCount++,(V=this._runtimeInstance)===null||V===void 0||V.incrementReferenceCount()},g.prototype.decrementReferenceCount=function(){var V;this._referenceCount--,(V=this._runtimeInstance)===null||V===void 0||V.decrementReferenceCount()},Object.defineProperty(g.prototype,"properties",{get:function(){var V;return((V=this._runtimeInstance)===null||V===void 0?void 0:V.getProperties().map(function(D){return Y({},D)}))||[]},enumerable:!1,configurable:!0}),g.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},g.prototype.cleanup=function(){var V=this;if(this._referenceCount--,this._referenceCount<=0){this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(E){E.cleanup()}),this._viewModelInstances.clear();var D=O([],this._children,!0);this._children.length=0;var L=O([],this._parents,!0);this._parents.length=0,D.forEach(function(E){E.removeParent(V)}),L.forEach(function(E){E.removeFromViewModelCallbacks(V)})}},g}(),A0=function(){function g(V,D){this.callbacks=[],this._viewModelInstanceValue=V,this._parentViewModel=D}return g.prototype.on=function(V){if(this.callbacks.length===0)this._viewModelInstanceValue.clearChanges();if(!this.callbacks.includes(V))this.callbacks.push(V),this._parentViewModel.addToPropertyCallbacks(this)},g.prototype.off=function(V){if(!V)this.callbacks.length=0;else this.callbacks=this.callbacks.filter(function(D){return D!==V});if(this.callbacks.length===0)this._parentViewModel.removeFromPropertyCallbacks(this)},g.prototype.internalHandleCallback=function(V){},g.prototype.handleCallbacks=function(){var V=this;if(this._viewModelInstanceValue.hasChanged)this.callbacks.forEach(function(D){V.internalHandleCallback(D)})},g.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},g.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(g.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),g}(),J1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(D){this._viewModelInstanceValue.value=D},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D(this.value)},V}(A0),e0=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(D){this._viewModelInstanceValue.value=D},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D(this.value)},V}(A0),G1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(D){this._viewModelInstanceValue.value=D},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D(this.value)},V}(A0),n0=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return V.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},V.prototype.internalHandleCallback=function(D){D()},V}(A0),F1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(D){this._viewModelInstanceValue.value=D},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(D){this._viewModelInstanceValue.valueIndex=D},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D(this.value)},V}(A0),B1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),V.prototype.addInstance=function(D){if(D.runtimeInstance!=null)this._viewModelInstanceValue.addInstance(D.runtimeInstance),D.addParent(this._parentViewModel)},V.prototype.addInstanceAt=function(D,L){if(D.runtimeInstance!=null){if(this._viewModelInstanceValue.addInstanceAt(D.runtimeInstance,L))return D.addParent(this._parentViewModel),!0}return!1},V.prototype.removeInstance=function(D){if(D.runtimeInstance!=null)this._viewModelInstanceValue.removeInstance(D.runtimeInstance),D.removeParent(this._parentViewModel)},V.prototype.removeInstanceAt=function(D){this._viewModelInstanceValue.removeInstanceAt(D)},V.prototype.instanceAt=function(D){var L=this._viewModelInstanceValue.instanceAt(D);if(L!=null){var E=new i0(L,this._parentViewModel);return E}return null},V.prototype.swap=function(D,L){this._viewModelInstanceValue.swap(D,L)},V.prototype.internalHandleCallback=function(D){D()},V}(A0),$1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(D){this._viewModelInstanceValue.value=D},enumerable:!1,configurable:!0}),V.prototype.rgb=function(D,L,E){this._viewModelInstanceValue.rgb(D,L,E)},V.prototype.rgba=function(D,L,E,w){this._viewModelInstanceValue.argb(w,D,L,E)},V.prototype.argb=function(D,L,E,w){this._viewModelInstanceValue.argb(D,L,E,w)},V.prototype.alpha=function(D){this._viewModelInstanceValue.alpha(D)},V.prototype.opacity=function(D){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,D))*255))},V.prototype.internalHandleCallback=function(D){D(this.value)},V}(A0),D1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{set:function(D){var L;this._viewModelInstanceValue.value((L=D===null||D===void 0?void 0:D.nativeImage)!==null&&L!==void 0?L:null)},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D()},V}(A0),f1=function(g){q(V,g);function V(D,L){return g.call(this,D,L)||this}return Object.defineProperty(V.prototype,"value",{set:function(D){var L;this._viewModelInstanceValue.value((L=D===null||D===void 0?void 0:D.nativeArtboard)!==null&&L!==void 0?L:null)},enumerable:!1,configurable:!0}),V.prototype.internalHandleCallback=function(D){D()},V}(A0),H1=function(g){return X(void 0,void 0,void 0,function(){var V,D,L;return H(this,function(E){switch(E.label){case 0:return V=new Request(g),[4,fetch(V)];case 1:return D=E.sent(),[4,D.arrayBuffer()];case 2:return L=E.sent(),[2,L]}})})},r=function(g){if(typeof g==="string")return[g];else if(g instanceof Array)return g;return[]},o1={EventManager:d,TaskQueueManager:s},y1=function(g){return X(void 0,void 0,void 0,function(){var V,D,L;return H(this,function(E){switch(E.label){case 0:return V=new Promise(function(w){return h.getInstance(function(p){p.decodeAudio(g,w)})}),[4,V];case 1:return D=E.sent(),L=new z.AudioWrapper(D),z.finalizationRegistry.register(L,D),[2,L]}})})},L8=function(g){return X(void 0,void 0,void 0,function(){var V,D,L;return H(this,function(E){switch(E.label){case 0:return V=new Promise(function(w){return h.getInstance(function(p){p.decodeImage(g,w)})}),[4,V];case 1:return D=E.sent(),L=new z.ImageWrapper(D),z.finalizationRegistry.register(L,D),[2,L]}})})},O1=function(g){return X(void 0,void 0,void 0,function(){var V,D,L;return H(this,function(E){switch(E.label){case 0:return V=new Promise(function(w){return h.getInstance(function(p){p.decodeFont(g,w)})}),[4,V];case 1:return D=E.sent(),L=new z.FontWrapper(D),z.finalizationRegistry.register(L,D),[2,L]}})})}})(),$})()})});var VW=SK((t7,K6)=>{(function(J,Z){if(typeof t7==="object"&&typeof K6==="object")K6.exports=Z();else if(typeof define==="function"&&define.amd)define([],Z);else if(typeof t7==="object")t7.rive=Z();else J.rive=Z()})(t7,()=>{return(()=>{var G=[,(K,Q,W)=>{W.r(Q),W.d(Q,{default:()=>q});var z=(()=>{var Y=typeof document<"u"?document.currentScript?.src:void 0;return function(X={}){var H,O=X,N,B,R=new Promise((S,I)=>{N=S,B=I}),P=typeof window=="object",y=typeof importScripts=="function";function h(){function S(O0){let K0=c;u=I=0,c=new Map,K0.forEach((F0)=>{try{F0(O0)}catch(Y0){console.error(Y0)}}),this.ua(),o&&o.Oa()}let I=0,u=0,c=new Map,o=null,a=null;this.requestAnimationFrame=function(O0){I||=requestAnimationFrame(S.bind(this));let K0=++u;return c.set(K0,O0),K0},this.cancelAnimationFrame=function(O0){c.delete(O0),I&&c.size==0&&(cancelAnimationFrame(I),I=0)},this.Ma=function(O0){a&&(document.body.remove(a),a=null),O0||(a=document.createElement("div"),a.style.backgroundColor="black",a.style.position="fixed",a.style.right=0,a.style.top=0,a.style.color="white",a.style.padding="4px",a.innerHTML="RIVE FPS",O0=function(K0){a.innerHTML="RIVE FPS "+K0.toFixed(1)},document.body.appendChild(a)),o=new function(){let K0=0,F0=0;this.Oa=function(){var Y0=performance.now();F0?(++K0,Y0-=F0,1000>S,I.has(c)&&clearTimeout(I.get(c)),I.set(c,setTimeout(function(){I.delete(c),I.length==0?u=-1/0:c==u&&(u=Math.max(...I.keys()),console.assert(u{let a=O.ptrToFileAsset(o);return a.isImage?O.ptrToImageAsset(o):a.isFont?O.ptrToFontAsset(o):a.isAudio?O.ptrToAudioAsset(o):a},O.CustomFileAssetLoader=u.extend("CustomFileAssetLoader",{__construct:function({loadContents:o}){this.__parent.__construct.call(this),this.Da=o},loadContents:function(o,a){return o=O.ptrToAsset(o),this.Da(o,a)}}),O.CDNFileAssetLoader=u.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(o){let a=O.ptrToAsset(o);if(o=a.cdnUuid,o==="")return!1;return function(O0,K0){var F0=new XMLHttpRequest;F0.responseType="arraybuffer",F0.onreadystatechange=function(){F0.readyState==4&&F0.status==200&&K0(F0)},F0.open("GET",O0,!0),F0.send(null)}(a.cdnBaseUrl+"/"+o,(O0)=>{a.decode(new Uint8Array(O0.response))}),!0}}),O.FallbackFileAssetLoader=u.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.ta=[]},addLoader:function(o){this.ta.push(o)},loadContents:function(o,a){for(let O0 of this.ta)if(O0.loadContents(o,a))return!0;return!1}});let c=O.computeAlignment;O.computeAlignment=function(o,a,O0,K0,F0=1){return c.call(this,o,a,O0,K0,F0)}};let b="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),x=new function(){function S(){if(!I){let k1=function(A1,v0,p1){if(v0=V0.createShader(v0),V0.shaderSource(v0,p1),V0.compileShader(v0),p1=V0.getShaderInfoLog(v0),0<(p1||"").length)throw p1;V0.attachShader(A1,v0)};var J0=document.createElement("canvas"),S0={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let V0;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(V0=J0.getContext("webgl",S0),u=1,!V0)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(V0=J0.getContext("webgl2",S0))u=2;else if(V0=J0.getContext("webgl",S0))u=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(V0=new Proxy(V0,{get(A1,v0){if(A1.isContextLost()){if(F0||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",v0),F0=!0),typeof A1[v0]==="function")return function(){}}else return typeof A1[v0]==="function"?function(...p1){return A1[v0].apply(A1,p1)}:A1[v0]},set(A1,v0,p1){if(A1.isContextLost())F0||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+v0),F0=!0);else return A1[v0]=p1,!0}}),c=Math.min(V0.getParameter(V0.MAX_RENDERBUFFER_SIZE),V0.getParameter(V0.MAX_TEXTURE_SIZE)),J0=V0.createProgram(),k1(J0,V0.VERTEX_SHADER,`attribute vec2 vertex; attribute vec2 uv; uniform vec4 mat; uniform vec2 translate; varying vec2 st; void main() { st = uv; gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1); }`),k1(J0,V0.FRAGMENT_SHADER,`precision highp float; uniform sampler2D image; varying vec2 st; void main() { gl_FragColor = texture2D(image, st); }`),V0.bindAttribLocation(J0,0,"vertex"),V0.bindAttribLocation(J0,1,"uv"),V0.linkProgram(J0),S0=V0.getProgramInfoLog(J0),0<(S0||"").trim().length)throw S0;o=V0.getUniformLocation(J0,"mat"),a=V0.getUniformLocation(J0,"translate"),V0.useProgram(J0),V0.bindBuffer(V0.ARRAY_BUFFER,V0.createBuffer()),V0.enableVertexAttribArray(0),V0.enableVertexAttribArray(1),V0.bindBuffer(V0.ELEMENT_ARRAY_BUFFER,V0.createBuffer()),V0.uniform1i(V0.getUniformLocation(J0,"image"),0),V0.pixelStorei(V0.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),I=V0}return!0}let I=null,u=0,c=0,o=null,a=null,O0=0,K0=0,F0=!1;S(),this.Wa=function(){return S(),c},this.Ia=function(J0){I.deleteTexture&&I.deleteTexture(J0)},this.Ha=function(J0){if(!S())return null;let S0=I.createTexture();if(!S0)return null;return I.bindTexture(I.TEXTURE_2D,S0),I.texImage2D(I.TEXTURE_2D,0,I.RGBA,I.RGBA,I.UNSIGNED_BYTE,J0),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,I.CLAMP_TO_EDGE),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,I.CLAMP_TO_EDGE),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MAG_FILTER,I.LINEAR),u==2?(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MIN_FILTER,I.LINEAR_MIPMAP_LINEAR),I.generateMipmap(I.TEXTURE_2D)):I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MIN_FILTER,I.LINEAR),S0};let Y0=new C(8),k0=new C(8),a0=new C(10),o0=new C(10);this.La=function(J0,S0,V0,k1,A1){if(S()){var v0=Y0.push(J0),p1=k0.push(S0);if(I.canvas){if(I.canvas.width!=v0||I.canvas.height!=p1)I.canvas.width=v0,I.canvas.height=p1;I.viewport(0,p1-S0,J0,S0),I.disable(I.SCISSOR_TEST),I.clearColor(0,0,0,0),I.clear(I.COLOR_BUFFER_BIT),I.enable(I.SCISSOR_TEST),V0.sort((S1,A9)=>A9.xa-S1.xa),v0=a0.push(k1),O0!=v0&&(I.bufferData(I.ARRAY_BUFFER,8*v0,I.DYNAMIC_DRAW),O0=v0),v0=0;for(var F8 of V0)I.bufferSubData(I.ARRAY_BUFFER,v0,F8.ha),v0+=4*F8.ha.length;console.assert(v0==4*k1);for(var t8 of V0)I.bufferSubData(I.ARRAY_BUFFER,v0,t8.Aa),v0+=4*t8.Aa.length;console.assert(v0==8*k1),v0=o0.push(A1),K0!=v0&&(I.bufferData(I.ELEMENT_ARRAY_BUFFER,2*v0,I.DYNAMIC_DRAW),K0=v0),F8=0;for(var L$ of V0)I.bufferSubData(I.ELEMENT_ARRAY_BUFFER,F8,L$.indices),F8+=2*L$.indices.length;console.assert(F8==2*A1),L$=0,t8=!0,v0=F8=0;for(let S1 of V0){S1.image.ca!=L$&&(I.bindTexture(I.TEXTURE_2D,S1.image.ba||null),L$=S1.image.ca),S1.Za?(I.scissor(S1.ma,p1-S1.na-S1.sa,S1.kb,S1.sa),t8=!0):t8&&(I.scissor(0,p1-S0,J0,S0),t8=!1),V0=2/J0;let A9=-2/S0;I.uniform4f(o,S1.M[0]*V0*S1.W,S1.M[1]*A9*S1.X,S1.M[2]*V0*S1.W,S1.M[3]*A9*S1.X),I.uniform2f(a,S1.M[4]*V0*S1.W+V0*(S1.ma-S1.Xa*S1.W)-1,S1.M[5]*A9*S1.X+A9*(S1.na-S1.Ya*S1.X)+1),I.vertexAttribPointer(0,2,I.FLOAT,!1,0,v0),I.vertexAttribPointer(1,2,I.FLOAT,!1,0,v0+4*k1),I.drawElements(I.TRIANGLES,S1.indices.length,I.UNSIGNED_SHORT,F8),v0+=4*S1.ha.length,F8+=2*S1.indices.length}console.assert(v0==4*k1),console.assert(F8==2*A1)}}},this.canvas=function(){return S()&&I.canvas}},k=O.onRuntimeInitialized;O.onRuntimeInitialized=function(){function S(R0){switch(R0){case Y0.srcOver:return"source-over";case Y0.screen:return"screen";case Y0.overlay:return"overlay";case Y0.darken:return"darken";case Y0.lighten:return"lighten";case Y0.colorDodge:return"color-dodge";case Y0.colorBurn:return"color-burn";case Y0.hardLight:return"hard-light";case Y0.softLight:return"soft-light";case Y0.difference:return"difference";case Y0.exclusion:return"exclusion";case Y0.multiply:return"multiply";case Y0.hue:return"hue";case Y0.saturation:return"saturation";case Y0.color:return"color";case Y0.luminosity:return"luminosity"}}function I(R0){return"rgba("+((16711680&R0)>>>16)+","+((65280&R0)>>>8)+","+((255&R0)>>>0)+","+((4278190080&R0)>>>24)/255+")"}function u(){0R0)throw"restore() called without matching save().";this.F.splice(R0),this.u.push(this.m.restore.bind(this.m))},transform:function(R0,b0,C1,T1,Y1,E1){let w1=this.F,u1=w1.length-6;w1.splice(u1,6,w1[u1]*R0+w1[u1+2]*b0,w1[u1+1]*R0+w1[u1+3]*b0,w1[u1]*C1+w1[u1+2]*T1,w1[u1+1]*C1+w1[u1+3]*T1,w1[u1]*Y1+w1[u1+2]*E1+w1[u1+4],w1[u1+1]*Y1+w1[u1+3]*E1+w1[u1+5]),this.u.push(this.m.transform.bind(this.m,R0,b0,C1,T1,Y1,E1))},rotate:function(R0){let b0=Math.sin(R0);R0=Math.cos(R0),this.transform(R0,b0,-b0,R0,0,0)},_drawPath:function(R0,b0){this.u.push(b0.draw.bind(b0,this.m,R0.G,R0.ja===o0?"evenodd":"nonzero"))},_drawRiveImage:function(R0,b0,C1,T1){var Y1=R0.Ca;if(Y1){var E1=this.m,w1=S(C1);this.u.push(function(){E1.globalCompositeOperation=w1,E1.globalAlpha=T1,E1.drawImage(Y1,0,0),E1.globalAlpha=1})}},_getMatrix:function(R0){let b0=this.F,C1=b0.length-6;for(let T1=0;6>T1;++T1)R0[T1]=b0[C1+T1]},_drawImageMesh:function(R0,b0,C1,T1,Y1,E1,w1,u1,B9,j8,m8){b0=this.m.canvas.width;var V8=this.m.canvas.height;let L7=j8-u1,F7=m8-B9;u1=Math.max(u1,0),B9=Math.max(B9,0),j8=Math.min(j8,b0),m8=Math.min(m8,V8);let l9=j8-u1,b8=m8-B9;if(console.assert(l9<=Math.min(L7,b0)),console.assert(b8<=Math.min(F7,V8)),!(0>=l9||0>=b8)){j8=l9V8&&(m8*=V8/T9,T9=V8),R9>V8&&(b0*=V8/R9,R9=V8),v0||(v0=new O.DynamicRectanizer(V8),v0.reset(512,512)),V8=v0.addRect(T9,R9),0>V8&&(u(),A1.add(this),V8=v0.addRect(T9,R9),console.assert(0<=V8));var F$=V8&65535,r9=V8>>16;p1.push({M:this.F.slice(this.F.length-6),image:R0,ma:F$,na:r9,Xa:u1,Ya:B9,kb:T9,sa:R9,W:m8,X:b0,ha:new Float32Array(Y1),Aa:new Float32Array(E1),indices:new Uint16Array(w1),Za:j8,xa:R0.ca<<1|(j8?1:0)}),F8+=Y1.length,t8+=w1.length;var s9=this.m,B8=S(C1);this.u.push(function(){s9.save(),s9.resetTransform(),s9.globalCompositeOperation=B8,s9.globalAlpha=T1;let X7=x.canvas();X7&&s9.drawImage(X7,F$,r9,T9,R9,u1,B9,l9,b8),s9.restore()})}},_clipPath:function(R0){this.u.push(this.m.clip.bind(this.m,R0.G,R0.ja===o0?"evenodd":"nonzero"))},clear:function(){A1.add(this),this.u.push(this.m.clearRect.bind(this.m,0,0,this.ia.width,this.ia.height))},flush:function(){},translate:function(R0,b0){this.transform(1,0,0,1,R0,b0)}});O.makeRenderer=function(R0){let b0=new L$(R0),C1=b0.m;return new Proxy(b0,{get(T1,Y1){if(typeof T1[Y1]==="function")return function(...E1){return T1[Y1].apply(T1,E1)};if(typeof C1[Y1]==="function"){if(-1{C1[Y1]=E1}),!0}})},O.decodeImage=function(R0,b0){new S0({P:b0}).decode(R0)},O.renderFactory={makeRenderPaint:function(){return new k1},makeRenderPath:function(){return new V0},makeRenderImage:function(){let R0=A9;return new S0({V:()=>{R0.total++},P:()=>{if(R0.loaded++,R0.loaded===R0.total){let b0=R0.ready;b0&&(b0(),R0.ready=null)}}})}};let S1=O.load,A9=null;O.load=function(R0,b0,C1=!0){let T1=new O.FallbackFileAssetLoader;return b0!==void 0&&T1.addLoader(b0),C1&&(b0=new O.CDNFileAssetLoader,T1.addLoader(b0)),new Promise(function(Y1){let E1=null;A9={total:0,loaded:0,ready:function(){Y1(E1)}},E1=S1(R0,T1),A9.total==0&&Y1(E1)})};let VK=O.RendererWrapper.prototype.align;O.RendererWrapper.prototype.align=function(R0,b0,C1,T1,Y1=1){VK.call(this,R0,b0,C1,T1,Y1)},c=new h,O.requestAnimationFrame=c.requestAnimationFrame.bind(c),O.cancelAnimationFrame=c.cancelAnimationFrame.bind(c),O.enableFPSCounter=c.Ma.bind(c),O.disableFPSCounter=c.Ja,c.ua=u,O.resolveAnimationFrame=u,O.cleanup=function(){v0&&v0.delete()}};var f=Object.assign({},O),T="./this.program",_="",d,s;if(P||y)y?_=self.location.href:typeof document<"u"&&document.currentScript&&(_=document.currentScript.src),Y&&(_=Y),_.startsWith("blob:")?_="":_=_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1),y&&(s=(S)=>{var I=new XMLHttpRequest;return I.open("GET",S,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),d=(S,I,u)=>{if(H1(S)){var c=new XMLHttpRequest;c.open("GET",S,!0),c.responseType="arraybuffer",c.onload=()=>{c.status==200||c.status==0&&c.response?I(c.response):u()},c.onerror=u,c.send(null)}else fetch(S,{credentials:"same-origin"}).then((o)=>o.ok?o.arrayBuffer():Promise.reject(Error(o.status+" : "+o.url))).then(I,u)};var t=O.print||console.log.bind(console),e=O.printErr||console.error.bind(console);Object.assign(O,f),f=null,O.thisProgram&&(T=O.thisProgram);var Z0;O.wasmBinary&&(Z0=O.wasmBinary);var U0,H0=!1,C0,B0,l,E0,h0,P0,M0,i0;function A0(){var S=U0.buffer;O.HEAP8=C0=new Int8Array(S),O.HEAP16=l=new Int16Array(S),O.HEAPU8=B0=new Uint8Array(S),O.HEAPU16=E0=new Uint16Array(S),O.HEAP32=h0=new Int32Array(S),O.HEAPU32=P0=new Uint32Array(S),O.HEAPF32=M0=new Float32Array(S),O.HEAPF64=i0=new Float64Array(S)}var J1=[],e0=[],G1=[];function n0(){var S=O.preRun.shift();J1.unshift(S)}var F1=0,B1=null,$1=null;function D1(S){throw O.onAbort?.(S),S="Aborted("+S+")",e(S),H0=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),B(S),S}var f1=(S)=>S.startsWith("data:application/octet-stream;base64,"),H1=(S)=>S.startsWith("file://"),r;function o1(S){if(S==r&&Z0)return new Uint8Array(Z0);if(s)return s(S);throw"both async and sync fetching of the wasm failed"}function y1(S){return Z0?Promise.resolve().then(()=>o1(S)):new Promise((I,u)=>{d(S,(c)=>I(new Uint8Array(c)),()=>{try{I(o1(S))}catch(c){u(c)}})})}function L8(S,I,u){return y1(S).then((c)=>WebAssembly.instantiate(c,I)).then(u,(c)=>{e(`failed to asynchronously prepare wasm: ${c}`),D1(c)})}function O1(S,I){var u=r;return Z0||typeof WebAssembly.instantiateStreaming!="function"||f1(u)||H1(u)||typeof fetch!="function"?L8(u,S,I):fetch(u,{credentials:"same-origin"}).then((c)=>WebAssembly.instantiateStreaming(c,S).then(I,function(o){return e(`wasm streaming compile failed: ${o}`),e("falling back to ArrayBuffer instantiation"),L8(u,S,I)}))}var g=(S)=>{for(;0Object.defineProperty(I,"name",{value:S}),D=[],L=[],E,w=(S)=>{if(!S)throw new E("Cannot use deleted val. handle = "+S);return L[S]},p=(S)=>{switch(S){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let I=D.pop()||L.length;return L[I]=S,L[I+1]=1,I}},n=(S)=>{var I=Error,u=V(S,function(c){this.name=S,this.message=c,c=Error(c).stack,c!==void 0&&(this.stack=this.toString()+` `+c.replace(/^Error(:[^\n]*)?\n/,""))});return u.prototype=Object.create(I.prototype),u.prototype.constructor=u,u.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},u},W0,q0,L0=(S)=>{for(var I="";B0[S];)I+=q0[B0[S++]];return I},j0=[],g0=()=>{for(;j0.length;){var S=j0.pop();S.g.L=!1,S.delete()}},p0,z1={},W1=(S,I)=>{if(I===void 0)throw new E("ptr should not be undefined");for(;S.o;)I=S.R(I),S=S.o;return I},N1={},_0=(S)=>{S=V9(S);var I=L0(S);return q9(S),I},R1=(S,I)=>{var u=N1[S];if(u===void 0)throw S=`${I} has unknown type ${_0(S)}`,new E(S);return u},I1=()=>{},x1=!1,g1=(S,I,u)=>{if(I===u)return S;if(u.o===void 0)return null;return S=g1(S,I,u.o),S===null?null:u.Ka(S)},u0={},K1=(S,I)=>{return I=W1(S,I),z1[I]},h1,U1=(S,I)=>{if(!I.j||!I.i)throw new h1("makeClassHandle requires ptr and ptrType");if(!!I.v!==!!I.s)throw new h1("Both smartPtrType and smartPtr must be specified");return I.count={value:1},l0(Object.create(S,{g:{value:I,writable:!0}}))},l0=(S)=>{if(typeof FinalizationRegistry>"u")return l0=(I)=>I,S;return x1=new FinalizationRegistry((I)=>{I=I.g,--I.count.value,I.count.value===0&&(I.s?I.v.C(I.s):I.j.h.C(I.i))}),l0=(I)=>{var u=I.g;return u.s&&x1.register(I,{g:u},I),I},I1=(I)=>{x1.unregister(I)},l0(S)},r0={},X1=(S)=>{for(;S.length;){var I=S.pop();S.pop()(I)}};function T0(S){return this.fromWireType(P0[S>>2])}var X0={},s0={},m0=(S,I,u)=>{function c(K0){if(K0=u(K0),K0.length!==S.length)throw new h1("Mismatched type converter count");for(var F0=0;F0{N1.hasOwnProperty(K0)?o[F0]=N1[K0]:(a.push(K0),X0.hasOwnProperty(K0)||(X0[K0]=[]),X0[K0].push(()=>{o[F0]=N1[K0],++O0,O0===a.length&&c(o)}))}),a.length===0&&c(o)};function G8(S,I,u={}){var c=I.name;if(!S)throw new E(`type "${c}" must have a positive integer typeid pointer`);if(N1.hasOwnProperty(S)){if(u.Ua)return;throw new E(`Cannot register type '${c}' twice`)}N1[S]=I,delete s0[S],X0.hasOwnProperty(S)&&(I=X0[S],delete X0[S],I.forEach((o)=>o()))}function Q1(S,I,u={}){if(!("argPackAdvance"in I))throw TypeError("registerType registeredInstance requires argPackAdvance");return G8(S,I,u)}var c1=(S)=>{throw new E(S.g.j.h.name+" instance already deleted")};function J8(){}var s1=(S,I,u)=>{if(S[I].l===void 0){var c=S[I];S[I]=function(...o){if(!S[I].l.hasOwnProperty(o.length))throw new E(`Function '${u}' called with an invalid number of arguments (${o.length}) - expects one of (${S[I].l})!`);return S[I].l[o.length].apply(this,o)},S[I].l=[],S[I].l[c.K]=c}},v1=(S,I,u)=>{if(O.hasOwnProperty(S)){if(u===void 0||O[S].l!==void 0&&O[S].l[u]!==void 0)throw new E(`Cannot register public name '${S}' twice`);if(s1(O,S,S),O.hasOwnProperty(u))throw new E(`Cannot register multiple overloads of a function with the same number of arguments (${u})!`);O[S].l[u]=I}else O[S]=I,u!==void 0&&(O[S].mb=u)},_1=(S)=>{if(S===void 0)return"_unknown";S=S.replace(/[^a-zA-Z0-9_]/g,"$");var I=S.charCodeAt(0);return 48<=I&&57>=I?`_${S}`:S};function n8(S,I,u,c,o,a,O0,K0){this.name=S,this.constructor=I,this.B=u,this.C=c,this.o=o,this.Pa=a,this.R=O0,this.Ka=K0,this.va=[]}var P1=(S,I,u)=>{for(;I!==u;){if(!I.R)throw new E(`Expected null or instance of ${u.name}, got an instance of ${I.name}`);S=I.R(S),I=I.o}return S};function A8(S,I){if(I===null){if(this.da)throw new E(`null is not a valid ${this.name}`);return 0}if(!I.g)throw new E(`Cannot pass "${PJ(I)}" as a ${this.name}`);if(!I.g.i)throw new E(`Cannot pass deleted object as a pointer of type ${this.name}`);return P1(I.g.i,I.g.j.h,this.h)}function H9(S,I){if(I===null){if(this.da)throw new E(`null is not a valid ${this.name}`);if(this.U){var u=this.ea();return S!==null&&S.push(this.C,u),u}return 0}if(!I||!I.g)throw new E(`Cannot pass "${PJ(I)}" as a ${this.name}`);if(!I.g.i)throw new E(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.T&&I.g.j.T)throw new E(`Cannot convert argument of type ${I.g.v?I.g.v.name:I.g.j.name} to parameter type ${this.name}`);if(u=P1(I.g.i,I.g.j.h,this.h),this.U){if(I.g.s===void 0)throw new E("Passing raw pointer to smart pointer is illegal");switch(this.fb){case 0:if(I.g.v===this)u=I.g.s;else throw new E(`Cannot convert argument of type ${I.g.v?I.g.v.name:I.g.j.name} to parameter type ${this.name}`);break;case 1:u=I.g.s;break;case 2:if(I.g.v===this)u=I.g.s;else{var c=I.clone();u=this.ab(u,p(()=>c.delete())),S!==null&&S.push(this.C,u)}break;default:throw new E("Unsupporting sharing policy")}}return u}function W8(S,I){if(I===null){if(this.da)throw new E(`null is not a valid ${this.name}`);return 0}if(!I.g)throw new E(`Cannot pass "${PJ(I)}" as a ${this.name}`);if(!I.g.i)throw new E(`Cannot pass deleted object as a pointer of type ${this.name}`);if(I.g.j.T)throw new E(`Cannot convert argument of type ${I.g.j.name} to parameter type ${this.name}`);return P1(I.g.i,I.g.j.h,this.h)}function $8(S,I,u,c,o,a,O0,K0,F0,Y0,k0){this.name=S,this.h=I,this.da=u,this.T=c,this.U=o,this.$a=a,this.fb=O0,this.wa=K0,this.ea=F0,this.ab=Y0,this.C=k0,o||I.o!==void 0?this.toWireType=H9:(this.toWireType=c?A8:W8,this.A=null)}var m1=(S,I,u)=>{if(!O.hasOwnProperty(S))throw new h1("Replacing nonexistent public symbol");O[S].l!==void 0&&u!==void 0?O[S].l[u]=I:(O[S]=I,O[S].K=u)},x8=[],m9,N8=(S)=>{var I=x8[S];return I||(S>=x8.length&&(x8.length=S+1),x8[S]=I=m9.get(S)),I},a1=(S,I,u=[])=>{return S.includes("j")?(S=S.replace(/p/g,"i"),I=(0,O["dynCall_"+S])(I,...u)):I=N8(I)(...u),I},r8=(S,I)=>(...u)=>a1(S,I,u),H8=(S,I)=>{S=L0(S);var u=S.includes("j")?r8(S,I):N8(I);if(typeof u!="function")throw new E(`unknown function pointer with signature ${S}: ${I}`);return u},S$,E8=(S,I)=>{function u(a){o[a]||N1[a]||(s0[a]?s0[a].forEach(u):(c.push(a),o[a]=!0))}var c=[],o={};throw I.forEach(u),new S$(`${S}: `+c.map(_0).join([", "]))};function u8(S){for(var I=1;Ia)throw new E("argTypes array size mismatch! Must at least get return value and 'this' types!");var O0=I[1]!==null&&u!==null,K0=u8(I),F0=I[0].name!=="void",Y0=a-2,k0=Array(Y0),a0=[],o0=[];return V(S,function(...J0){if(J0.length!==Y0)throw new E(`function ${S} called with ${J0.length} arguments, expected ${Y0}`);if(o0.length=0,a0.length=O0?2:1,a0[0]=o,O0){var S0=I[1].toWireType(o0,this);a0[1]=S0}for(var V0=0;V0{for(var u=[],c=0;c>2]);return u},h8=(S)=>{S=S.trim();let I=S.indexOf("(");return I!==-1?S.substr(0,I):S},A$=(S,I,u)=>{if(!(S instanceof Object))throw new E(`${u} with invalid "this": ${S}`);if(!(S instanceof I.h.constructor))throw new E(`${u} incompatible with "this" of type ${S.constructor.name}`);if(!S.g.i)throw new E(`cannot call emscripten binding method ${u} on deleted object`);return P1(S.g.i,S.g.j.h,I.h)},E9=(S)=>{9{var I=w(S);return E9(S),I},toWireType:(S,I)=>p(I),argPackAdvance:8,readValueFromPointer:T0,A:null},IJ=(S,I,u)=>{switch(I){case 1:return u?function(c){return this.fromWireType(C0[c])}:function(c){return this.fromWireType(B0[c])};case 2:return u?function(c){return this.fromWireType(l[c>>1])}:function(c){return this.fromWireType(E0[c>>1])};case 4:return u?function(c){return this.fromWireType(h0[c>>2])}:function(c){return this.fromWireType(P0[c>>2])};default:throw TypeError(`invalid integer width (${I}): ${S}`)}},PJ=(S)=>{if(S===null)return"null";var I=typeof S;return I==="object"||I==="array"||I==="function"?S.toString():""+S},U9=(S,I)=>{switch(I){case 4:return function(u){return this.fromWireType(M0[u>>2])};case 8:return function(u){return this.fromWireType(i0[u>>3])};default:throw TypeError(`invalid float width (${I}): ${S}`)}},T$=(S,I,u)=>{switch(I){case 1:return u?(c)=>C0[c]:(c)=>B0[c];case 2:return u?(c)=>l[c>>1]:(c)=>E0[c>>1];case 4:return u?(c)=>h0[c>>2]:(c)=>P0[c>>2];default:throw TypeError(`invalid integer width (${I}): ${S}`)}},q1=(S,I,u,c)=>{if(0=a){var O0=S.charCodeAt(++o);a=65536+((a&1023)<<10)|O0&1023}if(127>=a){if(u>=c)break;I[u++]=a}else{if(2047>=a){if(u+1>=c)break;I[u++]=192|a>>6}else{if(65535>=a){if(u+2>=c)break;I[u++]=224|a>>12}else{if(u+3>=c)break;I[u++]=240|a>>18,I[u++]=128|a>>12&63}I[u++]=128|a>>6&63}I[u++]=128|a&63}}I[u]=0}},z9=(S)=>{for(var I=0,u=0;u=c?I++:2047>=c?I+=2:55296<=c&&57343>=c?(I+=4,++u):I+=3}return I},j9=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,o$=(S,I,u)=>{var c=I+u;for(u=I;S[u]&&!(u>=c);)++u;if(16o?c+=String.fromCharCode(o):(o-=65536,c+=String.fromCharCode(55296|o>>10,56320|o&1023))}}else c+=String.fromCharCode(o)}return c},G7=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,HZ=(S,I)=>{var u=S>>1;for(var c=u+I/2;!(u>=c)&&E0[u];)++u;if(u<<=1,32=I/2);++c){var o=l[S+2*c>>1];if(o==0)break;u+=String.fromCharCode(o)}return u},Z8=(S,I,u)=>{if(u??=2147483647,2>u)return 0;u-=2;var c=I;u=u<2*S.length?u/2:S.length;for(var o=0;o>1]=S.charCodeAt(o),I+=2;return l[I>>1]=0,I-c},i$=(S)=>2*S.length,W7=(S,I)=>{for(var u=0,c="";!(u>=I/4);){var o=h0[S+4*u>>2];if(o==0)break;++u,65536<=o?(o-=65536,c+=String.fromCharCode(55296|o>>10,56320|o&1023)):c+=String.fromCharCode(o)}return c},n$=(S,I,u)=>{if(u??=2147483647,4>u)return 0;var c=I;u=c+u-4;for(var o=0;o=a){var O0=S.charCodeAt(++o);a=65536+((a&1023)<<10)|O0&1023}if(h0[I>>2]=a,I+=4,I+4>u)break}return h0[I>>2]=0,I-c},d9=(S)=>{for(var I=0,u=0;u=c&&++u,I+=4}return I},kJ=(S,I,u)=>{var c=[];return S=S.toWireType(c,u),c.length&&(P0[I>>2]=p(c)),S},H$={},SJ=(S)=>{var I=H$[S];return I===void 0?L0(S):I},U$=[],AJ=(S)=>{var I=U$.length;return U$.push(S),I},H7=(S,I)=>{for(var u=Array(S),c=0;c>2],"parameter "+c);return u},UZ=Reflect.construct,TJ={},U7=()=>{if(!z7){var S={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:T||"./this.program"},I;for(I in TJ)TJ[I]===void 0?delete S[I]:S[I]=TJ[I];var u=[];for(I in S)u.push(`${I}=${S[I]}`);z7=u}return z7},z7,zZ=[null,[],[]],z$=(S)=>S%4===0&&(S%100!==0||S%400===0),r$=[31,29,31,30,31,30,31,31,30,31,30,31],q$=[31,28,31,30,31,30,31,31,30,31,30,31];function wJ(S){var I=Array(z9(S)+1);return q1(S,I,0,I.length),I}var a$=(S,I,u,c)=>{function o(J0,S0,V0){for(J0=typeof J0=="number"?J0.toString():J0||"";J0.lengthA1?-1:0k1-J0.getDate())S0-=k1-J0.getDate()+1,J0.setDate(1),11>V0?J0.setMonth(V0+1):(J0.setMonth(0),J0.setFullYear(J0.getFullYear()+1));else{J0.setDate(J0.getDate()+S0);break}}return V0=new Date(J0.getFullYear()+1,0,4),S0=K0(new Date(J0.getFullYear(),0,4)),V0=K0(V0),0>=O0(S0,J0)?0>=O0(V0,J0)?J0.getFullYear()+1:J0.getFullYear():J0.getFullYear()-1}var Y0=P0[c+40>>2];c={ib:h0[c>>2],hb:h0[c+4>>2],Y:h0[c+8>>2],ga:h0[c+12>>2],Z:h0[c+16>>2],J:h0[c+20>>2],D:h0[c+24>>2],I:h0[c+28>>2],nb:h0[c+32>>2],gb:h0[c+36>>2],jb:Y0?Y0?o$(B0,Y0):"":""},u=u?o$(B0,u):"",Y0={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var k0 in Y0)u=u.replace(new RegExp(k0,"g"),Y0[k0]);var a0="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),o0="January February March April May June July August September October November December".split(" ");Y0={"%a":(J0)=>a0[J0.D].substring(0,3),"%A":(J0)=>a0[J0.D],"%b":(J0)=>o0[J0.Z].substring(0,3),"%B":(J0)=>o0[J0.Z],"%C":(J0)=>a((J0.J+1900)/100|0,2),"%d":(J0)=>a(J0.ga,2),"%e":(J0)=>o(J0.ga,2," "),"%g":(J0)=>F0(J0).toString().substring(2),"%G":F0,"%H":(J0)=>a(J0.Y,2),"%I":(J0)=>{return J0=J0.Y,J0==0?J0=12:12{for(var S0=0,V0=0;V0<=J0.Z-1;S0+=(z$(J0.J+1900)?r$:q$)[V0++]);return a(J0.ga+S0,3)},"%m":(J0)=>a(J0.Z+1,2),"%M":(J0)=>a(J0.hb,2),"%n":()=>` `,"%p":(J0)=>0<=J0.Y&&12>J0.Y?"AM":"PM","%S":(J0)=>a(J0.ib,2),"%t":()=>"\t","%u":(J0)=>J0.D||7,"%U":(J0)=>a(Math.floor((J0.I+7-J0.D)/7),2),"%V":(J0)=>{var S0=Math.floor((J0.I+7-(J0.D+6)%7)/7);if(2>=(J0.D+371-J0.I-2)%7&&S0++,S0)S0==53&&(V0=(J0.D+371-J0.I)%7,V0==4||V0==3&&z$(J0.J)||(S0=1));else{S0=52;var V0=(J0.D+7-J0.I-1)%7;(V0==4||V0==5&&z$(J0.J%400-1))&&S0++}return a(S0,2)},"%w":(J0)=>J0.D,"%W":(J0)=>a(Math.floor((J0.I+7-(J0.D+6)%7)/7),2),"%y":(J0)=>(J0.J+1900).toString().substring(2),"%Y":(J0)=>J0.J+1900,"%z":(J0)=>{J0=J0.gb;var S0=0<=J0;return J0=Math.abs(J0)/60,(S0?"+":"-")+String("0000"+(J0/60*100+J0%60)).slice(-4)},"%Z":(J0)=>J0.jb,"%%":()=>"%"},u=u.replace(/%%/g,"\x00\x00");for(k0 in Y0)u.includes(k0)&&(u=u.replace(new RegExp(k0,"g"),Y0[k0](c)));if(u=u.replace(/\0\0/g,"%"),k0=wJ(u),k0.length>I)return 0;return C0.set(k0,S),k0.length-1};E=O.BindingError=class extends Error{constructor(S){super(S);this.name="BindingError"}},L.push(0,1,void 0,1,null,1,!0,1,!1,1),O.count_emval_handles=()=>L.length/2-5-D.length,W0=O.PureVirtualError=n("PureVirtualError");for(var w$=Array(256),c9=0;256>c9;++c9)w$[c9]=String.fromCharCode(c9);q0=w$,O.getInheritedInstanceCount=()=>Object.keys(z1).length,O.getLiveInheritedInstances=()=>{var S=[],I;for(I in z1)z1.hasOwnProperty(I)&&S.push(z1[I]);return S},O.flushPendingDeletes=g0,O.setDelayFunction=(S)=>{p0=S,j0.length&&p0&&p0(g0)},h1=O.InternalError=class extends Error{constructor(S){super(S);this.name="InternalError"}},Object.assign(J8.prototype,{isAliasOf:function(S){if(!(this instanceof J8&&S instanceof J8))return!1;var I=this.g.j.h,u=this.g.i;S.g=S.g;var c=S.g.j.h;for(S=S.g.i;I.o;)u=I.R(u),I=I.o;for(;c.o;)S=c.R(S),c=c.o;return I===c&&u===S},clone:function(){if(this.g.i||c1(this),this.g.N)return this.g.count.value+=1,this;var S=l0,I=Object,u=I.create,c=Object.getPrototypeOf(this),o=this.g;return S=S(u.call(I,c,{g:{value:{count:o.count,L:o.L,N:o.N,i:o.i,j:o.j,s:o.s,v:o.v}}})),S.g.count.value+=1,S.g.L=!1,S},["delete"](){if(this.g.i||c1(this),this.g.L&&!this.g.N)throw new E("Object already scheduled for deletion");I1(this);var S=this.g;--S.count.value,S.count.value===0&&(S.s?S.v.C(S.s):S.j.h.C(S.i)),this.g.N||(this.g.s=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){if(this.g.i||c1(this),this.g.L&&!this.g.N)throw new E("Object already scheduled for deletion");return j0.push(this),j0.length===1&&p0&&p0(g0),this.g.L=!0,this}}),Object.assign($8.prototype,{Qa(S){return this.wa&&(S=this.wa(S)),S},oa(S){this.C?.(S)},argPackAdvance:8,readValueFromPointer:T0,fromWireType:function(S){function I(){return this.U?U1(this.h.B,{j:this.$a,i:u,v:this,s:S}):U1(this.h.B,{j:this,i:S})}var u=this.Qa(S);if(!u)return this.oa(S),null;var c=K1(this.h,u);if(c!==void 0){if(c.g.count.value===0)return c.g.i=u,c.g.s=S,c.clone();return c=c.clone(),this.oa(S),c}if(c=this.h.Pa(u),c=u0[c],!c)return I.call(this);c=this.T?c.Ga:c.pointerType;var o=g1(u,this.h,c.h);return o===null?I.call(this):this.U?U1(c.h.B,{j:c,i:o,v:this,s:S}):U1(c.h.B,{j:c,i:o})}}),S$=O.UnboundTypeError=n("UnboundTypeError");var t$={_abort_js:()=>{D1("")},_embind_create_inheriting_constructor:(S,I,u)=>{S=L0(S),I=R1(I,"wrapper"),u=w(u);var c=I.h,o=c.B,a=c.o.B,O0=c.o.constructor;return S=V(S,function(...K0){c.o.va.forEach(function(F0){if(this[F0]===a[F0])throw new W0(`Pure virtual function ${F0} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:o}),this.__construct(...K0)}),o.__construct=function(...K0){if(this===o)throw new E("Pass correct 'this' to __construct");K0=O0.implement(this,...K0),I1(K0);var F0=K0.g;if(K0.notifyOnDestruction(),F0.N=!0,Object.defineProperties(this,{g:{value:F0}}),l0(this),K0=F0.i,K0=W1(c,K0),z1.hasOwnProperty(K0))throw new E(`Tried to register registered instance: ${K0}`);z1[K0]=this},o.__destruct=function(){if(this===o)throw new E("Pass correct 'this' to __destruct");I1(this);var K0=this.g.i;if(K0=W1(c,K0),z1.hasOwnProperty(K0))delete z1[K0];else throw new E(`Tried to unregister unregistered instance: ${K0}`)},S.prototype=Object.create(o),Object.assign(S.prototype,u),p(S)},_embind_finalize_value_object:(S)=>{var I=r0[S];delete r0[S];var{ea:u,C:c,ra:o}=I,a=o.map((O0)=>O0.Ta).concat(o.map((O0)=>O0.cb));m0([S],a,(O0)=>{var K0={};return o.forEach((F0,Y0)=>{var k0=O0[Y0],a0=F0.Ra,o0=F0.Sa,J0=O0[Y0+o.length],S0=F0.bb,V0=F0.eb;K0[F0.Na]={read:(k1)=>k0.fromWireType(a0(o0,k1)),write:(k1,A1)=>{var v0=[];S0(V0,k1,J0.toWireType(v0,A1)),X1(v0)}}}),[{name:I.name,fromWireType:(F0)=>{var Y0={},k0;for(k0 in K0)Y0[k0]=K0[k0].read(F0);return c(F0),Y0},toWireType:(F0,Y0)=>{for(var k0 in K0)if(!(k0 in Y0))throw TypeError(`Missing field: "${k0}"`);var a0=u();for(k0 in K0)K0[k0].write(a0,Y0[k0]);return F0!==null&&F0.push(c,a0),a0},argPackAdvance:8,readValueFromPointer:T0,A:c}]})},_embind_register_bigint:()=>{},_embind_register_bool:(S,I,u,c)=>{I=L0(I),Q1(S,{name:I,fromWireType:function(o){return!!o},toWireType:function(o,a){return a?u:c},argPackAdvance:8,readValueFromPointer:function(o){return this.fromWireType(B0[o])},A:null})},_embind_register_class:(S,I,u,c,o,a,O0,K0,F0,Y0,k0,a0,o0)=>{k0=L0(k0),a=H8(o,a),K0&&=H8(O0,K0),Y0&&=H8(F0,Y0),o0=H8(a0,o0);var J0=_1(k0);v1(J0,function(){E8(`Cannot construct ${k0} due to unbound types`,[c])}),m0([S,I,u],c?[c]:[],(S0)=>{if(S0=S0[0],c)var V0=S0.h,k1=V0.B;else k1=J8.prototype;S0=V(k0,function(...F8){if(Object.getPrototypeOf(this)!==A1)throw new E("Use 'new' to construct "+k0);if(v0.H===void 0)throw new E(k0+" has no accessible constructor");var t8=v0.H[F8.length];if(t8===void 0)throw new E(`Tried to invoke ctor of ${k0} with invalid number of parameters (${F8.length}) - expected (${Object.keys(v0.H).toString()}) parameters instead!`);return t8.apply(this,F8)});var A1=Object.create(k1,{constructor:{value:S0}});S0.prototype=A1;var v0=new n8(k0,S0,A1,o0,V0,a,K0,Y0);if(v0.o){var p1;(p1=v0.o).S??(p1.S=[]),v0.o.S.push(v0)}return V0=new $8(k0,v0,!0,!1,!1),p1=new $8(k0+"*",v0,!1,!1,!1),k1=new $8(k0+" const*",v0,!1,!0,!1),u0[S]={pointerType:p1,Ga:k1},m1(J0,S0),[V0,p1,k1]})},_embind_register_class_class_function:(S,I,u,c,o,a,O0)=>{var K0=a8(u,c);I=L0(I),I=h8(I),a=H8(o,a),m0([],[S],(F0)=>{function Y0(){E8(`Cannot call ${k0} due to unbound types`,K0)}F0=F0[0];var k0=`${F0.name}.${I}`;I.startsWith("@@")&&(I=Symbol[I.substring(2)]);var a0=F0.h.constructor;return a0[I]===void 0?(Y0.K=u-1,a0[I]=Y0):(s1(a0,I,k0),a0[I].l[u-1]=Y0),m0([],K0,(o0)=>{if(o0=T8(k0,[o0[0],null].concat(o0.slice(1)),null,a,O0),a0[I].l===void 0?(o0.K=u-1,a0[I]=o0):a0[I].l[u-1]=o0,F0.h.S)for(let J0 of F0.h.S)J0.constructor.hasOwnProperty(I)||(J0.constructor[I]=o0);return[]}),[]})},_embind_register_class_class_property:(S,I,u,c,o,a,O0,K0)=>{I=L0(I),a=H8(o,a),m0([],[S],(F0)=>{F0=F0[0];var Y0=`${F0.name}.${I}`,k0={get(){E8(`Cannot access ${Y0} due to unbound types`,[u])},enumerable:!0,configurable:!0};return k0.set=K0?()=>{E8(`Cannot access ${Y0} due to unbound types`,[u])}:()=>{throw new E(`${Y0} is a read-only property`)},Object.defineProperty(F0.h.constructor,I,k0),m0([],[u],(a0)=>{a0=a0[0];var o0={get(){return a0.fromWireType(a(c))},enumerable:!0};return K0&&(K0=H8(O0,K0),o0.set=(J0)=>{var S0=[];K0(c,a0.toWireType(S0,J0)),X1(S0)}),Object.defineProperty(F0.h.constructor,I,o0),[]}),[]})},_embind_register_class_constructor:(S,I,u,c,o,a)=>{var O0=a8(I,u);o=H8(c,o),m0([],[S],(K0)=>{K0=K0[0];var F0=`constructor ${K0.name}`;if(K0.h.H===void 0&&(K0.h.H=[]),K0.h.H[I-1]!==void 0)throw new E(`Cannot register multiple constructors with identical number of parameters (${I-1}) for class '${K0.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return K0.h.H[I-1]=()=>{E8(`Cannot construct ${K0.name} due to unbound types`,O0)},m0([],O0,(Y0)=>{return Y0.splice(1,0,null),K0.h.H[I-1]=T8(F0,Y0,null,o,a),[]}),[]})},_embind_register_class_function:(S,I,u,c,o,a,O0,K0)=>{var F0=a8(u,c);I=L0(I),I=h8(I),a=H8(o,a),m0([],[S],(Y0)=>{function k0(){E8(`Cannot call ${a0} due to unbound types`,F0)}Y0=Y0[0];var a0=`${Y0.name}.${I}`;I.startsWith("@@")&&(I=Symbol[I.substring(2)]),K0&&Y0.h.va.push(I);var o0=Y0.h.B,J0=o0[I];return J0===void 0||J0.l===void 0&&J0.className!==Y0.name&&J0.K===u-2?(k0.K=u-2,k0.className=Y0.name,o0[I]=k0):(s1(o0,I,a0),o0[I].l[u-2]=k0),m0([],F0,(S0)=>{return S0=T8(a0,S0,Y0,a,O0),o0[I].l===void 0?(S0.K=u-2,o0[I]=S0):o0[I].l[u-2]=S0,[]}),[]})},_embind_register_class_property:(S,I,u,c,o,a,O0,K0,F0,Y0)=>{I=L0(I),o=H8(c,o),m0([],[S],(k0)=>{k0=k0[0];var a0=`${k0.name}.${I}`,o0={get(){E8(`Cannot access ${a0} due to unbound types`,[u,O0])},enumerable:!0,configurable:!0};return o0.set=F0?()=>E8(`Cannot access ${a0} due to unbound types`,[u,O0]):()=>{throw new E(a0+" is a read-only property")},Object.defineProperty(k0.h.B,I,o0),m0([],F0?[u,O0]:[u],(J0)=>{var S0=J0[0],V0={get(){var A1=A$(this,k0,a0+" getter");return S0.fromWireType(o(a,A1))},enumerable:!0};if(F0){F0=H8(K0,F0);var k1=J0[1];V0.set=function(A1){var v0=A$(this,k0,a0+" setter"),p1=[];F0(Y0,v0,k1.toWireType(p1,A1)),X1(p1)}}return Object.defineProperty(k0.h.B,I,V0),[]}),[]})},_embind_register_emval:(S)=>Q1(S,WZ),_embind_register_enum:(S,I,u,c)=>{function o(){}I=L0(I),o.values={},Q1(S,{name:I,constructor:o,fromWireType:function(a){return this.constructor.values[a]},toWireType:(a,O0)=>O0.value,argPackAdvance:8,readValueFromPointer:IJ(I,u,c),A:null}),v1(I,o)},_embind_register_enum_value:(S,I,u)=>{var c=R1(S,"enum");I=L0(I),S=c.constructor,c=Object.create(c.constructor.prototype,{value:{value:u},constructor:{value:V(`${c.name}_${I}`,function(){})}}),S.values[u]=c,S[I]=c},_embind_register_float:(S,I,u)=>{I=L0(I),Q1(S,{name:I,fromWireType:(c)=>c,toWireType:(c,o)=>o,argPackAdvance:8,readValueFromPointer:U9(I,u),A:null})},_embind_register_function:(S,I,u,c,o,a)=>{var O0=a8(I,u);S=L0(S),S=h8(S),o=H8(c,o),v1(S,function(){E8(`Cannot call ${S} due to unbound types`,O0)},I-1),m0([],O0,(K0)=>{return m1(S,T8(S,[K0[0],null].concat(K0.slice(1)),null,o,a),I-1),[]})},_embind_register_integer:(S,I,u,c,o)=>{if(I=L0(I),o===-1&&(o=4294967295),o=(K0)=>K0,c===0){var a=32-8*u;o=(K0)=>K0<>>a}var O0=I.includes("unsigned")?function(K0,F0){return F0>>>0}:function(K0,F0){return F0};Q1(S,{name:I,fromWireType:o,toWireType:O0,argPackAdvance:8,readValueFromPointer:T$(I,u,c!==0),A:null})},_embind_register_memory_view:(S,I,u)=>{function c(a){return new o(C0.buffer,P0[a+4>>2],P0[a>>2])}var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];u=L0(u),Q1(S,{name:u,fromWireType:c,argPackAdvance:8,readValueFromPointer:c},{Ua:!0})},_embind_register_std_string:(S,I)=>{I=L0(I);var u=I==="std::string";Q1(S,{name:I,fromWireType:function(c){var o=P0[c>>2],a=c+4;if(u)for(var O0=a,K0=0;K0<=o;++K0){var F0=a+K0;if(K0==o||B0[F0]==0){if(O0=O0?o$(B0,O0,F0-O0):"",Y0===void 0)var Y0=O0;else Y0+=String.fromCharCode(0),Y0+=O0;O0=F0+1}}else{Y0=Array(o);for(K0=0;K0>2]=O0,u&&a)q1(o,B0,F0,O0+1);else if(a)for(a=0;a{if(u=L0(u),I===2)var c=HZ,o=Z8,a=i$,O0=(K0)=>E0[K0>>1];else I===4&&(c=W7,o=n$,a=d9,O0=(K0)=>P0[K0>>2]);Q1(S,{name:u,fromWireType:(K0)=>{for(var F0=P0[K0>>2],Y0,k0=K0+4,a0=0;a0<=F0;++a0){var o0=K0+4+a0*I;if(a0==F0||O0(o0)==0)k0=c(k0,o0-k0),Y0===void 0?Y0=k0:(Y0+=String.fromCharCode(0),Y0+=k0),k0=o0+I}return q9(K0),Y0},toWireType:(K0,F0)=>{if(typeof F0!="string")throw new E(`Cannot pass non-string to C++ string type ${u}`);var Y0=a(F0),k0=q7(4+Y0+I);return P0[k0>>2]=Y0/I,o(F0,k0+4,Y0+I),K0!==null&&K0.push(q9,k0),k0},argPackAdvance:8,readValueFromPointer:T0,A(K0){q9(K0)}})},_embind_register_value_object:(S,I,u,c,o,a)=>{r0[S]={name:L0(I),ea:H8(u,c),C:H8(o,a),ra:[]}},_embind_register_value_object_field:(S,I,u,c,o,a,O0,K0,F0,Y0)=>{r0[S].ra.push({Na:L0(I),Ta:u,Ra:H8(c,o),Sa:a,cb:O0,bb:H8(K0,F0),eb:Y0})},_embind_register_void:(S,I)=>{I=L0(I),Q1(S,{lb:!0,name:I,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(S,I,u)=>B0.copyWithin(S,I,I+u),_emval_as:(S,I,u)=>{return S=w(S),I=R1(I,"emval::as"),kJ(I,u,S)},_emval_call_method:(S,I,u,c,o)=>{return S=U$[S],I=w(I),u=SJ(u),S(I,I[u],c,o)},_emval_decref:E9,_emval_get_method_caller:(S,I,u)=>{var c=H7(S,I),o=c.shift();S--;var a=Array(S);return I=`methodCaller<(${c.map((O0)=>O0.name).join(", ")}) => ${o.name}>`,AJ(V(I,(O0,K0,F0,Y0)=>{for(var k0=0,a0=0;a0{return S=SJ(S),p(O[S])},_emval_get_property:(S,I)=>{return S=w(S),I=w(I),p(S[I])},_emval_incref:(S)=>{9p([]),_emval_new_cstring:(S)=>p(SJ(S)),_emval_new_object:()=>p({}),_emval_run_destructors:(S)=>{var I=w(S);X1(I),E9(S)},_emval_set_property:(S,I,u)=>{S=w(S),I=w(I),u=w(u),S[I]=u},_emval_take_value:(S,I)=>{return S=R1(S,"_emval_take_value"),S=S.readValueFromPointer(I),p(S)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:(S)=>{var I=B0.length;if(S>>>=0,2147483648=u;u*=2){var c=I*(1+0.2/u);c=Math.min(c,S+100663296);var o=Math;c=Math.max(S,c);$:{o=(o.min.call(o,2147483648,c+(65536-c%65536)%65536)-U0.buffer.byteLength+65535)/65536;try{U0.grow(o),A0();var a=1;break $}catch(O0){}a=void 0}if(a)return!0}return!1},environ_get:(S,I)=>{var u=0;return U7().forEach((c,o)=>{var a=I+u;o=P0[S+4*o>>2]=a;for(a=0;a{var u=U7();P0[S>>2]=u.length;var c=0;return u.forEach((o)=>c+=o.length+1),P0[I>>2]=c,0},fd_close:()=>52,fd_seek:function(){return 70},fd_write:(S,I,u,c)=>{for(var o=0,a=0;a>2],K0=P0[I+4>>2];I+=8;for(var F0=0;F0>2]=o,0},strftime_l:(S,I,u,c)=>a$(S,I,u,c)},i1=function(){function S(u){return i1=u.exports,U0=i1.memory,A0(),m9=i1.__indirect_function_table,e0.unshift(i1.__wasm_call_ctors),F1--,O.monitorRunDependencies?.(F1),F1==0&&(B1!==null&&(clearInterval(B1),B1=null),$1&&(u=$1,$1=null,u())),i1}var I={env:t$,wasi_snapshot_preview1:t$};if(F1++,O.monitorRunDependencies?.(F1),O.instantiateWasm)try{return O.instantiateWasm(I,S)}catch(u){e(`Module.instantiateWasm callback failed with error: ${u}`),B(u)}return r||=f1("canvas_advanced.wasm")?"canvas_advanced.wasm":O.locateFile?O.locateFile("canvas_advanced.wasm",_):_+"canvas_advanced.wasm",O1(I,function(u){S(u.instance)}).catch(B),{}}(),q9=(S)=>(q9=i1.free)(S),q7=(S)=>(q7=i1.malloc)(S),V9=(S)=>(V9=i1.__getTypeName)(S);O.dynCall_jiji=(S,I,u,c,o)=>(O.dynCall_jiji=i1.dynCall_jiji)(S,I,u,c,o),O.dynCall_viijii=(S,I,u,c,o,a,O0)=>(O.dynCall_viijii=i1.dynCall_viijii)(S,I,u,c,o,a,O0),O.dynCall_iiiiij=(S,I,u,c,o,a,O0)=>(O.dynCall_iiiiij=i1.dynCall_iiiiij)(S,I,u,c,o,a,O0),O.dynCall_iiiiijj=(S,I,u,c,o,a,O0,K0,F0)=>(O.dynCall_iiiiijj=i1.dynCall_iiiiijj)(S,I,u,c,o,a,O0,K0,F0),O.dynCall_iiiiiijj=(S,I,u,c,o,a,O0,K0,F0,Y0)=>(O.dynCall_iiiiiijj=i1.dynCall_iiiiiijj)(S,I,u,c,o,a,O0,K0,F0,Y0);var f$;$1=function S(){f$||p9(),f$||($1=S)};function p9(){function S(){if(!f$&&(f$=!0,O.calledRun=!0,!H0)){if(g(e0),N(O),O.onRuntimeInitialized)O.onRuntimeInitialized();if(O.postRun)for(typeof O.postRun=="function"&&(O.postRun=[O.postRun]);O.postRun.length;){var I=O.postRun.shift();G1.unshift(I)}g(G1)}}if(!(0{K.exports=JSON.parse(`{"name":"@rive-app/canvas-lite","version":"2.32.1","description":"A lite version of Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso (https://rive.app)","Maxwell Talbot (https://rive.app)","Arthur Vivian (https://rive.app)","Umberto Sonnino (https://rive.app)","Matthew Sullivan (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(K,Q,W)=>{W.r(Q),W.d(Q,{Animation:()=>z.Animation});var z=W(4)},(K,Q,W)=>{W.r(Q),W.d(Q,{Animation:()=>z});var z=function(){function q(Y,X,H,O){this.animation=Y,this.artboard=X,this.playing=O,this.loopCount=0,this.scrubTo=null,this.instance=new H.LinearAnimationInstance(Y,X)}return Object.defineProperty(q.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"time",{get:function(){return this.instance.time},set:function(Y){this.instance.time=Y},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),q.prototype.advance=function(Y){if(this.scrubTo===null)this.instance.advance(Y);else this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null},q.prototype.apply=function(Y){this.instance.apply(Y)},q.prototype.cleanup=function(){this.instance.delete()},q}()},(K,Q,W)=>{W.r(Q),W.d(Q,{AudioAssetWrapper:()=>Y.AudioAssetWrapper,AudioWrapper:()=>Y.AudioWrapper,BLANK_URL:()=>q.BLANK_URL,CustomFileAssetLoaderWrapper:()=>Y.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>Y.FileAssetWrapper,FileFinalizer:()=>Y.FileFinalizer,FontAssetWrapper:()=>Y.FontAssetWrapper,FontWrapper:()=>Y.FontWrapper,ImageAssetWrapper:()=>Y.ImageAssetWrapper,ImageWrapper:()=>Y.ImageWrapper,createFinalization:()=>Y.createFinalization,finalizationRegistry:()=>Y.finalizationRegistry,registerTouchInteractions:()=>z.registerTouchInteractions,sanitizeUrl:()=>q.sanitizeUrl});var z=W(6),q=W(7),Y=W(8)},(K,Q,W)=>{W.r(Q),W.d(Q,{registerTouchInteractions:()=>Y});var z=void 0,q=function(X,H,O){var N,B,R=[];if(["touchstart","touchmove"].indexOf(X.type)>-1&&((N=X.changedTouches)===null||N===void 0?void 0:N.length)){if(!H)X.preventDefault();var P=0,y=O?X.changedTouches.length:1;while(P"u")return null;var d=null,s=!1,t=function(Z0){if(s&&Z0 instanceof MouseEvent){if(Z0.type=="mouseup")s=!1;return}s=A&&Z0.type==="touchend"&&d==="touchstart",d=Z0.type;var U0=Z0.currentTarget.getBoundingClientRect(),H0=q(Z0,A,f),C0=P.computeAlignment(y,h,{minX:0,minY:0,maxX:U0.width,maxY:U0.height},O.bounds,_),B0=new P.Mat2D;switch(C0.invert(B0),H0.forEach(function(H1){var{clientX:r,clientY:o1}=H1;if(!r&&!o1)return;var y1=r-U0.left,L8=o1-U0.top,O1=new P.Vec2D(y1,L8),g=P.mapXY(B0,O1),V=g.x(),D=g.y();H1.transformedX=V,H1.transformedY=D,g.delete(),O1.delete()}),B0.delete(),C0.delete(),Z0.type){case"mouseout":var l=function(H1){if(x)H0.forEach(function(r){H1.pointerExit(r.transformedX,r.transformedY,r.identifier)});else H0.forEach(function(r){H1.pointerMove(r.transformedX,r.transformedY,r.identifier)})};for(var E0=0,h0=B;E0{W.r(Q),W.d(Q,{BLANK_URL:()=>N,sanitizeUrl:()=>P});var z=/^([^\w]*)(javascript|data|vbscript)/im,q=/&#(\w+)(^\w|;)?/g,Y=/&(newline|tab);/gi,X=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,H=/^.+(:|:)/gim,O=[".","/"],N="about:blank";function B(y){return O.indexOf(y[0])>-1}function R(y){var h=y.replace(X,"");return h.replace(q,function(C,A){return String.fromCharCode(A)})}function P(y){if(!y)return N;var h=R(y).replace(Y,"").replace(X,"").trim();if(!h)return N;if(B(h))return h;var C=h.match(H);if(!C)return h;var A=C[0];if(z.test(A))return N;return h}},(K,Q,W)=>{W.r(Q),W.d(Q,{AudioAssetWrapper:()=>y,AudioWrapper:()=>O,CustomFileAssetLoaderWrapper:()=>B,FileAssetWrapper:()=>R,FileFinalizer:()=>q,FontAssetWrapper:()=>h,FontWrapper:()=>N,ImageAssetWrapper:()=>P,ImageWrapper:()=>H,createFinalization:()=>x,finalizationRegistry:()=>b});var z=function(){var k=function(f,T){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,d){_.__proto__=d}||function(_,d){for(var s in d)if(Object.prototype.hasOwnProperty.call(d,s))_[s]=d[s]},k(f,T)};return function(f,T){if(typeof T!=="function"&&T!==null)throw TypeError("Class extends value "+String(T)+" is not a constructor or null");k(f,T);function _(){this.constructor=f}f.prototype=T===null?Object.create(T):(_.prototype=T.prototype,new _)}}(),q=function(){function k(f){this.selfUnref=!1,this._file=f}return k.prototype.unref=function(){if(this._file)this._file.unref()},k}(),Y=function(){function k(f){this._finalizableObject=f}return k.prototype.unref=function(){this._finalizableObject.unref()},k}(),X=function(){function k(){this.selfUnref=!1}return k.prototype.unref=function(){},k}(),H=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeImage=T,_}return Object.defineProperty(f.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeImage.unref()},f}(X),O=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeAudio=T,_}return Object.defineProperty(f.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeAudio.unref()},f}(X),N=function(k){z(f,k);function f(T){var _=k.call(this)||this;return _._nativeFont=T,_}return Object.defineProperty(f.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),f.prototype.unref=function(){if(this.selfUnref)this._nativeFont.unref()},f}(X),B=function(){function k(f,T){this._assetLoaderCallback=T,this.assetLoader=new f.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return k.prototype.loadContents=function(f,T){var _;if(f.isImage)_=new P(f);else if(f.isAudio)_=new y(f);else if(f.isFont)_=new h(f);return this._assetLoaderCallback(_,T)},k}(),R=function(){function k(f){this._nativeFileAsset=f}return k.prototype.decode=function(f){this._nativeFileAsset.decode(f)},Object.defineProperty(k.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),k}(),P=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setRenderImage=function(T){this._nativeFileAsset.setRenderImage(T.nativeImage)},f}(R),y=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setAudioSource=function(T){this._nativeFileAsset.setAudioSource(T.nativeAudio)},f}(R),h=function(k){z(f,k);function f(){return k!==null&&k.apply(this,arguments)||this}return f.prototype.setFont=function(T){this._nativeFileAsset.setFont(T.nativeFont)},f}(R),C=function(){function k(f){}return k.prototype.register=function(f){f.selfUnref=!0},k.prototype.unregister=function(f){},k}(),A=typeof FinalizationRegistry<"u"?FinalizationRegistry:C,b=new A(function(k){k===null||k===void 0||k.unref()}),x=function(k,f){var T=new Y(f);b.register(k,T)}}],J={};function Z(K){var Q=J[K];if(Q!==void 0)return Q.exports;var W=J[K]={exports:{}};return G[K](W,W.exports,Z),W.exports}(()=>{Z.d=(K,Q)=>{for(var W in Q)if(Z.o(Q,W)&&!Z.o(K,W))Object.defineProperty(K,W,{enumerable:!0,get:Q[W]})}})(),(()=>{Z.o=(K,Q)=>Object.prototype.hasOwnProperty.call(K,Q)})(),(()=>{Z.r=(K)=>{if(typeof Symbol<"u"&&Symbol.toStringTag)Object.defineProperty(K,Symbol.toStringTag,{value:"Module"});Object.defineProperty(K,"__esModule",{value:!0})}})();var $={};return(()=>{Z.r($),Z.d($,{Alignment:()=>P,DataEnum:()=>i0,EventType:()=>d,Fit:()=>R,Layout:()=>y,LoopType:()=>s,Rive:()=>P0,RiveEventType:()=>b,RiveFile:()=>h0,RuntimeLoader:()=>h,StateMachineInput:()=>A,StateMachineInputType:()=>C,Testing:()=>L8,ViewModel:()=>M0,ViewModelInstance:()=>J1,ViewModelInstanceArtboard:()=>r,ViewModelInstanceAssetImage:()=>H1,ViewModelInstanceBoolean:()=>F1,ViewModelInstanceColor:()=>f1,ViewModelInstanceEnum:()=>$1,ViewModelInstanceList:()=>D1,ViewModelInstanceNumber:()=>n0,ViewModelInstanceString:()=>G1,ViewModelInstanceTrigger:()=>B1,ViewModelInstanceValue:()=>e0,decodeAudio:()=>O1,decodeFont:()=>V,decodeImage:()=>g});var K=Z(1),Q=Z(2),W=Z(3),z=Z(5),q=function(){var D=function(L,E){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,p){w.__proto__=p}||function(w,p){for(var n in p)if(Object.prototype.hasOwnProperty.call(p,n))w[n]=p[n]},D(L,E)};return function(L,E){if(typeof E!=="function"&&E!==null)throw TypeError("Class extends value "+String(E)+" is not a constructor or null");D(L,E);function w(){this.constructor=L}L.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}}(),Y=function(){return Y=Object.assign||function(D){for(var L,E=1,w=arguments.length;E0&&n[n.length-1]))&&(j0[0]===6||j0[0]===2)){E=0;continue}if(j0[0]===3&&(!n||j0[1]>n[0]&&j0[1]0)(E=D.callBackQueue.shift())===null||E===void 0||E(D.runtime)}).catch(function(L){var E={message:(L===null||L===void 0?void 0:L.message)||"Unknown error",type:(L===null||L===void 0?void 0:L.name)||"Error",wasmError:L instanceof WebAssembly.CompileError||L instanceof WebAssembly.RuntimeError,originalError:L};console.debug("Rive WASM load error details:",E);var w="https://cdn.jsdelivr.net/npm/".concat(Q.name,"@").concat(Q.version,"/rive_fallback.wasm");if(D.wasmURL.toLowerCase()!==w)console.warn("Failed to load WASM from ".concat(D.wasmURL," (").concat(E.message,"), trying jsdelivr as a backup")),D.setWasmUrl(w),D.loadRuntime();else{var p=["Could not load Rive WASM file from ".concat(D.wasmURL," or ").concat(w,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible",` Error details:`,"- Type: ".concat(E.type),"- Message: ".concat(E.message),"- WebAssembly-specific error: ".concat(E.wasmError),` To resolve, you may need to:`,"1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.loadRuntime() again"].join(` `);console.error(p)}})},D.getInstance=function(L){if(!D.isLoading)D.isLoading=!0,D.loadRuntime();if(!D.runtime)D.callBackQueue.push(L);else L(D.runtime)},D.awaitInstance=function(){return new Promise(function(L){return D.getInstance(function(E){return L(E)})})},D.setWasmUrl=function(L){D.wasmURL=L},D.getWasmUrl=function(){return D.wasmURL},D.isLoading=!1,D.callBackQueue=[],D.wasmURL="https://unpkg.com/".concat(Q.name,"@").concat(Q.version,"/rive.wasm"),D}(),C;(function(D){D[D.Number=56]="Number",D[D.Trigger=58]="Trigger",D[D.Boolean=59]="Boolean"})(C||(C={}));var A=function(){function D(L,E){this.type=L,this.runtimeInput=E}return Object.defineProperty(D.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(L){this.runtimeInput.value=L},enumerable:!1,configurable:!0}),D.prototype.fire=function(){if(this.type===C.Trigger)this.runtimeInput.fire()},D.prototype.delete=function(){this.runtimeInput=null},D}(),b;(function(D){D[D.General=128]="General",D[D.OpenUrl=131]="OpenUrl"})(b||(b={}));var x=function(){function D(L){this.isBindableArtboard=!1,this.isBindableArtboard=L}return D}(),k=function(D){q(L,D);function L(E,w){var p=D.call(this,!1)||this;return p.nativeArtboard=E,p.file=w,p}return L}(x),f=function(D){q(L,D);function L(E){var w=D.call(this,!0)||this;return w.selfUnref=!1,w.nativeArtboard=E,w}return L.prototype.destroy=function(){if(this.selfUnref)this.nativeArtboard.unref()},L}(x),T=function(){function D(L,E,w,p){this.stateMachine=L,this.playing=w,this.artboard=p,this.inputs=[],this.instance=new E.StateMachineInstance(L,p),this.initInputs(E)}return Object.defineProperty(D.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"statesChanged",{get:function(){var L=[];for(var E=0;E=0||L0>=0)if(q0>=0)this.animations[q0].playing=E;else this.stateMachines[L0].playing=E;else{var j0=this.artboard.animationByName(L[W0]);if(j0){var g0=new W.Animation(j0,this.artboard,this.runtime,E);g0.advance(0),g0.apply(1),this.animations.push(g0)}else{var p0=this.artboard.stateMachineByName(L[W0]);if(p0){var z1=new T(p0,this.runtime,E,this.artboard);this.stateMachines.push(z1)}}}}}if(w)if(E)this.eventManager.fire({type:d.Play,data:this.playing});else this.eventManager.fire({type:d.Pause,data:this.paused});return E?this.playing:this.paused},D.prototype.initLinearAnimations=function(L,E){var w=this.animations.map(function(L0){return L0.name});for(var p=0;p=0)this.animations[n].playing=E;else{var W0=this.artboard.animationByName(L[p]);if(W0){var q0=new W.Animation(W0,this.artboard,this.runtime,E);q0.advance(0),q0.apply(1),this.animations.push(q0)}else console.error("Animation with name ".concat(L[p]," not found."))}}},D.prototype.initStateMachines=function(L,E){var w=this.stateMachines.map(function(L0){return L0.name});for(var p=0;p=0)this.stateMachines[n].playing=E;else{var W0=this.artboard.stateMachineByName(L[p]);if(W0){var q0=new T(W0,this.runtime,E,this.artboard);this.stateMachines.push(q0)}else console.warn("State Machine with name ".concat(L[p]," not found.")),this.initLinearAnimations([L[p]],E)}}},D.prototype.play=function(L){return this.add(L,!0)},D.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(L){if(!L.playing)L.advanceAndApply(0)})},D.prototype.pause=function(L){return this.add(L,!1)},D.prototype.scrub=function(L,E){var w=this.animations.filter(function(p){return L.includes(p.name)});return w.forEach(function(p){return p.scrubTo=E}),w.map(function(p){return p.name})},Object.defineProperty(D.prototype,"playing",{get:function(){return this.animations.filter(function(L){return L.playing}).map(function(L){return L.name}).concat(this.stateMachines.filter(function(L){return L.playing}).map(function(L){return L.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"paused",{get:function(){return this.animations.filter(function(L){return!L.playing}).map(function(L){return L.name}).concat(this.stateMachines.filter(function(L){return!L.playing}).map(function(L){return L.name}))},enumerable:!1,configurable:!0}),D.prototype.stop=function(L){var E=this;L=y1(L);var w=[];if(L.length===0)w=this.animations.map(function(W0){return W0.name}).concat(this.stateMachines.map(function(W0){return W0.name})),this.animations.forEach(function(W0){return W0.cleanup()}),this.stateMachines.forEach(function(W0){return W0.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var p=this.animations.filter(function(W0){return L.includes(W0.name)});p.forEach(function(W0){W0.cleanup(),E.animations.splice(E.animations.indexOf(W0),1)});var n=this.stateMachines.filter(function(W0){return L.includes(W0.name)});n.forEach(function(W0){W0.cleanup(),E.stateMachines.splice(E.stateMachines.indexOf(W0),1)}),w=p.map(function(W0){return W0.name}).concat(n.map(function(W0){return W0.name}))}return this.eventManager.fire({type:d.Stop,data:w}),w},Object.defineProperty(D.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(L,E){return L||E.playing},!1)||this.stateMachines.reduce(function(L,E){return L||E.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),D.prototype.atLeastOne=function(L,E){if(E===void 0)E=!0;var w;if(this.animations.length===0&&this.stateMachines.length===0){if(this.artboard.animationCount()>0)this.add([w=this.artboard.animationByIndex(0).name],L,E);else if(this.artboard.stateMachineCount()>0)this.add([w=this.artboard.stateMachineByIndex(0).name],L,E)}return w},D.prototype.handleLooping=function(){for(var L=0,E=this.animations.filter(function(p){return p.playing});L1)this.eventManager.fire({type:d.Loop,data:{animation:w.name,type:s.PingPong}}),w.loopCount=0}},D.prototype.handleStateChanges=function(){var L=[];for(var E=0,w=this.stateMachines.filter(function(n){return n.playing});E0)this.eventManager.fire({type:d.StateChange,data:L})},D.prototype.handleAdvancing=function(L){this.eventManager.fire({type:d.Advance,data:L})},D}(),d;(function(D){D.Load="load",D.LoadError="loaderror",D.Play="play",D.Pause="pause",D.Stop="stop",D.Loop="loop",D.Draw="draw",D.Advance="advance",D.StateChange="statechange",D.RiveEvent="riveevent",D.AudioStatusChange="audiostatuschange"})(d||(d={}));var s;(function(D){D.OneShot="oneshot",D.Loop="loop",D.PingPong="pingpong"})(s||(s={}));var t=function(){function D(L){if(L===void 0)L=[];this.listeners=L}return D.prototype.getListeners=function(L){return this.listeners.filter(function(E){return E.type===L})},D.prototype.add=function(L){if(!this.listeners.includes(L))this.listeners.push(L)},D.prototype.remove=function(L){for(var E=0;E0){var L=this.queue.shift();if(L===null||L===void 0?void 0:L.action)L.action();if(L===null||L===void 0?void 0:L.event)this.eventManager.fire(L.event)}},D}(),Z0;(function(D){D[D.AVAILABLE=0]="AVAILABLE",D[D.UNAVAILABLE=1]="UNAVAILABLE"})(Z0||(Z0={}));var U0=function(D){q(L,D);function L(){var E=D!==null&&D.apply(this,arguments)||this;return E._started=!1,E._enabled=!1,E._status=Z0.UNAVAILABLE,E}return L.prototype.delay=function(E){return X(this,void 0,void 0,function(){return H(this,function(w){return[2,new Promise(function(p){return setTimeout(p,E)})]})})},L.prototype.timeout=function(){return X(this,void 0,void 0,function(){return H(this,function(E){return[2,new Promise(function(w,p){return setTimeout(p,50)})]})})},L.prototype.reportToListeners=function(){this.fire({type:d.AudioStatusChange}),this.removeAll()},L.prototype.enableAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(E){if(!this._enabled)this._enabled=!0,this._status=Z0.AVAILABLE,this.reportToListeners();return[2]})})},L.prototype.testAudio=function(){return X(this,void 0,void 0,function(){var E;return H(this,function(w){switch(w.label){case 0:if(!(this._status===Z0.UNAVAILABLE&&this._audioContext!==null))return[3,4];w.label=1;case 1:return w.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return w.sent(),this.enableAudio(),[3,4];case 3:return E=w.sent(),[3,4];case 4:return[2]}})})},L.prototype._establishAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(E){switch(E.label){case 0:if(this._started)return[3,5];if(this._started=!0,!(typeof window>"u"))return[3,1];return this.enableAudio(),[3,5];case 1:this._audioContext=new AudioContext,this.listenForUserAction(),E.label=2;case 2:if(this._status!==Z0.UNAVAILABLE)return[3,5];return[4,this.testAudio()];case 3:return E.sent(),[4,this.delay(1000)];case 4:return E.sent(),[3,2];case 5:return[2]}})})},L.prototype.listenForUserAction=function(){var E=this,w=function(){return X(E,void 0,void 0,function(){return H(this,function(p){return this.enableAudio(),[2]})})};document.addEventListener("pointerdown",w,{once:!0})},L.prototype.establishAudio=function(){return X(this,void 0,void 0,function(){return H(this,function(E){return this._establishAudio(),[2]})})},Object.defineProperty(L.prototype,"systemVolume",{get:function(){if(this._status===Z0.UNAVAILABLE)return this.testAudio(),0;return 1},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),L}(t),H0=new U0,C0=function(){function D(){}return D.prototype.observe=function(){},D.prototype.unobserve=function(){},D.prototype.disconnect=function(){},D}(),B0=globalThis.ResizeObserver||C0,l=function(){function D(){var L=this;this._elementsMap=new Map,this._onObservedEntry=function(E){var w=L._elementsMap.get(E.target);if(w!==null)w.onResize(E.target.clientWidth==0||E.target.clientHeight==0);else L._resizeObserver.unobserve(E.target)},this._onObserved=function(E){E.forEach(L._onObservedEntry)},this._resizeObserver=new B0(this._onObserved)}return D.prototype.add=function(L,E){var w={onResize:E,element:L};return this._elementsMap.set(L,w),this._resizeObserver.observe(L),w},D.prototype.remove=function(L){this._resizeObserver.unobserve(L.element),this._elementsMap.delete(L.element)},D}(),E0=new l,h0=function(){function D(L){if(this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=L.src,this.buffer=L.buffer,L.assetLoader)this.assetLoader=L.assetLoader;if(this.enableRiveAssetCDN=typeof L.enableRiveAssetCDN=="boolean"?L.enableRiveAssetCDN:!0,this.eventManager=new t,L.onLoad)this.on(d.Load,L.onLoad);if(L.onLoadError)this.on(d.LoadError,L.onLoadError)}return D.prototype.releaseFile=function(){var L;if(this.selfUnref)(L=this.file)===null||L===void 0||L.unref();this.file=null},D.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(L){return L.destroy()})},D.prototype.initData=function(){return X(this,void 0,void 0,function(){var L,E,w,p,n;return H(this,function(W0){switch(W0.label){case 0:if(!this.src)return[3,2];return L=this,[4,o1(this.src)];case 1:L.buffer=W0.sent(),W0.label=2;case 2:if(this.destroyed)return[2];if(this.assetLoader)w=new z.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),E=w.assetLoader;return p=this,[4,this.runtime.load(new Uint8Array(this.buffer),E,this.enableRiveAssetCDN)];case 3:if(p.file=W0.sent(),n=new z.FileFinalizer(this.file),z.finalizationRegistry.register(this,n),this.destroyed)return this.releaseFile(),[2];if(this.file!==null)this.eventManager.fire({type:d.Load,data:this});else this.fireLoadError(D.fileLoadErrorMessage);return[2]}})})},D.prototype.init=function(){return X(this,void 0,void 0,function(){var L,E;return H(this,function(w){switch(w.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(D.missingErrorMessage),[2];w.label=1;case 1:return w.trys.push([1,4,,5]),L=this,[4,h.awaitInstance()];case 2:if(L.runtime=w.sent(),this.destroyed)return[2];return[4,this.initData()];case 3:return w.sent(),[3,5];case 4:return E=w.sent(),this.fireLoadError(E instanceof Error?E.message:D.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},D.prototype.fireLoadError=function(L){throw this.eventManager.fire({type:d.LoadError,data:L}),Error(L)},D.prototype.on=function(L,E){this.eventManager.add({type:L,callback:E})},D.prototype.off=function(L,E){this.eventManager.remove({type:L,callback:E})},D.prototype.cleanup=function(){if(this.referenceCount-=1,this.referenceCount<=0)this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0},D.prototype.removeAllRiveEventListeners=function(L){this.eventManager.removeAll(L)},D.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},D.prototype.destroyIfUnused=function(){if(this.referenceCount<=0)this.cleanup()},D.prototype.createBindableArtboard=function(L){if(L!=null){var E=new f(L);return(0,z.createFinalization)(E,E.nativeArtboard),this.bindableArtboards.push(E),E}return null},D.prototype.getArtboard=function(L){var E=this.file.artboardByName(L);if(E!=null)return new k(E,this)},D.prototype.getBindableArtboard=function(L){var E=this.file.bindableArtboardByName(L);return this.createBindableArtboard(E)},D.prototype.getDefaultBindableArtboard=function(){var L=this.file.bindableArtboardDefault();return this.createBindableArtboard(L)},D.prototype.internalBindableArtboardFromArtboard=function(L){var E=this.file.internalBindableArtboardFromArtboard(L);return this.createBindableArtboard(E)},D.missingErrorMessage="Rive source file or data buffer required",D.fileLoadErrorMessage="The file failed to load",D}(),P0=function(){function D(L){var E=this,w;if(this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(p){var n=E._hasZeroSize!==p;if(E._hasZeroSize=p,!p){if(n)E.resizeDrawingSurfaceToCanvas()}else if(!E._layout.maxX||!E._layout.maxY)E.resizeToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=L.canvas,L.canvas.constructor===HTMLCanvasElement)this._observed=E0.add(this.canvas,this.onCanvasResize);if(this.src=L.src,this.buffer=L.buffer,this.riveFile=L.riveFile,this.layout=(w=L.layout)!==null&&w!==void 0?w:new y,this.shouldDisableRiveListeners=!!L.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!L.isTouchScrollEnabled,this.automaticallyHandleEvents=!!L.automaticallyHandleEvents,this.dispatchPointerExit=L.dispatchPointerExit===!1?L.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!L.enableMultiTouch,this.enableRiveAssetCDN=L.enableRiveAssetCDN===void 0?!0:L.enableRiveAssetCDN,this.eventManager=new t,L.onLoad)this.on(d.Load,L.onLoad);if(L.onLoadError)this.on(d.LoadError,L.onLoadError);if(L.onPlay)this.on(d.Play,L.onPlay);if(L.onPause)this.on(d.Pause,L.onPause);if(L.onStop)this.on(d.Stop,L.onStop);if(L.onLoop)this.on(d.Loop,L.onLoop);if(L.onStateChange)this.on(d.StateChange,L.onStateChange);if(L.onAdvance)this.on(d.Advance,L.onAdvance);if(L.onload&&!L.onLoad)this.on(d.Load,L.onload);if(L.onloaderror&&!L.onLoadError)this.on(d.LoadError,L.onloaderror);if(L.onplay&&!L.onPlay)this.on(d.Play,L.onplay);if(L.onpause&&!L.onPause)this.on(d.Pause,L.onpause);if(L.onstop&&!L.onStop)this.on(d.Stop,L.onstop);if(L.onloop&&!L.onLoop)this.on(d.Loop,L.onloop);if(L.onstatechange&&!L.onStateChange)this.on(d.StateChange,L.onstatechange);if(L.assetLoader)this.assetLoader=L.assetLoader;this.taskQueue=new e(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:L.autoplay,autoBind:L.autoBind,animations:L.animations,stateMachines:L.stateMachines,artboard:L.artboard,useOffscreenRenderer:L.useOffscreenRenderer})}return Object.defineProperty(D.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),D.new=function(L){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new D(L)},D.prototype.onSystemAudioChanged=function(){this.volume=this._volume},D.prototype.init=function(L){var E=this,w=L.src,p=L.buffer,n=L.riveFile,W0=L.animations,q0=L.stateMachines,L0=L.artboard,j0=L.autoplay,g0=j0===void 0?!1:j0,p0=L.useOffscreenRenderer,z1=p0===void 0?!1:p0,W1=L.autoBind,N1=W1===void 0?!1:W1;if(this.destroyed)return;if(this.src=w,this.buffer=p,this.riveFile=n,!this.src&&!this.buffer&&!this.riveFile)throw new N(D.missingErrorMessage);var _0=y1(W0),R1=y1(q0);this.loaded=!1,this.readyForPlaying=!1,h.awaitInstance().then(function(I1){if(E.destroyed)return;if(E.runtime=I1,E.removeRiveListeners(),E.deleteRiveRenderer(),E.renderer=E.runtime.makeRenderer(E.canvas,z1),!(E.canvas.width||E.canvas.height))E.resizeDrawingSurfaceToCanvas();E.initData(L0,_0,R1,g0,N1).then(function(x1){if(x1)return E.setupRiveListeners()}).catch(function(x1){console.error(x1)})}).catch(function(I1){console.error(I1)})},D.prototype.setupRiveListeners=function(L){var E=this;if(this.eventCleanup)this.eventCleanup();if(!this.shouldDisableRiveListeners){var w=(this.animator.stateMachines||[]).filter(function(q0){return q0.playing&&E.runtime.hasListeners(q0.instance)}).map(function(q0){return q0.instance}),p=this.isTouchScrollEnabled,n=this.dispatchPointerExit,W0=this.enableMultiTouch;if(L&&"isTouchScrollEnabled"in L)p=L.isTouchScrollEnabled;this.eventCleanup=(0,z.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:w,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:p,dispatchPointerExit:n,enableMultiTouch:W0,layoutScaleFactor:this._layout.layoutScaleFactor})}},D.prototype.removeRiveListeners=function(){if(this.eventCleanup)this.eventCleanup(),this.eventCleanup=null},D.prototype.initializeAudio=function(){var L=this,E;if(H0.status==Z0.UNAVAILABLE){if(((E=this.artboard)===null||E===void 0?void 0:E.hasAudio)&&this._audioEventListener===null)this._audioEventListener={type:d.AudioStatusChange,callback:function(){return L.onSystemAudioChanged()}},H0.add(this._audioEventListener),H0.establishAudio()}},D.prototype.initArtboardSize=function(){if(!this.artboard)return;this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height},D.prototype.initData=function(L,E,w,p,n){return X(this,void 0,void 0,function(){var W0,q0,L0,j0;return H(this,function(g0){switch(g0.label){case 0:if(g0.trys.push([0,3,,4]),this.riveFile!=null)return[3,2];return W0=new h0({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=W0,[4,W0.init()];case 1:if(g0.sent(),this.destroyed)return W0.destroyIfUnused(),[2,!1];g0.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(L,E,w,p,n),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:d.Load,data:(j0=this.src)!==null&&j0!==void 0?j0:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return q0=g0.sent(),L0=B(q0),console.warn(L0),this.eventManager.fire({type:d.LoadError,data:L0}),[2,Promise.reject(L0)];case 4:return[2]}})})},D.prototype.initArtboard=function(L,E,w,p,n){if(!this.file)return;var W0=L?this.file.artboardByName(L):this.file.defaultArtboard();if(!W0){var q0="Invalid artboard name or no default artboard";console.warn(q0),this.eventManager.fire({type:d.LoadError,data:q0});return}this.artboard=W0,W0.volume=this._volume*H0.systemVolume,this.animator=new _(this.runtime,this.artboard,this.eventManager);var L0;if(E.length>0||w.length>0)L0=E.concat(w),this.animator.initLinearAnimations(E,p),this.animator.initStateMachines(w,p);else L0=[this.animator.atLeastOne(p,!1)];if(this.taskQueue.add({event:{type:p?d.Play:d.Pause,data:L0}}),n){var j0=this.file.defaultArtboardViewModel(W0);if(j0!==null){var g0=j0.defaultInstance();if(g0!==null){var p0=new J1(g0,null);(0,z.createFinalization)(p0,p0.runtimeInstance),this.bindViewModelInstance(p0)}}}},D.prototype.drawFrame=function(){var L,E;if((L=document===null||document===void 0?void 0:document.timeline)===null||L===void 0?void 0:L.currentTime){if(this.loaded&&this.artboard&&!this.frameRequestId)this._boundDraw(document.timeline.currentTime),(E=this.runtime)===null||E===void 0||E.resolveAnimationFrame()}else this.startRendering()},D.prototype.draw=function(L,E){var w;this.frameRequestId=null;var p=performance.now();if(!this.lastRenderTime)this.lastRenderTime=L;if(this.renderSecondTimer+=L-this.lastRenderTime,this.renderSecondTimer>5000)this.renderSecondTimer=0,E===null||E===void 0||E();var n=(L-this.lastRenderTime)/1000;this.lastRenderTime=L;var W0=this.animator.animations.filter(function(l0){return l0.playing||l0.needsScrub}).sort(function(l0){return l0.needsScrub?-1:1});for(var q0=0,L0=W0;q00)this.animator.stateMachines.forEach(function(w){return w.bindViewModelInstance(L)});else this.artboard.bindViewModelInstance(L.runtimeInstance)}},Object.defineProperty(D.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),D.prototype.viewModelByIndex=function(L){var E=this.file.viewModelByIndex(L);if(E!==null)return new M0(E);return null},D.prototype.viewModelByName=function(L){var E=this.file.viewModelByName(L);if(E!==null)return new M0(E);return null},D.prototype.enums=function(){if(this._dataEnums===null){var L=this.file.enums();this._dataEnums=L.map(function(E){return new i0(E)})}return this._dataEnums},D.prototype.defaultViewModel=function(){if(this.artboard){var L=this.file.defaultArtboardViewModel(this.artboard);if(L)return new M0(L)}return null},D.prototype.getArtboard=function(L){var E,w;return(w=(E=this.riveFile)===null||E===void 0?void 0:E.getArtboard(L))!==null&&w!==void 0?w:null},D.prototype.getBindableArtboard=function(L){var E,w;return(w=(E=this.riveFile)===null||E===void 0?void 0:E.getBindableArtboard(L))!==null&&w!==void 0?w:null},D.prototype.getDefaultBindableArtboard=function(){var L,E;return(E=(L=this.riveFile)===null||L===void 0?void 0:L.getDefaultBindableArtboard())!==null&&E!==void 0?E:null},D.missingErrorMessage="Rive source file or data buffer required",D.cleanupErrorMessage="Attempt to use file after calling cleanup.",D}(),M0=function(){function D(L){this._viewModel=L}return Object.defineProperty(D.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),D.prototype.instanceByIndex=function(L){var E=this._viewModel.instanceByIndex(L);if(E!==null){var w=new J1(E,null);return(0,z.createFinalization)(w,E),w}return null},D.prototype.instanceByName=function(L){var E=this._viewModel.instanceByName(L);if(E!==null){var w=new J1(E,null);return(0,z.createFinalization)(w,E),w}return null},D.prototype.defaultInstance=function(){var L=this._viewModel.defaultInstance();if(L!==null){var E=new J1(L,null);return(0,z.createFinalization)(E,L),E}return null},D.prototype.instance=function(){var L=this._viewModel.instance();if(L!==null){var E=new J1(L,null);return(0,z.createFinalization)(E,L),E}return null},Object.defineProperty(D.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),D}(),i0=function(){function D(L){this._dataEnum=L}return Object.defineProperty(D.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),D}(),A0;(function(D){D.Number="number",D.String="string",D.Boolean="boolean",D.Color="color",D.Trigger="trigger",D.Enum="enum",D.List="list",D.Image="image",D.Artboard="artboard"})(A0||(A0={}));var J1=function(){function D(L,E){if(this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=L,E!==null)this._parents.push(E)}return Object.defineProperty(D.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"nativeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),D.prototype.handleCallbacks=function(){if(this._propertiesWithCallbacks.length!==0)this._propertiesWithCallbacks.forEach(function(L){L.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(L){L.clearChanges()});this._children.forEach(function(L){return L.handleCallbacks()})},D.prototype.addParent=function(L){if(!this._parents.includes(L)){if(this._parents.push(L),this._propertiesWithCallbacks.length>0||this._children.length>0)L.addToViewModelCallbacks(this)}},D.prototype.removeParent=function(L){var E=this._parents.indexOf(L);if(E!==-1){var w=this._parents[E];w.removeFromViewModelCallbacks(this),this._parents.splice(E,1)}},D.prototype.addToPropertyCallbacks=function(L){var E=this;if(!this._propertiesWithCallbacks.includes(L)){if(this._propertiesWithCallbacks.push(L),this._propertiesWithCallbacks.length>0)this._parents.forEach(function(w){w.addToViewModelCallbacks(E)})}},D.prototype.removeFromPropertyCallbacks=function(L){var E=this;if(this._propertiesWithCallbacks.includes(L)){if(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(w){return w!==L}),this._children.length===0&&this._propertiesWithCallbacks.length===0)this._parents.forEach(function(w){w.removeFromViewModelCallbacks(E)})}},D.prototype.addToViewModelCallbacks=function(L){var E=this;if(!this._children.includes(L))this._children.push(L),this._parents.forEach(function(w){w.addToViewModelCallbacks(E)})},D.prototype.removeFromViewModelCallbacks=function(L){var E=this;if(this._children.includes(L)){if(this._children=this._children.filter(function(w){return w!==L}),this._children.length===0&&this._propertiesWithCallbacks.length===0)this._parents.forEach(function(w){w.removeFromViewModelCallbacks(E)})}},D.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(L){L.clearCallbacks()})},D.prototype.propertyFromPath=function(L,E){var w=L.split("/");return this.propertyFromPathSegments(w,0,E)},D.prototype.viewModelFromPathSegments=function(L,E){var w=this.internalViewModelInstance(L[E]);if(w!==null)if(E==L.length-1)return w;else return w.viewModelFromPathSegments(L,E++);return null},D.prototype.propertyFromPathSegments=function(L,E,w){var p,n,W0,q0,L0,j0,g0,p0,z1,W1,N1,_0,R1,I1,x1,g1,u0,K1;if(E1?this.viewModelFromPathSegments(E.slice(0,E.length-1),0):this;if(w!=null)return w.internalViewModelInstance(E[E.length-1]);return null},D.prototype.internalReplaceViewModel=function(L,E){var w;if(E.runtimeInstance!==null){var p=((w=this._runtimeInstance)===null||w===void 0?void 0:w.replaceViewModel(L,E.runtimeInstance))||!1;if(p){E.internalIncrementReferenceCount();var n=this.internalViewModelInstance(L);if(n!==null){if(n.removeParent(this),this._children.includes(n))this._children=this._children.filter(function(W0){return W0!==n});n.cleanup()}this._viewModelInstances.set(L,E),E.addParent(this)}return p}return!1},D.prototype.replaceViewModel=function(L,E){var w,p=L.split("/"),n=p.length>1?this.viewModelFromPathSegments(p.slice(0,p.length-1),0):this;return(w=n===null||n===void 0?void 0:n.internalReplaceViewModel(p[p.length-1],E))!==null&&w!==void 0?w:!1},D.prototype.incrementReferenceCount=function(){var L;this._referenceCount++,(L=this._runtimeInstance)===null||L===void 0||L.incrementReferenceCount()},D.prototype.decrementReferenceCount=function(){var L;this._referenceCount--,(L=this._runtimeInstance)===null||L===void 0||L.decrementReferenceCount()},Object.defineProperty(D.prototype,"properties",{get:function(){var L;return((L=this._runtimeInstance)===null||L===void 0?void 0:L.getProperties().map(function(E){return Y({},E)}))||[]},enumerable:!1,configurable:!0}),D.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},D.prototype.cleanup=function(){var L=this,E;if(this._referenceCount--,this._referenceCount<=0){if(this.selfUnref)(E=this._runtimeInstance)===null||E===void 0||E.unref();this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(n){n.cleanup()}),this._viewModelInstances.clear();var w=O([],this._children,!0);this._children.length=0;var p=O([],this._parents,!0);this._parents.length=0,w.forEach(function(n){n.removeParent(L)}),p.forEach(function(n){n.removeFromViewModelCallbacks(L)})}},D}(),e0=function(){function D(L,E){this.callbacks=[],this._viewModelInstanceValue=L,this._parentViewModel=E}return D.prototype.on=function(L){if(this.callbacks.length===0)this._viewModelInstanceValue.clearChanges();if(!this.callbacks.includes(L))this.callbacks.push(L),this._parentViewModel.addToPropertyCallbacks(this)},D.prototype.off=function(L){if(!L)this.callbacks.length=0;else this.callbacks=this.callbacks.filter(function(E){return E!==L});if(this.callbacks.length===0)this._parentViewModel.removeFromPropertyCallbacks(this)},D.prototype.internalHandleCallback=function(L){},D.prototype.handleCallbacks=function(){var L=this;if(this._viewModelInstanceValue.hasChanged)this.callbacks.forEach(function(E){L.internalHandleCallback(E)})},D.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},D.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(D.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),D}(),G1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(E){this._viewModelInstanceValue.value=E},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E(this.value)},L}(e0),n0=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(E){this._viewModelInstanceValue.value=E},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E(this.value)},L}(e0),F1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(E){this._viewModelInstanceValue.value=E},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E(this.value)},L}(e0),B1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return L.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},L.prototype.internalHandleCallback=function(E){E()},L}(e0),$1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(E){this._viewModelInstanceValue.value=E},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(E){this._viewModelInstanceValue.valueIndex=E},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E(this.value)},L}(e0),D1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),L.prototype.addInstance=function(E){if(E.runtimeInstance!=null)this._viewModelInstanceValue.addInstance(E.runtimeInstance),E.addParent(this._parentViewModel)},L.prototype.addInstanceAt=function(E,w){if(E.runtimeInstance!=null){if(this._viewModelInstanceValue.addInstanceAt(E.runtimeInstance,w))return E.addParent(this._parentViewModel),!0}return!1},L.prototype.removeInstance=function(E){if(E.runtimeInstance!=null)this._viewModelInstanceValue.removeInstance(E.runtimeInstance),E.removeParent(this._parentViewModel)},L.prototype.removeInstanceAt=function(E){this._viewModelInstanceValue.removeInstanceAt(E)},L.prototype.instanceAt=function(E){var w=this._viewModelInstanceValue.instanceAt(E);if(w!=null){var p=new J1(w,this._parentViewModel);return(0,z.createFinalization)(p,w),p}return null},L.prototype.swap=function(E,w){this._viewModelInstanceValue.swap(E,w)},L.prototype.internalHandleCallback=function(E){E()},L}(e0),f1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(E){this._viewModelInstanceValue.value=E},enumerable:!1,configurable:!0}),L.prototype.rgb=function(E,w,p){this._viewModelInstanceValue.rgb(E,w,p)},L.prototype.rgba=function(E,w,p,n){this._viewModelInstanceValue.argb(n,E,w,p)},L.prototype.argb=function(E,w,p,n){this._viewModelInstanceValue.argb(E,w,p,n)},L.prototype.alpha=function(E){this._viewModelInstanceValue.alpha(E)},L.prototype.opacity=function(E){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,E))*255))},L.prototype.internalHandleCallback=function(E){E(this.value)},L}(e0),H1=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{set:function(E){var w;this._viewModelInstanceValue.value((w=E===null||E===void 0?void 0:E.nativeImage)!==null&&w!==void 0?w:null)},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E()},L}(e0),r=function(D){q(L,D);function L(E,w){return D.call(this,E,w)||this}return Object.defineProperty(L.prototype,"value",{set:function(E){var w,p;if(E.isBindableArtboard)p=E;else p=E.file.internalBindableArtboardFromArtboard(E.nativeArtboard);this._viewModelInstanceValue.value((w=p===null||p===void 0?void 0:p.nativeArtboard)!==null&&w!==void 0?w:null)},enumerable:!1,configurable:!0}),L.prototype.internalHandleCallback=function(E){E()},L}(e0),o1=function(D){return X(void 0,void 0,void 0,function(){var L,E,w;return H(this,function(p){switch(p.label){case 0:return L=new Request(D),[4,fetch(L)];case 1:return E=p.sent(),[4,E.arrayBuffer()];case 2:return w=p.sent(),[2,w]}})})},y1=function(D){if(typeof D==="string")return[D];else if(D instanceof Array)return D;return[]},L8={EventManager:t,TaskQueueManager:e},O1=function(D){return X(void 0,void 0,void 0,function(){var L,E,w;return H(this,function(p){switch(p.label){case 0:return L=new Promise(function(n){return h.getInstance(function(W0){W0.decodeAudio(D,n)})}),[4,L];case 1:return E=p.sent(),w=new z.AudioWrapper(E),z.finalizationRegistry.register(w,E),[2,w]}})})},g=function(D){return X(void 0,void 0,void 0,function(){var L,E,w;return H(this,function(p){switch(p.label){case 0:return L=new Promise(function(n){return h.getInstance(function(W0){W0.decodeImage(D,n)})}),[4,L];case 1:return E=p.sent(),w=new z.ImageWrapper(E),z.finalizationRegistry.register(w,E),[2,w]}})})},V=function(D){return X(void 0,void 0,void 0,function(){var L,E,w;return H(this,function(p){switch(p.label){case 0:return L=new Promise(function(n){return h.getInstance(function(W0){W0.decodeFont(D,n)})}),[4,L];case 1:return E=p.sent(),w=new z.FontWrapper(E),z.finalizationRegistry.register(w,E),[2,w]}})})}})(),$})()})});var BW=SK((e7,G6)=>{/*! * matter-js 0.20.0 by @liabru * http://brm.io/matter-js/ * License MIT * * The MIT License (MIT) * * Copyright (c) Liam Brummitt and contributors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */(function(J,Z){if(typeof e7==="object"&&typeof G6==="object")G6.exports=Z();else if(typeof define==="function"&&define.amd)define("Matter",[],Z);else if(typeof e7==="object")e7.Matter=Z();else J.Matter=Z()})(e7,function(){return function(G){var J={};function Z($){if(J[$])return J[$].exports;var K=J[$]={i:$,l:!1,exports:{}};return G[$].call(K.exports,K,K.exports,Z),K.l=!0,K.exports}return Z.m=G,Z.c=J,Z.d=function($,K,Q){if(!Z.o($,K))Object.defineProperty($,K,{enumerable:!0,get:Q})},Z.r=function($){if(typeof Symbol<"u"&&Symbol.toStringTag)Object.defineProperty($,Symbol.toStringTag,{value:"Module"});Object.defineProperty($,"__esModule",{value:!0})},Z.t=function($,K){if(K&1)$=Z($);if(K&8)return $;if(K&4&&typeof $==="object"&&$&&$.__esModule)return $;var Q=Object.create(null);if(Z.r(Q),Object.defineProperty(Q,"default",{enumerable:!0,value:$}),K&2&&typeof $!="string")for(var W in $)Z.d(Q,W,function(z){return $[z]}.bind(null,W));return Q},Z.n=function($){var K=$&&$.__esModule?function(){return $.default}:function(){return $};return Z.d(K,"a",K),K},Z.o=function($,K){return Object.prototype.hasOwnProperty.call($,K)},Z.p="",Z(Z.s=20)}([function(G,J){var Z={};G.exports=Z,function(){Z._baseDelta=16.666666666666668,Z._nextId=0,Z._seed=0,Z._nowStartTime=+new Date,Z._warnedOnce={},Z._decomp=null,Z.extend=function(K,Q){var W,z,q;if(typeof Q==="boolean")W=2,q=Q;else W=1,q=!0;for(var Y=W;Y0;Q--){var W=Math.floor(Z.random()*(Q+1)),z=K[Q];K[Q]=K[W],K[W]=z}return K},Z.choose=function(K){return K[Math.floor(Z.random()*K.length)]},Z.isElement=function(K){if(typeof HTMLElement<"u")return K instanceof HTMLElement;return!!(K&&K.nodeType&&K.nodeName)},Z.isArray=function(K){return Object.prototype.toString.call(K)==="[object Array]"},Z.isFunction=function(K){return typeof K==="function"},Z.isPlainObject=function(K){return typeof K==="object"&&K.constructor===Object},Z.isString=function(K){return toString.call(K)==="[object String]"},Z.clamp=function(K,Q,W){if(KW)return W;return K},Z.sign=function(K){return K<0?-1:1},Z.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();else if(window.performance.webkitNow)return window.performance.webkitNow()}if(Date.now)return Date.now();return new Date-Z._nowStartTime},Z.random=function(K,Q){return K=typeof K<"u"?K:0,Q=typeof Q<"u"?Q:1,K+$()*(Q-K)};var $=function(){return Z._seed=(Z._seed*9301+49297)%233280,Z._seed/233280};Z.colorToNumber=function(K){if(K=K.replace("#",""),K.length==3)K=K.charAt(0)+K.charAt(0)+K.charAt(1)+K.charAt(1)+K.charAt(2)+K.charAt(2);return parseInt(K,16)},Z.logLevel=1,Z.log=function(){if(console&&Z.logLevel>0&&Z.logLevel<=3)console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},Z.info=function(){if(console&&Z.logLevel>0&&Z.logLevel<=2)console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},Z.warn=function(){if(console&&Z.logLevel>0&&Z.logLevel<=3)console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},Z.warnOnce=function(){var K=Array.prototype.slice.call(arguments).join(" ");if(!Z._warnedOnce[K])Z.warn(K),Z._warnedOnce[K]=!0},Z.deprecated=function(K,Q,W){K[Q]=Z.chain(function(){Z.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",W)},K[Q])},Z.nextId=function(){return Z._nextId++},Z.indexOf=function(K,Q){if(K.indexOf)return K.indexOf(Q);for(var W=0;W$.max.x)$.max.x=z.x;if(z.x<$.min.x)$.min.x=z.x;if(z.y>$.max.y)$.max.y=z.y;if(z.y<$.min.y)$.min.y=z.y}if(Q){if(Q.x>0)$.max.x+=Q.x;else $.min.x+=Q.x;if(Q.y>0)$.max.y+=Q.y;else $.min.y+=Q.y}},Z.contains=function($,K){return K.x>=$.min.x&&K.x<=$.max.x&&K.y>=$.min.y&&K.y<=$.max.y},Z.overlaps=function($,K){return $.min.x<=K.max.x&&$.max.x>=K.min.x&&$.max.y>=K.min.y&&$.min.y<=K.max.y},Z.translate=function($,K){$.min.x+=K.x,$.max.x+=K.x,$.min.y+=K.y,$.max.y+=K.y},Z.shift=function($,K){var Q=$.max.x-$.min.x,W=$.max.y-$.min.y;$.min.x=K.x,$.max.x=K.x+Q,$.min.y=K.y,$.max.y=K.y+W}}()},function(G,J){var Z={};G.exports=Z,function(){Z.create=function($,K){return{x:$||0,y:K||0}},Z.clone=function($){return{x:$.x,y:$.y}},Z.magnitude=function($){return Math.sqrt($.x*$.x+$.y*$.y)},Z.magnitudeSquared=function($){return $.x*$.x+$.y*$.y},Z.rotate=function($,K,Q){var W=Math.cos(K),z=Math.sin(K);if(!Q)Q={};var q=$.x*W-$.y*z;return Q.y=$.x*z+$.y*W,Q.x=q,Q},Z.rotateAbout=function($,K,Q,W){var z=Math.cos(K),q=Math.sin(K);if(!W)W={};var Y=Q.x+(($.x-Q.x)*z-($.y-Q.y)*q);return W.y=Q.y+(($.x-Q.x)*q+($.y-Q.y)*z),W.x=Y,W},Z.normalise=function($){var K=Z.magnitude($);if(K===0)return{x:0,y:0};return{x:$.x/K,y:$.y/K}},Z.dot=function($,K){return $.x*K.x+$.y*K.y},Z.cross=function($,K){return $.x*K.y-$.y*K.x},Z.cross3=function($,K,Q){return(K.x-$.x)*(Q.y-$.y)-(K.y-$.y)*(Q.x-$.x)},Z.add=function($,K,Q){if(!Q)Q={};return Q.x=$.x+K.x,Q.y=$.y+K.y,Q},Z.sub=function($,K,Q){if(!Q)Q={};return Q.x=$.x-K.x,Q.y=$.y-K.y,Q},Z.mult=function($,K){return{x:$.x*K,y:$.y*K}},Z.div=function($,K){return{x:$.x/K,y:$.y/K}},Z.perp=function($,K){return K=K===!0?-1:1,{x:K*-$.y,y:K*$.x}},Z.neg=function($){return{x:-$.x,y:-$.y}},Z.angle=function($,K){return Math.atan2(K.y-$.y,K.x-$.x)},Z._temp=[Z.create(),Z.create(),Z.create(),Z.create(),Z.create(),Z.create()]}()},function(G,J,Z){var $={};G.exports=$;var K=Z(2),Q=Z(0);(function(){$.create=function(W,z){var q=[];for(var Y=0;Y0)return!1;H=O}return!0},$.scale=function(W,z,q,Y){if(z===1&&q===1)return W;Y=Y||$.centre(W);var X,H;for(var O=0;O=0?O-1:W.length-1],B=W[O],R=W[(O+1)%W.length],P=z[O0)z|=2;if(z===3)return!1}if(z!==0)return!0;else return null},$.hull=function(W){var z=[],q=[],Y,X;W=W.slice(0),W.sort(function(H,O){var N=H.x-O.x;return N!==0?N:H.y-O.y});for(X=0;X=2&&K.cross3(q[q.length-2],q[q.length-1],Y)<=0)q.pop();q.push(Y)}for(X=W.length-1;X>=0;X-=1){Y=W[X];while(z.length>=2&&K.cross3(z[z.length-2],z[z.length-1],Y)<=0)z.pop();z.push(Y)}return z.pop(),q.pop(),z.concat(q)}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(3),Q=Z(2),W=Z(7),z=Z(0),q=Z(1),Y=Z(11);(function(){$._timeCorrection=!0,$._inertiaScale=4,$._nextCollidingGroupId=1,$._nextNonCollidingGroupId=-1,$._nextCategory=1,$._baseDelta=16.666666666666668,$.create=function(H){var O={id:z.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:K.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"),position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:0.001,restitution:0,friction:0.1,frictionStatic:0.5,frictionAir:0.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:0.05,timeScale:1,render:{visible:!0,opacity:1,strokeStyle:null,fillStyle:null,lineWidth:null,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0}},events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inertia:0,deltaTime:16.666666666666668,_original:null},N=z.extend(O,H);return X(N,H),N},$.nextGroup=function(H){if(H)return $._nextNonCollidingGroupId--;return $._nextCollidingGroupId++},$.nextCategory=function(){return $._nextCategory=$._nextCategory<<1,$._nextCategory};var X=function(H,O){O=O||{},$.set(H,{bounds:H.bounds||q.create(H.vertices),positionPrev:H.positionPrev||Q.clone(H.position),anglePrev:H.anglePrev||H.angle,vertices:H.vertices,parts:H.parts||[H],isStatic:H.isStatic,isSleeping:H.isSleeping,parent:H.parent||H}),K.rotate(H.vertices,H.angle,H.position),Y.rotate(H.axes,H.angle),q.update(H.bounds,H.vertices,H.velocity),$.set(H,{axes:O.axes||H.axes,area:O.area||H.area,mass:O.mass||H.mass,inertia:O.inertia||H.inertia});var N=H.isStatic?"#14151f":z.choose(["#f19648","#f5d259","#f55a3c","#063e7b","#ececd1"]),B=H.isStatic?"#555":"#ccc",R=H.isStatic&&H.render.fillStyle===null?1:0;H.render.fillStyle=H.render.fillStyle||N,H.render.strokeStyle=H.render.strokeStyle||B,H.render.lineWidth=H.render.lineWidth||R,H.render.sprite.xOffset+=-(H.bounds.min.x-H.position.x)/(H.bounds.max.x-H.bounds.min.x),H.render.sprite.yOffset+=-(H.bounds.min.y-H.position.y)/(H.bounds.max.y-H.bounds.min.y)};$.set=function(H,O,N){var B;if(typeof O==="string")B=O,O={},O[B]=N;for(B in O){if(!Object.prototype.hasOwnProperty.call(O,B))continue;switch(N=O[B],B){case"isStatic":$.setStatic(H,N);break;case"isSleeping":W.set(H,N);break;case"mass":$.setMass(H,N);break;case"density":$.setDensity(H,N);break;case"inertia":$.setInertia(H,N);break;case"vertices":$.setVertices(H,N);break;case"position":$.setPosition(H,N);break;case"angle":$.setAngle(H,N);break;case"velocity":$.setVelocity(H,N);break;case"angularVelocity":$.setAngularVelocity(H,N);break;case"speed":$.setSpeed(H,N);break;case"angularSpeed":$.setAngularSpeed(H,N);break;case"parts":$.setParts(H,N);break;case"centre":$.setCentre(H,N);break;default:H[B]=N}}},$.setStatic=function(H,O){for(var N=0;N0)Q.rotateAbout(P.position,B,H.position,P.position)}},$.setVelocity=function(H,O){var N=H.deltaTime/$._baseDelta;H.positionPrev.x=H.position.x-O.x*N,H.positionPrev.y=H.position.y-O.y*N,H.velocity.x=(H.position.x-H.positionPrev.x)/N,H.velocity.y=(H.position.y-H.positionPrev.y)/N,H.speed=Q.magnitude(H.velocity)},$.getVelocity=function(H){var O=$._baseDelta/H.deltaTime;return{x:(H.position.x-H.positionPrev.x)*O,y:(H.position.y-H.positionPrev.y)*O}},$.getSpeed=function(H){return Q.magnitude($.getVelocity(H))},$.setSpeed=function(H,O){$.setVelocity(H,Q.mult(Q.normalise($.getVelocity(H)),O))},$.setAngularVelocity=function(H,O){var N=H.deltaTime/$._baseDelta;H.anglePrev=H.angle-O*N,H.angularVelocity=(H.angle-H.anglePrev)/N,H.angularSpeed=Math.abs(H.angularVelocity)},$.getAngularVelocity=function(H){return(H.angle-H.anglePrev)*$._baseDelta/H.deltaTime},$.getAngularSpeed=function(H){return Math.abs($.getAngularVelocity(H))},$.setAngularSpeed=function(H,O){$.setAngularVelocity(H,z.sign($.getAngularVelocity(H))*O)},$.translate=function(H,O,N){$.setPosition(H,Q.add(H.position,O),N)},$.rotate=function(H,O,N,B){if(!N)$.setAngle(H,H.angle+O,B);else{var R=Math.cos(O),P=Math.sin(O),y=H.position.x-N.x,h=H.position.y-N.y;$.setPosition(H,{x:N.x+(y*R-h*P),y:N.y+(y*P+h*R)},B),$.setAngle(H,H.angle+O,B)}},$.scale=function(H,O,N,B){var R=0,P=0;B=B||H.position;for(var y=0;y0)R+=h.area,P+=h.inertia;h.position.x=B.x+(h.position.x-B.x)*O,h.position.y=B.y+(h.position.y-B.y)*N,q.update(h.bounds,h.vertices,H.velocity)}if(H.parts.length>1){if(H.area=R,!H.isStatic)$.setMass(H,H.density*R),$.setInertia(H,P)}if(H.circleRadius)if(O===N)H.circleRadius*=O;else H.circleRadius=null},$.update=function(H,O){O=(typeof O<"u"?O:16.666666666666668)*H.timeScale;var N=O*O,B=$._timeCorrection?O/(H.deltaTime||O):1,R=1-H.frictionAir*(O/z._baseDelta),P=(H.position.x-H.positionPrev.x)*B,y=(H.position.y-H.positionPrev.y)*B;H.velocity.x=P*R+H.force.x/H.mass*N,H.velocity.y=y*R+H.force.y/H.mass*N,H.positionPrev.x=H.position.x,H.positionPrev.y=H.position.y,H.position.x+=H.velocity.x,H.position.y+=H.velocity.y,H.deltaTime=O,H.angularVelocity=(H.angle-H.anglePrev)*R*B+H.torque/H.inertia*N,H.anglePrev=H.angle,H.angle+=H.angularVelocity;for(var h=0;h0)C.position.x+=H.velocity.x,C.position.y+=H.velocity.y;if(H.angularVelocity!==0){if(K.rotate(C.vertices,H.angularVelocity,H.position),Y.rotate(C.axes,H.angularVelocity),h>0)Q.rotateAbout(C.position,H.angularVelocity,H.position,C.position)}q.update(C.bounds,C.vertices,H.velocity)}},$.updateVelocities=function(H){var O=$._baseDelta/H.deltaTime,N=H.velocity;N.x=(H.position.x-H.positionPrev.x)*O,N.y=(H.position.y-H.positionPrev.y)*O,H.speed=Math.sqrt(N.x*N.x+N.y*N.y),H.angularVelocity=(H.angle-H.anglePrev)*O,H.angularSpeed=Math.abs(H.angularVelocity)},$.applyForce=function(H,O,N){var B={x:O.x-H.position.x,y:O.y-H.position.y};H.force.x+=N.x,H.force.y+=N.y,H.torque+=B.x*N.y-B.y*N.x},$._totalProperties=function(H){var O={mass:0,area:0,inertia:0,centre:{x:0,y:0}};for(var N=H.parts.length===1?0:1;N0){if(!z)z={};q=W.split(" ");for(var N=0;N0&&O.motion=O.sleepThreshold/Y)$.set(O,!0)}else if(O.sleepCounter>0)O.sleepCounter-=1}},$.afterCollisions=function(z){var q=$._motionSleepThreshold;for(var Y=0;Yq)$.set(B,!1)}}},$.set=function(z,q){var Y=z.isSleeping;if(q){if(z.isSleeping=!0,z.sleepCounter=z.sleepThreshold,z.positionImpulse.x=0,z.positionImpulse.y=0,z.positionPrev.x=z.position.x,z.positionPrev.y=z.position.y,z.anglePrev=z.angle,z.speed=0,z.angularSpeed=0,z.motion=0,!Y)Q.trigger(z,"sleepStart")}else if(z.isSleeping=!1,z.sleepCounter=0,Y)Q.trigger(z,"sleepEnd")}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(3),Q=Z(9);(function(){var W=[],z={overlap:0,axis:null},q={overlap:0,axis:null};$.create=function(Y,X){return{pair:null,collided:!1,bodyA:Y,bodyB:X,parentA:Y.parent,parentB:X.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},$.collides=function(Y,X,H){if($._overlapAxes(z,Y.vertices,X.vertices,Y.axes),z.overlap<=0)return null;if($._overlapAxes(q,X.vertices,Y.vertices,X.axes),q.overlap<=0)return null;var O=H&&H.table[Q.id(Y,X)],N;if(!O)N=$.create(Y,X),N.collided=!0,N.bodyA=Y.id=0)b=-b,x=-x;R.x=b,R.y=x,P.x=-x,P.y=b,y.x=b*C,y.y=x*C,N.depth=C;var T=$._findSupports(Y,X,R,1),_=0;if(K.contains(Y.vertices,T[0]))h[_++]=T[0];if(K.contains(Y.vertices,T[1]))h[_++]=T[1];if(_<2){var d=$._findSupports(X,Y,R,-1);if(K.contains(X.vertices,d[0]))h[_++]=d[0];if(_<2&&K.contains(X.vertices,d[1]))h[_++]=d[1]}if(_===0)h[_++]=T[0];return N.supportCount=_,N},$._overlapAxes=function(Y,X,H,O){var N=X.length,B=H.length,R=X[0].x,P=X[0].y,y=H[0].x,h=H[0].y,C=O.length,A=Number.MAX_VALUE,b=0,x,k,f,T,_,d;for(_=0;_H0)H0=T;else if(TC0)C0=T;else if(TO.frictionStatic?H.frictionStatic:O.frictionStatic,Q.restitution=H.restitution>O.restitution?H.restitution:O.restitution,Q.slop=H.slop>O.slop?H.slop:O.slop,Q.contactCount=Y,W.pair=Q;var N=q[0],B=X[0],R=q[1],P=X[1];if(P.vertex===N||B.vertex===R)X[1]=B,X[0]=B=P,P=X[1];B.vertex=N,P.vertex=R},$.setActive=function(Q,W,z){if(W)Q.isActive=!0,Q.timeUpdated=z;else Q.isActive=!1,Q.contactCount=0},$.id=function(Q,W){return Q.id0?1:0.7),H.damping=H.damping||0,H.angularStiffness=H.angularStiffness||0,H.angleA=H.bodyA?H.bodyA.angle:H.angleA,H.angleB=H.bodyB?H.bodyB.angle:H.angleB,H.plugin={};var R={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};if(H.length===0&&H.stiffness>0.1)R.type="pin",R.anchors=!1;else if(H.stiffness<0.9)R.type="spring";return H.render=Y.extend(R,H.render),H},$.preSolveAll=function(X){for(var H=0;H=1||X.length===0,x=b?X.stiffness*H:X.stiffness*H*H,k=X.damping*H,f=Q.mult(h,A*x),T=(O?O.inverseMass:0)+(N?N.inverseMass:0),_=(O?O.inverseInertia:0)+(N?N.inverseInertia:0),d=T+_,s,t,e,Z0,U0;if(k>0){var H0=Q.create();e=Q.div(h,C),U0=Q.sub(N&&Q.sub(N.position,N.positionPrev)||H0,O&&Q.sub(O.position,O.positionPrev)||H0),Z0=Q.dot(e,U0)}if(O&&!O.isStatic){if(t=O.inverseMass/T,O.constraintImpulse.x-=f.x*t,O.constraintImpulse.y-=f.y*t,O.position.x-=f.x*t,O.position.y-=f.y*t,k>0)O.positionPrev.x-=k*e.x*Z0*t,O.positionPrev.y-=k*e.y*Z0*t;s=Q.cross(B,f)/d*$._torqueDampen*O.inverseInertia*(1-X.angularStiffness),O.constraintImpulse.angle-=s,O.angle-=s}if(N&&!N.isStatic){if(t=N.inverseMass/T,N.constraintImpulse.x+=f.x*t,N.constraintImpulse.y+=f.y*t,N.position.x+=f.x*t,N.position.y+=f.y*t,k>0)N.positionPrev.x+=k*e.x*Z0*t,N.positionPrev.y+=k*e.y*Z0*t;s=Q.cross(R,f)/d*$._torqueDampen*N.inverseInertia*(1-X.angularStiffness),N.constraintImpulse.angle+=s,N.angle+=s}},$.postSolveAll=function(X){for(var H=0;H0)R.position.x+=N.x,R.position.y+=N.y;if(N.angle!==0){if(K.rotate(R.vertices,N.angle,O.position),q.rotate(R.axes,N.angle),B>0)Q.rotateAbout(R.position,N.angle,O.position,R.position)}z.update(R.bounds,R.vertices,O.velocity)}N.angle*=$._warming,N.x*=$._warming,N.y*=$._warming}},$.pointAWorld=function(X){return{x:(X.bodyA?X.bodyA.position.x:0)+(X.pointA?X.pointA.x:0),y:(X.bodyA?X.bodyA.position.y:0)+(X.pointA?X.pointA.y:0)}},$.pointBWorld=function(X){return{x:(X.bodyB?X.bodyB.position.x:0)+(X.pointB?X.pointB.x:0),y:(X.bodyB?X.bodyB.position.y:0)+(X.pointB?X.pointB.y:0)}},$.currentLength=function(X){var H=(X.bodyA?X.bodyA.position.x:0)+(X.pointA?X.pointA.x:0),O=(X.bodyA?X.bodyA.position.y:0)+(X.pointA?X.pointA.y:0),N=(X.bodyB?X.bodyB.position.x:0)+(X.pointB?X.pointB.x:0),B=(X.bodyB?X.bodyB.position.y:0)+(X.pointB?X.pointB.y:0),R=H-N,P=O-B;return Math.sqrt(R*R+P*P)}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(2),Q=Z(0);(function(){$.fromVertices=function(W){var z={};for(var q=0;q=1)Q.warn("Bodies.trapezoid: slope parameter must be < 1.");N*=0.5;var R=(1-N*2)*H,P=H*N,y=P+R,h=y+P,C;if(N<0.5)C="L 0 0 L "+P+" "+-O+" L "+y+" "+-O+" L "+h+" 0";else C="L 0 0 L "+y+" "+-O+" L "+h+" 0";var A={label:"Trapezoid Body",position:{x:Y,y:X},vertices:K.fromPath(C)};if(B.chamfer){var b=B.chamfer;A.vertices=K.chamfer(A.vertices,b.radius,b.quality,b.qualityMin,b.qualityMax),delete B.chamfer}return W.create(Q.extend({},A,B))},$.circle=function(Y,X,H,O,N){O=O||{};var B={label:"Circle Body",circleRadius:H};N=N||25;var R=Math.ceil(Math.max(10,Math.min(N,H)));if(R%2===1)R+=1;return $.polygon(Y,X,R,H,Q.extend({},B,O))},$.polygon=function(Y,X,H,O,N){if(N=N||{},H<3)return $.circle(Y,X,O,N);var B=2*Math.PI/H,R="",P=B*0.5;for(var y=0;y0&&K.area(U0)1)return C=W.create(Q.extend({parts:A.slice(0)},O)),W.setPosition(C,{x:Y,y:X}),C;else return A[0]}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(0),Q=Z(8);(function(){$.create=function(W){var z={bodies:[],collisions:[],pairs:null};return K.extend(z,W)},$.setBodies=function(W,z){W.bodies=z.slice(0)},$.clear=function(W){W.bodies=[],W.collisions=[]},$.collisions=function(W){var{pairs:z,bodies:q}=W,Y=q.length,X=$.canCollide,H=Q.collides,O=W.collisions,N=0,B,R;q.sort($._compareBoundsX);for(B=0;Bh)break;if(CT.max.y)continue;if(b&&(f.isStatic||f.isSleeping))continue;if(!X(P.collisionFilter,f.collisionFilter))continue;var _=f.parts.length;if(k&&_===1){var d=H(P,f,z);if(d)O[N++]=d}else{var s=x>1?1:0,t=_>1?1:0;for(var e=s;eT.max.x||y.max.xT.max.y)continue;var d=H(Z0,H0,z);if(d)O[N++]=d}}}}}if(O.length!==N)O.length=N;return O},$.canCollide=function(W,z){if(W.group===z.group&&W.group!==0)return W.group>0;return(W.mask&z.category)!==0&&(z.mask&W.category)!==0},$._compareBoundsX=function(W,z){return W.bounds.min.x-z.bounds.min.x}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(0);(function(){$.create=function(Q){var W={};if(!Q)K.log("Mouse.create: element was undefined, defaulting to document.body","warn");return W.element=Q||document.body,W.absolute={x:0,y:0},W.position={x:0,y:0},W.mousedownPosition={x:0,y:0},W.mouseupPosition={x:0,y:0},W.offset={x:0,y:0},W.scale={x:1,y:1},W.wheelDelta=0,W.button=-1,W.pixelRatio=parseInt(W.element.getAttribute("data-pixel-ratio"),10)||1,W.sourceEvents={mousemove:null,mousedown:null,mouseup:null,mousewheel:null},W.mousemove=function(z){var q=$._getRelativeMousePosition(z,W.element,W.pixelRatio),Y=z.changedTouches;if(Y)W.button=0,z.preventDefault();W.absolute.x=q.x,W.absolute.y=q.y,W.position.x=W.absolute.x*W.scale.x+W.offset.x,W.position.y=W.absolute.y*W.scale.y+W.offset.y,W.sourceEvents.mousemove=z},W.mousedown=function(z){var q=$._getRelativeMousePosition(z,W.element,W.pixelRatio),Y=z.changedTouches;if(Y)W.button=0,z.preventDefault();else W.button=z.button;W.absolute.x=q.x,W.absolute.y=q.y,W.position.x=W.absolute.x*W.scale.x+W.offset.x,W.position.y=W.absolute.y*W.scale.y+W.offset.y,W.mousedownPosition.x=W.position.x,W.mousedownPosition.y=W.position.y,W.sourceEvents.mousedown=z},W.mouseup=function(z){var q=$._getRelativeMousePosition(z,W.element,W.pixelRatio),Y=z.changedTouches;if(Y)z.preventDefault();W.button=-1,W.absolute.x=q.x,W.absolute.y=q.y,W.position.x=W.absolute.x*W.scale.x+W.offset.x,W.position.y=W.absolute.y*W.scale.y+W.offset.y,W.mouseupPosition.x=W.position.x,W.mouseupPosition.y=W.position.y,W.sourceEvents.mouseup=z},W.mousewheel=function(z){W.wheelDelta=Math.max(-1,Math.min(1,z.wheelDelta||-z.detail)),z.preventDefault(),W.sourceEvents.mousewheel=z},$.setElement(W,W.element),W},$.setElement=function(Q,W){Q.element=W,W.addEventListener("mousemove",Q.mousemove,{passive:!0}),W.addEventListener("mousedown",Q.mousedown,{passive:!0}),W.addEventListener("mouseup",Q.mouseup,{passive:!0}),W.addEventListener("wheel",Q.mousewheel,{passive:!1}),W.addEventListener("touchmove",Q.mousemove,{passive:!1}),W.addEventListener("touchstart",Q.mousedown,{passive:!1}),W.addEventListener("touchend",Q.mouseup,{passive:!1})},$.clearSourceEvents=function(Q){Q.sourceEvents.mousemove=null,Q.sourceEvents.mousedown=null,Q.sourceEvents.mouseup=null,Q.sourceEvents.mousewheel=null,Q.wheelDelta=0},$.setOffset=function(Q,W){Q.offset.x=W.x,Q.offset.y=W.y,Q.position.x=Q.absolute.x*Q.scale.x+Q.offset.x,Q.position.y=Q.absolute.y*Q.scale.y+Q.offset.y},$.setScale=function(Q,W){Q.scale.x=W.x,Q.scale.y=W.y,Q.position.x=Q.absolute.x*Q.scale.x+Q.offset.x,Q.position.y=Q.absolute.y*Q.scale.y+Q.offset.y},$._getRelativeMousePosition=function(Q,W,z){var q=W.getBoundingClientRect(),Y=document.documentElement||document.body.parentNode||document.body,X=window.pageXOffset!==void 0?window.pageXOffset:Y.scrollLeft,H=window.pageYOffset!==void 0?window.pageYOffset:Y.scrollTop,O=Q.changedTouches,N,B;if(O)N=O[0].pageX-q.left-X,B=O[0].pageY-q.top-H;else N=Q.pageX-q.left-X,B=Q.pageY-q.top-H;return{x:N/(W.clientWidth/(W.width||W.clientWidth)*z),y:B/(W.clientHeight/(W.height||W.clientHeight)*z)}}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(0);(function(){$._registry={},$.register=function(Q){if(!$.isPlugin(Q))K.warn("Plugin.register:",$.toString(Q),"does not implement all required fields.");if(Q.name in $._registry){var W=$._registry[Q.name],z=$.versionParse(Q.version).number,q=$.versionParse(W.version).number;if(z>q)K.warn("Plugin.register:",$.toString(W),"was upgraded to",$.toString(Q)),$._registry[Q.name]=Q;else if(z-1},$.isFor=function(Q,W){var z=Q.for&&$.dependencyParse(Q.for);return!Q.for||W.name===z.name&&$.versionSatisfies(W.version,z.range)},$.use=function(Q,W){if(Q.uses=(Q.uses||[]).concat(W||[]),Q.uses.length===0){K.warn("Plugin.use:",$.toString(Q),"does not specify any dependencies to install.");return}var z=$.dependencies(Q),q=K.topologicalSort(z),Y=[];for(var X=0;X0)K.info(Y.join(" "))},$.dependencies=function(Q,W){var z=$.dependencyParse(Q),q=z.name;if(W=W||{},q in W)return;Q=$.resolve(Q)||Q,W[q]=K.map(Q.uses||[],function(X){if($.isPlugin(X))$.register(X);var H=$.dependencyParse(X),O=$.resolve(X);if(O&&!$.versionSatisfies(O.version,H.range))K.warn("Plugin.dependencies:",$.toString(O),"does not satisfy",$.toString(H),"used by",$.toString(z)+"."),O._warned=!0,Q._warned=!0;else if(!O)K.warn("Plugin.dependencies:",$.toString(X),"used by",$.toString(z),"could not be resolved."),Q._warned=!0;return H.name});for(var Y=0;Y=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;if(!W.test(Q))K.warn("Plugin.versionParse:",Q,"is not a valid version or range.");var z=W.exec(Q),q=Number(z[4]),Y=Number(z[5]),X=Number(z[6]);return{isRange:Boolean(z[1]||z[2]),version:z[3],range:Q,operator:z[1]||z[2]||"",major:q,minor:Y,patch:X,parts:[q,Y,X],prerelease:z[7],number:q*1e8+Y*1e4+X}},$.versionSatisfies=function(Q,W){W=W||"*";var z=$.versionParse(W),q=$.versionParse(Q);if(z.isRange){if(z.operator==="*"||Q==="*")return!0;if(z.operator===">")return q.number>z.number;if(z.operator===">=")return q.number>=z.number;if(z.operator==="~")return q.major===z.major&&q.minor===z.minor&&q.patch>=z.patch;if(z.operator==="^"){if(z.major>0)return q.major===z.major&&q.number>=z.number;if(z.minor>0)return q.minor===z.minor&&q.patch>=z.patch;return q.patch===z.patch}}return Q===W||Q==="*"}})()},function(G,J){var Z={};G.exports=Z,function(){Z.create=function($){return{vertex:$,normalImpulse:0,tangentImpulse:0}}}()},function(G,J,Z){var $={};G.exports=$;var K=Z(7),Q=Z(18),W=Z(13),z=Z(19),q=Z(5),Y=Z(6),X=Z(10),H=Z(0),O=Z(4);(function(){$._deltaMax=16.666666666666668,$.create=function(N){N=N||{};var B={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:0.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},R=H.extend(B,N);return R.world=N.world||Y.create({label:"World"}),R.pairs=N.pairs||z.create(),R.detector=N.detector||W.create(),R.detector.pairs=R.pairs,R.grid={buckets:[]},R.world.gravity=R.gravity,R.broadphase=R.grid,R.metrics={},R},$.update=function(N,B){var R=H.now(),P=N.world,y=N.detector,h=N.pairs,C=N.timing,A=C.timestamp,b;if(B>$._deltaMax)H.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",$._deltaMax.toFixed(3),"ms.");B=typeof B<"u"?B:H._baseDelta,B*=C.timeScale,C.timestamp+=B,C.lastDelta=B;var x={timestamp:C.timestamp,delta:B};q.trigger(N,"beforeUpdate",x);var k=Y.allBodies(P),f=Y.allConstraints(P);if(P.isModified)W.setBodies(y,k),Y.setModified(P,!1,!1,!0);if(N.enableSleeping)K.update(k,B);if($._bodiesApplyGravity(k,N.gravity),B>0)$._bodiesUpdate(k,B);q.trigger(N,"beforeSolve",x),X.preSolveAll(k);for(b=0;b0)q.trigger(N,"collisionStart",{pairs:h.collisionStart,timestamp:C.timestamp,delta:B});var _=H.clamp(20/N.positionIterations,0,1);Q.preSolvePosition(h.list);for(b=0;b0)q.trigger(N,"collisionActive",{pairs:h.collisionActive,timestamp:C.timestamp,delta:B});if(h.collisionEnd.length>0)q.trigger(N,"collisionEnd",{pairs:h.collisionEnd,timestamp:C.timestamp,delta:B});return $._bodiesClearForces(k),q.trigger(N,"afterUpdate",x),N.timing.lastElapsed=H.now()-R,N},$.merge=function(N,B){if(H.extend(N,B),B.world){N.world=B.world,$.clear(N);var R=Y.allBodies(N.world);for(var P=0;PL8){if(h=r>0?r:-r,y=b.friction*(r>0?1:-1)*H,y<-h)y=-h;else if(y>h)y=h}else y=r,h=R;var O1=A0*_-J1*T,g=e0*_-G1*T,V=H0/(t+k.inverseInertia*O1*O1+f.inverseInertia*g*g),D=(1+b.restitution)*H1*V;if(y*=V,H10)M0.normalImpulse=0;D=M0.normalImpulse-L}if(r<-N||r>N)M0.tangentImpulse=0;else{var E=M0.tangentImpulse;if(M0.tangentImpulse+=y,M0.tangentImpulse<-h)M0.tangentImpulse=-h;if(M0.tangentImpulse>h)M0.tangentImpulse=h;y=M0.tangentImpulse-E}var w=T*D+d*y,p=_*D+s*y;if(!(k.isStatic||k.isSleeping))k.positionPrev.x+=w*k.inverseMass,k.positionPrev.y+=p*k.inverseMass,k.anglePrev+=(A0*p-J1*w)*k.inverseInertia;if(!(f.isStatic||f.isSleeping))f.positionPrev.x-=w*f.inverseMass,f.positionPrev.y-=p*f.inverseMass,f.anglePrev-=(e0*p-G1*w)*f.inverseInertia}}}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(9),Q=Z(0);(function(){$.create=function(W){return Q.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},W)},$.update=function(W,z,q){var{update:Y,create:X,setActive:H}=K,O=W.table,N=W.list,B=N.length,R=B,P=W.collisionStart,y=W.collisionEnd,h=W.collisionActive,C=z.length,A=0,b=0,x=0,k,f,T;for(T=0;T=q)N[R++]=f;else if(H(f,!1,q),f.collision.bodyA.sleepCounter>0&&f.collision.bodyB.sleepCounter>0)N[R++]=f;else y[b++]=f,delete O[f.id];if(N.length!==R)N.length=R;if(P.length!==A)P.length=A;if(y.length!==b)y.length=b;if(h.length!==x)h.length=x},$.clear=function(W){return W.table={},W.list.length=0,W.collisionStart.length=0,W.collisionActive.length=0,W.collisionEnd.length=0,W}})()},function(G,J,Z){var $=G.exports=Z(21);$.Axes=Z(11),$.Bodies=Z(12),$.Body=Z(4),$.Bounds=Z(1),$.Collision=Z(8),$.Common=Z(0),$.Composite=Z(6),$.Composites=Z(22),$.Constraint=Z(10),$.Contact=Z(16),$.Detector=Z(13),$.Engine=Z(17),$.Events=Z(5),$.Grid=Z(23),$.Mouse=Z(14),$.MouseConstraint=Z(24),$.Pair=Z(9),$.Pairs=Z(19),$.Plugin=Z(15),$.Query=Z(25),$.Render=Z(26),$.Resolver=Z(18),$.Runner=Z(27),$.SAT=Z(28),$.Sleeping=Z(7),$.Svg=Z(29),$.Vector=Z(2),$.Vertices=Z(3),$.World=Z(30),$.Engine.run=$.Runner.run,$.Common.deprecated($.Engine,"run","Engine.run ➤ use Matter.Runner.run(engine) instead")},function(G,J,Z){var $={};G.exports=$;var K=Z(15),Q=Z(0);(function(){$.name="matter-js",$.version="0.20.0",$.uses=[],$.used=[],$.use=function(){K.use($,Array.prototype.slice.call(arguments))},$.before=function(W,z){return W=W.replace(/^Matter./,""),Q.chainPathBefore($,W,z)},$.after=function(W,z){return W=W.replace(/^Matter./,""),Q.chainPathAfter($,W,z)}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(6),Q=Z(10),W=Z(0),z=Z(4),q=Z(12),Y=W.deprecated;(function(){$.stack=function(X,H,O,N,B,R,P){var y=K.create({label:"Stack"}),h=X,C=H,A,b=0;for(var x=0;xk)k=_;z.translate(T,{x:d*0.5,y:_*0.5}),h=T.bounds.max.x+B,K.addBody(y,T),A=T,b+=1}else h+=B}C+=k+R,h=X}return y},$.chain=function(X,H,O,N,B,R){var P=X.bodies;for(var y=1;y0)for(y=0;y0)A=R[y-1+(P-1)*H],K.addConstraint(X,Q.create(W.extend({bodyA:A,bodyB:C},B)));if(N&&yk)return;A=k-A;var T=A,_=O-1-A;if(C_)return;if(x===1)z.translate(b,{x:(C+(O%2===1?1:-1))*f,y:0});var d=b?C*f:0;return P(X+d+C*B,h,C,A,b,x)})},$.newtonsCradle=function(X,H,O,N,B){var R=K.create({label:"Newtons Cradle"});for(var P=0;PB.bounds.max.x||C.bounds.max.yB.bounds.max.y))continue;var A=$._getRegion(z,C);if(!C.region||A.id!==C.region.id||X){if(!C.region||X)C.region=A;var b=$._regionUnion(A,C.region);for(O=b.startCol;O<=b.endCol;O++)for(N=b.startRow;N<=b.endRow;N++){y=$._getBucketId(O,N),P=R[y];var x=O>=A.startCol&&O<=A.endCol&&N>=A.startRow&&N<=A.endRow,k=O>=C.region.startCol&&O<=C.region.endCol&&N>=C.region.startRow&&N<=C.region.endRow;if(!x&&k){if(k){if(P)$._bucketRemoveBody(z,P,C)}}if(C.region===A||x&&!k||X){if(!P)P=$._createBucket(R,y);$._bucketAddBody(z,P,C)}}C.region=A,h=!0}}if(h)z.pairsList=$._createActivePairsList(z)},W($,"update","Grid.update ➤ replaced by Matter.Detector"),$.clear=function(z){z.buckets={},z.pairs={},z.pairsList=[]},W($,"clear","Grid.clear ➤ replaced by Matter.Detector"),$._regionUnion=function(z,q){var Y=Math.min(z.startCol,q.startCol),X=Math.max(z.endCol,q.endCol),H=Math.min(z.startRow,q.startRow),O=Math.max(z.endRow,q.endRow);return $._createRegion(Y,X,H,O)},$._getRegion=function(z,q){var Y=q.bounds,X=Math.floor(Y.min.x/z.bucketWidth),H=Math.floor(Y.max.x/z.bucketWidth),O=Math.floor(Y.min.y/z.bucketHeight),N=Math.floor(Y.max.y/z.bucketHeight);return $._createRegion(X,H,O,N)},$._createRegion=function(z,q,Y,X){return{id:z+","+q+","+Y+","+X,startCol:z,endCol:q,startRow:Y,endRow:X}},$._getBucketId=function(z,q){return"C"+z+"R"+q},$._createBucket=function(z,q){var Y=z[q]=[];return Y},$._bucketAddBody=function(z,q,Y){var X=z.pairs,H=K.id,O=q.length,N;for(N=0;N0)O.push(q);else delete Y[X[N]];return O}})()},function(G,J,Z){var $={};G.exports=$;var K=Z(3),Q=Z(7),W=Z(14),z=Z(5),q=Z(13),Y=Z(10),X=Z(6),H=Z(0),O=Z(1);(function(){$.create=function(N,B){var R=(N?N.mouse:null)||(B?B.mouse:null);if(!R)if(N&&N.render&&N.render.canvas)R=W.create(N.render.canvas);else if(B&&B.element)R=W.create(B.element);else R=W.create(),H.warn("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected");var P=Y.create({label:"Mouse Constraint",pointA:R.position,pointB:{x:0,y:0},length:0.01,stiffness:0.1,angularStiffness:1,render:{strokeStyle:"#90EE90",lineWidth:3}}),y={type:"mouseConstraint",mouse:R,element:null,body:null,constraint:P,collisionFilter:{category:1,mask:4294967295,group:0}},h=H.extend(y,B);return z.on(N,"beforeUpdate",function(){var C=X.allBodies(N.world);$.update(h,C),$._triggerEvents(h)}),h},$.update=function(N,B){var{mouse:R,constraint:P,body:y}=N;if(R.button===0)if(!P.bodyB){for(var h=0;h1?1:0;Ck.max.x)k.max.x=d.x;if(_.yk.max.y)k.max.y=d.y}}var s=k.max.x-k.min.x+2*b.x,t=k.max.y-k.min.y+2*b.y,e=C.canvas.height,Z0=C.canvas.width,U0=Z0/e,H0=s/t,C0=1,B0=1;if(H0>U0)B0=H0/U0;else C0=U0/H0;if(C.options.hasBounds=!0,C.bounds.min.x=k.min.x,C.bounds.max.x=k.min.x+s*C0,C.bounds.min.y=k.min.y,C.bounds.max.y=k.min.y+t*B0,x)C.bounds.min.x+=s*0.5-s*C0*0.5,C.bounds.max.x+=s*0.5-s*C0*0.5,C.bounds.min.y+=t*0.5-t*B0*0.5,C.bounds.max.y+=t*0.5-t*B0*0.5;if(C.bounds.min.x-=b.x,C.bounds.max.x-=b.x,C.bounds.min.y-=b.y,C.bounds.max.y-=b.y,C.mouse)X.setScale(C.mouse,{x:(C.bounds.max.x-C.bounds.min.x)/C.canvas.width,y:(C.bounds.max.y-C.bounds.min.y)/C.canvas.height}),X.setOffset(C.mouse,C.bounds.min)},$.startViewTransform=function(C){var A=C.bounds.max.x-C.bounds.min.x,b=C.bounds.max.y-C.bounds.min.y,x=A/C.options.width,k=b/C.options.height;C.context.setTransform(C.options.pixelRatio/x,0,0,C.options.pixelRatio/k,0,0),C.context.translate(-C.bounds.min.x,-C.bounds.min.y)},$.endViewTransform=function(C){C.context.setTransform(C.options.pixelRatio,0,0,C.options.pixelRatio,0,0)},$.world=function(C,A){var b=Q.now(),x=C.engine,k=x.world,f=C.canvas,T=C.context,_=C.options,d=C.timing,s=W.allBodies(k),t=W.allConstraints(k),e=_.wireframes?_.wireframeBackground:_.background,Z0=[],U0=[],H0,C0={timestamp:x.timing.timestamp};if(q.trigger(C,"beforeRender",C0),C.currentBackground!==e)h(C,e);if(T.globalCompositeOperation="source-in",T.fillStyle="transparent",T.fillRect(0,0,f.width,f.height),T.globalCompositeOperation="source-over",_.hasBounds){for(H0=0;H01?1:0;t<_.parts.length;t++){if(d=_.parts[t],!d.render.visible)continue;if(f.showSleeping&&_.isSleeping)x.globalAlpha=0.5*d.render.opacity;else if(d.render.opacity!==1)x.globalAlpha=d.render.opacity;if(d.render.sprite&&d.render.sprite.texture&&!f.wireframes){var e=d.render.sprite,Z0=y(C,e.texture);x.translate(d.position.x,d.position.y),x.rotate(d.angle),x.drawImage(Z0,Z0.width*-e.xOffset*e.xScale,Z0.height*-e.yOffset*e.yScale,Z0.width*e.xScale,Z0.height*e.yScale),x.rotate(-d.angle),x.translate(-d.position.x,-d.position.y)}else{if(d.circleRadius)x.beginPath(),x.arc(d.position.x,d.position.y,d.circleRadius,0,2*Math.PI);else{x.beginPath(),x.moveTo(d.vertices[0].x,d.vertices[0].y);for(var U0=1;U01?1:0;s1?1:0;T<_.length;T++){var d=_[T];for(f=0;f1?1:0;s1?1:0;d1?1:0;d1?1:0;f0){var H0=f.contacts[0].vertex.x,C0=f.contacts[0].vertex.y;if(f.contactCount===2)H0=(f.contacts[0].vertex.x+f.contacts[1].vertex.x)/2,C0=(f.contacts[0].vertex.y+f.contacts[1].vertex.y)/2;if(T.bodyB===T.supports[0].body||T.bodyA.isStatic===!0)x.moveTo(H0-T.normal.x*8,C0-T.normal.y*8);else x.moveTo(H0+T.normal.x*8,C0+T.normal.y*8);x.lineTo(H0,C0)}}if(k.wireframes)x.strokeStyle="rgba(255,165,0,0.7)";else x.strokeStyle="orange";x.lineWidth=1,x.stroke()},$.separations=function(C,A,b){var x=b,k=C.options,f,T,_,d,s,t,e;x.beginPath();for(t=0;tMath.max($._maxFrameDelta,q.maxFrameTime))B=q.frameDelta||$._frameDeltaFallback;if(q.frameDeltaSmoothing){q.frameDeltaHistory.push(B),q.frameDeltaHistory=q.frameDeltaHistory.slice(-q.frameDeltaHistorySize);var R=q.frameDeltaHistory.slice(0).sort(),P=q.frameDeltaHistory.slice(R.length*$._smoothingLowerBound,R.length*$._smoothingUpperBound),y=z(P);B=y||B}if(q.frameDeltaSnapping)B=1000/Math.round(1000/B);q.frameDelta=B,q.timeLastTick=X,q.timeBuffer+=q.frameDelta,q.timeBuffer=W.clamp(q.timeBuffer,0,q.frameDelta+O*$._timeBufferMargin),q.lastUpdatesDeferred=0;var h=q.maxUpdates||Math.ceil(q.maxFrameTime/O),C={timestamp:Y.timing.timestamp};K.trigger(q,"beforeTick",C),K.trigger(q,"tick",C);var A=W.now();while(O>0&&q.timeBuffer>=O*$._timeBufferMargin){K.trigger(q,"beforeUpdate",C),Q.update(Y,O),K.trigger(q,"afterUpdate",C),q.timeBuffer-=O,N+=1;var b=W.now()-H,x=W.now()-A,k=b+$._elapsedNextEstimate*x/N;if(N>=h||k>q.maxFrameTime){q.lastUpdatesDeferred=Math.round(Math.max(0,q.timeBuffer/O-$._timeBufferMargin));break}}if(Y.timing.lastUpdatesPerFrame=N,K.trigger(q,"afterTick",C),q.frameDeltaHistory.length>=100){if(q.lastUpdatesDeferred&&Math.round(q.frameDelta/O)>h)W.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs.");else if(q.lastUpdatesDeferred)W.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs.");if(typeof q.isFixed<"u")W.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs.");if(q.deltaMin||q.deltaMax)W.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs.");if(q.fps!==0)W.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs.")}},$.stop=function(q){$._cancelNextFrame(q)},$._onNextFrame=function(q,Y){if(typeof window<"u"&&window.requestAnimationFrame)q.frameRequestId=window.requestAnimationFrame(Y);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return q.frameRequestId},$._cancelNextFrame=function(q){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(q.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var z=function(q){var Y=0,X=q.length;for(var H=0;H1;if(!P||_!=P.x||d!=P.y){if(P&&t)C=P.x,A=P.y;else C=0,A=0;var e={x:C+_,y:A+d};if(t||!P)P=e;h.push(e),x=C+_,k=A+d}},T=function(_){var d=_.pathSegTypeAsLetter.toUpperCase();if(d==="Z")return;switch(d){case"M":case"L":case"T":case"C":case"S":case"Q":x=_.x,k=_.y;break;case"H":x=_.x;break;case"V":k=_.y;break}f(x,k,_.pathSegType)};$._svgPathToAbsolute(W),X=W.getTotalLength(),N=[];for(q=0;q"u"},$$=function(J){return typeof J==="object"},X9=function(J){return J!==!1},iK=function(){return typeof window<"u"},NZ=function(J){return Y8(J)||k8(J)},LG=typeof ArrayBuffer==="function"&&ArrayBuffer.isView||function(){},c8=Array.isArray,vK=/(?:-?\.?\d|\.)+/gi,nK=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ZJ=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,AK=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rK=/[+-]=-?[.\d]+/,FG=/[^,'"\[\]\s]+/gi,yH=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,z8,t9,gK,aK,M9={},BZ={},XG,YG=function(J){return(BZ=hJ(J,M9))&&p8},kZ=function(J,Z){return console.warn("Invalid property",J,"set to",Z,"Missing plugin? gsap.registerPlugin()")},B7=function(J,Z){return!Z&&console.warn(J)},OG=function(J,Z){return J&&(M9[J]=Z)&&BZ&&(BZ[J]=Z)||M9},R7=function(){return 0},vH={suppressEvents:!0,isStart:!0,kill:!1},EZ={suppressEvents:!0,kill:!1},gH={suppressEvents:!0},tK={},h$=[],_K={},DG,L9={},TK={},ZG=30,jZ=[],eK="",$Q=function(J){var Z=J[0],$,K;if($$(Z)||Y8(Z)||(J=[J]),!($=(Z._gsap||{}).harness)){K=jZ.length;while(K--&&!jZ[K].targetTest(Z));$=jZ[K]}K=J.length;while(K--)J[K]&&(J[K]._gsap||(J[K]._gsap=new QQ(J[K],$)))||J.splice(K,1);return J},b$=function(J){return J._gsap||$Q(x9(J))[0]._gsap},JQ=function(J,Z,$){return($=J[Z])&&Y8($)?J[Z]():PZ($)&&J.getAttribute&&J.getAttribute(Z)||$},e8=function(J,Z){return(J=J.split(",")).forEach(Z)||J},O8=function(J){return Math.round(J*1e5)/1e5||0},M8=function(J){return Math.round(J*1e7)/1e7||0},KJ=function(J,Z){var $=Z.charAt(0),K=parseFloat(Z.substr(2));return J=parseFloat(J),$==="+"?J+K:$==="-"?J-K:$==="*"?J*K:J/K},_H=function(J,Z){var $=Z.length,K=0;for(;J.indexOf(Z[K])<0&&++K<$;);return K<$},RZ=function(){var J=h$.length,Z=h$.slice(0),$,K;_K={},h$.length=0;for($=0;$z)W=W._prev}if(W)Z._next=W._next,W._next=Z;else Z._next=J[$],J[$]=Z;if(Z._next)Z._next._prev=Z;else J[K]=Z;return Z._prev=W,Z.parent=Z._dp=J,Z},I7=function(J,Z,$,K){if($===void 0)$="_first";if(K===void 0)K="_last";var{_prev:Q,_next:W}=Z;if(Q)Q._next=W;else if(J[$]===Z)J[$]=W;if(W)W._prev=Q;else if(J[K]===Z)J[K]=Q;Z._next=Z._prev=Z.parent=null},y$=function(J,Z){J.parent&&(!Z||J.parent.autoRemoveChildren)&&J.parent.remove&&J.parent.remove(J),J._act=0},e$=function(J,Z){if(J&&(!Z||Z._end>J._dur||Z._start<0)){var $=J;while($)$._dirty=1,$=$.parent}return J},dH=function(J){var Z=J.parent;while(Z&&Z.parent)Z._dirty=1,Z.totalDuration(),Z=Z.parent;return J},uK=function(J,Z,$,K){return J._startAt&&(v8?J._startAt.revert(EZ):J.vars.immediateRender&&!J.vars.autoRevert||J._startAt.render(Z,!0,K))},cH=function G(J){return!J||J._ts&&G(J.parent)},QG=function(J){return J._repeat?bJ(J._tTime,J=J.duration()+J._rDelay)*J:0},bJ=function(J,Z){var $=Math.floor(J=M8(J/Z));return J&&$===J?$-1:$},MZ=function(J,Z){return(J-Z._start)*Z._ts+(Z._ts>=0?0:Z._dirty?Z.totalDuration():Z._tDur)},SZ=function(J){return J._end=M8(J._start+(J._tDur/Math.abs(J._ts||J._rts||r1)||0))},AZ=function(J,Z){var $=J._dp;if($&&$.smoothChildTiming&&J._ts)J._start=M8($._time-(J._ts>0?Z/J._ts:((J._dirty?J.totalDuration():J._tDur)-Z)/-J._ts)),SZ(J),$._dirty||e$($,J);return J},BG=function(J,Z){var $;if(Z._time||!Z._dur&&Z._initted||Z._startr1)Z.render($,!0)}if(e$(J,Z)._dp&&J._initted&&J._time>=J._dur&&J._ts){if(J._dur=0&&$.totalTime($._tTime),$=$._dp}J._zTime=-r1}},e9=function(J,Z,$,K){return Z.parent&&y$(Z),Z._start=M8((N$($)?$:$||J!==z8?w9(J,$,Z):J._time)+Z._delay),Z._end=M8(Z._start+(Z.totalDuration()/Math.abs(Z.timeScale())||0)),VG(J,Z,"_first","_last",J._sort?"_start":0),mK(Z)||(J._recent=Z),K||BG(J,Z),J._ts<0&&AZ(J,J._tTime),J},RG=function(J,Z){return(M9.ScrollTrigger||kZ("scrollTrigger",Z))&&M9.ScrollTrigger.create(Z,J)},CG=function(J,Z,$,K,Q){if(HQ(J,Z,Q),!J._initted)return 1;if(!$&&J._pt&&!v8&&(J._dur&&J.vars.lazy!==!1||!J._dur&&J.vars.lazy)&&DG!==F9.frame)return h$.push(J),J._lazy=[Q,K],1},pH=function G(J){var Z=J.parent;return Z&&Z._ts&&Z._initted&&!Z._lock&&(Z.rawTime()<0||G(Z))},mK=function(J){var Z=J.data;return Z==="isFromStart"||Z==="isStart"},lH=function(J,Z,$,K){var Q=J.ratio,W=Z<0||!Z&&(!J._start&&pH(J)&&!(!J._initted&&mK(J))||(J._ts<0||J._dp._ts<0)&&!mK(J))?0:1,z=J._rDelay,q=0,Y,X,H;if(z&&J._repeat){if(q=P7(0,J._tDur,Z),X=bJ(q,z),J._yoyo&&X&1&&(W=1-W),X!==bJ(J._tTime,z))Q=1-W,J.vars.repeatRefresh&&J._initted&&J.invalidate()}if(W!==Q||v8||K||J._zTime===r1||!Z&&J._zTime){if(!J._initted&&CG(J,Z,K,$,q))return;H=J._zTime,J._zTime=Z||($?r1:0),$||($=Z&&!H),J.ratio=W,J._from&&(W=1-W),J._time=0,J._tTime=q,Y=J._pt;while(Y)Y.r(W,Y.d),Y=Y._next;if(Z<0&&uK(J,Z,$,!0),J._onUpdate&&!$&&C9(J,"onUpdate"),q&&J._repeat&&!$&&J.parent&&C9(J,"onRepeat"),(Z>=J._tDur||Z<0)&&J.ratio===W){if(W&&y$(J,1),!$&&!v8)C9(J,W?"onComplete":"onReverseComplete",!0),J._prom&&J._prom()}}else if(!J._zTime)J._zTime=Z},sH=function(J,Z,$){var K;if($>Z){K=J._first;while(K&&K._start<=$){if(K.data==="isPause"&&K._start>Z)return K;K=K._next}}else{K=J._last;while(K&&K._start>=$){if(K.data==="isPause"&&K._start0&&!K&&AZ(J,J._tTime=J._tDur*z),J.parent&&SZ(J),$||e$(J.parent,J),J},GG=function(J){return J instanceof y8?e$(J):yJ(J,J._dur)},oH={_start:0,endTime:R7,totalDuration:R7},w9=function G(J,Z,$){var K=J.labels,Q=J._recent||oH,W=J.duration()>=f9?Q.endTime(!1):J._dur,z,q,Y;if(k8(Z)&&(isNaN(Z)||(Z in K))){if(q=Z.charAt(0),Y=Z.substr(-1)==="%",z=Z.indexOf("="),q==="<"||q===">")return z>=0&&(Z=Z.replace(/=/,"")),(q==="<"?Q._start:Q.endTime(Q._repeat>=0))+(parseFloat(Z.substr(1))||0)*(Y?(z<0?Q:$).totalDuration()/100:1);if(z<0)return Z in K||(K[Z]=W),K[Z];if(q=parseFloat(Z.charAt(z-1)+Z.substr(z+1)),Y&&$)q=q/100*(c8($)?$[0]:$).totalDuration();return z>1?G(J,Z.substr(0,z-1),$)+q:W+q}return Z==null?W:+Z},j7=function(J,Z,$){var K=N$(Z[1]),Q=(K?2:1)+(J<2?0:1),W=Z[Q],z,q;if(K&&(W.duration=Z[1]),W.parent=$,J){z=W,q=$;while(q&&!("immediateRender"in z))z=q.vars.defaults||{},q=X9(q.vars.inherit)&&q.parent;W.immediateRender=X9(z.immediateRender),J<2?W.runBackwards=1:W.startAt=Z[Q-1]}return new C8(Z[0],W,Z[Q+1])},v$=function(J,Z){return J||J===0?Z(J):Z},P7=function(J,Z,$){return $Z?Z:$},g8=function(J,Z){return!k8(J)||!(Z=yH.exec(J))?"":Z[1]},iH=function(J,Z,$){return v$($,function(K){return P7(J,Z,K)})},dK=[].slice,MG=function(J,Z){return J&&$$(J)&&"length"in J&&(!Z&&!J.length||(J.length-1 in J)&&$$(J[0]))&&!J.nodeType&&J!==t9},nH=function(J,Z,$){if($===void 0)$=[];return J.forEach(function(K){var Q;return k8(K)&&!Z||MG(K,1)?(Q=$).push.apply(Q,x9(K)):$.push(K)})||$},x9=function(J,Z,$){return Q8&&!Z&&Q8.selector?Q8.selector(J):k8(J)&&!$&&(gK||!vJ())?dK.call((Z||aK).querySelectorAll(J),0):c8(J)?nH(J,$):MG(J)?dK.call(J,0):J?[J]:[]},cK=function(J){return J=x9(J)[0]||B7("Invalid scope")||{},function(Z){var $=J.current||J.nativeElement||J;return x9(Z,$.querySelectorAll?$:$===J?B7("Invalid scope")||aK.createElement("div"):J)}},IG=function(J){return J.sort(function(){return 0.5-Math.random()})},PG=function(J){if(Y8(J))return J;var Z=$$(J)?J:{each:J},$=$J(Z.ease),K=Z.from||0,Q=parseFloat(Z.base)||0,W={},z=K>0&&K<1,q=isNaN(K)||z,Y=Z.axis,X=K,H=K;if(k8(K))X=H={center:0.5,edges:0.5,end:1}[K]||0;else if(!z&&q)X=K[0],H=K[1];return function(O,N,B){var R=(B||Z).length,P=W[R],y,h,C,A,b,x,k,f,T;if(!P){if(T=Z.grid==="auto"?0:(Z.grid||[1,f9])[1],!T){k=-f9;while(k<(k=B[T++].getBoundingClientRect().left)&&Tk&&(k=b),bR?R-1:!Y?Math.max(T,R/T):Y==="y"?R/T:T)||0)*(K==="edges"?-1:1),P.b=R<0?Q-R:Q,P.u=g8(Z.amount||Z.each)||0,$=$&&R<0?bG($):$}return R=(P[O]-P.min)/P.max||0,M8(P.b+($?$(R):R)*P.v)+P.u}},pK=function(J){var Z=Math.pow(10,((J+"").split(".")[1]||"").length);return function($){var K=M8(Math.round(parseFloat($)/J)*J*Z);return(K-K%1)/Z+(N$($)?0:g8($))}},kG=function(J,Z){var $=c8(J),K,Q;if(!$&&$$(J))if(K=$=J.radius||f9,J.values){if(J=x9(J.values),Q=!N$(J[0]))K*=K}else J=pK(J.increment);return v$(Z,!$?pK(J):Y8(J)?function(W){return Q=J(W),Math.abs(Q-W)<=K?Q:W}:function(W){var z=parseFloat(Q?W.x:W),q=parseFloat(Q?W.y:0),Y=f9,X=0,H=J.length,O,N;while(H--){if(Q)O=J[H].x-z,N=J[H].y-q,O=O*O+N*N;else O=Math.abs(J[H]-z);if(OK?Q-W:W)})},gJ=function(J){var Z=0,$="",K,Q,W,z;while(~(K=J.indexOf("random(",Z)))W=J.indexOf(")",K),z=J.charAt(K+7)==="[",Q=J.substr(K+7,W-K-7).match(z?FG:vK),$+=J.substr(Z,K-Z)+SG(z?Q:+Q[0],z?0:+Q[1],+Q[2]||0.00001),Z=W+1;return $+J.substr(Z,J.length-Z)},TG=function(J,Z,$,K,Q){var W=Z-J,z=K-$;return v$(Q,function(q){return $+((q-J)/W*z||0)})},JU=function G(J,Z,$,K){var Q=isNaN(J+Z)?0:function(N){return(1-N)*J+N*Z};if(!Q){var W=k8(J),z={},q,Y,X,H,O;if($===!0&&(K=1)&&($=null),W)J={p:J},Z={p:Z};else if(c8(J)&&!c8(Z)){X=[],H=J.length,O=H-2;for(Y=1;Y(z=Math.abs(z)))q=W,Q=z;return q},C9=function(J,Z,$){var K=J.vars,Q=K[Z],W=Q8,z=J._ctx,q,Y,X;if(!Q)return;return q=K[Z+"Params"],Y=K.callbackScope||J,$&&h$.length&&RZ(),z&&(Q8=z),X=q?Q.apply(Y,q):Q.call(Y),Q8=W,X},D7=function(J){return y$(J),J.scrollTrigger&&J.scrollTrigger.kill(!!v8),J.progress()<1&&C9(J,"onInterrupt"),J},fJ,wG=[],fG=function(J){if(!J)return;if(J=!J.name&&J.default||J,iK()||J.headless){var Z=J.name,$=Y8(J),K=Z&&!$&&J.init?function(){this._props=[]}:J,Q={init:R7,render:qQ,add:GQ,kill:NU,modifier:DU,rawVars:0},W={targetTest:0,get:0,getSetter:TZ,aliases:{},register:0};if(vJ(),J!==K){if(L9[Z])return;if(O9(K,O9(CZ(J,Q),W)),hJ(K.prototype,hJ(Q,CZ(J,W))),L9[K.prop=Z]=K,J.targetTest)jZ.push(K),tK[Z]=1;Z=(Z==="css"?"CSS":Z.charAt(0).toUpperCase()+Z.substr(1))+"Plugin"}OG(Z,K),J.register&&J.register(p8,K,$9)}else wG.push(J)},n1=255,N7={aqua:[0,n1,n1],lime:[0,n1,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,n1],navy:[0,0,128],white:[n1,n1,n1],olive:[128,128,0],yellow:[n1,n1,0],orange:[n1,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[n1,0,0],pink:[n1,192,203],cyan:[0,n1,n1],transparent:[n1,n1,n1,0]},wK=function(J,Z,$){return J+=J<0?1:J>1?-1:0,(J*6<1?Z+($-Z)*J*6:J<0.5?$:J*3<2?Z+($-Z)*(0.6666666666666666-J)*6:Z)*n1+0.5|0},xG=function(J,Z,$){var K=!J?N7.black:N$(J)?[J>>16,J>>8&n1,J&n1]:0,Q,W,z,q,Y,X,H,O,N,B;if(!K){if(J.substr(-1)===",")J=J.substr(0,J.length-1);if(N7[J])K=N7[J];else if(J.charAt(0)==="#"){if(J.length<6)Q=J.charAt(1),W=J.charAt(2),z=J.charAt(3),J="#"+Q+Q+W+W+z+z+(J.length===5?J.charAt(4)+J.charAt(4):"");if(J.length===9)return K=parseInt(J.substr(1,6),16),[K>>16,K>>8&n1,K&n1,parseInt(J.substr(7),16)/255];J=parseInt(J.substr(1),16),K=[J>>16,J>>8&n1,J&n1]}else if(J.substr(0,3)==="hsl"){if(K=B=J.match(vK),!Z)q=+K[0]%360/360,Y=+K[1]/100,X=+K[2]/100,W=X<=0.5?X*(Y+1):X+Y-X*Y,Q=X*2-W,K.length>3&&(K[3]*=1),K[0]=wK(q+0.3333333333333333,Q,W),K[1]=wK(q,Q,W),K[2]=wK(q-0.3333333333333333,Q,W);else if(~J.indexOf("="))return K=J.match(nK),$&&K.length<4&&(K[3]=1),K}else K=J.match(vK)||N7.transparent;K=K.map(Number)}if(Z&&!B){if(Q=K[0]/n1,W=K[1]/n1,z=K[2]/n1,H=Math.max(Q,W,z),O=Math.min(Q,W,z),X=(H+O)/2,H===O)q=Y=0;else N=H-O,Y=X>0.5?N/(2-H-O):N/(H+O),q=H===Q?(W-z)/N+(WJ||y<0)&&($+=y-Z),K+=y,b=K-$,C=b-W,C>0||h)x=++H.frame,O=b-H.time*1000,H.time=b=b/1000,W+=C+(C>=Q?4:Q-C),A=1;if(h||(q=Y(R)),A)for(N=0;N=y&&N--},_listeners:z},H}(),vJ=function(){return!C7&&F9.wake()},b1={},KU=/^[\d.\-M][\d.\-,\s]/,QU=/["']/g,GU=function(J){var Z={},$=J.substr(1,J.length-3).split(":"),K=$[0],Q=1,W=$.length,z,q,Y;for(;Q1&&$.config?$.config.apply(null,~J.indexOf("{")?[GU(Z[1])]:WU(J).split(",").map(EG)):b1._CE&&KU.test(J)?b1._CE("",J):$},bG=function(J){return function(Z){return 1-J(1-Z)}},yG=function G(J,Z){var $=J._first,K;while($){if($ instanceof y8)G($,Z);else if($.vars.yoyoEase&&(!$._yoyo||!$._repeat)&&$._yoyo!==Z)if($.timeline)G($.timeline,Z);else K=$._ease,$._ease=$._yEase,$._yEase=K,$._yoyo=Z;$=$._next}},$J=function(J,Z){return!J?Z:(Y8(J)?J:b1[J]||HU(J))||Z},QJ=function(J,Z,$,K){if($===void 0)$=function(q){return 1-Z(1-q)};if(K===void 0)K=function(q){return q<0.5?Z(q*2)/2:1-Z((1-q)*2)/2};var Q={easeIn:Z,easeOut:$,easeInOut:K},W;return e8(J,function(z){b1[z]=M9[z]=Q,b1[W=z.toLowerCase()]=$;for(var q in Q)b1[W+(q==="easeIn"?".in":q==="easeOut"?".out":".inOut")]=b1[z+"."+q]=Q[q]}),Q},vG=function(J){return function(Z){return Z<0.5?(1-J(1-Z*2))/2:0.5+J((Z-0.5)*2)/2}},fK=function G(J,Z,$){var K=Z>=1?Z:1,Q=($||(J?0.3:0.45))/(Z<1?Z:1),W=Q/yK*(Math.asin(1/K)||0),z=function(X){return X===1?1:K*Math.pow(2,-10*X)*bH((X-W)*Q)+1},q=J==="out"?z:J==="in"?function(Y){return 1-z(1-Y)}:vG(z);return Q=yK/Q,q.config=function(Y,X){return G(J,Y,X)},q},xK=function G(J,Z){if(Z===void 0)Z=1.70158;var $=function(W){return W?--W*W*((Z+1)*W+Z)+1:0},K=J==="out"?$:J==="in"?function(Q){return 1-$(1-Q)}:vG($);return K.config=function(Q){return G(J,Q)},K};e8("Linear,Quad,Cubic,Quart,Quint,Strong",function(G,J){var Z=J<5?J+1:J;QJ(G+",Power"+(Z-1),J?function($){return Math.pow($,Z)}:function($){return $},function($){return 1-Math.pow(1-$,Z)},function($){return $<0.5?Math.pow($*2,Z)/2:1-Math.pow((1-$)*2,Z)/2})});b1.Linear.easeNone=b1.none=b1.Linear.easeIn;QJ("Elastic",fK("in"),fK("out"),fK());(function(G,J){var Z=1/J,$=2*Z,K=2.5*Z,Q=function(z){return z0?$+($+this._rDelay)*this._repeat:$):this.totalDuration()&&this._dur},J.totalDuration=function($){if(!arguments.length)return this._tDur;return this._dirty=0,yJ(this,this._repeat<0?$:($-this._repeat*this._rDelay)/(this._repeat+1))},J.totalTime=function($,K){if(vJ(),!arguments.length)return this._tTime;var Q=this._dp;if(Q&&Q.smoothChildTiming&&this._ts){AZ(this,$),!Q._dp||Q.parent||BG(Q,this);while(Q&&Q.parent){if(Q.parent._time!==Q._start+(Q._ts>=0?Q._tTime/Q._ts:(Q.totalDuration()-Q._tTime)/-Q._ts))Q.totalTime(Q._tTime,!0);Q=Q.parent}if(!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&$0||!this._tDur&&!$))e9(this._dp,this,this._start-this._delay)}if(this._tTime!==$||!this._dur&&!K||this._initted&&Math.abs(this._zTime)===r1||!$&&!this._initted&&(this.add||this._ptLookup))this._ts||(this._pTime=$),NG(this,$,K);return this},J.time=function($,K){return arguments.length?this.totalTime(Math.min(this.totalDuration(),$+QG(this))%(this._dur+this._rDelay)||($?this._dur:0),K):this._time},J.totalProgress=function($,K){return arguments.length?this.totalTime(this.totalDuration()*$,K):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},J.progress=function($,K){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-$:$)+QG(this),K):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},J.iteration=function($,K){var Q=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+($-1)*Q,K):this._repeat?bJ(this._tTime,Q)+1:1},J.timeScale=function($,K){if(!arguments.length)return this._rts===-r1?0:this._rts;if(this._rts===$)return this;var Q=this.parent&&this._ts?MZ(this.parent._time,this):this._tTime;return this._rts=+$||0,this._ts=this._ps||$===-r1?0:this._rts,this.totalTime(P7(-Math.abs(this._delay),this.totalDuration(),Q),K!==!1),SZ(this),dH(this)},J.paused=function($){if(!arguments.length)return this._ps;if(this._ps!==$)if(this._ps=$,$)this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0;else vJ(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==r1&&(this._tTime-=r1));return this},J.startTime=function($){if(arguments.length){this._start=$;var K=this.parent||this._dp;return K&&(K._sort||!this.parent)&&e9(K,this,$-this._delay),this}return this._start},J.endTime=function($){return this._start+(X9($)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},J.rawTime=function($){var K=this.parent||this._dp;return!K?this._tTime:$&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):!this._ts?this._tTime:MZ(K.rawTime($),this)},J.revert=function($){if($===void 0)$=gH;var K=v8;if(v8=$,ZQ(this))this.timeline&&this.timeline.revert($),this.totalTime(-0.01,$.suppressEvents);return this.data!=="nested"&&$.kill!==!1&&this.kill(),v8=K,this},J.globalTime=function($){var K=this,Q=arguments.length?$:K.rawTime();while(K)Q=K._start+Q/(Math.abs(K._ts)||1),K=K._dp;return!this.parent&&this._sat?this._sat.globalTime($):Q},J.repeat=function($){if(arguments.length)return this._repeat=$===1/0?-2:$,GG(this);return this._repeat===-2?1/0:this._repeat},J.repeatDelay=function($){if(arguments.length){var K=this._time;return this._rDelay=$,GG(this),K?this.time(K):this}return this._rDelay},J.yoyo=function($){if(arguments.length)return this._yoyo=$,this;return this._yoyo},J.seek=function($,K){return this.totalTime(w9(this,$),X9(K))},J.restart=function($,K){return this.play().totalTime($?-this._delay:0,X9(K)),this._dur||(this._zTime=-r1),this},J.play=function($,K){return $!=null&&this.seek($,K),this.reversed(!1).paused(!1)},J.reverse=function($,K){return $!=null&&this.seek($||this.totalDuration(),K),this.reversed(!0).paused(!1)},J.pause=function($,K){return $!=null&&this.seek($,K),this.paused(!0)},J.resume=function(){return this.paused(!1)},J.reversed=function($){if(arguments.length)return!!$!==this.reversed()&&this.timeScale(-this._rts||($?-r1:0)),this;return this._rts<0},J.invalidate=function(){return this._initted=this._act=0,this._zTime=-r1,this},J.isActive=function(){var $=this.parent||this._dp,K=this._start,Q;return!!(!$||this._ts&&this._initted&&$.isActive()&&(Q=$.rawTime(!0))>=K&&Q1){if(!K)delete W[$];else W[$]=K,Q&&(W[$+"Params"]=Q),$==="onUpdate"&&(this._onUpdate=K);return this}return W[$]},J.then=function($){var K=this;return new Promise(function(Q){var W=Y8($)?$:jG,z=function(){var Y=K.then;K.then=null,Y8(W)&&(W=W(K))&&(W.then||W===K)&&(K.then=Y),Q(W),K.then=Y};if(K._initted&&K.totalProgress()===1&&K._ts>=0||!K._tTime&&K._ts<0)z();else K._prom=z})},J.kill=function(){D7(this)},G}();O9(M7.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-r1,_prom:0,_ps:!1,_rts:1});var y8=function(G){zG(J,G);function J($,K){var Q;if($===void 0)$={};return Q=G.call(this,$)||this,Q.labels={},Q.smoothChildTiming=!!$.smoothChildTiming,Q.autoRemoveChildren=!!$.autoRemoveChildren,Q._sort=X9($.sortChildren),z8&&e9($.parent||z8,O$(Q),K),$.reversed&&Q.reverse(),$.paused&&Q.paused(!0),$.scrollTrigger&&RG(O$(Q),$.scrollTrigger),Q}var Z=J.prototype;return Z.to=function(K,Q,W){return j7(0,arguments,this),this},Z.from=function(K,Q,W){return j7(1,arguments,this),this},Z.fromTo=function(K,Q,W,z){return j7(2,arguments,this),this},Z.set=function(K,Q,W){return Q.duration=0,Q.parent=this,E7(Q).repeatDelay||(Q.repeat=0),Q.immediateRender=!!Q.immediateRender,new C8(K,Q,w9(this,W),1),this},Z.call=function(K,Q,W){return e9(this,C8.delayedCall(0,K,Q),W)},Z.staggerTo=function(K,Q,W,z,q,Y,X){return W.duration=Q,W.stagger=W.stagger||z,W.onComplete=Y,W.onCompleteParams=X,W.parent=this,new C8(K,W,w9(this,q)),this},Z.staggerFrom=function(K,Q,W,z,q,Y,X){return W.runBackwards=1,E7(W).immediateRender=X9(W.immediateRender),this.staggerTo(K,Q,W,z,q,Y,X)},Z.staggerFromTo=function(K,Q,W,z,q,Y,X,H){return z.startAt=W,E7(z).immediateRender=X9(z.immediateRender),this.staggerTo(K,Q,z,q,Y,X,H)},Z.render=function(K,Q,W){var z=this._time,q=this._dirty?this.totalDuration():this._tDur,Y=this._dur,X=K<=0?0:M8(K),H=this._zTime<0!==K<0&&(this._initted||!Y),O,N,B,R,P,y,h,C,A,b,x,k;if(this!==z8&&X>q&&K>=0&&(X=q),X!==this._tTime||W||H){if(z!==this._time&&Y)X+=this._time-z,K+=this._time-z;if(O=X,A=this._start,C=this._ts,y=!C,H)Y||(z=this._zTime),(K||!Q)&&(this._zTime=K);if(this._repeat){if(x=this._yoyo,P=Y+this._rDelay,this._repeat<-1&&K<0)return this.totalTime(P*100+K,Q,W);if(O=M8(X%P),X===q)R=this._repeat,O=Y;else{if(b=M8(X/P),R=~~b,R&&R===b)O=Y,R--;O>Y&&(O=Y)}if(b=bJ(this._tTime,P),!z&&this._tTime&&b!==R&&this._tTime-b*P-this._dur<=0&&(b=R),x&&R&1)O=Y-O,k=1;if(R!==b&&!this._lock){var f=x&&b&1,T=f===(x&&R&1);if(R=z&&K>=0){N=this._first;while(N){if(B=N._next,(N._act||O>=N._start)&&N._ts&&h!==N){if(N.parent!==this)return this.render(K,Q,W);if(N.render(N._ts>0?(O-N._start)*N._ts:(N._dirty?N.totalDuration():N._tDur)+(O-N._start)*N._ts,Q,W),O!==this._time||!this._ts&&!y){h=0,B&&(X+=this._zTime=-r1);break}}N=B}}else{N=this._last;var _=K<0?K:O;while(N){if(B=N._prev,(N._act||_<=N._end)&&N._ts&&h!==N){if(N.parent!==this)return this.render(K,Q,W);if(N.render(N._ts>0?(_-N._start)*N._ts:(N._dirty?N.totalDuration():N._tDur)+(_-N._start)*N._ts,Q,W||v8&&ZQ(N)),O!==this._time||!this._ts&&!y){h=0,B&&(X+=this._zTime=_?-r1:r1);break}}N=B}}if(h&&!Q){if(this.pause(),h.render(O>=z?0:-r1)._zTime=O>=z?1:-1,this._ts)return this._start=A,SZ(this),this.render(K,Q,W)}if(this._onUpdate&&!Q&&C9(this,"onUpdate",!0),X===q&&this._tTime>=this.totalDuration()||!X&&z){if(A===this._start||Math.abs(C)!==Math.abs(this._ts)){if(!this._lock){if((K||!Y)&&(X===q&&this._ts>0||!X&&this._ts<0)&&y$(this,1),!Q&&!(K<0&&!z)&&(X||z||!q))C9(this,X===q&&K>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(X0)&&this._prom()}}}}return this},Z.add=function(K,Q){var W=this;if(N$(Q)||(Q=w9(this,Q,K)),!(K instanceof M7)){if(c8(K))return K.forEach(function(z){return W.add(z,Q)}),this;if(k8(K))return this.addLabel(K,Q);if(Y8(K))K=C8.delayedCall(0,K);else return this}return this!==K?e9(this,K,Q):this},Z.getChildren=function(K,Q,W,z){if(K===void 0)K=!0;if(Q===void 0)Q=!0;if(W===void 0)W=!0;if(z===void 0)z=-f9;var q=[],Y=this._first;while(Y){if(Y._start>=z)if(Y instanceof C8)Q&&q.push(Y);else W&&q.push(Y),K&&q.push.apply(q,Y.getChildren(!0,Q,W));Y=Y._next}return q},Z.getById=function(K){var Q=this.getChildren(1,1,1),W=Q.length;while(W--)if(Q[W].vars.id===K)return Q[W]},Z.remove=function(K){if(k8(K))return this.removeLabel(K);if(Y8(K))return this.killTweensOf(K);if(K.parent===this&&I7(this,K),K===this._recent)this._recent=this._last;return e$(this)},Z.totalTime=function(K,Q){if(!arguments.length)return this._tTime;if(this._forcing=1,!this._dp&&this._ts)this._start=M8(F9.time-(this._ts>0?K/this._ts:(this.totalDuration()-K)/-this._ts));return G.prototype.totalTime.call(this,K,Q),this._forcing=0,this},Z.addLabel=function(K,Q){return this.labels[K]=w9(this,Q),this},Z.removeLabel=function(K){return delete this.labels[K],this},Z.addPause=function(K,Q,W){var z=C8.delayedCall(0,Q||R7,W);return z.data="isPause",this._hasPause=1,e9(this,z,w9(this,K))},Z.removePause=function(K){var Q=this._first;K=w9(this,K);while(Q){if(Q._start===K&&Q.data==="isPause")y$(Q);Q=Q._next}},Z.killTweensOf=function(K,Q,W){var z=this.getTweensOf(K,W),q=z.length;while(q--)x$!==z[q]&&z[q].kill(K,Q);return this},Z.getTweensOf=function(K,Q){var W=[],z=x9(K),q=this._first,Y=N$(Q),X;while(q){if(q instanceof C8){if(_H(q._targets,z)&&(Y?(!x$||q._initted&&q._ts)&&q.globalTime(0)<=Q&&q.globalTime(q.totalDuration())>Q:!Q||q.isActive()))W.push(q)}else if((X=q.getTweensOf(z,Q)).length)W.push.apply(W,X);q=q._next}return W},Z.tweenTo=function(K,Q){Q=Q||{};var W=this,z=w9(W,K),q=Q,Y=q.startAt,X=q.onStart,H=q.onStartParams,O=q.immediateRender,N,B=C8.to(W,O9({ease:Q.ease||"none",lazy:!1,immediateRender:!1,time:z,overwrite:"auto",duration:Q.duration||Math.abs((z-(Y&&"time"in Y?Y.time:W._time))/W.timeScale())||r1,onStart:function(){if(W.pause(),!N){var P=Q.duration||Math.abs((z-(Y&&"time"in Y?Y.time:W._time))/W.timeScale());B._dur!==P&&yJ(B,P,0,1).render(B._time,!0,!0),N=1}X&&X.apply(B,H||[])}},Q));return O?B.render(0):B},Z.tweenFromTo=function(K,Q,W){return this.tweenTo(Q,O9({startAt:{time:w9(this,K)}},W))},Z.recent=function(){return this._recent},Z.nextLabel=function(K){if(K===void 0)K=this._time;return WG(this,w9(this,K))},Z.previousLabel=function(K){if(K===void 0)K=this._time;return WG(this,w9(this,K),1)},Z.currentLabel=function(K){return arguments.length?this.seek(K,!0):this.previousLabel(this._time+r1)},Z.shiftChildren=function(K,Q,W){if(W===void 0)W=0;var z=this._first,q=this.labels,Y;while(z){if(z._start>=W)z._start+=K,z._end+=K;z=z._next}if(Q){for(Y in q)if(q[Y]>=W)q[Y]+=K}return e$(this)},Z.invalidate=function(K){var Q=this._first;this._lock=0;while(Q)Q.invalidate(K),Q=Q._next;return G.prototype.invalidate.call(this,K)},Z.clear=function(K){if(K===void 0)K=!0;var Q=this._first,W;while(Q)W=Q._next,this.remove(Q),Q=W;return this._dp&&(this._time=this._tTime=this._pTime=0),K&&(this.labels={}),e$(this)},Z.totalDuration=function(K){var Q=0,W=this,z=W._last,q=f9,Y,X,H;if(arguments.length)return W.timeScale((W._repeat<0?W.duration():W.totalDuration())/(W.reversed()?-K:K));if(W._dirty){H=W.parent;while(z){if(Y=z._prev,z._dirty&&z.totalDuration(),X=z._start,X>q&&W._sort&&z._ts&&!W._lock)W._lock=1,e9(W,z,X-z._delay,1)._lock=0;else q=X;if(X<0&&z._ts){if(Q-=X,!H&&!W._dp||H&&H.smoothChildTiming)W._start+=X/W._ts,W._time-=X,W._tTime-=X;W.shiftChildren(-X,!1,-1/0),q=0}z._end>Q&&z._ts&&(Q=z._end),z=Y}yJ(W,W===z8&&W._time>Q?W._time:Q,1,1),W._dirty=0}return W._tDur},J.updateRoot=function(K){if(z8._ts)NG(z8,MZ(K,z8)),DG=F9.frame;if(F9.frame>=ZG){ZG+=Y9.autoSleep||120;var Q=z8._first;if(!Q||!Q._ts){if(Y9.autoSleep&&F9._listeners.length<2){while(Q&&!Q._ts)Q=Q._next;Q||F9.sleep()}}}},J}(M7);O9(y8.prototype,{_lock:0,_hasPause:0,_forcing:0});var UU=function(J,Z,$,K,Q,W,z){var q=new $9(this._pt,J,Z,0,1,zQ,null,Q),Y=0,X=0,H,O,N,B,R,P,y,h;if(q.b=$,q.e=K,$+="",K+="",y=~K.indexOf("random("))K=gJ(K);if(W)h=[$,K],W(h,J,Z),$=h[0],K=h[1];O=$.match(AK)||[];while(H=AK.exec(K)){if(B=H[0],R=K.substring(Y,H.index),N)N=(N+1)%5;else if(R.substr(-5)==="rgba(")N=1;if(B!==O[X++])P=parseFloat(O[X-1])||0,q._pt={_next:q._pt,p:R||X===1?R:",",s:P,c:B.charAt(1)==="="?KJ(P,B)-P:parseFloat(B)-P,m:N&&N<4?Math.round:0},Y=AK.lastIndex}if(q.c=Y")}),A.duration();else{x={};for(f in B)f==="ease"||f==="easeEach"||FU(f,B[f],x,B.easeEach);for(f in x){t=x[f].sort(function(U0,H0){return U0.t-H0.t}),s=0;for(b=0;bq-r1&&!X?q:KY)O=Y;if(y=this._yoyo&&B&1,y)A=this._yEase,O=Y-O;if(P=bJ(this._tTime,R),O===z&&!W&&this._initted&&B===P)return this._tTime=H,this;if(B!==P){if(C&&this._yEase&&yG(C,y),this.vars.repeatRefresh&&!y&&!this._lock&&O!==R&&this._initted)this._lock=W=1,this.render(M8(R*B),!0).invalidate()._lock=0}}if(!this._initted){if(CG(this,X?K:O,W,Q,H))return this._tTime=0,this;if(z!==this._time&&!(W&&this.vars.repeatRefresh&&B!==P))return this;if(Y!==this._dur)return this.render(K,Q,W)}if(this._tTime=H,this._time=O,!this._act&&this._ts)this._act=1,this._lazy=0;if(this.ratio=h=(A||this._ease)(O/Y),this._from)this.ratio=h=1-h;if(!z&&H&&!Q&&!P){if(C9(this,"onStart"),this._tTime!==H)return this}N=this._pt;while(N)N.r(h,N.d),N=N._next;if(C&&C.render(K<0?K:C._dur*C._ease(O/this._dur),Q,W)||this._startAt&&(this._zTime=K),this._onUpdate&&!Q)X&&uK(this,K,Q,W),C9(this,"onUpdate");if(this._repeat&&B!==P&&this.vars.onRepeat&&!Q&&this.parent&&C9(this,"onRepeat"),(H===this._tDur||!H)&&this._tTime===H){if(X&&!this._onUpdate&&uK(this,K,!0,!0),(K||!Y)&&(H===this._tDur&&this._ts>0||!H&&this._ts<0)&&y$(this,1),!Q&&!(X&&!z)&&(H||z||y))C9(this,H===q?"onComplete":"onReverseComplete",!0),this._prom&&!(H0)&&this._prom()}}return this},Z.targets=function(){return this._targets},Z.invalidate=function(K){return(!K||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(K),G.prototype.invalidate.call(this,K)},Z.resetTo=function(K,Q,W,z,q){C7||F9.wake(),this._ts||this.play();var Y=Math.min(this._dur,(this._dp._time-this._start)*this._ts),X;if(this._initted||HQ(this,Y),X=this._ease(Y/this._dur),qU(this,K,Q,W,z,X,Y,q))return this.resetTo(K,Q,W,z,1);return AZ(this,0),this.parent||VG(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0)},Z.kill=function(K,Q){if(Q===void 0)Q="all";if(!K&&(!Q||Q==="all"))return this._lazy=this._pt=0,this.parent?D7(this):this.scrollTrigger&&this.scrollTrigger.kill(!!v8),this;if(this.timeline){var W=this.timeline.totalDuration();return this.timeline.killTweensOf(K,Q,x$&&x$.vars.overwrite!==!0)._first||D7(this),this.parent&&W!==this.timeline.totalDuration()&&yJ(this,this._dur*this.timeline._tDur/W,0,1),this}var z=this._targets,q=K?x9(K):z,Y=this._ptLookup,X=this._pt,H,O,N,B,R,P,y;if((!Q||Q==="all")&&mH(z,q))return Q==="all"&&(this._pt=0),D7(this);if(H=this._op=this._op||[],Q!=="all"){if(k8(Q))R={},e8(Q,function(h){return R[h]=1}),Q=R;Q=LU(z,Q)}y=z.length;while(y--)if(~q.indexOf(z[y])){if(O=Y[y],Q==="all")H[y]=Q,B=O,N={};else N=H[y]=H[y]||{},B=Q;for(R in B){if(P=O&&O[R],P){if(!("kill"in P.d)||P.d.kill(R)===!0)I7(this,P,"_pt");delete O[R]}if(N!=="all")N[R]=1}}return this._initted&&!this._pt&&X&&D7(this),this},J.to=function(K,Q){return new J(K,Q,arguments[2])},J.from=function(K,Q){return j7(1,arguments)},J.delayedCall=function(K,Q,W,z){return new J(Q,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:K,onComplete:Q,onReverseComplete:Q,onCompleteParams:W,onReverseCompleteParams:W,callbackScope:z})},J.fromTo=function(K,Q,W){return j7(2,arguments)},J.set=function(K,Q){return Q.duration=0,Q.repeatDelay||(Q.repeat=0),new J(K,Q)},J.killTweensOf=function(K,Q,W){return z8.killTweensOf(K,Q,W)},J}(M7);O9(C8.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});e8("staggerTo,staggerFrom,staggerFromTo",function(G){C8[G]=function(){var J=new y8,Z=dK.call(arguments,0);return Z.splice(G==="staggerFromTo"?5:4,0,0),J[G].apply(J,Z)}});var UQ=function(J,Z,$){return J[Z]=$},uG=function(J,Z,$){return J[Z]($)},XU=function(J,Z,$,K){return J[Z](K.fp,$)},YU=function(J,Z,$){return J.setAttribute(Z,$)},TZ=function(J,Z){return Y8(J[Z])?uG:PZ(J[Z])&&J.setAttribute?YU:UQ},mG=function(J,Z){return Z.set(Z.t,Z.p,Math.round((Z.s+Z.c*J)*1e6)/1e6,Z)},OU=function(J,Z){return Z.set(Z.t,Z.p,!!(Z.s+Z.c*J),Z)},zQ=function(J,Z){var $=Z._pt,K="";if(!J&&Z.b)K=Z.b;else if(J===1&&Z.e)K=Z.e;else{while($)K=$.p+($.m?$.m($.s+$.c*J):Math.round(($.s+$.c*J)*1e4)/1e4)+K,$=$._next;K+=Z.c}Z.set(Z.t,Z.p,K,Z)},qQ=function(J,Z){var $=Z._pt;while($)$.r(J,$.d),$=$._next},DU=function(J,Z,$,K){var Q=this._pt,W;while(Q)W=Q._next,Q.p===K&&Q.modifier(J,Z,$),Q=W},NU=function(J){var Z=this._pt,$,K;while(Z){if(K=Z._next,Z.p===J&&!Z.op||Z.op===J)I7(this,Z,"_pt");else if(!Z.dep)$=1;Z=K}return!$},EU=function(J,Z,$,K){K.mSet(J,Z,K.m.call(K.tween,$,K.mt),K)},LQ=function(J){var Z=J._pt,$,K,Q,W;while(Z){$=Z._next,K=Q;while(K&&K.pr>Z.pr)K=K._next;if(Z._prev=K?K._prev:W)Z._prev._next=Z;else Q=Z;if(Z._next=K)K._prev=Z;else W=Z;Z=$}J._pt=Q},$9=function(){function G(Z,$,K,Q,W,z,q,Y,X){if(this.t=$,this.s=Q,this.c=W,this.p=K,this.r=z||mG,this.d=q||this,this.set=Y||UQ,this.pr=X||0,this._next=Z,Z)Z._prev=this}var J=G.prototype;return J.modifier=function($,K,Q){this.mSet=this.mSet||this.set,this.set=EU,this.m=$,this.mt=Q,this.tween=K},G}();e8(eK+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(G){return tK[G]=1});M9.TweenMax=M9.TweenLite=C8;M9.TimelineLite=M9.TimelineMax=y8;z8=new y8({sortChildren:!1,defaults:xJ,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Y9.stringFilter=KQ;var JJ=[],VZ={},jU=[],UG=0,VU=0,hK=function(J){return(VZ[J]||jU).map(function(Z){return Z()})},sK=function(){var J=Date.now(),Z=[];if(J-UG>2)hK("matchMediaInit"),JJ.forEach(function($){var{queries:K,conditions:Q}=$,W,z,q,Y;for(z in K)if(W=t9.matchMedia(K[z]).matches,W&&(q=1),W!==Q[z])Q[z]=W,Y=1;if(Y)$.revert(),q&&Z.push($)}),hK("matchMediaRevert"),Z.forEach(function($){return $.onMatch($,function(K){return $.add(null,K)})}),UG=J,hK("matchMedia")},dG=function(){function G(Z,$){this.selector=$&&cK($),this.data=[],this._r=[],this.isReverted=!1,this.id=VU++,Z&&this.add(Z)}var J=G.prototype;return J.add=function($,K,Q){if(Y8($))Q=K,K=$,$=Y8;var W=this,z=function(){var Y=Q8,X=W.selector,H;return Y&&Y!==W&&Y.data.push(W),Q&&(W.selector=cK(Q)),Q8=W,H=K.apply(W,arguments),Y8(H)&&W._r.push(H),Q8=Y,W.selector=X,W.isReverted=!1,H};return W.last=z,$===Y8?z(W,function(q){return W.add(null,q)}):$?W[$]=z:z},J.ignore=function($){var K=Q8;Q8=null,$(this),Q8=K},J.getTweens=function(){var $=[];return this.data.forEach(function(K){return K instanceof G?$.push.apply($,K.getTweens()):K instanceof C8&&!(K.parent&&K.parent.data==="nested")&&$.push(K)}),$},J.clear=function(){this._r.length=this.data.length=0},J.kill=function($,K){var Q=this;if($)(function(){var z=Q.getTweens(),q=Q.data.length,Y;while(q--)if(Y=Q.data[q],Y.data==="isFlip")Y.revert(),Y.getChildren(!0,!0,!1).forEach(function(X){return z.splice(z.indexOf(X),1)});z.map(function(X){return{g:X._dur||X._delay||X._sat&&!X._sat.vars.immediateRender?X.globalTime(0):-1/0,t:X}}).sort(function(X,H){return H.g-X.g||-1/0}).forEach(function(X){return X.t.revert($)}),q=Q.data.length;while(q--)if(Y=Q.data[q],Y instanceof y8){if(Y.data!=="nested")Y.scrollTrigger&&Y.scrollTrigger.revert(),Y.kill()}else!(Y instanceof C8)&&Y.revert&&Y.revert($);Q._r.forEach(function(X){return X($,Q)}),Q.isReverted=!0})();else this.data.forEach(function(z){return z.kill&&z.kill()});if(this.clear(),K){var W=JJ.length;while(W--)JJ[W].id===this.id&&JJ.splice(W,1)}},J.revert=function($){this.kill($||{})},G}(),BU=function(){function G(Z){this.contexts=[],this.scope=Z,Q8&&Q8.data.push(this)}var J=G.prototype;return J.add=function($,K,Q){$$($)||($={matches:$});var W=new dG(0,Q||this.scope),z=W.conditions={},q,Y,X;Q8&&!W.selector&&(W.selector=Q8.selector),this.contexts.push(W),K=W.add("onMatch",K),W.queries=$;for(Y in $)if(Y==="all")X=1;else if(q=t9.matchMedia($[Y]),q)JJ.indexOf(W)<0&&JJ.push(W),(z[Y]=q.matches)&&(X=1),q.addListener?q.addListener(sK):q.addEventListener("change",sK);return X&&K(W,function(H){return W.add(null,H)}),this},J.revert=function($){this.kill($||{})},J.kill=function($){this.contexts.forEach(function(K){return K.kill($,!0)})},G}(),IZ={registerPlugin:function(){for(var J=arguments.length,Z=Array(J),$=0;$1){var K=J.map(function(X){return p8.quickSetter(X,Z,$)}),Q=K.length;return function(X){var H=Q;while(H--)K[H](X)}}J=J[0]||{};var W=L9[Z],z=b$(J),q=z.harness&&(z.harness.aliases||{})[Z]||Z,Y=W?function(X){var H=new W;fJ._pt=0,H.init(J,$?X+$:X,fJ,0,[J]),H.render(1,H),fJ._pt&&qQ(1,fJ)}:z.set(J,q);return W?Y:function(X){return Y(J,q,$?X+$:X,z,1)}},quickTo:function(J,Z,$){var K,Q=p8.to(J,O9((K={},K[Z]="+=0.1",K.paused=!0,K.stagger=0,K),$||{})),W=function(q,Y,X){return Q.resetTo(Z,q,Y,X)};return W.tween=Q,W},isTweening:function(J){return z8.getTweensOf(J,!0).length>0},defaults:function(J){return J&&J.ease&&(J.ease=$J(J.ease,xJ.ease)),KG(xJ,J||{})},config:function(J){return KG(Y9,J||{})},registerEffect:function(J){var{name:Z,effect:$,plugins:K,defaults:Q,extendTimeline:W}=J;if((K||"").split(",").forEach(function(z){return z&&!L9[z]&&!M9[z]&&B7(Z+" effect requires "+z+" plugin.")}),TK[Z]=function(z,q,Y){return $(x9(z),O9(q||{},Q),Y)},W)y8.prototype[Z]=function(z,q,Y){return this.add(TK[Z](z,$$(q)?q:(Y=q)&&{},this),Y)}},registerEase:function(J,Z){b1[J]=$J(Z)},parseEase:function(J,Z){return arguments.length?$J(J,Z):b1},getById:function(J){return z8.getById(J)},exportRoot:function(J,Z){if(J===void 0)J={};var $=new y8(J),K,Q;$.smoothChildTiming=X9(J.smoothChildTiming),z8.remove($),$._dp=0,$._time=$._tTime=z8._time,K=z8._first;while(K){if(Q=K._next,Z||!(!K._dur&&K instanceof C8&&K.vars.onComplete===K._targets[0]))e9($,K,K._start-K._delay);K=Q}return e9(z8,$,0),$},context:function(J,Z){return J?new dG(J,Z):Q8},matchMedia:function(J){return new BU(J)},matchMediaRefresh:function(){return JJ.forEach(function(J){var Z=J.conditions,$,K;for(K in Z)if(Z[K])Z[K]=!1,$=1;$&&J.revert()})||sK()},addEventListener:function(J,Z){var $=VZ[J]||(VZ[J]=[]);~$.indexOf(Z)||$.push(Z)},removeEventListener:function(J,Z){var $=VZ[J],K=$&&$.indexOf(Z);K>=0&&$.splice(K,1)},utils:{wrap:eH,wrapYoyo:$U,distribute:PG,random:SG,snap:kG,normalize:tH,getUnit:g8,clamp:iH,splitColor:xG,toArray:x9,selector:cK,mapRange:TG,pipe:rH,unitize:aH,interpolate:JU,shuffle:IG},install:YG,effects:TK,ticker:F9,updateRoot:y8.updateRoot,plugins:L9,globalTimeline:z8,core:{PropTween:$9,globals:OG,Tween:C8,Timeline:y8,Animation:M7,getCache:b$,_removeLinkedListItem:I7,reverting:function(){return v8},context:function(J){if(J&&Q8)Q8.data.push(J),J._ctx=Q8;return Q8},suppressOverwrites:function(J){return oK=J}}};e8("to,from,fromTo,delayedCall,set,killTweensOf",function(G){return IZ[G]=C8[G]});F9.add(y8.updateRoot);fJ=IZ.to({},{duration:0});var RU=function(J,Z){var $=J._pt;while($&&$.p!==Z&&$.op!==Z&&$.fp!==Z)$=$._next;return $},CU=function(J,Z){var $=J._targets,K,Q,W;for(K in Z){Q=$.length;while(Q--)if(W=J._ptLookup[Q][K],W&&(W=W.d)){if(W._pt)W=RU(W,K);W&&W.modifier&&W.modifier(Z[K],J,$[Q],K)}}},bK=function(J,Z){return{name:J,headless:1,rawVars:1,init:function(K,Q,W){W._onInit=function(z){var q,Y;if(k8(Q))q={},e8(Q,function(X){return q[X]=1}),Q=q;if(Z){q={};for(Y in Q)q[Y]=Z(Q[Y]);Q=q}CU(z,Q)}}}},p8=IZ.registerPlugin({name:"attr",init:function(J,Z,$,K,Q){var W,z,q;this.tween=$;for(W in Z)q=J.getAttribute(W)||"",z=this.add(J,"setAttribute",(q||0)+"",Z[W],K,Q,0,0,W),z.op=W,z.b=q,this._props.push(W)},render:function(J,Z){var $=Z._pt;while($)v8?$.set($.t,$.p,$.b,$):$.r(J,$.d),$=$._next}},{name:"endArray",headless:1,init:function(J,Z){var $=Z.length;while($--)this.add(J,$,J[$]||0,Z[$],0,0,0,0,0,1)}},bK("roundProps",pK),bK("modifiers"),bK("snap",kG))||IZ;C8.version=y8.version=p8.version="3.13.0";XG=1;iK()&&vJ();var{Power0:MU,Power1:IU,Power2:PU,Power3:kU,Power4:SU,Linear:AU,Quad:TU,Cubic:wU,Quart:fU,Quint:xU,Strong:hU,Elastic:bU,Back:yU,SteppedEase:vU,Bounce:gU,Sine:_U,Expo:uU,Circ:mU}=b1;/*! * CSSPlugin 3.13.0 * https://gsap.com * * Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var cG,g$,uJ,NQ,UJ,dU,pG,EQ,cU=function(){return typeof window<"u"},j$={},HJ=180/Math.PI,mJ=Math.PI/180,_J=Math.atan2,lG=1e8,jQ=/([A-Z])/g,pU=/(left|right|width|margin|padding|x)/i,lU=/[\s,\(]\S/,J$={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},XQ=function(J,Z){return Z.set(Z.t,Z.p,Math.round((Z.s+Z.c*J)*1e4)/1e4+Z.u,Z)},sU=function(J,Z){return Z.set(Z.t,Z.p,J===1?Z.e:Math.round((Z.s+Z.c*J)*1e4)/1e4+Z.u,Z)},oU=function(J,Z){return Z.set(Z.t,Z.p,J?Math.round((Z.s+Z.c*J)*1e4)/1e4+Z.u:Z.b,Z)},iU=function(J,Z){var $=Z.s+Z.c*J;Z.set(Z.t,Z.p,~~($+($<0?-0.5:0.5))+Z.u,Z)},eG=function(J,Z){return Z.set(Z.t,Z.p,J?Z.e:Z.b,Z)},$5=function(J,Z){return Z.set(Z.t,Z.p,J!==1?Z.b:Z.e,Z)},nU=function(J,Z,$){return J.style[Z]=$},rU=function(J,Z,$){return J.style.setProperty(Z,$)},aU=function(J,Z,$){return J._gsap[Z]=$},tU=function(J,Z,$){return J._gsap.scaleX=J._gsap.scaleY=$},eU=function(J,Z,$,K,Q){var W=J._gsap;W.scaleX=W.scaleY=$,W.renderTransform(Q,W)},$4=function(J,Z,$,K,Q){var W=J._gsap;W[Z]=$,W.renderTransform(Q,W)},q8="transform",D9=q8+"Origin",J4=function G(J,Z){var $=this,K=this.target,Q=K.style,W=K._gsap;if(J in j$&&Q){if(this.tfm=this.tfm||{},J!=="transform")J=J$[J]||J,~J.indexOf(",")?J.split(",").forEach(function(z){return $.tfm[z]=E$(K,z)}):this.tfm[J]=W.x?W[J]:E$(K,J),J===D9&&(this.tfm.zOrigin=W.zOrigin);else return J$.transform.split(",").forEach(function(z){return G.call($,z,Z)});if(this.props.indexOf(q8)>=0)return;if(W.svg)this.svgo=K.getAttribute("data-svg-origin"),this.props.push(D9,Z,"");J=q8}(Q||Z)&&this.props.push(J,Z,Q[J])},J5=function(J){if(J.translate)J.removeProperty("translate"),J.removeProperty("scale"),J.removeProperty("rotate")},Z4=function(){var J=this.props,Z=this.target,$=Z.style,K=Z._gsap,Q,W;for(Q=0;Q=0?sG[W]:"")+J},OQ=function(){if(cU()&&window.document)cG=window,g$=cG.document,uJ=g$.documentElement,UJ=YQ("div")||{style:{}},dU=YQ("div"),q8=dJ(q8),D9=q8+"Origin",UJ.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",K5=!!dJ("perspective"),EQ=p8.core.reverting,NQ=1},oG=function(J){var Z=J.ownerSVGElement,$=YQ("svg",Z&&Z.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),K=J.cloneNode(!0),Q;K.style.display="block",$.appendChild(K),uJ.appendChild($);try{Q=K.getBBox()}catch(W){}return $.removeChild(K),uJ.removeChild($),Q},iG=function(J,Z){var $=Z.length;while($--)if(J.hasAttribute(Z[$]))return J.getAttribute(Z[$])},Q5=function(J){var Z,$;try{Z=J.getBBox()}catch(K){Z=oG(J),$=1}return Z&&(Z.width||Z.height)||$||(Z=oG(J)),Z&&!Z.width&&!Z.x&&!Z.y?{x:+iG(J,["x","cx","x1"])||0,y:+iG(J,["y","cy","y1"])||0,width:0,height:0}:Z},G5=function(J){return!!(J.getCTM&&(!J.parentNode||J.ownerSVGElement)&&Q5(J))},zJ=function(J,Z){if(Z){var $=J.style,K;if(Z in j$&&Z!==D9)Z=q8;if($.removeProperty){if(K=Z.substr(0,2),K==="ms"||Z.substr(0,6)==="webkit")Z="-"+Z;$.removeProperty(K==="--"?Z:Z.replace(jQ,"-$1").toLowerCase())}else $.removeAttribute(Z)}},_$=function(J,Z,$,K,Q,W){var z=new $9(J._pt,Z,$,0,1,W?$5:eG);return J._pt=z,z.b=K,z.e=Q,J._props.push($),z},nG={deg:1,rad:1,turn:1},K4={grid:1,flex:1},u$=function G(J,Z,$,K){var Q=parseFloat($)||0,W=($+"").trim().substr((Q+"").length)||"px",z=UJ.style,q=pU.test(Z),Y=J.tagName.toLowerCase()==="svg",X=(Y?"client":"offset")+(q?"Width":"Height"),H=100,O=K==="px",N=K==="%",B,R,P,y;if(K===W||!Q||nG[K]||nG[W])return Q;if(W!=="px"&&!O&&(Q=G(J,Z,$,"px")),y=J.getCTM&&G5(J),(N||W==="%")&&(j$[Z]||~Z.indexOf("adius")))return B=y?J.getBBox()[q?"width":"height"]:J[X],O8(N?Q/B*H:Q/100*B);if(z[q?"width":"height"]=H+(O?W:K),R=K!=="rem"&&~Z.indexOf("adius")||K==="em"&&J.appendChild&&!Y?J:J.parentNode,y)R=(J.ownerSVGElement||{}).parentNode;if(!R||R===g$||!R.appendChild)R=g$.body;if(P=R._gsap,P&&N&&P.width&&q&&P.time===F9.time&&!P.uncache)return O8(Q/P.width*H);else{if(N&&(Z==="height"||Z==="width")){var h=J.style[Z];J.style[Z]=H+K,B=J[X],h?J.style[Z]=h:zJ(J,Z)}else(N||W==="%")&&!K4[h9(R,"display")]&&(z.position=h9(J,"position")),R===J&&(z.position="static"),R.appendChild(UJ),B=UJ[X],R.removeChild(UJ),z.position="absolute";if(q&&N)P=b$(R),P.time=F9.time,P.width=R[X]}return O8(O?B*Q/H:B&&Q?H/B*Q:0)},E$=function(J,Z,$,K){var Q;if(NQ||OQ(),Z in J$&&Z!=="transform"){if(Z=J$[Z],~Z.indexOf(","))Z=Z.split(",")[0]}if(j$[Z]&&Z!=="transform")Q=A7(J,K),Q=Z!=="transformOrigin"?Q[Z]:Q.svg?Q.origin:fZ(h9(J,D9))+" "+Q.zOrigin+"px";else if(Q=J.style[Z],!Q||Q==="auto"||K||~(Q+"").indexOf("calc("))Q=wZ[Z]&&wZ[Z](J,Z,$)||h9(J,Z)||JQ(J,Z)||(Z==="opacity"?1:0);return $&&!~(Q+"").trim().indexOf(" ")?u$(J,Z,Q,$)+$:Q},Q4=function(J,Z,$,K){if(!$||$==="none"){var Q=dJ(Z,J,1),W=Q&&h9(J,Q,1);if(W&&W!==$)Z=Q,$=W;else if(Z==="borderColor")$=h9(J,"borderTopColor")}var z=new $9(this._pt,J.style,Z,0,1,zQ),q=0,Y=0,X,H,O,N,B,R,P,y,h,C,A,b;if(z.b=$,z.e=K,$+="",K+="",K.substring(0,6)==="var(--")K=h9(J,K.substring(4,K.indexOf(")")));if(K==="auto")R=J.style[Z],J.style[Z]=K,K=h9(J,Z)||K,R?J.style[Z]=R:zJ(J,Z);if(X=[$,K],KQ(X),$=X[0],K=X[1],O=$.match(ZJ)||[],b=K.match(ZJ)||[],b.length){while(H=ZJ.exec(K)){if(P=H[0],h=K.substring(q,H.index),B)B=(B+1)%5;else if(h.substr(-5)==="rgba("||h.substr(-5)==="hsla(")B=1;if(P!==(R=O[Y++]||"")){if(N=parseFloat(R)||0,A=R.substr((N+"").length),P.charAt(1)==="="&&(P=KJ(N,P)+A),y=parseFloat(P),C=P.substr((y+"").length),q=ZJ.lastIndex-C.length,!C){if(C=C||Y9.units[Z]||A,q===K.length)K+=C,z.e+=C}if(A!==C)N=u$(J,Z,R,C)||0;z._pt={_next:z._pt,p:h||Y===1?h:",",s:N,c:y-N,m:B&&B<4||Z==="zIndex"?Math.round:0}}}z.c=q-1){if(z=Q[Y],j$[z])q=1,z=z==="transformOrigin"?D9:q8;zJ($,z)}}if(q){if(zJ($,q8),W)W.svg&&$.removeAttribute("transform"),K.scale=K.rotate=K.translate="none",A7($,1),W.uncache=1,J5(K)}}},wZ={clearProps:function(J,Z,$,K,Q){if(Q.data!=="isFromStart"){var W=J._pt=new $9(J._pt,Z,$,0,0,W4);return W.u=K,W.pr=-10,W.tween=Q,J._props.push($),1}}},S7=[1,0,0,1,0,0],W5={},H5=function(J){return J==="matrix(1, 0, 0, 1, 0, 0)"||J==="none"||!J},aG=function(J){var Z=h9(J,q8);return H5(Z)?S7:Z.substr(7).match(nK).map(O8)},VQ=function(J,Z){var $=J._gsap||b$(J),K=J.style,Q=aG(J),W,z,q,Y;if($.svg&&J.getAttribute("transform"))return q=J.transform.baseVal.consolidate().matrix,Q=[q.a,q.b,q.c,q.d,q.e,q.f],Q.join(",")==="1,0,0,1,0,0"?S7:Q;else if(Q===S7&&!J.offsetParent&&J!==uJ&&!$.svg){if(q=K.display,K.display="block",W=J.parentNode,!W||!J.offsetParent&&!J.getBoundingClientRect().width)Y=1,z=J.nextElementSibling,uJ.appendChild(J);if(Q=aG(J),q?K.display=q:zJ(J,"display"),Y)z?W.insertBefore(J,z):W?W.appendChild(J):uJ.removeChild(J)}return Z&&Q.length>6?[Q[0],Q[1],Q[4],Q[5],Q[12],Q[13]]:Q},DQ=function(J,Z,$,K,Q,W){var z=J._gsap,q=Q||VQ(J,!0),Y=z.xOrigin||0,X=z.yOrigin||0,H=z.xOffset||0,O=z.yOffset||0,N=q[0],B=q[1],R=q[2],P=q[3],y=q[4],h=q[5],C=Z.split(" "),A=parseFloat(C[0])||0,b=parseFloat(C[1])||0,x,k,f,T;if(!$)x=Q5(J),A=x.x+(~C[0].indexOf("%")?A/100*x.width:A),b=x.y+(~(C[1]||C[0]).indexOf("%")?b/100*x.height:b);else if(q!==S7&&(k=N*P-B*R))f=A*(P/k)+b*(-R/k)+(R*h-P*y)/k,T=A*(-B/k)+b*(N/k)-(N*h-B*y)/k,A=f,b=T;if(K||K!==!1&&z.smooth)y=A-Y,h=b-X,z.xOffset=H+(y*N+h*R)-y,z.yOffset=O+(y*B+h*P)-h;else z.xOffset=z.yOffset=0;if(z.xOrigin=A,z.yOrigin=b,z.smooth=!!K,z.origin=Z,z.originIsAbsolute=!!$,J.style[D9]="0px 0px",W)_$(W,z,"xOrigin",Y,A),_$(W,z,"yOrigin",X,b),_$(W,z,"xOffset",H,z.xOffset),_$(W,z,"yOffset",O,z.yOffset);J.setAttribute("data-svg-origin",A+" "+b)},A7=function(J,Z){var $=J._gsap||new QQ(J);if("x"in $&&!Z&&!$.uncache)return $;var K=J.style,Q=$.scaleX<0,W="px",z="deg",q=getComputedStyle(J),Y=h9(J,D9)||"0",X,H,O,N,B,R,P,y,h,C,A,b,x,k,f,T,_,d,s,t,e,Z0,U0,H0,C0,B0,l,E0,h0,P0,M0,i0;if(X=H=O=R=P=y=h=C=A=0,N=B=1,$.svg=!!(J.getCTM&&G5(J)),q.translate){if(q.translate!=="none"||q.scale!=="none"||q.rotate!=="none")K[q8]=(q.translate!=="none"?"translate3d("+(q.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(q.rotate!=="none"?"rotate("+q.rotate+") ":"")+(q.scale!=="none"?"scale("+q.scale.split(" ").join(",")+") ":"")+(q[q8]!=="none"?q[q8]:"");K.scale=K.rotate=K.translate="none"}if(k=VQ(J,$.svg),$.svg){if($.uncache)C0=J.getBBox(),Y=$.xOrigin-C0.x+"px "+($.yOrigin-C0.y)+"px",H0="";else H0=!Z&&J.getAttribute("data-svg-origin");DQ(J,H0||Y,!!H0||$.originIsAbsolute,$.smooth!==!1,k)}if(b=$.xOrigin||0,x=$.yOrigin||0,k!==S7){if(d=k[0],s=k[1],t=k[2],e=k[3],X=Z0=k[4],H=U0=k[5],k.length===6){if(N=Math.sqrt(d*d+s*s),B=Math.sqrt(e*e+t*t),R=d||s?_J(s,d)*HJ:0,h=t||e?_J(t,e)*HJ+R:0,h&&(B*=Math.abs(Math.cos(h*mJ))),$.svg)X-=b-(b*d+x*t),H-=x-(b*s+x*e)}else{if(i0=k[6],P0=k[7],l=k[8],E0=k[9],h0=k[10],M0=k[11],X=k[12],H=k[13],O=k[14],f=_J(i0,h0),P=f*HJ,f)T=Math.cos(-f),_=Math.sin(-f),H0=Z0*T+l*_,C0=U0*T+E0*_,B0=i0*T+h0*_,l=Z0*-_+l*T,E0=U0*-_+E0*T,h0=i0*-_+h0*T,M0=P0*-_+M0*T,Z0=H0,U0=C0,i0=B0;if(f=_J(-t,h0),y=f*HJ,f)T=Math.cos(-f),_=Math.sin(-f),H0=d*T-l*_,C0=s*T-E0*_,B0=t*T-h0*_,M0=e*_+M0*T,d=H0,s=C0,t=B0;if(f=_J(s,d),R=f*HJ,f)T=Math.cos(f),_=Math.sin(f),H0=d*T+s*_,C0=Z0*T+U0*_,s=s*T-d*_,U0=U0*T-Z0*_,d=H0,Z0=C0;if(P&&Math.abs(P)+Math.abs(R)>359.9)P=R=0,y=180-y;N=O8(Math.sqrt(d*d+s*s+t*t)),B=O8(Math.sqrt(U0*U0+i0*i0)),f=_J(Z0,U0),h=Math.abs(f)>0.0002?f*HJ:0,A=M0?1/(M0<0?-M0:M0):0}if($.svg)H0=J.getAttribute("transform"),$.forceCSS=J.setAttribute("transform","")||!H5(h9(J,q8)),H0&&J.setAttribute("transform",H0)}if(Math.abs(h)>90&&Math.abs(h)<270)if(Q)N*=-1,h+=R<=0?180:-180,R+=R<=0?180:-180;else B*=-1,h+=h<=0?180:-180;if(Z=Z||$.uncache,$.x=X-(($.xPercent=X&&(!Z&&$.xPercent||(Math.round(J.offsetWidth/2)===Math.round(-X)?-50:0)))?J.offsetWidth*$.xPercent/100:0)+W,$.y=H-(($.yPercent=H&&(!Z&&$.yPercent||(Math.round(J.offsetHeight/2)===Math.round(-H)?-50:0)))?J.offsetHeight*$.yPercent/100:0)+W,$.z=O+W,$.scaleX=O8(N),$.scaleY=O8(B),$.rotation=O8(R)+z,$.rotationX=O8(P)+z,$.rotationY=O8(y)+z,$.skewX=h+z,$.skewY=C+z,$.transformPerspective=A+W,$.zOrigin=parseFloat(Y.split(" ")[2])||!Z&&$.zOrigin||0)K[D9]=fZ(Y);return $.xOffset=$.yOffset=0,$.force3D=Y9.force3D,$.renderTransform=$.svg?U4:K5?U5:H4,$.uncache=0,$},fZ=function(J){return(J=J.split(" "))[0]+" "+J[1]},FQ=function(J,Z,$){var K=g8(Z);return O8(parseFloat(Z)+parseFloat(u$(J,"x",$+"px",K)))+K},H4=function(J,Z){Z.z="0px",Z.rotationY=Z.rotationX="0deg",Z.force3D=0,U5(J,Z)},GJ="0deg",k7="0px",WJ=") ",U5=function(J,Z){var $=Z||this,K=$.xPercent,Q=$.yPercent,W=$.x,z=$.y,q=$.z,Y=$.rotation,X=$.rotationY,H=$.rotationX,O=$.skewX,N=$.skewY,B=$.scaleX,R=$.scaleY,P=$.transformPerspective,y=$.force3D,h=$.target,C=$.zOrigin,A="",b=y==="auto"&&J&&J!==1||y===!0;if(C&&(H!==GJ||X!==GJ)){var x=parseFloat(X)*mJ,k=Math.sin(x),f=Math.cos(x),T;x=parseFloat(H)*mJ,T=Math.cos(x),W=FQ(h,W,k*T*-C),z=FQ(h,z,-Math.sin(x)*-C),q=FQ(h,q,f*T*-C+C)}if(P!==k7)A+="perspective("+P+WJ;if(K||Q)A+="translate("+K+"%, "+Q+"%) ";if(b||W!==k7||z!==k7||q!==k7)A+=q!==k7||b?"translate3d("+W+", "+z+", "+q+") ":"translate("+W+", "+z+WJ;if(Y!==GJ)A+="rotate("+Y+WJ;if(X!==GJ)A+="rotateY("+X+WJ;if(H!==GJ)A+="rotateX("+H+WJ;if(O!==GJ||N!==GJ)A+="skew("+O+", "+N+WJ;if(B!==1||R!==1)A+="scale("+B+", "+R+WJ;h.style[q8]=A||"translate(0, 0)"},U4=function(J,Z){var $=Z||this,K=$.xPercent,Q=$.yPercent,W=$.x,z=$.y,q=$.rotation,Y=$.skewX,X=$.skewY,H=$.scaleX,O=$.scaleY,N=$.target,B=$.xOrigin,R=$.yOrigin,P=$.xOffset,y=$.yOffset,h=$.forceCSS,C=parseFloat(W),A=parseFloat(z),b,x,k,f,T;if(q=parseFloat(q),Y=parseFloat(Y),X=parseFloat(X),X)X=parseFloat(X),Y+=X,q+=X;if(q||Y){if(q*=mJ,Y*=mJ,b=Math.cos(q)*H,x=Math.sin(q)*H,k=Math.sin(q-Y)*-O,f=Math.cos(q-Y)*O,Y){if(X*=mJ,T=Math.tan(Y-X),T=Math.sqrt(1+T*T),k*=T,f*=T,X)T=Math.tan(X),T=Math.sqrt(1+T*T),b*=T,x*=T}b=O8(b),x=O8(x),k=O8(k),f=O8(f)}else b=H,f=O,x=k=0;if(C&&!~(W+"").indexOf("px")||A&&!~(z+"").indexOf("px"))C=u$(N,"x",W,"px"),A=u$(N,"y",z,"px");if(B||R||P||y)C=O8(C+B-(B*b+R*k)+P),A=O8(A+R-(B*x+R*f)+y);if(K||Q)T=N.getBBox(),C=O8(C+K/100*T.width),A=O8(A+Q/100*T.height);T="matrix("+b+","+x+","+k+","+f+","+C+","+A+")",N.setAttribute("transform",T),h&&(N.style[q8]=T)},z4=function(J,Z,$,K,Q){var W=360,z=k8(Q),q=parseFloat(Q)*(z&&~Q.indexOf("rad")?HJ:1),Y=q-K,X=K+Y+"deg",H,O;if(z){if(H=Q.split("_")[1],H==="short"){if(Y%=W,Y!==Y%(W/2))Y+=Y<0?W:-W}if(H==="cw"&&Y<0)Y=(Y+W*lG)%W-~~(Y/W)*W;else if(H==="ccw"&&Y>0)Y=(Y-W*lG)%W-~~(Y/W)*W}return J._pt=O=new $9(J._pt,Z,$,K,Y,sU),O.e=X,O.u="deg",J._props.push($),O},tG=function(J,Z){for(var $ in Z)J[$]=Z[$];return J},q4=function(J,Z,$){var K=tG({},$._gsap),Q="perspective,force3D,transformOrigin,svgOrigin",W=$.style,z,q,Y,X,H,O,N,B;if(K.svg)Y=$.getAttribute("transform"),$.setAttribute("transform",""),W[q8]=Z,z=A7($,1),zJ($,q8),$.setAttribute("transform",Y);else Y=getComputedStyle($)[q8],W[q8]=Z,z=A7($,1),W[q8]=Y;for(q in j$)if(Y=K[q],X=z[q],Y!==X&&Q.indexOf(q)<0)N=g8(Y),B=g8(X),H=N!==B?u$($,q,Y,B):parseFloat(Y),O=parseFloat(X),J._pt=new $9(J._pt,z,q,H,O-H,XQ),J._pt.u=B||0,J._props.push(q);tG(z,K)};e8("padding,margin,Width,Radius",function(G,J){var Z="Top",$="Right",K="Bottom",Q="Left",W=(J<3?[Z,$,K,Q]:[Z+Q,Z+$,K+$,K+Q]).map(function(z){return J<2?G+z:"border"+z+G});wZ[J>1?"border"+G:G]=function(z,q,Y,X,H){var O,N;if(arguments.length<4)return O=W.map(function(B){return E$(z,B,Y)}),N=O.join(" "),N.split(O[0]).length===5?O[0]:N;O=(X+"").split(" "),N={},W.forEach(function(B,R){return N[B]=O[R]=O[R]||O[(R-1)/2|0]}),z.init(q,N,H)}});var BQ={name:"css",register:OQ,targetTest:function(J){return J.style&&J.nodeType},init:function(J,Z,$,K,Q){var W=this._props,z=J.style,q=$.vars.startAt,Y,X,H,O,N,B,R,P,y,h,C,A,b,x,k,f;NQ||OQ(),this.styles=this.styles||Z5(J),f=this.styles.props,this.tween=$;for(R in Z){if(R==="autoRound")continue;if(X=Z[R],L9[R]&&WQ(R,Z,$,K,J,Q))continue;if(N=typeof X,B=wZ[R],N==="function")X=X.call($,K,J,Q),N=typeof X;if(N==="string"&&~X.indexOf("random("))X=gJ(X);if(B)B(this,J,R,X,$)&&(k=1);else if(R.substr(0,2)==="--"){if(Y=(getComputedStyle(J).getPropertyValue(R)+"").trim(),X+="",D$.lastIndex=0,!D$.test(Y))P=g8(Y),y=g8(X);y?P!==y&&(Y=u$(J,R,Y,y)+y):P&&(X+=P),this.add(z,"setProperty",Y,X,K,Q,0,0,R),W.push(R),f.push(R,0,z[R])}else if(N!=="undefined"){if(q&&R in q)Y=typeof q[R]==="function"?q[R].call($,K,J,Q):q[R],k8(Y)&&~Y.indexOf("random(")&&(Y=gJ(Y)),g8(Y+"")||Y==="auto"||(Y+=Y9.units[R]||g8(E$(J,R))||""),(Y+"").charAt(1)==="="&&(Y=E$(J,R));else Y=E$(J,R);if(O=parseFloat(Y),h=N==="string"&&X.charAt(1)==="="&&X.substr(0,2),h&&(X=X.substr(2)),H=parseFloat(X),R in J$){if(R==="autoAlpha"){if(O===1&&E$(J,"visibility")==="hidden"&&H)O=0;f.push("visibility",0,z.visibility),_$(this,z,"visibility",O?"inherit":"hidden",H?"inherit":"hidden",!H)}if(R!=="scale"&&R!=="transform")R=J$[R],~R.indexOf(",")&&(R=R.split(",")[0])}if(C=R in j$,C){if(this.styles.save(R),N==="string"&&X.substring(0,6)==="var(--")X=h9(J,X.substring(4,X.indexOf(")"))),H=parseFloat(X);if(!A)b=J._gsap,b.renderTransform&&!Z.parseTransform||A7(J,Z.parseTransform),x=Z.smoothOrigin!==!1&&b.smooth,A=this._pt=new $9(this._pt,z,q8,0,1,b.renderTransform,b,0,-1),A.dep=1;if(R==="scale")this._pt=new $9(this._pt,b,"scaleY",b.scaleY,(h?KJ(b.scaleY,h+H):H)-b.scaleY||0,XQ),this._pt.u=0,W.push("scaleY",R),R+="X";else if(R==="transformOrigin"){if(f.push(D9,0,z[D9]),X=G4(X),b.svg)DQ(J,X,0,x,0,this);else y=parseFloat(X.split(" ")[2])||0,y!==b.zOrigin&&_$(this,b,"zOrigin",b.zOrigin,y),_$(this,z,R,fZ(Y),fZ(X));continue}else if(R==="svgOrigin"){DQ(J,X,1,x,0,this);continue}else if(R in W5){z4(this,b,R,O,h?KJ(O,h+X):X);continue}else if(R==="smoothOrigin"){_$(this,b,"smooth",b.smooth,X);continue}else if(R==="force3D"){b[R]=X;continue}else if(R==="transform"){q4(this,X,J);continue}}else if(!(R in z))R=dJ(R)||R;if(C||(H||H===0)&&(O||O===0)&&!lU.test(X)&&R in z){if(P=(Y+"").substr((O+"").length),H||(H=0),y=g8(X)||(R in Y9.units?Y9.units[R]:P),P!==y&&(O=u$(J,R,Y,y)),this._pt=new $9(this._pt,C?b:z,R,O,(h?KJ(O,h+H):H)-O,!C&&(y==="px"||R==="zIndex")&&Z.autoRound!==!1?iU:XQ),this._pt.u=y||0,P!==y&&y!=="%")this._pt.b=Y,this._pt.r=oU}else if(!(R in z)){if(R in J)this.add(J,R,Y||J[R],h?h+X:X,K,Q);else if(R!=="parseTransform"){kZ(R,X);continue}}else Q4.call(this,J,R,Y,h?h+X:X);C||(R in z?f.push(R,0,z[R]):typeof J[R]==="function"?f.push(R,2,J[R]()):f.push(R,1,Y||J[R])),W.push(R)}}k&&LQ(this)},render:function(J,Z){if(Z.tween._time||!EQ()){var $=Z._pt;while($)$.r(J,$.d),$=$._next}else Z.styles.revert()},get:E$,aliases:J$,getSetter:function(J,Z,$){var K=J$[Z];return K&&K.indexOf(",")<0&&(Z=K),Z in j$&&Z!==D9&&(J._gsap.x||E$(J,"x"))?$&&pG===$?Z==="scale"?tU:aU:(pG=$||{})&&(Z==="scale"?eU:$4):J.style&&!PZ(J.style[Z])?nU:~Z.indexOf("-")?rU:TZ(J,Z)},core:{_removeProperty:zJ,_getMatrix:VQ}};p8.utils.checkPrefix=dJ;p8.core.getStyleSaver=Z5;(function(G,J,Z,$){var K=e8(G+","+J+","+Z,function(Q){j$[Q]=1});e8(J,function(Q){Y9.units[Q]="deg",W5[Q]=1}),J$[K[13]]=G+","+J,e8($,function(Q){var W=Q.split(":");J$[W[1]]=K[W[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");e8("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(G){Y9.units[G]="px"});p8.registerPlugin(BQ);var y0=p8.registerPlugin(BQ)||p8,sz=y0.core.Tween;function z5(G,J){for(var Z=0;Zq)Q=K,K=B,z=W,W=P;else if($)K+=B;else K=Q+(B-Q)/(P-z)*(W-z)},H=function(){Q=K=$?0:K,z=W=0},O=function(B){var R=z,P=Q,y=f7();return(B||B===0)&&B!==K&&X(B),W===z||y-z>Y?0:(K+($?P:-P))/(($?y:W)-R)*1000};return{update:X,reset:H,getVelocity:O}},T7=function(J,Z){return Z&&!J._gsapAllow&&J.preventDefault(),J.changedTouches?J.changedTouches[0]:J},q5=function(J){var Z=Math.max.apply(Math,J),$=Math.min.apply(Math,J);return Math.abs(Z)>=Math.abs($)?Z:$},D5=function(){w7=_8.core.globals().ScrollTrigger,w7&&w7.core&&X4()},N5=function(J){if(_8=J||Y5(),!bZ&&_8&&typeof document<"u"&&document.body)I9=window,m$=document,d$=m$.documentElement,pJ=m$.body,F5=[I9,m$,d$,pJ],F4=_8.utils.clamp,X5=_8.core.context||function(){},qJ="onpointerenter"in pJ?"pointer":"mouse",L5=D8.isTouch=I9.matchMedia&&I9.matchMedia("(hover: none), (pointer: coarse)").matches?1:("ontouchstart"in I9)||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,o9=D8.eventTypes=("ontouchstart"in d$?"touchstart,touchmove,touchcancel,touchend":!("onpointerdown"in d$)?"mousedown,mousemove,mouseup,mouseup":"pointerdown,pointermove,pointercancel,pointerup").split(","),setTimeout(function(){return O5=0},500),D5(),bZ=1;return bZ};l8.op=I8;j1.cache=0;var D8=function(){function G(Z){this.init(Z)}var J=G.prototype;return J.init=function($){bZ||N5(_8)||console.warn("Please gsap.registerPlugin(Observer)"),w7||D5();var{tolerance:K,dragMinimum:Q,type:W,target:z,lineHeight:q,debounce:Y,preventDefault:X,onStop:H,onStopDelay:O,ignore:N,wheelSpeed:B,event:R,onDragStart:P,onDragEnd:y,onDrag:h,onPress:C,onRelease:A,onRight:b,onLeft:x,onUp:k,onDown:f,onChangeX:T,onChangeY:_,onChange:d,onToggleX:s,onToggleY:t,onHover:e,onHoverEnd:Z0,onMove:U0,ignoreCheck:H0,isNormalizer:C0,onGestureStart:B0,onGestureEnd:l,onWheel:E0,onEnable:h0,onDisable:P0,onClick:M0,scrollSpeed:i0,capture:A0,allowClicks:J1,lockAxis:e0,onLockAxis:G1}=$;this.target=z=K9(z)||d$,this.vars=$,N&&(N=_8.utils.toArray(N)),K=K||0.000000001,Q=Q||0,B=B||1,i0=i0||1,W=W||"wheel,touch,pointer",Y=Y!==!1,q||(q=parseFloat(I9.getComputedStyle(pJ).lineHeight)||22);var n0,F1,B1,$1,D1,f1,H1,r=this,o1=0,y1=0,L8=$.passive||!X&&$.passive!==!1,O1=B$(z,l8),g=B$(z,I8),V=O1(),D=g(),L=~W.indexOf("touch")&&!~W.indexOf("pointer")&&o9[0]==="pointerdown",E=x7(z),w=z.ownerDocument||m$,p=[0,0,0],n=[0,0,0],W0=0,q0=function(){return W0=f7()},L0=function(r0,X1){return(r.event=r0)&&N&&Y4(r0.target,N)||X1&&L&&r0.pointerType!=="touch"||H0&&H0(r0,X1)},j0=function(){r._vx.reset(),r._vy.reset(),F1.pause(),H&&H(r)},g0=function(){var r0=r.deltaX=q5(p),X1=r.deltaY=q5(n),T0=Math.abs(r0)>=K,X0=Math.abs(X1)>=K;if(d&&(T0||X0)&&d(r,r0,X1,p,n),T0)b&&r.deltaX>0&&b(r),x&&r.deltaX<0&&x(r),T&&T(r),s&&r.deltaX<0!==o1<0&&s(r),o1=r.deltaX,p[0]=p[1]=p[2]=0;if(X0)f&&r.deltaY>0&&f(r),k&&r.deltaY<0&&k(r),_&&_(r),t&&r.deltaY<0!==y1<0&&t(r),y1=r.deltaY,n[0]=n[1]=n[2]=0;if($1||B1){if(U0&&U0(r),B1)P&&B1===1&&P(r),h&&h(r),B1=0;$1=!1}if(f1&&!(f1=!1)&&G1&&G1(r),D1)E0(r),D1=!1;n0=0},p0=function(r0,X1,T0){p[T0]+=r0,n[T0]+=X1,r._vx.update(r0),r._vy.update(X1),Y?n0||(n0=requestAnimationFrame(g0)):g0()},z1=function(r0,X1){if(e0&&!H1)r.axis=H1=Math.abs(r0)>Math.abs(X1)?"x":"y",f1=!0;if(H1!=="y")p[2]+=r0,r._vx.update(r0,!0);if(H1!=="x")n[2]+=X1,r._vy.update(X1,!0);Y?n0||(n0=requestAnimationFrame(g0)):g0()},W1=function(r0){if(L0(r0,1))return;r0=T7(r0,X);var{clientX:X1,clientY:T0}=r0,X0=X1-r.x,s0=T0-r.y,m0=r.isDragging;if(r.x=X1,r.y=T0,m0||(X0||s0)&&(Math.abs(r.startX-X1)>=Q||Math.abs(r.startY-T0)>=Q))B1=m0?2:1,m0||(r.isDragging=!0),z1(X0,s0)},N1=r.onPress=function(l0){if(L0(l0,1)||l0&&l0.button)return;r.axis=H1=null,F1.pause(),r.isPressed=!0,l0=T7(l0),o1=y1=0,r.startX=r.x=l0.clientX,r.startY=r.y=l0.clientY,r._vx.reset(),r._vy.reset(),Z9(C0?z:w,o9[1],W1,L8,!0),r.deltaX=r.deltaY=0,C&&C(r)},_0=r.onRelease=function(l0){if(L0(l0,1))return;J9(C0?z:w,o9[1],W1,!0);var r0=!isNaN(r.y-r.startY),X1=r.isDragging,T0=X1&&(Math.abs(r.x-r.startX)>3||Math.abs(r.y-r.startY)>3),X0=T7(l0);if(!T0&&r0){if(r._vx.reset(),r._vy.reset(),X&&J1)_8.delayedCall(0.08,function(){if(f7()-W0>300&&!l0.defaultPrevented){if(l0.target.click)l0.target.click();else if(w.createEvent){var s0=w.createEvent("MouseEvents");s0.initMouseEvent("click",!0,!0,I9,1,X0.screenX,X0.screenY,X0.clientX,X0.clientY,!1,!1,!1,!1,0,null),l0.target.dispatchEvent(s0)}}})}r.isDragging=r.isGesturing=r.isPressed=!1,H&&X1&&!C0&&F1.restart(!0),B1&&g0(),y&&X1&&y(r),A&&A(r,T0)},R1=function(r0){return r0.touches&&r0.touches.length>1&&(r.isGesturing=!0)&&B0(r0,r.isDragging)},I1=function(){return(r.isGesturing=!1)||l(r)},x1=function(r0){if(L0(r0))return;var X1=O1(),T0=g();p0((X1-V)*i0,(T0-D)*i0,1),V=X1,D=T0,H&&F1.restart(!0)},g1=function(r0){if(L0(r0))return;r0=T7(r0,X),E0&&(D1=!0);var X1=(r0.deltaMode===1?q:r0.deltaMode===2?I9.innerHeight:1)*B;p0(r0.deltaX*X1,r0.deltaY*X1,0),H&&!C0&&F1.restart(!0)},u0=function(r0){if(L0(r0))return;var{clientX:X1,clientY:T0}=r0,X0=X1-r.x,s0=T0-r.y;r.x=X1,r.y=T0,$1=!0,H&&F1.restart(!0),(X0||s0)&&z1(X0,s0)},K1=function(r0){r.event=r0,e(r)},h1=function(r0){r.event=r0,Z0(r)},U1=function(r0){return L0(r0)||T7(r0,X)&&M0(r)};F1=r._dc=_8.delayedCall(O||0.25,j0).pause(),r.deltaX=r.deltaY=0,r._vx=vZ(0,50,!0),r._vy=vZ(0,50,!0),r.scrollX=O1,r.scrollY=g,r.isDragging=r.isGesturing=r.isPressed=!1,X5(this),r.enable=function(l0){if(!r.isEnabled){if(Z9(E?w:z,"scroll",CQ),W.indexOf("scroll")>=0&&Z9(E?w:z,"scroll",x1,L8,A0),W.indexOf("wheel")>=0&&Z9(z,"wheel",g1,L8,A0),W.indexOf("touch")>=0&&L5||W.indexOf("pointer")>=0)Z9(z,o9[0],N1,L8,A0),Z9(w,o9[2],_0),Z9(w,o9[3],_0),J1&&Z9(z,"click",q0,!0,!0),M0&&Z9(z,"click",U1),B0&&Z9(w,"gesturestart",R1),l&&Z9(w,"gestureend",I1),e&&Z9(z,qJ+"enter",K1),Z0&&Z9(z,qJ+"leave",h1),U0&&Z9(z,qJ+"move",u0);r.isEnabled=!0,r.isDragging=r.isGesturing=r.isPressed=$1=B1=!1,r._vx.reset(),r._vy.reset(),V=O1(),D=g(),l0&&l0.type&&N1(l0),h0&&h0(r)}return r},r.disable=function(){if(r.isEnabled){if(cJ.filter(function(l0){return l0!==r&&x7(l0.target)}).length||J9(E?w:z,"scroll",CQ),r.isPressed)r._vx.reset(),r._vy.reset(),J9(C0?z:w,o9[1],W1,!0);J9(E?w:z,"scroll",x1,A0),J9(z,"wheel",g1,A0),J9(z,o9[0],N1,A0),J9(w,o9[2],_0),J9(w,o9[3],_0),J9(z,"click",q0,!0),J9(z,"click",U1),J9(w,"gesturestart",R1),J9(w,"gestureend",I1),J9(z,qJ+"enter",K1),J9(z,qJ+"leave",h1),J9(z,qJ+"move",u0),r.isEnabled=r.isPressed=r.isDragging=!1,P0&&P0(r)}},r.kill=r.revert=function(){r.disable();var l0=cJ.indexOf(r);l0>=0&&cJ.splice(l0,1),V$===r&&(V$=0)},cJ.push(r),C0&&x7(z)&&(V$=r),r.enable(R)},L4(G,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),G}();D8.version="3.13.0";D8.create=function(G){return new D8(G)};D8.register=N5;D8.getAll=function(){return cJ.slice()};D8.getById=function(G){return cJ.filter(function(J){return J.vars.id===G})[0]};Y5()&&_8.registerPlugin(D8);/*! * ScrollTrigger 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var c0,oJ,M1,e1,S9,l1,gQ,eZ,s7,u7,b7,gZ,s8,KK,wQ,G9,E5,j5,iJ,b5,MQ,y5,Q9,fQ,v5,g5,c$,xQ,_Q,nJ,uQ,$K,hQ,IQ,_Z=1,o8=Date.now,PQ=o8(),v9=0,y7=0,V5=function(J,Z,$){var K=k9(J)&&(J.substr(0,6)==="clamp("||J.indexOf("max")>-1);return $["_"+Z+"Clamp"]=K,K?J.substr(6,J.length-7):J},B5=function(J,Z){return Z&&(!k9(J)||J.substr(0,6)!=="clamp(")?"clamp("+J+")":J},O4=function G(){return y7&&requestAnimationFrame(G)},R5=function(){return KK=1},C5=function(){return KK=0},Z$=function(J){return J},v7=function(J){return Math.round(J*1e5)/1e5||0},_5=function(){return typeof window<"u"},u5=function(){return c0||_5()&&(c0=window.gsap)&&c0.registerPlugin&&c0},DJ=function(J){return!!~gQ.indexOf(J)},m5=function(J){return(J==="Height"?uQ:M1["inner"+J])||S9["client"+J]||l1["client"+J]},d5=function(J){return R$(J,"getBoundingClientRect")||(DJ(J)?function(){return tZ.width=M1.innerWidth,tZ.height=uQ,tZ}:function(){return C$(J)})},D4=function(J,Z,$){var{d:K,d2:Q,a:W}=$;return(W=R$(J,"getBoundingClientRect"))?function(){return W()[K]}:function(){return(Z?m5(Q):J["client"+Q])||0}},N4=function(J,Z){return!Z||~i9.indexOf(J)?d5(J):function(){return tZ}},K$=function(J,Z){var{s:$,d2:K,d:Q,a:W}=Z;return Math.max(0,($="scroll"+K)&&(W=R$(J,$))?W()-d5(J)()[Q]:DJ(J)?(S9[$]||l1[$])-m5(K):J[$]-J["offset"+K])},uZ=function(J,Z){for(var $=0;$0){K-=W;for(z=0;z<$.length;z++)if($[z]>=K)return $[z];return $[z-1]}else{z=$.length,K+=W;while(z--)if($[z]<=K)return $[z]}return $[0]}:function(K,Q,W){if(W===void 0)W=0.001;var z=Z(K);return!Q||Math.abs(z-K)$&&(K*=Z/100),J=J.substr(0,$-1);J=K+(J in ZK?ZK[J]*Z:~J.indexOf("%")?parseFloat(J)*Z/100:parseFloat(J)||0)}return J},pZ=function(J,Z,$,K,Q,W,z,q){var{startColor:Y,endColor:X,fontSize:H,indent:O,fontWeight:N}=Q,B=e1.createElement("div"),R=DJ($)||R$($,"pinType")==="fixed",P=J.indexOf("scroller")!==-1,y=R?l1:$,h=J.indexOf("start")!==-1,C=h?Y:X,A="border-color:"+C+";font-size:"+H+";color:"+C+";font-weight:"+N+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return A+="position:"+((P||q)&&R?"fixed;":"absolute;"),(P||q||!R)&&(A+=(K===I8?mQ:dQ)+":"+(W+parseFloat(O))+"px;"),z&&(A+="box-sizing:border-box;text-align:left;width:"+z.offsetWidth+"px;"),B._isStart=h,B.setAttribute("class","gsap-marker-"+J+(Z?" marker-"+Z:"")),B.style.cssText=A,B.innerText=Z||Z===0?J+"-"+Z:J,y.children[0]?y.insertBefore(B,y.children[0]):y.appendChild(B),B._offset=B["offset"+K.op.d2],nZ(B,0,K,h),B},nZ=function(J,Z,$,K){var Q={display:"block"},W=$[K?"os2":"p2"],z=$[K?"p2":"os2"];J._isFlipped=K,Q[$.a+"Percent"]=K?-100:0,Q[$.a]=K?"1px":0,Q["border"+W+aJ]=1,Q["border"+z+aJ]=0,Q[$.p]=Z+"px",c0.set(J,Q)},V1=[],bQ={},o7,P5=function(){return o8()-v9>34&&(o7||(o7=requestAnimationFrame(M$)))},sJ=function(){if(!Q9||!Q9.isPressed||Q9.startX>l1.clientWidth){if(j1.cache++,Q9)o7||(o7=requestAnimationFrame(M$));else M$();v9||EJ("scrollStart"),v9=o8()}},SQ=function(){g5=M1.innerWidth,v5=M1.innerHeight},_7=function(J){j1.cache++,(J===!0||!s8&&!y5&&!e1.fullscreenElement&&!e1.webkitFullscreenElement&&(!fQ||g5!==M1.innerWidth||Math.abs(M1.innerHeight-v5)>M1.innerHeight*0.25))&&eZ.restart(!0)},NJ={},B4=[],s5=function G(){return w8(x0,"scrollEnd",G)||FJ(!0)},EJ=function(J){return NJ[J]&&NJ[J].map(function(Z){return Z()})||B4},P9=[],o5=function(J){for(var Z=0;ZQ,z=K._startClamp&&K.start>=Q;(W||z)&&K.setPositions(z?Q-1:K.start,W?Math.max(z?Q:K.start+1,Q):K.end,!0)}),S5(!1),hQ=0,$.forEach(function(K){return K&&K.render&&K.render(-1)}),j1.forEach(function(K){if(i8(K))K.smooth&&requestAnimationFrame(function(){return K.target.style.scrollBehavior="smooth"}),K.rec&&K(K.rec)}),i5(_Q,1),eZ.pause(),OJ++,W9=2,M$(2),V1.forEach(function(K){return i8(K.vars.onRefresh)&&K.vars.onRefresh(K)}),W9=x0.isRefreshing=!1,EJ("refresh")},yQ=0,rZ=1,l7,M$=function(J){if(J===2||!W9&&!$K){x0.isUpdating=!0,l7&&l7.update(0);var Z=V1.length,$=o8(),K=$-PQ>=50,Q=Z&&V1[0].scroll();if(rZ=yQ>Q?-1:1,W9||(yQ=Q),K){if(v9&&!KK&&$-v9>200)v9=0,EJ("scrollEnd");b7=PQ,PQ=$}if(rZ<0){G9=Z;while(G9-- >0)V1[G9]&&V1[G9].update(0,K);rZ=1}else for(G9=0;G920),$-=$-x}else N&&(J=c0.utils.mapRange(N.scrollTrigger.start,N.scrollTrigger.end,0,O,J)),z&&nZ(z,$,K,!0);if(B)q[B]=J||-0.001,J<0&&(J=0);if(W){var f=J+$,T=W._isStart;if(P="scroll"+K.d2,nZ(W,f,K,T&&f>20||!T&&(H?Math.max(l1[P],S9[P]):W.parentNode[P])<=f+1),H)Y=C$(z),H&&(W.style[K.op.p]=Y[K.op.p]-K.op.m-W._offset+S8)}if(N&&h)P=C$(h),N.seek(O),y=C$(h),N._caScrollDist=P[K.p]-y[K.p],J=J/N._caScrollDist*O;return N&&N.seek(R),N?J:Math.round(J)},P4=/(webkit|moz|length|cssText|inset)/i,T5=function(J,Z,$,K){if(J.parentNode!==Z){var Q=J.style,W,z;if(Z===l1){J._stOrig=Q.cssText,z=y9(J);for(W in z)if(!+W&&!P4.test(W)&&z[W]&&typeof Q[W]==="string"&&W!=="0")Q[W]=z[W];Q.top=$,Q.left=K}else Q.cssText=J._stOrig;c0.core.getCache(J).uncache=1,Z.appendChild(J)}},r5=function(J,Z,$){var K=Z,Q=K;return function(W){var z=Math.round(J());if(z!==K&&z!==Q&&Math.abs(z-K)>3&&Math.abs(z-Q)>3)W=z,$&&$();return Q=K,K=Math.round(W),K}},sZ=function(J,Z,$){var K={};K[Z.p]="+="+$,c0.set(J,K)},w5=function(J,Z){var $=B$(J,Z),K="_scroll"+Z.p2,Q=function W(z,q,Y,X,H){var O=W.tween,N=q.onComplete,B={};Y=Y||$();var R=r5($,Y,function(){O.kill(),W.tween=0});return H=X&&H||0,X=X||z-Y,O&&O.kill(),q[K]=z,q.inherit=!1,q.modifiers=B,B[K]=function(){return R(Y+X*O.ratio+H*O.ratio*O.ratio)},q.onUpdate=function(){j1.cache++,W.tween&&M$()},q.onComplete=function(){W.tween=0,N&&N.call(O)},O=W.tween=c0.to(J,q),O};return J[K]=$,$.wheelHandler=function(){return Q.tween&&Q.tween.kill()&&(Q.tween=0)},f8(J,"wheel",$.wheelHandler),x0.isTouch&&f8(J,"touchmove",$.wheelHandler),Q},x0=function(){function G(Z,$){oJ||G.register(c0)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),xQ(this),this.init(Z,$)}var J=G.prototype;return J.init=function($,K){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!y7){this.update=this.refresh=this.kill=Z$;return}$=M5(k9($)||g7($)||$.nodeType?{trigger:$}:$,cZ);var Q=$,W=Q.onUpdate,z=Q.toggleClass,q=Q.id,Y=Q.onToggle,X=Q.onRefresh,H=Q.scrub,O=Q.trigger,N=Q.pin,B=Q.pinSpacing,R=Q.invalidateOnRefresh,P=Q.anticipatePin,y=Q.onScrubComplete,h=Q.onSnapComplete,C=Q.once,A=Q.snap,b=Q.pinReparent,x=Q.pinSpacer,k=Q.containerAnimation,f=Q.fastScrollEnd,T=Q.preventOverlaps,_=$.horizontal||$.containerAnimation&&$.horizontal!==!1?l8:I8,d=!H&&H!==0,s=K9($.scroller||M1),t=c0.core.getCache(s),e=DJ(s),Z0=("pinType"in $?$.pinType:R$(s,"pinType")||e&&"fixed")==="fixed",U0=[$.onEnter,$.onLeave,$.onEnterBack,$.onLeaveBack],H0=d&&$.toggleActions.split(" "),C0="markers"in $?$.markers:cZ.markers,B0=e?0:parseFloat(y9(s)["border"+_.p2+aJ])||0,l=this,E0=$.onRefreshInit&&function(){return $.onRefreshInit(l)},h0=D4(s,e,_),P0=N4(s,e),M0=0,i0=0,A0=0,J1=B$(s,_),e0,G1,n0,F1,B1,$1,D1,f1,H1,r,o1,y1,L8,O1,g,V,D,L,E,w,p,n,W0,q0,L0,j0,g0,p0,z1,W1,N1,_0,R1,I1,x1,g1,u0,K1,h1;if(l._startClamp=l._endClamp=!1,l._dir=_,P*=45,l.scroller=s,l.scroll=k?k.time.bind(k):J1,F1=J1(),l.vars=$,K=K||$.animation,"refreshPriority"in $)b5=1,$.refreshPriority===-9999&&(l7=l);if(t.tweenScroll=t.tweenScroll||{top:w5(s,I8),left:w5(s,l8)},l.tweenTo=e0=t.tweenScroll[_.p],l.scrubDuration=function(T0){if(R1=g7(T0)&&T0,!R1)_0&&_0.progress(1).kill(),_0=0;else _0?_0.duration(T0):_0=c0.to(K,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:R1,paused:!0,onComplete:function(){return y&&y(l)}})},K)K.vars.lazy=!1,K._initted&&!l.isReverted||K.vars.immediateRender!==!1&&$.immediateRender!==!1&&K.duration()&&K.render(0,!0,!0),l.animation=K.pause(),K.scrollTrigger=l,l.scrubDuration(H),W1=0,q||(q=K.vars.id);if(A){if(!LJ(A)||A.push)A={snapTo:A};"scrollBehavior"in l1.style&&c0.set(e?[l1,S9]:s,{scrollBehavior:"auto"}),j1.forEach(function(T0){return i8(T0)&&T0.target===(e?e1.scrollingElement||S9:s)&&(T0.smooth=!1)}),n0=i8(A.snapTo)?A.snapTo:A.snapTo==="labels"?j4(K):A.snapTo==="labelsDirectional"?V4(K):A.directional!==!1?function(T0,X0){return pQ(A.snapTo)(T0,o8()-i0<500?0:X0.direction)}:c0.utils.snap(A.snapTo),I1=A.duration||{min:0.1,max:2},I1=LJ(I1)?u7(I1.min,I1.max):u7(I1,I1),x1=c0.delayedCall(A.delay||R1/2||0.1,function(){var T0=J1(),X0=o8()-i0<500,s0=e0.tween;if((X0||Math.abs(l.getVelocity())<10)&&!s0&&!KK&&M0!==T0){var m0=(T0-$1)/O1,G8=K&&!d?K.totalProgress():m0,Q1=X0?0:(G8-N1)/(o8()-b7)*1000||0,c1=c0.utils.clamp(-m0,1-m0,lJ(Q1/2)*Q1/0.185),J8=m0+(A.inertia===!1?0:c1),s1,v1,_1=A,n8=_1.onStart,P1=_1.onInterrupt,A8=_1.onComplete;if(s1=n0(J8,l),g7(s1)||(s1=J8),v1=Math.max(0,Math.round($1+s1*O1)),T0<=D1&&T0>=$1&&v1!==T0){if(s0&&!s0._initted&&s0.data<=lJ(v1-T0))return;if(A.inertia===!1)c1=s1-m0;e0(v1,{duration:I1(lJ(Math.max(lJ(J8-G8),lJ(s1-G8))*0.185/Q1/0.05||0)),ease:A.ease||"power3",data:lJ(v1-T0),onInterrupt:function(){return x1.restart(!0)&&P1&&P1(l)},onComplete:function(){if(l.update(),M0=J1(),K&&!d)_0?_0.resetTo("totalProgress",s1,K._tTime/K._tDur):K.progress(s1);W1=N1=K&&!d?K.totalProgress():l.progress,h&&h(l),A8&&A8(l)}},T0,c1*O1,v1-T0-c1*O1),n8&&n8(l,e0.tween)}}else if(l.isActive&&M0!==T0)x1.restart(!0)}).pause()}if(q&&(bQ[q]=l),O=l.trigger=K9(O||N!==!0&&N),h1=O&&O._gsap&&O._gsap.stRevert,h1&&(h1=h1(l)),N=N===!0?O:K9(N),k9(z)&&(z={targets:O,className:z}),N){if(B===!1||B===b9||(B=!B&&N.parentNode&&N.parentNode.style&&y9(N.parentNode).display==="flex"?!1:P8),l.pin=N,G1=c0.core.getCache(N),!G1.spacer){if(x)x=K9(x),x&&!x.nodeType&&(x=x.current||x.nativeElement),G1.spacerIsNative=!!x,x&&(G1.spacerState=lZ(x));G1.spacer=L=x||e1.createElement("div"),L.classList.add("pin-spacer"),q&&L.classList.add("pin-spacer-"+q),G1.pinState=g=lZ(N)}else g=G1.pinState;$.force3D!==!1&&c0.set(N,{force3D:!0}),l.spacer=L=G1.spacer,z1=y9(N),q0=z1[B+_.os2],w=c0.getProperty(N),p=c0.quickSetter(N,_.a,S8),AQ(N,L,z1),D=lZ(N)}if(C0){y1=LJ(C0)?M5(C0,I5):I5,r=pZ("scroller-start",q,s,_,y1,0),o1=pZ("scroller-end",q,s,_,y1,0,r),E=r["offset"+_.op.d2];var U1=K9(R$(s,"content")||s);if(f1=this.markerStart=pZ("start",q,U1,_,y1,E,0,k),H1=this.markerEnd=pZ("end",q,U1,_,y1,E,0,k),k&&(K1=c0.quickSetter([f1,H1],_.a,S8)),!Z0&&!(i9.length&&R$(s,"fixedMarkers")===!0))E4(e?l1:s),c0.set([r,o1],{force3D:!0}),j0=c0.quickSetter(r,_.a,S8),p0=c0.quickSetter(o1,_.a,S8)}if(k){var l0=k.vars.onUpdate,r0=k.vars.onUpdateParams;k.eventCallback("onUpdate",function(){l.update(0,0,1),l0&&l0.apply(k,r0||[])})}if(l.previous=function(){return V1[V1.indexOf(l)-1]},l.next=function(){return V1[V1.indexOf(l)+1]},l.revert=function(T0,X0){if(!X0)return l.kill(!0);var s0=T0!==!1||!l.enabled,m0=s8;if(s0!==l.isReverted){if(s0)g1=Math.max(J1(),l.scroll.rec||0),A0=l.progress,u0=K&&K.progress();if(f1&&[f1,H1,r,o1].forEach(function(G8){return G8.style.display=s0?"none":"block"}),s0)s8=l,l.update(s0);if(N&&(!b||!l.isActive))if(s0)C4(N,L,g);else AQ(N,L,y9(N),L0);s0||l.update(s0),s8=m0,l.isReverted=s0}},l.refresh=function(T0,X0,s0,m0){if((s8||!l.enabled)&&!X0)return;if(N&&T0&&v9){f8(G,"scrollEnd",s5);return}if(!W9&&E0&&E0(l),s8=l,e0.tween&&!s0)e0.tween.kill(),e0.tween=0;if(_0&&_0.pause(),R&&K)K.revert({kill:!1}).invalidate(),K.getChildren&&K.getChildren(!0,!0,!1).forEach(function(h8){return h8.vars.immediateRender&&h8.render(0,!0,!0)});l.isReverted||l.revert(!0,!0),l._subPinOffset=!1;var G8=h0(),Q1=P0(),c1=k?k.duration():K$(s,_),J8=O1<=0.01||!O1,s1=0,v1=m0||0,_1=LJ(s0)?s0.end:$.end,n8=$.endTrigger||O,P1=LJ(s0)?s0.start:$.start||($.start===0||!O?0:N?"0 0":"0 100%"),A8=l.pinnedContainer=$.pinnedContainer&&K9($.pinnedContainer,l),H9=O&&Math.max(0,V1.indexOf(l))||0,W8=H9,$8,m1,x8,m9,N8,a1,r8,H8,S$,E8,u8,T8,a8;if(C0&&LJ(s0))T8=c0.getProperty(r,_.p),a8=c0.getProperty(o1,_.p);while(W8-- >0){if(a1=V1[W8],a1.end||a1.refresh(0,1)||(s8=l),r8=a1.pin,r8&&(r8===O||r8===N||r8===A8)&&!a1.isReverted)E8||(E8=[]),E8.unshift(a1),a1.revert(!0,!0);if(a1!==V1[W8])H9--,W8--}if(i8(P1)&&(P1=P1(l)),P1=V5(P1,"start",l),$1=A5(P1,O,G8,_,J1(),f1,r,l,Q1,B0,Z0,c1,k,l._startClamp&&"_startClamp")||(N?-0.001:0),i8(_1)&&(_1=_1(l)),k9(_1)&&!_1.indexOf("+="))if(~_1.indexOf(" "))_1=(k9(P1)?P1.split(" ")[0]:"")+_1;else s1=iZ(_1.substr(2),G8),_1=k9(P1)?P1:(k?c0.utils.mapRange(0,k.duration(),k.scrollTrigger.start,k.scrollTrigger.end,$1):$1)+s1,n8=O;_1=V5(_1,"end",l),D1=Math.max($1,A5(_1||(n8?"100% 0":c1),n8,G8,_,J1()+s1,H1,o1,l,Q1,B0,Z0,c1,k,l._endClamp&&"_endClamp"))||-0.001,s1=0,W8=H9;while(W8--)if(a1=V1[W8],r8=a1.pin,r8&&a1.start-a1._pinPush<=$1&&!k&&a1.end>0){if($8=a1.end-(l._startClamp?Math.max(0,a1.start):a1.start),(r8===O&&a1.start-a1._pinPush<$1||r8===A8)&&isNaN(P1))s1+=$8*(1-a1.progress);r8===N&&(v1+=$8)}if($1+=s1,D1+=s1,l._startClamp&&(l._startClamp+=s1),l._endClamp&&!W9)l._endClamp=D1||-0.001,D1=Math.min(D1,K$(s,_));if(O1=D1-$1||($1-=0.01)&&0.001,J8)A0=c0.utils.clamp(0,1,c0.utils.normalize($1,D1,g1));if(l._pinPush=v1,f1&&s1)$8={},$8[_.a]="+="+s1,A8&&($8[_.p]="-="+J1()),c0.set([f1,H1],$8);if(N&&!(hQ&&l.end>=K$(s,_))){if($8=y9(N),m9=_===I8,x8=J1(),n=parseFloat(w(_.a))+v1,!c1&&D1>1){if(u8=(e?e1.scrollingElement||S9:s).style,u8={style:u8,value:u8["overflow"+_.a.toUpperCase()]},e&&y9(l1)["overflow"+_.a.toUpperCase()]!=="scroll")u8.style["overflow"+_.a.toUpperCase()]="scroll"}if(AQ(N,L,$8),D=lZ(N),m1=C$(N,!0),H8=Z0&&B$(s,m9?l8:I8)(),B){if(L0=[B+_.os2,O1+v1+S8],L0.t=L,W8=B===P8?JK(N,_)+O1+v1:0,W8)L0.push(_.d,W8+S8),L.style.flexBasis!=="auto"&&(L.style.flexBasis=W8+S8);if(rJ(L0),A8)V1.forEach(function(h8){if(h8.pin===A8&&h8.vars.pinSpacing!==!1)h8._subPinOffset=!0});Z0&&J1(g1)}else W8=JK(N,_),W8&&L.style.flexBasis!=="auto"&&(L.style.flexBasis=W8+S8);if(Z0)N8={top:m1.top+(m9?x8-$1:H8)+S8,left:m1.left+(m9?H8:x8-$1)+S8,boxSizing:"border-box",position:"fixed"},N8[XJ]=N8["max"+aJ]=Math.ceil(m1.width)+S8,N8[YJ]=N8["max"+cQ]=Math.ceil(m1.height)+S8,N8[b9]=N8[b9+c7]=N8[b9+m7]=N8[b9+p7]=N8[b9+d7]="0",N8[P8]=$8[P8],N8[P8+c7]=$8[P8+c7],N8[P8+m7]=$8[P8+m7],N8[P8+p7]=$8[P8+p7],N8[P8+d7]=$8[P8+d7],V=I4(g,N8,b),W9&&J1(0);if(K)S$=K._initted,MQ(1),K.render(K.duration(),!0,!0),W0=w(_.a)-n+O1+v1,g0=Math.abs(O1-W0)>1,Z0&&g0&&V.splice(V.length-2,2),K.render(0,!0,!0),S$||K.invalidate(!0),K.parent||K.totalTime(K.totalTime()),MQ(0);else W0=O1;u8&&(u8.value?u8.style["overflow"+_.a.toUpperCase()]=u8.value:u8.style.removeProperty("overflow-"+_.a))}else if(O&&J1()&&!k){m1=O.parentNode;while(m1&&m1!==l1){if(m1._pinOffset)$1-=m1._pinOffset,D1-=m1._pinOffset;m1=m1.parentNode}}if(E8&&E8.forEach(function(h8){return h8.revert(!1,!0)}),l.start=$1,l.end=D1,F1=B1=W9?g1:J1(),!k&&!W9)F10?V1.slice(0,X0).reverse():V1.slice(X0+1);return(k9(T0)?s0.filter(function(m0){return m0.vars.preventOverlaps===T0}):s0).filter(function(m0){return l.direction>0?m0.end<=$1:m0.start>=D1})},l.update=function(T0,X0,s0){if(k&&!s0&&!T0)return;var m0=W9===!0?g1:l.scroll(),G8=T0?0:(m0-$1)/O1,Q1=G8<0?0:G8>1?1:G8||0,c1=l.progress,J8,s1,v1,_1,n8,P1,A8,H9;if(X0){if(B1=F1,F1=k?J1():m0,A)N1=W1,W1=K&&!d?K.totalProgress():Q1}if(P&&N&&!s8&&!_Z&&v9){if(!Q1&&$1m0+(m0-B1)/(o8()-b7)*P)Q1=0.9999}if(Q1!==c1&&l.enabled){if(J8=l.isActive=!!Q1&&Q1<1,s1=!!c1&&c1<1,P1=J8!==s1,n8=P1||!!Q1!==!!c1,l.direction=Q1>c1?1:-1,l.progress=Q1,n8&&!s8){if(v1=Q1&&!c1?0:Q1===1?1:c1===1?2:3,d)_1=!P1&&H0[v1+1]!=="none"&&H0[v1+1]||H0[v1],H9=K&&(_1==="complete"||_1==="reset"||(_1 in K))}if(T&&(P1||H9)&&(H9||H||!K)&&(i8(T)?T(l):l.getTrailing(T).forEach(function(x8){return x8.endAnimation()})),!d){if(_0&&!s8&&!_Z)if(_0._dp._time-_0._start!==_0._time&&_0.render(_0._dp._time-_0._start),_0.resetTo)_0.resetTo("totalProgress",Q1,K._tTime/K._tDur);else _0.vars.totalProgress=Q1,_0.invalidate().restart();else if(K)K.totalProgress(Q1,!!(s8&&(i0||T0)))}if(N){if(T0&&B&&(L.style[B+_.os2]=q0),!Z0)p(v7(n+W0*Q1));else if(n8){if(A8=!T0&&Q1>c1&&D1+1>m0&&m0+1>=K$(s,_),b)if(!T0&&(J8||A8)){var W8=C$(N,!0),$8=m0-$1;T5(N,l1,W8.top+(_===I8?$8:0)+S8,W8.left+(_===I8?0:$8)+S8)}else T5(N,L);rJ(J8||A8?V:D),g0&&Q1<1&&J8||p(n+(Q1===1&&!A8?W0:0))}}if(A&&!e0.tween&&!s8&&!_Z&&x1.restart(!0),z&&(P1||C&&Q1&&(Q1<1||!IQ))&&s7(z.targets).forEach(function(x8){return x8.classList[J8||C?"add":"remove"](z.className)}),W&&!d&&!T0&&W(l),n8&&!s8){if(d){if(H9)if(_1==="complete")K.pause().totalProgress(1);else if(_1==="reset")K.restart(!0).pause();else if(_1==="restart")K.restart(!0);else K[_1]();W&&W(l)}if(P1||!IQ){if(Y&&P1&&kQ(l,Y),U0[v1]&&kQ(l,U0[v1]),C&&(Q1===1?l.kill(!1,1):U0[v1]=0),!P1)v1=Q1===1?1:3,U0[v1]&&kQ(l,U0[v1])}if(f&&!J8&&Math.abs(l.getVelocity())>(g7(f)?f:2500))h7(l.callbackAnimation),_0?_0.progress(1):h7(K,_1==="reverse"?1:!Q1,1)}else if(d&&W&&!s8)W(l)}if(p0){var m1=k?m0/k.duration()*(k._caScrollDist||0):m0;j0(m1+(r._isFlipped?1:0)),p0(m1)}K1&&K1(-m0/k.duration()*(k._caScrollDist||0))},l.enable=function(T0,X0){if(!l.enabled){if(l.enabled=!0,f8(s,"resize",_7),e||f8(s,"scroll",sJ),E0&&f8(G,"refreshInit",E0),T0!==!1)l.progress=A0=0,F1=B1=M0=J1();X0!==!1&&l.refresh()}},l.getTween=function(T0){return T0&&e0?e0.tween:_0},l.setPositions=function(T0,X0,s0,m0){if(k){var G8=k.scrollTrigger,Q1=k.duration(),c1=G8.end-G8.start;T0=G8.start+c1*T0/Q1,X0=G8.start+c1*X0/Q1}l.refresh(!1,!1,{start:B5(T0,s0&&!!l._startClamp),end:B5(X0,s0&&!!l._endClamp)},m0),l.update()},l.adjustPinSpacing=function(T0){if(L0&&T0){var X0=L0.indexOf(_.d)+1;L0[X0]=parseFloat(L0[X0])+T0+S8,L0[1]=parseFloat(L0[1])+T0+S8,rJ(L0)}},l.disable=function(T0,X0){if(l.enabled){if(T0!==!1&&l.revert(!0,!0),l.enabled=l.isActive=!1,X0||_0&&_0.pause(),g1=0,G1&&(G1.uncache=1),E0&&w8(G,"refreshInit",E0),x1)x1.pause(),e0.tween&&e0.tween.kill()&&(e0.tween=0);if(!e){var s0=V1.length;while(s0--)if(V1[s0].scroller===s&&V1[s0]!==l)return;w8(s,"resize",_7),e||w8(s,"scroll",sJ)}}},l.kill=function(T0,X0){l.disable(T0,X0),_0&&!X0&&_0.kill(),q&&delete bQ[q];var s0=V1.indexOf(l);if(s0>=0&&V1.splice(s0,1),s0===G9&&rZ>0&&G9--,s0=0,V1.forEach(function(m0){return m0.scroller===l.scroller&&(s0=1)}),s0||W9||(l.scroll.rec=0),K)K.scrollTrigger=null,T0&&K.revert({kill:!1}),X0||K.kill();if(f1&&[f1,H1,r,o1].forEach(function(m0){return m0.parentNode&&m0.parentNode.removeChild(m0)}),l7===l&&(l7=0),N)G1&&(G1.uncache=1),s0=0,V1.forEach(function(m0){return m0.pin===N&&s0++}),s0||(G1.spacer=0);$.onKill&&$.onKill(l)},V1.push(l),l.enable(!1,!1),h1&&h1(l),K&&K.add&&!O1){var X1=l.update;l.update=function(){l.update=X1,j1.cache++,$1||D1||l.refresh()},c0.delayedCall(0.01,l.update),O1=0.01,$1=D1=0}else l.refresh();N&&R4()},G.register=function($){if(!oJ)c0=$||u5(),_5()&&window.document&&G.enable(),oJ=y7;return oJ},G.defaults=function($){if($)for(var K in $)cZ[K]=$[K];return cZ},G.disable=function($,K){y7=0,V1.forEach(function(W){return W[K?"kill":"disable"]($)}),w8(M1,"wheel",sJ),w8(e1,"scroll",sJ),clearInterval(gZ),w8(e1,"touchcancel",Z$),w8(l1,"touchstart",Z$),mZ(w8,e1,"pointerdown,touchstart,mousedown",R5),mZ(w8,e1,"pointerup,touchend,mouseup",C5),eZ.kill(),uZ(w8);for(var Q=0;Q0&&W.left+z0&&W.top+z=0&&P9.splice(Z,5),P9.push(J,J.style.cssText,J.getBBox&&J.getAttribute("transform"),c0.core.getCache(J),xQ())}}):P9};x0.revert=function(G,J){return lQ(!G,J)};x0.create=function(G,J){return new x0(G,J)};x0.refresh=function(G){return G?_7(!0):(oJ||x0.register())&&FJ(!0)};x0.update=function(G){return++j1.cache&&M$(G===!0?2:0)};x0.clearScrollMemory=i5;x0.maxScroll=function(G,J){return K$(G,J?l8:I8)};x0.getScrollFunc=function(G,J){return B$(K9(G),J?l8:I8)};x0.getById=function(G){return bQ[G]};x0.getAll=function(){return V1.filter(function(G){return G.vars.id!=="ScrollSmoother"})};x0.isScrolling=function(){return!!v9};x0.snapDirectional=pQ;x0.addEventListener=function(G,J){var Z=NJ[G]||(NJ[G]=[]);~Z.indexOf(J)||Z.push(J)};x0.removeEventListener=function(G,J){var Z=NJ[G],$=Z&&Z.indexOf(J);$>=0&&Z.splice($,1)};x0.batch=function(G,J){var Z=[],$={},K=J.interval||0.016,Q=J.batchMax||1e9,W=function(Y,X){var H=[],O=[],N=c0.delayedCall(K,function(){X(H,O),H=[],O=[]}).pause();return function(B){H.length||N.restart(!0),H.push(B.trigger),O.push(B),Q<=H.length&&N.progress(1)}},z;for(z in J)$[z]=z.substr(0,2)==="on"&&i8(J[z])&&z!=="onRefreshInit"?W(z,J[z]):J[z];if(i8(Q))Q=Q(),f8(x0,"refresh",function(){return Q=J.batchMax()});return s7(G).forEach(function(q){var Y={};for(z in $)Y[z]=$[z];Y.trigger=q,Z.push(x0.create(Y))}),Z};var f5=function(J,Z,$,K){return Z>K?J(K):Z<0&&J(0),$>K?(K-Z)/($-Z):$<0?Z/(Z-$):1},TQ=function G(J,Z){if(Z===!0)J.style.removeProperty("touch-action");else J.style.touchAction=Z===!0?"auto":Z?"pan-"+Z+(D8.isTouch?" pinch-zoom":""):"none";J===S9&&G(l1,Z)},oZ={auto:1,scroll:1},k4=function(J){var{event:Z,target:$,axis:K}=J,Q=(Z.changedTouches?Z.changedTouches[0]:Z).target,W=Q._gsap||c0.core.getCache(Q),z=o8(),q;if(!W._isScrollT||z-W._isScrollT>2000){while(Q&&Q!==l1&&(Q.scrollHeight<=Q.clientHeight&&Q.scrollWidth<=Q.clientWidth||!(oZ[(q=y9(Q)).overflowY]||oZ[q.overflowX])))Q=Q.parentNode;W._isScroll=Q&&Q!==$&&!DJ(Q)&&(oZ[(q=y9(Q)).overflowY]||oZ[q.overflowX]),W._isScrollT=z}if(W._isScroll||K==="x")Z.stopPropagation(),Z._gsapAllow=!0},a5=function(J,Z,$,K){return D8.create({target:J,capture:!0,debounce:!1,lockAxis:!0,type:Z,onWheel:K=K&&k4,onPress:K,onDrag:K,onScroll:K,onEnable:function(){return $&&f8(e1,D8.eventTypes[0],h5,!1,!0)},onDisable:function(){return w8(e1,D8.eventTypes[0],h5,!0)}})},S4=/(input|label|select|textarea)/i,x5,h5=function(J){var Z=S4.test(J.target.tagName);if(Z||x5)J._gsapAllow=!0,x5=Z},A4=function(J){LJ(J)||(J={}),J.preventDefault=J.isNormalizer=J.allowClicks=!0,J.type||(J.type="wheel,touch"),J.debounce=!!J.debounce,J.id=J.id||"normalizer";var Z=J,$=Z.normalizeScrollX,K=Z.momentum,Q=Z.allowNestedScroll,W=Z.onRelease,z,q,Y=K9(J.target)||S9,X=c0.core.globals().ScrollSmoother,H=X&&X.get(),O=c$&&(J.content&&K9(J.content)||H&&J.content!==!1&&!H.smooth()&&H.content()),N=B$(Y,I8),B=B$(Y,l8),R=1,P=(D8.isTouch&&M1.visualViewport?M1.visualViewport.scale*M1.visualViewport.width:M1.outerWidth)/M1.innerWidth,y=0,h=i8(K)?function(){return K(z)}:function(){return K||2.8},C,A,b=a5(Y,J.type,!0,Q),x=function(){return A=!1},k=Z$,f=Z$,T=function(){q=K$(Y,I8),f=u7(c$?1:0,q),$&&(k=u7(0,K$(Y,l8))),C=OJ},_=function(){O._gsap.y=v7(parseFloat(O._gsap.y)+N.offset)+"px",O.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(O._gsap.y)+", 0, 1)",N.offset=N.cacheID=0},d=function(){if(A){requestAnimationFrame(x);var C0=v7(z.deltaY/2),B0=f(N.v-C0);if(O&&B0!==N.v+N.offset){N.offset=B0-N.v;var l=v7((parseFloat(O&&O._gsap.y)||0)-N.offset);O.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+l+", 0, 1)",O._gsap.y=l+"px",N.cacheID=j1.cache,M$()}return!0}N.offset&&_(),A=!0},s,t,e,Z0,U0=function(){if(T(),s.isActive()&&s.vars.scrollY>q)N()>q?s.progress(1)&&N(q):s.resetTo("scrollY",q)};return O&&c0.set(O,{y:"+=0"}),J.ignoreCheck=function(H0){return c$&&H0.type==="touchmove"&&d(H0)||R>1.05&&H0.type!=="touchstart"||z.isGesturing||H0.touches&&H0.touches.length>1},J.onPress=function(){A=!1;var H0=R;R=v7((M1.visualViewport&&M1.visualViewport.scale||1)/P),s.pause(),H0!==R&&TQ(Y,R>1.01?!0:$?!1:"x"),t=B(),e=N(),T(),C=OJ},J.onRelease=J.onGestureStart=function(H0,C0){if(N.offset&&_(),!C0)Z0.restart(!0);else{j1.cache++;var B0=h(),l,E0;if($)l=B(),E0=l+B0*0.05*-H0.velocityX/0.227,B0*=f5(B,l,E0,K$(Y,l8)),s.vars.scrollX=k(E0);if(l=N(),E0=l+B0*0.05*-H0.velocityY/0.227,B0*=f5(N,l,E0,K$(Y,I8)),s.vars.scrollY=f(E0),s.invalidate().duration(B0).play(0.01),c$&&s.vars.scrollY>=q||l>=q-1)c0.to({},{onUpdate:U0,duration:B0})}W&&W(H0)},J.onWheel=function(){if(s._ts&&s.pause(),o8()-y>1000)C=0,y=o8()},J.onChange=function(H0,C0,B0,l,E0){if(OJ!==C&&T(),C0&&$&&B(k(l[2]===C0?t+(H0.startX-H0.x):B()+C0-l[1])),B0){N.offset&&_();var h0=E0[2]===B0,P0=h0?e+H0.startY-H0.y:N()+B0-E0[1],M0=f(P0);h0&&P0!==M0&&(e+=M0-P0),N(M0)}(B0||C0)&&M$()},J.onEnable=function(){if(TQ(Y,$?!1:"x"),x0.addEventListener("refresh",U0),f8(M1,"resize",U0),N.smooth)N.target.style.scrollBehavior="auto",N.smooth=B.smooth=!1;b.enable()},J.onDisable=function(){TQ(Y,!0),w8(M1,"resize",U0),x0.removeEventListener("refresh",U0),b.kill()},J.lockAxis=J.lockAxis!==!1,z=new D8(J),z.iOS=c$,c$&&!N()&&N(1),c$&&c0.ticker.add(Z$),Z0=z._dc,s=c0.to(z,{ease:"power4",paused:!0,inherit:!1,scrollX:$?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:r5(N,N(),function(){return s.pause()})},onUpdate:M$,onComplete:Z0.vars.onComplete}),z};x0.sort=function(G){if(i8(G))return V1.sort(G);var J=M1.pageYOffset||0;return x0.getAll().forEach(function(Z){return Z._sortY=Z.trigger?J+Z.trigger.getBoundingClientRect().top:Z.start+M1.innerHeight}),V1.sort(G||function(Z,$){return(Z.vars.refreshPriority||0)*-1e6+(Z.vars.containerAnimation?1e6:Z._sortY)-(($.vars.containerAnimation?1e6:$._sortY)+($.vars.refreshPriority||0)*-1e6)})};x0.observe=function(G){return new D8(G)};x0.normalizeScroll=function(G){if(typeof G>"u")return Q9;if(G===!0&&Q9)return Q9.enable();if(G===!1){Q9&&Q9.kill(),Q9=G;return}var J=G instanceof D8?G:A4(G);return Q9&&Q9.target===J.target&&Q9.kill(),DJ(J.target)&&(Q9=J),J};x0.core={_getVelocityProp:vZ,_inputObserver:a5,_scrollers:j1,_proxies:i9,bridge:{ss:function(){v9||EJ("scrollStart"),v9=o8()},ref:function(){return s8}}};u5()&&c0.registerPlugin(x0);/*! * SplitText 3.13.0 * https://gsap.com * * @license Copyright 2025, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license. * @author: Jack Doyle */var i7,tJ,oQ,T4=()=>oQ||jJ.register(window.gsap),t5=typeof Intl<"u"?new Intl.Segmenter:0,QK=(G)=>typeof G==="string"?QK(document.querySelectorAll(G)):("length"in G)?Array.from(G):[G],e5=(G)=>QK(G).filter((J)=>J instanceof HTMLElement),iQ=[],sQ=function(){},w4=/\s+/g,$W=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),JW={left:0,top:0,width:0,height:0},ZW=(G,J)=>{if(J){let Z=new Set(G.join("").match(J)||iQ),$=G.length,K,Q,W,z;if(Z.size)while(--$>-1){Q=G[$];for(W of Z)if(W.startsWith(Q)&&W.length>Q.length){K=0,z=Q;while(W.startsWith(z+=G[$+ ++K])&&z.lengthwindow.getComputedStyle(G).display==="inline"&&(G.style.display="inline-block"),eJ=(G,J,Z)=>J.insertBefore(typeof G==="string"?document.createTextNode(G):G,Z),nQ=(G,J,Z)=>{let $=J[G+"sClass"]||"",{tag:K="div",aria:Q="auto",propIndex:W=!1}=J,z=G==="line"?"block":"inline-block",q=$.indexOf("++")>-1,Y=(X)=>{let H=document.createElement(K),O=Z.length+1;if($&&(H.className=$+(q?" "+$+O:"")),W&&H.style.setProperty("--"+G,O+""),Q!=="none"&&H.setAttribute("aria-hidden","true"),K!=="span")H.style.position="relative",H.style.display=z;return H.textContent=X,Z.push(H),H};return q&&($=$.replace("++","")),Y.collection=Z,Y},f4=(G,J,Z,$)=>{let K=nQ("line",Z,$),Q=window.getComputedStyle(G).textAlign||"left";return(W,z)=>{let q=K("");q.style.textAlign=Q,G.insertBefore(q,J[W]);for(;W{var X;let H=Array.from(G.childNodes),O=0,{wordDelimiter:N,reduceWhiteSpace:B=!0,prepareText:R}=J,P=G.getBoundingClientRect(),y=P,h=!B&&window.getComputedStyle(G).whiteSpace.substring(0,3)==="pre",C=0,A=Z.collection,b,x,k,f,T,_,d,s,t,e,Z0,U0,H0,C0,B0,l,E0,h0;if(typeof N==="object")k=N.delimiter||N,x=N.replaceWith||"";else x=N===""?"":N||" ";b=x!==" ";for(;O-1)_=A[A.length-1],_.appendChild(document.createTextNode($?"":l));else _=Z($?"":l),eJ(_,G,f),C&&t===1&&!d&&_.insertBefore(C,_.firstChild);if($){Z0=t5?ZW([...t5.segment(l)].map((P0)=>P0.segment),q):l.match(z)||iQ;for(h0=0;h0y.top&&e.left<=y.left){U0=G.cloneNode(),H0=G.childNodes[0];while(H0&&H0!==_)C0=H0,H0=H0.nextSibling,U0.appendChild(C0);G.parentNode.insertBefore(U0,G),K&&KW(U0)}y=e}if(t=T.length?" ":b&&l.slice(-1)===" "?" "+x:x,G,f)}}G.removeChild(f),C=0}else if(f.nodeType===1){if(W&&W.indexOf(f)>-1)A.indexOf(f.previousSibling)>-1&&A[A.length-1].appendChild(f),C=f;else QW(f,J,Z,$,K,Q,W,z,q,!0),C=0;K&&KW(f)}},GW=class G{constructor(J,Z){this.isSplit=!1,T4(),this.elements=e5(J),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=Z,this._split=()=>this.isSplit&&this.split(this.vars);let $=[],K,Q=()=>{let W=$.length,z;while(W--){z=$[W];let q=z.element.offsetWidth;if(q!==z.width){z.width=q,this._split();return}}};this._data={orig:$,obs:typeof ResizeObserver<"u"&&new ResizeObserver(()=>{clearTimeout(K),K=setTimeout(Q,200)})},sQ(this),this.split(Z)}split(J){this.isSplit&&this.revert(),this.vars=J=J||this.vars||{};let{type:Z="chars,words,lines",aria:$="auto",deepSlice:K=!0,smartWrap:Q,onSplit:W,autoSplit:z=!1,specialChars:q,mask:Y}=this.vars,X=Z.indexOf("lines")>-1,H=Z.indexOf("chars")>-1,O=Z.indexOf("words")>-1,N=H&&!O&&!X,B=q&&("push"in q?new RegExp("(?:"+q.join("|")+")","gu"):q),R=B?new RegExp(B.source+"|"+$W.source,"gu"):$W,P=!!J.ignore&&e5(J.ignore),{orig:y,animTime:h,obs:C}=this._data,A;if(H||O||X)this.elements.forEach((b,x)=>{y[x]={element:b,html:b.innerHTML,ariaL:b.getAttribute("aria-label"),ariaH:b.getAttribute("aria-hidden")},$==="auto"?b.setAttribute("aria-label",(b.textContent||"").trim()):$==="hidden"&&b.setAttribute("aria-hidden","true");let k=[],f=[],T=[],_=H?nQ("char",J,k):null,d=nQ("word",J,f),s,t,e,Z0;if(QW(b,J,d,_,N,K&&(X||N),P,R,B,!1),X){let U0=QK(b.childNodes),H0=f4(b,U0,J,T),C0,B0=[],l=0,E0=U0.map((P0)=>P0.nodeType===1?P0.getBoundingClientRect():JW),h0=JW;for(s=0;sh0.top&&E0[s].left<=h0.left)H0(l,s),l=s;h0=E0[s]}l{var M0;return(M0=P0.parentNode)==null?void 0:M0.removeChild(P0)})}if(!O){for(s=0;s{let x=b.cloneNode();return b.replaceWith(x),x.appendChild(b),b.className&&(x.className=b.className.replace(/(\b\w+\b)/g,"$1-mask")),x.style.overflow="clip",x}));if(this.isSplit=!0,tJ&&(z?tJ.addEventListener("loadingdone",this._split):tJ.status==="loading"&&console.warn("SplitText called before fonts loaded")),(A=W&&W(this))&&A.totalTime)this._data.anim=h?A.totalTime(h):A;return X&&z&&this.elements.forEach((b,x)=>{y[x].width=b.offsetWidth,C&&C.observe(b)}),this}revert(){var J,Z;let{orig:$,anim:K,obs:Q}=this._data;if(Q&&Q.disconnect(),$.forEach(({element:W,html:z,ariaL:q,ariaH:Y})=>{W.innerHTML=z,q?W.setAttribute("aria-label",q):W.removeAttribute("aria-label"),Y?W.setAttribute("aria-hidden",Y):W.removeAttribute("aria-hidden")}),this.chars.length=this.words.length=this.lines.length=$.length=this.masks.length=0,this.isSplit=!1,tJ==null||tJ.removeEventListener("loadingdone",this._split),K)this._data.animTime=K.totalTime(),K.revert();return(Z=(J=this.vars).onRevert)==null||Z.call(J,this),this}static create(J,Z){return new G(J,Z)}static register(J){if(i7=i7||J||window.gsap,i7)QK=i7.utils.toArray,sQ=i7.core.context||sQ;if(!oQ&&window.innerWidth>0)tJ=document.fonts,oQ=!0}};GW.version="3.13.0";var jJ=GW;var WW=()=>{return window.matchMedia("(prefers-reduced-motion: reduce)").matches};y0.registerPlugin(x0);var x4={ease:"expo.out",duration:1.2};y0.defaults(x4);var Kq=WW(),g9=y0;class rQ{#$=[];add(G,J=0,Z=Symbol()){let $=this.#$.findIndex((K)=>K.priority>J);if($===-1)this.#$.push({fn:G,priority:J,id:Z});else this.#$.splice($,0,{fn:G,priority:J,id:Z});return()=>this.remove(Z)}remove(G){this.#$=this.#$.filter((J)=>J.id!==G)}notify(G){if(this.#$.length<1)return;this.#$.forEach((J)=>J.fn(G))}}class HW extends rQ{constructor(){super();g9.ticker.add(this.update.bind(this))}update(G,J){this.notify({deltaTime:G,time:J*0.01})}}class UW extends rQ{width=window.innerWidth;height=window.innerHeight;timeoutId=null;debounceDelay=100;constructor(){super();window.addEventListener("resize",this.update.bind(this))}update(){if(this.timeoutId)window.clearTimeout(this.timeoutId);console.log("update"),this.timeoutId=window.setTimeout(()=>{let{innerWidth:G,innerHeight:J}=window;if(G!==this.width||J!==this.height)this.width=G,this.height=J,this.notify({width:this.width,height:this.height});this.timeoutId=null},this.debounceDelay)}}var h4=new HW,Q$=new UW;var b4=[],aQ=[];function $7(G){aQ.push(G)}function n7(G){b4.push(G)}function qW(){aQ.forEach((G)=>G()),aQ.length=0}var zW=[],tQ=[];function GK(G,{element:J}={}){if(J)zW.push(async()=>{let Z=J.getBoundingClientRect();return Z.top0?await G():Promise.resolve()});else zW.push(G)}function WK(G){tQ.push(G)}async function LW(){await Promise.allSettled(tQ.map((G)=>G())),tQ.length=0,document.documentElement.classList.add("is-ready"),document.fonts.ready.then(function(){document.documentElement.classList.add("fonts-loaded")})}function FW(G,{root:J,rootMargin:Z,threshold:$,autoStart:K,once:Q,callback:W}){let z=new r7(G,{root:J,rootMargin:Z,threshold:$,autoStart:K,once:Q,callback:W});return n7(()=>{z.destroy()}),z}var $6={};X8($6,{HeroCoins:()=>OW});var J7=kK(YW());class OW{constructor(){this.rive=null,this.canvas=null,this.speedProperty=null,this.baseSpeed=0.8,this.currentSpeed=1,this.targetSpeed=1,this.lastScrollTime=Date.now(),this.observer=null,this.isVisible=!1,this.animationFrameId=null}isMobile(){return typeof window<"u"&&window.innerWidth<=this.mobileBreakpoint}init(){if(window.riveInstance)window.riveInstance.cleanup(),window.riveInstance=null;if(y0.registerPlugin(x0),this.canvas=document.getElementById("riveHero"),!this.canvas)return!1;return this.setupHighDPICanvas(),this.initializeRive(),this.setupIntersectionObserver(),!0}setupHighDPICanvas(){this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.objectFit="contain"}setupIntersectionObserver(){this.observer=new IntersectionObserver((G)=>{G.forEach((J)=>{if(this.isVisible=J.isIntersecting,this.rive)if(J.isIntersecting)this.rive.play();else this.rive.pause()})},{threshold:0.1}),this.observer.observe(this.canvas)}initializeRive(){this.rive=new J7.Rive({src:"https://cdn.prod.website-files.com/68da6f24db5fedbdab2e7d56/68e1788e590408f8a05d1655_threshold_10.riv",canvas:this.canvas,layoutScaleFactor:1,artboard:"main",stateMachines:"stateMachine",autoplay:!0,autoBind:!0,useOffscreenRenderer:!0,layout:new J7.Layout({fit:J7.Fit.Contain,alignment:"center"}),onLoad:()=>{this.rive.resizeDrawingSurfaceToCanvas();let G=this.rive.viewModelInstance;this.speedProperty=G.number("speed"),this.speedProperty.value=this.baseSpeed,this.setupScrollTrigger(),this.startSpeedLerp()}})}setupScrollTrigger(){x0.create({trigger:"#heroSection",start:"top 0%",end:"bottom top",scrub:1,onUpdate:(G)=>{let J=G.getVelocity();if(Math.abs(J)>10){this.lastScrollTime=Date.now();let Z=0.01;this.targetSpeed=this.baseSpeed+J*Z;let $=-3,K=3;this.targetSpeed=Math.max($,Math.min(K,this.targetSpeed))}}})}startSpeedLerp(){let G=()=>{if(!this.speedProperty||!this.isVisible){this.animationFrameId=requestAnimationFrame(G);return}if(Date.now()-this.lastScrollTime>100)this.targetSpeed=this.baseSpeed;let $=0.1;this.currentSpeed+=(this.targetSpeed-this.currentSpeed)*$,this.speedProperty.value=this.currentSpeed,this.animationFrameId=requestAnimationFrame(G)};G()}destroy(){if(this.animationFrameId)cancelAnimationFrame(this.animationFrameId);if(this.observer)this.observer.disconnect(),this.observer=null;if(this.rive)this.rive.cleanup(),this.rive=null;if(window.riveInstance)window.riveInstance=null;x0.getAll().forEach((G)=>G.kill())}}var J6={};X8(J6,{Accordion:()=>DW});y0.registerPlugin(x0);class DW{constructor(){this.isInitialized=!1,this.accordions=new Map}init(){if(this.isInitialized)return;this.initAccordions(),this.isInitialized=!0}initAccordions(){document.querySelectorAll(".accordion_wrap").forEach((G,J)=>{if(this.accordions.has(G))this.destroyAccordion(G);let Z=new NW(G,J);this.accordions.set(G,Z)})}destroyAccordion(G){let J=this.accordions.get(G);if(J)J.destroy(),this.accordions.delete(G)}destroy(){this.accordions.forEach((G,J)=>{this.destroyAccordion(J)}),this.isInitialized=!1}}class NW{constructor(G,J){this.container=G,this.index=J,this.timelines=[],this.closeFunctions=[],this.previousIndex=null,this.closePrevious=G.getAttribute("data-close-previous")!=="false",this.closeOnSecondClick=G.getAttribute("data-close-on-second-click")!=="false",this.openOnHover=G.getAttribute("data-open-on-hover")==="true";let Z=G.getAttribute("data-open-by-default");this.openByDefault=Z!==null&&!isNaN(+Z)?+Z:!1,this.list=G.querySelector(".accordion_list"),this.init()}init(){this.removeCMSList(),this.setupAccordionItems()}removeCMSList(){if(!this.list)return;let G=Array.from(this.list.children).find(($)=>$.classList.contains("w-dyn-list"));if(!G)return;let J=G?.firstElementChild?.children;if(!J)return;let Z=[...this.list.children];[...J].forEach(($)=>{if($.firstElementChild)this.list.appendChild($.firstElementChild)}),Z.forEach(($)=>$.remove())}setupAccordionItems(){this.container.querySelectorAll(".accordion_component").forEach((G,J)=>{G.style.setProperty("--_state---false","0");let Z=G.querySelector(".accordion_toggle_button"),$=G.querySelector(".accordion_content_wrap");if(!Z||!$){console.warn("Missing elements:",G);return}this.setupAccordionItem(G,Z,$,J)})}setupAccordionItem(G,J,Z,$){let K=`accordion_button_${this.index}_${$}`,Q=`accordion_content_${this.index}_${$}`;J.setAttribute("aria-expanded","false"),J.setAttribute("id",K),J.setAttribute("aria-controls",Q),Z.setAttribute("id",Q),Z.setAttribute("aria-labelledby",K),Z.style.display="none";let W=()=>{if(z.invalidate(),typeof x0<"u")x0.refresh()},z=y0.timeline({paused:!0,defaults:{duration:0.3,ease:"power1.inOut"},onComplete:W,onReverseComplete:W});z.set(Z,{display:"block"}),z.fromTo(Z,{height:0},{height:"auto"}),this.timelines.push(z);let q=()=>{if(G.classList.contains("is-active"))G.classList.remove("is-active"),z.reverse(),J.setAttribute("aria-expanded","false"),G.style.setProperty("--_state---false","0")};this.closeFunctions[$]=q;let Y=(X=!1)=>{if(this.closePrevious&&this.previousIndex!==null&&this.previousIndex!==$)this.closeFunctions[this.previousIndex]?.();if(this.previousIndex=$,J.setAttribute("aria-expanded","true"),G.classList.add("is-active"),G.style.setProperty("--_state---false","1"),X)z.progress(1);else z.play()};if(this.openByDefault===$+1)Y(!0);if(J.addEventListener("click",()=>{if(window.dispatchEvent(new CustomEvent("accordion:toggle",{detail:{force:15}})),G.classList.contains("is-active")&&this.closeOnSecondClick)q(),this.previousIndex=null;else Y()}),this.openOnHover)J.addEventListener("mouseenter",()=>Y())}destroy(){this.timelines.forEach((G)=>{if(G)G.kill()}),this.timelines=[],this.closeFunctions=[]}}var Z6={};X8(Z6,{CardBorder:()=>EW});class EW{constructor(){this.isInitialized=!1,this.cards=new Map,this.prefersReducedMotion=!1}init(){if(this.isInitialized)return;this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.initCards(),this.isInitialized=!0}initCards(){document.querySelectorAll("[data-card-border]").forEach((G,J)=>{if(this.cards.has(G))this.destroyCard(G);let Z=new jW(G,J,{prefersReducedMotion:this.prefersReducedMotion});this.cards.set(G,Z)})}destroyCard(G){let J=this.cards.get(G);if(J)J.destroy(),this.cards.delete(G)}destroy(){this.cards.forEach((G,J)=>{this.destroyCard(J)}),this.isInitialized=!1}}class jW{constructor(G,J,Z={}){this.container=G,this.index=J,this.options=Z,this.boundMouseMove=null,this.boundRecalc=null,this.rect=null,this.init()}init(){if(this.options.prefersReducedMotion)return;this.recalculateRect(),this.setupTracking(),this.setupResizeObserver()}recalculateRect(){this.rect=this.container.getBoundingClientRect()}setupResizeObserver(){this.boundRecalc=()=>this.recalculateRect(),window.addEventListener("resize",this.boundRecalc),window.addEventListener("scroll",this.boundRecalc,{passive:!0})}setupTracking(){this.boundMouseMove=this.handleMouseMove.bind(this),this.container.addEventListener("mousemove",this.boundMouseMove,{passive:!0})}handleMouseMove(G){if(!this.rect)return;let J=(G.clientX-this.rect.left)/this.rect.width*100,Z=(G.clientY-this.rect.top)/this.rect.height*100;this.container.style.setProperty("--_x",Math.round(J)+"%"),this.container.style.setProperty("--_y",Math.round(Z)+"%")}destroy(){if(this.boundMouseMove)this.container.removeEventListener("mousemove",this.boundMouseMove),this.boundMouseMove=null;if(this.boundRecalc)window.removeEventListener("resize",this.boundRecalc),window.removeEventListener("scroll",this.boundRecalc),this.boundRecalc=null;this.container.style.removeProperty("--_x"),this.container.style.removeProperty("--_y")}}var Q6={};X8(Q6,{CoinsAnimation:()=>HK});var Z7=kK(VW());class HK{constructor(G,J,Z=0.8,$="top 0%",K="bottom top"){this.canvasId=G,this.sectionId=J,this.rive=null,this.canvas=null,this.speedProperty=null,this.baseSpeed=Z,this.currentSpeed=Z,this.targetSpeed=Z,this.lastScrollTime=Date.now(),this.observer=null,this.isVisible=!1,this.animationFrameId=null,this.startTrigger=$,this.endTrigger=K}init(){if(y0.registerPlugin(x0),this.canvas=document.getElementById(this.canvasId),!this.canvas)return console.warn(`Canvas #${this.canvasId} not found`),!1;return this.setupHighDPICanvas(),this.setupRive(),this.setupIntersectionObserver(),!0}setupHighDPICanvas(){this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.objectFit="contain"}setupIntersectionObserver(){this.observer=new IntersectionObserver((G)=>{G.forEach((J)=>{if(this.isVisible=J.isIntersecting,this.rive)if(J.isIntersecting)this.rive.play();else this.rive.pause()})},{threshold:0.1}),this.observer.observe(this.canvas)}setupRive(){this.rive=new Z7.Rive({src:"https://cdn.prod.website-files.com/68da6f24db5fedbdab2e7d56/68e1788e590408f8a05d1655_threshold_10.riv",canvas:this.canvas,layoutScaleFactor:1,artboard:"main",stateMachines:"stateMachine",autoplay:!0,autoBind:!0,useOffscreenRenderer:!0,layout:new Z7.Layout({fit:Z7.Fit.Contain,alignment:"center"}),onLoad:()=>{this.rive.resizeDrawingSurfaceToCanvas();let G=this.rive.viewModelInstance;this.speedProperty=G.number("speed"),this.speedProperty.value=this.baseSpeed,this.setupScrollTrigger(),this.startSpeedLerp()}})}setupScrollTrigger(){x0.create({trigger:`#${this.sectionId}`,start:this.startTrigger,end:this.endTrigger,scrub:1,onUpdate:(G)=>{let J=G.getVelocity();if(Math.abs(J)>10){this.lastScrollTime=Date.now();let Z=0.01;this.targetSpeed=this.baseSpeed+J*Z;let $=-3,K=3;this.targetSpeed=Math.max($,Math.min(K,this.targetSpeed))}}})}startSpeedLerp(){let G=()=>{if(!this.speedProperty||!this.isVisible){this.animationFrameId=requestAnimationFrame(G);return}if(Date.now()-this.lastScrollTime>100)this.targetSpeed=this.baseSpeed;let $=0.1;this.currentSpeed+=(this.targetSpeed-this.currentSpeed)*$,this.speedProperty.value=this.currentSpeed,this.animationFrameId=requestAnimationFrame(G)};G()}destroy(){if(this.animationFrameId)cancelAnimationFrame(this.animationFrameId);if(this.observer)this.observer.disconnect(),this.observer=null;if(this.rive)this.rive.cleanup(),this.rive=null;x0.getAll().forEach((G)=>{if(G.vars.trigger===`#${this.sectionId}`)G.kill()})}}var W6={};X8(W6,{CoinsGravity:()=>RW});var I$=kK(BW());class RW{constructor(){this.isInitialized=!1,this.gravities=new Map,this.prefersReducedMotion=!1}init(){if(this.isInitialized)return;this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let G=window.innerWidth<=768;this.initGravities(G),this.isInitialized=!0}initGravities(G){document.querySelectorAll("[data-gravity]").forEach((Z,$)=>{if(this.gravities.has(Z))this.destroyGravity(Z);let K=new CW(Z,$,{prefersReducedMotion:this.prefersReducedMotion,isMobile:G});this.gravities.set(Z,K)})}triggerJump(G){this.gravities.forEach((J)=>{J.jump(G)})}destroyGravity(G){let J=this.gravities.get(G);if(J)J.destroy(),this.gravities.delete(G)}destroy(){this.gravities.forEach((G,J)=>{this.destroyGravity(J)}),this.isInitialized=!1}}class CW{constructor(G,J,Z={}){this.container=G,this.index=J,this.options=Z,this.engine=null,this.render=null,this.runner=null,this.world=null,this.mouse=null,this.mouseConstraint=null,this.boundaries=[],this.coinBodies=[],this.oldWidth=0,this.oldHeight=0,this.isVisible=!1,this.hasInitialized=!1,this.handleResize=this.handleResize.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.click=!1,this.config=this.getConfiguration(),this.setupIntersectionObserver()}getConfiguration(){let G=parseFloat(this.container.getAttribute("data-gravity-x"))||0,J=parseFloat(this.container.getAttribute("data-gravity-y"))||2,Z=parseFloat(this.container.getAttribute("data-duplication-factor"))||2.5;return{gravityX:G,gravityY:J,duplicationFactor:Z,baseCoins:this.getBaseCoins()}}getBaseCoins(){let G=this.options.isMobile||!1,J=G?100:144,Z=G?102:146;return[this.createCoin("TBTC",J,J,"https://cdn.prod.website-files.com/68da6f24db5fedbdab2e7d56/68dc0f20cc3fcd96decab7f7_tbtc.svg"),this.createCoin("BTC",Z,Z,"https://cdn.prod.website-files.com/68da6f24db5fedbdab2e7d56/68dc0dca7fd5ce90b30e8acb_btc.svg")]}createCoin(G,J,Z,$){return{text:G,width:J,height:Z,url:$}}setupIntersectionObserver(){let G={root:null,rootMargin:"0px",threshold:0.4};this.observer=new IntersectionObserver((J)=>{J.forEach((Z)=>{if(Z.isIntersecting&&!this.hasInitialized)this.isVisible=!0,this.init(),this.hasInitialized=!0;else if(Z.isIntersecting&&this.hasInitialized)this.isVisible=!0,this.resume();else this.isVisible=!1,this.pause()})},G),this.observer.observe(this.container)}pause(){if(this.runner&&this.engine)this.runner.enabled=!1}resume(){if(this.runner&&this.engine)this.runner.enabled=!0}init(){if(this.options.prefersReducedMotion)return;let{Engine:G,Render:J,MouseConstraint:Z,Mouse:$,World:K,Bodies:Q,Runner:W}=I$.default;this.engine=G.create(),this.world=this.engine.world,this.engine.gravity.x=this.config.gravityX,this.engine.gravity.y=this.config.gravityY,this.engine.positionIterations=10,this.engine.velocityIterations=8,this.engine.constraintIterations=4;let z=this.container.clientWidth,q=this.container.clientHeight;if(z===0||q===0){console.error("Container has no dimensions!");return}this.oldWidth=z,this.oldHeight=q,this.render=J.create({element:this.container,engine:this.engine,options:{width:z,height:q,pixelRatio:2,background:"transparent",wireframes:!1}}),this.createBoundaries();let Y=this.prepareCoins();this.preloadImages(Y).then(()=>{this.createCoinBodies(Y),this.runner=W.create(),W.run(this.runner,this.engine),J.run(this.render)}).catch((X)=>{console.error("Failed to load images:",X)}),this.setupMouseInteraction(),window.addEventListener("resize",this.handleResize),document.addEventListener("mousedown",this.onMouseDown),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)}createBoundaries(){let{World:G,Bodies:J}=I$.default,Z=this.container.clientWidth,$=this.container.clientHeight;this.boundaries.forEach((X)=>G.remove(this.world,X)),this.boundaries=[];let K=(X,H,O,N,B={})=>{return J.rectangle(X,H,O,N,{isStatic:!0,restitution:0.3,friction:0.1,...B})},Q=100,W=K(Z/2,$+Q/2,Z+Q*2,Q,{render:{fillStyle:"transparent"}}),z=K(-Q/2,$/2,Q,$+Q*2,{render:{fillStyle:"transparent"}}),q=K(Z+Q/2,$/2,Q,$+Q*2,{render:{fillStyle:"transparent"}}),Y=K(Z/2,-Q/2,Z+Q*2,Q,{render:{fillStyle:"transparent"}});this.boundaries.push(W,z,q,Y),G.add(this.world,this.boundaries)}prepareCoins(){let G=[];for(let J=0;J{G.push({...Z})});return G}preloadImages(G){return Promise.all(G.map((J)=>new Promise((Z,$)=>{let K=new Image;K.onload=()=>Z(K),K.onerror=()=>{console.error(`Failed to load image: ${J.url}`),$(Error(`Image load error for ${J.url}`))},K.src=J.url})))}createCoinBodies(G){let{World:J,Bodies:Z}=I$.default,$=this.container.clientWidth,K=this.container.clientHeight;this.coinBodies=G.map((Q)=>{let W=this.getRandomPosition($,K/2),z=this.getRandomVelocity(),q=144,Y=Q.width/144,X=Z.rectangle(W.x,W.y,Q.width,Q.height,{chamfer:{radius:20},render:{sprite:{texture:Q.url,xScale:Y,yScale:Y}},restitution:0.6,friction:0.05,frictionAir:0.02,density:0.001,slop:0.05});return I$.default.Body.setVelocity(X,z),X}),J.add(this.world,this.coinBodies)}getRandomPosition(G,J){return{x:Math.random()*G,y:Math.random()*J}}getRandomVelocity(){return{x:(Math.random()-0.5)*4,y:(Math.random()-0.5)*4}}setupMouseInteraction(){let{MouseConstraint:G,Mouse:J,World:Z}=I$.default;this.mouse=J.create(this.render.canvas),this.mouseConstraint=G.create(this.engine,{mouse:this.mouse,constraint:{stiffness:0.2,render:{visible:!1}}}),Z.add(this.world,this.mouseConstraint),this.render.mouse=this.mouse,this.removeDefaultMouseEvents()}removeDefaultMouseEvents(){if(this.mouse&&this.mouse.element)this.mouse.element.removeEventListener("mousewheel",this.mouse.mousewheel),this.mouse.element.removeEventListener("DOMMouseScroll",this.mouse.mousewheel)}onMouseDown(){this.click=!0}onMouseMove(){this.click=!1}onMouseUp(){}handleResize(){this.resizeCanvas(),this.scaleBodiesToFit(),this.createBoundaries()}resizeCanvas(){this.oldWidth=this.render.options.width,this.oldHeight=this.render.options.height;let G=this.container.clientWidth,J=this.container.clientHeight;this.render.canvas.width=G*this.render.options.pixelRatio,this.render.canvas.height=J*this.render.options.pixelRatio,this.render.canvas.style.width=`${G}px`,this.render.canvas.style.height=`${J}px`,this.render.options.width=G,this.render.options.height=J}scaleBodiesToFit(){let{Body:G}=I$.default;if(!this.oldWidth||!this.oldHeight)return;let J=this.container.clientWidth,Z=this.container.clientHeight,$=J/this.oldWidth,K=Z/this.oldHeight;this.coinBodies.forEach((Q)=>{G.scale(Q,$,K);let W=Q.position.x*$,z=Q.position.y*K;G.setPosition(Q,{x:W,y:z})})}jump(G=15){if(!this.engine||!this.coinBodies.length)return;let{Body:J}=I$.default;this.coinBodies.forEach((Z)=>{let $=(Math.random()-0.5)*15;J.setVelocity(Z,{x:Z.velocity.x+$,y:-G})})}destroy(){let{World:G,Render:J,Runner:Z,Engine:$}=I$.default;if(this.observer)this.observer.disconnect(),this.observer=null;if(window.removeEventListener("resize",this.handleResize),document.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp),this.removeDefaultMouseEvents(),this.runner)Z.stop(this.runner),this.runner=null;if(this.render){if(J.stop(this.render),this.render.canvas)this.render.canvas.remove();this.render=null}if(this.world)G.clear(this.world,!1),this.world=null;if(this.engine)$.clear(this.engine),this.engine=null;this.coinBodies=[],this.boundaries=[],this.mouse=null,this.mouseConstraint=null}}var H6={};X8(H6,{Counter:()=>MW});y0.registerPlugin(x0);class MW{constructor(){this.isInitialized=!1,this.counters=[]}init(){if(this.isInitialized)return;let G=document.querySelectorAll("[data-counter]");if(G.length===0)return;G.forEach((J,Z)=>{this.setupCounter(J,Z)}),this.isInitialized=!0}setupCounter(G,J){let Z=G.textContent.trim();if(!this.isValidNumber(Z))return;let $={element:G,finalNumber:Z,originalValue:this.parseNumberValue(Z),currentValue:0,hasDecimal:Z.includes("."),decimalPlaces:this.getDecimalPlaces(Z),scrollTrigger:null};if($.hasDecimal)$.element.textContent=0 .toFixed($.decimalPlaces);else{let K=Math.floor($.originalValue).toString().length;$.element.textContent=this.formatNumberWithLeadingZeros(0,K)}this.counters.push($),this.setupScrollTrigger($,J)}isValidNumber(G){return/^[\d,\.+]+$/.test(G)}getDecimalPlaces(G){let J=G.split(".");return J.length>1?J[1].replace(/,/g,"").length:0}parseNumberValue(G){let J=G.replace(/[,+]/g,"");return parseFloat(J)}formatNumberWithLeadingZeros(G,J){return G.toString().padStart(J,"0").replace(/\B(?=(\d{3})+(?!\d))/g,",")}setupScrollTrigger(G,J){G.scrollTrigger=x0.create({trigger:G.element,start:"top 80%",markers:!1,onEnter:()=>this.animateCounter(G),once:!0})}animateCounter(G){G.currentValue=0,y0.to(G,{currentValue:G.originalValue,duration:2,ease:"power2.out",onUpdate:()=>{if(G.hasDecimal)G.element.textContent=G.currentValue.toFixed(G.decimalPlaces);else{let J=Math.floor(G.currentValue),Z=Math.floor(G.originalValue).toString().length;G.element.textContent=this.formatNumberWithLeadingZeros(J,Z)}}})}destroy(){this.counters.forEach((G)=>{if(G.scrollTrigger)G.scrollTrigger.kill(),G.scrollTrigger=null;G.element.textContent=G.finalNumber}),this.counters=[],this.isInitialized=!1}refresh(){x0.refresh()}toggle(G=!0){this.counters.forEach((J)=>{if(J.scrollTrigger)if(G)J.scrollTrigger.enable();else J.scrollTrigger.disable()})}}var U6={};X8(U6,{default:()=>PW});class IW{events;constructor(){this.events={}}on(G,J){if(!this.events[G])this.events[G]=[];this.events[G].push(J)}once(G,J){let Z=($)=>{J($),this.off(G,Z)};this.on(G,Z)}off(G,J){if(!this.events[G])return;this.events[G]=this.events[G].filter((Z)=>Z!==J)}emit(G,J){if(!this.events[G])return;this.events[G].forEach((Z)=>Z(J))}}class G${static emitter=new IW;static state={};static createProxy(G){return new Proxy(G,{set:function(J,Z,$,K){return G$.emitter.emit(Z.toString(),$),Reflect.set(J,Z,$,K)}})}static proxy=new Proxy(G$.state,{set:function(G,J,Z,$){if(typeof Z==="object"&&Z!==null)Z=G$.createProxy(Z);return G$.emitter.emit(J.toString(),Z),Reflect.set(G,J,Z,$)}});static on(G,J){this.emitter.on(G,J)}static once(G,J){this.emitter.once(G,J)}static off(G,J){this.emitter.off(G,J)}}var y4={get(G,J){if(typeof J==="string"&&J in G$)return G$[J].bind(G$);return G[J]},set(G,J,Z,$){return Reflect.set(G$.proxy,J,Z,$)}},UK=new Proxy(G$.proxy,y4);function PW(G,J){UK.on("SOMETHING",(Z)=>{console.log("something",Z)}),WK(async()=>{await g9.to(G,{duration:0.2,backgroundColor:"green"})}),GK(async()=>{await g9.to(G,{duration:1,backgroundColor:"blue"}),await g9.to(G,{duration:1,autoAlpha:0})},{element:G}),$7(()=>{}),n7(()=>{})}var R6={};X8(R6,{DotsAnimation:()=>iW});/*! * paths 3.13.0 * https://gsap.com * * Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var v4=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,g4=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,_4=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,u4=/(^[#\.][a-z]|[a-y][a-z])/i,m4=Math.PI/180,d4=180/Math.PI,zK=Math.sin,qK=Math.cos,_9=Math.abs,P$=Math.sqrt,c4=Math.atan2,z6=1e8,kW=function(J){return typeof J==="string"},fW=function(J){return typeof J==="number"},p4=function(J){return typeof J>"u"},l4={},s4={},LK=1e5,xW=function(J){return Math.round((J+z6)%1*LK)/LK||(J<0?0:1)},d1=function(J){return Math.round(J*LK)/LK||0},SW=function(J){return Math.round(J*10000000000)/10000000000||0},AW=function(J,Z,$,K){var Q=J[Z],W=K===1?6:q6(Q,$,K);if((W||!K)&&W+$+2Z){while(--Q&&J[Q]>Z);Q<0&&(Q=0)}else while(J[++Q] element or an SVG path data string"):kW(G)?VJ(G):fW(G[0])?[G]:G}function n4(G){var J=[],Z=0;for(;Z-1)if(W=K[Q].nodeName.toLowerCase(),Z.indexOf(","+W+",")<0)$.setAttributeNS(null,W,K[Q].nodeValue);return $},t4={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"},e4=function(J,Z){var $=Z?Z.split(","):[],K={},Q=$.length;while(--Q>-1)K[$[Q]]=+J.getAttribute($[Q])||0;return K};function bW(G,J){var Z=G.tagName.toLowerCase(),$=0.552284749831,K,Q,W,z,q,Y,X,H,O,N,B,R,P,y,h,C,A,b,x,k,f,T;if(Z==="path"||!G.getBBox)return G;if(Y=a4(G,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),T=e4(G,t4[Z]),Z==="rect")if(z=T.rx,q=T.ry||z,Q=T.x,W=T.y,N=T.width-z*2,B=T.height-q*2,z||q)R=Q+z*(1-$),P=Q+z,y=P+N,h=y+z*$,C=y+z,A=W+q*(1-$),b=W+q,x=b+B,k=x+q*$,f=x+q,K="M"+C+","+b+" V"+x+" C"+[C,k,h,f,y,f,y-(y-P)/3,f,P+(y-P)/3,f,P,f,R,f,Q,k,Q,x,Q,x-(x-b)/3,Q,b+(x-b)/3,Q,b,Q,A,R,W,P,W,P+(y-P)/3,W,y-(y-P)/3,W,y,W,h,W,C,A,C,b].join(",")+"z";else K="M"+(Q+N)+","+W+" v"+B+" h"+-N+" v"+-B+" h"+N+"z";else if(Z==="circle"||Z==="ellipse"){if(Z==="circle")z=q=T.r,H=z*$;else z=T.rx,q=T.ry,H=q*$;Q=T.cx,W=T.cy,X=z*$,K="M"+(Q+z)+","+W+" C"+[Q+z,W+H,Q+X,W+q,Q,W+q,Q-X,W+q,Q-z,W+H,Q-z,W,Q-z,W-H,Q-X,W-q,Q,W-q,Q+X,W-q,Q+z,W-H,Q+z,W].join(",")+"z"}else if(Z==="line")K="M"+T.x1+","+T.y1+" L"+T.x2+","+T.y2;else if(Z==="polyline"||Z==="polygon"){if(O=(G.getAttribute("points")+"").match(g4)||[],Q=O.shift(),W=O.shift(),K="M"+Q+","+W+" L"+O.join(","),Z==="polygon")K+=","+Q+","+W+"z"}if(Y.setAttribute("d",JZ(Y._gsRawPath=VJ(K))),J&&G.parentNode)G.parentNode.insertBefore(Y,G),G.parentNode.removeChild(G);return Y}function yW(G,J,Z){var $=G[J],K=G[J+2],Q=G[J+4],W;return $+=(K-$)*Z,K+=(Q-K)*Z,$+=(K-$)*Z,W=K+(Q+(G[J+6]-Q)*Z-K)*Z-$,$=G[J+1],K=G[J+3],Q=G[J+5],$+=(K-$)*Z,K+=(Q-K)*Z,$+=(K-$)*Z,d1(c4(K+(Q+(G[J+7]-Q)*Z-K)*Z-$,W)*d4)}function L6(G,J,Z){Z=p4(Z)?1:SW(Z)||0,J=SW(J)||0;var $=Math.max(0,~~(_9(Z-J)-0.00000001)),K=n4(G);if(J>Z)J=1-J,Z=1-Z,o4(K),K.totalLength=0;if(J<0||Z<0){var Q=Math.abs(~~Math.min(J,Z))+1;J+=Q,Z+=Q}K.totalLength||p$(K);var W=Z>1,z=wW(K,J,l4,!0),q=wW(K,Z,s4),Y=q.segment,X=z.segment,H=q.segIndex,O=z.segIndex,N=q.i,B=z.i,R=O===H,P=N===B&&R,y,h,C,A,b,x,k,f;if(W||$){if(y=HH)&&K.splice(A,1)}else Y.angle=yW(Y,N+C,0),N+=C,z=Y[N],q=Y[N+1],Y.length=Y.totalLength=0,Y.totalPoints=K.totalPoints=8,Y.push(z,q,z,q,z,q,z,q);return K.totalLength=0,K}function $z(G,J,Z){if(J=J||0,!G.samples)G.samples=[],G.lookup=[];var $=~~G.resolution||12,K=1/$,Q=Z?J+Z*6+1:G.length,W=G[J],z=G[J+1],q=J?J/6*$:0,Y=G.samples,X=G.lookup,H=(J?G.minLength:z6)||z6,O=Y[q+Z*$-1],N=J?Y[q-1]:0,B,R,P,y,h,C,A,b,x,k,f,T,_,d,s,t,e;Y.length=X.length=0;for(R=J+2;R8)G.splice(R,6),R-=6,Q-=6}else for(B=1;B<=$;B++){if(d=K*B,_=1-d,C=A-(A=(d*d*P+3*_*(d*y+_*h))*d),f=T-(T=(d*d*b+3*_*(d*x+_*k))*d),t=P$(f*f+C*C),t=1)return 0;var $=G[J],K=G[J+1],Q=G[J+2],W=G[J+3],z=G[J+4],q=G[J+5],Y=G[J+6],X=G[J+7],H=$+(Q-$)*Z,O=Q+(z-Q)*Z,N=K+(W-K)*Z,B=W+(q-W)*Z,R=H+(O-H)*Z,P=N+(B-N)*Z,y=z+(Y-z)*Z,h=q+(X-q)*Z;return O+=(y-O)*Z,B+=(h-B)*Z,G.splice(J+2,4,d1(H),d1(N),d1(R),d1(P),d1(R+(O-R)*Z),d1(P+(B-P)*Z),d1(O),d1(B),d1(y),d1(h)),G.samples&&G.samples.splice(J/6*G.resolution|0,0,0,0,0,0,0,0),6}function wW(G,J,Z,$){if(Z=Z||{},G.totalLength||p$(G),J<0||J>1)J=xW(J);var K=0,Q=G[0],W,z,q,Y,X,H,O;if(!J)O=H=K=0,Q=G[0];else if(J===1)O=1,K=G.length-1,Q=G[K],H=Q.length-8;else{if(G.length>1){q=G.totalLength*J,X=H=0;while((X+=G[H++].totalLength)1)J=xW(J);if(K.lookup||p$(G),G.length>1){q=G.totalLength*J,X=H=0;while((X+=G[H++].totalLength)=1?0.999999999:O?O:0.000000001):K.angle||0;return Q}function l$(G,J,Z,$,K,Q,W){var z=G.length,q,Y,X,H,O;while(--z>-1){q=G[z],Y=q.length;for(X=0;X1)Z=P$(A)*Z,$=P$(A)*$;var b=Z*Z,x=$*$,k=(b*x-b*C-x*h)/(b*C+x*h);if(k<0)k=0;var f=(Q===W?-1:1)*P$(k),T=f*(Z*y/$),_=f*-($*P/Z),d=(G+z)/2,s=(J+q)/2,t=d+(X*T-H*_),e=s+(H*T+X*_),Z0=(P-T)/Z,U0=(y-_)/$,H0=(-P-T)/Z,C0=(-y-_)/$,B0=Z0*Z0+U0*U0,l=(U0<0?-1:1)*Math.acos(Z0/P$(B0)),E0=(Z0*C0-U0*H0<0?-1:1)*Math.acos((Z0*H0+U0*C0)/P$(B0*(H0*H0+C0*C0)));if(isNaN(E0)&&(E0=O),!W&&E0>0)E0-=N;else if(W&&E0<0)E0+=N;l%=N,E0%=N;var h0=Math.ceil(_9(E0)/(N/4)),P0=[],M0=E0/h0,i0=1.3333333333333333*zK(M0/2)/(1+qK(M0/2)),A0=X*Z,J1=H*Z,e0=H*-$,G1=X*$,n0;for(n0=0;n0-0.0001?0:_}).match(v4)||[],Z=[],$=0,K=0,Q=0.6666666666666666,W=J.length,z=0,q="ERROR: malformed path: "+G,Y,X,H,O,N,B,R,P,y,h,C,A,b,x,k,f=function(_,d,s,t){h=(s-_)/3,C=(t-d)/3,R.push(_+h,d+C,s-h,t-C,s,t)};if(!G||!isNaN(J[0])||isNaN(J[1]))return console.log(q),Z;for(Y=0;Y0.5||_9(K-O)>0.5){if(f($,K,H,O),N==="L")Y+=2}$=H,K=O}else if(N==="A"){if(x=J[Y+4],k=J[Y+5],h=J[Y+6],C=J[Y+7],X=7,x.length>1){if(x.length<3)C=h,h=k,X--;else C=k,h=x.substr(2),X-=2;k=x.charAt(1),x=x.charAt(0)}if(A=Jz($,K,+J[Y+1],+J[Y+2],+J[Y+3],+x,+k,(B?$:0)+h*1,(B?K:0)+C*1),Y+=X,A)for(X=0;X1?Wz(Y):Y.getItem(0).matrix,H=Y.a*X.x+Y.c*X.y,O=Y.b*X.x+Y.d*X.y;else Y=new QZ,H=O=0;if(Z&&J.tagName.toLowerCase()==="g")H=O=0;(K?$:W).appendChild(q),q.setAttribute("transform","matrix("+Y.a+","+Y.b+","+Y.c+","+Y.d+","+(Y.e+H)+","+(Y.f+O)+")")}else{if(H=O=0,gW){Y=J.offsetParent,X=J;while(X&&(X=X.parentNode)&&X!==Y&&X.parentNode)if((BJ.getComputedStyle(X)[n9]+"").length>4)H=X.offsetLeft,O=X.offsetTop,X=0}if(N=BJ.getComputedStyle(J),N.position!=="absolute"&&N.position!=="fixed"){Y=J.offsetParent;while(W&&W!==Y)H+=W.scrollLeft||0,O+=W.scrollTop||0,W=W.parentNode}X=q.style,X.top=J.offsetTop-O+"px",X.left=J.offsetLeft-H+"px",X[n9]=N[n9],X[O6]=N[O6],X.position=N.position==="fixed"?"fixed":"absolute",z.appendChild(q)}return q},Y6=function(J,Z,$,K,Q,W,z){return J.a=Z,J.b=$,J.c=K,J.d=Q,J.e=W,J.f=z,J},QZ=function(){function G(Z,$,K,Q,W,z){if(Z===void 0)Z=1;if($===void 0)$=0;if(K===void 0)K=0;if(Q===void 0)Q=1;if(W===void 0)W=0;if(z===void 0)z=0;Y6(this,Z,$,K,Q,W,z)}var J=G.prototype;return J.inverse=function(){var $=this.a,K=this.b,Q=this.c,W=this.d,z=this.e,q=this.f,Y=$*W-K*Q||0.0000000001;return Y6(this,W/Y,-K/Y,-Q/Y,$/Y,(Q*q-W*z)/Y,-($*q-K*z)/Y)},J.multiply=function($){var K=this.a,Q=this.b,W=this.c,z=this.d,q=this.e,Y=this.f,X=$.a,H=$.c,O=$.b,N=$.d,B=$.e,R=$.f;return Y6(this,X*K+O*W,X*Q+O*z,H*K+N*W,H*Q+N*z,q+B*K+R*W,Y+B*Q+R*z)},J.clone=function(){return new G(this.a,this.b,this.c,this.d,this.e,this.f)},J.equals=function($){var K=this.a,Q=this.b,W=this.c,z=this.d,q=this.e,Y=this.f;return K===$.a&&Q===$.b&&W===$.c&&z===$.d&&q===$.e&&Y===$.f},J.apply=function($,K){if(K===void 0)K={};var{x:Q,y:W}=$,z=this.a,q=this.b,Y=this.c,X=this.d,H=this.e,O=this.f;return K.x=Q*z+W*Y+H||0,K.y=Q*q+W*X+O||0,K},G}();function RJ(G,J,Z,$){if(!G||!G.parentNode||(k$||_W(G)).documentElement===G)return new QZ;var K=Zz(G),Q=N6(G),W=Q?uW:mW,z=Uz(G,Z),q=W[0].getBoundingClientRect(),Y=W[1].getBoundingClientRect(),X=W[2].getBoundingClientRect(),H=z.parentNode,O=!$&&Gz(G),N=new QZ((Y.left-q.left)/100,(Y.top-q.top)/100,(X.left-q.left)/100,(X.top-q.top)/100,q.left+(O?0:Qz()),q.top+(O?0:Kz()));if(H.removeChild(z),K){q=K.length;while(q--)Y=K[q],Y.scaleX=Y.scaleY=0,Y.renderTransform(1,Y)}return J?N.inverse():N}/*! * MotionPathPlugin 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var zz="x,translateX,left,marginLeft,xPercent".split(","),qz="y,translateY,top,marginTop,yPercent".split(","),Lz=Math.PI/180,u9,lW,K7,j6,E6,dW,Fz=function(){return u9||typeof window<"u"&&(u9=window.gsap)&&u9.registerPlugin&&u9},GZ=function(J,Z,$,K){var Q=Z.length,W=K===2?0:K,z=0,q;for(;z1)J=1;else if(J<0)J=0;while(K--)F6($[K],J,!K&&Z.rotate,$[K]);while(Q)Q.set(Q.t,Q.p,Q.path[Q.pp]+Q.u,Q.d,J),Q=Q._next;Z.rotate&&Z.rSet(Z.target,Z.rProp,$[0].angle*(Z.radians?Lz:1)+Z.rOffset+Z.ru,Z,J)}else Z.styles.revert()},getLength:function(J){return p$($Z(J)).totalLength},sliceRawPath:L6,getRawPath:$Z,pointsToSegment:FK,stringToRawPath:VJ,rawPathToString:JZ,transformRawPath:l$,getGlobalMatrix:RJ,getPositionOnPath:F6,cacheRawPathMeasurements:p$,convertToPath:function(J,Z){return j6(J).map(function($){return bW($,Z!==!1)})},convertCoordinates:function(J,Z,$){var K=RJ(Z,!0,!0).multiply(RJ(J));return $?K.apply($):K},getAlignMatrix:V6,getRelativePosition:function(J,Z,$,K){var Q=V6(J,Z,$,K);return{x:Q.e,y:Q.f}},arrayToRawPath:function(J,Z){Z=Z||{};var $=GZ(GZ([],J,Z.x||"x",0),J,Z.y||"y",1);return Z.relative&&sW($),[Z.type==="cubic"?$:FK($,Z.curviness)]}};Fz()&&u9.registerPlugin(B6);y0.registerPlugin(B6);class iW{constructor(){this.isInitialized=!1,this.dots=new Map,this.prefersReducedMotion=!1}init(){if(this.isInitialized)return;this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.initDots(),this.isInitialized=!0}initDots(){document.querySelectorAll("[data-dots]").forEach((G,J)=>{if(this.dots.has(G))this.destroyDot(G);let Z=new nW(G,J,{prefersReducedMotion:this.prefersReducedMotion});this.dots.set(G,Z)})}destroyDot(G){let J=this.dots.get(G);if(J)J.destroy(),this.dots.delete(G)}destroy(){this.dots.forEach((G,J)=>{this.destroyDot(J)}),this.isInitialized=!1}}class nW{constructor(G,J,Z={}){this.container=G,this.index=J,this.options=Z,this.timelines=[],this.svgElements=[],this.circles=this.getDefaultCircles(),this.colors=["#7D00FF","#7D00FF"],this.numDots=5,this.init()}init(){if(this.options.prefersReducedMotion)return;let G=this.container.getAttribute("data-dots-count");if(G)this.numDots=parseInt(G,10);let J=this.container.getAttribute("data-dots-colors");if(J)this.colors=J.split(",").map(($)=>$.trim());let Z=this.container.getAttribute("data-dots-circles");if(Z)try{this.circles=JSON.parse(Z)}catch($){console.warn("Invalid circles data, using defaults")}this.setupDots()}getDefaultCircles(){return[{cx:690.183,cy:690.183,r:513.183},{cx:689.496,cy:689.496,r:466.496},{cx:690.421,cy:690.421,r:428.421},{cx:690.406,cy:690.406,r:392.406},{cx:689.896,cy:689.896,r:356.896},{cx:689.954,cy:689.954,r:316.954},{cx:690.305,cy:690.305,r:280.305},{cx:690.293,cy:690.293,r:242.293},{cx:689.958,cy:689.958,r:208.958},{cx:690.345,cy:690.345,r:167.345},{cx:689.94,cy:689.94,r:129.94},{cx:690.259,cy:690.259,r:95.2588},{cx:689.758,cy:689.758,r:65.7582},{cx:690.089,cy:690.089,r:40.0886},{cx:690.178,cy:690.178,r:14.178},{cx:689.643,cy:689.643,r:587.643},{cx:690.372,cy:690.372,r:621.372},{cx:689.846,cy:689.846,r:654.846},{cx:689.944,cy:689.944,r:689.944},{cx:689.53,cy:689.53,r:552.53}]}setupDots(){let G=this.container.querySelector("svg");if(!G){console.warn("No SVG element found in container");return}this.revealCircles(G).then(()=>{this.createDotElements(G)})}revealCircles(G){return new Promise((J)=>{let Z=Array.from(G.querySelectorAll("circle"));if(Z.length===0){J();return}let $=Z.map((Q)=>({element:Q,radius:parseFloat(Q.getAttribute("r"))||0})).sort((Q,W)=>Q.radius-W.radius);$.forEach(({element:Q})=>{let W=parseFloat(Q.getAttribute("cx"))||0,z=parseFloat(Q.getAttribute("cy"))||0;y0.set(Q,{transformOrigin:`${W}px ${z}px`,scale:0,opacity:0})});let K=y0.timeline({onComplete:J});$.forEach(({element:Q},W)=>{K.to(Q,{scale:1,opacity:1,duration:1.6,ease:"expo.out"},W*0.04)}),this.timelines.push(K)})}createDotElements(G){let J=G.querySelector("[data-dots-container]");if(!J)J=document.createElementNS("http://www.w3.org/2000/svg","g"),J.setAttribute("data-dots-container",""),G.appendChild(J);this.selectRandomCircles(this.numDots).forEach(($,K)=>{this.createDot(J,$,K)})}selectRandomCircles(G){let J=this.circles.map((K,Q)=>({...K,originalIndex:Q})).filter((K)=>K.r>300),Z=[],$=new Set;while(Z.length{if(G)G.kill()}),this.timelines=[],this.svgElements.forEach((G)=>{if(G&&G.parentNode)G.parentNode.removeChild(G)}),this.svgElements=[]}}var C6={};X8(C6,{default:()=>aW});function rW(){let G=window.Webflow||[];if(G.length>0)G.forEach((J)=>{J.destroy(),J.ready()});console.log(G)}function aW(G,J){console.log("form",G),$7(()=>{rW()})}var M6={};X8(M6,{GhostPosts:()=>NK});class NK{constructor(G={}){this.isInitialized=!1,this.ghostUrl="https://threshold-network.ghost.io/blog",this.apiKey="92bf2e734c4713627111f5976c",this.blogCards=this.getBlogCards(),this.blogCardWrapper=document.querySelector(".blog_card_wrap")?.parentElement?.parentElement,this.posts=[],this.loading=!0}getBlogCards(){let G=document.querySelectorAll(".blog_card_wrap");return Array.from(G).map((J)=>{let Z=J.closest("[class*='blog_card']")||J.parentElement;return{container:Z,tagWrap:Z.querySelector(".blog_card_tag_wrap"),tag:Z.querySelector(".blog_card_tag"),image:Z.querySelector(".blog_card_image"),title:Z.querySelector(".blog_card_title"),excerpt:Z.querySelector(".blog_card_excerpt"),date:Z.querySelector(".blog_card_date"),readtime:Z.querySelector(".blog_card_readtime"),link:Z.querySelector(".blog_card_link a")||Z.querySelector("a")}})}init(){if(this.isInitialized)return;this.showLoading(),this.fetchPosts(),this.isInitialized=!0}async fetchPosts(){try{let G=this.blogCards.length||5,J=`${this.ghostUrl}/ghost/api/content/posts/?key=${this.apiKey}&include=authors,tags&limit=${G}`,Z=await fetch(J,{method:"GET",headers:{"Accept-Version":"v5.0"}});if(!Z.ok)throw Error(`HTTP error! status: ${Z.status}`);let $=await Z.json();this.posts=$.posts||[],await this.renderPosts(),this.hideLoading()}catch(G){console.error("Error fetching posts:",G),this.hideLoading()}}async renderPosts(){let G=[];this.blogCards.forEach((J,Z)=>{let $=this.posts[Z];if(!$){J.container?.classList.add("is-hidden");return}J.container?.classList.remove("is-hidden");let K=$.primary_tag?.name||$.tags?.[0]?.name;if(K&&J.tag)J.tag.textContent=K,J.tagWrap?.classList.remove("is-hidden");else J.tagWrap?.classList.add("is-hidden");if(J.image&&$.feature_image)if(J.image.tagName==="IMG"){let Q=new Promise((W)=>{if(J.image.complete)W();else J.image.onload=W,J.image.onerror=W});G.push(Q),J.image.src=$.feature_image,J.image.alt=$.title}else J.image.style.backgroundImage=`url(${$.feature_image})`;if(J.title)J.title.textContent=$.title;if(J.excerpt)J.excerpt.textContent=$.custom_excerpt||$.excerpt||"";if(J.date)J.date.textContent=this.formatDate($.published_at);if(J.readtime)J.readtime.textContent=`${$.reading_time} min read`;if(J.link)J.link.href=$.url,J.link.target="_blank",J.link.rel="noopener noreferrer"}),await Promise.all(G),window.dispatchEvent(new Event("resize"))}formatDate(G){return new Date(G).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}showLoading(){this.loading=!0,this.blogCardWrapper?.classList.add("is-loading")}hideLoading(){this.loading=!1,this.blogCardWrapper?.classList.remove("is-loading")}destroy(){this.posts=[],this.loading=!1,this.isInitialized=!1}}var I6={};X8(I6,{default:()=>tW});function tW(G,J){console.log("ilya",G,J),$7(()=>{console.log("ilya mounted")}),n7(()=>{console.log("ilya destroyed")}),WK(()=>{console.log("ilya page in")}),GK(()=>{console.log("ilya page out")})}var P6={};X8(P6,{InfrastructureCard:()=>eW});class eW{constructor(){this.isInitialized=!1,this.resizeHandler=null,this.hoverTimelines=[],this.infrastructureCardWraps=y0.utils.toArray(".infrastructure_card_wrap")}init(){if(this.isInitialized)return;if(!(window.innerWidth<992))this.initDesktopAnimation();else this.infrastructureCardLogosWraps=document.querySelector(".infrastructure_card_logos_wrap"),this.infrastructureCardPlus=document.querySelectorAll(".infrastructure_card_plus"),this.initMobileAnimation();this.bindResize(),this.isInitialized=!0}initDesktopAnimation(){this.cleanup(),this.infrastructureCardWraps.forEach((G)=>{let J=G.querySelectorAll(".infrastructure_card_logos"),Z=y0.timeline({paused:!0}).fromTo(J,{y:"0%",opacity:0},{y:"10%",opacity:1,duration:0.6,stagger:{each:0.02,from:"center"},ease:"power2.out"}),$=()=>Z.timeScale(1).play(),K=()=>Z.timeScale(1.5).reverse();G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",K),this.hoverTimelines.push({tl:Z,wrap:G,hoverIn:$,hoverOut:K})})}initMobileAnimation(){this.cleanup(),this.mobileClickHandlers=[],this.infrastructureCardWraps.forEach((G)=>{let J=G.querySelector(".infrastructure_card_logos_wrap"),Z=G.querySelector(".infrastructure_card_plus");if(!J||!Z)return;let $=Z.querySelector("svg"),K=$?$.querySelector("path:nth-child(2)"):null;y0.set(J,{height:0});let Q=()=>{let W=Z.getAttribute("aria-expanded")==="true";if(y0.to(J,{height:W?0:"auto",duration:0.3,ease:"power2.inOut"}),y0.to($,{rotation:W?0:180,duration:0.3,ease:"power2.inOut"}),K)y0.to(K,{opacity:W?1:0,duration:0.3,ease:"power2.inOut"});Z.setAttribute("aria-expanded",W?"false":"true")};Z.addEventListener("click",Q),this.mobileClickHandlers.push({cardPlus:Z,clickHandler:Q})})}bindResize(){this.resizeHandler=this.debounceResize(()=>{this.init()},250),window.addEventListener("resize",this.resizeHandler)}debounceResize(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}cleanup(){if(this.hoverTimelines.forEach(({tl:G,wrap:J,hoverIn:Z,hoverOut:$})=>{G.kill(),J.removeEventListener("mouseenter",Z),J.removeEventListener("mouseleave",$)}),this.hoverTimelines=[],this.mobileClickHandlers)this.mobileClickHandlers.forEach(({cardPlus:G,clickHandler:J})=>{G.removeEventListener("click",J)}),this.mobileClickHandlers=[]}destroy(){if(this.cleanup(),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1}}var k6={};X8(k6,{LiquidityProgress:()=>$H});class $H{constructor(){this.isInitialized=!1,this.scrollTrigger=null,this.timeline=null,this.resizeHandler=null,this.isMobile=!1,this.animatedLines=document.querySelector(".animated-lines"),this.animatedTags=document.querySelector(".animated-tags"),this.tagGroups=y0.utils.toArray(".animated-tags > g"),this.mobileLines=document.querySelector("#liquidityLinesMobile"),this.mobileGroups=y0.utils.toArray("#liquidityLinesMobile > g")}init(){if(this.isInitialized)return;y0.registerPlugin(x0),this.checkViewport(),this.initAnimation(),this.bindResize(),this.isInitialized=!0}checkViewport(){this.isMobile=window.innerWidth<=479}initAnimation(){if(this.cleanup(),this.checkViewport(),this.isMobile)this.initMobileAnimation();else this.initDesktopAnimation()}initDesktopAnimation(){if(!this.animatedLines)return;this.timeline=y0.timeline().fromTo(this.animatedLines,{webkitMaskPosition:"0% 100%",maskPosition:"0% 100%"},{webkitMaskPosition:"0% 0%",maskPosition:"0% 0%",duration:1,ease:"power2.inOut"}),this.scrollTrigger=x0.create({trigger:"#liquiditySection",start:"top 100%",end:"bottom 40%",scrub:1,animation:this.timeline})}initMobileAnimation(){let G=document.querySelector(".liquidity_mobile_mask");if(!G)return;this.timeline=y0.timeline().fromTo(G,{clipPath:"inset(0% 0% 100% 0%)"},{clipPath:"inset(0% 0% 0% 0%)",duration:1,ease:"power2.inOut"}),this.scrollTrigger=x0.create({trigger:"#liquiditySection",start:"top 50%",end:"bottom 80%",scrub:1,animation:this.timeline})}bindResize(){this.resizeHandler=this.debounceResize(()=>{let G=this.isMobile;if(this.checkViewport(),G!==this.isMobile)x0.refresh(),this.initAnimation()},250),window.addEventListener("resize",this.resizeHandler)}debounceResize(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}cleanup(){if(this.scrollTrigger)this.scrollTrigger.kill(),this.scrollTrigger=null;if(this.timeline)this.timeline.kill(),this.timeline=null}destroy(){if(this.cleanup(),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1}}var S6={};X8(S6,{LogosWheel:()=>JH});y0.registerPlugin(x0);class JH{constructor(){this.isInitialized=!1,this.scrollTrigger=null,this.timeline=null,this.resizeHandler=null,this.wheelCards=y0.utils.toArray(".wheel_card_wrap"),this.currentBreakpoint=null}init(){if(this.isInitialized)return;this.initAnimation(),this.bindResize(),this.isInitialized=!0}initAnimation(){this.cleanup();let J=window.innerWidth<=768?"mobile":"desktop";if(this.currentBreakpoint===J&&this.timeline)return;this.currentBreakpoint=J;let Z=document.querySelector("#wheelPath"),$=document.querySelector("#wheelSection");if(!Z||!$){console.warn("wheelPath or wheelSection not found");return}requestAnimationFrame(()=>{let K=Z.getBBox(),Q=Z.ownerSVGElement,W=Q.getBoundingClientRect(),z=$.getBoundingClientRect(),q=Q.viewBox.baseVal,Y=W.width/q.width,X=W.height/q.height,H=K.width/2*Y,O=(K.x+K.width/2)*Y+(W.left-z.left),N=(K.y+K.height/2)*X+(W.top-z.top),B=this.wheelCards.length,R=-Math.PI/2,P=(y,h)=>{let C=y/B*Math.PI*2+R+h;return{x:Math.cos(C)*H+O,y:Math.sin(C)*H+N}};requestAnimationFrame(()=>{y0.set(this.wheelCards,{position:"absolute",left:0,top:0,xPercent:-50,yPercent:-50,rotation:0,force3D:!0}),this.wheelCards.forEach((h,C)=>{let A=P(C,0);y0.set(h,{x:A.x,y:A.y,force3D:!0})}),this.timeline=y0.timeline({defaults:{ease:"none"}});let y=36;for(let h=1;h<=y;h++){let C=h/y*Math.PI*2;this.timeline.to(this.wheelCards,{duration:1/y,x:(A)=>P(A,C).x,y:(A)=>P(A,C).y,force3D:!0})}this.scrollTrigger=x0.create({trigger:"#wheelSection",start:"top 50%",end:"bottom top",scrub:2,animation:this.timeline,fastScrollEnd:!0})})})}bindResize(){this.resizeHandler=this.debounceResize(()=>{let J=window.innerWidth<=768?"mobile":"desktop";if(this.currentBreakpoint!==J)this.initAnimation();else x0.refresh()},250),window.addEventListener("resize",this.resizeHandler,{passive:!0})}debounceResize(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}cleanup(){if(this.scrollTrigger)this.scrollTrigger.kill(),this.scrollTrigger=null;if(this.timeline)this.timeline.kill(),this.timeline=null;y0.set(this.wheelCards,{clearProps:"all"})}destroy(){if(this.cleanup(),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1,this.currentBreakpoint=null}}var A6={};X8(A6,{MarketsProgress:()=>ZH});class ZH{constructor(){this.isInitialized=!1,this.scrollTrigger=null,this.timeline=null,this.resizeHandler=null,this.marketsSVGs=y0.utils.toArray(".card_markets_svg"),this.marketsContents=y0.utils.toArray(".card_markets_content"),this.marketsDot=document.querySelector(".card_markets_dot")}init(){if(this.isInitialized)return;y0.registerPlugin(x0),this.initAnimation(),this.bindResize(),this.isInitialized=!0}initAnimation(){this.cleanup();let G=window.innerWidth<992;this.timeline=y0.timeline().set(this.marketsSVGs,{color:"#DFDFDF"}).set(this.marketsContents,{opacity:0.5}).fromTo(".card_market_line",G?{height:"0%",width:"1px"}:{width:"0%",height:"1px"},{...G?{height:"100%",width:"1px"}:{width:"100%",height:"1px"},transformOrigin:G?"top center":"left center",duration:1,ease:"power1.out"}).to(this.marketsSVGs[0],{backgroundColor:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0).to(this.marketsContents[0],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.marketsSVGs[1],{backgroundColor:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0.25).to(this.marketsContents[1],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.marketsSVGs[2],{backgroundColor:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0.6).to(this.marketsContents[2],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.marketsDot,{scale:0,marginLeft:G?"0rem":"-1rem",marginTop:G?"-.2rem":"0rem",duration:0.2,ease:"power2.out"},">");let J=x0.create({trigger:"#marketsSection",start:G?"top 50%":"0% 60%",end:"bottom center",scrub:!0,animation:this.timeline})}bindResize(){this.resizeHandler=this.debounceResize(()=>{x0.refresh(),this.initAnimation()},250),window.addEventListener("resize",this.resizeHandler)}debounceResize(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}cleanup(){if(this.scrollTrigger)this.scrollTrigger.kill(),this.scrollTrigger=null;if(this.timeline)this.timeline.kill(),this.timeline=null}destroy(){if(this.cleanup(),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1}}var T6={};X8(T6,{Marquee:()=>KH});class KH{constructor(){this.isInitialized=!1,this.resizeHandler=null,this.marquees=new Map,this.prefersReducedMotion=!1,this.isMobile=!1}init(){if(this.isInitialized)return;this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.isMobile=window.innerWidth<=768||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.resizeHandler=this.debounceOnWidthChange(()=>{this.isMobile=window.innerWidth<=768,this.initMarquees()},250),this.initMarquees(),window.addEventListener("resize",this.resizeHandler),this.isInitialized=!0}initMarquees(){document.querySelectorAll("[data-marquee]").forEach((G,J)=>{if(this.marquees.has(G))this.destroyMarquee(G);let Z=this.isMobile?100:0;setTimeout(()=>{let $=new QH(G,J,{prefersReducedMotion:this.prefersReducedMotion,isMobile:this.isMobile});this.marquees.set(G,$)},Z)})}destroyMarquee(G){let J=this.marquees.get(G);if(J)J.destroy(),this.marquees.delete(G)}debounceOnWidthChange(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}destroy(){if(this.marquees.forEach((G,J)=>{this.destroyMarquee(J)}),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1}}class QH{constructor(G,J,Z={}){this.container=G,this.list=G.querySelector("[data-marquee-list]"),this.index=J,this.options=Z,this.timeline=null,this.originalItems=[],this.init()}init(){if(this.options.prefersReducedMotion)return;this.setupMarquee()}setupMarquee(){if(!this.list)return;if(this.container.offsetHeight,this.originalItems=Array.from(this.list.querySelectorAll("[data-marquee-item]")),this.originalItems.length===0)return;this.createSeamlessLoop()}createSeamlessLoop(){Array.from(this.list.querySelectorAll("[data-marquee-item]")).forEach((W)=>{if(W.getAttribute("data-marquee-duplicate")==="true")W.remove()});let J=this.container.getBoundingClientRect().width,Z=0;this.originalItems.forEach((W)=>{let z=W.getBoundingClientRect(),q=getComputedStyle(W),Y=parseFloat(q.marginLeft)||0,X=parseFloat(q.marginRight)||0;Z+=z.width+Y+X});let $=this.options.isMobile?J*4:J*3,K=Math.max(1,Math.ceil($/Z));for(let W=0;W{let q=z.cloneNode(!0);q.setAttribute("data-marquee-duplicate","true"),this.list.appendChild(q)});let Q=Array.from(this.list.querySelectorAll("[data-marquee-item]"));this.createSimpleAnimation(Q,Z)}createSimpleAnimation(G,J){let $=parseFloat(this.container.getAttribute("data-marquee-speed"))||1;if(this.options.isMobile)$*=0.5;let K=J/100/$;if(this.timeline)this.timeline.kill();y0.set(this.list,{x:0}),this.timeline=y0.to(this.list,{x:-J,duration:K,ease:"none",repeat:-1,onRepeat:()=>{y0.set(this.list,{x:0})}})}destroy(){if(this.timeline)this.timeline.kill(),this.timeline=null;if(this.list)y0.set(this.list,{x:0}),Array.from(this.list.querySelectorAll("[data-marquee-item]")).forEach((J)=>{if(J.getAttribute("data-marquee-duplicate")==="true")J.remove()});this.originalItems=[]}}var w6={};X8(w6,{default:()=>GH});function GH(G,J){UK.on("PAGE",(Z)=>{console.log("page changed")})}var f6={};X8(f6,{PurposeProgress:()=>WH});class WH{constructor(){this.isInitialized=!1,this.scrollTrigger=null,this.timeline=null,this.resizeHandler=null,this.purposeSVGs=y0.utils.toArray(".purpose_card_svg"),this.purposeContents=y0.utils.toArray(".purpose_card_content"),this.purposeDot=document.querySelector(".purpose_progress_dot")}init(){if(this.isInitialized)return;y0.registerPlugin(x0),this.initAnimation(),this.bindResize(),this.isInitialized=!0}initAnimation(){this.cleanup(),this.timeline=y0.timeline().set(this.purposeSVGs,{color:"#DFDFDF"}).set(this.purposeContents,{opacity:0.5}).fromTo(".purpose_progress_line",{height:"0%"},{height:"100%",transformOrigin:"top center",duration:1,ease:"power1.out"}).to(this.purposeSVGs[0],{color:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0).to(this.purposeSVGs[0].querySelector("path"),{stroke:"#FFFFFF",duration:0.2,ease:"power2.out"},0).to(this.purposeContents[0],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.purposeSVGs[1],{color:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0.1).to(this.purposeSVGs[1].querySelector("path"),{stroke:"#FFFFFF",duration:0.2,ease:"power2.out"},"<").to(this.purposeContents[1],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.purposeSVGs[2],{color:"var(--swatch--brand-500)",duration:0.2,ease:"power2.out"},0.4).to(this.purposeSVGs[2].querySelector("path"),{stroke:"#FFFFFF",duration:0.2,ease:"power2.out"},"<").to(this.purposeContents[2],{opacity:1,duration:0.2,ease:"power2.out"},"<").to(this.purposeDot,{scale:0,marginTop:"-1rem",duration:0.2,ease:"power2.out"},">.1");let G=x0.create({trigger:".purpose_progress_wrap",start:"top 55%",end:"bottom center",scrub:!0,animation:this.timeline})}bindResize(){this.resizeHandler=this.debounceResize(()=>{x0.refresh(),this.initAnimation()},250),window.addEventListener("resize",this.resizeHandler)}debounceResize(G,J){let Z=innerWidth,$;return function(...K){clearTimeout($),$=setTimeout(()=>{if(innerWidth!==Z)Z=innerWidth,G.apply(this,K)},J)}}cleanup(){if(this.scrollTrigger)this.scrollTrigger.kill(),this.scrollTrigger=null;if(this.timeline)this.timeline.kill(),this.timeline=null}destroy(){if(this.cleanup(),this.resizeHandler)window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null;this.isInitialized=!1}}var x6={};X8(x6,{default:()=>HH});function Dz(G){G.setAttribute("aria-hidden","true"),G.style.position="absolute",G.style.left="-9999px",G.style.top="-9999px",G.style.width="1px"}var Nz=(G)=>{let J=G.textContent;G.textContent="";let Z=document.createElement("span");Z.textContent=J,G.appendChild(Z),Dz(Z);let $=document.createElement("span");return $.setAttribute("data-css","overflow-clip"),$.textContent=J,$.setAttribute("aria-hidden","true"),G.appendChild($),new jJ($,{type:"chars"})};function HH(G){let J=Nz(G);FW(G,{autoStart:!0,callback:({isIn:Z})=>{if(Z)g9.to(J.chars,{yPercent:0,stagger:0.02});else g9.killTweensOf(J.chars),g9.set(J.chars,{yPercent:100})}})}var h6={};X8(h6,{Tabs:()=>UH});y0.registerPlugin(x0);class UH{constructor(){this.isInitialized=!1,this.tabs=new Map}init(){if(this.isInitialized)return;this.initTabs(),this.isInitialized=!0}initTabs(){document.querySelectorAll(".tab_wrap").forEach((G,J)=>{if(this.tabs.has(G))this.destroyTab(G);let Z=new zH(G,J);this.tabs.set(G,Z)})}destroyTab(G){let J=this.tabs.get(G);if(J)J.destroy(),this.tabs.delete(G)}destroy(){this.tabs.forEach((G,J)=>{this.destroyTab(J)}),this.isInitialized=!1}}class zH{constructor(G,J){this.container=G,this.index=J,this.activeIndex=0,this.animating=!1,this.canPlay=!0,this.autoplayTl=null,this.timelines=[],this.eventListeners=[],this.loopControls=G.getAttribute("data-loop-controls")==="true",this.slideTabs=G.getAttribute("data-slide-tabs")==="true",this.pauseOnHover=G.getAttribute("data-pause-on-hover")==="true",this.autoplay=Number(G.getAttribute("data-autoplay-duration"))||0,this.duration=Number(G.getAttribute("data-duration"))||0.3,this.buttonList=G.querySelector(".tab_button_list"),this.panelList=G.querySelector(".tab_content_list"),this.previousButton=G.querySelector('[data-tab="previous"] button'),this.nextButton=G.querySelector('[data-tab="next"] button'),this.toggleWrap=G.querySelector('[data-tab-button="toggle"]'),this.toggleButton=G.querySelector('[data-tab-button="toggle"] button'),this.init()}init(){if(this.container.dataset.scriptInitialized)return;if(this.container.dataset.scriptInitialized="true",this.removeCMSList(this.buttonList),this.removeCMSList(this.panelList),this.buttonItems=Array.from(this.buttonList.children),this.panelItems=Array.from(this.panelList.children),!this.buttonList||!this.panelList||!this.buttonItems.length||!this.panelItems.length){console.warn("Missing elements in:",this.container);return}this.setupAccessibility(),this.setupTabs(),this.makeActive(0,!1,!1),this.setupNavigation(),this.setupAutoplay()}removeCMSList(G){if(!G)return;let J=Array.from(G.children).find((K)=>K.classList.contains("w-dyn-list"));if(!J)return;let Z=J?.firstElementChild?.children;if(!Z)return;let $=[...G.children];[...Z].forEach((K)=>{if(K.firstElementChild)G.appendChild(K.firstElementChild)}),$.forEach((K)=>K.remove())}setupAccessibility(){this.panelItems.forEach((G)=>{G.style.display="none",G.setAttribute("role","tabpanel")}),this.panelList.removeAttribute("role"),this.buttonList.setAttribute("role","tablist"),this.buttonItems.forEach((G)=>{G.setAttribute("role","tab")})}setupTabs(){this.buttonItems.forEach((G,J)=>{let Z=this.container.getAttribute("data-tab-component-id");Z=Z?Z.toLowerCase().replaceAll(" ","-"):this.index+1;let $=G.getAttribute("data-tab-item-id");if($=$?$.toLowerCase().replaceAll(" ","-"):J+1,G.setAttribute("id",`tab-button-${Z}-${$}`),G.setAttribute("aria-controls",`tab-panel-${Z}-${$}`),this.panelItems[J]?.setAttribute("id",`tab-panel-${Z}-${$}`),this.panelItems[J]?.setAttribute("aria-labelledby",G.id),new URLSearchParams(location.search).get("tab-id")===`${Z}-${$}`)this.makeActive(J),this.autoplay=0,this.container.scrollIntoView({behavior:"smooth",block:"start"}),history.replaceState({},"",((W)=>(W.searchParams.delete("tab-id"),W))(new URL(location.href)));let K=()=>this.makeActive(J),Q=(W)=>{if(["ArrowRight","ArrowDown"].includes(W.key))this.updateIndex(1,!0);else if(["ArrowLeft","ArrowUp"].includes(W.key))this.updateIndex(-1,!0)};G.addEventListener("click",K),G.addEventListener("keydown",Q),this.eventListeners.push({element:G,type:"click",handler:K},{element:G,type:"keydown",handler:Q})})}setupNavigation(){if(this.nextButton){let G=()=>this.updateIndex(1);this.nextButton.addEventListener("click",G),this.eventListeners.push({element:this.nextButton,type:"click",handler:G})}if(this.previousButton){let G=()=>this.updateIndex(-1);this.previousButton.addEventListener("click",G),this.eventListeners.push({element:this.previousButton,type:"click",handler:G})}}setupAutoplay(){if(this.autoplay===0||typeof y0>"u")return;this.autoplayTl=y0.timeline({repeat:-1}).fromTo(this.container,{"--progress":0},{onComplete:()=>this.updateIndex(1,!1,!1),"--progress":1,ease:"none",duration:this.autoplay});let G=!1,J=!1,Z=!1,$=!0,K=()=>{if(Z||!$||this.canPlay||G||J)this.autoplayTl.pause();else this.autoplayTl.play()},Q=()=>{if(this.canPlay=!this.canPlay,this.toggleButton?.setAttribute("aria-pressed",!this.canPlay?"true":"false"),this.toggleWrap?.classList.toggle("is-pressed",!this.canPlay),!this.canPlay)G=J=Z=!1;K()};if(Q(),this.toggleButton){let X=()=>Q();this.toggleButton.addEventListener("click",X),this.eventListeners.push({element:this.toggleButton,type:"click",handler:X})}let W=(X)=>{Z=X.matches,K(),this.canPlay=!X.matches,Q()},z=window.matchMedia("(prefers-reduced-motion: reduce)");if(W(z),z.addEventListener("change",W),this.pauseOnHover){let X=()=>{G=!0,K()},H=()=>{J=!1,G=!1,K()};this.container.addEventListener("mouseenter",X),this.container.addEventListener("mouseleave",H),this.eventListeners.push({element:this.container,type:"mouseenter",handler:X},{element:this.container,type:"mouseleave",handler:H})}let q=()=>{J=!0,K()},Y=(X)=>{if(!X.relatedTarget||!this.container.contains(X.relatedTarget))J=!1,K()};this.container.addEventListener("focusin",q),this.container.addEventListener("focusout",Y),this.eventListeners.push({element:this.container,type:"focusin",handler:q},{element:this.container,type:"focusout",handler:Y}),this.intersectionObserver=new IntersectionObserver((X)=>{$=X[0].isIntersecting,K()},{threshold:0}),this.intersectionObserver.observe(this.container)}makeActive(G,J=!1,Z=!0,$=!0){if(this.animating)return;if(this.buttonItems.forEach((z,q)=>{z.classList.toggle("is-active",q===G),z.setAttribute("aria-selected",q===G?"true":"false"),z.setAttribute("tabindex",q===G?"0":"-1")}),this.panelItems.forEach((z,q)=>{z.classList.toggle("is-active",q===G)}),typeof x0<"u")x0.refresh();if(this.nextButton)this.nextButton.disabled=G===this.buttonItems.length-1&&!this.loopControls;if(this.previousButton)this.previousButton.disabled=G===0&&!this.loopControls;if(J)this.buttonItems[G].focus();let K=this.panelItems[this.activeIndex],Q=this.panelItems[G],W=this.activeIndex>G?-1:1;if(typeof y0<"u"&&Z&&this.activeIndex!==G){if(this.autoplayTl&&!this.canPlay&&typeof this.autoplayTl.restart==="function")this.autoplayTl.restart();this.animating=!0;let z=y0.timeline({onComplete:()=>this.animating=!1,defaults:{duration:this.duration,ease:"power1.out"}});if(this.timelines.push(z),this.slideTabs){if(z.set(Q,{display:"block",position:"relative"}),K)z.set(K,{position:"absolute",top:0,left:0,width:"100%"}),z.fromTo(K,{xPercent:0},{xPercent:-120*W});if(z.fromTo(Q,{xPercent:120*W},{xPercent:0},"<"),K)z.set(K,{display:"none"})}else{if(K)z.to(K,{opacity:0}),z.set(K,{display:"none"});z.set(Q,{display:"block"}),z.fromTo(Q,{opacity:0},{opacity:1})}}else{if(K)K.style.display="none";if(Q)Q.style.display="block"}this.buttonList.scrollTo({left:this.buttonItems[G].offsetLeft-this.buttonList.clientWidth/2,behavior:"smooth"}),this.activeIndex=G}updateIndex(G,J=!1,Z=!0){let $=(this.activeIndex+G+this.buttonItems.length)%this.buttonItems.length;this.makeActive($,J,!0,Z)}destroy(){if(this.autoplayTl)this.autoplayTl.kill(),this.autoplayTl=null;if(this.timelines.forEach((G)=>{if(G)G.kill()}),this.timelines=[],this.eventListeners.forEach(({element:G,type:J,handler:Z})=>{G.removeEventListener(J,Z)}),this.eventListeners=[],this.intersectionObserver)this.intersectionObserver.disconnect(),this.intersectionObserver=null;delete this.container.dataset.scriptInitialized}}var b6={};X8(b6,{default:()=>qH});function qH(G,J){}var y6={};X8(y6,{TextAnimations:()=>jK});/*! * CustomEase 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var N9,FH,XH=function(){return N9||typeof window<"u"&&(N9=window.gsap)&&N9.registerPlugin&&N9},LH=function(){if(N9=XH(),N9)N9.registerEase("_CE",CJ.create),FH=1;else console.warn("Please gsap.registerPlugin(CustomEase)")},Ez=100000000000000000000,EK=function(J){return~~(J*1000+(J<0?-0.5:0.5))/1000},jz=1,Vz=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,Bz=/[cLlsSaAhHvVtTqQ]/g,Rz=function(J){var Z=J.length,$=Ez,K;for(K=1;KY*(f*f+T*T))s=X.length,G(J,Z,O,N,h,C,x,k,Y,X,H),G(x,k,A,b,P,y,z,q,Y,X,H+1+(X.length-s));return X},CJ=function(){function G(Z,$,K){FH||LH(),this.id=Z,jz&&this.setData($,K)}var J=G.prototype;return J.setData=function($,K){K=K||{},$=$||"0,0,1,1";var Q=$.match(Vz),W=1,z=[],q=[],Y=K.precision||1,X=Y<=1,H,O,N,B,R,P,y,h,C;if(this.data=$,Bz.test($)||~$.indexOf("M")&&$.indexOf("C")<0)Q=VJ($)[0];if(H=Q.length,H===4)Q.unshift(0,0),Q.push(1,1),H=8;else if((H-2)%6)throw"Invalid CustomEase";if(+Q[0]!==0||+Q[H-2]!==1)Cz(Q,K.height,K.originY);this.segment=Q;for(B=2;Bh.x||h.y!==y.y&&h.x===y.x||y===h)&&y.x<=1){if(h.cx=y.x-h.x,h.cy=y.y-h.y,h.n=y,h.nx=y.x,X&&B>1&&Math.abs(h.cy/h.cx-z[B-2].cy/z[B-2].cx)>2)X=0;if(h.cxy||O===P-1)X.push(h,C),H=(R-C)/(B-h);h=B,C=R}X="M"+X.join(",")}return Y&&Y.setAttribute("d",X),X},G}();CJ.version="3.13.0";CJ.headless=!0;XH()&&N9.registerPlugin(CJ);y0.registerPlugin(x0,jJ,CJ);class jK{constructor(){this.isInitialized=!1,this.scrollTriggers=[],this.splitInstances=new WeakMap,CJ.create("smooth","0.215, 0.61, 0.355, 1")}async init(){if(this.isInitialized)return;await document.fonts.ready,this.initSplitInview(),this.isInitialized=!0}destroy(){this.scrollTriggers.forEach((G)=>G.kill()),this.scrollTriggers=[];for(let[G,J]of this.splitInstances.entries())J.revert(),this.splitInstances.delete(G);this.isInitialized=!1}refresh(){x0.refresh()}initSplitInview(){let G=document.querySelectorAll("[data-split-inview]");if(!G.length)return;let J=[];if(G.forEach(($)=>{Array.from($.children).forEach((Q)=>{if(Q.classList.contains("u-sr-only"))return;if(Q.tagName.toLowerCase()==="ul")return;if(Q.tagName.toLowerCase()==="p")this.addAccessibleFallback(Q);J.push(Q)})}),!J.length)return;let Z=new Map;J.forEach(($)=>{Z.set($,$.getBoundingClientRect())}),Promise.resolve().then(()=>{J.forEach(($)=>{let K=$.tagName.toLowerCase(),Q=this.getAnimationParams(K);if(this.splitInstances.has($))this.splitInstances.get($).revert();let W=jJ.create($,{type:"lines",mask:"lines",tag:"span",linesClass:"split-line",aria:"hidden"});this.splitInstances.set($,W),this.setupViewportAnimations($,W,Q)})})}getAnimationParams(G){if(G.startsWith("h"))return{y:-120,duration:0.6,stagger:0.072,ease:"smooth"};if(G==="p")return{y:120,duration:0.6,stagger:0.072,ease:"smooth"};return{y:100,duration:0.55,stagger:0.06,ease:"smooth"}}setupViewportAnimations(G,J,Z){let $=y0.matchMedia();$.add("(min-width: 992px)",()=>{let K=y0.timeline({scrollTrigger:{trigger:G,toggleClass:"is-inview",start:"top 85%",once:!0}});return K.fromTo(J.lines,{y:Z.y},{y:0,duration:Z.duration,stagger:Z.stagger,ease:Z.ease}),this.scrollTriggers.push(K.scrollTrigger),()=>{y0.set(J.lines,{clearProps:"all"})}}),$.add("(max-width: 991px)",()=>{return y0.set(J.lines,{y:0}),()=>y0.set(J.lines,{clearProps:"all"})})}addAccessibleFallback(G){let J=G.textContent.trim();if(!J)return;let Z=document.createElement("span");Z.className="u-sr-only",Z.textContent=J,G.parentNode.insertBefore(Z,G),G.setAttribute("aria-hidden","true")}}var v6={"./../_hero-coins.js":$6,"./../accordion.js":J6,"./../card-border.js":Z6,"./../coins-animation.js":Q6,"./../coins-gravity.js":W6,"./../counter.js":H6,"./../cycle.ts":U6,"./../dots-animation.js":R6,"./../form.ts":C6,"./../ghost-posts.js":M6,"./../ilya.js":I6,"./../infrastructure-card.js":P6,"./../liquidity-progress.js":k6,"./../logos-wheel.js":S6,"./../markets-progress.js":A6,"./../marquee.js":T6,"./../nav.ts":w6,"./../purpose-progress.js":f6,"./../split.ts":x6,"./../tab.js":h6,"./../test.ts":b6,"./../text-animations.js":y6};function YH(G="module"){return Array.from(document.querySelectorAll(`[data-${G}]`)).map((J)=>{let Z=J,$=Z.dataset[G];if(Z._moduleInitialized)return null;let K=v6[`./../${$}.ts`]?`./../${$}.ts`:`./../${$}.js`;if(v6[K]){let Q=v6[K].default;if(typeof Q==="function")try{return Z._moduleInitialized=!0,Q(Z,Z.dataset)}catch(W){return delete Z._moduleInitialized,console.warn(`Failed to call default function for ${G} "${$}":`,W),null}else return console.warn(`Default export is not a function for ${G} "${$}"`),null}else return console.warn(`${G} not found: "${$}"`),null}).filter((J)=>J!==null)}class MJ{static instance;groups=[];constructor(){}static getInstance(){if(!MJ.instance)MJ.instance=new MJ;return MJ.instance}configsMatch(G,J){return G.root===J.root&&G.rootMargin===J.rootMargin}handleIntersection(G){G.forEach((J)=>{let Z=this.groups.find((Y)=>{return Array.from(Y.elements.keys()).includes(J.target)});if(!Z)return;let $=J.target,K=Z.elements.get($);if(!K)return;let{isIntersecting:Q,intersectionRatio:W,boundingClientRect:z}=J,q=-1;if(K.lastDirection!==void 0)q=Q?z.top>0?1:-1:z.top>0?-1:1;if(K.lastDirection=q,Q){if(K.callbacks.isIn?.({entry:J,direction:q}),K.callbacks.callback?.({entry:J,direction:q,isIn:!0}),K.once)this.removeElement($)}else K.callbacks.isOut?.({entry:J,direction:q}),K.callbacks.callback?.({entry:J,direction:q,isIn:!1})})}addElement(G,J,Z){this.removeElement(G);let $=this.groups.find((K)=>this.configsMatch(K.config,J));if(!$){let K=new IntersectionObserver((Q)=>this.handleIntersection(Q),{...J,threshold:[0]});$={config:J,observer:K,elements:new Map},this.groups.push($)}return $.elements.set(G,{callbacks:Z,once:J.once||!1,lastDirection:void 0}),$.observer.observe(G),$}removeElement(G){let J=this.groups.find((Z)=>Z.elements.has(G));if(!J)return;if(J.observer.unobserve(G),J.elements.delete(G),J.elements.size===0)J.observer.disconnect(),this.groups=this.groups.filter((Z)=>Z!==J)}}class r7{element;#$;#Z;isIn(G){}isOut(G){}inView;callback;#J=null;#K=null;constructor(G,J={root:null,rootMargin:"0px",threshold:0,autoStart:!1,once:!1,callback:void 0}){if(this.element=G,this.#$=J,this.inView=!1,this.callback=J.callback||(()=>{}),J.autoStart)this.start()}start(){this.#Z=MJ.getInstance().addElement(this.element,this.#$,{isIn:(G)=>{this.inView=!0,this.isIn?.(G)},isOut:(G)=>{this.inView=!1,this.isOut?.(G)},callback:this.callback})}stop(){MJ.getInstance().removeElement(this.element)}destroy(){this.stop(),this.#J=null,this.#K=null}}var Iz="1.3.11";function NH(G,J,Z){return Math.max(G,Math.min(J,Z))}function Pz(G,J,Z){return(1-Z)*G+Z*J}function kz(G,J,Z,$){return Pz(G,J,1-Math.exp(-Z*$))}function Sz(G,J){return(G%J+J)%J}var Az=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(G){if(!this.isRunning)return;let J=!1;if(this.duration&&this.easing){this.currentTime+=G;let Z=NH(0,this.currentTime/this.duration,1);J=Z>=1;let $=J?1:this.easing(Z);this.value=this.from+(this.to-this.from)*$}else if(this.lerp){if(this.value=kz(this.value,this.to,this.lerp*60,G),Math.round(this.value)===this.to)this.value=this.to,J=!0}else this.value=this.to,J=!0;if(J)this.stop();this.onUpdate?.(this.value,J)}stop(){this.isRunning=!1}fromTo(G,J,{lerp:Z,duration:$,easing:K,onStart:Q,onUpdate:W}){this.from=this.value=G,this.to=J,this.lerp=Z,this.duration=$,this.easing=K,this.currentTime=0,this.isRunning=!0,Q?.(),this.onUpdate=W}};function Tz(G,J){let Z;return function(...$){let K=this;clearTimeout(Z),Z=setTimeout(()=>{Z=void 0,G.apply(K,$)},J)}}var wz=class{constructor(G,J,{autoResize:Z=!0,debounce:$=250}={}){if(this.wrapper=G,this.content=J,Z){if(this.debouncedResize=Tz(this.resize,$),this.wrapper instanceof Window)window.addEventListener("resize",this.debouncedResize,!1);else this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper);this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)}this.resize()}width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;destroy(){if(this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize)window.removeEventListener("resize",this.debouncedResize,!1)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{if(this.wrapper instanceof Window)this.width=window.innerWidth,this.height=window.innerHeight;else this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight};onContentResize=()=>{if(this.wrapper instanceof Window)this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth;else this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},EH=class{events={};emit(G,...J){let Z=this.events[G]||[];for(let $=0,K=Z.length;${this.events[G]=this.events[G]?.filter((Z)=>J!==Z)}}off(G,J){this.events[G]=this.events[G]?.filter((Z)=>J!==Z)}destroy(){this.events={}}},OH=16.666666666666668,s$={passive:!1},fz=class{constructor(G,J={wheelMultiplier:1,touchMultiplier:1}){this.element=G,this.options=J,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,s$),this.element.addEventListener("touchstart",this.onTouchStart,s$),this.element.addEventListener("touchmove",this.onTouchMove,s$),this.element.addEventListener("touchend",this.onTouchEnd,s$)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new EH;on(G,J){return this.emitter.on(G,J)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,s$),this.element.removeEventListener("touchstart",this.onTouchStart,s$),this.element.removeEventListener("touchmove",this.onTouchMove,s$),this.element.removeEventListener("touchend",this.onTouchEnd,s$)}onTouchStart=(G)=>{let{clientX:J,clientY:Z}=G.targetTouches?G.targetTouches[0]:G;this.touchStart.x=J,this.touchStart.y=Z,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:G})};onTouchMove=(G)=>{let{clientX:J,clientY:Z}=G.targetTouches?G.targetTouches[0]:G,$=-(J-this.touchStart.x)*this.options.touchMultiplier,K=-(Z-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=J,this.touchStart.y=Z,this.lastDelta={x:$,y:K},this.emitter.emit("scroll",{deltaX:$,deltaY:K,event:G})};onTouchEnd=(G)=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:G})};onWheel=(G)=>{let{deltaX:J,deltaY:Z,deltaMode:$}=G,K=$===1?OH:$===2?this.window.width:1,Q=$===1?OH:$===2?this.window.height:1;J*=K,Z*=Q,J*=this.options.wheelMultiplier,Z*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:J,deltaY:Z,event:G})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}},DH=(G)=>Math.min(1,1.001-Math.pow(2,-10*G)),jH=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;__rafID=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new Az;emitter=new EH;dimensions;virtualScroll;constructor({wrapper:G=window,content:J=document.documentElement,eventsTarget:Z=G,smoothWheel:$=!0,syncTouch:K=!1,syncTouchLerp:Q=0.075,touchInertiaExponent:W=1.7,duration:z,easing:q,lerp:Y=0.1,infinite:X=!1,orientation:H="vertical",gestureOrientation:O=H==="horizontal"?"both":"vertical",touchMultiplier:N=1,wheelMultiplier:B=1,autoResize:R=!0,prevent:P,virtualScroll:y,overscroll:h=!0,autoRaf:C=!1,anchors:A=!1,autoToggle:b=!1,allowNestedScroll:x=!1,__experimental__naiveDimensions:k=!1}={}){if(window.lenisVersion=Iz,!G||G===document.documentElement)G=window;if(typeof z==="number"&&typeof q!=="function")q=DH;else if(typeof q==="function"&&typeof z!=="number")z=1;if(this.options={wrapper:G,content:J,eventsTarget:Z,smoothWheel:$,syncTouch:K,syncTouchLerp:Q,touchInertiaExponent:W,duration:z,easing:q,lerp:Y,infinite:X,gestureOrientation:O,orientation:H,touchMultiplier:N,wheelMultiplier:B,autoResize:R,prevent:P,virtualScroll:y,overscroll:h,autoRaf:C,anchors:A,autoToggle:b,allowNestedScroll:x,__experimental__naiveDimensions:k},this.dimensions=new wz(G,J,{autoResize:R}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.anchors&&this.options.wrapper===window)this.options.wrapper.addEventListener("click",this.onClick,!1);if(this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new fz(Z,{touchMultiplier:N,wheelMultiplier:B}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle)this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0});if(this.options.autoRaf)this.__rafID=requestAnimationFrame(this.raf)}destroy(){if(this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.options.anchors&&this.options.wrapper===window)this.options.wrapper.removeEventListener("click",this.onClick,!1);if(this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this.__rafID)cancelAnimationFrame(this.__rafID)}on(G,J){return this.emitter.on(G,J)}off(G,J){return this.emitter.off(G,J)}onScrollEnd=(G)=>{if(!(G instanceof CustomEvent)){if(this.isScrolling==="smooth"||this.isScrolling===!1)G.stopPropagation()}};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};onTransitionEnd=(G)=>{if(G.propertyName.includes("overflow")){let J=this.isHorizontal?"overflow-x":"overflow-y",Z=getComputedStyle(this.rootElement)[J];if(["hidden","clip"].includes(Z))this.internalStop();else this.internalStart()}};setScroll(G){if(this.isHorizontal)this.options.wrapper.scrollTo({left:G,behavior:"instant"});else this.options.wrapper.scrollTo({top:G,behavior:"instant"})}onClick=(G)=>{let Z=G.composedPath().find(($)=>$ instanceof HTMLAnchorElement&&($.getAttribute("href")?.startsWith("#")||$.getAttribute("href")?.startsWith("/#")||$.getAttribute("href")?.startsWith("./#")));if(Z){let $=Z.getAttribute("href");if($){let K=typeof this.options.anchors==="object"&&this.options.anchors?this.options.anchors:void 0,Q=`#${$.split("#")[1]}`;if(["#","/#","./#","#top","/#top","./#top"].includes($))Q=0;this.scrollTo(Q,K)}}};onPointerDown=(G)=>{if(G.button===1)this.reset()};onVirtualScroll=(G)=>{if(typeof this.options.virtualScroll==="function"&&this.options.virtualScroll(G)===!1)return;let{deltaX:J,deltaY:Z,event:$}=G;if(this.emitter.emit("virtual-scroll",{deltaX:J,deltaY:Z,event:$}),$.ctrlKey)return;if($.lenisStopPropagation)return;let K=$.type.includes("touch"),Q=$.type.includes("wheel");this.isTouching=$.type==="touchstart"||$.type==="touchmove";let W=J===0&&Z===0;if(this.options.syncTouch&&K&&$.type==="touchstart"&&W&&!this.isStopped&&!this.isLocked){this.reset();return}let q=this.options.gestureOrientation==="vertical"&&Z===0||this.options.gestureOrientation==="horizontal"&&J===0;if(W||q)return;let Y=$.composedPath();Y=Y.slice(0,Y.indexOf(this.rootElement));let X=this.options.prevent;if(Y.find((P)=>P instanceof HTMLElement&&(typeof X==="function"&&X?.(P)||P.hasAttribute?.("data-lenis-prevent")||K&&P.hasAttribute?.("data-lenis-prevent-touch")||Q&&P.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.checkNestedScroll(P,{deltaX:J,deltaY:Z}))))return;if(this.isStopped||this.isLocked){if($.cancelable)$.preventDefault();return}if(!(this.options.syncTouch&&K||this.options.smoothWheel&&Q)){this.isScrolling="native",this.animate.stop(),$.lenisStopPropagation=!0;return}let O=Z;if(this.options.gestureOrientation==="both")O=Math.abs(Z)>Math.abs(J)?Z:J;else if(this.options.gestureOrientation==="horizontal")O=J;if(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&Z<0))$.lenisStopPropagation=!0;if($.cancelable)$.preventDefault();let N=K&&this.options.syncTouch,R=K&&$.type==="touchend";if(R)O=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent);this.scrollTo(this.targetScroll+O,{programmatic:!1,...N?{lerp:R?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=()=>{if(this._resetVelocityTimeout!==null)clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null;if(this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){let G=this.animatedScroll;if(this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-G,this.direction=Math.sign(this.animatedScroll-G),!this.isStopped)this.isScrolling="native";if(this.emit(),this.velocity!==0)this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400)}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(!this.isStopped)return;if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}internalStart(){if(!this.isStopped)return;this.reset(),this.isStopped=!1,this.emit()}stop(){if(this.isStopped)return;if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}internalStop(){if(this.isStopped)return;this.reset(),this.isStopped=!0,this.emit()}raf=(G)=>{let J=G-(this.time||G);if(this.time=G,this.animate.advance(J*0.001),this.options.autoRaf)this.__rafID=requestAnimationFrame(this.raf)};scrollTo(G,{offset:J=0,immediate:Z=!1,lock:$=!1,duration:K=this.options.duration,easing:Q=this.options.easing,lerp:W=this.options.lerp,onStart:z,onComplete:q,force:Y=!1,programmatic:X=!0,userData:H}={}){if((this.isStopped||this.isLocked)&&!Y)return;if(typeof G==="string"&&["top","left","start"].includes(G))G=0;else if(typeof G==="string"&&["bottom","right","end"].includes(G))G=this.limit;else{let O;if(typeof G==="string")O=document.querySelector(G);else if(G instanceof HTMLElement&&G?.nodeType)O=G;if(O){if(this.options.wrapper!==window){let B=this.rootElement.getBoundingClientRect();J-=this.isHorizontal?B.left:B.top}let N=O.getBoundingClientRect();G=(this.isHorizontal?N.left:N.top)+this.animatedScroll}}if(typeof G!=="number")return;if(G+=J,G=Math.round(G),this.options.infinite){if(X){this.targetScroll=this.animatedScroll=this.scroll;let O=G-this.animatedScroll;if(O>this.limit/2)G=G-this.limit;else if(O<-this.limit/2)G=G+this.limit}}else G=NH(0,G,this.limit);if(G===this.targetScroll){z?.(this),q?.(this);return}if(this.userData=H??{},Z){this.animatedScroll=this.targetScroll=G,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),q?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}if(!X)this.targetScroll=G;if(typeof K==="number"&&typeof Q!=="function")Q=DH;else if(typeof Q==="function"&&typeof K!=="number")K=1;this.animate.fromTo(this.animatedScroll,G,{duration:K,easing:Q,lerp:W,onStart:()=>{if($)this.isLocked=!0;this.isScrolling="smooth",z?.(this)},onUpdate:(O,N)=>{if(this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=O-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=O,this.setScroll(this.scroll),X)this.targetScroll=O;if(!N)this.emit();if(N)this.reset(),this.emit(),q?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent()}})}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(G,{deltaX:J,deltaY:Z}){let $=Date.now(),K=G._lenis??={},Q,W,z,q,Y,X,H,O,N=this.options.gestureOrientation;if($-(K.time??0)>2000){K.time=Date.now();let b=window.getComputedStyle(G);K.computedStyle=b;let{overflowX:x,overflowY:k}=b;if(Q=["auto","overlay","scroll"].includes(x),W=["auto","overlay","scroll"].includes(k),K.hasOverflowX=Q,K.hasOverflowY=W,!Q&&!W)return!1;if(N==="vertical"&&!W)return!1;if(N==="horizontal"&&!Q)return!1;Y=G.scrollWidth,X=G.scrollHeight,H=G.clientWidth,O=G.clientHeight,z=Y>H,q=X>O,K.isScrollableX=z,K.isScrollableY=q,K.scrollWidth=Y,K.scrollHeight=X,K.clientWidth=H,K.clientHeight=O}else z=K.isScrollableX,q=K.isScrollableY,Q=K.hasOverflowX,W=K.hasOverflowY,Y=K.scrollWidth,X=K.scrollHeight,H=K.clientWidth,O=K.clientHeight;if(!Q&&!W||!z&&!q)return!1;if(N==="vertical"&&(!W||!q))return!1;if(N==="horizontal"&&(!Q||!z))return!1;let B;if(N==="horizontal")B="x";else if(N==="vertical")B="y";else{let b=J!==0,x=Z!==0;if(b&&Q&&z)B="x";if(x&&W&&q)B="y"}if(!B)return!1;let R,P,y,h,C;if(B==="x")R=G.scrollLeft,P=Y-H,y=J,h=Q,C=z;else if(B==="y")R=G.scrollTop,P=X-O,y=Z,h=W,C=q;else return!1;return(y>0?R0)&&h&&C}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){if(this.options.__experimental__naiveDimensions)if(this.isHorizontal)return this.rootElement.scrollWidth-this.rootElement.clientWidth;else return this.rootElement.scrollHeight-this.rootElement.clientHeight;else return this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){let G=this.options.wrapper;return this.isHorizontal?G.scrollX??G.scrollLeft:G.scrollY??G.scrollTop}get scroll(){return this.options.infinite?Sz(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(G){if(this._isScrolling!==G)this._isScrolling=G,this.updateClassName()}get isStopped(){return this._isStopped}set isStopped(G){if(this._isStopped!==G)this._isStopped=G,this.updateClassName()}get isLocked(){return this._isLocked}set isLocked(G){if(this._isLocked!==G)this._isLocked=G,this.updateClassName()}get isSmooth(){return this.isScrolling==="smooth"}get className(){let G="lenis";if(this.options.autoToggle)G+=" lenis-autoToggle";if(this.isStopped)G+=" lenis-stopped";if(this.isLocked)G+=" lenis-locked";if(this.isScrolling)G+=" lenis-scrolling";if(this.isScrolling==="smooth")G+=" lenis-smooth";return G}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};function VH(G=null){let J=()=>{let Q=document.body.firstElementChild;return Q instanceof HTMLElement&&Q.classList.contains("w-editor-publish-node")},Z=J(),$=Z;if(new MutationObserver((Q)=>{Q.forEach((W)=>{if(W.type==="childList"){let z=J();if(z!==Z){if(console.log("Editor state changed to:",z),G)G(z);Z=z}}})}).observe(document.body,{childList:!0,subtree:!1}),G)G($);return $}var xz={infinite:!1,lerp:0.1,smoothWheel:!0,touchMultiplier:2};class BH extends jH{#$=g9.ticker.add((G)=>this.raf(G*1000));constructor(){super(xz);this.on("scroll",this.#Z.bind(this))}#Z(G){this.notify(G)}toTop(){this.scrollTo(0,{immediate:!0})}#J=[];add(G,J=0,Z=Symbol()){let $=this.#J.findIndex((K)=>K.priority>J);if($===-1)this.#J.push({fn:G,priority:J,id:Z});else this.#J.splice($,0,{fn:G,priority:J,id:Z});return()=>this.remove(Z)}remove(G){this.#J=this.#J.filter((J)=>J.id!==G)}notify(G){if(this.#J.length<1)return;this.#J.forEach((J)=>J.fn(G))}}var W$=new BH;VH((G)=>{if(G)W$.destroy();else W$.start()});var RH=(G)=>{let J=G.getBoundingClientRect();return{top:J.top+W$.scroll,bottom:J.bottom+W$.scroll,width:J.width,height:J.height,left:J.left,right:J.right,wh:Q$.height,ww:Q$.width,offset:J.top+W$.scroll,centery:Q$.height/2-J.height/2-J.top-W$.scroll,centerx:-Q$.width/2+J.left+J.width/2}};function CH(G,J,Z,$,K){return $+(K-$)*(G-J)/(Z-J)}function MH(G,J,Z){return Math.min(Math.max(Z,G),J)}var hz={bounds:[0,1],top:"bottom",bottom:"top",callback:void 0};class XW extends r7{value=0;init=!1;isIn(G){this.#K()}isOut(G){}bounds;config;resize;handleScroll;#$;#Z;constructor(G,J={}){super(G,{autoStart:!0,once:!1,threshold:0});this.element=G,this.config={...hz,...J},this.#J(),this.#$=W$.add(this.#K.bind(this)),this.#Z=Q$.add(this.#J.bind(this)),this.init=!0,this.#K()}#J=()=>{this.bounds=bz(this.element,this.config),this.resize?.(this.bounds),this.#K()};#K(){if(!this.inView||!this.init)return;this.value=MH(0,1,CH(W$.scroll,this.bounds.top,this.bounds.bottom,this.config.bounds[0],this.config.bounds[1])),this.handleScroll?.(this.value),this.config.callback?.(this.value)}destroy(){this.config.callback=void 0,this.#$(),this.#Z(),super.destroy()}}function bz(G,J){let Z=RH(G),{top:$,bottom:K,wh:Q}=Z,W=Q/2;return Z.top=$-(J.top==="center"?W:J.top==="bottom"?Q:0),Z.bottom=K-(J.bottom==="center"?W:J.bottom==="bottom"?Q:0),Z}YH();LW();qW();var yz=new NK;yz.init();var vz=new jK;vz.init();var gz=new HK("riveFooter","footerSection",-0.8,"top bottom","bottom 20%");gz.init();history.scrollRestoration="manual";window.scrollTo(0,0);})(); //# debugId=493E693022BAC28E64756E2164756E21