PageSourceSearch

https://nuvoretail.com/wp-content/plugins/pixfort-core/dist/front/749.1b717686606fe9998e72.js

js nuvoretail.com collected 2026-09-30 18:54:28 UTC 88,354 bytes, 1 lines download raw bytes

1(self.webpackChunkpixfort_core=self.webpackChunkpixfort_core||[]).push([[749],{749:function(t){var e;e=()=>(()=>{"use strict";var t=[,(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var r,i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,n,i=t;function a(){function t(t){const a=r;n=e=0,r=new Map,a.forEach((e=>{try{e(t)}catch(t){console.error(t)}})),this.xa(),i&&i.Ta()}let e=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){e||(e=requestAnimationFrame(t.bind(this)));const a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(t){r.delete(t),e&&0==r.size&&(cancelAnimationFrame(e),e=0)},this.Ra=function(t){a&&(document.body.remove(a),a=null),t||(a=document.createElement("div"),a.style.backgroundColor="black",a.style.position="fixed",a.style.right=0,a.style.top=0,a.style.color="white",a.style.padding="4px",a.innerHTML="RIVE FPS",t=function(t){a.innerHTML="RIVE FPS "+t.toFixed(1)},document.body.appendChild(a)),i=new function(){let e=0,n=0;this.Ta=function(){var r=performance.now();n?(++e,1e3<(r-=n)&&(t(1e3*e/r),e=n=0)):(n=r,e=0)}}},this.Oa=function(){a&&(document.body.remove(a),a=null),i=null},this.xa=function(){}}function o(t){console.assert(!0);const e=new Map;let n=-1/0;this.push=function(r){return r=r+((1<<t)-1)>>t,e.has(r)&&clearTimeout(e.get(r)),e.set(r,setTimeout((function(){e.delete(r),0==e.length?n=-1/0:r==n&&(n=Math.max(...e.keys()),console.assert(n<r))}),1e3)),n=Math.max(r,n),n<<t}}i.ready=new Promise(((t,r)=>{e=t,n=r}));const s=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){s&&s();let t=i.decodeAudio;
1i.decodeAudio=function(e,n){n(e=t(e))};let e=i.decodeFont;i.decodeFont=function(t,n){n(t=e(t))};const n=i.FileAssetLoader;i.ptrToAsset=t=>{let e=i.ptrToFileAsset(t);return e.isImage?i.ptrToImageAsset(t):e.isFont?i.ptrToFontAsset(t):e.isAudio?i.ptrToAudioAsset(t):e},i.CustomFileAssetLoader=n.extend("CustomFileAssetLoader",{__construct:function({loadContents:t}){this.__parent.__construct.call(this),this.Ha=t},loadContents:function(t,e){return t=i.ptrToAsset(t),this.Ha(t,e)}}),i.CDNFileAssetLoader=n.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(t){let e=i.ptrToAsset(t);return""!==(t=e.cdnUuid)&&(n=e.cdnBaseUrl+"/"+t,(r=new XMLHttpRequest).responseType="arraybuffer",r.onreadystatechange=function(){4==r.readyState&&200==r.status&&(t=>{e.decode(new Uint8Array(t.response))})(r)},r.open("GET",n,!0),r.send(null),!0);var n,r}}),i.FallbackFileAssetLoader=n.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.wa=[]},addLoader:function(t){this.wa.push(t)},loadContents:function(t,e){for(let n of this.wa)if(n.loadContents(t,e))return!0;return!1}})};const u="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),c=new function(){function t(){if(!e){var t=document.createElement("canvas"),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=t.getContext("webgl",o),n=1,!s)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(s=t.getContext("webgl2",o))n=2;else{if(!(s=t.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function u(t,e,n){if(e=s.createShader(e),s.shaderSource(e,n),s.compileShader(e),0<((n=s.getShaderInfoLog(e))||"").length)throw n;s.attachShader(t,e)}if(s=new Proxy(s,{get:(t,e)=>t.isContextLost()?(c||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",e),c=!0),"function"==typeof t[e]?function(){}:void 0):"function"==typeof t[e]?function(...n){return t[e].apply(t,n)}:t[e],set(t,e,n){if(!t.isContextLost())return t[e]=n,!0;c||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+e),c=!0)}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE)),u(t=s.createProgram(),s.VERTEX_SHADER,"attribute vec2 vertex;\n                attribute vec2 uv;\n                uniform vec4 mat;\n                uniform vec2 translate;\n                varying vec2 st;\n                void main() {\n                    st = uv;\n                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n                }"),u(t,s.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),s.bindAttribLocation(t,0,"vertex"),s.bindAttribLocation(t,1,"uv"),s.linkProgram(t),0<((o=s.getProgramInfoLog(t))||"").trim().length)throw o;i=s.getUniformLocation(t,"mat"),a=s.getUniformLocation(t,"translate"),s.useProgram(t),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(t,"image"),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e=s}return!0}let e=null,n=0,r=0,i=null,a=null,s=0,u=0,c=!1;t(),this.eb=function(){return t(),r},this.Ma=function(t){e.deleteTexture&&e.deleteTexture(t)},this.La=function(r){if(!t())return null;const i=e.createTexture();return i?(e.bindTexture(e.TEXTURE_2D,i),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),2==n?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.generateMipmap(e.TEXTURE_2D)):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),i):null};const l=new o(8),h=new o(8),f=new o(10),d=new o(10);this.Qa=function(n,r,o,c,p){if(t()){var m=l.push(n),v=h.push(r);if(e.canvas){for(var g of(e.canvas.width==m&&e.canvas.height==v||(e.canvas.width=m,e.canvas.height=v),e.viewport(0,v-r,n,r),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST),o.sort(((t,e)=>
1e.Ba-t.Ba)),m=f.push(c),s!=m&&(e.bufferData(e.ARRAY_BUFFER,8*m,e.DYNAMIC_DRAW),s=m),m=0,o))e.bufferSubData(e.ARRAY_BUFFER,m,g.ia),m+=4*g.ia.length;for(var y of(console.assert(m==4*c),o))e.bufferSubData(e.ARRAY_BUFFER,m,y.Ea),m+=4*y.Ea.length;for(var b of(console.assert(m==8*c),m=d.push(p),u!=m&&(e.bufferData(e.ELEMENT_ARRAY_BUFFER,2*m,e.DYNAMIC_DRAW),u=m),g=0,o))e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,g,b.indices),g+=2*b.indices.length;console.assert(g==2*p),b=0,y=!0,m=g=0;for(const t of o){t.image.da!=b&&(e.bindTexture(e.TEXTURE_2D,t.image.ca||null),b=t.image.da),t.hb?(e.scissor(t.na,v-t.oa-t.va,t.sb,t.va),y=!0):y&&(e.scissor(0,v-r,n,r),y=!1),o=2/n;const s=-2/r;e.uniform4f(i,t.N[0]*o*t.X,t.N[1]*s*t.Y,t.N[2]*o*t.X,t.N[3]*s*t.Y),e.uniform2f(a,t.N[4]*o*t.X+o*(t.na-t.fb*t.X)-1,t.N[5]*s*t.Y+s*(t.oa-t.gb*t.Y)+1),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,m),e.vertexAttribPointer(1,2,e.FLOAT,!1,0,m+4*c),e.drawElements(e.TRIANGLES,t.indices.length,e.UNSIGNED_SHORT,g),m+=4*t.ia.length,g+=2*t.indices.length}console.assert(m==4*c),console.assert(g==2*p)}}},this.canvas=function(){return t()&&e.canvas}},l=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){function t(t){switch(t){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 e(t){return"rgba("+((16711680&t)>>>16)+","+((65280&t)>>>8)+","+((255&t)>>>0)+","+((4278190080&t)>>>24)/255+")"}function n(){0<R.length&&(c.Qa(C.drawWidth(),C.drawHeight(),R,T,E),R=[],E=T=0,C.reset(512,512));for(const t of A){for(const e of t.u)e();t.u=[]}A.clear()}l&&l();var r=i.RenderPaintStyle;const o=i.RenderPath,s=i.RenderPaint,h=i.Renderer,f=i.StrokeCap,d=i.StrokeJoin,p=i.BlendMode,m=r.fill,v=r.stroke,g=i.FillRule.evenOdd;let y=1;var b=i.RenderImage.extend("CanvasRenderImage",{__construct:function({R:t,W:e}={}){this.__parent.__construct.call(this),this.da=y,y=y+1&2147483647||1,this.R=t,this.W=e},__destruct:function(){this.ca&&(c.Ma(this.ca),URL.revokeObjectURL(this.la)),this.__parent.__destruct.call(this)},decode:function(t){var e=this;e.W&&e.W(e);var n=new Image;e.la=URL.createObjectURL(new Blob([t],{type:"image/png"})),n.onload=function(){e.Ga=n,e.ca=c.La(n),e.size(n.width,n.height),e.R&&e.R(e)},n.src=e.la}}),_=o.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.F=new Path2D},rewind:function(){this.F=new Path2D},addPath:function(t,e,n,r,i,a,o){var s=this.F,u=s.addPath;t=t.F;const c=new DOMMatrix;c.a=e,c.b=n,c.c=r,c.d=i,c.e=a,c.f=o,u.call(s,t,c)},fillRule:function(t){this.ka=t},moveTo:function(t,e){this.F.moveTo(t,e)},lineTo:function(t,e){this.F.lineTo(t,e)},cubicTo:function(t,e,n,r,i,a){this.F.bezierCurveTo(t,e,n,r,i,a)},close:function(){this.F.closePath()}}),w=s.extend("CanvasRenderPaint",{color:function(t){this.ma=e(t)},thickness:function(t){this.Ja=t},join:function(t){switch(t){case d.miter:this.ba="miter";break;case d.round:this.ba="round";break;case d.bevel:this.ba="bevel"}},cap:function(t){switch(t){case f.butt:this.aa="butt";break;case f.round:this.aa="round";break;case f.square:this.aa="square"}},style:function(t){this.Ia=t},blendMode:function(e){this.Fa=t(e)},clearGradient:function(){this.P=null},linearGradient:function(t,e,n,r){this.P={Ca:t,Da:e,qa:n,ra:r,ga:[]}},radialGradient:function(t,e,n,r){this.P={Ca:t,Da:e,qa:n,ra:r,ga:[],bb:!0}},addStop:function(t,e){this.P.ga.push({color:t,stop:e})},completeGradient:function(){},draw:function(t,n,r){let i=this.Ia;var a=this.ma,o=this.P;if(t.globalCompositeOperation=this.Fa,null!=o){a=o.Ca;var s=o.Da;const n=o.qa;var u=o.ra;const r=o.ga;o.bb?(o=n-a,u-=s,a=t.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=t.createLinearGradient(a,s,n,u);for(let t=0,n=r.length;t<n;t++)s=r[t],a.addColorStop(s.stop,e(s.color));this.ma=a,this.P=null}switch(i){case v:t.strokeStyle=a,t.lineWidth=this.Ja,t.lineCap=this.aa,t.lineJoin=this.ba,t.stroke(n);break;case m:t.fillStyle=a,t.fill(n,r)}}});const A=new Set;let C=null,R=[],T=0,E=0;var P=i.CanvasRenderer=h.extend("Renderer",{__construct:function(t){this.__parent.__construct.call(this),this.D=[1,0,0,1,0,0],this.o=t.getContext("2d"),this.ja=t,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(){const t=this.D.length-6;if(6>
1t)throw"restore() called without matching save().";this.D.splice(t),this.u.push(this.o.restore.bind(this.o))},transform:function(t,e,n,r,i,a){const o=this.D,s=o.length-6;o.splice(s,6,o[s]*t+o[s+2]*e,o[s+1]*t+o[s+3]*e,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,t,e,n,r,i,a))},rotate:function(t){const e=Math.sin(t);t=Math.cos(t),this.transform(t,e,-e,t,0,0)},_drawPath:function(t,e){this.u.push(e.draw.bind(e,this.o,t.F,t.ka===g?"evenodd":"nonzero"))},_drawRiveImage:function(e,n,r){var i=e.Ga;if(i){var a=this.o,o=t(n);this.u.push((function(){a.globalCompositeOperation=o,a.globalAlpha=r,a.drawImage(i,0,0),a.globalAlpha=1}))}},_getMatrix:function(t){const e=this.D,n=e.length-6;for(let r=0;6>r;++r)t[r]=e[n+r]},_drawImageMesh:function(e,r,a,o,s,u,l,h,f,d){var p=this.o.canvas.width,m=this.o.canvas.height;const v=f-l,g=d-h;l=Math.max(l,0),h=Math.max(h,0),f=Math.min(f,p),d=Math.min(d,m);const y=f-l,b=d-h;if(console.assert(y<=Math.min(v,p)),console.assert(b<=Math.min(g,m)),!(0>=y||0>=b)){f=y<v||b<g,p=d=1;var _=Math.ceil(y*d),w=Math.ceil(b*p);m=c.eb(),_>m&&(d*=m/_,_=m),w>m&&(p*=m/w,w=m),C||(C=new i.DynamicRectanizer(m),C.reset(512,512)),0>(m=C.addRect(_,w))&&(n(),A.add(this),m=C.addRect(_,w),console.assert(0<=m));var P=65535&m,L=m>>16;R.push({N:this.D.slice(this.D.length-6),image:e,na:P,oa:L,fb:l,gb:h,sb:_,va:w,X:d,Y:p,ia:new Float32Array(o),Ea:new Float32Array(s),indices:new Uint16Array(u),hb:f,Ba:e.da<<1|(f?1:0)}),T+=o.length,E+=u.length;var M=this.o,F=t(r);this.u.push((function(){M.save(),M.resetTransform(),M.globalCompositeOperation=F,M.globalAlpha=a;const t=c.canvas();t&&M.drawImage(t,P,L,_,w,l,h,y,b),M.restore()}))}},_clipPath:function(t){this.u.push(this.o.clip.bind(this.o,t.F,t.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(t,e){this.transform(1,0,0,1,t,e)}});i.makeRenderer=function(t){const e=new P(t),n=e.o;return new Proxy(e,{get(t,r){if("function"==typeof t[r])return function(...e){return t[r].apply(t,e)};if("function"==typeof n[r]){if(-1<u.indexOf(r))throw Error("RiveException: Method call to '"+r+"()' is not allowed, as the renderer cannot immediately pass through the return                 values of any canvas 2d context methods.");return function(...t){e.u.push(n[r].bind(n,...t))}}return t[r]},set(t,r,i){if(r in n)return e.u.push((()=>{n[r]=i})),!0}})},i.decodeImage=function(t,e){new b({R:e}).decode(t)},i.renderFactory={makeRenderPaint:function(){return new w},makeRenderPath:function(){return new _},makeRenderImage:function(){let t=M;return new b({W:()=>{t.total++},R:()=>{if(t.loaded++,t.loaded===t.total){const e=t.ready;e&&(e(),t.ready=null)}}})}};let L=i.load,M=null;i.load=function(t,e,n=!0){const r=new i.FallbackFileAssetLoader;return void 0!==e&&r.addLoader(e),n&&(e=new i.CDNFileAssetLoader,r.addLoader(e)),new Promise((function(e){let n=null;M={total:0,loaded:0,ready:function(){e(n)}},n=L(t,r),0==M.total&&e(n)}))},r=new a,i.requestAnimationFrame=r.requestAnimationFrame.bind(r),i.cancelAnimationFrame=r.cancelAnimationFrame.bind(r),i.enableFPSCounter=r.Ra.bind(r),i.disableFPSCounter=r.Oa,r.xa=n,i.resolveAnimationFrame=n,i.cleanup=function(){C&&C.delete()}};var h,f,d=Object.assign({},i),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=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),h=(t,e,n)=>{var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?e(r.response):n()},r.onerror=n,r.send(null)});var y,b=i.print||console.log.bind(console),_=i.printErr||console.error.bind(console);Object.assign(i,d),d=null,i.thisProgram&&(p=i.thisProgram),i.wasmBinary&&(y=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&$("no native wasm support detected");var w,A,C,R,T,E,P,L,M,F,S=!1;function I(){var t=w.buffer;i.HEAP8=C=new Int8Array(t),i.HEAP16=T=new Int16Array(t),i.HEAP32=P=new Int32Array(t),i.HEAPU8=R=new Uint8Array(t),i.HEAPU16=E=new Uint16Array(t),i.HEAPU32=L=new Uint32Array(t),i.HEAPF32=M=new Float32Array(t),i.HEAPF64=F=new Float64Array(t)}var O,x=[],j=[],k=[];function D(){var t=i.preRun.shift();x.unshift(t)}var U,B=0,W=null,N=null;function $(t){throw i.onAbort&&i.onAbort(t),_(t="Aborted("+t+")"),S=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),n(t),t}function Y(t){return t.startsWith("data:application/octet-stream;base64,")}if(!Y(U="canvas_advanced.wasm")){var X=U;U=i.locateFile?i.locateFile(X,g):g+X}function H(t){if(t==U&&y)return new Uint8Array(y);if(f)return f(t);throw"both async and sync fetching of the wasm failed"}function z(t,e,n){return function(t){if(!y&&(m||v)){if("function"==typeof fetch&&!t.startsWith("file://"))return fetch(t,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((()=>H(t)));if(h)return new Promise(((e,n)=>{h(t,(t=>e(new Uint8Array(t))),n)}))}return Promise.resolve().then((()=>H(t)))}(t).then((t=>WebAssembly.instantiate(t,e))).then((t=>t)).then(n,(t=>{_("failed to asynchronously prepare wasm: "+t),$(t)}))}var V=t=>{for(;0<t.length;)t.shift()(i)};function G(t){if(void 0===t)return"_unknown";
1var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t}function q(t,e){return t=G(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function J(){this.G=[void 0],this.ta=[]}var K=new J,Q=void 0;function Z(t){throw new Q(t)}var tt=t=>(t||Z("Cannot use deleted val. handle = "+t),K.get(t).value),et=t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return K.Za({Aa:1,value:t})}};function nt(t){var e=Error,n=q(t,(function(e){this.name=t,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n}var rt=void 0,it=void 0;function at(t){for(var e="";R[t];)e+=it[R[t++]];return e}var ot=[];function st(){for(;ot.length;){var t=ot.pop();t.g.M=!1,t.delete()}}var ut=void 0,ct={};function lt(t,e){for(void 0===e&&Z("ptr should not be undefined");t.l;)e=t.S(e),t=t.l;return e}var ht={};function ft(t){var e=at(t=Fe(t));return Le(t),e}function dt(t,e){var n=ht[t];return void 0===n&&Z(e+" has unknown type "+ft(t)),n}function pt(){}var mt=!1;function vt(t){--t.count.value,0===t.count.value&&(t.s?t.A.H(t.s):t.j.h.H(t.i))}function gt(t,e,n){return e===n?t:void 0===n.l||null===(t=gt(t,e,n.l))?null:n.Pa(t)}var yt={},bt=void 0;function _t(t){throw new bt(t)}function wt(t,e){return e.j&&e.i||_t("makeClassHandle requires ptr and ptrType"),!!e.A!=!!e.s&&_t("Both smartPtrType and smartPtr must be specified"),e.count={value:1},At(Object.create(t,{g:{value:e}}))}function At(t){return"undefined"==typeof FinalizationRegistry?(At=t=>t,t):(mt=new FinalizationRegistry((t=>{vt(t.g)})),pt=t=>{mt.unregister(t)},(At=t=>{var e=t.g;return e.s&&mt.register(t,{g:e},t),t})(t))}var Ct={};function Rt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Tt(t){return this.fromWireType(P[t>>2])}var Et={},Pt={};function Lt(t,e,n){function r(e){(e=n(e)).length!==t.length&&_t("Mismatched type converter count");for(var r=0;r<t.length;++r)Ft(t[r],e[r])}t.forEach((function(t){Pt[t]=e}));var i=Array(e.length),a=[],o=0;e.forEach(((t,e)=>{ht.hasOwnProperty(t)?i[e]=ht[t]:(a.push(t),Et.hasOwnProperty(t)||(Et[t]=[]),Et[t].push((()=>{i[e]=ht[t],++o===a.length&&r(i)})))})),0===a.length&&r(i)}function Mt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Ft(t,e,n={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");!function(t,e,n={}){var r=e.name;if(t||Z(`type "${r}" must have a positive integer typeid pointer`),ht.hasOwnProperty(t)){if(n.ab)return;Z(`Cannot register type '${r}' twice`)}ht[t]=e,delete Pt[t],Et.hasOwnProperty(t)&&(e=Et[t],delete Et[t],e.forEach((t=>t())))}(t,e,n)}function St(t){Z(t.g.j.h.name+" instance already deleted")}function It(){}function Ot(t,e,n){if(void 0===t[e].m){var r=t[e];t[e]=function(){return t[e].m.hasOwnProperty(arguments.length)||Z(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].m})!`),t[e].m[arguments.length].apply(this,arguments)},t[e].m=[],t[e].m[r.L]=r}}function xt(t,e,n){i.hasOwnProperty(t)?((void 0===n||void 0!==i[t].m&&void 0!==i[t].m[n])&&Z(`Cannot register public name '${t}' twice`),Ot(i,t,t),i.hasOwnProperty(n)&&Z(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[t].m[n]=e):(i[t]=e,void 0!==n&&(i[t].tb=n))}function jt(t,e,n,r,i,a,o,s){this.name=t,this.constructor=e,this.B=n,this.H=r,this.l=i,this.Ua=a,this.S=o,this.Pa=s,this.ya=[]}function kt(t,e,n){for(;e!==n;)e.S||Z(`Expected null or instance of ${n.name}, got an instance of ${e.name}`),t=e.S(t),e=e.l;return t}function Dt(t,e){return null===e?(this.ea&&Z(`null is not a valid ${this.name}`),0):(e.g||Z(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.g.i||Z(`Cannot pass deleted object as a pointer of type ${this.name}`),kt(e.g.i,e.g.j.h,this.h))}function Ut(t,e){if(null===e){if(this.ea&&Z(`null is not a valid ${this.name}`),this.V){var n=this.fa();return null!==t&&t.push(this.H,n),n}return 0}if(e.g||Z(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.g.i||Z(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.U&&e.g.j.U&&Z(`Cannot convert argument of type ${e.g.A?e.g.A.name:e.g.j.name} to parameter type ${this.name}`),n=kt(e.g.i,e.g.j.h,this.h),this.V)switch(void 0===e.g.s&&Z("Passing raw pointer to smart pointer is illegal"),this.nb){case 0:e.g.A===this?n=e.g.s:Z(`Cannot convert argument of type ${e.g.A?e.g.A.name:e.g.j.name} to parameter type ${this.name}`);break;case 1:n=e.g.s;break;case 2:if(e.g.A===this)n=e.g.s;else{var r=e.clone();n=this.jb(n,et((function(){r.delete()}))),null!==t&&t.push(this.H,n)}break;default:Z("Unsupporting sharing policy")}return n}function Bt(t,e){return null===e?(this.ea&&Z(`null is not a valid ${this.name}`),0):(e.g||Z(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.g.i||Z(`Cannot pass deleted object as a pointer of type ${this.name}`),e.g.j.U&&Z(`Cannot convert argument of type ${e.g.j.name} to parameter type ${this.name}`),kt(e.g.i,e.g.j.h,this.h))}function Wt(t,e,n,r){this.name=t,this.h=e,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!==e.l?this.toWireType=Ut:(this.toWireType=r?Dt:Bt,this.v=null)}function Nt(t,e,n){i.hasOwnProperty(t)||_t("Replacing nonexistant public symbol"),void 0!==i[t].m&&void 0!==n?i[t].m[n]=e:(i[t]=e,i[t].L=n)}var $t=[],Yt=t=>{var e=$t[t];return e||(t>=$t.length&&($t.length=t+1),$t[t]=e=O.get(t)),e};function Xt(t,e){var n=(t=at(t)).includes("j")?((t,e)=>{var n=[];return function(){if(n.length=0,Object.assign(n,arguments),t.includes("j")){var r=i["dynCall_"+t];r=n&&n.length?r.apply(null,[e].concat(n)):r.call(null,e)}else r=Yt(e).apply(null,n);return r}})(t,e):Yt(e);return"function"!=typeof n&&Z(`unknown function pointer with signature ${t}: ${e}`),n}var Ht=void 0;function zt(t,e){var n=[],r={};throw e.forEach((function t(e){r[e]||ht[e]||(Pt[e]?Pt[e].forEach(t):(n.push(e),r[e]=!0))})),new Ht(`${t}: `+n.map(ft).join([", "]))}function Vt(t,e,n,r,i){var a=e.length;2>a&&Z("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==e[1]&&null!==n,s=!1;for(n=1;n<e.length;++n)if(null!==e[n]&&void 0===e[n].v){s=!0;break}var u="void"!==e[0].name,c=a-2,l=Array(c),h=[],f=[];return function(){if(arguments.length!==c&&Z(`function ${t} called with ${arguments.length} arguments, expected ${c} args!`),f.length=0,h.length=o?2:1,h[0]=i,o){var n=e[1].toWireType(f,this);h[1]=n}for(var a=0;a<c;++a)l[a]=e[a+2].toWireType(f,arguments[a]),h.push(l[a]);if(a=r.apply(null,h),s)Rt(f);else for(var d=o?1:2;d<e.length;d++){var p=1===d?n:l[d-2];null!==e[d].v&&e[d].v(p)}return n=u?e[0].fromWireType(a):void 0}}function Gt(t,e){for(var n=[],r=0;r<t;r++)n.push(L[e+4*r>>2]);return n}function qt(t,e,n){return t instanceof Object||Z(`${n}
1 with invalid "this": ${t}`),t instanceof e.h.constructor||Z(`${n} incompatible with "this" of type ${t.constructor.name}`),t.g.i||Z(`cannot call emscripten binding method ${n} on deleted object`),kt(t.g.i,t.g.j.h,e.h)}function Jt(t){t>=K.ua&&0==--K.get(t).Aa&&K.$a(t)}function Kt(t,e,n){switch(e){case 0:return function(t){return this.fromWireType((n?C:R)[t])};case 1:return function(t){return this.fromWireType((n?T:E)[t>>1])};case 2:return function(t){return this.fromWireType((n?P:L)[t>>2])};default:throw new TypeError("Unknown integer type: "+t)}}function Qt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Zt(t,e){switch(e){case 2:return function(t){return this.fromWireType(M[t>>2])};case 3:return function(t){return this.fromWireType(F[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function te(t,e,n){switch(e){case 0:return n?function(t){return C[t]}:function(t){return R[t]};case 1:return n?function(t){return T[t>>1]}:function(t){return E[t>>1]};case 2:return n?function(t){return P[t>>2]}:function(t){return L[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ee=(t,e,n,r)=>{if(0<r){r=n+r-1;for(var i=0;i<t.length;++i){var a=t.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),127>=a){if(n>=r)break;e[n++]=a}else{if(2047>=a){if(n+1>=r)break;e[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;e[n++]=224|a>>12}else{if(n+3>=r)break;e[n++]=240|a>>18,e[n++]=128|a>>12&63}e[n++]=128|a>>6&63}e[n++]=128|63&a}}e[n]=0}},ne=t=>{for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);127>=r?e++:2047>=r?e+=2:55296<=r&&57343>=r?(e+=4,++n):e+=3}return e},re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(t,e,n)=>{var r=e+n;for(n=e;t[n]&&!(n>=r);)++n;if(16<n-e&&t.buffer&&re)return re.decode(t.subarray(e,n));for(r="";e<n;){var i=t[e++];if(128&i){var a=63&t[e++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&t[e++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&t[e++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},ae="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,oe=(t,e)=>{for(var n=t>>1,r=n+e/2;!(n>=r)&&E[n];)++n;if(32<(n<<=1)-t&&ae)return ae.decode(R.subarray(t,n));for(n="",r=0;!(r>=e/2);++r){var i=T[t+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},se=(t,e,n)=>{if(void 0===n&&(n=2147483647),2>n)return 0;var r=e;n=(n-=2)<2*t.length?n/2:t.length;for(var i=0;i<n;++i)T[e>>1]=t.charCodeAt(i),e+=2;return T[e>>1]=0,e-r},ue=t=>2*t.length,ce=(t,e)=>{for(var n=0,r="";!(n>=e/4);){var i=P[t+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},le=(t,e,n)=>{if(void 0===n&&(n=2147483647),4>n)return 0;var r=e;n=r+n-4;for(var i=0;i<t.length;++i){var a=t.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),P[e>>2]=a,(e+=4)+4>n)break}return P[e>>2]=0,e-r},he=t=>{for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);55296<=r&&57343>=r&&++n,e+=4}return e},fe={};function de(t){var e=fe[t];return void 0===e?at(t):e}var pe,me=[],ve=[],ge={},ye=()=>{if(!pe){var t,e={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(t in ge)void 0===ge[t]?delete e[t]:e[t]=ge[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);pe=n}return pe},be=[null,[],[]],_e=t=>0==t%4&&(0!=t%100||0==t%400),we=[31,29,31,30,31,30,31,31,30,31,30,31],Ae=[31,28,31,30,31,30,31,31,30,31,30,31],Ce=(t,e,n,r)=>{function i(t,e,n){for(t="number"==typeof t?t.toString():t||"";t.length<e;)t=n[0]+t;return t}function a(t,e){return i(t,e,"0")}function o(t,e){function n(t){return 0>t?-1:0<t?1:0}var r;return 0===(r=n(t.getFullYear()-e.getFullYear()))&&0===(r=n(t.getMonth()-e.getMonth()))&&(r=n(t.getDate()-e.getDate())),r}function s(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function u(t){var e=t.J;for(t=new Date(new Date(t.K+1900,0,1).getTime());0<e;){var n=t.getMonth(),r=(_e(t.getFullYear())?we:Ae)[n];if(!(e>r-t.getDate())){t.setDate(t.getDate()+e);break}e-=r-t.getDate()+1,t.setDate(1),11>n?t.setMonth(n+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return n=new Date(t.getFullYear()+1,0,4),e=s(new Date(t.getFullYear(),0,4)),n=s(n),0>=o(e,t)?0>=o(n,t)?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var c=P[r+40>>2];for(var l in r={qb:P[r>>2],pb:P[r+4>>2],Z:P[r+8>>2],ha:P[r+12>>2],$:P[r+16>>2],K:P[r+20>>2],C:P[r+24>>2],J:P[r+28>>2],ub:P[r+32>>2],ob:P[r+36>>2],rb:c&&c?ie(R,c):""},n=n?ie(R,n):"",c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(l,"g"),c[l]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),f="January February March April May June July August September October November December".split(" ");for(l in c={"%a":t=>h[t.C].substring(0,3),"%A":t=>h[t.C],"%b":t=>f[t.$].substring(0,3),"%B":t=>f[t.$],"%C":t=>a((t.K+1900)/100|0,2),"%d":t=>a(t.ha,2),"%e":t=>i(t.ha,2," "),"%g":t=>u(t).toString().substring(2),"%G":t=>u(t),"%H":t=>a(t.Z,2),"%I":t=>(0==(t=t.Z)?t=12:12<t&&(t-=12),a(t,2)),"%j":t=>{for(var e=0,n=0;n<=t.$-1;e+=(_e(t.K+1900)?we:Ae)[n++]);return a(t.ha+e,3)},"%m":t=>a(t.$+1,2),"%M":t=>a(t.pb,2),"%n":()=>"\n","%p":t=>0<=t.Z&&12>t.Z?"AM":"PM","%S":t=>a(t.qb,2),"%t":()=>"\t","%u":t=>t.C||7,"%U":t=>a(Math.floor((t.J+7-t.C)/7),2),"%V":t=>{var e=Math.floor((t.J+7-(t.C+6)%7)/7);if(2>=(t.C+371-t.J-2)%7&&e++,e)53==e&&(4==(n=(t.C+371-t.J)%7)||3==n&&_e(t.K)||(e=1));else{e=52;var n=(t.C+7-t.J-1)%7;(4==n||5==n&&_e(t.K%400-1))&&e++}return a(e,2)},"%w":t=>t.C,"%W":t=>a(Math.floor((t.J+7-(t.C+6)%7)/7),2),"%y":t=>(t.K+1900).toString().substring(2),"%Y":t=>t.K+1900,"%z":t=>{var e=0<=(t=t.ob);return t=Math.abs(t)/60,(e?"+":"-")+String("0000"+(t/60*100+t%60)).slice(-4)},"%Z":t=>t.rb,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),c)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),c[l](r)));return l=function(t){var e=Array(ne(t)+1);return ee(t,e,0,e.length),e}(n=n.replace(/\0\0/g,"%")),l.length>e?0:(C.set(l,t),l.length-1)};Object.assign(J.prototype,{get(t){return this.G[t]},has(t){return void 0!==this.G[t]},Za(t){var e=this.ta.pop()||this.G.length;return this.G[e]=t,e},$a(t){this.G[t]=void 0,this.ta.push(t)}}
1),Q=i.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},K.G.push({value:void 0},{value:null},{value:!0},{value:!1}),K.ua=K.G.length,i.count_emval_handles=function(){for(var t=0,e=K.ua;e<K.G.length;++e)void 0!==K.G[e]&&++t;return t},rt=i.PureVirtualError=nt("PureVirtualError");for(var Re=Array(256),Te=0;256>Te;++Te)Re[Te]=String.fromCharCode(Te);it=Re,i.getInheritedInstanceCount=function(){return Object.keys(ct).length},i.getLiveInheritedInstances=function(){var t,e=[];for(t in ct)ct.hasOwnProperty(t)&&e.push(ct[t]);return e},i.flushPendingDeletes=st,i.setDelayFunction=function(t){ut=t,ot.length&&ut&&ut(st)},bt=i.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},It.prototype.isAliasOf=function(t){if(!(this instanceof It&&t instanceof It))return!1;var e=this.g.j.h,n=this.g.i,r=t.g.j.h;for(t=t.g.i;e.l;)n=e.S(n),e=e.l;for(;r.l;)t=r.S(t),r=r.l;return e===r&&n===t},It.prototype.clone=function(){if(this.g.i||St(this),this.g.O)return this.g.count.value+=1,this;var t=At,e=Object,n=e.create,r=Object.getPrototypeOf(this),i=this.g;return(t=t(n.call(e,r,{g:{value:{count:i.count,M:i.M,O:i.O,i:i.i,j:i.j,s:i.s,A:i.A}}}))).g.count.value+=1,t.g.M=!1,t},It.prototype.delete=function(){this.g.i||St(this),this.g.M&&!this.g.O&&Z("Object already scheduled for deletion"),pt(this),vt(this.g),this.g.O||(this.g.s=void 0,this.g.i=void 0)},It.prototype.isDeleted=function(){return!this.g.i},It.prototype.deleteLater=function(){return this.g.i||St(this),this.g.M&&!this.g.O&&Z("Object already scheduled for deletion"),ot.push(this),1===ot.length&&ut&&ut(st),this.g.M=!0,this},Wt.prototype.Va=function(t){return this.za&&(t=this.za(t)),t},Wt.prototype.pa=function(t){this.H&&this.H(t)},Wt.prototype.argPackAdvance=8,Wt.prototype.readValueFromPointer=Tt,Wt.prototype.deleteObject=function(t){null!==t&&t.delete()},Wt.prototype.fromWireType=function(t){function e(){return this.V?wt(this.h.B,{j:this.ib,i:n,A:this,s:t}):wt(this.h.B,{j:this,i:t})}var n=this.Va(t);if(!n)return this.pa(t),null;var r=function(t,e){return e=lt(t,e),ct[e]}(this.h,n);if(void 0!==r)return 0===r.g.count.value?(r.g.i=n,r.g.s=t,r.clone()):(r=r.clone(),this.pa(t),r);if(r=this.h.Ua(n),!(r=yt[r]))return e.call(this);r=this.U?r.Ka:r.pointerType;var i=gt(n,this.h,r.h);return null===i?e.call(this):this.V?wt(r.h.B,{j:r,i,A:this,s:t}):wt(r.h.B,{j:r,i})},Ht=i.UnboundTypeError=nt("UnboundTypeError");var Ee={_embind_create_inheriting_constructor:function(t,e,n){t=at(t),e=dt(e,"wrapper"),n=tt(n);var r=[].slice,i=e.h,a=i.B,o=i.l.B,s=i.l.constructor;for(var u in t=q(t,(function(){i.l.ya.forEach(function(t){if(this[t]===o[t])throw new rt(`Pure virtual function ${t} 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&&Z("Pass correct 'this' to __construct");var t=s.implement.apply(void 0,[this].concat(r.call(arguments)));pt(t);var e=t.g;t.notifyOnDestruction(),e.O=!0,Object.defineProperties(this,{g:{value:e}}),At(this),t=e.i,t=lt(i,t),ct.hasOwnProperty(t)?Z(`Tried to register registered instance: ${t}`):ct[t]=this},a.__destruct=function(){this===a&&Z("Pass correct 'this' to __destruct"),pt(this);var t=this.g.i;t=lt(i,t),ct.hasOwnProperty(t)?delete ct[t]:Z(`Tried to unregister unregistered instance: ${t}`)},t.prototype=Object.create(a),n)t.prototype[u]=n[u];return et(t)},_embind_finalize_value_object:function(t){var e=Ct[t];delete Ct[t];var n=e.fa,r=e.H,i=e.sa;Lt([t],i.map((t=>t.Ya)).concat(i.map((t=>t.lb))),(t=>{var a={};return i.forEach(((e,n)=>{var r=t[n],o=e.Wa,s=e.Xa,u=t[n+i.length],c=e.kb,l=e.mb;a[e.Sa]={read:t=>r.fromWireType(o(s,t)),write:(t,e)=>{var n=[];c(l,t,u.toWireType(n,e)),Rt(n)}}})),[{name:e.name,fromWireType:function(t){var e,n={};for(e in a)n[e]=a[e].read(t);return r(t),n},toWireType:function(t,e){for(var i in a)if(!(i in e))throw new TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,e[i]);return null!==t&&t.push(r,o),o},argPackAdvance:8,readValueFromPointer:Tt,v:r}]}))},_embind_register_bigint:function(){},_embind_register_bool:function(t,e,n,r,i){var a=Mt(n);Ft(t,{name:e=at(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:i},argPackAdvance:8,readValueFromPointer:function(t){if(1===n)var r=C;else if(2===n)r=T;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+e);r=P}return this.fromWireType(r[t>>a])},v:null})},_embind_register_class:function(t,e,n,r,i,a,o,s,u,c,l,h,f){l=at(l),a=Xt(i,a),s&&(s=Xt(o,s)),c&&(c=Xt(u,c)),f=Xt(h,f);var d=G(l);xt(d,(function(){zt(`Cannot construct ${l} due to unbound types`,[r])})),Lt([t,e,n],r?[r]:[],(function(e){if(e=e[0],r)var n=e.h,i=n.B;else i=It.prototype;e=q(d,(function(){if(Object.getPrototypeOf(this)!==o)throw new Q("Use 'new' to construct "+l);if(void 0===u.I)throw new Q(l+" has no accessible constructor");var t=u.I[arguments.length];if(void 0===t)throw new Q(`Tried to invoke ctor of ${l}
1 with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.I).toString()}) parameters instead!`);return t.apply(this,arguments)}));var o=Object.create(i,{constructor:{value:e}});e.prototype=o;var u=new jt(l,e,o,f,n,a,s,c);u.l&&(void 0===u.l.T&&(u.l.T=[]),u.l.T.push(u)),n=new Wt(l,u,!0,!1),i=new Wt(l+"*",u,!1,!1);var h=new Wt(l+" const*",u,!1,!0);return yt[t]={pointerType:i,Ka:h},Nt(d,e),[n,i,h]}))},_embind_register_class_class_function:function(t,e,n,r,i,a,o){var s=Gt(n,r);e=at(e),a=Xt(i,a),Lt([],[t],(function(t){function r(){zt(`Cannot call ${i} due to unbound types`,s)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]);var u=t.h.constructor;return void 0===u[e]?(r.L=n-1,u[e]=r):(Ot(u,e,i),u[e].m[n-1]=r),Lt([],s,(function(r){if(r=Vt(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[e].m?(r.L=n-1,u[e]=r):u[e].m[n-1]=r,t.h.T)for(const n of t.h.T)n.constructor.hasOwnProperty(e)||(n.constructor[e]=r);return[]})),[]}))},_embind_register_class_class_property:function(t,e,n,r,i,a,o,s){e=at(e),a=Xt(i,a),Lt([],[t],(function(t){var i=`${(t=t[0]).name}.${e}`,u={get(){zt(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{zt(`Cannot access ${i} due to unbound types`,[n])}:()=>{Z(`${i} is a read-only property`)},Object.defineProperty(t.h.constructor,e,u),Lt([],[n],(function(n){n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=Xt(o,s),i.set=t=>{var e=[];s(r,n.toWireType(e,t)),Rt(e)}),Object.defineProperty(t.h.constructor,e,i),[]})),[]}))},_embind_register_class_constructor:function(t,e,n,r,i,a){var o=Gt(e,n);i=Xt(r,i),Lt([],[t],(function(t){var n=`constructor ${(t=t[0]).name}`;if(void 0===t.h.I&&(t.h.I=[]),void 0!==t.h.I[e-1])throw new Q(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.h.I[e-1]=()=>{zt(`Cannot construct ${t.name} due to unbound types`,o)},Lt([],o,(function(r){return r.splice(1,0,null),t.h.I[e-1]=Vt(n,r,null,i,a),[]})),[]}))},_embind_register_class_function:function(t,e,n,r,i,a,o,s){var u=Gt(n,r);e=at(e),a=Xt(i,a),Lt([],[t],(function(t){function r(){zt(`Cannot call ${i} due to unbound types`,u)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.h.ya.push(e);var c=t.h.B,l=c[e];return void 0===l||void 0===l.m&&l.className!==t.name&&l.L===n-2?(r.L=n-2,r.className=t.name,c[e]=r):(Ot(c,e,i),c[e].m[n-2]=r),Lt([],u,(function(r){return r=Vt(i,r,t,a,o),void 0===c[e].m?(r.L=n-2,c[e]=r):c[e].m[n-2]=r,[]})),[]}))},_embind_register_class_property:function(t,e,n,r,i,a,o,s,u,c){e=at(e),i=Xt(r,i),Lt([],[t],(function(t){var r=`${(t=t[0]).name}.${e}`,l={get(){zt(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return l.set=u?()=>{zt(`Cannot access ${r} due to unbound types`,[n,o])}:()=>{Z(r+" is a read-only property")},Object.defineProperty(t.h.B,e,l),Lt([],u?[n,o]:[n],(function(n){var o=n[0],l={get(){var e=qt(this,t,r+" getter");return o.fromWireType(i(a,e))},enumerable:!0};if(u){u=Xt(s,u);var h=n[1];l.set=function(e){var n=qt(this,t,r+" setter"),i=[];u(c,n,h.toWireType(i,e)),Rt(i)}}return Object.defineProperty(t.h.B,e,l),[]})),[]}))},_embind_register_emval:function(t,e){Ft(t,{name:e=at(e),fromWireType:function(t){var e=tt(t);return Jt(t),e},toWireType:function(t,e){return et(e)},argPackAdvance:8,readValueFromPointer:Tt,v:null})},_embind_register_enum:function(t,e,n,r){function i(){}n=Mt(n),e=at(e),i.values={},Ft(t,{name:e,constructor:i,fromWireType:function(t){return this.constructor.values[t]},toWireType:function(t,e){return e.value},argPackAdvance:8,readValueFromPointer:Kt(e,n,r),v:null}),xt(e,i)},_embind_register_enum_value:function(t,e,n){var r=dt(t,"enum");e=at(e),t=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:q(`${r.name}_${e}`,(function(){}))}}),t.values[n]=r,t[e]=r},_embind_register_float:function(t,e,n){n=Mt(n),Ft(t,{name:e=at(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Zt(e,n),v:null})},_embind_register_function:function(t,e,n,r,i,a){var o=Gt(e,n);t=at(t),i=Xt(r,i),xt(t,(function(){zt(`Cannot call ${t} due to unbound types`,o)}),e-1),Lt([],o,(function(n){return Nt(t,Vt(t,[n[0],null].concat(n.slice(1)),null,i,a),e-1),[]}))},_embind_register_integer:function(t,e,n,r,i){e=at(e),-1===i&&(i=4294967295),i=Mt(n);var a=t=>t;if(0===r){var o=32-8*n;a=t=>t<<o>>>o}n=e.includes("unsigned")?function(t,e){return e>>>0}:function(t,e){return e},Ft(t,{name:e,fromWireType:a,toWireType:n,argPackAdvance:8,readValueFromPointer:te(e,i,0!==r),v:null})},_embind_register_memory_view:function(t,e,n){function r(t){t>>=2;var e=L;return new i(e.buffer,e[t+1],e[t])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
1][e];Ft(t,{name:n=at(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ab:!0})},_embind_register_std_string:function(t,e){var n="std::string"===(e=at(e));Ft(t,{name:e,fromWireType:function(t){var e=L[t>>2],r=t+4;if(n)for(var i=r,a=0;a<=e;++a){var o=r+a;if(a==e||0==R[o]){if(i=i?ie(R,i,o-i):"",void 0===s)var s=i;else s+=String.fromCharCode(0),s+=i;i=o+1}}else{for(s=Array(e),a=0;a<e;++a)s[a]=String.fromCharCode(R[r+a]);s=s.join("")}return Le(t),s},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;r||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Z("Cannot pass non-string to std::string");var i=n&&r?ne(e):e.length,a=Me(4+i+1),o=a+4;if(L[a>>2]=i,n&&r)ee(e,R,o,i+1);else if(r)for(r=0;r<i;++r){var s=e.charCodeAt(r);255<s&&(Le(o),Z("String has UTF-16 code units that do not fit in 8 bits")),R[o+r]=s}else for(r=0;r<i;++r)R[o+r]=e[r];return null!==t&&t.push(Le,a),a},argPackAdvance:8,readValueFromPointer:Tt,v:function(t){Le(t)}})},_embind_register_std_wstring:function(t,e,n){if(n=at(n),2===e)var r=oe,i=se,a=ue,o=()=>E,s=1;else 4===e&&(r=ce,i=le,a=he,o=()=>L,s=2);Ft(t,{name:n,fromWireType:function(t){for(var n,i=L[t>>2],a=o(),u=t+4,c=0;c<=i;++c){var l=t+4+c*e;c!=i&&0!=a[l>>s]||(u=r(u,l-u),void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),u=l+e)}return Le(t),n},toWireType:function(t,r){"string"!=typeof r&&Z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),u=Me(4+o+e);return L[u>>2]=o>>s,i(r,u+4,o+e),null!==t&&t.push(Le,u),u},argPackAdvance:8,readValueFromPointer:Tt,v:function(t){Le(t)}})},_embind_register_value_object:function(t,e,n,r,i,a){Ct[t]={name:at(e),fa:Xt(n,r),H:Xt(i,a),sa:[]}},_embind_register_value_object_field:function(t,e,n,r,i,a,o,s,u,c){Ct[t].sa.push({Sa:at(e),Ya:n,Wa:Xt(r,i),Xa:a,lb:o,kb:Xt(s,u),mb:c})},_embind_register_void:function(t,e){Ft(t,{cb:!0,name:e=at(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(t,e,n){t=tt(t),e=dt(e,"emval::as");var r=[],i=et(r);return L[n>>2]=i,e.toWireType(r,t)},_emval_call_method:function(t,e,n,r,i){t=me[t],e=tt(e),n=de(n);var a=[];return L[r>>2]=et(a),t(e,n,a,i)},_emval_call_void_method:function(t,e,n,r){(t=me[t])(e=tt(e),n=de(n),null,r)},_emval_decref:Jt,_emval_get_method_caller:function(t,e){var n=function(t,e){for(var n=Array(t),r=0;r<t;++r)n[r]=dt(L[e+4*r>>2],"parameter "+r);return n}(t,e),r=n[0];e=r.name+"_$"+n.slice(1).map((function(t){return t.name})).join("_")+"$";var i=ve[e];if(void 0!==i)return i;var a=Array(t-1);return i=function(t){var e=me.length;return me.push(t),e}(((e,i,o,s)=>{for(var u=0,c=0;c<t-1;++c)a[c]=n[c+1].readValueFromPointer(s+u),u+=n[c+1].argPackAdvance;for(e=e[i].apply(e,a),c=0;c<t-1;++c)n[c+1].Na&&n[c+1].Na(a[c]);if(!r.cb)return r.toWireType(o,e)})),ve[e]=i},_emval_get_module_property:function(t){return t=de(t),et(i[t])},_emval_get_property:function(t,e){return t=tt(t),e=tt(e),et(t[e])},_emval_incref:function(t){4<t&&(K.get(t).Aa+=1)},_emval_new_cstring:function(t){return et(de(t))},_emval_new_object:function(){return et({})},_emval_run_destructors:function(t){Rt(tt(t)),Jt(t)},_emval_set_property:function(t,e,n){t=tt(t),e=tt(e),n=tt(n),t[e]=n},_emval_take_value:function(t,e){return t=(t=dt(t,"_emval_take_value")).readValueFromPointer(e),et(t)},abort:()=>{$("")},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(t,e,n)=>R.copyWithin(t,e,e+n),emscripten_resize_heap:t=>{var e=R.length;if(2147483648<(t>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=e*(1+.2/n);r=Math.min(r,t+100663296);var i=Math;r=Math.max(t,r);t:{i=i.min.call(i,2147483648,r+(65536-r%65536)%65536)-w.buffer.byteLength+65535>>>16;try{w.grow(i),I();var a=1;break t}catch(t){}a=void 0}if(a)return!0}return!1},environ_get:(t,e)=>{var n=0;return ye().forEach((function(r,i){var a=e+n;for(i=L[t+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:(t,e)=>{var n=ye();L[t>>2]=n.length;var r=0;return n.forEach((function(t){r+=t.length+1})),L[e>>2]=r,0},fd_close:()=>52,fd_seek:function(){return 70},fd_write:(t,e,n,r)=>{for(var i=0,a=0;a<n;a++){var o=L[e>>2],s=L[e+4>>2];e+=8;for(var u=0;u<s;u++){var c=R[o+u],l=be[t];0===c||10===c?((1===t?b:_)(ie(l,0)),l.length=0):l.push(c)}i+=s}return L[r>>2]=i,0},strftime_l:(t,e,n,r)=>Ce(t,e,n,r)};!function(){function t(t){if(A=t=t.exports,w=A.memory,I(),O=A.__indirect_function_table,j.unshift(A.__wasm_call_ctors),B--,i.monitorRunDependencies&&i.monitorRunDependencies(B),0==B&&(null!==W&&(clearInterval(W),W=null),N)){var e=N;N=null,e()}return t}var e={env:Ee,wasi_snapshot_preview1:Ee};if(B++,i.monitorRunDependencies&&i.monitorRunDependencies(B),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(t){_("Module.instantiateWasm callback failed with error: "+t),n(t)}(function(t,e){var n=U;return y||"function"!=typeof WebAssembly.instantiateStreaming||Y(n)||n.startsWith("file://")||"function"!=typeof fetch?z(n,t,e):fetch(n,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(e,(function(r){return _("wasm streaming compile failed: "+r),_("falling back to ArrayBuffer instantiation"),z(n,t,e)}))))})(e,(function(e){t(e.instance)})).catch(n)}();var Pe,Le=t=>(Le=A.free)(t),Me=t=>(Me=A.malloc)(t),Fe=t=>(Fe=A.__getTypeName)(t);function Se(){function t(){if(!Pe&&(Pe=!0,i.calledRun=!0,!S)){if(V(j),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRu
1n)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var t=i.postRun.shift();k.unshift(t)}V(k)}}if(!(0<B)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)D();V(x),0<B||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),t()}),1)):t())}}if(i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=A._embind_initialize_bindings)(),i.dynCall_jiji=(t,e,n,r,a)=>(i.dynCall_jiji=A.dynCall_jiji)(t,e,n,r,a),i.dynCall_viijii=(t,e,n,r,a,o,s)=>(i.dynCall_viijii=A.dynCall_viijii)(t,e,n,r,a,o,s),i.dynCall_iiiiij=(t,e,n,r,a,o,s)=>(i.dynCall_iiiiij=A.dynCall_iiiiij)(t,e,n,r,a,o,s),i.dynCall_iiiiijj=(t,e,n,r,a,o,s,u,c)=>(i.dynCall_iiiiijj=A.dynCall_iiiiijj)(t,e,n,r,a,o,s,u,c),i.dynCall_iiiiiijj=(t,e,n,r,a,o,s,u,c,l)=>(i.dynCall_iiiiiijj=A.dynCall_iiiiiijj)(t,e,n,r,a,o,s,u,c,l),N=function t(){Pe||Se(),Pe||(N=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return Se(),t.ready});const a=i},t=>{t.exports=JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.19.5","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}}')},(t,e,n)=>{n.r(e),n.d(e,{Animation:()=>r.Animation});var r=n(4)},(t,e,n)=>{n.r(e),n.d(e,{Animation:()=>r});var r=function(){function t(t,e,n,r){this.animation=t,this.artboard=e,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(t,e)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this.instance.time},set:function(t){this.instance.time=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needsScrub",{get:function(){return null!==this.scrubTo},enumerable:!1,configurable:!0}),t.prototype.advance=function(t){null===this.scrubTo?this.instance.advance(t):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},t.prototype.apply=function(t){this.instance.apply(t)},t.prototype.cleanup=function(){this.instance.delete()},t}()},(t,e,n)=>{n.r(e),n.d(e,{BLANK_URL:()=>i.BLANK_URL,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(6),i=n(7)},(t,e,n)=>{n.r(e),n.d(e,{registerTouchInteractions:()=>r});var r=function(t){var e=t.canvas,n=t.artboard,r=t.stateMachines,i=void 0===r?[]:r,a=t.renderer,o=t.rive,s=t.fit,u=t.alignment,c=t.isTouchScrollEnabled,l=void 0!==c&&c;if(!(e&&i.length&&a&&o&&n&&"undefined"!=typeof window))return null;var h=null,f=!1,d=function(t){if(f&&t instanceof MouseEvent)"mouseup"==t.type&&(f=!1);else{f=l&&"touchend"===t.type&&"touchstart"===h,h=t.type;var e=t.currentTarget.getBoundingClientRect(),r=function(t,e){var n,r;return["touchstart","touchmove"].indexOf(t.type)>-1&&(null===(n=t.touches)||void 0===n?void 0:n.length)?(e||t.preventDefault(),{clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}):"touchend"===t.type&&(null===(r=t.changedTouches)||void 0===r?void 0:r.length)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:{clientX:t.clientX,clientY:t.clientY}}(t,l),a=r.clientX,c=r.clientY;if(a||c){var d=a-e.left,p=c-e.top,m=o.computeAlignment(s,u,{minX:0,minY:0,maxX:e.width,maxY:e.height},n.bounds),v=new o.Mat2D;m.invert(v);var g=new o.Vec2D(d,p),y=o.mapXY(v,g),b=y.x(),_=y.y();switch(y.delete(),v.delete(),g.delete(),m.delete(),t.type){case"mouseout":for(var w=0,A=i;w<A.length;w++)A[w].pointerMove(b<0?b-1e4:b+1e4,_<0?_-1e4:_+1e4);break;case"touchmove":case"mouseover":case"mousemove":for(var C=0,R=i;C<R.length;C++)R[C].pointerMove(b,_);break;case"touchstart":case"mousedown":for(var T=0,E=i;T<E.length;T++)E[T].pointerDown(b,_);break;case"touchend":case"mouseup":for(var P=0,L=i;P<L.length;P++)L[P].pointerUp(b,_)}}}}.bind(void 0);return e.addEventListener("mouseover",d),e.addEventListener("mouseout",d),e.addEventListener("mousemove",d),e.addEventListener("mousedown",d),e.addEventListener("mouseup",d),e.addEventListener("touchmove",d,{passive:l}),e.addEventListener("touchstart",d,{passive:l}),e.addEventListener("touchend",d),function(){e.removeEventListener("mouseover",d),e.removeEventListener("mouseout",d),e.removeEventListener("mousemove",d),e.removeEventListener("mousedown",d),e.removeEventListener("mouseup",d),e.removeEventListener("touchmove",d),e.removeEventListener("touchstart",d),e.removeEventListener("touchend",d)}}},(t,e,n)=>{n.r(e),n.d(e,{BLANK_URL:()=>c,sanitizeUrl:()=>l});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,u=[".","/"],c="about:blank";function l(t){if(!t)return c;var e,n=(e=t,e.replace(o,"").replace(i,(function(t,e){return String.fromCharCode(e)}))).replace(a,"").replace(o,"").trim();if(!n)return c;if(function(t){return u.indexOf(t[0])>-1}(n))return n;var l=n.match(s);if(!l)return n;var h=l[0];return r.test(h)?c:n}}],e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>i,EventType:()=>g,Fit:()=>e,Layout:()=>d,LoopType:()=>y,Rive:()=>F,RiveEventType:()=>m,RiveFile:()=>M,RuntimeLoader:()=>p,StateMachineInput:()=>v,StateMachineInputType:()=>f,Testing:()=>O,decodeAudio:()=>x,decodeFont:()=>k,decodeImage:()=>j});var t,e,i,a=n(1),o=n(2),s=n(3),u=n(5),c=(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),l=function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{u(r.next(t))}catch(t){a(t)}}function s(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}u((r=r.apply(t,e||[])).next())}))},h=function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};!function(t){t.Cover="cover",t.Contain="contain",t.Fill="fill",t.FitWidth="fitWidth",t.FitHeight="fitHeight",t.None="none",t.ScaleDown="scaleDown"}(e||(e={})),function(t){t.Center="center",t.TopLeft="topLeft",t.TopCenter="topCenter",t.TopRight="topRight",t.CenterLeft="centerLeft",t.CenterRight="centerRight",t.BottomLeft="bottomLeft",t.BottomCenter="bottomCenter",t.BottomRight="bottomRight"}(i||(i={}));var f,d=function(){function t(t){var n,r,a,o,s,u;this.fit=null!==(n=null==t?void 0:t.fit)&&void 0!==n?n:e.Contain,this.alignment=null!==(r=null==t?void 0:t.alignment)&&void 0!==r?r:i.Center,this.minX=null!==(a=null==t?void 0:t.minX)&&void 0!==a?a:0,this.minY=null!==(o=null==t?void 0:t.minY)&&void 0!==o?o:0,this.maxX=null!==(s=null==t?void 0:t.maxX)&&void 0!==s?s:0,this.maxY=null!==(u=null==t?void 0:t.maxY)&&void 0!==u?u:0}return t.new=function(e){var n=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 t({fit:n,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},t.prototype.copyWith=function(e){var n=e.fit,r=e.alignment,i=e.minX,a=e.minY,o=e.maxX,s=e.maxY;return new t({fit:null!=n?n:this.fit,alignment:null!=r?r:this.alignment,minX:null!=i?i:this.minX,minY:null!=a?a:this.minY,maxX:null!=o?o:this.maxX,maxY:null!=s?s:this.maxY})},t.prototype.runtimeFit=function(t){return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===e.Cover?t.Fit.cover:this.fit===e.Contain?t.Fit.contain:this.fit===e.Fill?t.Fit.fill:this.fit===e.FitWidth?t.Fit.fitWidth:this.fit===e.FitHeight?t.Fit.fitHeight:this.fit===e.ScaleDown?t.Fit.scaleDown:t.Fit.none,this.cachedRuntimeFit=n,n);var n},t.prototype.runtimeAlignment=function(t){return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(e=this.alignment===i.TopLeft?t.Alignment.topLeft:this.alignment===i.TopCenter?t.Alignment.topCenter:this.alignment===i.TopRight?t.Alignment.topRight:this.alignment===i.CenterLeft?t.Alignment.centerLeft:this.alignment===i.CenterRight?t.Alignment.centerRight:this.alignment===i.BottomLeft?t.Alignment.bottomLeft:this.alignment===i.BottomCenter?t.Alignment.bottomCenter:this.alignment===i.BottomRight?t.Alignment.bottomRight:t.Alignment.center,this.cachedRuntimeAlignment=e,e);var e},t}(),p=function(){function t(){}return t.loadRuntime=function(){a.default({locateFile:function(){return t.wasmURL}
1}).then((function(e){var n;for(t.runtime=e;t.callBackQueue.length>0;)null===(n=t.callBackQueue.shift())||void 0===n||n(t.runtime)})).catch((function(){var e="https://cdn.jsdelivr.net/npm/".concat(o.name,"@").concat(o.version,"/rive_fallback.wasm");t.wasmURL.toLowerCase()!==e?(console.warn("Failed to load WASM from ".concat(t.wasmURL,", trying jsdelivr as a backup")),t.setWasmUrl(e),t.loadRuntime()):console.error("Could not load Rive WASM file from unpkg or jsdelivr, network connection may be down, or         you may need to call set a new WASM source via RuntimeLoader.setWasmUrl() and call         RuntimeLoader.loadRuntime() again")}))},t.getInstance=function(e){t.isLoading||(t.isLoading=!0,t.loadRuntime()),t.runtime?e(t.runtime):t.callBackQueue.push(e)},t.awaitInstance=function(){return new Promise((function(e){return t.getInstance((function(t){return e(t)}))}))},t.setWasmUrl=function(e){t.wasmURL=e},t.isLoading=!1,t.callBackQueue=[],t.wasmURL="https://unpkg.com/".concat(o.name,"@").concat(o.version,"/rive.wasm"),t}();!function(t){t[t.Number=56]="Number",t[t.Trigger=58]="Trigger",t[t.Boolean=59]="Boolean"}(f||(f={}));var m,v=function(){function t(t,e){this.type=t,this.runtimeInput=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(t){this.runtimeInput.value=t},enumerable:!1,configurable:!0}),t.prototype.fire=function(){this.type===f.Trigger&&this.runtimeInput.fire()},t}();!function(t){t[t.General=128]="General",t[t.OpenUrl=131]="OpenUrl"}(m||(m={}));var g,y,b=function(){function t(t,e,n,r){this.stateMachine=t,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new e.StateMachineInstance(t,r),this.initInputs(e)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"statesChanged",{get:function(){for(var t=[],e=0;e<this.instance.stateChangedCount();e++)t.push(this.instance.stateChangedNameByIndex(e));return t},enumerable:!1,configurable:!0}),t.prototype.advance=function(t){this.instance.advance(t)},t.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},t.prototype.reportedEventAt=function(t){return this.instance.reportedEventAt(t)},t.prototype.initInputs=function(t){for(var e=0;e<this.instance.inputCount();e++){var n=this.instance.input(e);this.inputs.push(this.mapRuntimeInput(n,t))}},t.prototype.mapRuntimeInput=function(t,e){return t.type===e.SMIInput.bool?new v(f.Boolean,t.asBool()):t.type===e.SMIInput.number?new v(f.Number,t.asNumber()):t.type===e.SMIInput.trigger?new v(f.Trigger,t.asTrigger()):void 0},t.prototype.cleanup=function(){this.instance.delete()},t}(),_=function(){function t(t,e,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]),this.runtime=t,this.artboard=e,this.eventManager=n,this.animations=r,this.stateMachines=i}return t.prototype.add=function(t,e,n){if(void 0===n&&(n=!0),0===(t=I(t)).length)this.animations.forEach((function(t){return t.playing=e})),this.stateMachines.forEach((function(t){return t.playing=e}));else for(var r=this.animations.map((function(t){return t.name})),i=this.stateMachines.map((function(t){return t.name})),a=0;a<t.length;a++){var o=r.indexOf(t[a]),u=i.indexOf(t[a]);if(o>=0||u>=0)o>=0?this.animations[o].playing=e:this.stateMachines[u].playing=e;else{var c=this.artboard.animationByName(t[a]);if(c){var l=new s.Animation(c,this.artboard,this.runtime,e);l.advance(0),l.apply(1),this.animations.push(l)}else{var h=this.artboard.stateMachineByName(t[a]);if(h){var f=new b(h,this.runtime,e,this.artboard);this.stateMachines.push(f)}}}}return n&&(e?this.eventManager.fire({type:g.Play,data:this.playing}):this.eventManager.fire({type:g.Pause,data:this.paused})),e?this.playing:this.paused},t.prototype.initLinearAnimations=function(t,e){for(var n=this.animations.map((function(t){return t.name})),r=0;r<t.length;r++){var i=n.indexOf(t[r]);if(i>=0)this.animations[i].playing=e;else{var a=this.artboard.animationByName(t[r]);if(a){var o=new s.Animation(a,this.artboard,this.runtime,e);o.advance(0),o.apply(1),this.animations.push(o)}}}},t.prototype.initStateMachines=function(t,e){for(var n=this.stateMachines.map((function(t){return t.name})),r=0;r<t.length;r++){var i=n.indexOf(t[r]);if(i>=0)this.stateMachines[i].playing=e;else{var a=this.artboard.stateMachineByName(t[r]);if(a){var o=new b(a,this.runtime,e,this.artboard);this.stateMachines.push(o)}else this.initLinearAnimations([t[r]],e)}}},t.prototype.play=function(t){return this.add(t,!0)},t.prototype.pause=function(t){return this.add(t,!1)},t.prototype.scrub=function(t,e){var n=this.animations.filter((function(e){return t.includes(e.name)}));
1return n.forEach((function(t){return t.scrubTo=e})),n.map((function(t){return t.name}))},Object.defineProperty(t.prototype,"playing",{get:function(){return this.animations.filter((function(t){return t.playing})).map((function(t){return t.name})).concat(this.stateMachines.filter((function(t){return t.playing})).map((function(t){return t.name})))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return this.animations.filter((function(t){return!t.playing})).map((function(t){return t.name})).concat(this.stateMachines.filter((function(t){return!t.playing})).map((function(t){return t.name})))},enumerable:!1,configurable:!0}),t.prototype.stop=function(t){var e=this,n=[];if(0===(t=I(t)).length)n=this.animations.map((function(t){return t.name})).concat(this.stateMachines.map((function(t){return t.name}))),this.animations.forEach((function(t){return t.cleanup()})),this.stateMachines.forEach((function(t){return t.cleanup()})),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter((function(e){return t.includes(e.name)}));r.forEach((function(t){t.cleanup(),e.animations.splice(e.animations.indexOf(t),1)}));var i=this.stateMachines.filter((function(e){return t.includes(e.name)}));i.forEach((function(t){t.cleanup(),e.stateMachines.splice(e.stateMachines.indexOf(t),1)})),n=r.map((function(t){return t.name})).concat(i.map((function(t){return t.name})))}return this.eventManager.fire({type:g.Stop,data:n}),n},Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.animations.reduce((function(t,e){return t||e.playing}),!1)||this.stateMachines.reduce((function(t,e){return t||e.playing}),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),t.prototype.atLeastOne=function(t,e){var n;return void 0===e&&(e=!0),0===this.animations.length&&0===this.stateMachines.length&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],t,e):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],t,e)),n},t.prototype.handleLooping=function(){for(var t=0,e=this.animations.filter((function(t){return t.playing}));t<e.length;t++){var n=e[t];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:g.Loop,data:{animation:n.name,type:y.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:g.Loop,data:{animation:n.name,type:y.PingPong}}),n.loopCount=0)}},t.prototype.handleStateChanges=function(){for(var t=[],e=0,n=this.stateMachines.filter((function(t){return t.playing}));e<n.length;e++){var r=n[e];t.push.apply(t,r.statesChanged)}t.length>0&&this.eventManager.fire({type:g.StateChange,data:t})},t.prototype.handleAdvancing=function(t){this.eventManager.fire({type:g.Advance,data:t})},t}();!function(t){t.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"}(g||(g={})),function(t){t.OneShot="oneshot",t.Loop="loop",t.PingPong="pingpong"}(y||(y={}));var w,A=function(){function t(t){void 0===t&&(t=[]),this.listeners=t}return t.prototype.getListeners=function(t){return this.listeners.filter((function(e){return e.type===t}))},t.prototype.add=function(t){this.listeners.includes(t)||this.listeners.push(t)},t.prototype.remove=function(t){for(var e=0;e<this.listeners.length;e++){var n=this.listeners[e];if(n.type===t.type&&n.callback===t.callback){this.listeners.splice(e,1);break}}},t.prototype.removeAll=function(t){var e=this;t?this.listeners.filter((function(e){return e.type===t})).forEach((function(t){return e.remove(t)})):this.listeners.splice(0,this.listeners.length)},t.prototype.fire=function(t){this.getListeners(t.type).forEach((function(e){return e.callback(t)}))},t}(),C=function(){function t(t){this.eventManager=t,this.queue=[]}return t.prototype.add=function(t){this.queue.push(t)},t.prototype.process=function(){for(;this.queue.length>0;){var t=this.queue.shift();(null==t?void 0:t.action)&&t.action(),(null==t?void 0:t.event)&&this.eventManager.fire(t.event)}},t}();!function(t){t[t.AVAILABLE=0]="AVAILABLE",t[t.UNAVAILABLE=1]="UNAVAILABLE"}(w||(w={}));var R=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._started=!1,e._enabled=!1,e._status=w.UNAVAILABLE,e}return c(e,t),e.prototype.delay=function(t){return l(this,void 0,void 0,(function(){return h(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,t)}))]}))}))},e.prototype.timeout=function(){return l(this,void 0,void 0,(function(){return h(this,(function(t){return[2,new Promise((function(t,e){return setTimeout(e,50)}))]}))}))},e.prototype.reportToListeners=function(){this.fire({type:g.AudioStatusChange}),this.removeAll()},e.prototype.enableAudio=function(){return l(this,void 0,void 0,(function(){return h(this,(function(t){return this._enabled||(this._enabled=!0,this._status=w.AVAILABLE,this.reportToListeners()),[2]}))}
1))},e.prototype.testAudio=function(){return l(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:if(this._status!==w.UNAVAILABLE||null===this._audioContext)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return t.sent(),this.enableAudio(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype._establishAudio=function(){return l(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return this._started?[3,5]:(this._started=!0,"undefined"!=typeof window?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),t.label=2;case 2:return this._status!==w.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return t.sent(),[4,this.delay(1e3)];case 4:return t.sent(),[3,2];case 5:return[2]}}))}))},e.prototype.listenForUserAction=function(){var t=this;document.addEventListener("pointerdown",(function(){return l(t,void 0,void 0,(function(){return h(this,(function(t){return this.enableAudio(),[2]}))}
1))}),{once:!0})},e.prototype.establishAudio=function(){return l(this,void 0,void 0,(function(){return h(this,(function(t){return this._establishAudio(),[2]}))}))},Object.defineProperty(e.prototype,"systemVolume",{get:function(){return this._status===w.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),e}(A),T=new R,E=function(){function t(){}return t.prototype.observe=function(){},t.prototype.unobserve=function(){},t.prototype.disconnect=function(){},t}(),P=globalThis.ResizeObserver||E,L=new(function(){function t(){var t=this;this._elementsMap=new Map,this._onObservedEntry=function(e){var n=t._elementsMap.get(e.target);null!==n?n.onResize(0==e.target.clientWidth||0==e.target.clientHeight):t._resizeObserver.unobserve(e.target)},this._onObserved=function(e){e.forEach(t._onObservedEntry)},this._resizeObserver=new P(this._onObserved)}return t.prototype.add=function(t,e){var n={onResize:e,element:t};return this._elementsMap.set(t,n),this._resizeObserver.observe(t),n},t.prototype.remove=function(t){this._resizeObserver.unobserve(t.element),this._elementsMap.delete(t.element)},t}()),M=function(){function t(t){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.src=t.src,this.buffer=t.buffer,t.assetLoader&&(this.assetLoader=t.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof t.enableRiveAssetCDN||t.enableRiveAssetCDN,this.eventManager=new A,t.onLoad&&this.on(g.Load,t.onLoad),t.onLoadError&&this.on(g.LoadError,t.onLoadError)}return t.prototype.initData=function(){return l(this,void 0,void 0,(function(){var e,n,r;return h(this,(function(i){switch(i.label){case 0:return this.src?(e=this,[4,S(this.src)]):[3,2];case 1:e.buffer=i.sent(),i.label=2;case 2:return this.assetLoader&&(n=new this.runtime.CustomFileAssetLoader({loadContents:this.assetLoader})),r=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)];case 3:if(r.file=i.sent(),null===this.file)throw this.eventManager.fire({type:g.LoadError,data:null}),new Error(t.fileLoadErrorMessage);return this.eventManager.fire({type:g.Load,data:this}),[2]}}))}))},t.prototype.init=function(){return l(this,void 0,void 0,(function(){var e;return h(this,(function(n){switch(n.label){case 0:if(!this.src&&!this.buffer)throw new Error(t.missingErrorMessage);return e=this,[4,p.awaitInstance()];case 1:return e.runtime=n.sent(),[4,this.initData()];case 2:return n.sent(),[2]}}))}))},t.prototype.on=function(t,e){this.eventManager.add({type:t,callback:e})},t.prototype.off=function(t,e){this.eventManager.remove({type:t,callback:e})},t.prototype.cleanup=function(){var t;this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),null===(t=this.file)||void 0===t||t.delete())},t.prototype.removeAllRiveEventListeners=function(t){this.eventManager.removeAll(t)},t.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},t.missingErrorMessage="Rive source file or data buffer required",t.fileLoadErrorMessage="The file failed to load",t}(),F=function(){function t(t){var e,n=this;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._hasZeroSize=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(t){n._hasZeroSize=t,n._layout.maxX&&n._layout.maxY||n.resizeToCanvas()},this.renderSecondTimer=0,this.canvas=t.canvas,t.canvas.constructor===HTMLCanvasElement&&(this._observed=L.add(this.canvas,this.onCanvasResize)),this.src=t.src,this.buffer=t.buffer,this.riveFile=t.riveFile,this.layout=null!==(e=t.layout)&&void 0!==e?e:new d,this.shouldDisableRiveListeners=!!t.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!t.isTouchScrollEnabled,this.automaticallyHandleEvents=!!t.automaticallyHandleEvents,this.enableRiveAssetCDN=void 0===t.enableRiveAssetCDN||t.enableRiveAssetCDN,this.eventManager=new A,t.onLoad&&this.on(g.Load,t.onLoad),t.onLoadError&&this.on(g.LoadError,t.onLoadError),t.onPlay&&this.on(g.Play,t.onPlay),t.onPause&&this.on(g.Pause,t.onPause),t.onStop&&this.on(g.Stop,t.onStop),t.onLoop&&this.on(g.Loop,t.onLoop),t.onStateChange&&this.on(g.StateChange,t.onStateChange),t.onAdvance&&this.on(g.Advance,t.onAdvance),t.onload&&!t.onLoad&&this.on(g.Load,t.onload),t.onloaderror&&!t.onLoadError&&this.on(g.LoadError,t.onloaderror),t.onplay&&!t.onPlay&&this.on(g.Play,t.onplay),t.onpause&&!t.onPause&&this.on(g.Pause,t.onpause),t.onstop&&!t.onStop&&this.on(g.Stop,t.onstop),t.onloop&&!t.onLoop&&this.on(g.Loop,t.onloop),t.onstatechange&&!t.onStateChange&&this.on(g.StateChange,t.onstatechange),t.assetLoader&&(this.assetLoader=t.assetLoader),this.taskQueue=new C(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:t.autoplay,animations:t.animations,stateMachines:t.stateMachines,artboard:t.artboard,useOffscreenRenderer:t.useOffscreenRenderer})}return 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,c=e.autoplay,l=void 0!==c&&c,h=e.useOffscreenRenderer,f=void 0!==h&&h;if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new Error(t.missingErrorMessage);var d=I(o),m=I(s);this.loaded=!1,this.readyForPlaying=!1,p.awaitInstance().then((function(t){n.runtime=t,n.renderer=n.runtime.makeRenderer(n.canvas,f),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,d,m,l).then((function(){return n.setupRiveListeners()})).catch((function(t){console.error(t)}))}
1)).catch((function(t){console.error(t)}))},t.prototype.setupRiveListeners=function(t){var e=this;if(!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter((function(t){return t.playing&&e.runtime.hasListeners(t.instance)})).map((function(t){return t.instance})),r=this.isTouchScrollEnabled;t&&"isTouchScrollEnabled"in t&&(r=t.isTouchScrollEnabled),this.eventCleanup=(0,u.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})}},t.prototype.removeRiveListeners=function(){this.eventCleanup&&this.eventCleanup()},t.prototype.initializeAudio=function(){var t,e=this;T.status==w.UNAVAILABLE&&(null===(t=this.artboard)||void 0===t?void 0:t.hasAudio)&&(T.add({type:g.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}}),T.establishAudio())},t.prototype.initData=function(t,e,n,r){var i;return l(this,void 0,void 0,(function(){var a;return h(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),null!=this.riveFile?[3,2]:(this.riveFile=new M({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),[4,this.riveFile.init()]);case 1:o.sent(),o.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(t,e,n,r),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:g.Load,data:null!==(i=this.src)&&void 0!==i?i:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()];case 3:return o.sent(),a="Problem loading file; may be corrupt!",console.warn(a),this.eventManager.fire({type:g.LoadError,data:a}),[2,Promise.reject(a)];case 4:return[2]}}
1))}))},t.prototype.initArtboard=function(t,e,n,r){if(this.file){var i,a=t?this.file.artboardByName(t):this.file.defaultArtboard();if(!a){var o="Invalid artboard name or no default artboard";return console.warn(o),void this.eventManager.fire({type:g.LoadError,data:o})}if(this.artboard=a,a.volume=this._volume*T.systemVolume,this.artboard.animationCount()<1)throw o="Artboard has no animations",this.eventManager.fire({type:g.LoadError,data:o}),o;this.animator=new _(this.runtime,this.artboard,this.eventManager),e.length>0||n.length>0?(i=e.concat(n),this.animator.initLinearAnimations(e,r),this.animator.initStateMachines(n,r)):i=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?g.Play:g.Pause,data:i}})}},t.prototype.drawFrame=function(){this.startRendering()},t.prototype.draw=function(t,e){this.frameRequestId=null;var n=performance.now();this.lastRenderTime||(this.lastRenderTime=t),this.renderSecondTimer+=t-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==e||e());var r=(t-this.lastRenderTime)/1e3;this.lastRenderTime=t;for(var i=0,a=this.animator.animations.filter((function(t){return t.playing||t.needsScrub})).sort((function(t){return t.needsScrub?-1:1}));i<a.length;i++){var o=a[i];o.advance(r),o.instance.didLoop&&(o.loopCount+=1),o.apply(1)}for(var s=0,c=this.animator.stateMachines.filter((function(t){return t.playing}));s<c.length;s++){var l=c[s],h=l.reportedEventCount();if(h)for(var f=0;f<h;f++){var d=l.reportedEventAt(f);if(d)if(d.type===m.OpenUrl){if(this.eventManager.fire({type:g.RiveEvent,data:d}),this.automaticallyHandleEvents){var p=document.createElement("a"),v=d,y=v.url,b=v.target,_=(0,u.sanitizeUrl)(y);y&&p.setAttribute("href",_),b&&p.setAttribute("target",b),_&&_!==u.BLANK_URL&&p.click()}}else this.eventManager.fire({type:g.RiveEvent,data:d})}l.advance(r)}this.artboard.advance(r);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(r),this.frameCount++;var A=performance.now();for(this.frameTimes.push(A),this.durations.push(A-n);this.frameTimes[0]<=A-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},t.prototype.alignRenderer=function(){var t=this,e=t.renderer,n=t.runtime,r=t._layout,i=t.artboard;e.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds)},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(t,e){return t+e}),0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),t.prototype.cleanup=function(){var t;this.stopRendering(),this.cleanupInstances(),null!==this._observed&&L.remove(this._observed),null===(t=this.riveFile)||void 0===t||t.cleanup(),this.riveFile=null,this.file=null},t.prototype.deleteRiveRenderer=function(){var t;null===(t=this.renderer)||void 0===t||t.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(t){var e;if(t)if(this.artboard){var n=this.artboard.textRun(t);if(n)return n;console.warn("Could not access a text run with name '".concat(t,"' in the '").concat(null===(e=this.artboard)||void 0===e?void 0:e.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))}else console.warn("Tried to access text run, but the Artboard is null");else console.warn("No text run name provided")},t.prototype.getTextRunValue=function(t){var e=this.retrieveTextRun(t);return e?e.text:void 0},t.prototype.setTextRunValue=function(t,e){var n=this.retrieveTextRun(t);n&&(n.text=e)},t.prototype.play=function(t,e){var n=this;t=I(t),this.readyForPlaying?(this.animator.play(t),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(t,e)}})},t.prototype.pause=function(t){var e=this;t=I(t),this.readyForPlaying?(this.eventCleanup&&this.eventCleanup(),this.animator.pause(t)):this.taskQueue.add({action:function(){return e.pause(t)}})},t.prototype.scrub=function(t,e){var n=this;t=I(t),this.readyForPlaying?(this.animator.scrub(t,e||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(t,e)}})},t.prototype.stop=function(t){var e=this;t=I(t),this.readyForPlaying?(this.animator.stop(t),this.eventCleanup&&this.eventCleanup()):this.taskQueue.add({action:function(){return e.stop(t)}})},t.prototype.reset=function(t){var e,n=null==t?void 0:t.artboard,r=I(null==t?void 0:t.animations),i=I(null==t?void 0:t.stateMachines),a=null!==(e=null==t?void 0:t.autoplay)&&void 0!==e&&e;this.cleanupInstances(),this.initArtboard(n,r,i,a),this.taskQueue.process()},t.prototype.load=function(t){this.file=null,this.stop(),this.init(t)},Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(t){this._layout=t,t.maxX&&t.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 e=this.canvas.getBoundingClientRect(),n=e.width,r=e.height,i=t||window.devicePixelRatio||1;this.canvas.width=i*n,this.canvas.height=i*r,this.startRendering(),this.resizeToCanvas()}},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 t=[],e=0;e<this.artboard.animationCount();e++)t.push(this.artboard.animationByIndex(e).name);return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var t=[],e=0;e<this.artboard.stateMachineCount();e++)t.push(this.artboard.stateMachineByIndex(e).name);return t},enumerable:!1,configurable:!0}),t.prototype.stateMachineInputs=function(t){if(this.loaded){var e=this.animator.stateMachines.find((function(e){return e.name===t}));return null==e?void 0:e.inputs}},t.prototype.retrieveInputAtPath=function(t,e){if(t)if(this.artboard){var n=this.artboard.inputByPath(t,e);if(n)return n;console.warn("Could not access an input with name: '".concat(t,"', at path:'").concat(e,"'"))}else console.warn("Tried to access input: '".concat(t,"', at path: '").concat(e,"', but the Artboard is null"));else console.warn("No input name provided for path '".concat(e,"'"))},t.prototype.setBooleanStateAtPath=function(t,e,n){var r=this.retrieveInputAtPath(t,n);r&&(r.type===f.Boolean?r.asBool().value=e:console.warn("Input with name: '".concat(t,"', at path:'").concat(n,"' is not a boolean")))},t.prototype.setNumberStateAtPath=function(t,e,n){var r=this.retrieveInputAtPath(t,n);r&&(r.type===f.Number?r.asNumber().value=e:console.warn("Input with name: '".concat(t,"', at path:'").concat(n,"' is not a number")))},t.prototype.fireStateAtPath=function(t,e){var n=this.retrieveInputAtPath(t,e);n&&(n.type===f.Trigger?n.asTrigger().fire():console.warn("Input with name: '".concat(t,"', at path:'").concat(e,"' is not a trigger")))},Object.defineProperty(t.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter((function(t){return t.playing})).map((function(t){return t.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter((function(t){return t.playing})).map((function(t){return t.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter((function(t){return!t.playing})).map((function(t){return t.name})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter((function(t){return!t.playing})).map((function(t){return t.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(t,e){this.eventManager.add({type:t,callback:e})},t.prototype.off=function(t,e){this.eventManager.remove({type:t,callback:e})},t.prototype.unsubscribe=function(t,e){console.warn("This function is deprecated: please use `off()` instead."),this.off(t,e)},t.prototype.removeAllRiveEventListeners=function(t){this.eventManager.removeAll(t)},t.prototype.unsubscribeAll=function(t){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(t)},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.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},t.prototype.enableFPSCounter=function(t){this.runtime.enableFPSCounter(t)},t.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(t.prototype,"contents",{get:function(){if(this.loaded){for(var t={artboards:[]},e=0;e<this.file.artboardCount();e++){for(var n=this.file.artboardByIndex(e),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,c=new this.runtime.StateMachineInstance(s,n),l=[],h=0;h<c.inputCount();h++){var f=c.input(h);l.push({name:f.name,type:f.type})}r.stateMachines.push({name:u,inputs:l})}t.artboards.push(r)}return t}}
1,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(t){this._volume=t,this.artboard&&(this.artboard.volume=t*T.systemVolume)},enumerable:!1,configurable:!0}),t.missingErrorMessage="Rive source file or data buffer required",t}(),S=function(t){return l(void 0,void 0,void 0,(function(){var e;return h(this,(function(n){switch(n.label){case 0:return e=new Request(t),[4,fetch(e)];case 1:return[4,n.sent().arrayBuffer()];case 2:return[2,n.sent()]}}))}))},I=function(t){return"string"==typeof t?[t]:t instanceof Array?t:[]},O={EventManager:A,TaskQueueManager:C},x=function(t){return new Promise((function(e){return p.getInstance((function(n){n.decodeAudio(t,e)}))}))},j=function(t){return new Promise((function(e){return p.getInstance((function(n){n.decodeImage(t,e)}))}))},k=function(t){return new Promise((function(e){return p.getInstance((function(n){n.decodeFont(t,e)}))}))}})(),r})(),t.exports=e()}}]);

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.