PageSourceSearch

https://typst.app/_astro/HomePage.astro_astro_type_script_index_0_lang.CLbM_zqY.js

js typst.app collected 2026-10-02 03:44:40 UTC 127,749 bytes, 19 lines download raw bytes

1import{t as e}from"./rolldown-runtime.CNC7AqOf.js";import{t}from"./intersectionObserverStore.BkgUlsCo.js";var n=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.rive=r():n.rive=r()})(e,()=>(()=>{var e=[,((e,t,n)=>{n.r(t),n.d(t,{default:()=>r});let r=(()=>{var e=typeof document<`u`&&document.currentScript?document.currentScript.src:void 0;return(function(t={}){var n=t,r,i;n.ready=new Promise((e,t)=>{r=e,i=t});function a(){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||=requestAnimationFrame(e.bind(this));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&r.size==0&&(cancelAnimationFrame(t),t=0)},this.Ra=function(e){a&&=(document.body.remove(a),null),e||(a=document.createElement(`div`),a.style.backgroundColor=`black`,a.style.position=`fixed`,a.style.right=0,a.style.top=0,a.style.color=`white`,a.style.padding=`4px`,a.innerHTML=`RIVE FPS`,e=function(e){a.innerHTML=`RIVE FPS `+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Ta=function(){var r=performance.now();n?(++t,r-=n,1e3<r&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Oa=function(){a&&=(document.body.remove(a),null),i=null},this.xa=function(){}}function o(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),t.length==0?n=-1/0:r==n&&(n=Math.max(...t.keys()),console.assert(n<r))},1e3)),n=Math.max(r,n),n<<e}}let s=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){s&&s();let e=n.decodeAudio;n.decodeAudio=function(t,n){t=e(t),n(t)};let t=n.decodeFont;n.decodeFont=function(e,n){e=t(e),n(e)};let r=n.FileAssetLoader;n.ptrToAsset=e=>{let t=n.ptrToFileAsset(e);return t.isImage?n.ptrToImageAsset(e):t.isFont?n.ptrToFontAsset(e):t.isAudio?n.ptrToAudioAsset(e):t},n.CustomFileAssetLoader=r.extend(`CustomFileAssetLoader`,{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Ha=e},loadContents:function(e,t){return e=n.ptrToAsset(e),this.Ha(e,t)}}),n.CDNFileAssetLoader=r.extend(`CDNFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=n.ptrToAsset(e);return e=t.cdnUuid,e===``?!1:((function(e,t){var n=new XMLHttpRequest;n.responseType=`arraybuffer`,n.onreadystatechange=function(){n.readyState==4&&n.status==200&&t(n)},n.open(`GET`,e,!0),n.send(null)})(t.cdnBaseUrl+`/`+e,e=>{t.decode(new Uint8Array(e.response))}),!0)}}),n.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 i=n.computeAlignment;n.computeAlignment=function(e,t,n,r,a=1){return i.call(this,e,t,n,r,a)}};let c=`createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText`.split(` `),l=new function(){function e(){if(!t){var e=document.createElement(`canvas`),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext(`webgl`,o),n=1,!s)return console.log(`No WebGL support. Image mesh will not be drawn.`),!1}else if(s=e.getContext(`webgl2`,o))n=2;else if(s=e.getContext(`webgl`,o))n=1;else return console.log(`No WebGL support. Image mesh will not be drawn.`),!1;s=new Proxy(s,{get(e,t){if(e.isContextLost()){if(l||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to invoke `,t),!0),typeof e[t]==`function`)return function(){}}else return typeof e[t]==`function`?function(...n){return e[t].apply(e,n)}:e[t]},set(e,t,n){if(e.isContextLost())l||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to set property `+t),!0);else return e[t]=n,!0}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE));
1function c(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),n=s.getShaderInfoLog(t),0<(n||``).length)throw n;s.attachShader(e,t)}if(e=s.createProgram(),c(e,s.VERTEX_SHADER,`attribute vec2 vertex;
2                attribute vec2 uv;
3                uniform vec4 mat;
4                uniform vec2 translate;
5                varying vec2 st;
6                void main() {
7                    st = uv;
8                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);
9                }`),c(e,s.FRAGMENT_SHADER,`precision highp float;
10                uniform sampler2D image;
11                varying vec2 st;
12                void main() {
13                    gl_FragColor = texture2D(image, st);
14                }`),s.bindAttribLocation(e,0,`vertex`),s.bindAttribLocation(e,1,`uv`),s.linkProgram(e),o=s.getProgramInfoLog(e),0<(o||``).trim().length)throw o;i=s.getUniformLocation(e,`mat`),a=s.getUniformLocation(e,`translate`),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,`image`),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,s=0,c=0,l=!1;e(),this.eb=function(){return e(),r},this.Ma=function(e){t.deleteTexture&&t.deleteTexture(e)},this.La=function(r){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,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),n==2?(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 u=new o(8),d=new o(8),f=new o(10),p=new o(10);this.Qa=function(n,r,o,l,m){if(e()){var h=u.push(n),g=d.push(r);if(t.canvas){(t.canvas.width!=h||t.canvas.height!=g)&&(t.canvas.width=h,t.canvas.height=g),t.viewport(0,g-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),o.sort((e,t)=>t.Ba-e.Ba),h=f.push(l),s!=h&&(t.bufferData(t.ARRAY_BUFFER,8*h,t.DYNAMIC_DRAW),s=h),h=0;for(var _ of o)t.bufferSubData(t.ARRAY_BUFFER,h,_.ia),h+=4*_.ia.length;console.assert(h==4*l);for(var v of o)t.bufferSubData(t.ARRAY_BUFFER,h,v.Ea),h+=4*v.Ea.length;console.assert(h==8*l),h=p.push(m),c!=h&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*h,t.DYNAMIC_DRAW),c=h),_=0;for(var y of o)t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,_,y.indices),_+=2*y.indices.length;console.assert(_==2*m),y=0,v=!0,h=_=0;for(let e of o){e.image.da!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.ca||null),y=e.image.da),e.hb?(t.scissor(e.na,g-e.oa-e.va,e.sb,e.va),v=!0):v&&=(t.scissor(0,g-r,n,r),!1),o=2/n;let s=-2/r;t.uniform4f(i,e.N[0]*o*e.X,e.N[1]*s*e.Y,e.N[2]*o*e.X,e.N[3]*s*e.Y),t.uniform2f(a,e.N[4]*o*e.X+o*(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,h),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,h+4*l),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,_),h+=4*e.ia.length,_+=2*e.indices.length}console.assert(h==4*l),console.assert(_==2*m)}}},this.canvas=function(){return e()&&t.canvas}},u=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){function e(e){switch(e){case m.srcOver:return`source-over`;case m.screen:return`screen`;case m.overlay:return`overlay`;case m.darken:return`darken`;case m.lighten:return`lighten`;case m.colorDodge:return`color-dodge`;case m.colorBurn:return`color-burn`;case m.hardLight:return`hard-light`;case m.softLight:return`soft-light`;case m.difference:return`difference`;case m.exclusion:return`exclusion`;case m.multiply:return`multiply`;case m.hue:return`hue`;case m.saturation:return`saturation`;case m.color:return`color`;case m.luminosity:return`luminosity`}}function t(e){return`rgba(`+((16711680&e)>>>16)+`,`+((65280&e)>>>8)+`,`+((255&e)>>>0)+`,`+((4278190080&e)>>>24)/255+`)`}function r(){0<w.length&&(l.Qa(C.drawWidth(),C.drawHeight(),w,T,E),w=[],E=T=0,C.reset(512,512));for(let e of S){for(let t of e.u)t();e.u=[]}S.clear()}u&&u();var i=n.RenderPaintStyle;let o=n.RenderPath,s=n.RenderPaint,d=n.Renderer,f=n.StrokeCap,p=n.StrokeJoin,m=n.BlendMode,h=i.fill,g=i.stroke,_=n.FillRule.evenOdd,v=1;var y=n.RenderImage.extend(`CanvasRenderImage`,{__construct:function({R:e,W:t}={}){this.__parent.__construct.call(this),this.da=v,v=v+1&2147483647||1,this.R=e,this.W=t},__destruct:function(){this.ca&&(l.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=l.La(n),t.size(n.width,n.height),t.R&&t.R(t)},n.src=t.la}}),b=o.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,c=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,c.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()}}),x=s.extend(`CanvasRenderPaint`,{color:function(e){this.ma=t(e)},thickness:function(e){this.Ja=e}
14,join:function(e){switch(e){case p.miter:this.ba=`miter`;break;case p.round:this.ba=`round`;break;case p.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(t){this.Fa=e(t)},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,n,r){let i=this.Ia;var a=this.ma,o=this.P;if(e.globalCompositeOperation=this.Fa,o!=null){a=o.Ca;var s=o.Da;let n=o.qa;var c=o.ra;let r=o.ga;o.bb?(o=n-a,c-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+c*c))):a=e.createLinearGradient(a,s,n,c);for(let e=0,n=r.length;e<n;e++)s=r[e],a.addColorStop(s.stop,t(s.color));this.ma=a,this.P=null}switch(i){case g:e.strokeStyle=a,e.lineWidth=this.Ja,e.lineCap=this.aa,e.lineJoin=this.ba,e.stroke(n);break;case h:e.fillStyle=a,e.fill(n,r)}}});let S=new Set,C=null,w=[],T=0,E=0;var D=n.CanvasRenderer=d.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>e)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===_?`evenodd`:`nonzero`))},_drawRiveImage:function(t,n,r,i){var a=t.Ga;if(a){var o=this.o,s=e(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,i,a,o,s,c,u,d,f,p,m){i=this.o.canvas.width;var h=this.o.canvas.height;let g=p-d,_=m-f;d=Math.max(d,0),f=Math.max(f,0),p=Math.min(p,i),m=Math.min(m,h);let v=p-d,y=m-f;if(console.assert(v<=Math.min(g,i)),console.assert(y<=Math.min(_,h)),!(0>=v||0>=y)){p=v<g||y<_,i=m=1;var b=Math.ceil(v*m),x=Math.ceil(y*i);h=l.eb(),b>h&&(m*=h/b,b=h),x>h&&(i*=h/x,x=h),C||(C=new n.DynamicRectanizer(h),C.reset(512,512)),h=C.addRect(b,x),0>h&&(r(),S.add(this),h=C.addRect(b,x),console.assert(0<=h));var D=h&65535,O=h>>16;w.push({N:this.D.slice(this.D.length-6),image:t,na:D,oa:O,fb:d,gb:f,sb:b,va:x,X:m,Y:i,ia:new Float32Array(s),Ea:new Float32Array(c),indices:new Uint16Array(u),hb:p,Ba:t.da<<1|!!p}),T+=s.length,E+=u.length;var k=this.o,A=e(a);this.u.push(function(){k.save(),k.resetTransform(),k.globalCompositeOperation=A,k.globalAlpha=o;let e=l.canvas();e&&k.drawImage(e,D,O,b,x,d,f,v,y),k.restore()})}},_clipPath:function(e){this.u.push(this.o.clip.bind(this.o,e.F,e.ka===_?`evenodd`:`nonzero`))},clear:function(){S.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)}});n.makeRenderer=function(e){let t=new D(e),n=t.o;return new Proxy(t,{get(e,r){if(typeof e[r]==`function`)return function(...t){return e[r].apply(e,t)};if(typeof n[r]==`function`){if(-1<c.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}})},n.decodeImage=function(e,t){new y({R:t}).decode(e)},n.renderFactory={makeRenderPaint:function(){return new x},makeRenderPath:function(){return new b},makeRenderImage:function(){let e=k;return new y({W:()=>{e.total++},R:()=>
14{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let O=n.load,k=null;n.load=function(e,t,r=!0){let i=new n.FallbackFileAssetLoader;return t!==void 0&&i.addLoader(t),r&&(t=new n.CDNFileAssetLoader,i.addLoader(t)),new Promise(function(t){let n=null;k={total:0,loaded:0,ready:function(){t(n)}},n=O(e,i),k.total==0&&t(n)})};let A=n.RendererWrapper.prototype.align;n.RendererWrapper.prototype.align=function(e,t,n,r,i=1){A.call(this,e,t,n,r,i)},i=new a,n.requestAnimationFrame=i.requestAnimationFrame.bind(i),n.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),n.enableFPSCounter=i.Ra.bind(i),n.disableFPSCounter=i.Oa,i.xa=r,n.resolveAnimationFrame=r,n.cleanup=function(){C&&C.delete()}};var d=Object.assign({},n),f=`./this.program`,p=typeof window==`object`,m=typeof importScripts==`function`,h=``,g,_;(p||m)&&(m?h=self.location.href:typeof document<`u`&&document.currentScript&&(h=document.currentScript.src),e&&(h=e),h=h.indexOf(`blob:`)===0?``:h.substr(0,h.replace(/[?#].*/,``).lastIndexOf(`/`)+1),m&&(_=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),g=(e,t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});var v=n.print||console.log.bind(console),y=n.printErr||console.error.bind(console);Object.assign(n,d),d=null,n.thisProgram&&(f=n.thisProgram);var b;n.wasmBinary&&(b=n.wasmBinary),n.noExitRuntime,typeof WebAssembly!=`object`&&ae(`no native wasm support detected`);var x,S,C=!1,w,T,E,D,O,k,A,ee;function te(){var e=x.buffer;n.HEAP8=w=new Int8Array(e),n.HEAP16=E=new Int16Array(e),n.HEAP32=O=new Int32Array(e),n.HEAPU8=T=new Uint8Array(e),n.HEAPU16=D=new Uint16Array(e),n.HEAPU32=k=new Uint32Array(e),n.HEAPF32=A=new Float32Array(e),n.HEAPF64=ee=new Float64Array(e)}var ne,re=[],j=[],M=[];function N(){var e=n.preRun.shift();re.unshift(e)}var P=0,ie=null,F=null;function ae(e){throw n.onAbort&&n.onAbort(e),e=`Aborted(`+e+`)`,y(e),C=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),i(e),e}function oe(e){return e.startsWith(`data:application/octet-stream;base64,`)}var se=`canvas_advanced.wasm`;if(!oe(se)){var ce=se;se=n.locateFile?n.locateFile(ce,h):h+ce}function I(e){if(e==se&&b)return new Uint8Array(b);if(_)return _(e);throw`both async and sync fetching of the wasm failed`}function le(e){if(!b&&(p||m)){if(typeof fetch==`function`&&!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(()=>I(e));if(g)return new Promise((t,n)=>{g(e,e=>t(new Uint8Array(e)),n)})}return Promise.resolve().then(()=>I(e))}function L(e,t,n){return le(e).then(e=>WebAssembly.instantiate(e,t)).then(e=>e).then(n,e=>{y(`failed to asynchronously prepare wasm: `+e),ae(e)})}function ue(e,t){var n=se;return b||typeof WebAssembly.instantiateStreaming!=`function`||oe(n)||n.startsWith(`file://`)||typeof fetch!=`function`?L(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return y(`wasm streaming compile failed: `+r),y(`falling back to ArrayBuffer instantiation`),L(n,e,t)}))}var de=e=>{for(;0<e.length;)e.shift()(n)};function fe(e){if(e===void 0)return`_unknown`;e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e}function pe(e,t){return e=fe(e),{[e]:function(){return t.apply(this,arguments)}}[e]}function me(){this.G=[void 0],this.ta=[]}var R=new me,he=void 0;function z(e){throw new he(e)}var B=e=>(e||z(`Cannot use deleted val. handle = `+e),R.get(e).value),V=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return R.Za({Aa:1,value:e})}};function ge(e){var t=Error,n=pe(e,function(t){this.name=e,this.message=t,t=Error(t).stack,t!==void 0&&(this.stack=this.toString()+`
15`+t.replace(/^Error(:[^\n]*)?\n/,``))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n}var H=void 0,U=void 0;function W(e){for(var t=``;T[e];)t+=U[T[e++]];return t}var G=[];function _e(){for(;G.length;){var e=G.pop();e.g.M=!1,e.delete()}}var K=void 0,q={};function ve(e,t){for(t===void 0&&z(`ptr should not be undefined`);e.l;)t=e.S(t),e=e.l;return t}var ye={};function be(e){e=Lt(e);var t=W(e);return Ft(e),t}function J(e,t){var n=ye[e];return n===void 0&&z(t+` has unknown type `+be(e)),n}function Y(){}var xe=!1;function Se(e){--e.count.value,e.count.value===0&&(e.s?e.A.H(e.s):e.j.h.H(e.i))}function Ce(e,t,n){return t===n?e:n.l===void 0?null:(e=Ce(e,t,n.l),e===null?null:n.Pa(e))}var we={};function Te(e,t){return t=ve(e,t),q[t]}var Ee=void 0;function De(e){throw new Ee(e)}function Oe(e,t){return t.j&&t.i||De(`makeClassHandle requires ptr and ptrType`),!!t.A!=!!t.s&&De(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},ke(Object.create(e,{g:{value:t}}))}function ke(e){return typeof FinalizationRegistry>`u`?(ke=e=>e,e):(xe=new FinalizationRegistry(e=>{Se(e.g)}),ke=e=>{var t=e.g;return t.s&&xe.register(e,{g:t},e),e},Y=e=>{xe.unregister(e)},ke(e))}var Ae={};function je(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Me(e){return this.fromWireType(O[e>>2])}var Ne={},Pe={};
vendor: 5,043 bytes, line 15
15function X(e,t,n){function r(t){t=n(t),t.length!==e.length&&De(`Mismatched type converter count`);for(var r=0;r<e.length;++r)Z(e[r],t[r])}e.forEach(function(e){Pe[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{ye.hasOwnProperty(e)?i[t]=ye[e]:(a.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push(()=>{i[t]=ye[e],++o,o===a.length&&r(i)}))}),a.length===0&&r(i)}function Fe(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 Ie(e,t,n={}){var r=t.name;if(e||z(`type "${r}" must have a positive integer typeid pointer`),ye.hasOwnProperty(e)){if(n.ab)return;z(`Cannot register type '${r}' twice`)}ye[e]=t,delete Pe[e],Ne.hasOwnProperty(e)&&(t=Ne[e],delete Ne[e],t.forEach(e=>e()))}function Z(e,t,n={}){if(!(`argPackAdvance`in t))throw TypeError(`registerType registeredInstance requires argPackAdvance`);Ie(e,t,n)}function Le(e){z(e.g.j.h.name+` instance already deleted`)}function Re(){}function ze(e,t,n){if(e[t].m===void 0){var r=e[t];e[t]=function(){return e[t].m.hasOwnProperty(arguments.length)||z(`Function '${n}' 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 Be(e,t,r){n.hasOwnProperty(e)?((r===void 0||n[e].m!==void 0&&n[e].m[r]!==void 0)&&z(`Cannot register public name '${e}' twice`),ze(n,e,e),n.hasOwnProperty(r)&&z(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].m[r]=t):(n[e]=t,r!==void 0&&(n[e].tb=r))}function Ve(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 He(e,t,n){for(;t!==n;)t.S||z(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.S(e),t=t.l;return e}function Ue(e,t){return t===null?(this.ea&&z(`null is not a valid ${this.name}`),0):(t.g||z(`Cannot pass "${rt(t)}" as a ${this.name}`),t.g.i||z(`Cannot pass deleted object as a pointer of type ${this.name}`),He(t.g.i,t.g.j.h,this.h))}function We(e,t){if(t===null){if(this.ea&&z(`null is not a valid ${this.name}`),this.V){var n=this.fa();return e!==null&&e.push(this.H,n),n}return 0}if(t.g||z(`Cannot pass "${rt(t)}" as a ${this.name}`),t.g.i||z(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.U&&t.g.j.U&&z(`Cannot convert argument of type ${t.g.A?t.g.A.name:t.g.j.name} to parameter type ${this.name}`),n=He(t.g.i,t.g.j.h,this.h),this.V)switch(t.g.s===void 0&&z(`Passing raw pointer to smart pointer is illegal`),this.nb){case 0:t.g.A===this?n=t.g.s:z(`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,V(function(){r.delete()})),e!==null&&e.push(this.H,n)}break;default:z(`Unsupporting sharing policy`)}return n}function Ge(e,t){return t===null?(this.ea&&z(`null is not a valid ${this.name}`),0):(t.g||z(`Cannot pass "${rt(t)}" as a ${this.name}`),t.g.i||z(`Cannot pass deleted object as a pointer of type ${this.name}`),t.g.j.U&&z(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`),He(t.g.i,t.g.j.h,this.h))}function Q(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,t.l===void 0?(this.toWireType=r?Ue:Ge,this.v=null):this.toWireType=We}function Ke(e,t,r){n.hasOwnProperty(e)||De(`Replacing nonexistant public symbol`),n[e].m!==void 0&&r!==void 0?n[e].m[r]=t:(n[e]=t,n[e].L=r)}var qe=[],Je=e=>{var t=qe[e];return t||(e>=qe.length&&(qe.length=e+1),qe[e]=t=ne.get(e)),t},Ye=(e,t)=>{var r=[];return function(){if(r.length=0,Object.assign(r,arguments),e.includes(`j`)){var i=n[`dynCall_`+e];i=r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)}else i=Je(t).apply(null,r);return i}};function $(e,t){e=W(e);var n=e.includes(`j`)?Ye(e,t):Je(t);return typeof n!=`function`&&z(`unknown function pointer with signature ${e}: ${t}`),n}var Xe=void 0;function Ze(e,t){function n(e){i[e]||ye[e]||(Pe[e]?Pe[e].forEach(n):(r.push(e),i[e]=!0))}var r=[],i={};throw t.forEach(n),new Xe(`${e}: `+r.map(be).join([`, `]))}function Qe(e,t,n,r,i){var a=t.length;2>a&&z(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var o=t[1]!==null&&n!==null,s=!1;for(n=1;n<t.length;++n)if(t[n]!==null&&t[n].v===void 0){s=!0;break}var c=t[0].name!==`void`,l=a-2,u=Array(l),d=[],f=[];return function(){if(arguments.length!==l&&z(`function ${e} called with ${arguments.length} arguments, expected ${l} args!`),f.length=0,d.length=o?2:1,d[0]=i,o){var n=t[1].toWireType(f,this);d[1]=n}for(var a=0;a<l;++a)u[a]=t[a+2].toWireType(f,arguments[a]),d.push(u[a]);if(a=r.apply(null,d),s)je(f);else for(var p=o?1:2;p<t.length;p++){var m=p===1?n:u[p-2];t[p].v!==null&&t[p].v(m)}return n=c?t[0].fromWireType(a):void 0,n}}function $e(e,t){for(var n=[],r=0;r<e;r++)n.push(k[t+4*r>>2]);return n}function et(e,t,n){return e instanceof Object||z(`${n}
15 with invalid "this": ${e}`),e instanceof t.h.constructor||z(`${n} incompatible with "this" of type ${e.constructor.name}`),e.g.i||z(`cannot call emscripten binding method ${n} on deleted object`),He(e.g.i,e.g.j.h,t.h)}function tt(e){e>=R.ua&&--R.get(e).Aa===0&&R.$a(e)}function nt(e,t,n){switch(t){case 0:return function(e){return this.fromWireType((n?w:T)[e])};case 1:return function(e){return this.fromWireType((n?E:D)[e>>1])};case 2:return function(e){return this.fromWireType((n?O:k)[e>>2])};default:throw TypeError(`Unknown integer type: `+e)}}function rt(e){if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e}function it(e,t){switch(t){case 2:return function(e){return this.fromWireType(A[e>>2])};case 3:return function(e){return this.fromWireType(ee[e>>3])};default:throw TypeError(`Unknown float type: `+e)}}function at(e,t,n){switch(t){case 0:return n?function(e){return w[e]}:function(e){return T[e]};case 1:return n?function(e){return E[e>>1]}:function(e){return D[e>>1]};case 2:return n?function(e){return O[e>>2]}:function(e){return k[e>>2]};default:throw TypeError(`Unknown integer type: `+e)}}var ot=(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){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(127>=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|a&63}}t[n]=0}},st=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},ct=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,lt=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&ct)return ct.decode(e.subarray(t,n));for(r=``;t<n;){var i=e[t++];if(i&128){var a=e[t++]&63;if((i&224)==192)r+=String.fromCharCode((i&31)<<6|a);else{var o=e[t++]&63;i=(i&240)==224?(i&15)<<12|a<<6|o:(i&7)<<18|a<<12|o<<6|e[t++]&63,65536>i?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else r+=String.fromCharCode(i)}return r},ut=typeof TextDecoder<`u`?new TextDecoder(`utf-16le`):void 0,dt=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&D[n];)++n;if(n<<=1,32<n-e&&ut)return ut.decode(T.subarray(e,n));for(n=``,r=0;!(r>=t/2);++r){var i=E[e+2*r>>1];if(i==0)break;n+=String.fromCharCode(i)}return n},ft=(e,t,n)=>{if(n===void 0&&(n=2147483647),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)E[t>>1]=e.charCodeAt(i),t+=2;return E[t>>1]=0,t-r},pt=e=>2*e.length,mt=(e,t)=>{for(var n=0,r=``;!(n>=t/4);){var i=O[e+4*n>>2];if(i==0)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023)):r+=String.fromCharCode(i)}return r},ht=(e,t,n)=>{if(n===void 0&&(n=2147483647),4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(O[t>>2]=a,t+=4,t+4>n)break}return O[t>>2]=0,t-r},gt=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},_t={};function vt(e){var t=_t[e];return t===void 0?W(e):t}var yt=[];function bt(e){var t=yt.length;return yt.push(e),t}function xt(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=J(k[t+4*r>>2],`parameter `+r);return n}var St=[],Ct={},wt=()=>{if(!Tt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:f||`./this.program`},t;for(t in Ct)Ct[t]===void 0?delete e[t]:e[t]=Ct[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);Tt=n}return Tt},Tt,Et=[null,[],[]],Dt=e=>e%4==0&&(e%100!=0||e%400==0),Ot=[31,29,31,30,31,30,31,31,30,31,30,31],kt=[31,28,31,30,31,30,31,31,30,31,30,31];function At(e){var t=Array(st(e)+1);return ot(e,t,0,t.length),t}var jt=(e,t,n,r)=>{function i(e,t,n){for(e=typeof e==`number`?e.toString():e||``;e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,`0`)}function o(e,t){function n(e){return 0>e?-1:+(0<e)}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function c(e){var t=e.J;for(e=new Date(new Date(e.K+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(Dt(e.getFullYear())?Ot:kt)[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=O[r+40>>2];for(var u in r={qb:O[r>>2],pb:O[r+4>>2],Z:O[r+8>>2],ha:O[r+12>>2],$:O[r+16>>2],K:O[r+20>>2],C:O[r+24>>2],J:O[r+28>>2],ub:O[r+32>>2],ob:O[r+36>>2],rb:l&&l?lt(T,l):``},n=n?lt(T,n):``,l={"%c":`%a %b %d %H:%M:%S %Y`,"%D":`%m/%d/%y`,"%F":`%Y-%m-%d`,"%h":`%b`,"%r":`%I:%M:%S %p`,"%R":`%H:%M`,"%T":`%H:%M:%S`,"%x":`%m/%d/%y`,"%X":`%H:%M:%S`,"%Ec":`%c`,"%EC":`%C`,"%Ex":`%m/%d/%y`,"%EX":`%H:%M:%S`,"%Ey":`%y`,"%EY":`%Y`,"%Od":`%d`,"%Oe":`%e`,"%OH":`%H`,"%OI":`%I`,"%Om":`%m`,"%OM":`%M`,"%OS":`%S`,"%Ou":`%u`,"%OU":`%U`,"%OV":`%V`,"%Ow":`%w`,"%OW":`%W`,"%Oy":`%y`},l)n=n.replace(new RegExp(u,`g`),l[u]);var d=`Sunday Monday Tuesday Wednesday Thursday Friday Saturday`.split(` `),f=`January February March April May June July August September October November December`.split(` `);for(u in l={"%a":e=>d[e.C].substring(0,3),"%A":e=>d[e.C],"%b":e=>f[e.$].substring(0,3),"%B":e=>f[e.$],"%C":e=>a((e.K+1900)/100|0,2),"%d":e=>a(e.ha,2),"%e":e=>i(e.ha,2,` `),"%g":e=>c(e).toString().substring(2),"%G":e=>c(e),"%H":e=>a(e.Z,2),"%I":e=>(e=e.Z,e==0?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.$-1;t+=(Dt(e.K+1900)?Ot:kt)[n++]);return a(e.ha+t,3)},"%m":e=>a(e.$+1,2),"%M":e=>a(e.pb,2),"%n":()=>`
16`,"%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)t==53&&(n=(e.C+371-e.J)%7,n==4||n==3&&Dt(e.K)||(t=1));else{t=52;var n=(e.C+7-e.J-1)%7;(n==4||n==5&&Dt(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=>
16e.K+1900,"%z":e=>{e=e.ob;var t=0<=e;return e=Math.abs(e)/60,(t?`+`:`-`)+String(`0000`+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.rb,"%%":()=>`%`},n=n.replace(/%%/g,`\0\0`),l)n.includes(u)&&(n=n.replace(new RegExp(u,`g`),l[u](r)));return n=n.replace(/\0\0/g,`%`),u=At(n),u.length>t?0:(w.set(u,e),u.length-1)};Object.assign(me.prototype,{get(e){return this.G[e]},has(e){return this.G[e]!==void 0},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)}}),he=n.BindingError=class extends Error{constructor(e){super(e),this.name=`BindingError`}},R.G.push({value:void 0},{value:null},{value:!0},{value:!1}),R.ua=R.G.length,n.count_emval_handles=function(){for(var e=0,t=R.ua;t<R.G.length;++t)R.G[t]!==void 0&&++e;return e},H=n.PureVirtualError=ge(`PureVirtualError`);for(var Mt=Array(256),Nt=0;256>Nt;++Nt)Mt[Nt]=String.fromCharCode(Nt);U=Mt,n.getInheritedInstanceCount=function(){return Object.keys(q).length},n.getLiveInheritedInstances=function(){var e=[],t;for(t in q)q.hasOwnProperty(t)&&e.push(q[t]);return e},n.flushPendingDeletes=_e,n.setDelayFunction=function(e){K=e,G.length&&K&&K(_e)},Ee=n.InternalError=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Re.prototype.isAliasOf=function(e){if(!(this instanceof Re&&e instanceof Re))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},Re.prototype.clone=function(){if(this.g.i||Le(this),this.g.O)return this.g.count.value+=1,this;var e=ke,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},Re.prototype.delete=function(){this.g.i||Le(this),this.g.M&&!this.g.O&&z(`Object already scheduled for deletion`),Y(this),Se(this.g),this.g.O||(this.g.s=void 0,this.g.i=void 0)},Re.prototype.isDeleted=function(){return!this.g.i},Re.prototype.deleteLater=function(){return this.g.i||Le(this),this.g.M&&!this.g.O&&z(`Object already scheduled for deletion`),G.push(this),G.length===1&&K&&K(_e),this.g.M=!0,this},Q.prototype.Va=function(e){return this.za&&(e=this.za(e)),e},Q.prototype.pa=function(e){this.H&&this.H(e)},Q.prototype.argPackAdvance=8,Q.prototype.readValueFromPointer=Me,Q.prototype.deleteObject=function(e){e!==null&&e.delete()},Q.prototype.fromWireType=function(e){function t(){return this.V?Oe(this.h.B,{j:this.ib,i:n,A:this,s:e}):Oe(this.h.B,{j:this,i:e})}var n=this.Va(e);if(!n)return this.pa(e),null;var r=Te(this.h,n);if(r!==void 0)return r.g.count.value===0?(r.g.i=n,r.g.s=e,r.clone()):(r=r.clone(),this.pa(e),r);if(r=this.h.Ua(n),r=we[r],!r)return t.call(this);r=this.U?r.Ka:r.pointerType;var i=Ce(n,this.h,r.h);return i===null?t.call(this):this.V?Oe(r.h.B,{j:r,i,A:this,s:e}):Oe(r.h.B,{j:r,i})},Xe=n.UnboundTypeError=ge(`UnboundTypeError`);var Pt={_embind_create_inheriting_constructor:function(e,t,n){e=W(e),t=J(t,`wrapper`),n=B(n);var r=[].slice,i=t.h,a=i.B,o=i.l.B,s=i.l.constructor;for(var c in e=pe(e,function(){i.l.ya.forEach(function(e){if(this[e]===o[e])throw new H(`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&&z(`Pass correct 'this' to __construct`);var e=s.implement.apply(void 0,[this].concat(r.call(arguments)));Y(e);var t=e.g;e.notifyOnDestruction(),t.O=!0,Object.defineProperties(this,{g:{value:t}}),ke(this),e=t.i,e=ve(i,e),q.hasOwnProperty(e)?z(`Tried to register registered instance: ${e}`):q[e]=this},a.__destruct=function(){this===a&&z(`Pass correct 'this' to __destruct`),Y(this);var e=this.g.i;e=ve(i,e),q.hasOwnProperty(e)?delete q[e]:z(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(a),n)e.prototype[c]=n[c];return V(e)},_embind_finalize_value_object:function(e){var t=Ae[e];delete Ae[e];var n=t.fa,r=t.H,i=t.sa,a=i.map(e=>e.Ya).concat(i.map(e=>e.lb));X([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Wa,s=t.Xa,c=e[n+i.length],l=t.kb,u=t.mb;a[t.Sa]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>
16{var n=[];l(u,e,c.toWireType(n,t)),je(n)}}}),[{name:t.name,fromWireType:function(e){var t={},n;for(n in a)t[n]=a[n].read(e);return r(e),t},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 e!==null&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:Me,v:r}]})},_embind_register_bigint:function(){},_embind_register_bool:function(e,t,n,r,i){var a=Fe(n);t=W(t),Z(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:8,readValueFromPointer:function(e){if(n===1)var r=w;else if(n===2)r=E;else if(n===4)r=O;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,c,l,u,d,f){u=W(u),a=$(i,a),s&&=$(o,s),l&&=$(c,l),f=$(d,f);var p=fe(u);Be(p,function(){Ze(`Cannot construct ${u} due to unbound types`,[r])}),X([e,t,n],r?[r]:[],function(t){if(t=t[0],r)var n=t.h,i=n.B;else i=Re.prototype;t=pe(p,function(){if(Object.getPrototypeOf(this)!==o)throw new he(`Use 'new' to construct `+u);if(c.I===void 0)throw new he(u+` has no accessible constructor`);var e=c.I[arguments.length];if(e===void 0)throw new he(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.I).toString()}) parameters instead!`);return e.apply(this,arguments)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var c=new Ve(u,t,o,f,n,a,s,l);c.l&&(c.l.T===void 0&&(c.l.T=[]),c.l.T.push(c)),n=new Q(u,c,!0,!1),i=new Q(u+`*`,c,!1,!1);var d=new Q(u+` const*`,c,!1,!0);return we[e]={pointerType:i,Ka:d},Ke(p,t),[n,i,d]})},_embind_register_class_class_function:function(e,t,n,r,i,a,o){var s=$e(n,r);t=W(t),a=$(i,a),X([],[e],function(e){function r(){Ze(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]);var c=e.h.constructor;return c[t]===void 0?(r.L=n-1,c[t]=r):(ze(c,t,i),c[t].m[n-1]=r),X([],s,function(r){if(r=Qe(i,[r[0],null].concat(r.slice(1)),null,a,o),c[t].m===void 0?(r.L=n-1,c[t]=r):c[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=W(t),a=$(i,a),X([],[e],function(e){e=e[0];var i=`${e.name}.${t}`,c={get(){Ze(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return c.set=s?()=>{Ze(`Cannot access ${i} due to unbound types`,[n])}:()=>{z(`${i} is a read-only property`)},Object.defineProperty(e.h.constructor,t,c),X([],[n],function(n){n=n[0];var i={get(){return n.fromWireType(a(r))},enumerable:!0};return s&&(s=$(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),je(t)}),Object.defineProperty(e.h.constructor,t,i),[]}),[]})},_embind_register_class_constructor:function(e,t,n,r,i,a){var o=$e(t,n);i=$(r,i),X([],[e],function(e){e=e[0];var n=`constructor ${e.name}`;if(e.h.I===void 0&&(e.h.I=[]),e.h.I[t-1]!==void 0)throw new he(`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]=()=>{Ze(`Cannot construct ${e.name} due to unbound types`,o)},X([],o,function(r){return r.splice(1,0,null),e.h.I[t-1]=Qe(n,r,null,i,a),[]}),[]})},_embind_register_class_function:function(e,t,n,r,i,a,o,s){var c=$e(n,r);t=W(t),a=$(i,a),X([],[e],function(e){function r(){Ze(`Cannot call ${i} due to unbound types`,c)}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,u=l[t];return u===void 0||u.m===void 0&&u.className!==e.name&&u.L===n-2?(r.L=n-2,r.className=e.name,l[t]=r):(ze(l,t,i),l[t].m[n-2]=r),X([],c,function(r){return r=Qe(i,r,e,a,o),l[t].m===void 0?(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,c,l){t=W(t),i=$(r,i),X([],[e],function(e){e=e[0];var r=`${e.name}.${t}`,u={get(){Ze(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>{Ze(`Cannot access ${r} due to unbound types`,[n,o])}:()=>{z(r+` is a read-only property`)},Object.defineProperty(e.h.B,t,u),X([],c?[n,o]:[n],function(n){var o=n[0],u={get(){var t=et(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=$(s,c);var d=n[1];u.set=function(t){var n=et(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),je(i)}}return Object.defineProperty(e.h.B,t,u),[]}),[]})},_embind_register_emval:function(e,t){t=W(t),Z(e,{name:t,fromWireType:function(e){var t=B(e);return tt(e),t},toWireType:function(e,t){return V(t)},argPackAdvance:8,readValueFromPointer:Me,v:null})},_embind_register_enum:function(e,t,n,r){function i(){}n=Fe(n),t=W(t),i.values={},Z(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:nt(t,n,r),v:null}
vendor: 4,461 bytes, line 16
16),Be(t,i)},_embind_register_enum_value:function(e,t,n){var r=J(e,`enum`);t=W(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:pe(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:function(e,t,n){n=Fe(n),t=W(t),Z(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:it(t,n),v:null})},_embind_register_function:function(e,t,n,r,i,a){var o=$e(t,n);e=W(e),i=$(r,i),Be(e,function(){Ze(`Cannot call ${e} due to unbound types`,o)},t-1),X([],o,function(n){return Ke(e,Qe(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]})},_embind_register_integer:function(e,t,n,r,i){t=W(t),i===-1&&(i=4294967295),i=Fe(n);var a=e=>e;if(r===0){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},Z(e,{name:t,fromWireType:a,toWireType:n,argPackAdvance:8,readValueFromPointer:at(t,i,r!==0),v:null})},_embind_register_memory_view:function(e,t,n){function r(e){e>>=2;var t=k;return new i(t.buffer,t[e+1],t[e])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];n=W(n),Z(e,{name:n,fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ab:!0})},_embind_register_std_string:function(e,t){t=W(t);var n=t===`std::string`;Z(e,{name:t,fromWireType:function(e){var t=k[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||T[o]==0){if(i=i?lt(T,i,o-i):``,s===void 0)var s=i;else s+=`\0`,s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(T[r+a]);s=s.join(``)}return Ft(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r=typeof t==`string`;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||z(`Cannot pass non-string to std::string`);var i=n&&r?st(t):t.length,a=It(4+i+1),o=a+4;if(k[a>>2]=i,n&&r)ot(t,T,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);255<s&&(Ft(o),z(`String has UTF-16 code units that do not fit in 8 bits`)),T[o+r]=s}else for(r=0;r<i;++r)T[o+r]=t[r];return e!==null&&e.push(Ft,a),a},argPackAdvance:8,readValueFromPointer:Me,v:function(e){Ft(e)}})},_embind_register_std_wstring:function(e,t,n){if(n=W(n),t===2)var r=dt,i=ft,a=pt,o=()=>D,s=1;else t===4&&(r=mt,i=ht,a=gt,o=()=>k,s=2);Z(e,{name:n,fromWireType:function(e){for(var n=k[e>>2],i=o(),a,c=e+4,l=0;l<=n;++l){var u=e+4+l*t;(l==n||i[u>>s]==0)&&(c=r(c,u-c),a===void 0?a=c:(a+=`\0`,a+=c),c=u+t)}return Ft(e),a},toWireType:function(e,r){typeof r!=`string`&&z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),c=It(4+o+t);return k[c>>2]=o>>s,i(r,c+4,o+t),e!==null&&e.push(Ft,c),c},argPackAdvance:8,readValueFromPointer:Me,v:function(e){Ft(e)}})},_embind_register_value_object:function(e,t,n,r,i,a){Ae[e]={name:W(t),fa:$(n,r),H:$(i,a),sa:[]}},_embind_register_value_object_field:function(e,t,n,r,i,a,o,s,c,l){Ae[e].sa.push({Sa:W(t),Ya:n,Wa:$(r,i),Xa:a,lb:o,kb:$(s,c),mb:l})},_embind_register_void:function(e,t){t=W(t),Z(e,{cb:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(e,t,n){e=B(e),t=J(t,`emval::as`);var r=[],i=V(r);return k[n>>2]=i,t.toWireType(r,e)},_emval_call_method:function(e,t,n,r,i){e=yt[e],t=B(t),n=vt(n);var a=[];return k[r>>2]=V(a),e(t,n,a,i)},_emval_call_void_method:function(e,t,n,r){e=yt[e],t=B(t),n=vt(n),e(t,n,null,r)},_emval_decref:tt,_emval_get_method_caller:function(e,t){var n=xt(e,t),r=n[0];t=r.name+`_$`+n.slice(1).map(function(e){return e.name}).join(`_`)+`$`;var i=St[t];if(i!==void 0)return i;var a=Array(e-1);return i=bt((t,i,o,s)=>{for(var c=0,l=0;l<e-1;++l)a[l]=n[l+1].readValueFromPointer(s+c),c+=n[l+1].argPackAdvance;for(t=t[i].apply(t,a),l=0;l<e-1;++l)n[l+1].Na&&n[l+1].Na(a[l]);if(!r.cb)return r.toWireType(o,t)}),St[t]=i},_emval_get_module_property:function(e){return e=vt(e),V(n[e])},_emval_get_property:function(e,t){return e=B(e),t=B(t),V(e[t])},_emval_incref:function(e){4<e&&(R.get(e).Aa+=1)},_emval_new_array:function(){return V([])},_emval_new_cstring:function(e){return V(vt(e))},_emval_new_object:function(){return V({})},_emval_run_destructors:function(e){je(B(e)),tt(e)},_emval_set_property:function(e,t,n){e=B(e),t=B(t),n=B(n),e[t]=n},_emval_take_value:function(e,t){return e=J(e,`_emval_take_value`),e=e.readValueFromPointer(t),V(e)},abort:()=>{ae(``)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>
16performance.now(),emscripten_memcpy_big:(e,t,n)=>T.copyWithin(e,t,t+n),emscripten_resize_heap:e=>{var t=T.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);a:{i=i.min.call(i,2147483648,r+(65536-r%65536)%65536)-x.buffer.byteLength+65535>>>16;try{x.grow(i),te();var a=1;break a}catch{}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return wt().forEach(function(r,i){var a=t+n;for(i=k[e+4*i>>2]=a,a=0;a<r.length;++a)w[i++>>0]=r.charCodeAt(a);w[i>>0]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=wt();k[e>>2]=n.length;var r=0;return n.forEach(function(e){r+=e.length+1}),k[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=k[t>>2],s=k[t+4>>2];t+=8;for(var c=0;c<s;c++){var l=T[o+c],u=Et[e];l===0||l===10?((e===1?v:y)(lt(u,0)),u.length=0):u.push(l)}i+=s}return k[r>>2]=i,0},strftime_l:(e,t,n,r)=>jt(e,t,n,r)};(function(){function e(e){if(S=e=e.exports,x=S.memory,te(),ne=S.__indirect_function_table,j.unshift(S.__wasm_call_ctors),P--,n.monitorRunDependencies&&n.monitorRunDependencies(P),P==0&&(ie!==null&&(clearInterval(ie),ie=null),F)){var t=F;F=null,t()}return e}var t={env:Pt,wasi_snapshot_preview1:Pt};if(P++,n.monitorRunDependencies&&n.monitorRunDependencies(P),n.instantiateWasm)try{return n.instantiateWasm(t,e)}catch(e){y(`Module.instantiateWasm callback failed with error: `+e),i(e)}return ue(t,function(t){e(t.instance)}).catch(i),{}})();var Ft=e=>(Ft=S.free)(e),It=e=>(It=S.malloc)(e),Lt=e=>(Lt=S.__getTypeName)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=S._embind_initialize_bindings)(),n.dynCall_jiji=(e,t,r,i,a)=>(n.dynCall_jiji=S.dynCall_jiji)(e,t,r,i,a),n.dynCall_viijii=(e,t,r,i,a,o,s)=>(n.dynCall_viijii=S.dynCall_viijii)(e,t,r,i,a,o,s),n.dynCall_iiiiij=(e,t,r,i,a,o,s)=>(n.dynCall_iiiiij=S.dynCall_iiiiij)(e,t,r,i,a,o,s),n.dynCall_iiiiijj=(e,t,r,i,a,o,s,c,l)=>(n.dynCall_iiiiijj=S.dynCall_iiiiijj)(e,t,r,i,a,o,s,c,l),n.dynCall_iiiiiijj=(e,t,r,i,a,o,s,c,l,u)=>(n.dynCall_iiiiiijj=S.dynCall_iiiiiijj)(e,t,r,i,a,o,s,c,l,u);var Rt;F=function e(){Rt||zt(),Rt||(F=e)};function zt(){function e(){if(!Rt&&(Rt=!0,n.calledRun=!0,!C)){if(de(j),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),n.postRun)for(typeof n.postRun==`function`&&(n.postRun=[n.postRun]);n.postRun.length;){var e=n.postRun.shift();M.unshift(e)}de(M)}}if(!(0<P)){if(n.preRun)for(typeof n.preRun==`function`&&(n.preRun=[n.preRun]);n.preRun.length;)N();de(re),0<P||(n.setStatus?(n.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){n.setStatus(``)},1),e()},1)):e())}}if(n.preInit)for(typeof n.preInit==`function`&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();return zt(),t.ready})})()}),(e=>{e.exports=JSON.parse(`{"name":"@rive-app/canvas-lite","version":"2.30.1","description":"A lite version of Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[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}
16,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 this.scrubTo!==null},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.scrubTo===null?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){return[`touchstart`,`touchmove`].indexOf(e.type)>-1&&e.touches?.length?(t||e.preventDefault(),{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}):e.type===`touchend`&&e.changedTouches?.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=a===void 0?[]:a,s=e.renderer,c=e.rive,l=e.fit,u=e.alignment,d=e.isTouchScrollEnabled,f=d!==void 0&&d,p=e.layoutScaleFactor,m=p===void 0?1:p;if(!t||!o.length||!s||!c||!n||typeof window>`u`)return null;var h=null,g=!1,_=function(e){if(g&&e instanceof MouseEvent){e.type==`mouseup`&&(g=!1);return}g=f&&e.type===`touchend`&&h===`touchstart`,h=e.type;var t=e.currentTarget.getBoundingClientRect(),r=i(e,f),a=r.clientX,s=r.clientY;if(!(!a&&!s)){var d=a-t.left,p=s-t.top,_=c.computeAlignment(l,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,m),v=new c.Mat2D;_.invert(v);var y=new c.Vec2D(d,p),b=c.mapXY(v,y),x=b.x(),S=b.y();switch(b.delete(),v.delete(),y.delete(),_.delete(),e.type){case`mouseout`:for(var C=0,w=o;C<w.length;C++){var T=w[C];T.pointerMove(x,S)}break;case`touchmove`:case`mouseover`:case`mousemove`:for(var E=0,D=o;E<D.length;E++){var T=D[E];T.pointerMove(x,S)}break;case`touchstart`:case`mousedown`:for(var O=0,k=o;O<k.length;O++){var T=k[O];T.pointerDown(x,S)}break;case`touchend`:case`mouseup`:for(var A=0,ee=o;A<ee.length;A++){var T=ee[A];T.pointerUp(x,S)}break;default:}}}.bind(r);return t.addEventListener(`mouseover`,_),t.addEventListener(`mouseout`,_),t.addEventListener(`mousemove`,_),t.addEventListener(`mousedown`,_),t.addEventListener(`mouseup`,_),t.addEventListener(`touchmove`,_,{passive:f}),t.addEventListener(`touchstart`,_,{passive:f}),t.addEventListener(`touchend`,_),function(){t.removeEventListener(`mouseover`,_),t.removeEventListener(`mouseout`,_),t.removeEventListener(`mousemove`,_),t.removeEventListener(`mousedown`,_),t.removeEventListener(`mouseup`,_),t.removeEventListener(`touchmove`,_),t.removeEventListener(`touchstart`,_),t.removeEventListener(`touchend`,_)}}}),((e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>f});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,c=[`.`,`/`],l=`about:blank`;function u(e){return c.indexOf(e[0])>-1}function d(e){return e.replace(o,``).replace(i,function(e,t){return String.fromCharCode(t)})}function f(e){if(!e)return l;var t=d(e).replace(a,``).replace(o,``).trim();if(!t)return l;if(u(t))return t;var n=t.match(s);if(!n)return t;var i=n[0];return r.test(i)?l:t}}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>d,AudioWrapper:()=>o,CustomFileAssetLoaderWrapper:()=>c,FileAssetWrapper:()=>l,Finalizable:()=>i,FontAssetWrapper:()=>f,FontWrapper:()=>s,ImageAssetWrapper:()=>u,ImageWrapper:()=>a,finalizationRegistry:()=>m});var r=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
16t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(){function e(){this.selfUnref=!1}return e}(),a=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(i),o=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(i),s=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(i),c=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 u(e):e.isAudio?n=new d(e):e.isFont&&(n=new f(e)),this._assetLoaderCallback(n,t)},e}(),l=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),u=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(l),d=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(l),f=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(l),p=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),m=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:p)(function(e){e.unref()})})],t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>m,DataEnum:()=>re,EventType:()=>S,Fit:()=>p,Layout:()=>h,LoopType:()=>C,Rive:()=>te,RiveEventType:()=>y,RiveFile:()=>ee,RuntimeLoader:()=>g,StateMachineInput:()=>v,StateMachineInputType:()=>_,Testing:()=>ue,ViewModel:()=>ne,ViewModelInstance:()=>M,ViewModelInstanceAssetImage:()=>I,ViewModelInstanceBoolean:()=>F,ViewModelInstanceColor:()=>ce,ViewModelInstanceEnum:()=>oe,ViewModelInstanceList:()=>se,ViewModelInstanceNumber:()=>ie,ViewModelInstanceString:()=>P,ViewModelInstanceTrigger:()=>ae,ViewModelInstanceValue:()=>N,decodeAudio:()=>de,decodeFont:()=>pe,decodeImage:()=>fe});var e=n(1),t=n(2),i=n(3),a=n(5),o=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
16t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},l=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},u=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},d=function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return t}(Error),f=function(e){return e&&e.isHandledError?e.message:`Problem loading file; may be corrupt!`},p;(function(e){e.Cover=`cover`,e.Contain=`contain`,e.Fill=`fill`,e.FitWidth=`fitWidth`,e.FitHeight=`fitHeight`,e.None=`none`,e.ScaleDown=`scaleDown`,e.Layout=`layout`})(p||={});var m;(function(e){e.Center=`center`,e.TopLeft=`topLeft`,e.TopCenter=`topCenter`,e.TopRight=`topRight`,e.CenterLeft=`centerLeft`,e.CenterRight=`centerRight`,e.BottomLeft=`bottomLeft`,e.BottomCenter=`bottomCenter`,e.BottomRight=`bottomRight`})(m||={});var h=function(){function e(e){this.fit=e?.fit??p.Contain,this.alignment=e?.alignment??m.Center,this.layoutScaleFactor=e?.layoutScaleFactor??1,this.minX=e?.minX??0,this.minY=e?.minY??0,this.maxX=e?.maxX??0,this.maxY=e?.maxY??0}return e.new=function(t){var n=t.fit,r=t.alignment,i=t.minX,a=t.minY,o=t.maxX,s=t.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new e({fit:n,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},e.prototype.copyWith=function(t){var n=t.fit,r=t.alignment,i=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,c=t.maxY;return new e({fit:n??this.fit,alignment:r??this.alignment,layoutScaleFactor:i??this.layoutScaleFactor,minX:a??this.minX,minY:o??this.minY,maxX:s??this.maxX,maxY:c??this.maxY})},e.prototype.runtimeFit=function(e){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var t=this.fit===p.Cover?e.Fit.cover:this.fit===p.Contain?e.Fit.contain:this.fit===p.Fill?e.Fit.fill:this.fit===p.FitWidth?e.Fit.fitWidth:this.fit===p.FitHeight?e.Fit.fitHeight:this.fit===p.ScaleDown?e.Fit.scaleDown:this.fit===p.Layout?e.Fit.layout:e.Fit.none;return this.cachedRuntimeFit=t,t},e.prototype.runtimeAlignment=function(e){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var t=this.alignment===m.TopLeft?e.Alignment.topLeft:this.alignment===m.TopCenter?e.Alignment.topCenter:this.alignment===m.TopRight?e.Alignment.topRight:this.alignment===m.CenterLeft?e.Alignment.centerLeft:this.alignment===m.CenterRight?e.Alignment.centerRight:this.alignment===m.BottomLeft?e.Alignment.bottomLeft:this.alignment===m.BottomCenter?e.Alignment.bottomCenter:this.alignment===m.BottomRight?e.Alignment.bottomRight:e.Alignment.center;return this.cachedRuntimeAlignment=t,t},e}(),g=function(){function n(){}return n.loadRuntime=function(){e.default({locateFile:function(){return n.wasmURL}}).then(function(e){var t;for(n.runtime=e;n.callBackQueue.length>0;)(t=n.callBackQueue.shift())==null||t(n.runtime)}).catch(function(e){var r={message:e?.message||`Unknown error`,type:e?.name||`Error`,wasmError:e instanceof WebAssembly.CompileError||e instanceof WebAssembly.RuntimeError,originalError:e};
16console.debug(`Rive WASM load error details:`,r);var i=`https://cdn.jsdelivr.net/npm/${t.name}@${t.version}/rive_fallback.wasm`;if(n.wasmURL.toLowerCase()!==i)console.warn(`Failed to load WASM from ${n.wasmURL} (${r.message}), trying jsdelivr as a backup`),n.setWasmUrl(i),n.loadRuntime();else{var a=[`Could not load Rive WASM file from ${n.wasmURL} or ${i}.`,`Possible reasons:`,`- Network connection is down`,`- WebAssembly is not supported in this environment`,`- The WASM file is corrupted or incompatible`,`
17Error details:`,`- Type: ${r.type}`,`- Message: ${r.message}`,`- WebAssembly-specific error: ${r.wasmError}`,`
18To resolve, you may need to:`,`1. Check your network connection`,`2. Set a new WASM source via RuntimeLoader.setWasmUrl()`,`3. Call RuntimeLoader.loadRuntime() again`].join(`
19`);console.error(a)}})},n.getInstance=function(e){n.isLoading||(n.isLoading=!0,n.loadRuntime()),n.runtime?e(n.runtime):n.callBackQueue.push(e)},n.awaitInstance=function(){return new Promise(function(e){return n.getInstance(function(t){return e(t)})})},n.setWasmUrl=function(e){n.wasmURL=e},n.getWasmUrl=function(){return n.wasmURL},n.isLoading=!1,n.callBackQueue=[],n.wasmURL=`https://unpkg.com/${t.name}@${t.version}/rive.wasm`,n}(),_;(function(e){e[e.Number=56]=`Number`,e[e.Trigger=58]=`Trigger`,e[e.Boolean=59]=`Boolean`})(_||={});var v=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===_.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),y;(function(e){e[e.General=128]=`General`,e[e.OpenUrl=131]=`OpenUrl`})(y||={});var b=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){if(e.type===t.SMIInput.bool)return new v(_.Boolean,e.asBool());if(e.type===t.SMIInput.number)return new v(_.Number,e.asNumber());if(e.type===t.SMIInput.trigger)return new v(_.Trigger,e.asTrigger())},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){e.runtimeInstance!=null&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),x=function(){function e(e,t,n,r,i){r===void 0&&(r=[]),i===void 0&&(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(n===void 0&&(n=!0),e=L(e),e.length===0)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]),c=a.indexOf(e[o]);if(s>=0||c>=0)s>=0?this.animations[s].playing=t:this.stateMachines[c].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var u=new i.Animation(l,this.artboard,this.runtime,t);u.advance(0),u.apply(1),this.animations.push(u)}else{var d=this.artboard.stateMachineByName(e[o]);if(d){var f=new b(d,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:S.Play,data:this.playing}):this.eventManager.fire({type:S.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 a=n.indexOf(e[r]);if(a>=0)this.animations[a].playing=t;else{var o=this.artboard.animationByName(e[r]);if(o){var s=new i.Animation(o,this.artboard,this.runtime,t);s.advance(0),s.apply(1),this.animations.push(s)}else console.error(`Animation with name ${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 b(a,this.runtime,t,this.artboard);this.stateMachines.push(o),t||o.advanceAndApply(0)}else console.warn(`State Machine with name ${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)});
19return 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=L(e);var n=[];if(e.length===0)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var i=this.stateMachines.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(i.map(function(e){return e.name}))}return this.eventManager.fire({type:S.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 this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){t===void 0&&(t=!0);var n;return this.animations.length===0&&this.stateMachines.length===0&&(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];n.loopValue===0&&n.loopCount?(n.loopCount=0,this.stop(n.name)):n.loopValue===1&&n.loopCount?(this.eventManager.fire({type:S.Loop,data:{animation:n.name,type:C.Loop}}),n.loopCount=0):n.loopValue===2&&n.loopCount>1&&(this.eventManager.fire({type:S.Loop,data:{animation:n.name,type:C.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:S.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:S.Advance,data:e})},e}(),S;(function(e){e.Load=`load`,e.LoadError=`loaderror`,e.Play=`play`,e.Pause=`pause`,e.Stop=`stop`,e.Loop=`loop`,e.Draw=`draw`,e.Advance=`advance`,e.StateChange=`statechange`,e.RiveEvent=`riveevent`,e.AudioStatusChange=`audiostatuschange`})(S||={});var C;
19(function(e){e.OneShot=`oneshot`,e.Loop=`loop`,e.PingPong=`pingpong`})(C||={});var w=function(){function e(e){e===void 0&&(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}(),T=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();e?.action&&e.action(),e?.event&&this.eventManager.fire(e.event)}},e}(),E;(function(e){e[e.AVAILABLE=0]=`AVAILABLE`,e[e.UNAVAILABLE=1]=`UNAVAILABLE`})(E||={});var D=new(function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=E.UNAVAILABLE,t}return t.prototype.delay=function(e){return c(this,void 0,void 0,function(){return l(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:S.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._enabled||(this._enabled=!0,this._status=E.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:if(!(this._status===E.UNAVAILABLE&&this._audioContext!==null))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 c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window>`u`?(this.enableAudio(),[3,5]):[3,1]);case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status===E.UNAVAILABLE?[4,this.testAudio()]:[3,5];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener(`pointerdown`,function(){return c(e,void 0,void 0,function(){return l(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===E.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(w)),O=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),k=globalThis.ResizeObserver||O,A=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);n===null?e._resizeObserver.unobserve(t.target):n.onResize(t.target.clientWidth==0||t.target.clientHeight==0)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new k(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}()),ee=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=typeof e.enableRiveAssetCDN!=`boolean`||e.enableRiveAssetCDN,this.eventManager=new w,e.onLoad&&this.on(S.Load,e.onLoad),e.onLoadError&&this.on(S.LoadError,e.onLoadError)}return e.prototype.initData=function(){return c(this,void 0,void 0,function(){var t,n,r,i,o;return l(this,function(s){switch(s.label){case 0:return this.src?(t=this,[4,le(this.src)]):[3,2];case 1:t.buffer=s.sent(),s.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(r=new a.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),n=r.assetLoader),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:return i.file=s.sent(),this.destroyed?((o=this.file)==null||o.delete(),this.file=null,[2]):(this.file===null?this.fireLoadError(e.fileLoadErrorMessage):this.eventManager.fire({type:S.Load,data:this}),[2])}})})},e.prototype.init=function(){return c(this,void 0,void 0,function(){var t,n;return l(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,g.awaitInstance()];case 2:return t.runtime=r.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:S.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,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),(e=this.file)==null||e.delete(),this.file=null,this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.missingErrorMessage=`Rive source file or data buffer required`,e.fileLoadErrorMessage=`The file failed to load`,e}(),te=function(){function e(e){var t=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 n=t._hasZeroSize!==e;t._hasZeroSize=e,e?(!t._layout.maxX||!t._layout.maxY)&&t.resizeToCanvas():n&&t.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=A.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=e.layout??new h,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.enableRiveAssetCDN=e.enableRiveAssetCDN===void 0||e.enableRiveAssetCDN,this.eventManager=new w,e.onLoad&&this.on(S.Load,e.onLoad),e.onLoadError&&this.on(S.LoadError,e.onLoadError),e.onPlay&&this.on(S.Play,e.onPlay),e.onPause&&this.on(S.Pause,e.onPause),e.onStop&&this.on(S.Stop,e.onStop),e.onLoop&&this.on(S.Loop,e.onLoop),e.onStateChange&&this.on(S.StateChange,e.onStateChange),e.onAdvance&&this.on(S.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(S.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(S.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(S.Play,e.onplay),e.on
19pause&&!e.onPause&&this.on(S.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(S.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(S.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(S.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new T(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(e.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new e(t)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(t){var n=this,r=t.src,i=t.buffer,a=t.riveFile,o=t.animations,s=t.stateMachines,c=t.artboard,l=t.autoplay,u=l!==void 0&&l,f=t.useOffscreenRenderer,p=f!==void 0&&f,m=t.autoBind,h=m!==void 0&&m;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new d(e.missingErrorMessage);var _=L(o),v=L(s);this.loaded=!1,this.readyForPlaying=!1,g.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,p),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(c,_,v,u,h).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){console.error(e)})}},e.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,a.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})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&=(this.eventCleanup(),null)},e.prototype.initializeAudio=function(){var e=this;D.status==E.UNAVAILABLE&&this.artboard?.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:S.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}},D.add(this._audioEventListener),D.establishAudio())},e.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)},e.prototype.initData=function(e,t,n,r,i){return c(this,void 0,void 0,function(){var a,o,s;return l(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),this.riveFile==null?(a=new ee({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=a,[4,a.init()]):[3,2];case 1:if(c.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];c.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:S.Load,data:this.src??`buffer`}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=c.sent(),s=f(o),console.warn(s),this.eventManager.fire({type:S.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},e.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var a=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!a){var o=`Invalid artboard name or no default artboard`;console.warn(o),this.eventManager.fire({type:S.LoadError,data:o});return}if(this.artboard=a,a.volume=this._volume*D.systemVolume,this.artboard.animationCount()<1){var o=`Artboard has no animations`;throw this.eventManager.fire({type:S.LoadError,data:o}),o}this.animator=new x(this.runtime,this.artboard,this.eventManager);var s;if(t.length>0||n.length>0?(s=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):s=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?S.Play:S.Pause,data:s}}),i){var c=this.file.defaultArtboardViewModel(a);if(c!==null){var l=c.defaultInstance();if(l!==null){var u=new M(l,null);this.bindViewModelInstance(u)}}}}},e.prototype.drawFrame=function(){var e;(document==null?void 0:document.timeline)?.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(e=this.runtime)==null||e.resolveAnimationFrame()):this.startRendering()},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||=e,this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,t?.());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var o=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),s=0,c=o;s<c.length;s++){var l=c[s];l.advance(i),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var u=this.animator.stateMachines.filter(function(e){return e.playing}),d=0,f=u;d<f.length;d++){var p=f[d],m=p.reportedEventCount();if(m)for(var h=0;h<m;h++){var g=p.reportedEventAt(h);if(g)if(g.type===y.OpenUrl){if(this.eventManager.fire({type:S.RiveEvent,data:g}),this.automaticallyHandleEvents){var _=document.createElement(`a`),v=g,b=v.url,x=v.target,C=(0,a.sanitizeUrl)(b);b&&_.setAttribute(`href`,C),x&&_.setAttribute(`target`,x),C&&C!==a.BLANK_URL&&_.click()}}else this.eventManager.fire({type:S.RiveEvent,data:g})}p.advanceAndApply(i)}this.animator.stateMachines.length==0&&this.artboard.advance(i);var w=this.renderer;w.clear(),w.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(w),w.restore(
19),w.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var T=performance.now();for(this.frameTimes.push(T),this.durations.push(T-r);this.frameTimes[0]<=T-1e3;)this.frameTimes.shift(),this.durations.shift();(n=this._viewModelInstance)==null||n.handleCallbacks(),this.animator.isPlaying?this.startRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(e.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),e.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&A.remove(this._observed),this.removeRiveListeners(),this.file&&=((e=this.riveFile)==null||e.cleanup(),null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(D.remove(this._audioEventListener),this._audioEventListener=null),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;(e=this.renderer)==null||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&=(this.artboard.delete(),null)},e.prototype.retrieveTextRun=function(e){if(!e){console.warn(`No text run name provided`);return}if(!this.artboard){console.warn(`Tried to access text run, but the Artboard is null`);return}var t=this.artboard.textRun(e);if(!t){console.warn(`Could not access a text run with name '${e}' in the '${this.artboard?.name}' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime.`);return}return t},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.play(e,t)}});return}this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},e.prototype.pause=function(e){var t=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.pause(e)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},e.prototype.scrub=function(e,t){var n=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.scrub(e,t)}});return}this.animator.scrub(e,t||0),this.drawFrame()},e.prototype.stop=function(e){var t=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.stop(e)}});return}this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},e.prototype.reset=function(e){var t=e?.artboard,n=L(e?.animations),r=L(e?.stateMachines),i=e?.autoplay??!1,a=e?.autoBind??!1;this.cleanupInstances(),this.initArtboard(t,n,r,i,a),this.taskQueue.process()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,(!e.maxX||!e.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var t=this.canvas.getBoundingClientRect(),n=t.width,r=t.height,i=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=i,this.canvas.width=i*n,this.canvas.height=i*r,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===p.Layout){var a=this._layout.layoutScaleFactor;this.artboard.width=n/a,this.artboard.height=r/a}}},Object.defineProperty(e.prototype,"source",{get:function(){return this.src}
19,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:``},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.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}),e.prototype.stateMachineInputs=function(e){if(this.loaded)return this.animator.stateMachines.find(function(t){return t.name===e})?.inputs},e.prototype.retrieveInputAtPath=function(e,t){if(!e){console.warn(`No input name provided for path '${t}'`);return}if(!this.artboard){console.warn(`Tried to access input: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.inputByPath(e,t);if(!n){console.warn(`Could not access an input with name: '${e}', at path:'${t}'`);return}return n},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===_.Boolean?r.asBool().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a boolean`))},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===_.Number?r.asNumber().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a number`))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===_.Trigger?n.asTrigger().fire():console.warn(`Input with name: '${e}', at path:'${t}' is not a trigger`))},e.prototype.retrieveTextAtPath=function(e,t){if(!e){console.warn(`No text name provided for path '${t}'`);return}if(!t){console.warn(`No path provided for text '${e}'`);return}if(!this.artboard){console.warn(`Tried to access text: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.textByPath(e,t);if(!n){console.warn(`Could not access text with name: '${e}', at path:'${t}'`);return}return n},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(!n){console.warn(`Could not get text with name: '${e}', at path:'${t}'`);return}return n.text},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);if(!r){console.warn(`Could not set text with name: '${e}', at path:'${n}'`);return}r.text=t},Object.defineProperty(e.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(e.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(e.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),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.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.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();
19o++){for(var s=n.stateMachineByIndex(o),c=s.name,l=new this.runtime.StateMachineInstance(s,n),u=[],d=0;d<l.inputCount();d++){var f=l.input(d);u.push({name:f.name,type:f.type})}r.stateMachines.push({name:c,inputs:u})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.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*D.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardWidth",{get:function(){return this.artboard?this.artboard.width:this._artboardWidth??0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardHeight",{get:function(){return this.artboard?this.artboard.height:this._artboardHeight??0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),e.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(e.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),(t=this._viewModelInstance)==null||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(e.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return t===null?null:new ne(t)},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return t===null?null:new ne(t)},e.prototype.enums=function(){if(this._dataEnums===null){var e=this.file.enums();this._dataEnums=e.map(function(e){return new re(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new ne(e)}return null},e.missingErrorMessage=`Rive source file or data buffer required`,e.cleanupErrorMessage=`Attempt to use file after calling cleanup.`,e}(),ne=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 t===null?null:new M(t,null)},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);return t===null?null:new M(t,null)},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();return e===null?null:new M(e,null)},e.prototype.instance=function(){var e=this._viewModel.instance();return e===null?null:new M(e,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}(),re=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}(),j;(function(e){e.Number=`number`,e.String=`string`,e.Boolean=`boolean`,e.Color=`color`,e.Trigger=`trigger`,e.Enum=`enum`,e.List=`list`,e.Image=`image`})(j||={});var M=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=e,t!==null&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance}
19,enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){this._propertiesWithCallbacks.length!==0&&(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);t!==-1&&(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}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&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}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split(`/`);return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return n===null?null:t==e.length-1?n:n.viewModelFromPathSegments(e,t++)},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r=this.internalViewModelInstance(e[t]);return r===null?null:r.propertyFromPathSegments(e,t+1,n)}var i=null;switch(n){case j.Number:if(i=this._runtimeInstance?.number(e[t])??null,i!==null)return new ie(i,this);break;case j.String:if(i=this._runtimeInstance?.string(e[t])??null,i!==null)return new P(i,this);break;case j.Boolean:if(i=this._runtimeInstance?.boolean(e[t])??null,i!==null)return new F(i,this);break;case j.Color:if(i=this._runtimeInstance?.color(e[t])??null,i!==null)return new ce(i,this);break;case j.Trigger:if(i=this._runtimeInstance?.trigger(e[t])??null,i!==null)return new ae(i,this);break;case j.Enum:if(i=this._runtimeInstance?.enum(e[t])??null,i!==null)return new oe(i,this);break;case j.List:if(i=this._runtimeInstance?.list(e[t])??null,i!==null)return new se(i,this);break;case j.Image:if(i=this._runtimeInstance?.image(e[t])??null,i!==null)return new I(i,this);break}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n=this._runtimeInstance?.viewModel(t);if(n!==null){var r=new e(n,this);return r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,j.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,j.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,j.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,j.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,j.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,j.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,j.List)},e.prototype.image=function(e){return this.propertyFromPath(e,j.Image)},e.prototype.viewModel=function(e){var t=e.split(`/`),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return n==null?null:n.internalViewModelInstance(t[t.length-1])},e.prototype.internalReplaceViewModel=function(e,t){if(t.runtimeInstance!==null){var n=this._runtimeInstance?.replaceViewModel(e,t.runtimeInstance)||!1;if(n){t.internalIncrementReferenceCount();var r=this.internalViewModelInstance(e);r!==null&&(r.removeParent(this),this._children.includes(r)&&(this._children=this._children.filter(function(e){return e!==r})),r.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return n}return!1},e.prototype.replaceViewModel=function(e,t){var n=e.split(`/`);return(n.length>1?this.viewModelFromPathSegments(n.slice(0,n.length-1),0):this)?.internalReplaceViewModel(n[n.length-1],t)??!1},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,(e=this._runtimeInstance)==null||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,(e=this._runtimeInstance)==null||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){return this._runtimeInstance?.getProperties().map(function(e){return s({},e)})||[]}
19,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=u([],this._children,!0);this._children.length=0;var n=u([],this._parents,!0);this._parents.length=0,t.forEach(function(t){t.removeParent(e)}),n.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),N=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){this.callbacks.length===0&&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,this.callbacks.length===0&&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}(),P=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return 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}(N),ie=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return 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}(N),F=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return 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}(N),ae=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(N),oe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return 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}(N),se=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return e.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t)?(e.addParent(this._parentViewModel),!0):!1},t.prototype.removeInstance=function(e){e.runtimeInstance!=null&&(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 t==null?null:new M(t,this._parentViewModel)},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(N),ce=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
19,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(Math.max(0,Math.min(1,e))*255))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(N),I=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{set:function(e){this._viewModelInstanceValue.value(e?.nativeImage??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(N),le=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return n=i.sent(),[4,n.arrayBuffer()];case 2:return r=i.sent(),[2,r]}})})},L=function(e){return typeof e==`string`?[e]:e instanceof Array?e:[]},ue={EventManager:w,TaskQueueManager:T},de=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return g.getInstance(function(n){n.decodeAudio(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.AudioWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},fe=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return g.getInstance(function(n){n.decodeImage(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.ImageWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},pe=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return g.getInstance(function(n){n.decodeFont(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.FontWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})}})(),r})())}))(),r=e=>Array.isArray(e),i=e=>r(e)?e:[e],a=function(e){let t=function(e){return i(e).forEach(e=>m.set(Symbol(e.char?.innerText),a({...e}))),this},n=()=>l().filter(e=>e.typeable),r=function(e,t){let n=[...m.keys()];m.set(n[e],a(t))},a=e=>(e.shouldPauseCursor=function(){return!!(this.typeable||this.cursorable||this.deletable)},e),o=function(){m.forEach(e=>delete e.done)},s=function(){m=new Map,t(e)},c=()=>m,l=()=>Array.from(m.values()),u=e=>m.delete(e),d=()=>{let e=[];for(let[,t]of c())t.done||e.push(t);return e},f=(e=!1)=>e?l():l().filter(e=>!e.done),p=(e,t=!1)=>t?m.delete(e):m.get(e).done=!0,m=new Map;return t(e),{add:t,set:r,wipe:s,done:p,reset:o,destroy:u,getItems:f,getQueue:c,getTypeable:n,getPendingQueueItems:d}},o=`data-typeit-id`,s=`ti-cursor`,c=`END`,l={started:!1,completed:!1,frozen:!1,destroyed:!1},u={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map(e=>({opacity:e})),options:{iterations:1/0,easing:`steps(2, start)`,fill:`forwards`}}},cursorChar:`|`,cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},d=`[${o}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,f=e=>document.createElement(e),p=e=>document.createTextNode(e),m=(e,t=``)=>{let n=f(`style`);n.id=t,n.appendChild(p(e)),document.head.appendChild(n)},h=e=>(r(e)||(e=[e/2,e/2]),e),g=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t)),_=e=>e/2;function v(e){let{speed:t,deleteSpeed:n,lifeLike:r}=e;return n=n===null?t/3:n,r?[g(t,_(t)),g(n,_(n))]:[t,n]}var y=e=>Array.from(e),b=e=>([...e.childNodes].forEach(e=>
19{if(e.nodeValue){[...e.nodeValue].forEach(t=>{e.parentNode.insertBefore(p(t),e)}),e.remove();return}b(e)}),e),x=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,b(t.body)};function S(e,t=!1,n=!1){let r=e.querySelector(`.${s}`),i=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(r&&n){if(e.classList?.contains(s))return NodeFilter.FILTER_ACCEPT;if(r.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(s)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a,o=[];for(;a=i.nextNode();)a.originalParent||=a.parentNode,o.push(a);return t?o.reverse():o}function C(e){return S(x(e))}function w(e,t=!0){return t?C(e):y(e).map(p)}var T=({index:e,newIndex:t,queueItems:n,cleanUp:r})=>{for(let i=e+1;i<t+1;i++)r(n[i][0])},E=e=>Number.isInteger(e),D=({queueItems:e,selector:t,cursorPosition:n,to:r})=>{if(E(t))return t*-1;let i=new RegExp(c,`i`).test(r),a=t?[...e].reverse().findIndex(({char:e})=>{let n=e.parentElement,r=n.matches(t);return i&&r?!0:r&&n.firstChild.isSameNode(e)}):-1;a<0&&(a=i?0:e.length-1);let o=+!i;return a-n+o},O=e=>(e.forEach(clearTimeout),[]),k=(e,t)=>Array(t).fill(e),A=e=>new Promise(t=>{requestAnimationFrame(async()=>{t(await e())})}),ee=e=>e?.getAnimations().find(t=>t.id===e.dataset.tiAnimationId),te=({cursor:e,frames:t,options:n})=>{let r=e.animate(t,n);return r.pause(),r.id=e.dataset.tiAnimationId,A(()=>{A(()=>{r.play()})}),r},ne=({cursor:e,options:t,cursorOptions:n})=>{if(!e||!n)return;let r=ee(e),i;r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let a=te({cursor:e,frames:n.animation.frames,options:t});return i&&(a.currentTime=i),a},re=e=>e.func?.call(null),j=async({index:e,queueItems:t,wait:n,cursor:r,cursorOptions:i})=>{let a=t[e][1],o=[],s=e,c=a,l=()=>c&&!c.delay,u=a.shouldPauseCursor()&&i.autoPause;for(;l();)o.push(c),l()&&s++,c=t[s]?t[s][1]:null;if(o.length)return await A(async()=>{for(let e of o)await re(e)}),s-1;let d=ee(r),f;return d&&(f={...d.effect.getComputedTiming(),delay:u?i.autoPauseDelay:0}),await n(async()=>{d&&u&&d.cancel(),await A(()=>{re(a)})},a.delay),await ne({cursor:r,options:f,cursorOptions:i}),e},M=(e,t)=>{new IntersectionObserver((n,r)=>{n.forEach(n=>{n.isIntersecting&&(t(),r.unobserve(e))})},{threshold:1}).observe(e)},N=()=>Math.random().toString().substring(2,9),P=e=>`value`in e,ie=e=>P(e)?y(e.value):S(e,!0).filter(e=>!(e.childNodes.length>0)),F=e=>typeof e==`function`?e():e,ae=(e,t=document,n=!1)=>t[`querySelector${n?`All`:``}`](e),oe=e=>/body/i.test(e?.tagName),se=(e,t)=>{if(P(e)){e.value=`${e.value}${t.textContent}`;return}t.innerHTML=``;let n=oe(t.originalParent)?e:t.originalParent||e,r=ae(`.ti-cursor`,n)||null;r&&r.parentElement!==n&&(n=r.parentElement),n.insertBefore(t,r)},ce=e=>/<(.+)>(.*?)<\/(.+)>/.test(e.outerHTML),I=(e,t)=>Object.assign({},e,t),le=e=>{if(typeof e==`object`){let t={},{frames:n,options:r}=u.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||n,t.animation.options=I(r,e.animation?.options||{}),t.autoPause=e.autoPause??u.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||u.cursor.autoPauseDelay,t}return e===!0?u.cursor:e},L=(e,t)=>{if(!e)return;let n=e.parentNode;(n.childNodes.length>1||n.isSameNode(t)?e:n).remove()},ue=(e,t,n)=>{let r=t[n-1],i=ae(`.${s}`,e);e=r?.parentNode||e,e.insertBefore(i,r||null)};function de(e){return typeof e==`string`?ae(e):e}var fe={"font-family":``,"font-weight":``,"font-size":``,"font-style":``,"line-height":``,color:``,transform:`translateX(-.125em)`},pe=(e,t)=>{let n=`${`[${o}='${e}']`} .${s}`,r=getComputedStyle(t);m(`${n} { display: inline-block; width: 0; ${Object.entries(fe).reduce((e,[t,n])=>`${e} ${t}: var(--ti-cursor-${t}, ${n||r[t]});`,``)} }`,e)};function me(e){return e.replace(/<!--(.+?)-->/g,``).trim().split(/<br(?:\s*?)(?:\/)?>/)}var R=(e,t,n)=>Math.min(Math.max(t+e,0),n.length),he=(e,t,n)=>new Promise(r=>{n.push(setTimeout(async()=>{await e(),r()},t||0))}),z=class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1,firing:!1};opts;id;queue;cursor;flushCallback=null;unfreeze=()=>{};constructor(e,t={}){this.opts=I(u,t),this.element=de(e),this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=I({},l),this.id=N(),this.queue=a([{delay:this.opts.startDelay}]),this.#p(t),this.cursor=this.#h(),this.element.dataset.typeitId=this.id,m(d),this.opts.strings.length&&this.#f()}go(){return this.statuses.started?this:(this.#o(),this.opts.waitUntilVisible?(M(this.element,this.#t.b
19ind(this)),this):(this.#t(),this))}destroy(e=!0){this.timeouts=O(this.timeouts),F(e)&&this.cursor&&this.#y(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is(`destroyed`)&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let e in this.statuses)this.statuses[e]=!1;return this.element[this.#s()?`value`:`innerHTML`]=``,this}is=function(e){return this.statuses[e]};type(e,t={}){e=F(e);let{instant:n}=t,r=this.#u(t),i=w(e,this.opts.html).map(e=>({func:()=>this.#_(e),char:e,delay:n||ce(e)?0:this.#b(),typeable:e.nodeType===Node.TEXT_NODE})),a=[r[0],{func:async()=>await this.opts.beforeString(e,this)},...i,{func:async()=>await this.opts.afterString(e,this)},r[1]];return this.#c(a,t)}break(e={}){return this.#c({func:()=>this.#_(f(`BR`)),typeable:!0},e)}move(e,t={}){e=F(e);let n=this.#u(t),{instant:r,to:i}=t,a=D({queueItems:this.queue.getTypeable(),selector:e===null?``:e,to:i,cursorPosition:this.#x}),o=a<0?-1:1;return this.predictedCursorPosition=this.#x+a,this.#c([n[0],...k({func:()=>this.#n(o),delay:r?0:this.#b(),cursorable:!0},Math.abs(a)),n[1]],t)}exec(e,t={}){let n=this.#u(t);return this.#c([n[0],{func:()=>e(this)},n[1]],t)}options(e,t={}){return e=F(e),this.#d(e),this.#c({},t)}pause(e,t={}){return this.#c({delay:F(e)},t)}delete(e=null,t={}){e=F(e);let n=this.#u(t),r=e,{instant:i,to:a}=t,o=this.queue.getTypeable(),s=r===null?o.length:E(r)?r:D({queueItems:o,selector:r,cursorPosition:this.#x,to:a});return this.#c([n[0],...k({func:this.#v.bind(this),delay:i?0:this.#b(1),deletable:!0},s),n[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=null){return this.flushCallback=e||this.flushCallback,this.statuses.firing?this:(this.#o(),this.#t(!1).then(()=>{if(this.queue.getPendingQueueItems().length>0)return this.flush();this.flushCallback(),this.flushCallback=null}),this)}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#d(e)}getElement(){return this.element}empty(e={}){return this.#c({func:this.#e.bind(this)},e)}async#e(){if(this.#s()){this.element.value=``;return}this.#w.forEach(this.#y.bind(this))}async#t(e=!0){this.statuses.started=!0,this.statuses.firing=!0;let t=t=>{this.queue.done(t,!e)};try{let n=[...this.queue.getQueue()];for(let e=0;e<n.length;e++){let[r,i]=n[e];if(!i.done){if(!i.deletable||i.deletable&&this.#w.length){let r=await this.#i(e,n);T({index:e,newIndex:r,queueItems:n,cleanUp:t}),e=r}t(r)}}if(!e)return this.statuses.firing=!1,this;if(this.statuses.completed=!0,this.statuses.firing=!1,await this.opts.afterComplete(this),!this.opts.loop)throw``;let r=this.opts.loopDelay;this.#a(async()=>{await this.#r(r[0]),this.#t()},r[1])}catch{}return this.statuses.firing=!1,this}async#n(e){this.cursorPosition=R(e,this.cursorPosition,this.#w),ue(this.element,this.#w,this.cursorPosition)}async#r(e){let t=this.#x;t&&await this.#n({value:t});let n=this.#w.map(e=>[Symbol(),{func:this.#v.bind(this),delay:this.#b(1),deletable:!0,shouldPauseCursor:()=>!0}]);for(let e=0;e<n.length;e++)await this.#i(e,n);this.queue.reset(),this.queue.set(0,{delay:e})}#i(e,t){return j({index:e,queueItems:t,wait:this.#a.bind(this),cursor:this.cursor,cursorOptions:this.opts.cursor})}async#a(e,t,n=!1){this.statuses.frozen&&await new Promise(e=>{this.unfreeze=()=>{this.statuses.frozen=!1,e()}}),n||await this.opts.beforeStep(this),await he(e,t,this.timeouts),n||await this.opts.afterStep(this)}async#o(){if(!this.#s()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){pe(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:n}=e;te({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...n}})}}#s(){return P(this.element)}#c(e,t){return this.queue.add(e),this.#l(t),this}#l(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#u(e={}){return[{func:()=>this.#d(e)},{func:()=>this.#d(this.opts)}]}async#d(e){this.opts=I(this.opts,e)}#f(){let e=this.opts.strings.filter(e=>!!e);e.forEach((t,n)=>{if(this.type(t),n+1===e.length)return;let r=this.opts.breakLines?[{func:()=>this.#_(f(`BR`)),typeable:!0}]:k({func:this.#v.bind(this),delay:this.#b(1)},this.queue.getTypeable().length);this.#g(r)})}#p=e=>{this.opts.cursor=le(e.cursor??u.cursor),this.opts.strings=this.#m(i(this.opts.strings)),this.opts=I(this.opts,{html:!this.#S&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#m(e){let t=this.element.innerHTML;return t?(this.element.innerHTML=``,this.opts.startDelete?(this.element.innerHTML=t,b(this.element),this.#g(k({func:this.#v.bind(this),delay:this.#b(1),deletable:!0},this.#w.length)),e):me(t).concat(e)):e}#h(){if(this.#S)return null;let e=f(`span`);return e.className=s,this.#C?(e.innerHTML=x(this.opts.cursorChar).innerHTML,e):(e.style.visibility=`hidden`,e)}#g(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#_(e){se(this.element,e)}#v(){this.#w.length&&(this.#S?this.element.value=this.element.value.slice(0,-1):this.#y(this.#w[this.cursorPosition]))}#y(e){L(e,this.element)}#b(e=0){return v(this.opts)[e]}get#x(){return this.predictedCursorPosition??this.cursorPosition}get#S(){return P(this.element)}get#C(){return!!this.opts.cursor&&!this.#S}get#w(){return ie(this.element)}},B=document.getElementById(`rive-animation`);if(!B)throw Error(`Rive animation container not found`);var V=B.getElementsByTagName(`canvas`)[0],ge=B.querySelector(`.editor-type`),H=B.querySelector(`.canvas-type`),U=document.querySelectorAll(`.learn-list li`),W=B.getElementsByTagName(`button`)[0];if(!V||!ge||!H||U.length===0||!W)throw Error(`Rive canvas not found`);var G=new n.Rive({src:`/assets/web_app_construct.riv`,canvas:V,stateMachines:`Build`,onLoad:()=>{G.resizeDrawingSurfaceToCanvas()}}),_e={copy:!0,withinElement:null},K={..._e},q=new z(ge,{speed:40,lifeLike:!0,beforeStep:async e=>{if(!K.copy)return;let t=e.getQueue().getPendingQueueItems(),n=K.withinElement??H;if(t.length>0){let e=t[0];if(e.char&&typeof e.char==`object`&&e.char.nodeName===`#text`){let t=e.char;if(t.textContent===`*`)return;n.appendChild(t.cloneNode())}else if(e.char&&typeof e.char==`object`&&e.char.nodeName===`BR`){let e=document.createTextNode(` `);n.appendChild(e)}}}}),ve=-37,ye=`absolute beginner`,be=`https://typst.app/tutorial`,J=`in-progress`,Y=null,xe=null,Se=null,Ce=ge.dataset.inter===`true`?`interactive tutorial`:`tutorial`,we=()=>{document.querySelector(`.anim-em`).style.fontStyle=`initial`,q.reset(void 0),H.innerHTML=``,Y=null,xe=null,Se=null,K={..._e}};q.exec(()=>{U[0].classList.add(`active`)}).type(`Go from `).exec(()=>{Y=document.createElement(`em`),Y.classList.add(J),H.appendChild(Y),K.withinElement=Y}).type(`<span class="anim-em">${ye}</span>`).exec(()=>{K.withinElement=null}).type(` to<br>Typst-proficient`).exec(()=>{U[1].classList.add(`active`),K.copy=!1}).move(ve).type(`_`).move(17).type(`_`).exec(()=>{Y.classList.remove(J),K.copy=!0}).exec(()=>{document.querySelector(`.anim-em`).style.fontStyle=`italic`,setTimeout(()=>U[2].classList.add(`active`),400)}).move(null,{to:`END`}).type(` in `).exec(()=>{xe=document.createElement(`strong`),xe.classList.add(J),H.appendChild(xe),K.withinElement=xe}).type(`<span class="anim-strong">*30 minutes*</span>`).exec(()=>{document.querySelector(`.anim-strong`).style.fontWeight=`bold`,K.withinElement=null,xe.classList.remove(J),U[3].classList.add(`active`)}).type(` with our `).pause(200).exec(()=>{K.copy=!1}).type(`<span class="typ-func">#link</span><span style="white-space: pre;">(<span class="cq-br"><br class="cq-br">  </span><span class="typ-str">"${be}"</span><br class="cq-br">)</span>`,{delay:60}).exec(()=>{Se=document.createElement(`a`),Se.textContent=be,Se.href=be,H.appendChild(Se),K.copy=!0}).type(`.`).exec(()=>{U[4].classList.add(`active`)}).pause(300).move(-1).type(`[]`,{instant:!0}).exec(()=>{Se.innerHTML=``,K.withinElement=Se,K.copy=!1}).pause(100).move(-1).type(`<br>  <br>`).move(-1).exec(()=>{K.copy=!0}).type(Ce).exec(()=>{K.withinElement=null}).move(null,{to:`END`}).exec(()=>{B.classList.add(`completed`)});var Te=!1,Ee=()=>{Te||(Te=!0,G.on(n.EventType.RiveEvent,e=>{q.getQueue().reset(),e.data&&typeof e.data==`object`&&`name`in e.data&&e.data.name===`Built`&&(q.go(),window.requestAnimationFrame(()=>G.pause()))}))};function De(){G.play(),Ee()}function Oe(){G.stop(),G.reset({stateMachines:`Build`}),G.scrub(`Timeline 1`,0),G.removeAllRiveEventListeners(),Te=!1,we();for(let e of U)e.classList.remove(`active`);ge&&H&&B&&(B.classList.remove(`completed`),ge.innerHTML=``,H.innerHTML=``)}t(e=>{e.isIntersecting&&De()},V,{threshold:.4}),W.addEventListener(`click`,()=>{Oe(),De()});

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.