1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9794],{15995:function(e){e.exports=(()=>{"use strict";var e,t,n,r,i,a,o,s,u,l,c,h,f,d,p,m,v,g,y,b,_,w,A,C,M,I,P,R,E,T,F,L,S,O,x,k,j,W,V,D,U,B,N,$,H,Y,z,X,G,q,J,K,Q,Z,ee,et,en,er,ei,ea,eo=[,(e,t,n)=>{var r;n.r(t),n.d(t,{default:()=>i});let i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.xa(),i&&i.Ta()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||(t=requestAnimationFrame(e.bind(this)));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Ra=function(e){a&&(document.body.remove(a),a=null),e||((a=document.createElement("div")).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.Ta=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Oa=function(){a&&(document.body.remove(a),a=null),i=null},this.xa=function(){}}function n(e){console.assert(!0);let t=new Map,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&&console.assert((n=Math.max(...t.keys()))<r)},1e3)),(n=Math.max(r,n))<<e}}e.ready=new Promise((e,t)=>{l=e,c=t});let i=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){i&&i();let t=e.decodeAudio;
1e.decodeAudio=function(e,n){n(e=t(e))};let n=e.decodeFont;e.decodeFont=function(e,t){t(e=n(e))};let r=e.FileAssetLoader;e.ptrToAsset=t=>{let n=e.ptrToFileAsset(t);return n.isImage?e.ptrToImageAsset(t):n.isFont?e.ptrToFontAsset(t):n.isAudio?e.ptrToAudioAsset(t):n},e.CustomFileAssetLoader=r.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Ha=e},loadContents:function(t,n){return t=e.ptrToAsset(t),this.Ha(t,n)}}),e.CDNFileAssetLoader=r.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(t){var n,r,i;let a=e.ptrToAsset(t);return""!==(t=a.cdnUuid)&&(n=a.cdnBaseUrl+"/"+t,r=e=>{a.decode(new Uint8Array(e.response))},(i=new XMLHttpRequest).responseType="arraybuffer",i.onreadystatechange=function(){4==i.readyState&&200==i.status&&r(i)},i.open("GET",n,!0),i.send(null),!0)}}),e.FallbackFileAssetLoader=r.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.wa=[]},addLoader:function(e){this.wa.push(e)},loadContents:function(e,t){for(let n of this.wa)if(n.loadContents(e,t))return!0;return!1}});let a=e.computeAlignment;e.computeAlignment=function(e,t,n,r,i=1){return a.call(this,e,t,n,r,i)}};let a="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),o=new function(){function e(){if(!t){let u;var e=document.createElement("canvas"),n={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(u=e.getContext("webgl",n),r=1,!u)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(u=e.getContext("webgl2",n))r=2;else{if(!(u=e.getContext("webgl",n)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;r=1}function s(e,t,n){if(t=u.createShader(t),u.shaderSource(t,n),u.compileShader(t),0<((n=u.getShaderInfoLog(t))||"").length)throw n;u.attachShader(e,t)}if(i=Math.min((u=new Proxy(u,{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)}})).getParameter(u.MAX_RENDERBUFFER_SIZE),u.getParameter(u.MAX_TEXTURE_SIZE)),s(e=u.createProgram(),u.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 }"),s(e,u.FRAGMENT_SHADER,"precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }"),u.bindAttribLocation(e,0,"vertex"),u.bindAttribLocation(e,1,"uv"),u.linkProgram(e),0<((n=u.getProgramInfoLog(e))||"").trim().length)throw n;a=u.getUniformLocation(e,"mat"),o=u.getUniformLocation(e,"translate"),u.useProgram(e),u.bindBuffer(u.ARRAY_BUFFER,u.createBuffer()),u.enableVertexAttribArray(0),u.enableVertexAttribArray(1),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,u.createBuffer()),u.uniform1i(u.getUniformLocation(e,"image"),0),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=u}return!0}let t=null,r=0,i=0,a=null,o=null,s=0,u=0,l=!1;e(),this.eb=function(){return e(),i},this.Ma=function(e){t.deleteTexture&&t.deleteTexture(e)},this.La=function(n){if(!e())return null;let i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),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==r?(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};let c=new n(8),h=new n(8),f=new n(10),d=new n(10);this.Qa=function(n,r,i,l,p){if(e()){var m=c.push(n),v=h.push(r);if(t.canvas){for(var g of((t.canvas.width!=m||t.canvas.height!=v)&&(t.canvas.width=m,t.canvas.height=v),t.viewport(0,v-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),i.sort((e,t)=>
1t.Ba-e.Ba),m=f.push(l),s!=m&&(t.bufferData(t.ARRAY_BUFFER,8*m,t.DYNAMIC_DRAW),s=m),m=0,i))t.bufferSubData(t.ARRAY_BUFFER,m,g.ia),m+=4*g.ia.length;for(var y of(console.assert(m==4*l),i))t.bufferSubData(t.ARRAY_BUFFER,m,y.Ea),m+=4*y.Ea.length;for(var b of(console.assert(m==8*l),m=d.push(p),u!=m&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*m,t.DYNAMIC_DRAW),u=m),g=0,i))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,g,b.indices),g+=2*b.indices.length;for(let e of(console.assert(g==2*p),b=0,y=!0,m=g=0,i)){e.image.da!=b&&(t.bindTexture(t.TEXTURE_2D,e.image.ca||null),b=e.image.da),e.hb?(t.scissor(e.na,v-e.oa-e.va,e.sb,e.va),y=!0):y&&(t.scissor(0,v-r,n,r),y=!1),i=2/n;let s=-2/r;t.uniform4f(a,e.N[0]*i*e.X,e.N[1]*s*e.Y,e.N[2]*i*e.X,e.N[3]*s*e.Y),t.uniform2f(o,e.N[4]*i*e.X+i*(e.na-e.fb*e.X)-1,e.N[5]*s*e.Y+s*(e.oa-e.gb*e.Y)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,m),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,m+4*l),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,g),m+=4*e.ia.length,g+=2*e.indices.length}console.assert(m==4*l),console.assert(g==2*p)}}},this.canvas=function(){return e()&&t.canvas}},s=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){function n(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 r(e){return"rgba("+((0xff0000&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((0xff000000&e)>>>24)/255+")"}function i(){for(let e of(0<M.length&&(o.Qa(C.drawWidth(),C.drawHeight(),M,I,P),M=[],P=I=0,C.reset(512,512)),A)){for(let t of e.u)t();e.u=[]}A.clear()}s&&s();var u=e.RenderPaintStyle;let l=e.RenderPath,c=e.RenderPaint,h=e.Renderer,f=e.StrokeCap,d=e.StrokeJoin,p=e.BlendMode,m=u.fill,v=u.stroke,g=e.FillRule.evenOdd,y=1;var b=e.RenderImage.extend("CanvasRenderImage",{__construct:function({R:e,W:t}={}){this.__parent.__construct.call(this),this.da=y,y=y+1&0x7fffffff||1,this.R=e,this.W=t},__destruct:function(){this.ca&&(o.Ma(this.ca),URL.revokeObjectURL(this.la)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.W&&t.W(t);var n=new Image;t.la=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Ga=n,t.ca=o.La(n),t.size(n.width,n.height),t.R&&t.R(t)},n.src=t.la}}),_=l.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.F=new Path2D},rewind:function(){this.F=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.F,u=s.addPath;e=e.F;let 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.ka=e},moveTo:function(e,t){this.F.moveTo(e,t)},lineTo:function(e,t){this.F.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.F.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.F.closePath()}}),w=c.extend("CanvasRenderPaint",{color:function(e){this.ma=r(e)},thickness:function(e){this.Ja=e},join:function(e){switch(e){case d.miter:this.ba="miter";break;case d.round:this.ba="round";break;case d.bevel:this.ba="bevel"}},cap:function(e){switch(e){case f.butt:this.aa="butt";break;case f.round:this.aa="round";break;case f.square:this.aa="square"}},style:function(e){this.Ia=e},blendMode:function(e){this.Fa=n(e)},clearGradient:function(){this.P=null},linearGradient:function(e,t,n,r){this.P={Ca:e,Da:t,qa:n,ra:r,ga:[]}},radialGradient:function(e,t,n,r){this.P={Ca:e,Da:t,qa:n,ra:r,ga:[],bb:!0}},addStop:function(e,t){this.P.ga.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,t,n){let i=this.Ia;var a=this.ma,o=this.P;if(e.globalCompositeOperation=this.Fa,null!=o){a=o.Ca;var s=o.Da;let t=o.qa;var u=o.ra;let n=o.ga;o.bb?(o=t-a,u-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=e.createLinearGradient(a,s,t,u);for(let e=0,t=n.length;e<t;e++)s=n[e],a.addColorStop(s.stop,r(s.color));this.ma=a,this.P=null}switch(i){case v:e.strokeStyle=a,e.lineWidth=this.Ja,e.lineCap=this.aa,e.lineJoin=this.ba,e.stroke(t);break;case m:e.fillStyle=a,e.fill(t,n)}}});let A=new Set,C=null,M=[],I=0,P=0;var R=e.CanvasRenderer=h.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.D=[1,0,0,1,0,0],this.o=e.getContext("2d"),this.ja=e,this.u=[]},save:function(){this.D.push(...this.D.slice(this.D.length-6)),this.u.push(this.o.save.bind(this.o))},restore:function(){let e=this.D.length-6;if(6>
1e)throw"restore() called without matching save().";this.D.splice(e),this.u.push(this.o.restore.bind(this.o))},transform:function(e,t,n,r,i,a){let o=this.D,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.u.push(this.o.transform.bind(this.o,e,t,n,r,i,a))},rotate:function(e){let t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},_drawPath:function(e,t){this.u.push(t.draw.bind(t,this.o,e.F,e.ka===g?"evenodd":"nonzero"))},_drawRiveImage:function(e,t,r,i){var a=e.Ga;if(a){var o=this.o,s=n(r);this.u.push(function(){o.globalCompositeOperation=s,o.globalAlpha=i,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){let t=this.D,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,r,a,s,u,l,c,h,f,d,p){r=this.o.canvas.width;var m=this.o.canvas.height;let v=d-h,g=p-f;h=Math.max(h,0),f=Math.max(f,0);let y=(d=Math.min(d,r))-h,b=(p=Math.min(p,m))-f;if(console.assert(y<=Math.min(v,r)),console.assert(b<=Math.min(g,m)),!(0>=y||0>=b)){d=y<v||b<g,r=p=1;var _=Math.ceil(y*p),w=Math.ceil(b*r);m=o.eb(),_>m&&(p*=m/_,_=m),w>m&&(r*=m/w,w=m),C||(C=new e.DynamicRectanizer(m)).reset(512,512),0>(m=C.addRect(_,w))&&(i(),A.add(this),console.assert(0<=(m=C.addRect(_,w))));var R=65535&m,E=m>>16;M.push({N:this.D.slice(this.D.length-6),image:t,na:R,oa:E,fb:h,gb:f,sb:_,va:w,X:p,Y:r,ia:new Float32Array(u),Ea:new Float32Array(l),indices:new Uint16Array(c),hb:d,Ba:t.da<<1|!!d}),I+=u.length,P+=c.length;var T=this.o,F=n(a);this.u.push(function(){T.save(),T.resetTransform(),T.globalCompositeOperation=F,T.globalAlpha=s;let e=o.canvas();e&&T.drawImage(e,R,E,_,w,h,f,y,b),T.restore()})}},_clipPath:function(e){this.u.push(this.o.clip.bind(this.o,e.F,e.ka===g?"evenodd":"nonzero"))},clear:function(){A.add(this),this.u.push(this.o.clearRect.bind(this.o,0,0,this.ja.width,this.ja.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});e.makeRenderer=function(e){let t=new R(e),n=t.o;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<a.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.u.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.u.push(()=>{n[r]=i}),!0}})},e.decodeImage=function(e,t){new b({R:t}).decode(e)},e.renderFactory={makeRenderPaint:function(){return new w},makeRenderPath:function(){return new _},makeRenderImage:function(){let e=T;return new b({W:()=>{e.total++},R:()=>{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let E=e.load,T=null;e.load=function(t,n,r=!0){let i=new e.FallbackFileAssetLoader;return void 0!==n&&i.addLoader(n),r&&(n=new e.CDNFileAssetLoader,i.addLoader(n)),new Promise(function(e){let n=null;T={total:0,loaded:0,ready:function(){e(n)}},n=E(t,i),0==T.total&&e(n)})};let F=e.RendererWrapper.prototype.align;e.RendererWrapper.prototype.align=function(e,t,n,r,i=1){F.call(this,e,t,n,r,i)},e.requestAnimationFrame=(u=new t).requestAnimationFrame.bind(u),e.cancelAnimationFrame=u.cancelAnimationFrame.bind(u),e.enableFPSCounter=u.Ra.bind(u),e.disableFPSCounter=u.Oa,u.xa=i,e.resolveAnimationFrame=i,e.cleanup=function(){C&&C.delete()}};var u,l,c,h,f,d=Object.assign({},e),p="./this.program",m="object"==typeof window,v="function"==typeof importScripts,g="";(m||v)&&(v?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",v&&(f=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 y=e.print||console.log.bind(console),b=e.printErr||console.error.bind(console);Object.assign(e,d),d=null,e.thisProgram&&(p=e.thisProgram),e.wasmBinary&&(_=e.wasmBinary),e.noExitRuntime,"object"!=typeof WebAssembly&&U("no native wasm support detected");var _,w,A,C,M,I,P,R,E,T,F,L=!1;function S(){var t=w.buffer;e.HEAP8=C=new Int8Array(t),e.HEAP16=I=new Int16Array(t),e.HEAP32=R=new Int32Array(t),e.HEAPU8=M=new Uint8Array(t),e.HEAPU16=P=new Uint16Array(t),e.HEAPU32
1=E=new Uint32Array(t),e.HEAPF32=T=new Float32Array(t),e.HEAPF64=F=new Float64Array(t)}var O,x=[],k=[],j=[],W=0,V=null,D=null;function U(t){throw e.onAbort&&e.onAbort(t),b(t="Aborted("+t+")"),L=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),c(t),t}function B(e){return e.startsWith("data:application/octet-stream;base64,")}if(!B(e7="canvas_advanced.wasm")){var N=e7;e7=e.locateFile?e.locateFile(N,g):g+N}function $(e){if(e==e7&&_)return new Uint8Array(_);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function H(e,t,n){return(function(e){if(!_&&(m||v)){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(()=>$(e));if(h)return new Promise((t,n)=>{h(e,e=>t(new Uint8Array(e)),n)})}return Promise.resolve().then(()=>$(e))})(e).then(e=>WebAssembly.instantiate(e,t)).then(e=>e).then(n,e=>{b("failed to asynchronously prepare wasm: "+e),U(e)})}var Y=t=>{for(;0<t.length;)t.shift()(e)};function z(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 X(e,t){return({[e=z(e)]:function(){return t.apply(this,arguments)}})[e]}function G(){this.G=[void 0],this.ta=[]}var q=new G,J=void 0;function K(e){throw new J(e)}var Q=e=>(e||K("Cannot use deleted val. handle = "+e),q.get(e).value),Z=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return q.Za({Aa:1,value:e})}};function ee(e){var t=Error,n=X(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 et=void 0,en=void 0;function er(e){for(var t="";M[e];)t+=en[M[e++]];return t}var ei=[];function ea(){for(;ei.length;){var e=ei.pop();e.g.M=!1,e.delete()}}var eo=void 0,es={};function eu(e,t){for(void 0===t&&K("ptr should not be undefined");e.l;)t=e.S(t),e=e.l;return t}var el={};function ec(e){var t=er(e=td(e));return th(e),t}function eh(e,t){var n=el[e];return void 0===n&&K(t+" has unknown type "+ec(e)),n}function ef(){}var ed=!1;function ep(e){--e.count.value,0===e.count.value&&(e.s?e.A.H(e.s):e.j.h.H(e.i))}var em={},ev=void 0;function eg(e){throw new ev(e)}function ey(e,t){return t.j&&t.i||eg("makeClassHandle requires ptr and ptrType"),!!t.A!=!!t.s&&eg("Both smartPtrType and smartPtr must be specified"),t.count={value:1},eb(Object.create(e,{g:{value:t}}))}function eb(e){return"undefined"==typeof FinalizationRegistry?(eb=e=>e,e):(ed=new FinalizationRegistry(e=>{ep(e.g)}),eb=e=>{var t=e.g;return t.s&&ed.register(e,{g:t},e),e},ef=e=>{ed.unregister(e)},eb(e))}var e_={};function ew(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function eA(e){return this.fromWireType(R[e>>2])}var eC={},eM={};function eI(e,t,n){function r(t){(t=n(t)).length!==e.length&&eg("Mismatched type converter count");for(var r=0;r<e.length;++r)eR(e[r],t[r])}e.forEach(function(e){eM[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{el.hasOwnProperty(e)?i[t]=el[e]:(a.push(e),eC.hasOwnProperty(e)||(eC[e]=[]),eC[e].push(()=>{i[t]=el[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)}function eP(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw TypeError(`Unknown type size: ${e}`)}}function eR(e,t,n={}){if(!("argPackAdvance"in t))throw TypeError("registerType registeredInstance requires argPackAdvance");!function(e,t,n={}){var r=t.name;if(e||K(`type "${r}" must have a positive integer typeid pointer`),el.hasOwnProperty(e)){if(n.ab)return;K(`Cannot register type '${r}' twice`)}el[e]=t,delete eM[e],eC.hasOwnProperty(e)&&(t=eC[e],delete eC[e],t.forEach(e=>e()))}(e,t,n)}function eE(e){K(e.g.j.h.name+" instance already deleted")}function eT(){}function eF(e,t,n){if(void 0===e[t].m){var r=e[t];e[t]=function(){return e[t].m.hasOwnProperty(arguments.length)||K(`Function '${n}
1' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].m})!`),e[t].m[arguments.length].apply(this,arguments)},e[t].m=[],e[t].m[r.L]=r}}function eL(t,n,r){e.hasOwnProperty(t)?((void 0===r||void 0!==e[t].m&&void 0!==e[t].m[r])&&K(`Cannot register public name '${t}' twice`),eF(e,t,t),e.hasOwnProperty(r)&&K(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),e[t].m[r]=n):(e[t]=n,void 0!==r&&(e[t].tb=r))}function eS(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.B=n,this.H=r,this.l=i,this.Ua=a,this.S=o,this.Pa=s,this.ya=[]}function eO(e,t,n){for(;t!==n;)t.S||K(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.S(e),t=t.l;return e}function ex(e,t){return null===t?(this.ea&&K(`null is not a valid ${this.name}`),0):(t.g||K(`Cannot pass "${eG(t)}" as a ${this.name}`),t.g.i||K(`Cannot pass deleted object as a pointer of type ${this.name}`),eO(t.g.i,t.g.j.h,this.h))}function ek(e,t){if(null===t){if(this.ea&&K(`null is not a valid ${this.name}`),this.V){var n=this.fa();return null!==e&&e.push(this.H,n),n}return 0}if(t.g||K(`Cannot pass "${eG(t)}" as a ${this.name}`),t.g.i||K(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.U&&t.g.j.U&&K(`Cannot convert argument of type ${t.g.A?t.g.A.name:t.g.j.name} to parameter type ${this.name}`),n=eO(t.g.i,t.g.j.h,this.h),this.V)switch(void 0===t.g.s&&K("Passing raw pointer to smart pointer is illegal"),this.nb){case 0:t.g.A===this?n=t.g.s:K(`Cannot convert argument of type ${t.g.A?t.g.A.name:t.g.j.name} to parameter type ${this.name}`);break;case 1:n=t.g.s;break;case 2:if(t.g.A===this)n=t.g.s;else{var r=t.clone();n=this.jb(n,Z(function(){r.delete()})),null!==e&&e.push(this.H,n)}break;default:K("Unsupporting sharing policy")}return n}function ej(e,t){return null===t?(this.ea&&K(`null is not a valid ${this.name}`),0):(t.g||K(`Cannot pass "${eG(t)}" as a ${this.name}`),t.g.i||K(`Cannot pass deleted object as a pointer of type ${this.name}`),t.g.j.U&&K(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`),eO(t.g.i,t.g.j.h,this.h))}function eW(e,t,n,r){this.name=e,this.h=t,this.ea=n,this.U=r,this.V=!1,this.H=this.jb=this.fa=this.za=this.nb=this.ib=void 0,void 0!==t.l?this.toWireType=ek:(this.toWireType=r?ex:ej,this.v=null)}function eV(t,n,r){e.hasOwnProperty(t)||eg("Replacing nonexistant public symbol"),void 0!==e[t].m&&void 0!==r?e[t].m[r]=n:(e[t]=n,e[t].L=r)}var eD=[],eU=e=>{var t=eD[e];return t||(e>=eD.length&&(eD.length=e+1),eD[e]=t=O.get(e)),t};function eB(t,n){var r,i,a=(t=er(t)).includes("j")?(r=t,i=[],function(){if(i.length=0,Object.assign(i,arguments),r.includes("j")){var t=e["dynCall_"+r];t=i&&i.length?t.apply(null,[n].concat(i)):t.call(null,n)}else t=eU(n).apply(null,i);return t}):eU(n);return"function"!=typeof a&&K(`unknown function pointer with signature ${t}: ${n}`),a}var eN=void 0;function e$(e,t){var n=[],r={};throw t.forEach(function e(t){r[t]||el[t]||(eM[t]?eM[t].forEach(e):(n.push(t),r[t]=!0))}),new eN(`${e}: `+n.map(ec).join([", "]))}function eH(e,t,n,r,i){var a=t.length;2>a&&K("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].v){s=!0;break}var u="void"!==t[0].name,l=a-2,c=Array(l),h=[],f=[];return function(){if(arguments.length!==l&&K(`function ${e} called with ${arguments.length} arguments, expected ${l} args!`),f.length=0,h.length=o?2:1,h[0]=i,o){var n=t[1].toWireType(f,this);h[1]=n}for(var a=0;a<l;++a)c[a]=t[a+2].toWireType(f,arguments[a]),h.push(c[a]);if(a=r.apply(null,h),s)ew(f);else for(var d=o?1:2;d<t.length;d++){var p=1===d?n:c[d-2];null!==t[d].v&&t[d].v(p)}return u?t[0].fromWireType(a):void 0}}function eY(e,t){for(var n=[],r=0;r<e;r++)n.push(E[t+4*r>>2]);return n}function ez(e,t,n){return e instanceof Object||K(`${n} with invalid "this": ${e}`),e instanceof t.h.constructor||K(`${n} incompatible with "this" of type ${e.constructor.name}`),e.g.i||K(`cannot call emscripten binding method ${n} on deleted object`),eO(e.g.i,e.g.j.h,t.h)}function eX(e){e>=q.ua&&0==--q.get(e).Aa&&q.$a(e)}function eG(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}var eq=(e,t,n,r)=>{if(0<r){r=n+r-1;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)),127>
1=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|63&a}}t[n]=0}},eJ=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},eK="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,eQ=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&eK)return eK.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},eZ="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,e0=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&P[n];)++n;if(32<(n<<=1)-e&&eZ)return eZ.decode(M.subarray(e,n));for(r=0,n="";!(r>=t/2);++r){var i=I[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},e1=(e,t,n)=>{if(void 0===n&&(n=0x7fffffff),2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)I[t>>1]=e.charCodeAt(i),t+=2;return I[t>>1]=0,t-r},e2=e=>2*e.length,e3=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=R[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},e4=(e,t,n)=>{if(void 0===n&&(n=0x7fffffff),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)),R[t>>2]=a,(t+=4)+4>n)break}return R[t>>2]=0,t-r},e5=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},e6={};function e8(e){var t=e6[e];return void 0===t?er(e):t}var e7,e9,te=[],tt=[],tn={},tr=()=>{if(!e9){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 tn)void 0===tn[e]?delete t[e]:t[e]=tn[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);e9=n}return e9},ti=[null,[],[]],ta=e=>0==e%4&&(0!=e%100||0==e%400),to=[31,29,31,30,31,30,31,31,30,31,30,31],ts=[31,28,31,30,31,30,31,31,30,31,30,31];Object.assign(G.prototype,{get(e){return this.G[e]},has(e){return void 0!==this.G[e]},Za(e){var t=this.ta.pop()||this.G.length;return this.G[t]=e,t},$a(e){this.G[e]=void 0,this.ta.push(e)}}),J=e.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},q.G.push({value:void 0},{value:null},{value:!0},{value:!1}),q.ua=q.G.length,e.count_emval_handles=function(){for(var e=0,t=q.ua;t<q.G.length;++t)void 0!==q.G[t]&&++e;return e}
vendor: 1,277 bytes, line 1
1,et=e.PureVirtualError=ee("PureVirtualError");for(var tu=Array(256),tl=0;256>tl;++tl)tu[tl]=String.fromCharCode(tl);en=tu,e.getInheritedInstanceCount=function(){return Object.keys(es).length},e.getLiveInheritedInstances=function(){var e,t=[];for(e in es)es.hasOwnProperty(e)&&t.push(es[e]);return t},e.flushPendingDeletes=ea,e.setDelayFunction=function(e){eo=e,ei.length&&eo&&eo(ea)},ev=e.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},eT.prototype.isAliasOf=function(e){if(!(this instanceof eT&&e instanceof eT))return!1;var t=this.g.j.h,n=this.g.i,r=e.g.j.h;for(e=e.g.i;t.l;)n=t.S(n),t=t.l;for(;r.l;)e=r.S(e),r=r.l;return t===r&&n===e},eT.prototype.clone=function(){if(this.g.i||eE(this),this.g.O)return this.g.count.value+=1,this;var e=eb,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,M:i.M,O:i.O,i:i.i,j:i.j,s:i.s,A:i.A}}})),e.g.count.value+=1,e.g.M=!1,e},eT.prototype.delete=function(){this.g.i||eE(this),this.g.M&&!this.g.O&&K("Object already scheduled for deletion"),ef(this),ep(this.g),this.g.O||(this.g.s=void 0,this.g.i=void 0)},eT.prototype.isDeleted=function(){return!this.g.i},eT.prototype.deleteLater=function(){return this.g.i||eE(this),this.g.M&&!this.g.O&&K("Ob
1ject already scheduled for deletion"),ei.push(this),1===ei.length&&eo&&eo(ea),this.g.M=!0,this},eW.prototype.Va=function(e){return this.za&&(e=this.za(e)),e},eW.prototype.pa=function(e){this.H&&this.H(e)},eW.prototype.argPackAdvance=8,eW.prototype.readValueFromPointer=eA,eW.prototype.deleteObject=function(e){null!==e&&e.delete()},eW.prototype.fromWireType=function(e){function t(){return this.V?ey(this.h.B,{j:this.ib,i:n,A:this,s:e}):ey(this.h.B,{j:this,i:e})}var n=this.Va(e);if(!n)return this.pa(e),null;var r=es[eu(this.h,n)];if(void 0!==r)return 0===r.g.count.value?(r.g.i=n,r.g.s=e,r.clone()):(r=r.clone(),this.pa(e),r);if(!(r=em[r=this.h.Ua(n)]))return t.call(this);r=this.U?r.Ka:r.pointerType;var i=function e(t,n,r){return n===r?t:void 0===r.l||null===(t=e(t,n,r.l))?null:r.Pa(t)}(n,this.h,r.h);return null===i?t.call(this):this.V?ey(r.h.B,{j:r,i:i,A:this,s:e}):ey(r.h.B,{j:r,i:i})},eN=e.UnboundTypeError=ee("UnboundTypeError");var tc={_embind_create_inheriting_constructor:function(e,t,n){e=er(e),t=eh(t,"wrapper"),n=Q(n);var r=[].slice,i=t.h,a=i.B,o=i.l.B,s=i.l.constructor;for(var u in e=X(e,function(){i.l.ya.forEach((function(e){if(this[e]===o[e])throw new et(`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&&K("Pass correct 'this' to __construct");var e=s.implement.apply(void 0,[this].concat(r.call(arguments)));ef(e);var t=e.g;e.notifyOnDestruction(),t.O=!0,Object.defineProperties(this,{g:{value:t}}),eb(this),e=eu(i,e=t.i),es.hasOwnProperty(e)?K(`Tried to register registered instance: ${e}`):es[e]=this},a.__destruct=function(){this===a&&K("Pass correct 'this' to __destruct"),ef(this);var e=this.g.i;e=eu(i,e),es.hasOwnProperty(e)?delete es[e]:K(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(a),n)e.prototype[u]=n[u];return Z(e)},_embind_finalize_value_object:function(e){var t=e_[e];delete e_[e];var n=t.fa,r=t.H,i=t.sa;eI([e],i.map(e=>e.Ya).concat(i.map(e=>e.lb)),e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Wa,s=t.Xa,u=e[n+i.length],l=t.kb,c=t.mb;a[t.Sa]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(c,e,u.toWireType(n,t)),ew(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 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:eA,v:r}]})},_embind_register_bigint:function(){},_embind_register_bool:function(e,t,n,r,i){var a=eP(n);eR(e,{name:t=er(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=I;else if(4===n)r=R;else throw TypeError("Unknown boolean type size: "+t);return this.fromWireType(r[e>>a])},v:null})},_embind_register_class:function(e,t,n,r,i,a,o,s,u,l,c,h,f){c=er(c),a=eB(i,a),s&&(s=eB(o,s)),l&&(l=eB(u,l)),f=eB(h,f);var d=z(c);eL(d,function(){e$(`Cannot construct ${c} due to unbound types`,[r])}),eI([e,t,n],r?[r]:[],function(t){if(t=t[0],r)var n=t.h,i=n.B;else i=eT.prototype;var o=Object.create(i,{constructor:{value:t=X(d,function(){if(Object.getPrototypeOf(this)!==o)throw new J("Use 'new' to construct "+c);if(void 0===u.I)throw new J(c+" has no accessible constructor");var e=u.I[arguments.length];if(void 0===e)throw new J(`Tried to invoke ctor of ${c} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.I).toString()}) parameters instead!`);return e.apply(this,arguments)})}});t.prototype=o;var u=new eS(c,t,o,f,n,a,s,l);u.l&&(void 0===u.l.T&&(u.l.T=[]),u.l.T.push(u)),n=new eW(c,u,!0,!1),i=new eW(c+"*",u,!1,!1);var h=new eW(c+" const*",u,!1,!0);return em[e]={pointerType:i,Ka:h},eV(d,t),[n,i,h]})},_embind_register_class_class_function:function(e,t,n,r,i,a,o){var s=eY(n,r);t=er(t),a=eB(i,a),eI([],[e],function(e){function r(){e$(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.h.constructor;return void 0===u[t]?(r.L=n-1,u[t]=r):(eF(u,t,i),u[t].m[n-1]=r),eI([],s,function(r){if(r=eH(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].m?(r.L=n-1,u[t]=r):u[t].m[n-1]=r,e.h.T)for(let n of e.h.T)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:function(e,t,n,r,i,a,o,s){t=er(t),a=eB(i,a),eI([],[e],function(e){e=e[0];var i=`${e.name}.${t}`,u={get(){e$(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{e$(`Cannot access ${i} due to unbound types`,[n])}:()=>{K(`${i} is a read-only property`)},Object.defineProperty(e.h.constructor,t,u),eI([],[n],function(n){n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=eB(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),ew(t)}),Object.defineProperty(e.h.constructor,t,i),[]}),[]})},_embind_register_class_constructor:function(e,t,n,r,i,a){var o=eY(t,n);i=eB(r,i),eI([],[e],function(e){e=e[0];var n=`constructor ${e.name}`;if(void 0===e.h.I&&(e.h.I=[]),void 0!==e.h.I[t-1])throw new J(`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.h.I[t-1]=()=>{e$(`Cannot construct ${e.name} due to unbound types`,o)},eI([],o,function(r){return r.splice(1,0,null),e.h.I[t-1]=eH(n,r,null,i,a),[]}),[]})},_embind_register_class_function:function(e,t,n,r,i,a,o,s){var u=eY(n,r);t=er(t),a=eB(i,a),eI([],[e],function(e){function r(){e$(`Cannot call ${i} due to unbound types`,u)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.h.ya.push(t);var l=e.h.B,c=l[t];return void 0===c||void 0===c.m&&c.className!==e.name&&c.L===n-2?(r.L=n-2,r.className=e.n
1ame,l[t]=r):(eF(l,t,i),l[t].m[n-2]=r),eI([],u,function(r){return r=eH(i,r,e,a,o),void 0===l[t].m?(r.L=n-2,l[t]=r):l[t].m[n-2]=r,[]}),[]})},_embind_register_class_property:function(e,t,n,r,i,a,o,s,u,l){t=er(t),i=eB(r,i),eI([],[e],function(e){e=e[0];var r=`${e.name}.${t}`,c={get(){e$(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return c.set=u?()=>{e$(`Cannot access ${r} due to unbound types`,[n,o])}:()=>{K(r+" is a read-only property")},Object.defineProperty(e.h.B,t,c),eI([],u?[n,o]:[n],function(n){var o=n[0],c={get(){var t=ez(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=eB(s,u);var h=n[1];c.set=function(t){var n=ez(this,e,r+" setter"),i=[];u(l,n,h.toWireType(i,t)),ew(i)}}return Object.defineProperty(e.h.B,t,c),[]}),[]})},_embind_register_emval:function(e,t){eR(e,{name:t=er(t),fromWireType:function(e){var t=Q(e);return eX(e),t},toWireType:function(e,t){return Z(t)},argPackAdvance:8,readValueFromPointer:eA,v:null})},_embind_register_enum:function(e,t,n,r){function i(){}n=eP(n),t=er(t),i.values={},eR(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:function(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?I:P)[e>>1])};case 2:return function(e){return this.fromWireType((n?R:E)[e>>2])};default:throw TypeError("Unknown integer type: "+e)}}(t,n,r),v:null}),eL(t,i)},_embind_register_enum_value:function(e,t,n){var r=eh(e,"enum");t=er(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:X(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:function(e,t,n){n=eP(n),eR(e,{name:t=er(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:function(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>2])};case 3:return function(e){return this.fromWireType(F[e>>3])};default:throw TypeError("Unknown float type: "+e)}}(t,n),v:null})},_embind_register_function:function(e,t,n,r,i,a){var o=eY(t,n);e=er(e),i=eB(r,i),eL(e,function(){e$(`Cannot call ${e} due to unbound types`,o)},t-1),eI([],o,function(n){return eV(e,eH(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]})},_embind_register_integer:function(e,t,n,r,i){t=er(t),-1===i&&(i=0xffffffff),i=eP(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},eR(e,{name:t,fromWireType:a,toWireType:n,argPackAdvance:8,readValueFromPointer:function(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 I[e>>1]}:function(e){return P[e>>1]};case 2:return n?function(e){return R[e>>2]}:function(e){return E[e>>2]};default:throw TypeError("Unknown integer type: "+e)}}(t,i,0!==r),v:null})},_embind_register_memory_view:function(e,t,n){function r(e){e>>=2;var t=E;return new i(t.buffer,t[e+1],t[e])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];eR(e,{name:n=er(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ab:!0})},_embind_register_std_string:function(e,t){var n="std::string"===(t=er(t));eR(e,{name:t,fromWireType:function(e){var t=E[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?eQ(M,i,o-i):"",void 0===s)var s=i;else s+="\0",s+=i;i=o+1}}else{for(a=0,s=Array(t);a<t;++a)s[a]=String.fromCharCode(M[r+a]);s=s.join("")}return th(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||K("Cannot pass non-string to std::string");var i=n&&r?eJ(t):t.length,a=tf(4+i+1),o=a+4;if(E[a>>2]=i,n&&r)eq(t,M,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);255<s&&(th(o),K("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(th,a),a},argPackAdvance:8,readValueFromPointer:eA,v:function(e){th(e)}})},_embind_register_std_wstring:function(e,t,n){if(n=er(n),2===t)var r=e0,i=e1,a=e2,o=()=>P,s=1;else 4===t&&(r=e3,i=e4,a=e5,o=()=>E,s=2);eR(e,{name:n,fromWireType:function(e){for(var n,i=E[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+="\0",n+=u),u=c+t)}return th(e),n},toWireType:function(e,r){"string"!=typeof r&&K(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),u=tf(4+o+t);return E[u>>2]=o>>s,i(r,u+4,o+t),null!==e&&e.push(th,u),u},argPackAdvance:8,readValueFromPointer:eA,v:function(e){th(e)}})},_embind_register_value_object:function(e,t,n,r,i,a){e_[e]={name:er(t),fa:eB(n,r),H:eB(i,a),sa:[]}},_embind_register_value_object_field:function(e,t,n,r,i,a,o,s,u,l){e_[e].sa.push({Sa:er(t),Ya:n,Wa:eB(r,i),Xa:a,lb:
1o,kb:eB(s,u),mb:l})},_embind_register_void:function(e,t){eR(e,{cb:!0,name:t=er(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(e,t,n){e=Q(e),t=eh(t,"emval::as");var r=[],i=Z(r);return E[n>>2]=i,t.toWireType(r,e)},_emval_call_method:function(e,t,n,r,i){e=te[e],t=Q(t),n=e8(n);var a=[];return E[r>>2]=Z(a),e(t,n,a,i)},_emval_call_void_method:function(e,t,n,r){(e=te[e])(t=Q(t),n=e8(n),null,r)},_emval_decref:eX,_emval_get_method_caller:function(e,t){var n,r,i=function(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=eh(E[t+4*r>>2],"parameter "+r);return n}(e,t),a=i[0],o=tt[t=a.name+"_$"+i.slice(1).map(function(e){return e.name}).join("_")+"$"];if(void 0!==o)return o;var s=Array(e-1);return n=(t,n,r,o)=>{for(var u=0,l=0;l<e-1;++l)s[l]=i[l+1].readValueFromPointer(o+u),u+=i[l+1].argPackAdvance;for(l=0,t=t[n].apply(t,s);l<e-1;++l)i[l+1].Na&&i[l+1].Na(s[l]);if(!a.cb)return a.toWireType(r,t)},r=te.length,te.push(n),o=r,tt[t]=o},_emval_get_module_property:function(t){return Z(e[t=e8(t)])},_emval_get_property:function(e,t){return Z((e=Q(e))[t=Q(t)])},_emval_incref:function(e){4<e&&(q.get(e).Aa+=1)},_emval_new_array:function(){return Z([])},_emval_new_cstring:function(e){return Z(e8(e))},_emval_new_object:function(){return Z({})},_emval_run_destructors:function(e){ew(Q(e)),eX(e)},_emval_set_property:function(e,t,n){e=Q(e),t=Q(t),n=Q(n),e[t]=n},_emval_take_value:function(e,t){return Z(e=(e=eh(e,"_emval_take_value")).readValueFromPointer(t))},abort:()=>{U("")},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(0x80000000<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math;r=Math.max(e,r);e:{i=i.min.call(i,0x80000000,r+(65536-r%65536)%65536)-w.buffer.byteLength+65535>>>16;try{w.grow(i),S();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return tr().forEach(function(r,i){var a=t+n;for(i=E[e+4*i>>2]=a,a=0;a<r.length;++a)C[0|i++]=r.charCodeAt(a);C[0|i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=tr();E[e>>2]=n.length;var r=0;return n.forEach(function(e){r+=e.length+1}),E[t>>2]=r,0},fd_close:()=>52,fd_seek:function(){return 70},fd_write:(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=E[t>>2],s=E[t+4>>2];t+=8;for(var u=0;u<s;u++){var l=M[o+u],c=ti[e];0===l||10===l?((1===e?y:b)(eQ(c,0)),c.length=0):c.push(l)}i+=s}return E[r>>2]=i,0},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){var n;function r(e){return 0>e?-1:+(0<e)}return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}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.J;for(e=new Date(new Date(e.K+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(ta(e.getFullYear())?to:ts)[n];if(t>r-e.getDate())t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+t);break}}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,c,h=R[r+40>>2];for(var f in r={qb:R[r>>2],pb:R[r+4>>2],Z:R[r+8>>2],ha:R[r+12>>2],$:R[r+16>>2],K:R[r+20>>2],C:R[r+24>>2],J:R[r+28>>2],ub:R[r+32>>2],ob:R[r+36>>2],rb:h&&h?eQ(M,h):""},n=n?eQ(M,n):"",h={"%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(RegExp(f,"g"),h[f]);var d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),p="January February March April May June July August September October November December".split(" ");for(f in h={"%a":e=>d[e.C].substring(0,3),"%A":e=>d[e.C],"%b":e=>p[e.$].substring(0,3),"%B":e=>p[e.$],"%C":e=>a((e.K+1900)/100|0,2),"%d":e=>a(e.ha,2),"%e":e=>i(e.ha,2," "),"%g":e=>u(e).toString().substring(2),"%G":e=>u(e),"%H":e=>a(e.Z,2),"%I":e=>(0==(e=e.Z)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.$-1;t+=(ta(e.K+1900)?to:ts)[n++]);return a(e.ha+t,3)},"%m":e=>a(e.$+1,2),"%M":e=>a(e.pb,2),"%n":()=>"\n","%p":e=>0<=e.Z&&12>e.Z?"AM":"PM","%S":e=>a(e.qb,2),"%t":()=>" ","%u":e=>e.C||7,"%U":e=>a(Math.floor((e.J+7-e.C)/7),2),"%V":e=>{var t=Math.floor((e.J+7-(e.C+6)%7)/7);if(2>=(e.C+371-e.J-2)%7&&t++,t)53==t&&(4==(n=(e.C+371-e.J)%7)||3==n&&ta(e.K)||(t=1));else{t=52;var n=(e.C+7-e.J-1)%7;(4==n||5==n&&ta(e.K%400-1))&&t++}return a(t,2)},"%w":e=>e.C,"%W":e=>a(Math.floor((e.J+7-(e.C+6)%7)/7),2),"%y":e=>(e.K+1900).toString().substring(2),"%Y":e=>
1e.K+1900,"%z":e=>{var t=0<=(e=e.ob);return(t?"+":"-")+String("0000"+((e=Math.abs(e)/60)/60*100+e%60)).slice(-4)},"%Z":e=>e.rb,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),h)n.includes(f)&&(n=n.replace(RegExp(f,"g"),h[f](r)));return(c=Array(eJ(l=n=n.replace(/\0\0/g,"%"))+1),eq(l,c,0,c.length),(f=c).length>t)?0:(C.set(f,e),f.length-1)})(e,t,n,r)};!function(){function t(t){if(w=(A=t=t.exports).memory,S(),O=A.__indirect_function_table,k.unshift(A.__wasm_call_ctors),W--,e.monitorRunDependencies&&e.monitorRunDependencies(W),0==W&&(null!==V&&(clearInterval(V),V=null),D)){var n=D;D=null,n()}return t}var n,r,i={env:tc,wasi_snapshot_preview1:tc};if(W++,e.monitorRunDependencies&&e.monitorRunDependencies(W),e.instantiateWasm)try{return e.instantiateWasm(i,t)}catch(e){b("Module.instantiateWasm callback failed with error: "+e),c(e)}(n=function(e){t(e.instance)},r=e7,_||"function"!=typeof WebAssembly.instantiateStreaming||B(r)||r.startsWith("file://")||"function"!=typeof fetch?H(r,i,n):fetch(r,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,i).then(n,function(e){return b("wasm streaming compile failed: "+e),b("falling back to ArrayBuffer instantiation"),H(r,i,n)}))).catch(c)}();var th=e=>(th=A.free)(e),tf=e=>(tf=A.malloc)(e),td=e=>(td=A.__getTypeName)(e);function tp(){function t(){if(!u&&(u=!0,e.calledRun=!0,!L)){if(Y(k),l(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();j.unshift(t)}Y(j)}}if(!(0<W)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)!function(){var t=e.preRun.shift();x.unshift(t)}();Y(x),0<W||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),t()},1)):t())}}if(e.__embind_initialize_bindings=()=>(e.__embind_initialize_bindings=A._embind_initialize_bindings)(),e.dynCall_jiji=(t,n,r,i,a)=>(e.dynCall_jiji=A.dynCall_jiji)(t,n,r,i,a),e.dynCall_viijii=(t,n,r,i,a,o,s)=>(e.dynCall_viijii=A.dynCall_viijii)(t,n,r,i,a,o,s),e.dynCall_iiiiij=(t,n,r,i,a,o,s)=>(e.dynCall_iiiiij=A.dynCall_iiiiij)(t,n,r,i,a,o,s),e.dynCall_iiiiijj=(t,n,r,i,a,o,s,u,l)=>(e.dynCall_iiiiijj=A.dynCall_iiiiijj)(t,n,r,i,a,o,s,u,l),e.dynCall_iiiiiijj=(t,n,r,i,a,o,s,u,l,c)=>(e.dynCall_iiiiiijj=A.dynCall_iiiiiijj)(t,n,r,i,a,o,s,u,l,c),D=function e(){u||tp(),u||(D=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return tp(),e.ready})},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.31.2","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[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}
1,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:()=>a});var r=void 0,i=function(e,t){var n,r;return["touchstart","touchmove"].indexOf(e.type)>-1&&(null==(n=e.touches)?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.length)?{clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}},a=function(e){var t=e.canvas,n=e.artboard,a=e.stateMachines,o=void 0===a?[]:a,s=e.renderer,u=e.rive,l=e.fit,c=e.alignment,h=e.isTouchScrollEnabled,f=void 0!==h&&h,d=e.layoutScaleFactor,p=void 0===d?1:d;if(!t||!o.length||!s||!u||!n||"undefined"==typeof window)return null;var m=null,v=!1,g=(function(e){if(v&&e instanceof MouseEvent){"mouseup"==e.type&&(v=!1);return}v=f&&"touchend"===e.type&&"touchstart"===m,m=e.type;var t=e.currentTarget.getBoundingClientRect(),r=i(e,f),a=r.clientX,s=r.clientY;if(a||s){var h=a-t.left,d=s-t.top,g=u.computeAlignment(l,c,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,p),y=new u.Mat2D;g.invert(y);var b=new u.Vec2D(h,d),_=u.mapXY(y,b),w=_.x(),A=_.y();switch(_.delete(),y.delete(),b.delete(),g.delete(),e.type){case"mouseout":for(var C=0;C<o.length;C++){var M=o[C];M.pointerMove(w,A)}break;case"touchmove":case"mouseover":case"mousemove":for(var I=0;I<o.length;I++){var M=o[I];M.pointerMove(w,A)}break;case"touchstart":case"mousedown":for(var P=0;P<o.length;P++){var M=o[P];M.pointerDown(w,A)}break;case"touchend":case"mouseup":for(var R=0;R<o.length;R++){var M=o[R];M.pointerUp(w,A)}}}}).bind(r);return t.addEventListener("mouseover",g),t.addEventListener("mouseout",g),t.addEventListener("mousemove",g),t.addEventListener("mousedown",g),t.addEventListener("mouseup",g),t.addEventListener("touchmove",g,{passive:f}),t.addEventListener("touchstart",g,{passive:f}),t.addEventListener("touchend",g),function(){t.removeEventListener("mouseover",g),t.removeEventListener("mouseout",g),t.removeEventListener("mousemove",g),t.removeEventListener("mousedown",g),t.removeEventListener("mouseup",g),t.removeEventListener("touchmove",g),t.removeEventListener("touchstart",g),t.removeEventListener("touchend",g)}}},(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=/^.+(:|:)/gim,u=[".","/"],l="about:blank";function c(e){if(!e)return l;var t=e.replace(o,"").replace(i,function(e,t){return String.fromCharCode(t)}).replace(a,"").replace(o,"").trim();if(!t)return l;if(u.indexOf(t[0])>-1)return t;var n=t.match(s);if(!n)return t;var c=n[0];return r.test(c)?l:t}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>f,AudioWrapper:()=>s,CustomFileAssetLoaderWrapper:()=>l,FileAssetWrapper:()=>c,Finalizable:()=>a,FontAssetWrapper:()=>d,FontWrapper:()=>u,ImageAssetWrapper:()=>h,ImageWrapper:()=>o,finalizationRegistry:()=>m});var r,i=(r=function(e,t){return(r=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)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){this.selfUnref=!1},o=function(e){function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return i(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}(a),s=function(e){function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return i(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}(a),u=function(e){function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return i(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}(a),l=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 h(e):e.isAudio?n=new f(e):e.isFont&&(n=new d(e)),this._assetLoaderCallback(n,t)},e}(),c=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}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(c),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(c),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(c),p=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),m=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:p)(function(e){e.unref()})}],es={};function eu(e){var t=es[e];if(void 0!==t)return t.exports;var n=es[e]={exports:{}};return eo[e](n,n.exports,eu),n.exports}eu.d=(e,t)=>{for(var n in t)eu.o(t,n)&&!eu.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},eu.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),eu.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var el={};return eu.r(el),eu.d(el,{Alignment:()=>t,DataEnum:()=>B,EventType:()=>i,Fit:()=>e,Layout:()=>w,LoopType:()=>a,Rive:()=>D,RiveEventType:()=>r,RiveFile:()=>V,RuntimeLoader:()=>A,StateMachineInput:()=>M,StateMachineInputType:()=>n,Testing:()=>en,ViewModel:()=>U,ViewModelInstance:()=>$,ViewModelInstanceArtboard:()=>Z,ViewModelInstanceAssetImage:()=>Q,ViewModelInstanceBoolean:()=>X,ViewModelInstanceColor:()=>K,ViewModelInstanceEnum:()=>q,ViewModelInstanceList:()=>J,ViewModelInstanceNumber:()=>z,ViewModelInstanceString:()=>Y,ViewModelInstanceTrigger:()=>G,ViewModelInstanceValue:()=>H,decodeAudio:()=>er,decodeFont:()=>ea,decodeImage:()=>ei}),u=eu(1),l=eu(2),c=eu(3),h=eu(5),f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]}
1)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)},d=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},p=function(){return(p=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}).apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((r=r.apply(e,t||[])).next())})},v=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){var l=[s,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},g=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))},y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return d(t,e),t}(Error),(b=e||(e={})).Cover="cover",b.Contain="contain",b.Fill="fill",b.FitWidth="fitWidth",b.FitHeight="fitHeight",b.None="none",b.ScaleDown="scaleDown",b.Layout="layout",(_=t||(t={})).Center="center",_.TopLeft="topLeft",_.TopCenter="topCenter",_.TopRight="topRight",_.CenterLeft="centerLeft",_.CenterRight="centerRight",_.BottomLeft="bottomLeft",_.BottomCenter="bottomCenter",_.BottomRight="bottomRight",w=function(){function n(n){var r,i,a,o,s,u,l;this.fit=null!=(r=null==n?void 0:n.fit)?r:e.Contain,this.alignment=null!=(i=null==n?void 0:n.alignment)?i:t.Center,this.layoutScaleFactor=null!=(a=null==n?void 0:n.layoutScaleFactor)?a:1,this.minX=null!=(o=null==n?void 0:n.minX)?o:0,this.minY=null!=(s=null==n?void 0:n.minY)?s:0,this.maxX=null!=(u=null==n?void 0:n.maxX)?u:0,this.maxY=null!=(l=null==n?void 0:n.maxY)?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?t:this.fit,alignment:null!=r?r:this.alignment,layoutScaleFactor:null!=i?i:this.layoutScaleFactor,minX:null!=a?a:this.minX,minY:null!=o?o:this.minY,maxX:null!=s?s:this.maxX,maxY:null!=u?u:this.maxY})},n.prototype.runtimeFit=function(t){var n;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)},n.prototype.runtimeAlignment=function(e){var n;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)},n}(),A=function(){function e(){}return e.loadRuntime=function(){u.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())||n(e.runtime)}).catch(function(t){var n={message:(null==t?void 0:t.message)||"Unknown error",type:(null==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(l.name,"@").concat(l.version,"/rive_fallback.wasm");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()):console.error(["Could not load Rive WASM file from ".concat(e.wasmURL," or ").concat(r,"."),"Possible reasons:\n- Network connection is down\n- WebAssembly is not supported in this environment\n- The WASM file is corrupted or incompatible\n\nError details:","- Type: ".concat(n.type),"- Message: ".concat(n.message),"- WebAssembly-specific error: ".concat(n.wasmError),"\nTo resolve, you may need to:\n1. Check your network connection\n2. Set a new WASM source via RuntimeLoader.setWasmUrl()\n3. Call RuntimeLoader.loadRuntime() again"].join("\n"))})},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(l.name,"@").concat(l.version,"/rive.wasm"),e}(),(C=n||(n={}))[C.Number=56]="Number",C[C.Trigger=58]="Trigger",C[C.Boolean=59]="Boolean",M=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===n.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),(I=r||(r={}))[I.General=128]="General",I[I.OpenUrl=131]="OpenUrl",P=function(e){this.nativeArtboard=e},R=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 M(n.Boolean,e.asBool()):e.type===t.SMIInput.number?new M(n.Number,e.asNumber()):e.type===t.SMIInput.trigger?new M(n.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}(),E=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=et(e)).length)this.animations.forEach(function(e){return e.playing=t}),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<e.length;o++){var s=r.indexOf(e[o]),u=a.indexOf(e[o]);if(s>=0||u>=0)s>=0?this.animations[s].playing=t:this.stateMachines[u].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var h=new c.Animation(l,this.artboard,this.runtime,t);h.advance(0),h.apply(1),this.animations.push(h)}else{var f=this.artboard.stateMachineByName(e[o]);if(f){var d=new R(f,this.runtime,t,this.artboard);this.stateMachines.push(d)}}}}return n&&(t?this.eventManager.fire({type:i.Play,data:this.playing}):this.eventManager.fire({type:i.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 o=new c.Animation(a,this.artboard,this.runtime,t);o.advance(0),o.apply(1),this.animations.push(o)}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 R(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)});
1return 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;e=et(e);var n=[];if(0===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 a=this.stateMachines.filter(function(t){return e.includes(t.name)});a.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(a.map(function(e){return e.name}))}return this.eventManager.fire({type:i.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:i.Loop,data:{animation:n.name,type:a.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:i.Loop,data:{animation:n.name,type:a.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:i.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:i.Advance,data:e})},e}(),(T=i||(i={})).Load="load",T.LoadError="loaderror",T.Play="play",T.Pause="pause",T.Stop="stop",T.Loop="loop",T.Draw="draw",T.Advance="advance",T.StateChange="statechange",T.RiveEvent="riveevent",T.AudioStatusChange="audiostatuschange",(F=a||(a={})).OneShot="oneshot",F.Loop="loop",F.PingPong="pingpong",L=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}(),S=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.action)&&e.action(),(null==e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}(),(O=o||(o={}))[O.AVAILABLE=0]="AVAILABLE",O[O.UNAVAILABLE=1]="UNAVAILABLE",x=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=o.UNAVAILABLE,t}return d(t,e),t.prototype.delay=function(e){return m(this,void 0,void 0,function(){return v(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:i.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return this._enabled||(this._enabled=!0,this._status=o.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:if(this._status!==o.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]}})})},t.prototype._establishAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:if(this._started)return[3,5];if(this._started=!0,"undefined"!=typeof window)return[3,1];return this.enableAudio(),[3,5];case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:if(this._status!==o.UNAVAILABLE)return[3,5];return[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 m(e,void 0,void 0,function(){return v(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===o.UNAVAILABLE?(this.testAudio(),0):1}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(L)),k=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),j=globalThis.ResizeObserver||k,W=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 j(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}()),V=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 L,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError)}return e.prototype.initData=function(){return m(this,void 0,void 0,function(){var t,n,r,a;return v(this,function(o){switch(o.label){case 0:if(!this.src)return[3,2];return t=this,[4,ee(this.src)];case 1:t.buffer=o.sent(),o.label=2;case 2:if(this.destroyed)return[2];return this.assetLoader&&(n=new h.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader).assetLoader),r=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)];case 3:if(r.file=o.sent(),this.destroyed)return null==(a=this.file)||a.delete(),this.file=null,[2];return null!==this.file?this.eventManager.fire({type:i.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2]}})})},e.prototype.init=function(){return m(this,void 0,void 0,function(){var t,n;return v(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,A.awaitInstance()];case 2:if(t.runtime=r.sent(),this.destroyed)return[2];return[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]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:i.LoadError,data:e}),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)||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 P(t):null},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),D=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=W.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!=(t=e.layout)?t:new w,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new L,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError),e.onPlay&&this.on(i.Play,e.onPlay),e.onPause&&this.on(i.Pause,e.onPause),e.onStop&&this.on(i.Stop,e.onStop),e.onLoop&&this.on(i.Lo
1op,e.onLoop),e.onStateChange&&this.on(i.StateChange,e.onStateChange),e.onAdvance&&this.on(i.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(i.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(i.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(i.Play,e.onplay),e.onpause&&!e.onPause&&this.on(i.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(i.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(i.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(i.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new S(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,f=void 0!==h&&h,d=e.autoBind,p=void 0!==d&&d;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new y(t.missingErrorMessage);var m=et(o),v=et(s);this.loaded=!1,this.readyForPlaying=!1,A.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,f),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,m,v,c,p).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).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,h.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;x.status==o.UNAVAILABLE&&(null==(e=this.artboard)?void 0:e.hasAudio)&&null===this._audioEventListener&&(this._audioEventListener={type:i.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},x.add(this._audioEventListener),x.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,a){return m(this,void 0,void 0,function(){var o,s,u;return v(this,function(l){switch(l.label){case 0:if(l.trys.push([0,3,,4]),null!=this.riveFile)return[3,2];return o=new V({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=o,[4,o.init()];case 1:if(l.sent(),this.destroyed)return o.destroyIfUnused(),[2,!1];l.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,a),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:i.Load,data:null!=(u=this.src)?u:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:var c;return console.warn(s=(c=l.sent())&&c.isHandledError?c.message:"Problem loading file; may be corrupt!"),this.eventManager.fire({type:i.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},t.prototype.initArtboard=function(e,t,n,r,a){if(this.file){var o,s=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!s){var u="Invalid artboard name or no default artboard";console.warn(u),this.eventManager.fire({type:i.LoadError,data:u});return}if(this.artboard=s,s.volume=this._volume*x.systemVolume,1>this.artboard.animationCount()){var u="Artboard has no animations";throw this.eventManager.fire({type:i.LoadError,data:u}),u}if(this.animator=new E(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(o=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):o=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?i.Play:i.Pause,data:o}}),a){var l=this.file.defaultArtboardViewModel(s);if(null!==l){var c=l.defaultInstance();if(null!==c){var h=new $(c,null);this.bindViewModelInstance(h)}}}}},t.prototype.drawFrame=function(){var e,t;(null==(e=null==document?void 0:document.timeline)?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null==(t=this.runtime)||t.resolveAnimationFrame()):this.startRendering()},t.prototype.draw=function(e,t){this.frameRequestId=null;var n,a=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var o=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var s=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),u=0;u<s.length;u++){var l=s[u];l.advance(o),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var c=this.animator.stateMachines.filter(function(e){return e.playing}),f=0;f<c.length;f++){var d=c[f],p=d.reportedEventCount();if(p)for(var m=0;m<p;m++){var v=d.reportedEventAt(m);
1if(v)if(v.type===r.OpenUrl){if(this.eventManager.fire({type:i.RiveEvent,data:v}),this.automaticallyHandleEvents){var g=document.createElement("a"),y=v.url,b=v.target,_=(0,h.sanitizeUrl)(y);y&&g.setAttribute("href",_),b&&g.setAttribute("target",b),_&&_!==h.BLANK_URL&&g.click()}}else this.eventManager.fire({type:i.RiveEvent,data:v})}d.advanceAndApply(o)}0==this.animator.stateMachines.length&&this.artboard.advance(o);var w=this.renderer;w.clear(),w.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(w),w.restore(),w.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(o),this.frameCount++;var A=performance.now();for(this.frameTimes.push(A),this.durations.push(A-a);this.frameTimes[0]<=A-1e3;)this.frameTimes.shift(),this.durations.shift();null==(n=this._viewModelInstance)||n.handleCallbacks(),this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},t.prototype.alignRenderer=function(){var e=this.renderer,t=this.runtime,n=this._layout,r=this.artboard;e.align(n.runtimeFit(t),n.runtimeAlignment(t),{minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY},r.bounds,this._devicePixelRatioUsed*n.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&&W.remove(this._observed),this.removeRiveListeners(),this.file&&(null==(e=this.riveFile)||e.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(x.remove(this._audioEventListener),this._audioEventListener=null),null==(t=this._viewModelInstance)||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},t.prototype.deleteRiveRenderer=function(){var e;null==(e=this.renderer)||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){if(!e)return void console.warn("No text run name provided");if(!this.artboard)return void console.warn("Tried to access text run, but the Artboard is null");var t,n=this.artboard.textRun(e);return n||void console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null==(t=this.artboard)?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))},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;if(e=et(e),!this.readyForPlaying)return void this.taskQueue.add({action:function(){return n.play(e,t)}});this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},t.prototype.pause=function(e){var t=this;if(e=et(e),!this.readyForPlaying)return void this.taskQueue.add({action:function(){return t.pause(e)}});this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},t.prototype.scrub=function(e,t){var n=this;if(e=et(e),!this.readyForPlaying)return void this.taskQueue.add({action:function(){return n.scrub(e,t)}});this.animator.scrub(e,t||0),this.drawFrame()},t.prototype.stop=function(e){var t=this;if(e=et(e),!this.readyForPlaying)return void this.taskQueue.add({action:function(){return t.stop(e)}});this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},t.prototype.reset=function(e){var t,n,r=null==e?void 0:e.artboard,i=et(null==e?void 0:e.animations),a=et(null==e?void 0:e.stateMachines),o=null!=(t=null==e?void 0:e.autoplay)&&t,s=null!=(n=null==e?void 0:e.autoBind)&&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()}
1,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},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.inputs}},t.prototype.retrieveInputAtPath=function(e,t){if(!e)return void console.warn("No input name provided for path '".concat(t,"'"));if(!this.artboard)return void console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));var n=this.artboard.inputByPath(e,t);return n||void console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.setBooleanStateAtPath=function(e,t,r){var i=this.retrieveInputAtPath(e,r);i&&(i.type===n.Boolean?i.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(r,"' is not a boolean")))},t.prototype.setNumberStateAtPath=function(e,t,r){var i=this.retrieveInputAtPath(e,r);i&&(i.type===n.Number?i.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(r,"' is not a number")))},t.prototype.fireStateAtPath=function(e,t){var r=this.retrieveInputAtPath(e,t);r&&(r.type===n.Trigger?r.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)return void console.warn("No text name provided for path '".concat(t,"'"));if(!t)return void console.warn("No path provided for text '".concat(e,"'"));if(!this.artboard)return void console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));var n=this.artboard.textByPath(e,t);return n||void console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);return n?n.text:void 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);if(!r)return void console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"));r.text=t},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}):[]}
1,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},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 f=l.input(h);c.push({name:f.name,type:f.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*x.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!=(e=this._artboardWidth)?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)?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)||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}
1,enumerable:!1,configurable:!0}),t.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new U(t):null},t.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new U(t):null},t.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map(function(e){return new B(e)})}return this._dataEnums},t.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new U(e)}return null},t.prototype.getArtboard=function(e){var t,n;return null!=(n=null==(t=this.riveFile)?void 0:t.getArtboard(e))?n:null},t.missingErrorMessage="Rive source file or data buffer required",t.cleanupErrorMessage="Attempt to use file after calling cleanup.",t}(),U=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 $(t,null):null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);return null!==t?new $(t,null):null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();return null!==e?new $(e,null):null},e.prototype.instance=function(){var e=this._viewModel.instance();return null!==e?new $(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}(),B=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}(),(N=s||(s={})).Number="number",N.String="string",N.Boolean="boolean",N.Color="color",N.Trigger="trigger",N.Enum="enum",N.List="list",N.Image="image",N.Artboard="artboard",$=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.forEac
1h(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]);if(null!==n)if(t==e.length-1)return n;else return n.viewModelFromPathSegments(e,t++);return null},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r,i,a,o,u,l,c,h,f,d,p,m,v,g,y,b,_,w,A=this.internalViewModelInstance(e[t]);return null!==A?A.propertyFromPathSegments(e,t+1,n):null}var C=null;switch(n){case s.Number:if(null!==(C=null!=(i=null==(r=this._runtimeInstance)?void 0:r.number(e[t]))?i:null))return new z(C,this);break;case s.String:if(null!==(C=null!=(o=null==(a=this._runtimeInstance)?void 0:a.string(e[t]))?o:null))return new Y(C,this);break;case s.Boolean:if(null!==(C=null!=(l=null==(u=this._runtimeInstance)?void 0:u.boolean(e[t]))?l:null))return new X(C,this);break;case s.Color:if(null!==(C=null!=(h=null==(c=this._runtimeInstance)?void 0:c.color(e[t]))?h:null))return new K(C,this);break;case s.Trigger:if(null!==(C=null!=(d=null==(f=this._runtimeInstance)?void 0:f.trigger(e[t]))?d:null))return new G(C,this);break;case s.Enum:if(null!==(C=null!=(m=null==(p=this._runtimeInstance)?void 0:p.enum(e[t]))?m:null))return new q(C,this);break;case s.List:if(null!==(C=null!=(g=null==(v=this._runtimeInstance)?void 0:v.list(e[t]))?g:null))return new J(C,this);break;case s.Image:if(null!==(C=null!=(b=null==(y=this._runtimeInstance)?void 0:y.image(e[t]))?b:null))return new Q(C,this);break;case s.Artboard:if(null!==(C=null!=(w=null==(_=this._runtimeInstance)?void 0:_.artboard(e[t]))?w:null))return new Z(C,this)}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n,r=null==(n=this._runtimeInstance)?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,s.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,s.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,s.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,s.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,s.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,s.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,s.List)},e.prototype.image=function(e){return this.propertyFromPath(e,s.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,s.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.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.internalReplaceViewModel(r[r.length-1],t))&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null==(e=this._runtimeInstance)||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null==(e=this._runtimeInstance)||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null==(e=this._runtimeInstance)?void 0:e.getProperties().map(function(e){return p({},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=g([],this._children,!0);this._children.length=0;var n=g([],this._parents,!0);this._parents.length=0,t.forEach(function(t){t.removeParent(e)}),n.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),Y=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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}(H=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}()),z=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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}(H),X=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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}(H),G=function(e){function t(t,n){return e.call(this,t,n)||this}return d(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(H),q=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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}(H),J=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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 $(t,this._parentViewModel):null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(H),K=function(e){function t(t,n){return e.call(this,t,n)||this}return d(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}(H),Q=function(e){function t(t,n){return e.call(this,t,n)||this}return d(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!=(t=null==e?void 0:e.nativeImage)?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(H),Z=function(e){function t(t,n){return e.call(this,t,n)||this}return d(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!=(t=null==e?void 0:e.nativeArtboard)?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(H),ee=function(e){return m(void 0,void 0,void 0,function(){return v(this,function(t){switch(t.label){case 0:return[4,fetch(new Request(e))];case 1:return[4,t.sent().arrayBuffer()];case 2:return[2,t.sent()]}})})},et=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},en={EventManager:L,TaskQueueManager:S},er=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeAudio(e,t)})})];case 1:return t=r.sent(),n=new h.AudioWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},ei=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeImage(e,t)})})];case 1:return t=r.sent(),n=new h.ImageWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},ea=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeFont(e,t)})})];case 1:return t=r.sent(),n=new h.FontWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},el})()}}]);
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.