PageSourceSearch

https://web-assets.cred.club/v2/_next/static/chunks/31d4e3d1.812423680b5aed40.js

js cred.club collected 2026-09-24 08:39:20 UTC 135,251 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[887],{7665:function(e){var t;t=()=>(()=>{"use strict";var e=[,(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=(()=>{var e="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return function(t={}){var n,r,i=t;function a(){function e(e){const a=r;n=t=0,r=new Map,a.forEach((t=>{try{t(e)}catch(n){console.error(n)}})),this.pb(),i&&i.Tb()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||(t=requestAnimationFrame(e.bind(this)));const a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Rb=function(e){a&&(document.body.remove(a),a=null),e||(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",e=function(e){a.innerHTML="RIVE FPS "+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Tb=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Ob=function(){a&&(document.body.remove(a),a=null),i=null},this.pb=function(){}}function o(e){console.assert(!0);const t=new Map;let n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout((function(){t.delete(r),0==t.length?n=-1/0:r==n&&(n=Math.max(...t.keys()),console.assert(n<r))}),1e3)),n=Math.max(r,n),n<<e}}i.ready=new Promise(((e,t)=>{n=e,r=t}));const s=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){s&&s();let e=i.decodeAudio;i.decodeAudio=function(t,n){n(t=e(t))};let t=i.decodeFont;
1i.decodeFont=function(e,n){n(e=t(e))};const n=i.FileAssetLoader;i.ptrToAsset=e=>{let t=i.ptrToFileAsset(e);return t.isImage?i.ptrToImageAsset(e):t.isFont?i.ptrToFontAsset(e):t.isAudio?i.ptrToAudioAsset(e):t},i.CustomFileAssetLoader=n.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Gb=e},loadContents:function(e,t){return e=i.ptrToAsset(e),this.Gb(e,t)}}),i.CDNFileAssetLoader=n.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=i.ptrToAsset(e);return""!==(e=t.cdnUuid)&&(function(e,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=function(){4==r.readyState&&200==r.status&&(e=>{t.decode(new Uint8Array(e.response))})(r)},r.open("GET",e,!0),r.send(null)}(t.cdnBaseUrl+"/"+e),!0)}}),i.FallbackFileAssetLoader=n.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.lb=[]},addLoader:function(e){this.lb.push(e)},loadContents:function(e,t){for(let n of this.lb)if(n.loadContents(e,t))return!0;return!1}});let r=i.computeAlignment;i.computeAlignment=function(e,t,n,i,a=1){return r.call(this,e,t,n,i,a)}};const u="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),l=new function(){function e(){if(!t){var e=document.createElement("canvas"),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext("webgl",o),n=1,!s)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(s=e.getContext("webgl2",o))n=2;else{if(!(s=e.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function u(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),0<((n=s.getShaderInfoLog(t))||"").length)throw n;s.attachShader(e,t)}if(s=new Proxy(s,{get:(e,t)=>e.isContextLost()?(l||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",t),l=!0),"function"===typeof e[t]?function(){}:void 0):"function"===typeof e[t]?function(...n){return e[t].apply(e,n)}:e[t],set(e,t,n){if(!e.isContextLost())return e[t]=n,!0;l||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+t),l=!0)}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE)),u(e=s.createProgram(),s.VERTEX_SHADER,"attribute vec2 vertex;\n                attribute vec2 uv;\n                uniform vec4 mat;\n                uniform vec2 translate;\n                varying vec2 st;\n                void main() {\n                    st = uv;\n                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n                }"),u(e,s.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),s.bindAttribLocation(e,0,"vertex"),s.bindAttribLocation(e,1,"uv"),s.linkProgram(e),0<((o=s.getProgramInfoLog(e))||"").trim().length)throw o;i=s.getUniformLocation(e,"mat"),a=s.getUniformLocation(e,"translate"),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,"image"),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,s=0,u=0,l=!1;e(),this.hc=function(){return e(),r},this.Mb=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Lb=function(r){if(!e())return null;const i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),2==n?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),i):null};const c=new o(8),h=new o(8),d=new o(10),f=new o(10);this.Qb=function(n,r,o,l,p){if(e()){var v=c.push(n),m=h.push(r);if(t.canvas){for(var b of(t.canvas.width==v&&t.canvas.height==m||(t.canvas.width=v,t.canvas.height=m),t.viewport(0,m-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),o.sort(((e,t)=>t.xb-e.xb)),v=d.push(l),s!=v&&(t.bufferData(t.ARRAY_BUFFER,8*v,t.DYNAMIC_DRAW),s=v),v=0,o))t.bufferSubData(t.ARRAY_BUFFER,v,b.Ua),v+=4*b.Ua.length;for(var g of(console.assert(v==4*l),o))t.bufferSubData(t.ARRAY_BUFFER,v,g.Db),v+=4*g.Db.length;for(var y of(console.assert(v==8*l),v=f.push(p),u!=v&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*v,t.DYNAMIC_DRAW),u=v),b=0,o))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,b,y.indices),b+=2*y.indices.length;console.assert(b==2*p),y=0,g=!0,v=b=0;for(const e of o){e.image.Ka!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.Ja||null),y=e.image.Ka),e.mc?(t.scissor(e.Za,m-e.$a-e.kb,e.Ac,e.kb),g=!0):g&&(t.scissor(0,m-r,n,r),g=!1),o=2/n;const s=-2/r;
1t.uniform4f(i,e.ha[0]*o*e.Ba,e.ha[1]*s*e.Ca,e.ha[2]*o*e.Ba,e.ha[3]*s*e.Ca),t.uniform2f(a,e.ha[4]*o*e.Ba+o*(e.Za-e.ic*e.Ba)-1,e.ha[5]*s*e.Ca+s*(e.$a-e.jc*e.Ca)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,v),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,v+4*l),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,b),v+=4*e.Ua.length,b+=2*e.indices.length}console.assert(v==4*l),console.assert(b==2*p)}}},this.canvas=function(){return e()&&t.canvas}},c=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){function e(e){switch(e){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function t(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function n(){0<M.length&&(l.Qb(C.drawWidth(),C.drawHeight(),M,P,I),M=[],I=P=0,C.reset(512,512));for(const e of A){for(const t of e.H)t();e.H=[]}A.clear()}c&&c();var r=i.RenderPaintStyle;const o=i.RenderPath,s=i.RenderPaint,h=i.Renderer,d=i.StrokeCap,f=i.StrokeJoin,p=i.BlendMode,v=r.fill,m=r.stroke,b=i.FillRule.evenOdd;let g=1;var y=i.RenderImage.extend("CanvasRenderImage",{__construct:function({la:e,xa:t}={}){this.__parent.__construct.call(this),this.Ka=g,g=g+1&2147483647||1,this.la=e,this.xa=t},__destruct:function(){this.Ja&&(l.Mb(this.Ja),URL.revokeObjectURL(this.Xa)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.xa&&t.xa(t);var n=new Image;t.Xa=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Fb=n,t.Ja=l.Lb(n),t.size(n.width,n.height),t.la&&t.la(t)},n.src=t.Xa}}),w=o.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.T=new Path2D},rewind:function(){this.T=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.T,u=s.addPath;e=e.T;const l=new DOMMatrix;l.a=t,l.b=n,l.c=r,l.d=i,l.e=a,l.f=o,u.call(s,e,l)},fillRule:function(e){this.Wa=e},moveTo:function(e,t){this.T.moveTo(e,t)},lineTo:function(e,t){this.T.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.T.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.T.closePath()}}),_=s.extend("CanvasRenderPaint",{color:function(e){this.Ya=t(e)},thickness:function(e){this.Ib=e},join:function(e){switch(e){case f.miter:this.Ia="miter";break;case f.round:this.Ia="round";break;case f.bevel:this.Ia="bevel"}},cap:function(e){switch(e){case d.butt:this.Ha="butt";break;case d.round:this.Ha="round";break;case d.square:this.Ha="square"}},style:function(e){this.Hb=e},blendMode:function(t){this.Eb=e(t)},clearGradient:function(){this.ja=null},linearGradient:function(e,t,n,r){this.ja={zb:e,Ab:t,cb:n,eb:r,Ra:[]}},radialGradient:function(e,t,n,r){this.ja={zb:e,Ab:t,cb:n,eb:r,Ra:[],ec:!0}},addStop:function(e,t){this.ja.Ra.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,r){let i=this.Hb;var a=this.Ya,o=this.ja;if(e.globalCompositeOperation=this.Eb,null!=o){a=o.zb;var s=o.Ab;const n=o.cb;var u=o.eb;const r=o.Ra;o.ec?(o=n-a,u-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=e.createLinearGradient(a,s,n,u);for(let e=0,i=r.length;e<i;e++)s=r[e],a.addColorStop(s.stop,t(s.color));this.Ya=a,this.ja=null}switch(i){case m:e.strokeStyle=a,e.lineWidth=this.Ib,e.lineCap=this.Ha,e.lineJoin=this.Ia,e.stroke(n);break;case v:e.fillStyle=a,e.fill(n,r)}}});const A=new Set;let C=null,M=[],P=0,I=0;var E=i.CanvasRenderer=h.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.S=[1,0,0,1,0,0],this.C=e.getContext("2d"),this.Va=e,this.H=[]},save:function(){this.S.push(...this.S.slice(this.S.length-6)),this.H.push(this.C.save.bind(this.C))},restore:function(){const e=this.S.length-6;if(6>e)throw"restore() called without matching save().";this.S.splice(e),this.H.push(this.C.restore.bind(this.C))},transform:function(e,t,n,r,i,a){const o=this.S,s=o.length-6;o.splice(s,6,o[s]*e+o[s+2]*t,o[s+1]*e+o[s+3]*t,o[s]*n+o[s+2]*r,o[s+1]*n+o[s+3]*r,o[s]*i+o[s+2]*a+o[s+4],o[s+1]*i+o[s+3]*a+o[s+5]),this.H.push(this.C.transform.bind(this.C,e,t,n,r,i,a))},rotate:function(e){const t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},_drawPath:function(e,t){this.H.push(t.draw.bind(t,this.C,e.T,e.Wa===b?"evenodd":"nonzero"))},_drawRiveImage:function(t,n,r,i){var a=t.Fb;if(a){var o=this.C,s=e(r);this.H.push((function(){o.globalCompositeOperation=s,o.globalAlpha=i,o.drawImage(a,0,0),o.globalAlpha=1}))}},_getMatrix:function(e){const t=this.S,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,r,a,o,s,u,c,h,d,f,p){r=this.C.canvas.width;var v=this.C.canvas.height;const m=f-h,b=p-d;h=Math.max(h,0),d=Math.max(d,0),f=Math.min(f,r),p=Math.min(p,v);const g=f-h,y=p-d;if(console.assert(g<=Math.min(m,r)),console.assert(y<=Math.min(b,v)),!(0>=g||0>=y)){f=g<m||y<b,r=p=1;var w=Math.ceil(g*p),_=Math.ceil(y*r);v=l.hc(),w>v&&(p*=v/w,w=v),_>v&&(r*=v/_,_=v),C||(C=new i.DynamicRectanizer(v),C.reset(512,512)),0>(v=C.addRect(w,_))&&(n(),A.add(this),v=C.addRect(w,_),console.assert(0<=v));var E=65535&v,R=v>>16;M.push({ha:this.S.slice(this.S.length-6),image:t,Za:E,$a:R,ic:h,jc:d,Ac:w,kb:_,Ba:p,Ca:r,Ua:new Float32Array(s),Db:new Float32Array(u),indices:new Uint16Array(c),mc:f,xb:t.Ka<<1|(f?1:0)}),P+=s.length,I+=c.length;var F=this.C,T=e(a);this.H.push((function(){F.save(),F.resetTransform(),F.globalCompositeOperation=T,F.globalAlpha=o;const e=l.canvas();
1e&&F.drawImage(e,E,R,w,_,h,d,g,y),F.restore()}))}},_clipPath:function(e){this.H.push(this.C.clip.bind(this.C,e.T,e.Wa===b?"evenodd":"nonzero"))},clear:function(){A.add(this),this.H.push(this.C.clearRect.bind(this.C,0,0,this.Va.width,this.Va.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});i.makeRenderer=function(e){const t=new E(e),n=t.C;return new Proxy(t,{get(e,r){if("function"===typeof e[r])return function(...t){return e[r].apply(e,t)};if("function"===typeof n[r]){if(-1<u.indexOf(r))throw Error("RiveException: Method call to '"+r+"()' is not allowed, as the renderer cannot immediately pass through the return                 values of any canvas 2d context methods.");return function(...e){t.H.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.H.push((()=>{n[r]=i})),!0}})},i.decodeImage=function(e,t){new y({la:t}).decode(e)},i.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=F;return new y({xa:()=>{e.total++},la:()=>{if(e.loaded++,e.loaded===e.total){const t=e.ready;t&&(t(),e.ready=null)}}})}};let R=i.load,F=null;i.load=function(e,t,n=!0){const r=new i.FallbackFileAssetLoader;return void 0!==t&&r.addLoader(t),n&&(t=new i.CDNFileAssetLoader,r.addLoader(t)),new Promise((function(t){let n=null;F={total:0,loaded:0,ready:function(){t(n)}},n=R(e,r),0==F.total&&t(n)}))};let T=i.RendererWrapper.prototype.align;i.RendererWrapper.prototype.align=function(e,t,n,r,i=1){T.call(this,e,t,n,r,i)},r=new a,i.requestAnimationFrame=r.requestAnimationFrame.bind(r),i.cancelAnimationFrame=r.cancelAnimationFrame.bind(r),i.enableFPSCounter=r.Rb.bind(r),i.disableFPSCounter=r.Ob,r.pb=n,i.resolveAnimationFrame=n,i.cleanup=function(){C&&C.delete()}};var h,d,f=Object.assign({},i),p="./this.program",v="object"==typeof window,m="function"==typeof importScripts,b="";(v||m)&&(m?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),e&&(b=e),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",m&&(d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),h=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});var g,y=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,f),f=null,i.thisProgram&&(p=i.thisProgram),i.wasmBinary&&(g=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&N("no native wasm support detected");var _,A,C,M,P,I,E,R,F,T,L=!1;function k(){var e=_.buffer;i.HEAP8=C=new Int8Array(e),i.HEAP16=P=new Int16Array(e),i.HEAP32=E=new Int32Array(e),i.HEAPU8=M=new Uint8Array(e),i.HEAPU16=I=new Uint16Array(e),i.HEAPU32=R=new Uint32Array(e),i.HEAPF32=F=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var j,S=[],O=[],x=[];function D(){var e=i.preRun.shift();S.unshift(e)}var W,V=0,U=null,B=null;function N(e){throw i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),L=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),r(e),e}function $(e){return e.startsWith("data:application/octet-stream;base64,")}if(!$(W="canvas_advanced.wasm")){var z=W;W=i.locateFile?i.locateFile(z,b):b+z}function H(e){if(e==W&&g)return new Uint8Array(g);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}function Y(e,t,n){return function(e){if(!g&&(v||m)){if("function"==typeof fetch&&!e.startsWith("file://"))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>H(e)));if(h)return new Promise(((t,n)=>{h(e,(e=>t(new Uint8Array(e))),n)}))}return Promise.resolve().then((()=>H(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(n,(e=>{w("failed to asynchronously prepare wasm: "+e),N(e)}))}var X,G,q={460492:(e,t,n,r,i)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.h){window.h={Aa:0},window.h.I={},window.h.I.ya=e,window.h.I.capture=t,window.h.I.La=n,window.h.ga={},window.h.ga.stopped=r,window.h.ga.yb=i;let a=window.h;a.D=[],a.yc=function(e){for(var t=0;t<a.D.length;++t)if(null==a.D[t])return a.D[t]=e,t;return a.D.push(e),a.D.length-1},a.Cb=function(e){for(a.D[e]=null;0<a.D.length&&null==a.D[a.D.length-1];)a.D.pop()},a.Sc=function(e){for(var t=0;t<a.D.length;++t)if(a.D[t]==e)return a.Cb(t)},a.ra=function(e){return a.D[e]},a.Ta=["touchend","click"],a.unlock=function(){for(var e=0;e<a.D.length;++e){var t=a.D[e];null!=t&&null!=t.J&&t.state===a.ga.yb&&t.J.resume().then((()=>{Ln(t.qb)}),(e=>{console.error("Failed to resume audiocontext",e)}))}a.Ta.map((function(e){document.removeEventListener(e,a.unlock,!0)}))},a.Ta.map((function(e){document.addEventListener(e,a.unlock,!0)}))}return window.h.Aa+=1,1},462670:()=>{"undefined"!==typeof window.h&&(window.h.Ta.map((function(e){document.removeEventListener(e,window.h.unlock,!0)})),--window.h.Aa,0===window.h.Aa&&delete window.h)},462974:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,463078:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch(n){return 0}},463249:(e,t,n,r,i,a)=>
1{if("undefined"===typeof window.h)return-1;var o={},s={};return e==window.h.I.ya&&0!=n&&(s.sampleRate=n),o.J=new(window.AudioContext||window.webkitAudioContext)(s),o.J.suspend(),o.state=window.h.ga.stopped,n=0,e!=window.h.I.ya&&(n=t),o.Z=o.J.createScriptProcessor(r,n,t),o.Z.onaudioprocess=function(n){if(null!=o.sa&&0!=o.sa.length||(o.sa=new Float32Array(F.buffer,i,r*t)),e==window.h.I.capture||e==window.h.I.La){for(var s=0;s<t;s+=1)for(var u=n.inputBuffer.getChannelData(s),l=o.sa,c=0;c<r;c+=1)l[c*t+s]=u[c];jn(a,r,i)}if(e==window.h.I.ya||e==window.h.I.La)for(Sn(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(u=n.outputBuffer.getChannelData(s),l=o.sa,c=0;c<r;c+=1)u[c]=l[c*t+s];else for(s=0;s<n.outputBuffer.numberOfChannels;++s)n.outputBuffer.getChannelData(s).fill(0)},e!=window.h.I.capture&&e!=window.h.I.La||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(e){o.Da=o.J.createMediaStreamSource(e),o.Da.connect(o.Z),o.Z.connect(o.J.destination)})).catch((function(e){console.log("Failed to get user media: "+e)})),e==window.h.I.ya&&o.Z.connect(o.J.destination),o.qb=a,window.h.yc(o)},466126:e=>window.h.ra(e).J.sampleRate,466199:e=>{void 0!==(e=window.h.ra(e)).Z&&(e.Z.onaudioprocess=function(){},e.Z.disconnect(),e.Z=void 0),void 0!==e.Da&&(e.Da.disconnect(),e.Da=void 0),e.J.close(),e.J=void 0,e.qb=void 0},466599:e=>{window.h.Cb(e)},466649:e=>{(e=window.h.ra(e)).J.resume(),e.state=window.h.ga.yb},466788:e=>{(e=window.h.ra(e)).J.suspend(),e.state=window.h.ga.stopped}},J=e=>{for(;0<e.length;)e.shift()(i)},K=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},Z=e=>{var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=K(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},Q=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."},ee=e=>{if("/"===e)return"/";var t=(e=(e=Z(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},te=e=>(te=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);N("initRandomDevice")})())(e);function ne(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){if("string"!=typeof(t=0<=n?arguments[n]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=K(e.split("/").filter((e=>!!e)),!t).join("/"))||"."}var re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&re)return re.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},ae=[],oe=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},se=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(n>=r)break;t[n++]=o}else{if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|63&o}}return t[n]=0,n-i};function ue(e,t){var n=Array(oe(e)+1);return e=se(e,n,0,n.length),t&&(n.length=e),n}var le=[];function ce(e,t){le[e]={input:[],F:[],V:t},Ve(e,he)}var he={open:function(e){var t=le[e.node.za];if(!t)throw new Ie(43);e.s=t,e.seekable=!1},close:function(e){e.s.V.qa(e.s)},qa:function(e){e.s.V.qa(e.s)},read:function(e,t,n,r){if(!e.s||!e.s.V.jb)throw new Ie(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.V.jb(e.s)}catch(s){throw new Ie(29)}if(void 0===o&&0===i)throw new Ie(6);if(null===o||void 0===o)break;i++,t[n+a]=o}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,n,r){if(!e.s||!e.s.V.Oa)throw new Ie(60);try{for(var i=0;i<r;i++)e.s.V.Oa(e.s,t[n+i])}catch(a){throw new Ie(29)}return r&&(e.node.timestamp=Date.now()),i}},de={jb:function(){e:{if(!ae.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e){e=null;break e}ae=ue(e,!0)}e=ae.shift()}return e},Oa:function(e,t){null===t||10===t?(y(ie(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},qa:function(e){e.F&&0<e.F.length&&(y(ie(e.F,0)),e.F=[])},bc:function(){return{Fc:25856,Hc:5,Ec:191,Gc:35387,Dc:[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]}},cc:function(){return 0},dc:function(){return[24,80]}},fe={Oa:function(e,t){null===t||10===t?(w(ie(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},qa:function(e){e.F&&0<e.F.length&&(w(ie(e.F,0)),e.F=[])}};function pe(e,t){var n=e.j?e.j.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.j,e.j=new Uint8Array(t),0<e.v&&e.j.set(n.subarray(0,e.v),0))}var ve,me,be,ge,ye={O:null,U:()=>ye.createNode(null,"/",16895,0),createNode(e,t,n,r){if(24576===(61440&n)||4096===(61440&n))throw new Ie(63);return ye.O||(ye.O={dir:{node:{Y:ye.l.Y,P:ye.l.P,ka:ye.l.ka,va:ye.l.va,vb:ye.l.vb,Bb:ye.l.Bb,wb:ye.l.wb,tb:ye.l.tb,Ea:ye.l.Ea},stream:{ba:ye.m.ba}},file:{node:{Y:ye.l.Y,P:ye.l.P},stream:{ba:ye.m.ba,read:ye.m.read,write:ye.m.write,pa:ye.m.pa,mb:ye.m.mb,ob:ye.m.ob}},link:{node:{Y:ye.l.Y,P:ye.l.P,ma:ye.l.ma},stream:{}},ab:{node:{Y:ye.l.Y,P:ye.l.P},stream:We}}),16384===(61440&(n=ke(e,t,n,r)).mode)?(n.l=ye.O.dir.node,n.m=ye.O.dir.stream,n.j={}
1):32768===(61440&n.mode)?(n.l=ye.O.file.node,n.m=ye.O.file.stream,n.v=0,n.j=null):40960===(61440&n.mode)?(n.l=ye.O.link.node,n.m=ye.O.link.stream):8192===(61440&n.mode)&&(n.l=ye.O.ab.node,n.m=ye.O.ab.stream),n.timestamp=Date.now(),e&&(e.j[t]=n,e.timestamp=n.timestamp),n},Kc:e=>e.j?e.j.subarray?e.j.subarray(0,e.v):new Uint8Array(e.j):new Uint8Array(0),l:{Y(e){var t={};return t.Jc=8192===(61440&e.mode)?e.id:1,t.Mc=e.id,t.mode=e.mode,t.Oc=1,t.uid=0,t.Lc=0,t.za=e.za,16384===(61440&e.mode)?t.size=4096:32768===(61440&e.mode)?t.size=e.v:40960===(61440&e.mode)?t.size=e.link.length:t.size=0,t.Bc=new Date(e.timestamp),t.Nc=new Date(e.timestamp),t.Ic=new Date(e.timestamp),t.Jb=4096,t.Cc=Math.ceil(t.size/t.Jb),t},P(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.v!=t))if(0==t)e.j=null,e.v=0;else{var n=e.j;e.j=new Uint8Array(t),n&&e.j.set(n.subarray(0,Math.min(t,e.v))),e.v=t}},ka(){throw Ee[44]},va:(e,t,n,r)=>ye.createNode(e,t,n,r),vb(e,t,n){if(16384===(61440&e.mode)){try{var r=Le(t,n)}catch(a){}if(r)for(var i in r.j)throw new Ie(55)}delete e.parent.j[e.name],e.parent.timestamp=Date.now(),e.name=n,t.j[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},Bb(e,t){delete e.j[t],e.timestamp=Date.now()},wb(e,t){var n,r=Le(e,t);for(n in r.j)throw new Ie(55);delete e.j[t],e.timestamp=Date.now()},tb(e){var t,n=[".",".."];for(t in e.j)e.j.hasOwnProperty(t)&&n.push(t);return n},Ea:(e,t,n)=>((e=ye.createNode(e,t,41471,0)).link=n,e),ma(e){if(40960!==(61440&e.mode))throw new Ie(28);return e.link}},m:{read(e,t,n,r,i){var a=e.node.j;if(i>=e.node.v)return 0;if(8<(e=Math.min(e.node.v-i,r))&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.j||e.j.subarray)){if(a)return e.j=t.subarray(n,n+r),e.v=r;if(0===e.v&&0===i)return e.j=t.slice(n,n+r),e.v=r;if(i+r<=e.v)return e.j.set(t.subarray(n,n+r),i),r}if(pe(e,i+r),e.j.subarray&&t.subarray)e.j.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.j[i+a]=t[n+a];return e.v=Math.max(e.v,i+r),r},ba(e,t,n){if(1===n?t+=e.position:2===n&&32768===(61440&e.node.mode)&&(t+=e.node.v),0>t)throw new Ie(28);return t}
1,pa(e,t,n){pe(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},mb(e,t,n,r,i){if(32768!==(61440&e.node.mode))throw new Ie(43);if(e=e.node.j,2&i||e.buffer!==C.buffer){if((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,N(),!(t=void 0))throw new Ie(48);C.set(e,t)}else n=!1,t=e.byteOffset;return{o:t,M:n}},ob:(e,t,n,r)=>(ye.m.write(e,t,0,r,n,!1),0)}},we=null,_e={},Ae=[],Ce=1,Me=null,Pe=!0,Ie=null,Ee={},Re=(e,t={})=>{if(!(e=ne(e)))return{path:"",node:null};if(8<(t=Object.assign({hb:!0,Qa:0},t)).Qa)throw new Ie(32);e=e.split("/").filter((e=>!!e));for(var n=we,r="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=Le(n,e[i]),r=Z(r+"/"+e[i]),n.wa&&(!a||a&&t.hb)&&(n=n.wa.root),!a||t.gb)for(a=0;40960===(61440&n.mode);)if(n=ze(r),r=ne(Q(r),n),n=Re(r,{Qa:t.Qa+1}).node,40<a++)throw new Ie(32)}return{path:r,node:n}},Fe=e=>{for(var t;;){if(e===e.parent)return e=e.U.nb,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}},Te=(e,t)=>{for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Me.length},Le=(e,t)=>{var n;if(n=(n=Se(e,"x"))?n:e.l.ka?0:2)throw new Ie(n,e);for(n=Me[Te(e.id,t)];n;n=n.lc){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.l.ka(e,t)},ke=(e,t,n,r)=>(e=new Mn(e,t,n,r),t=Te(e.parent.id,e.name),e.lc=Me[t],Me[t]=e),je=e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},Se=(e,t)=>Pe?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2,Oe=(e,t)=>{try{return Le(e,t),20}catch(n){}return Se(e,"wx")},xe=e=>{if(!(e=Ae[e]))throw new Ie(8);return e},De=(e,t=-1)=>(be||((be=function(){this.h={}}).prototype={},Object.defineProperties(be.prototype,{object:{get(){return this.node},set(e){this.node=e}},flags:{get(){return this.h.flags},set(e){this.h.flags=e}},position:{get(){return this.h.position},set(e){this.h.position=e}}})),e=Object.assign(new be,e),-1==t&&(t=(()=>{for(var e=0;4096>=e;e++)if(!Ae[e])return e;throw new Ie(33)})()),e.X=t,Ae[t]=e),We={open:e=>{e.m=_e[e.node.za].m,e.m.open&&e.m.open(e)},ba:()=>{throw new Ie(70)}},Ve=(e,t)=>{_e[e]={m:t}},Ue=(e,t)=>{var n="/"===t,r=!t;if(n&&we)throw new Ie(10);if(!n&&!r){var i=Re(t,{hb:!1});if(t=i.path,(i=i.node).wa)throw new Ie(10);if(16384!==(61440&i.mode))throw new Ie(54)}t={type:e,Qc:{},nb:t,kc:[]},(e=e.U(t)).U=t,t.root=e,n?we=e:i&&(i.wa=t,i.U&&i.U.kc.push(t))},Be=(e,t,n)=>{var r=Re(e,{parent:!0}).node;if(!(e=ee(e))||"."===e||".."===e)throw new Ie(28);var i=Oe(r,e);if(i)throw new Ie(i);if(!r.l.va)throw new Ie(63);return r.l.va(r,e,t,n)},Ne=(e,t,n)=>{"undefined"==typeof n&&(n=t,t=438),Be(e,8192|t,n)},$e=(e,t)=>{if(!ne(e))throw new Ie(44);var n=Re(t,{parent:!0}).node;if(!n)throw new Ie(44);t=ee(t);var r=Oe(n,t);if(r)throw new Ie(r);if(!n.l.Ea)throw new Ie(63);n.l.Ea(n,t,e)},ze=e=>{if(!(e=Re(e).node))throw new Ie(44);if(!e.l.ma)throw new Ie(28);return ne(Fe(e.parent),e.l.ma(e))},He=(e,t,n)=>{if(""===e)throw new Ie(44);if("string"==typeof t){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if("undefined"==typeof r)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=64&t?4095&("undefined"==typeof n?438:n)|32768:0,"object"==typeof e)var a=e;else{e=Z(e);try{a=Re(e,{gb:!(131072&t)}).node}catch(o){}}if(r=!1,64&t)if(a){if(128&t)throw new Ie(20)}else a=Be(e,n,0),r=!0;if(!a)throw new Ie(44);if(8192===(61440&a.mode)&&(t&=-513),65536&t&&16384!==(61440&a.mode))throw new Ie(54);if(!r&&(n=a?40960===(61440&a.mode)?32:16384===(61440&a.mode)&&("r"!==je(t)||512&t)?31:Se(a,je(t)):44))throw new Ie(n);if(512&t&&!r){if(!(n="string"==typeof(n=a)?Re(n,{gb:!0}).node:n).l.P)throw new Ie(63);if(16384===(61440&n.mode))throw new Ie(31);if(32768!==(61440&n.mode))throw new Ie(28);if(r=Se(n,"w"))throw new Ie(r);n.l.P(n,{size:0,timestamp:Date.now()})}return t&=-131713,(a=De({node:a,path:Fe(a),flags:t,seekable:!0,position:0,m:a.m,zc:[],error:!1})).m.open&&a.m.open(a),!i.logReadFiles||1&t||(ge||(ge={}),e in ge||(ge[e]=1)),a},Ye=(e,t,n)=>{if(null===e.X)throw new Ie(8);if(!e.seekable||!e.m.ba)throw new Ie(70);if(0!=n&&1!=n&&2!=n)throw new Ie(28);e.position=e.m.ba(e,t,n),e.zc=[]},Xe=()=>{Ie||((Ie=function(e,t){this.name="ErrnoError",this.node=t,this.pc=function(e){this.aa=e},this.pc(e),this.message="FS error"}).prototype=Error(),Ie.prototype.constructor=Ie,[44].forEach((e=>{Ee[e]=new Ie(e),Ee[e].stack="<generic error, no stack>"})))}
1,Ge=(e,t,n)=>{e=Z("/dev/"+e);var r=function(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}(!!t,!!n);me||(me=64);var i=me++<<8|0;Ve(i,{open:e=>{e.seekable=!1},close:()=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,n,r,i)=>{for(var a=0,o=0;o<i;o++){try{var s=t()}catch(u){throw new Ie(29)}if(void 0===s&&0===a)throw new Ie(6);if(null===s||void 0===s)break;a++,n[r+o]=s}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,i)=>{for(var a=0;a<i;a++)try{n(t[r+a])}catch(o){throw new Ie(29)}return i&&(e.node.timestamp=Date.now()),a}}),Ne(e,r,i)},qe={},Je=void 0;function Ke(){return E[(Je+=4)-4>>2]}function Ze(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e}function Qe(e,t){return{[e=Ze(e)]:function(){return t.apply(this,arguments)}}[e]}function et(){this.M=[void 0],this.ib=[]}var tt=new et,nt=void 0;function rt(e){throw new nt(e)}var it=e=>(e||rt("Cannot use deleted val. handle = "+e),tt.get(e).value),at=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tt.pa({ub:1,value:e})}};function ot(e){var t=Error,n=Qe(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n}var st=void 0,ut=void 0;function lt(e){for(var t="";M[e];)t+=ut[M[e++]];return t}var ct=[];function ht(){for(;ct.length;){var e=ct.pop();e.g.fa=!1,e.delete()}}var dt=void 0,ft={};function pt(e,t){for(void 0===t&&rt("ptr should not be undefined");e.A;)t=e.na(t),e=e.A;return t}var vt={};function mt(e){var t=lt(e=On(e));return Rn(e),t}function bt(e,t){var n=vt[e];return void 0===n&&rt(t+" has unknown type "+mt(e)),n}function gt(){}var yt=!1;function wt(e){--e.count.value,0===e.count.value&&(e.G?e.L.W(e.G):e.u.i.W(e.o))}function _t(e,t,n){return t===n?e:void 0===n.A||null===(e=_t(e,t,n.A))?null:n.Pb(e)}var At={},Ct=void 0;function Mt(e){throw new Ct(e)}function Pt(e,t){return t.u&&t.o||Mt("makeClassHandle requires ptr and ptrType"),!!t.L!==!!t.G&&Mt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},It(Object.create(e,{g:{value:t}}))}function It(e){return"undefined"===typeof FinalizationRegistry?(It=e=>e,e):(yt=new FinalizationRegistry((e=>{wt(e.g)})),gt=e=>{yt.unregister(e)},(It=e=>{var t=e.g;return t.G&&yt.register(e,{g:t},e),e})(e))}var Et={};function Rt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ft(e){return this.fromWireType(E[e>>2])}var Tt={},Lt={};function kt(e,t,n){function r(t){(t=n(t)).length!==e.length&&Mt("Mismatched type converter count");for(var r=0;r<e.length;++r)St(e[r],t[r])}e.forEach((function(e){Lt[e]=t}));var i=Array(t.length),a=[],o=0;t.forEach(((e,t)=>{vt.hasOwnProperty(e)?i[t]=vt[e]:(a.push(e),Tt.hasOwnProperty(e)||(Tt[e]=[]),Tt[e].push((()=>{i[t]=vt[e],++o===a.length&&r(i)})))})),0===a.length&&r(i)}function jt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${e}`)}}function St(e,t,n={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");!function(e,t,n={}){var r=t.name;if(e||rt(`type "${r}" must have a positive integer typeid pointer`),vt.hasOwnProperty(e)){if(n.$b)return;rt(`Cannot register type '${r}' twice`)}vt[e]=t,delete Lt[e],Tt.hasOwnProperty(e)&&(t=Tt[e],delete Tt[e],t.forEach((e=>e())))}(e,t,n)}function Ot(e){rt(e.g.u.i.name+" instance already deleted")}function xt(){}function Dt(e,t,n){if(void 0===e[t].B){var r=e[t];e[t]=function(){return e[t].B.hasOwnProperty(arguments.length)||rt(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].B})!`),e[t].B[arguments.length].apply(this,arguments)},e[t].B=[],e[t].B[r.ea]=r}}function Wt(e,t,n){i.hasOwnProperty(e)?((void 0===n||void 0!==i[e].B&&void 0!==i[e].B[n])&&rt(`Cannot register public name '${e}' twice`),Dt(i,e,e),i.hasOwnProperty(n)&&rt(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].B[n]=t):(i[e]=t,void 0!==n&&(i[e].Pc=n))}function Vt(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.N=n,this.W=r,this.A=i,this.Ub=a,this.na=o,this.Pb=s,this.rb=[]}function Ut(e,t,n){for(;t!==n;)t.na||rt(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.na(e),t=t.A;return e}function Bt(e,t){return null===t?(this.Na&&rt(`null is not a valid ${this.name}`),0):(t.g||rt(`Cannot pass "${nn(t)}" as a ${this.name}`),t.g.o||rt(`Cannot pass deleted object as a pointer of type ${this.name}`),Ut(t.g.o,t.g.u.i,this.i))}function Nt(e,t){if(null===t){if(this.Na&&rt(`null is not a valid ${this.name}`),this.ua){var n=this.Pa();return null!==e&&e.push(this.W,n),n}return 0}if(t.g||rt(`Cannot pass "${nn(t)}" as a ${this.name}`),t.g.o||rt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&t.g.u.ta&&rt(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${this.name}`),n=Ut(t.g.o,t.g.u.i,this.i),this.ua)switch(void 0===t.g.G&&rt("Passing raw pointer to smart pointer is illegal"),this.tc){case 0:t.g.L===this?n=t.g.G:rt(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${this.name}`);break;case 1:n=t.g.G;break;case 2:if(t.g.L===this)n=t.g.G;else{var r=t.clone();n=this.oc(n,at((function(){r.delete()}))),null!==e&&e.push(this.W,n)}break;default:rt("Unsupporting sharing policy")}return n}function $t(e,t){return null===t?(this.Na&&rt(`null is not a valid ${this.name}`),0):(t.g||rt(`Cannot pass "${nn(t)}" as a ${this.name}`),t.g.o||rt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.g.u.ta&&rt(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`),Ut(t.g.o,t.g.u.i,this.i))}function zt(e,t,n,r){this.name=e,this.i=t,this.Na=n,this.ta=r,this.ua=!1,this.W=this.oc=this.Pa=this.sb=this.tc=this.nc=void 0,void 0!==t.A?this.toWireType=Nt:(this.toWireType=r?Bt:$t,this.K=null)}function Ht(e,t,n){i.hasOwnProperty(e)||Mt("Replacing nonexistant public symbol"),void 0!==i[e].B&&void 0!==n?i[e].B[n]=t:(i[e]=t,i[e].ea=n)}var Yt=[],Xt=e=>{var t=Yt[e];return t||(e>=Yt.length&&(Yt.length=e+1),Yt[e]=t=j.get(e)),t};function Gt(e,t){var n=(e=lt(e)).includes("j")?((e,t)=>
1{var n=[];return function(){if(n.length=0,Object.assign(n,arguments),e.includes("j")){var r=i["dynCall_"+e];r=n&&n.length?r.apply(null,[t].concat(n)):r.call(null,t)}else r=Xt(t).apply(null,n);return r}})(e,t):Xt(t);return"function"!=typeof n&&rt(`unknown function pointer with signature ${e}: ${t}`),n}var qt=void 0;function Jt(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||vt[t]||(Lt[t]?Lt[t].forEach(e):(n.push(t),r[t]=!0))})),new qt(`${e}: `+n.map(mt).join([", "]))}function Kt(e,t,n,r,i){var a=t.length;2>a&&rt("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=!1;for(n=1;n<t.length;++n)if(null!==t[n]&&void 0===t[n].K){s=!0;break}var u="void"!==t[0].name,l=a-2,c=Array(l),h=[],d=[];return function(){if(arguments.length!==l&&rt(`function ${e} called with ${arguments.length} arguments, expected ${l} args!`),d.length=0,h.length=o?2:1,h[0]=i,o){var n=t[1].toWireType(d,this);h[1]=n}for(var a=0;a<l;++a)c[a]=t[a+2].toWireType(d,arguments[a]),h.push(c[a]);if(a=r.apply(null,h),s)Rt(d);else for(var f=o?1:2;f<t.length;f++){var p=1===f?n:c[f-2];null!==t[f].K&&t[f].K(p)}return n=u?t[0].fromWireType(a):void 0}}function Zt(e,t){for(var n=[],r=0;r<e;r++)n.push(R[t+4*r>>2]);return n}function Qt(e,t,n){return e instanceof Object||rt(`${n} with invalid "this": ${e}`),e instanceof t.i.constructor||rt(`${n} incompatible with "this" of type ${e.constructor.name}`),e.g.o||rt(`cannot call emscripten binding method ${n} on deleted object`),Ut(e.g.o,e.g.u.i,t.i)}function en(e){e>=tt.h&&0===--tt.get(e).ub&&tt.Zb(e)}function tn(e,t,n){switch(t){case 0:return function(e){return this.fromWireType((n?C:M)[e])};case 1:return function(e){return this.fromWireType((n?P:I)[e>>1])};case 2:return function(e){return this.fromWireType((n?E:R)[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function nn(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function rn(e,t){switch(t){case 2:return function(e){return this.fromWireType(F[e>>2])};case 3:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function an(e,t,n){switch(t){case 0:return n?function(e){return C[e]}:function(e){return M[e]};case 1:return n?function(e){return P[e>>1]}:function(e){return I[e>>1]};case 2:return n?function(e){return E[e>>2]}:function(e){return R[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var on="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,sn=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&I[n];)++n;if(32<(n<<=1)-e&&on)return on.decode(M.subarray(e,n));for(n="",r=0;!(r>=t/2);++r){var i=P[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},un=(e,t,n)=>{if(void 0===n&&(n=2147483647),2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i<n;++i)P[t>>1]=e.charCodeAt(i),t+=2;return P[t>>1]=0,t-r},ln=e=>2*e.length,cn=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=E[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r},hn=(e,t,n)=>{if(void 0===n&&(n=2147483647),4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),E[t>>2]=a,(t+=4)+4>n)break}return E[t>>2]=0,t-r},dn=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},fn={};function pn(e){var t=fn[e];return void 0===t?lt(e):t}var vn,mn=[],bn=[],gn=[],yn={},wn=()=>{if(!vn){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:p||"./this.program"};for(e in yn)void 0===yn[e]?delete t[e]:t[e]=yn[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);vn=n}return vn},_n=e=>0===e%4&&(0!==e%100||0===e%400),An=[31,29,31,30,31,30,31,31,30,31,30,31],Cn=[31,28,31,30,31,30,31,31,30,31,30,31];function Mn(e,t,n,r){e||(e=this),this.parent=e,this.U=e.U,this.wa=null,this.id=Ce++,this.name=t,this.mode=n,this.l={},this.m={},this.za=r}Object.defineProperties(Mn.prototype,{read:{get:function(){return 365===(365&this.mode)}
1,set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),Xe(),Me=Array(4096),Ue(ye,"/"),Be("/tmp",16895,0),Be("/home",16895,0),Be("/home/web_user",16895,0),(()=>{Be("/dev",16895,0),Ve(259,{read:()=>0,write:(e,t,n,r)=>r}),Ne("/dev/null",259),ce(1280,de),ce(1536,fe),Ne("/dev/tty",1280),Ne("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=te(e).byteLength),e[--t]);Ge("random",n),Ge("urandom",n),Be("/dev/shm",16895,0),Be("/dev/shm/tmp",16895,0)})(),(()=>{Be("/proc",16895,0);var e=Be("/proc/self",16895,0);Be("/proc/self/fd",16895,0),Ue({U:()=>{var t=ke(e,"fd",16895,73);return t.l={ka:(e,t)=>{var n=xe(+t);return(e={parent:null,U:{nb:"fake"},l:{ma:()=>n.path}}).parent=e}},t}},"/proc/self/fd")})(),Object.assign(et.prototype,{get(e){return this.M[e]},has(e){return void 0!==this.M[e]},pa(e){var t=this.ib.pop()||this.M.length;return this.M[t]=e,t},Zb(e){this.M[e]=void 0,this.ib.push(e)}}),nt=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},tt.M.push({value:void 0},{value:null},{value:!0},{value:!1}),tt.h=tt.M.length,i.count_emval_handles=function(){for(var e=0,t=tt.h;t<tt.M.length;++t)void 0!==tt.M[t]&&++e;return e}
1,st=i.PureVirtualError=ot("PureVirtualError");for(var Pn=Array(256),In=0;256>In;++In)Pn[In]=String.fromCharCode(In);ut=Pn,i.getInheritedInstanceCount=function(){return Object.keys(ft).length},i.getLiveInheritedInstances=function(){var e,t=[];for(e in ft)ft.hasOwnProperty(e)&&t.push(ft[e]);return t},i.flushPendingDeletes=ht,i.setDelayFunction=function(e){dt=e,ct.length&&dt&&dt(ht)},Ct=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},xt.prototype.isAliasOf=function(e){if(!(this instanceof xt&&e instanceof xt))return!1;var t=this.g.u.i,n=this.g.o,r=e.g.u.i;for(e=e.g.o;t.A;)n=t.na(n),t=t.A;for(;r.A;)e=r.na(e),r=r.A;return t===r&&n===e},xt.prototype.clone=function(){if(this.g.o||Ot(this),this.g.ia)return this.g.count.value+=1,this;var e=It,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return(e=e(n.call(t,r,{g:{value:{count:i.count,fa:i.fa,ia:i.ia,o:i.o,u:i.u,G:i.G,L:i.L}}}))).g.count.value+=1,e.g.fa=!1,e},xt.prototype.delete=function(){this.g.o||Ot(this),this.g.fa&&!this.g.ia&&rt("Object already scheduled for deletion"),gt(this),wt(this.g),this.g.ia||(this.g.G=void 0,this.g.o=void 0)},xt.prototype.isDeleted=function(){return!this.g.o},xt.prototype.deleteLater=function(){return this.g.o||Ot(this),this.g.fa&&!this.g.ia&&rt("Object already scheduled for deletion"),ct.push(this),1===ct.length&&dt&&dt(ht),this.g.fa=!0,this},zt.prototype.Vb=function(e){return this.sb&&(e=this.sb(e)),e},zt.prototype.bb=function(e){this.W&&this.W(e)},zt.prototype.argPackAdvance=8,zt.prototype.readValueFromPointer=Ft,zt.prototype.deleteObject=function(e){null!==e&&e.delete()},zt.prototype.fromWireType=function(e){function t(){return this.ua?Pt(this.i.N,{u:this.nc,o:n,L:this,G:e}):Pt(this.i.N,{u:this,o:e})}var n=this.Vb(e);if(!n)return this.bb(e),null;var r=function(e,t){return t=pt(e,t),ft[t]}(this.i,n);if(void 0!==r)return 0===r.g.count.value?(r.g.o=n,r.g.G=e,r.clone()):(r=r.clone(),this.bb(e),r);if(r=this.i.Ub(n),!(r=At[r]))return t.call(this);r=this.ta?r.Kb:r.pointerType;var i=_t(n,this.i,r.i);return null===i?t.call(this):this.ua?Pt(r.i.N,{u:r,o:i,L:this,G:e}):Pt(r.i.N,{u:r,o:i})},qt=i.UnboundTypeError=ot("UnboundTypeError");var En={__syscall_fcntl64:function(e,t,n){Je=n;try{var r=xe(e);switch(t){case 0:var i=Ke();return 0>i?-28:De(r,i).X;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:return i=Ke(),r.flags|=i,0;case 5:return i=Ke(),P[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[Tn()>>2]=28,-1}}catch(a){if("undefined"==typeof qe||"ErrnoError"!==a.name)throw a;return-a.aa}},__syscall_ioctl:function(e,t,n){Je=n;try{var r=xe(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return r.s?0:-59;case 21505:if(!r.s)return-59;if(r.s.V.bc){t=[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 i=Ke();E[i>>2]=25856,E[i+4>>2]=5,E[i+8>>2]=191,E[i+12>>2]=35387;for(var a=0;32>a;a++)C[i+a+17>>0]=t[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.s)return-59;if(r.s.V.cc)for(i=Ke(),t=[],a=0;32>a;a++)t.push(C[i+a+17>>0]);return 0;case 21519:return r.s?(i=Ke(),E[i>>2]=0):-59;case 21520:return r.s?-28:-59;case 21531:if(i=Ke(),!r.m.ac)throw new Ie(59);return r.m.ac(r,t,i);case 21523:return r.s?(r.s.V.dc&&(a=[24,80],i=Ke(),P[i>>1]=a[0],P[i+2>>1]=a[1]),0):-59;default:return-28}}catch(o){if("undefined"==typeof qe||"ErrnoError"!==o.name)throw o;return-o.aa}}
1,__syscall_openat:function(e,t,n,r){Je=r;try{var i=t=t?ie(M,t):"";if("/"===i.charAt(0))t=i;else{var a=-100===e?"/":xe(e).path;if(0==i.length)throw new Ie(44);t=Z(a+"/"+i)}var o=r?Ke():0;return He(t,n,o).X}catch(s){if("undefined"==typeof qe||"ErrnoError"!==s.name)throw s;return-s.aa}},_embind_create_inheriting_constructor:function(e,t,n){e=lt(e),t=bt(t,"wrapper"),n=it(n);var r=[].slice,i=t.i,a=i.N,o=i.A.N,s=i.A.constructor;for(var u in e=Qe(e,(function(){i.A.rb.forEach(function(e){if(this[e]===o[e])throw new st(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct.apply(this,r.call(arguments))})),a.__construct=function(){this===a&&rt("Pass correct 'this' to __construct");var e=s.implement.apply(void 0,[this].concat(r.call(arguments)));gt(e);var t=e.g;e.notifyOnDestruction(),t.ia=!0,Object.defineProperties(this,{g:{value:t}}),It(this),e=t.o,e=pt(i,e),ft.hasOwnProperty(e)?rt(`Tried to register registered instance: ${e}`):ft[e]=this},a.__destruct=function(){this===a&&rt("Pass correct 'this' to __destruct"),gt(this);var e=this.g.o;e=pt(i,e),ft.hasOwnProperty(e)?delete ft[e]:rt(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(a),n)e.prototype[u]=n[u];return at(e)},_embind_finalize_value_object:function(e){var t=Et[e];delete Et[e];var n=t.Pa,r=t.W,i=t.fb;kt([e],i.map((e=>e.Yb)).concat(i.map((e=>e.rc))),(e=>{var a={};return i.forEach(((t,n)=>{var r=e[n],o=t.Wb,s=t.Xb,u=e[n+i.length],l=t.qc,c=t.sc;a[t.Sb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(c,e,u.toWireType(n,t)),Rt(n)}}})),[{name:t.name,fromWireType:function(e){var t,n={};for(t in a)n[t]=a[t].read(e);return r(e),n},toWireType:function(e,t){for(var i in a)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:Ft,K:r}]}))},_embind_register_bigint:function(){},_embind_register_bool:function(e,t,n,r,i){var a=jt(n);St(e,{name:t=lt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:8,readValueFromPointer:function(e){if(1===n)var r=C;else if(2===n)r=P;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=E}return this.fromWireType(r[e>>a])},K:null})},_embind_register_class:function(e,t,n,r,i,a,o,s,u,l,c,h,d){c=lt(c),a=Gt(i,a),s&&(s=Gt(o,s)),l&&(l=Gt(u,l)),d=Gt(h,d);var f=Ze(c);Wt(f,(function(){Jt(`Cannot construct ${c} due to unbound types`,[r])})),kt([e,t,n],r?[r]:[],(function(t){if(t=t[0],r)var n=t.i,i=n.N;else i=xt.prototype;t=Qe(f,(function(){if(Object.getPrototypeOf(this)!==o)throw new nt("Use 'new' to construct "+c);if(void 0===u.$)throw new nt(c+" has no accessible constructor");var e=u.$[arguments.length];if(void 0===e)throw new nt(`Tried to invoke ctor of ${c} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.$).toString()}) parameters instead!`);return e.apply(this,arguments)}));var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var u=new Vt(c,t,o,d,n,a,s,l);u.A&&(void 0===u.A.oa&&(u.A.oa=[]),u.A.oa.push(u)),n=new zt(c,u,!0,!1),i=new zt(c+"*",u,!1,!1);var h=new zt(c+" const*",u,!1,!0);return At[e]={pointerType:i,Kb:h},Ht(f,t),[n,i,h]}))},_embind_register_class_class_function:function(e,t,n,r,i,a,o){var s=Zt(n,r);t=lt(t),a=Gt(i,a),kt([],[e],(function(e){function r(){Jt(`Cannot call ${i} due to unbound types`,s)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.i.constructor;return void 0===u[t]?(r.ea=n-1,u[t]=r):(Dt(u,t,i),u[t].B[n-1]=r),kt([],s,(function(r){if(r=Kt(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].B?(r.ea=n-1,u[t]=r):u[t].B[n-1]=r,e.i.oa)for(const n of e.i.oa)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]})),[]}))},_embind_register_class_class_property:function(e,t,n,r,i,a,o,s){t=lt(t),a=Gt(i,a),kt([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,u={get(){Jt(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{Jt(`Cannot access ${i} due to unbound types`,[n])}:()=>{rt(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,u),kt([],[n],(function(n){n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=Gt(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),Rt(t)}),Object.defineProperty(e.i.constructor,t,i),[]})),[]}))},_embind_register_class_constructor:function(e,t,n,r,i,a){var o=Zt(t,n);i=Gt(r,i),kt([],[e],(function(e){var n=`constructor ${(e=e[0]).name}`;if(void 0===e.i.$&&(e.i.$=[]),void 0!==e.i.$[t-1])throw new nt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.i.$[t-1]=()=>{Jt(`Cannot construct ${e.name} due to unbound types`,o)},kt([],o,(function(r){return r.splice(1,0,null),e.i.$[t-1]=Kt(n,r,null,i,a),[]})),[]}))},_embind_register_class_function:function(e,t,n,r,i,a,o,s){var u=Zt
1(n,r);t=lt(t),a=Gt(i,a),kt([],[e],(function(e){function r(){Jt(`Cannot call ${i} due to unbound types`,u)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.i.rb.push(t);var l=e.i.N,c=l[t];return void 0===c||void 0===c.B&&c.className!==e.name&&c.ea===n-2?(r.ea=n-2,r.className=e.name,l[t]=r):(Dt(l,t,i),l[t].B[n-2]=r),kt([],u,(function(r){return r=Kt(i,r,e,a,o),void 0===l[t].B?(r.ea=n-2,l[t]=r):l[t].B[n-2]=r,[]})),[]}))},_embind_register_class_property:function(e,t,n,r,i,a,o,s,u,l){t=lt(t),i=Gt(r,i),kt([],[e],(function(e){var r=`${(e=e[0]).name}.${t}`,c={get(){Jt(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return c.set=u?()=>{Jt(`Cannot access ${r} due to unbound types`,[n,o])}:()=>{rt(r+" is a read-only property")},Object.defineProperty(e.i.N,t,c),kt([],u?[n,o]:[n],(function(n){var o=n[0],c={get(){var t=Qt(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=Gt(s,u);var h=n[1];c.set=function(t){var n=Qt(this,e,r+" setter"),i=[];u(l,n,h.toWireType(i,t)),Rt(i)}}return Object.defineProperty(e.i.N,t,c),[]})),[]}))},_embind_register_emval:function(e,t){St(e,{name:t=lt(t),fromWireType:function(e){var t=it(e);return en(e),t},toWireType:function(e,t){return at(t)},argPackAdvance:8,readValueFromPointer:Ft,K:null})},_embind_register_enum:function(e,t,n,r){function i(){}n=jt(n),t=lt(t),i.values={},St(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:tn(t,n,r),K:null}),Wt(t,i)},_embind_register_enum_value:function(e,t,n){var r=bt(e,"enum");t=lt(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:Qe(`${r.name}_${t}`,(function(){}))}}),e.values[n]=r,e[t]=r},_embind_register_float:function(e,t,n){n=jt(n),St(e,{name:t=lt(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:rn(t,n),K:null})},_embind_register_function:function(e,t,n,r,i,a){var o=Zt(t,n);e=lt(e),i=Gt(r,i),Wt(e,(function(){Jt(`Cannot call ${e} due to unbound types`,o)}),t-1),kt([],o,(function(n){return Ht(e,Kt(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]}))},_embind_register_integer:function(e,t,n,r,i){t=lt(t),-1===i&&(i=4294967295),i=jt(n);var a=e=>e;if(0===r){var o=32-8*n;a=e=>e<<o>>>o}n=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t},St(e,{name:t,fromWireType:a,toWireType:n,argPackAdvance:8,readValueFromPointer:an(t,i,0!==r),K:null})},_embind_register_memory_view:function(e,t,n){function r(e){e>>=2;var t=R;return new i(t.buffer,t[e+1],t[e])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];St(e,{name:n=lt(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{$b:!0})},_embind_register_std_string:function(e,t){var n="std::string"===(t=lt(t));St(e,{name:t,fromWireType:function(e){var t=R[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==M[o]){if(i=i?ie(M,i,o-i):"",void 0===s)var s=i;else s+=String.fromCharCode(0),s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(M[r+a]);s=s.join("")}return Rn(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||rt("Cannot pass non-string to std::string");var i=n&&r?oe(t):t.length,a=Fn(4+i+1),o=a+4;if(R[a>>2]=i,n&&r)se(t,M,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);255<s&&(Rn(o),rt("String has UTF-16 code units that do not fit in 8 bits")),M[o+r]=s}else for(r=0;r<i;++r)M[o+r]=t[r];return null!==e&&e.push(Rn,a),a},argPackAdvance:8,readValueFromPointer:Ft,K:function(e){Rn(e)}})},_embind_register_std_wstring:function(e,t,n){if(n=lt(n),2===t)var r=sn,i=un,a=ln,o=()=>I,s=1;else 4===t&&(r=cn,i=hn,a=dn,o=()=>R,s=2);St(e,{name:n,fromWireType:function(e){for(var n,i=R[e>>2],a=o(),u=e+4,l=0;l<=i;++l){var c=e+4+l*t;l!=i&&0!=a[c>>s]||(u=r(u,c-u),void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),u=c+t)}return Rn(e),n},toWireType:function(e,r){"string"!=typeof r&&rt(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),u=Fn(4+o+t);return R[u>>2]=o>>s,i(r,u+4,o+t),null!==e&&e.push(Rn,u),u},argPackAdvance:8,readValueFromPointer:Ft,K:function(e){Rn(e)}})},_embind_register_value_object:function(e,t,n,r,i,a){Et[e]={name:lt(t),Pa:Gt(n,r),W:Gt(i,a),fb:[]}},_embind_register_value_object_field:function(e,t,n,r,i,a,o,s,u,l){Et[e].fb.push({Sb:lt(t),Yb:n,Wb:Gt(r,i),Xb:a,rc:o,qc:Gt(s,u),sc:l})},_embind_register_void:function(e,t){St(e,{fc:!0,name:t=lt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(e,t,n){e=it(e),t=bt(t,"emval::as");var r=[],i=at(r);return R[n>>2]=i,t.toWireType(r,e)},_emval_call_method:function(e,t,n,r,i){e=mn[e],t=it(t),n=pn(n);var a=[];return R[r>>2]=at(a),e(t,n,a,i)},_emval_call_void_method:function(e,t,n,r){(e=mn[e])(t=it(t),n=pn(n),null,r)},_emval_decref:en,_emval_get_method_caller:function(e,t){var n=function(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=bt(R[t+4*r>>2],"parameter "+r);return n}(e,t),r=n[0];t=r.name+"_$"+n.slice(1).map((function(e){return e.name})).join("_")+"$";var i=bn[t];if(void 0!==i)return i;var a=Array(e-1);return i=function(e){var t=mn.length;return mn.push(e),t}(((t,i,o,s)=>{for(var u=0,l=0;l<e-1;++l)a[l]=n[l+1].readValueFromPointer(s+u),u+=n[l+1].argPackAdvance;for(t=t[i].apply(t,a),l=0;l<e-1;++l)n[l+1].Nb&&n[l+1].Nb(a[l]);if(!r.fc)return r.toWireType(o,t)})),bn[t]=i},_emval_get_module_property:function(e){return e=pn(e),at(i[e])},_emval_get_property:function(e,t){return e=it(e),t=it(t),at(e[t])},_emval_incref:function(e){4<e&&(tt.get(e).ub+=1)},_emval_new_array:function(){return at([])},_emval_new_cstring:function(e){return at(pn(e))},_emval_new_object:function(){return at({})},_emval_run_destructors:function(e){Rt(it(e)),en(e)},_emval_set_property:function(e,t,n){e=it(e),t=it(t),n=it(n),e[t]=n},_emval_take_value:function(e,t){return e=(e=bt(e,"_emval_take_value")).readValueFromPointer(t),at(e)},abort:()=>{N("")}
1,emscripten_asm_const_int:(e,t,n)=>{var r;for(gn.length=0,n>>=2;r=M[t++];)n+=105!=r&n,gn.push(105==r?E[n]:T[n++>>1]),++n;return q[e].apply(null,gn)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(e,t,n)=>M.copyWithin(e,t,t+n),emscripten_resize_heap:e=>{var t=M.length;if(2147483648<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);e:{i=i.min.call(i,2147483648,r+(65536-r%65536)%65536)-_.buffer.byteLength+65535>>>16;try{_.grow(i),k();var a=1;break e}catch(o){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return wn().forEach((function(r,i){var a=t+n;for(i=R[e+4*i>>2]=a,a=0;a<r.length;++a)C[i++>>0]=r.charCodeAt(a);C[i>>0]=0,n+=r.length+1})),0},environ_sizes_get:(e,t)=>{var n=wn();R[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),R[t>>2]=r,0},fd_close:function(e){try{var t=xe(e);if(null===t.X)throw new Ie(8);t.Ma&&(t.Ma=null);try{t.m.close&&t.m.close(t)}catch(n){throw n}finally{Ae[t.X]=null}return t.X=null,0}catch(n){if("undefined"==typeof qe||"ErrnoError"!==n.name)throw n;return n.aa}},fd_read:function(e,t,n,r){try{e:{var i=xe(e);e=t;for(var a,o=t=0;o<n;o++){var s=R[e>>2],u=R[e+4>>2];e+=8;var l=i,c=s,h=u,d=a,f=C;if(0>h||0>d)throw new Ie(28);if(null===l.X)throw new Ie(8);if(1===(2097155&l.flags))throw new Ie(8);if(16384===(61440&l.node.mode))throw new Ie(31);if(!l.m.read)throw new Ie(28);var p="undefined"!=typeof d;if(p){if(!l.seekable)throw new Ie(70)}else d=l.position;var v=l.m.read(l,f,c,h,d);p||(l.position+=v);var m=v;if(0>m){var b=-1;break e}if(t+=m,m<u)break;"undefined"!==typeof a&&(a+=m)}b=t}return R[r>>2]=b,0}catch(g){if("undefined"==typeof qe||"ErrnoError"!==g.name)throw g;return g.aa}},fd_seek:function(e,t,n,r,i){t=n+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*n:NaN;try{if(isNaN(t))return 61;var a=xe(e);return Ye(a,t,r),G=[a.position>>>0,(X=a.position,1<=+Math.abs(X)?0<X?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],E[i>>2]=G[0],E[i+4>>2]=G[1],a.Ma&&0===t&&0===r&&(a.Ma=null),0}catch(o){if("undefined"==typeof qe||"ErrnoError"!==o.name)throw o;return o.aa}},fd_write:function(e,t,n,r){try{e:{var i=xe(e);e=t;for(var a,o=t=0;o<n;o++){var s=R[e>>2],u=R[e+4>>2];e+=8;var l=i,c=s,h=u,d=a,f=C;if(0>h||0>d)throw new Ie(28);if(null===l.X)throw new Ie(8);if(0===(2097155&l.flags))throw new Ie(8);if(16384===(61440&l.node.mode))throw new Ie(31);if(!l.m.write)throw new Ie(28);l.seekable&&1024&l.flags&&Ye(l,0,2);var p="undefined"!=typeof d;if(p){if(!l.seekable)throw new Ie(70)}else d=l.position;var v=l.m.write(l,f,c,h,d,void 0);p||(l.position+=v);var m=v;if(0>m){var b=-1;break e}t+=m,"undefined"!==typeof a&&(a+=m)}b=t}return R[r>>2]=b,0}catch(g){if("undefined"==typeof qe||"ErrnoError"!==g.name)throw g;return g.aa}},strftime_l:(e,t,n,r)=>((e,t,n,r)=>{function i(e,t,n){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,"0")}function o(e,t){function n(e){return 0>e?-1:0<e?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(r=n(e.getDate()-t.getDate())),r}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function u(e){var t=e.ca;for(e=new Date(new Date(e.da+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(_n(e.getFullYear())?An:Cn)[n];if(!(t>r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l=E[r+40>>2];for(var c in r={wc:E[r>>2],vc:E[r+4>>2],Fa:E[r+8>>2],Sa:E[r+12>>2],Ga:E[r+16>>2],da:E[r+20>>2],R:E[r+24>>2],ca:E[r+28>>2],Rc:E[r+32>>2],uc:E[r+36>>2],xc:l&&l?ie(M,l):""},n=n?ie(M,n):"",l={"%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"})n=n.replace(new RegExp(c,"g"),l[c]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(c in l={"%a":e=>h[e.R].substring(0,3),"%A":e=>h[e.R],"%b":e=>d[e.Ga].substring(0,3),"%B":e=>d[e.Ga],"%C":e=>a((e.da+1900)/100|0,2),"%d":e=>a(e.Sa,2),"%e":e=>i(e.Sa,2," "),"%g":e=>u(e).toString().substring(2),"%G":e=>u(e),"%H":e=>a(e.Fa,2),"%I":e=>(0==(e=e.Fa)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Ga-1;t+=(_n(e.da+1900)?An:Cn)[n++]);return a(e.Sa+t,3)},"%m":e=>a(e.Ga+1,2),"%M":e=>a(e.vc,2),"%n":()=>"\n","%p":e=>0<=e.Fa&&12>e.Fa?"AM":"PM","%S":e=>a(e.wc,2),"%t":()=>"\t","%u":e=>e.R||7,"%U":e=>a(Math.floor((e.ca+7-e.R)/7),2),"%V":e=>{var t=Math.floor((e.ca+7-(e.R+6)%7)/7);if(2>=(e.R+371-e.ca-2)%7&&t++,t)53==t&&(4==(n=(e.R+371-e.ca)%7)||3==n&&_n(e.da)||(t=1));else{t=52;var n=(e.R+7-e.ca-1)%7;(4==n||5==n&&_n(e.da%400-1))&&t++}return a(t,2)},"%w":e=>e.R,"%W":e=>a(Math.floor((e.ca+7-(e.R+6)%7)/7),2),"%y":e=>(e.da+1900).toString().substring(2),"%Y":e=>e.da+1900,"%z":e=>{var t=0<=(e=e.uc);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.xc,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),l)n.includes(c)&&(n=n.replace(new RegExp(c,"g"),l[c](r)));return(c=ue(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(C.set(c,e),c.length-1)})(e,t,n,r)};!function(){function e(e){if(A=e=e.exports,_=A.memory,k(),j=A.__indirect_function_table,O.unshift(A.__wasm_call_ctors),V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==U&&(clearInterval(U),U=null),B)){var t=B;B=null,t()}return e}var t={env:En,wasi_snapshot_preview1:En};if(V++,i.monitorRunDependencies&&i.monitorRunDependencies(V),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(n){w("Module.instantiateWasm callback failed with error: "+n),r(n)}(function(e,t){var n=W;return g||"function"!=typeof WebAssembly.instantiateStreaming||$(n)||n.startsWith("file://")||"function"!=typeof fetch?Y(n,e,t):fetch(n,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,e).then(t,(function(r){return w("wasm streaming compile failed: "+r),w("falling back to ArrayBuffer instantiation"),Y(n,e,t)}))))})(t,(function(t){e(t.instance)})).catch(r)}();var Rn=e=>(Rn=A.free)(e),Fn=e=>(Fn=A.malloc)(e),Tn=()=>(Tn=A.__errno_location)(),Ln=i._ma_device__on_notification_unlocked=e=>(Ln=i._ma_device__on_notification_unlocked=A.ma_device__on_notification_unlocked)(e);i._ma_malloc_emscripten=(e,t)=>(i._ma_malloc_emscripten=A.ma_malloc_emscripten)(e,t),i._ma_free_emscripten=(e,t)=>(i._ma_free_emscripten=A.ma_free_emscripten)(e,t);var kn,jn=i._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(jn=i._ma_device_process_pcm_frames_capture__webaudio=A.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),Sn=i._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(Sn=i._ma_device_process_pcm_frames_playback__webaudio=A.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),On=e=>(On=A.__getTypeName)(e);function xn(){function e(){if(!kn&&(kn=!0,i.calledRun=!0,!L)){if
1(i.noFSInit||ve||(ve=!0,Xe(),i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?Ge("stdin",i.stdin):$e("/dev/tty","/dev/stdin"),i.stdout?Ge("stdout",null,i.stdout):$e("/dev/tty","/dev/stdout"),i.stderr?Ge("stderr",null,i.stderr):$e("/dev/tty1","/dev/stderr"),He("/dev/stdin",0),He("/dev/stdout",1),He("/dev/stderr",1)),Pe=!1,J(O),n(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();x.unshift(e)}J(x)}}if(!(0<V)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)D();J(S),0<V||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e())}}if(i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=A._embind_initialize_bindings)(),i.dynCall_iiji=(e,t,n,r,a)=>(i.dynCall_iiji=A.dynCall_iiji)(e,t,n,r,a),i.dynCall_jiji=(e,t,n,r,a)=>(i.dynCall_jiji=A.dynCall_jiji)(e,t,n,r,a),i.dynCall_iiiji=(e,t,n,r,a,o)=>(i.dynCall_iiiji=A.dynCall_iiiji)(e,t,n,r,a,o),i.dynCall_iij=(e,t,n,r)=>(i.dynCall_iij=A.dynCall_iij)(e,t,n,r),i.dynCall_jii=(e,t,n)=>(i.dynCall_jii=A.dynCall_jii)(e,t,n),i.dynCall_viijii=(e,t,n,r,a,o,s)=>(i.dynCall_viijii=A.dynCall_viijii)(e,t,n,r,a,o,s),i.dynCall_iiiiij=(e,t,n,r,a,o,s)=>(i.dynCall_iiiiij=A.dynCall_iiiiij)(e,t,n,r,a,o,s),i.dynCall_iiiiijj=(e,t,n,r,a,o,s,u,l)=>(i.dynCall_iiiiijj=A.dynCall_iiiiijj)(e,t,n,r,a,o,s,u,l),i.dynCall_iiiiiijj=(e,t,n,r,a,o,s,u,l,c)=>(i.dynCall_iiiiiijj=A.dynCall_iiiiiijj)(e,t,n,r,a,o,s,u,l,c),B=function e(){kn||xn(),kn||(B=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return xn(),t.ready}})();const i=r},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas","version":"2.31.2","description":"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 <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"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}}')},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return null!==this.scrubTo},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){null===this.scrubTo?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,Finalizable:()=>a.Finalizable,FontAssetWrapper:()=>a.FontAssetWrapper,FontWrapper:()=>a.FontWrapper,ImageAssetWrapper:()=>a.ImageAssetWrapper,ImageWrapper:()=>a.ImageWrapper,finalizationRegistry:()=>a.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(6),i=n(7),a=n(8)},(e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>r});var r=function(e){var t=e.canvas,n=e.artboard,r=e.stateMachines,i=void 0===r?[]:r,a=e.renderer,o=e.rive,s=e.fit,u=e.alignment,l=e.isTouchScrollEnabled,c=void 0!==l&&l,h=e.layoutScaleFactor,d=void 0===h?1:h;if(!t||!i.length||!a||!o||!n||"undefined"===typeof window)return null;var f=null,p=!1,v=function(e){if(p&&e instanceof MouseEvent)"mouseup"==e.type&&(p=!1);else{p=c&&"touchend"===e.type&&"touchstart"===f,f=e.type;var t=e.currentTarget.getBoundingClientRect(),r=function(e,t){var n,r;return["touchstart","touchmove"].indexOf(e.type)>-1&&(null===(n=e.touches)||void 0===n?void 0:n.length)?(t||e.preventDefault(),{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}):"touchend"===e.type&&(null===(r=e.changedTouches)||void 0===r?void 0:r.length)?{clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}(e,c),a=r.clientX,l=r.clientY;if(a||l){var h=a-t.left,v=l-t.top,m=o.computeAlignment(s,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,d),b=new o.Mat2D;m.invert(b);var g=new o.Vec2D(h,v),y=o.mapXY(b,g),w=y.x(),_=y.y();switch(y.delete(),b.delete(),g.delete(),m.delete(),e.type){case"mouseout":for(var A=0,C=i;A<C.length;A++)C[A].pointerMove(w,_);break;case"touchmove":case"mouseover":case"mousemove":for(var M=0,P=i;M<P.length;M++)P[M].pointerMove(w,_);break;case"touchstart":case"mousedown":for(var I=0,E=i;I<E.length;I++)E[I].pointerDown(w,_);break;case"touchend":case"mouseup":for(var R=0,F=i;R<F.length;R++)F[R].pointerUp(w,_)}}}}.bind(void 0);return t.addEventListener("mouseover",v),t.addEventListener("mouseout",v),t.addEventListener("mousemove",v),t.addEventListener("mousedown",v),t.addEventListener("mouseup",v),t.addEventListener("touchmove",v,{passive:c}),t.addEventListener("touchstart",v,{passive:c}),t.addEventListener("touchend",v),function(){t.removeEventListener("mouseover",v),t.removeEventListener("mouseout",v),t.removeEventListener("mousemove",v),t.removeEventListener("mousedown",v),t.removeEventListener("mouseup",v),t.removeEventListener("touchmove",v),t.removeEventListener("touchstart",v),t.removeEventListener("touchend",v)}}},(e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>c});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,u=[".","/"],l="about:blank";function c(e){if(!e)return l;var t,n=(t=e,t.replace(o,"").replace(i,(function(e,t){return String.fromCharCode(t)}))).replace(a,"").replace(o,"").trim();if(!n)return l;if(function(e){return u.indexOf(e[0])>-1}(n))return n;var c=n.match(s);if(!c)return n;var h=c[0];return r.test(h)?l:n}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>h,AudioWrapper:()=>o,CustomFileAssetLoaderWrapper:()=>u,FileAssetWrapper:()=>l,Finalizable:()=>i,FontAssetWrapper:()=>d,FontWrapper:()=>s,ImageAssetWrapper:()=>c,ImageWrapper:()=>a,finalizationRegistry:()=>p});var r=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(){this.selfUnref=!1},a=function(e){function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage}
1,enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(i),o=function(e){function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(i),s=function(e){function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(i),u=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;return e.isImage?n=new c(e):e.isAudio?n=new h(e):e.isFont&&(n=new d(e)),this._assetLoaderCallback(n,t)},e}(),l=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(l),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(l),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(l),f=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),p=new("undefined"!==typeof FinalizationRegistry?FinalizationRegistry:f)((function(e){e.unref()}))}],t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>t,DataEnum:()=>x,EventType:()=>y,Fit:()=>e,Layout:()=>v,LoopType:()=>w,Rive:()=>S,RiveEventType:()=>b,RiveFile:()=>j,RuntimeLoader:()=>m,StateMachineInput:()=>g,StateMachineInputType:()=>p,Testing:()=>J,ViewModel:()=>O,ViewModelInstance:()=>D,ViewModelInstanceArtboard:()=>X,ViewModelInstanceAssetImage:()=>Y,ViewModelInstanceBoolean:()=>B,ViewModelInstanceColor:()=>H,ViewModelInstanceEnum:()=>$,ViewModelInstanceList:()=>z,ViewModelInstanceNumber:()=>U,ViewModelInstanceString:()=>V,ViewModelInstanceTrigger:()=>N,ViewModelInstanceValue:()=>W,decodeAudio:()=>K,decodeFont:()=>Q,decodeImage:()=>Z});var e,t,i=n(1),a=n(2),o=n(3),s=n(5),u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)}
1,c=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},h=function(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(u){s=[6,u],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return u(t,e),t}(Error);!function(e){e.Cover="cover",e.Contain="contain",e.Fill="fill",e.FitWidth="fitWidth",e.FitHeight="fitHeight",e.None="none",e.ScaleDown="scaleDown",e.Layout="layout"}(e||(e={})),function(e){e.Center="center",e.TopLeft="topLeft",e.TopCenter="topCenter",e.TopRight="topRight",e.CenterLeft="centerLeft",e.CenterRight="centerRight",e.BottomLeft="bottomLeft",e.BottomCenter="bottomCenter",e.BottomRight="bottomRight"}(t||(t={}));var p,v=function(){function n(n){var r,i,a,o,s,u,l;this.fit=null!==(r=null===n||void 0===n?void 0:n.fit)&&void 0!==r?r:e.Contain,this.alignment=null!==(i=null===n||void 0===n?void 0:n.alignment)&&void 0!==i?i:t.Center,this.layoutScaleFactor=null!==(a=null===n||void 0===n?void 0:n.layoutScaleFactor)&&void 0!==a?a:1,this.minX=null!==(o=null===n||void 0===n?void 0:n.minX)&&void 0!==o?o:0,this.minY=null!==(s=null===n||void 0===n?void 0:n.minY)&&void 0!==s?s:0,this.maxX=null!==(u=null===n||void 0===n?void 0:n.maxX)&&void 0!==u?u:0,this.maxY=null!==(l=null===n||void 0===n?void 0:n.maxY)&&void 0!==l?l:0}return n.new=function(e){var t=e.fit,r=e.alignment,i=e.minX,a=e.minY,o=e.maxX,s=e.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new n({fit:t,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},n.prototype.copyWith=function(e){var t=e.fit,r=e.alignment,i=e.layoutScaleFactor,a=e.minX,o=e.minY,s=e.maxX,u=e.maxY;return new n({fit:null!==t&&void 0!==t?t:this.fit,alignment:null!==r&&void 0!==r?r:this.alignment,layoutScaleFactor:null!==i&&void 0!==i?i:this.layoutScaleFactor,minX:null!==a&&void 0!==a?a:this.minX,minY:null!==o&&void 0!==o?o:this.minY,maxX:null!==s&&void 0!==s?s:this.maxX,maxY:null!==u&&void 0!==u?u:this.maxY})},n.prototype.runtimeFit=function(t){return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===e.Cover?t.Fit.cover:this.fit===e.Contain?t.Fit.contain:this.fit===e.Fill?t.Fit.fill:this.fit===e.FitWidth?t.Fit.fitWidth:this.fit===e.FitHeight?t.Fit.fitHeight:this.fit===e.ScaleDown?t.Fit.scaleDown:this.fit===e.Layout?t.Fit.layout:t.Fit.none,this.cachedRuntimeFit=n,n);var n},n.prototype.runtimeAlignment=function(e){return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(n=this.alignment===t.TopLeft?e.Alignment.topLeft:this.alignment===t.TopCenter?e.Alignment.topCenter:this.alignment===t.TopRight?e.Alignment.topRight:this.alignment===t.CenterLeft?e.Alignment.centerLeft:this.alignment===t.CenterRight?e.Alignment.centerRight:this.alignment===t.BottomLeft?e.Alignment.bottomLeft:this.alignment===t.BottomCenter?e.Alignment.bottomCenter:this.alignment===t.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=n,n);var n},n}(),m=function(){function e(){}return e.loadRuntime=function(){i.default({locateFile:function(){return e.wasmURL}
1}).then((function(t){var n;for(e.runtime=t;e.callBackQueue.length>0;)null===(n=e.callBackQueue.shift())||void 0===n||n(e.runtime)})).catch((function(t){var n={message:(null===t||void 0===t?void 0:t.message)||"Unknown error",type:(null===t||void 0===t?void 0:t.name)||"Error",wasmError:t instanceof WebAssembly.CompileError||t instanceof WebAssembly.RuntimeError,originalError:t};console.debug("Rive WASM load error details:",n);var r="https://cdn.jsdelivr.net/npm/".concat(a.name,"@").concat(a.version,"/rive_fallback.wasm");if(e.wasmURL.toLowerCase()!==r)console.warn("Failed to load WASM from ".concat(e.wasmURL," (").concat(n.message,"), trying jsdelivr as a backup")),e.setWasmUrl(r),e.loadRuntime();else{var i=["Could not load Rive WASM file from ".concat(e.wasmURL," or ").concat(r,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible","\nError details:","- Type: ".concat(n.type),"- Message: ".concat(n.message),"- WebAssembly-specific error: ".concat(n.wasmError),"\nTo 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("\n");console.error(i)}}))},e.getInstance=function(t){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):e.callBackQueue.push(t)},e.awaitInstance=function(){return new Promise((function(t){return e.getInstance((function(e){return t(e)}))}))},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(a.name,"@").concat(a.version,"/rive.wasm"),e}();!function(e){e[e.Number=56]="Number",e[e.Trigger=58]="Trigger",e[e.Boolean=59]="Boolean"}(p||(p={}));var b,g=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===p.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}();!function(e){e[e.General=128]="General",e[e.OpenUrl=131]="OpenUrl"}(b||(b={}));var y,w,_=function(e){this.nativeArtboard=e},A=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){return e.type===t.SMIInput.bool?new g(p.Boolean,e.asBool()):e.type===t.SMIInput.number?new g(p.Number,e.asNumber()):e.type===t.SMIInput.trigger?new g(p.Trigger,e.asTrigger()):void 0},e.prototype.cleanup=function(){this.inputs.forEach((function(e){e.delete()})),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){null!=e.runtimeInstance&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),C=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(void 0===n&&(n=!0),0===(e=q(e)).length)this.animations.forEach((function(e){return e.playing=t}
1)),this.stateMachines.forEach((function(e){return e.playing=t}));else for(var r=this.animations.map((function(e){return e.name})),i=this.stateMachines.map((function(e){return e.name})),a=0;a<e.length;a++){var s=r.indexOf(e[a]),u=i.indexOf(e[a]);if(s>=0||u>=0)s>=0?this.animations[s].playing=t:this.stateMachines[u].playing=t;else{var l=this.artboard.animationByName(e[a]);if(l){var c=new o.Animation(l,this.artboard,this.runtime,t);c.advance(0),c.apply(1),this.animations.push(c)}else{var h=this.artboard.stateMachineByName(e[a]);if(h){var d=new A(h,this.runtime,t,this.artboard);this.stateMachines.push(d)}}}}return n&&(t?this.eventManager.fire({type:y.Play,data:this.playing}):this.eventManager.fire({type:y.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map((function(e){return e.name})),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.animations[i].playing=t;else{var a=this.artboard.animationByName(e[r]);if(a){var s=new o.Animation(a,this.artboard,this.runtime,t);s.advance(0),s.apply(1),this.animations.push(s)}else console.error("Animation with name ".concat(e[r]," not found."))}}},e.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map((function(e){return e.name})),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new A(a,this.runtime,t,this.artboard);this.stateMachines.push(o),t||o.advanceAndApply(0)}else console.warn("State Machine with name ".concat(e[r]," not found.")),this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.pause=function(e){return this.add(e,!1)},e.prototype.scrub=function(e,t){var n=this.animations.filter((function(t){return e.includes(t.name)}));return n.forEach((function(e){return e.scrubTo=t})),n.map((function(e){return e.name}))},Object.defineProperty(e.prototype,"playing",{get:function(){return this.animations.filter((function(e){return e.playing})).map((function(e){return e.name})).concat(this.stateMachines.filter((function(e){return e.playing})).map((function(e){return e.name})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.animations.filter((function(e){return!e.playing})).map((function(e){return e.name})).concat(this.stateMachines.filter((function(e){return!e.playing})).map((function(e){return e.name})))},enumerable:!1,configurable:!0}),e.prototype.stop=function(e){var t=this,n=[];if(0===(e=q(e)).length)n=this.animations.map((function(e){return e.name})).concat(this.stateMachines.map((function(e){return e.name}))),this.animations.forEach((function(e){return e.cleanup()})),this.stateMachines.forEach((function(e){return e.cleanup()})),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter((function(t){return e.includes(t.name)}));r.forEach((function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)}));var i=this.stateMachines.filter((function(t){return e.includes(t.name)}));i.forEach((function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)})),n=r.map((function(e){return e.name})).concat(i.map((function(e){return e.name})))}return this.eventManager.fire({type:y.Stop,data:n}),n},Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animations.reduce((function(e,t){return e||t.playing}),!1)||this.stateMachines.reduce((function(e,t){return e||t.playing}),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){var n;return void 0===t&&(t=!0),0===this.animations.length&&0===this.stateMachines.length&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter((function(e){return e.playing}));e<t.length;e++){var n=t[e];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:y.Loop,data:{animation:n.name,type:w.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:y.Loop,data:{animation:n.name,type:w.PingPong}}),n.loopCount=0)}},e.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter((function(e){return e.playing}));t<n.length;t++){var r=n[t];e.push.apply(e,r.statesChanged)}e.length>0&&this.eventManager.fire({type:y.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:y.Advance,data:e})},e}();
1!function(e){e.Load="load",e.LoadError="loaderror",e.Play="play",e.Pause="pause",e.Stop="stop",e.Loop="loop",e.Draw="draw",e.Advance="advance",e.StateChange="statechange",e.RiveEvent="riveevent",e.AudioStatusChange="audiostatuschange"}(y||(y={})),function(e){e.OneShot="oneshot",e.Loop="loop",e.PingPong="pingpong"}(w||(w={}));var M,P=function(){function e(e){void 0===e&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter((function(t){return t.type===e}))},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter((function(t){return t.type===e})).forEach((function(e){return t.remove(e)})):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach((function(t){return t.callback(e)}))},e}(),I=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();(null===e||void 0===e?void 0:e.action)&&e.action(),(null===e||void 0===e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}();!function(e){e[e.AVAILABLE=0]="AVAILABLE",e[e.UNAVAILABLE=1]="UNAVAILABLE"}(M||(M={}));var E,R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=M.UNAVAILABLE,t}return u(t,e),t.prototype.delay=function(e){return c(this,void 0,void 0,(function(){return h(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))},t.prototype.timeout=function(){return c(this,void 0,void 0,(function(){return h(this,(function(e){return[2,new Promise((function(e,t){return setTimeout(t,50)}))]}))}))},t.prototype.reportToListeners=function(){this.fire({type:y.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return c(this,void 0,void 0,(function(){return h(this,(function(e){return this._enabled||(this._enabled=!0,this._status=M.AVAILABLE,this.reportToListeners()),[2]}))}))},t.prototype.testAudio=function(){return c(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:if(this._status!==M.UNAVAILABLE||null===this._audioContext)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}
1))}))},t.prototype._establishAudio=function(){return c(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,"undefined"!=typeof window?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status!==M.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}}))}))},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener("pointerdown",(function(){return c(e,void 0,void 0,(function(){return h(this,(function(e){return this.enableAudio(),[2]}))}))}),{once:!0})},t.prototype.establishAudio=function(){return c(this,void 0,void 0,(function(){return h(this,(function(e){return this._establishAudio(),[2]}))}))},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===M.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(P),F=new R,T=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),L=globalThis.ResizeObserver||T,k=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);null!==n?n.onResize(0==t.target.clientWidth||0==t.target.clientHeight):e._resizeObserver.unobserve(t.target)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new L(this._onObserved)}return e.prototype.add=function(e,t){var n={onResize:t,element:e};return this._elementsMap.set(e,n),this._resizeObserver.observe(e),n},e.prototype.remove=function(e){this._resizeObserver.unobserve(e.element),this._elementsMap.delete(e.element)},e}()),j=function(){function e(e){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new P,e.onLoad&&this.on(y.Load,e.onLoad),e.onLoadError&&this.on(y.LoadError,e.onLoadError)}return e.prototype.initData=function(){return c(this,void 0,void 0,(function(){var t,n,r,i,a;return h(this,(function(o){switch(o.label){case 0:return this.src?(t=this,[4,G(this.src)]):[3,2];case 1:t.buffer=o.sent(),o.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(r=new s.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),n=r.assetLoader),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:return i.file=o.sent(),this.destroyed?(null===(a=this.file)||void 0===a||a.delete(),this.file=null,[2]):(null!==this.file?this.eventManager.fire({type:y.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2])}}))}))},e.prototype.init=function(){return c(this,void 0,void 0,(function(){var t,n;return h(this,(function(r){switch(r.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),t=this,[4,m.awaitInstance()];case 2:return t.runtime=r.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}}
1))}))},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:y.LoadError,data:e}),new Error(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){var e;this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),null===(e=this.file)||void 0===e||e.delete(),this.file=null,this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);return null!=t?new _(t):null},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),S=function(){function t(e){var t,n=this;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 t=n._hasZeroSize!==e;n._hasZeroSize=e,e?n._layout.maxX&&n._layout.maxY||n.resizeToCanvas():t&&n.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=k.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!==(t=e.layout)&&void 0!==t?t:new v,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new P,e.onLoad&&this.on(y.Load,e.onLoad),e.onLoadError&&this.on(y.LoadError,e.onLoadError),e.onPlay&&this.on(y.Play,e.onPlay),e.onPause&&this.on(y.Pause,e.onPause),e.onStop&&this.on(y.Stop,e.onStop),e.onLoop&&this.on(y.Loop,e.onLoop),e.onStateChange&&this.on(y.StateChange,e.onStateChange),e.onAdvance&&this.on(y.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(y.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(y.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(y.Play,e.onplay),e.onpause&&!e.onPause&&this.on(y.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(y.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(y.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(y.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new I(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(t.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),t.new=function(e){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new t(e)},t.prototype.onSystemAudioChanged=function(){this.volume=this._volume},t.prototype.init=function(e){var n=this,r=e.src,i=e.buffer,a=e.riveFile,o=e.animations,s=e.stateMachines,u=e.artboard,l=e.autoplay,c=void 0!==l&&l,h=e.useOffscreenRenderer,d=void 0!==h&&h,p=e.autoBind,v=void 0!==p&&p;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new f(t.missingErrorMessage);var b=q(o),g=q(s);this.loaded=!1,this.readyForPlaying=!1,m.awaitInstance().then((function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,d),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,b,g,c,v).then((function(e){if(e)return n.setupRiveListeners()})).catch((function(e){console.error(e)})))}
1)).catch((function(e){console.error(e)}))}},t.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter((function(e){return e.playing&&t.runtime.hasListeners(e.instance)})).map((function(e){return e.instance})),r=this.isTouchScrollEnabled;e&&"isTouchScrollEnabled"in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,s.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,layoutScaleFactor:this._layout.layoutScaleFactor})}},t.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},t.prototype.initializeAudio=function(){var e,t=this;F.status==M.UNAVAILABLE&&(null===(e=this.artboard)||void 0===e?void 0:e.hasAudio)&&null===this._audioEventListener&&(this._audioEventListener={type:y.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},F.add(this._audioEventListener),F.establishAudio())},t.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},t.prototype.initData=function(e,t,n,r,i){return c(this,void 0,void 0,(function(){var a,o,s,u;return h(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),null!=this.riveFile?[3,2]:(a=new j({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=a,[4,a.init()]);case 1:if(l.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];l.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:y.Load,data:null!==(u=this.src)&&void 0!==u?u:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=l.sent(),s=(c=o)&&c.isHandledError?c.message:"Problem loading file; may be corrupt!",console.warn(s),this.eventManager.fire({type:y.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}var c}))}))},t.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var a,o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o){var s="Invalid artboard name or no default artboard";return console.warn(s),void this.eventManager.fire({type:y.LoadError,data:s})}if(this.artboard=o,o.volume=this._volume*F.systemVolume,this.artboard.animationCount()<1)throw s="Artboard has no animations",this.eventManager.fire({type:y.LoadError,data:s}),s;if(this.animator=new C(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(a=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):a=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?y.Play:y.Pause,data:a}}),i){var u=this.file.defaultArtboardViewModel(o);if(null!==u){var l=u.defaultInstance();if(null!==l){var c=new D(l,null);this.bindViewModelInstance(c)}}}}},t.prototype.drawFrame=function(){var e,t;(null===(e=null===document||void 0===document?void 0:document.timeline)||void 0===e?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null===(t=this.runtime)||void 0===t||t.resolveAnimationFrame()):this.startRendering()},t.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null===t||void 0===t||t());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var a=0,o=this.animator.animations.filter((function(e){return e.playing||e.needsScrub})).sort((function(e){return e.needsScrub?-1:1}));a<o.length;a++){var u=o[a];u.advance(i),u.instance.didLoop&&(u.loopCount+=1),u.apply(1)}for(var l=0,c=this.animator.stateMachines.filter((function(e){return e.playing}));l<c.length;l++){var h=c[l],d=h.reportedEventCount();if(d)for(var f=0;f<d;f++){var p=h.reportedEventAt(f);if(p)if(p.type===b.OpenUrl){if(this.eventManager.fire({type:y.RiveEvent,data:p}),this.automaticallyHandleEvents){var v=document.createElement("a"),m=p,g=m.url,w=m.target,_=(0,s.sanitizeUrl)(g);g&&v.setAttribute("href",_),w&&v.setAttribute("target",w),_&&_!==s.BLANK_URL&&v.click()}}else this.eventManager.fire({type:y.RiveEvent,data:p})}h.advanceAndApply(i)}0==this.animator.stateMachines.length&&this.artboard.advance(i);var A=this.renderer;A.clear(),A.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(A),A.restore(
1),A.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var C=performance.now();for(this.frameTimes.push(C),this.durations.push(C-r);this.frameTimes[0]<=C-1e3;)this.frameTimes.shift(),this.durations.shift();null===(n=this._viewModelInstance)||void 0===n||n.handleCallbacks(),this.animator.isPlaying?this.startRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},t.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(t.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frameTime",{get:function(){return 0===this.durations.length?0:(this.durations.reduce((function(e,t){return e+t}),0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),t.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),null!==this._observed&&k.remove(this._observed),this.removeRiveListeners(),this.file&&(null===(e=this.riveFile)||void 0===e||e.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(F.remove(this._audioEventListener),this._audioEventListener=null),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},t.prototype.deleteRiveRenderer=function(){var e;null===(e=this.renderer)||void 0===e||e.delete(),this.renderer=null},t.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},t.prototype.retrieveTextRun=function(e){var t;if(e)if(this.artboard){var n=this.artboard.textRun(e);if(n)return n;console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null===(t=this.artboard)||void 0===t?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))}else console.warn("Tried to access text run, but the Artboard is null");else console.warn("No text run name provided")},t.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},t.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},t.prototype.play=function(e,t){var n=this;e=q(e),this.readyForPlaying?(this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(e,t)}})},t.prototype.pause=function(e){var t=this;e=q(e),this.readyForPlaying?(this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)):this.taskQueue.add({action:function(){return t.pause(e)}})},t.prototype.scrub=function(e,t){var n=this;e=q(e),this.readyForPlaying?(this.animator.scrub(e,t||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(e,t)}})},t.prototype.stop=function(e){var t=this;e=q(e),this.readyForPlaying?(this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()):this.taskQueue.add({action:function(){return t.stop(e)}})},t.prototype.reset=function(e){var t,n,r=null===e||void 0===e?void 0:e.artboard,i=q(null===e||void 0===e?void 0:e.animations),a=q(null===e||void 0===e?void 0:e.stateMachines),o=null!==(t=null===e||void 0===e?void 0:e.autoplay)&&void 0!==t&&t,s=null!==(n=null===e||void 0===e?void 0:e.autoBind)&&void 0!==n&&n;this.cleanupInstances(),this.initArtboard(r,i,a,o,s),this.taskQueue.process()},t.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,e.maxX&&e.maxY||this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),t.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},t.prototype.resizeDrawingSurfaceToCanvas=function(t){if(this.canvas instanceof HTMLCanvasElement&&window){var n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,a=t||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*r,this.canvas.height=a*i,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===e.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=r/o,this.artboard.height=i/o}}},Object.defineProperty(t.prototype,"source",{get:function(){return this.src}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),t.prototype.stateMachineInputs=function(e){if(this.loaded){var t=this.animator.stateMachines.find((function(t){return t.name===e}));return null===t||void 0===t?void 0:t.inputs}},t.prototype.retrieveInputAtPath=function(e,t){if(e)if(this.artboard){var n=this.artboard.inputByPath(e,t);if(n)return n;console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No input name provided for path '".concat(t,"'"))},t.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===p.Boolean?r.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a boolean")))},t.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===p.Number?r.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a number")))},t.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===p.Trigger?n.asTrigger().fire():console.warn("Input with name: '".concat(e,"', at path:'").concat(t,"' is not a trigger")))},t.prototype.retrieveTextAtPath=function(e,t){if(e)if(t)if(this.artboard){var n=this.artboard.textByPath(e,t);if(n)return n;console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No path provided for text '".concat(e,"'"));else console.warn("No text name provided for path '".concat(t,"'"))},t.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(n)return n.text;console.warn("Could not get text with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);r?r.text=t:console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"))},Object.defineProperty(t.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter((function(e){return e.playing})).map((function(e){return e.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter((function(e){return e.playing})).map((function(e){return e.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter((function(e){return!e.playing})).map((function(e){return e.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter((function(e){return!e.playing})).map((function(e){return e.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0}
1,enumerable:!1,configurable:!0}),t.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},t.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},t.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},t.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},t.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},t.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},t.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},t.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},t.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(t.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();o++){for(var s=n.stateMachineByIndex(o),u=s.name,l=new this.runtime.StateMachineInstance(s,n),c=[],h=0;h<l.inputCount();h++){var d=l.input(h);c.push({name:d.name,type:d.type})}r.stateMachines.push({name:u,inputs:c})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*F.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!==(e=this._artboardWidth)&&void 0!==e?e:0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardHeight",{get:function(){var e;return this.artboard?this.artboard.height:null!==(e=this._artboardHeight)&&void 0!==e?e:0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),t.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(t.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),t.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach((function(t){return t.bindViewModelInstance(e)})):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(t.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),t.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new O(t):null},t.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new O(t):null},t.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map((function(e){return new x(e)}))}return this._dataEnums},t.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new O(e)}return null},t.prototype.getArtboard=function(e){var t,n;return null!==(n=null===(t=this.riveFile)||void 0===t?void 0:t.getArtboard(e))&&void 0!==n?n:null},t.missingErrorMessage="Rive source file or data buffer required",t.cleanupErrorMessage="Attempt to use file after calling cleanup.",t}
1(),O=function(){function e(e){this._viewModel=e}return Object.defineProperty(e.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),e.prototype.instanceByIndex=function(e){var t=this._viewModel.instanceByIndex(e);return null!==t?new D(t,null):null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);return null!==t?new D(t,null):null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();return null!==e?new D(e,null):null},e.prototype.instance=function(){var e=this._viewModel.instance();return null!==e?new D(e,null):null},Object.defineProperty(e.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),e}(),x=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}();!function(e){e.Number="number",e.String="string",e.Boolean="boolean",e.Color="color",e.Trigger="trigger",e.Enum="enum",e.List="list",e.Image="image",e.Artboard="artboard"}(E||(E={}));var D=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=e,null!==t&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){0!==this._propertiesWithCallbacks.length&&(this._propertiesWithCallbacks.forEach((function(e){e.handleCallbacks()})),this._propertiesWithCallbacks.forEach((function(e){e.clearChanges()}))),this._children.forEach((function(e){return e.handleCallbacks()}))},e.prototype.addParent=function(e){this._parents.includes(e)||(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);-1!==t&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)||(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach((function(e){e.addToViewModelCallbacks(t)})))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter((function(t){return t!==e})),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach((function(e){e.removeFromViewModelCallbacks(t)})))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach((function(e){e.addToViewModelCallbacks(t)})))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter((function(t){return t!==e})),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach((function(e){e.removeFromViewModelCallbacks(t)})))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach((function(e){e.clearCallbacks()}))},e.prototype.propertyFromPath=function(e,t){var n=e.split("/");return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return null!==n?t==e.length-1?n:n.viewModelFromPathSegments(e,t++):null},e.prototype.propertyFromPathSegments=function(e,t,n){var r,i,a,o,s,u,l,c,h,d,f,p,v,m,b,g,y,w;if(t<e.length-1){var _=this.internalViewModelInstance(e[t]);return null!==_?_.propertyFromPathSegments(e,t+1,n):null}var A=null;switch(n){case E.Number:if(null!==(A=null!==(i=null===(r=this._runtimeInstance)||void 0===r?void 0:r.number(e[t]))&&void 0!==i?i:null))return new U(A,this);break;case E.String:if(null!==(A=null!==(o=null===(a=this._runtimeInstance)||void 0===a?void 0:a.string(e[t]))&&void 0!==o?o:null))return new V(A,this);break;case E.Boolean:if(null!==(A=null!==(u=null===(s=this._runtimeInstance)||void 0===s?void 0:s.boolean(e[t]))&&void 0!==u?u:null))return new B(A,this);break;case E.Color:if(null!==(A=null!==(c=null===(l=this._runtimeInstance)||void 0===l?void 0:l.color(e[t]))&&void 0!==c?c:null))return new H(A,this);break;case E.Trigger:if(null!==(A=null!==(d=null===(h=this._runtimeInstance)||void 0===h?void 0:h.trigger(e[t]))&&void 0!==d?d:null))return new N(A,this);break;case E.Enum:if(null!==(A=null!==(p=null===(f=this._runtimeInstance)||void 0===f?void 0:f.enum(e[t]))&&void 0!==p?p:null))return new $(A,this);break;case E.List:if(null!==(A=null!==(m=null===(v=this._runtimeInstance)||void 0===v?void 0:v.list(e[t]))&&void 0!==m?m:null))return new z(A,this);break;case E.Image:if(null!==(A=null!==(g=null===(b=this._runtimeInstance)||void 0===b?void 0:b.image(e[t]))&&void 0!==g?g:null))return new Y(A,this);break;case E.Artboard:if(null!==(A=null!==(w=null===(y=this._runtimeInstance)||void 0===y?void 0:y.artboard(e[t]))&&void 0!==w?w:null))return new X(A,this)}return null},e.prototype.internalViewModelInstance=function(t){var n;if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var r=null===(n=this._runtimeInstance)||void 0===n?void 0:n.viewModel(t);if(null!==r){var i=new e(r,this);return i.internalIncrementReferenceCount(),this._viewModelInstances.set(t,i),i}return null},e.prototype.number=function(e){return this.propertyFromPath(e,E.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,E.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,E.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,E.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,E.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,E.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,E.List)},e.prototype.image=function(e){return this.propertyFromPath(e,E.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,E.Artboard)},e.prototype.viewModel=function(e){var t=e.split("/"),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return null!=n?n.internalViewModelInstance(t[t.length-1]):null},e.prototype.internalReplaceViewModel=function(e,t){var n;if(null!==t.runtimeInstance){var r=(null===(n=this._runtimeInstance)||void 0===n?void 0:n.replaceViewModel(e,t.runtimeInstance))||!1;if(r){t.internalIncrementReferenceCount();var i=this.internalViewModelInstance(e);null!==i&&(i.removeParent(this),this._children.includes(i)&&(this._children=this._children.filter((function(e){return e!==i}))),i.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return r}return!1},e.prototype.replaceViewModel=function(e,t){var n,r=e.split("/"),i=r.length>1?this.viewModelFromPathSegments(r.slice(0,r.length-1),0):this;return null!==(n=null===i||void 0===i?void 0:i.internalReplaceViewModel(r[r.length-1],t))&&void 0!==n&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null===(e=this._runtimeInstance)||void 0===e||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null===(e=this._runtimeInstance)||void 0===e||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null===(e=this._runtimeInstance)||void 0===e?void 0:e.getProperties().map((function(e){return l({},e)})))||[]}
1,enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e=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 t=d([],this._children,!0);this._children.length=0;var n=d([],this._parents,!0);this._parents.length=0,t.forEach((function(t){t.removeParent(e)})),n.forEach((function(t){t.removeFromViewModelCallbacks(e)}))}},e}(),W=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){0===this.callbacks.length&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter((function(t){return t!==e})):this.callbacks.length=0,0===this.callbacks.length&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach((function(t){e.internalHandleCallback(t)}))},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}(),V=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(W),U=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(W),B=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(W),N=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(W),$=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(W),z=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return!(null==e.runtimeInstance||!this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t))&&(e.addParent(this._parentViewModel),!0)},t.prototype.removeInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);return null!=t?new D(t,this._parentViewModel):null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(W),H=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
1,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(255*Math.max(0,Math.min(1,e))))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(W),Y=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!==(t=null===e||void 0===e?void 0:e.nativeImage)&&void 0!==t?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(W),X=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!==(t=null===e||void 0===e?void 0:e.nativeArtboard)&&void 0!==t?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(W),G=function(e){return c(void 0,void 0,void 0,(function(){var t;return h(this,(function(n){switch(n.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return[4,n.sent().arrayBuffer()];case 2:return[2,n.sent()]}}))}))},q=function(e){return"string"===typeof e?[e]:e instanceof Array?e:[]},J={EventManager:P,TaskQueueManager:I},K=function(e){return c(void 0,void 0,void 0,(function(){var t,n;return h(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(t){return m.getInstance((function(n){n.decodeAudio(e,t)}))}))];case 1:return t=r.sent(),n=new s.AudioWrapper(t),s.finalizationRegistry.register(n,t),[2,n]}}))}))},Z=function(e){return c(void 0,void 0,void 0,(function(){var t,n;return h(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(t){return m.getInstance((function(n){n.decodeImage(e,t)}))}))];case 1:return t=r.sent(),n=new s.ImageWrapper(t),s.finalizationRegistry.register(n,t),[2,n]}}))}))},Q=function(e){return c(void 0,void 0,void 0,(function(){var t,n;return h(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(t){return m.getInstance((function(n){n.decodeFont(e,t)}))}))];case 1:return t=r.sent(),n=new s.FontWrapper(t),s.finalizationRegistry.register(n,t),[2,n]}}))}))}})(),r})(),e.exports=t()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.