PageSourceSearch

https://uploadthing.com/_next/static/chunks/0cbb8c09993effc9.js?dpl=dpl_2YgGFTqvSyMrMhLc5yVQwTiDcjza

js uploadthing.com collected 2026-09-25 20:50:03 UTC 150,107 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,631324,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(900778),i="undefined"==typeof window,a=i?()=>{}:r.useLayoutEffect,o=i?()=>{}:r.useEffect;function s(e){let{headManager:t,reduceComponentsToState:n}=e;function s(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return i&&(t?.mountedInstances?.add(e.children),s()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=s),()=>{t&&(t._pendingUpdate=s)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},493529,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return m},defaultHead:function(){return h}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(481258),o=e.r(744066),s=e.r(980506),u=o._(e.r(900778)),l=a._(e.r(631324)),c=e.r(237e3);function h(){return[(0,s.jsx)("meta",{charSet:"utf-8"},"charset"),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===u.default.Fragment?e.concat(u.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(343946);let f=["name","httpEquiv","charSet","itemProp"];function p(e){let t,n,r,i;return e.reduce(d,[]).reverse().concat(h().reverse()).filter((t=new Set,n=new Set,r=new Set,i={},e=>{let a=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?a=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?a=!1:n.add(e.type);break;case"meta":for(let t=0,n=f.length;t<n;t++){let n=f[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?a=!1:r.add(n);else{let t=e.props[n],r=i[n]||new Set;("name"!==n||!o)&&r.has(t)?a=!1:(r.add(t),i[n]=r)}}}return a})).reverse().map((e,t)=>{let n=e.key||t;return u.default.cloneElement(e,{key:n})})}let m=function({children:e}){let t=(0,u.useContext)(c.HeadManagerContext);return(0,s.jsx)(l.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},224207,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:r,blurDataURL:i,objectFit:a}){let o=n?40*n:e,s=r?40*r:t,u=o&&s?`viewBox='0 0 ${o} ${s}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},302965,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,
1contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},701852,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return l}}),e.r(343946);let r=e.r(640824),i=e.r(224207),a=e.r(302965),o=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function u(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function l({src:e,sizes:t,unoptimized:n=!1,priority:l=!1,preload:c=!1,loading:h,className:d,quality:f,width:p,height:m,fill:v=!1,style:g,overrideSrc:b,onLoad:y,onLoadingComplete:w,placeholder:_="empty",blurDataURL:A,fetchPriority:C,decoding:P="async",layout:E,objectFit:R,objectPosition:M,lazyBoundary:I,lazyRoot:x,...T},F){var O;let S,j,L,{imgConf:k,showAltText:V,blurComplete:D,defaultLoader:W}=F,B=k||a.imageConfigDefault;if("allSizes"in B)S=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),n=B.qualities?.sort((e,t)=>e-t);S={...B,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===W)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=T.loader||W;delete T.loader,delete T.srcSet;let N="__next_img_default"in U;if(N){if("custom"===S.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=t=>{let{config:n,...r}=t;return e(r)}}if(E){"fill"===E&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[E];e&&(g={...g,...e});let n={responsive:"100vw",fill:"100vw"}[E];n&&!t&&(t=n)}let z="",$=u(p),H=u(m);if((O=e)&&"object"==typeof O&&(s(O)||void 0!==O.src)){let t=s(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(j=t.blurWidth,L=t.blurHeight,A=A||t.blurDataURL,z=t.src,!v)if($||H){if($&&!H){let e=$/t.width;H=Math.round(t.height*e)}else if(!$&&H){let e=H/t.height;$=Math.round(t.width*e)}}else $=t.width,H=t.height}let Y=!l&&!c&&("lazy"===h||void 0===h);(!(e="string"==typeof e?e:z)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,Y=!1),S.unoptimized&&(n=!0),N&&!S.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let X=u(f),G=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:M}:{},V?{}:{color:"transparent"},g),q=D||"empty"===_?null:"blur"===_?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:$,heightInt:H,blurWidth:j,blurHeight:L,blurDataURL:A||"",objectFit:G.objectFit})}")`:`url("${_}")`,J=o.includes(G.objectFit)?"fill"===G.objectFit?"100% 100%":"cover":G.objectFit,Q=q?{backgroundSize:J,backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:q}:{},K=function({config:e,src:t,unoptimized:n,width:i,quality:a,sizes:o,loader:s}){if(n){let e=(0,r.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let n=t.includes("?")?"&":"?";t=`${t}${n}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:u,kind:l}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=n.exec(r);)i.push(parseInt(e[2]));if(i.length){let n=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,o),c=u.length-1;return{sizes:o||"w"!==l?o:"100vw",srcSet:u.map((n,r)=>`${s({config:e,src:t,quality:a,width:n})} ${"w"===l?n:r+1}${l}`).join(", "),src:s({config:e,src:t,quality:a,width:u[c]})}}({config:S,src:e,unoptimized:n,width:$,quality:X,sizes:t,loader:U}),Z=Y?"lazy":h;return{props:{...T,loading:Z,fetchPriority:C,width:$,height:H,decoding:P,className:d,style:{...G,...Q},sizes:K.sizes,srcSet:K.srcSet,src:b||K.src},meta:{unoptimized:n,preload:c||l,placeholder:_,fill:v}}}},571807,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let r=e.r(481258)._(e.r(900778)),i=e.r(302965),a=r.default.createContext(i.imageConfigDefault)},883230,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>
2Math.abs(t-n)<Math.abs(e-n)?t:e,0):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},105656,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o}});let r=e.r(883230),i=e.r(640824);function a({config:e,src:t,width:n,quality:a}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,r.findClosestQuality)(a,e),s=(0,i.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&s?`&dpl=${s}`:""}`}a.__next_img_default=!0;let o=a},172039,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return w}});let r=e.r(481258),i=e.r(744066),a=e.r(980506),o=i._(e.r(900778)),s=r._(e.r(250919)),u=r._(e.r(493529)),l=e.r(701852),c=e.r(302965),h=e.r(571807);e.r(343946);let d=e.r(494220),f=r._(e.r(105656)),p=e.r(504357),m={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function v(e,t,n,r,i,a,o){let s=e?.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function g(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,o.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:i,decoding:s,className:u,style:l,fetchPriority:c,placeholder:h,loading:d,unoptimized:f,fill:m,onLoadRef:b,onLoadingCompleteRef:y,setBlurComplete:w,setShowAltText:_,sizesInput:A,onLoad:C,onError:P,...E},R)=>{let M=(0,o.useCallback)(e=>{e&&(P&&(e.src=e.src),e.complete&&v(e,h,b,y,w,f,A))},[e,h,b,y,w,P,f,A]),I=(0,p.useMergedRef)(R,M);return(0,a.jsx)("img",{...E,...g(c),loading:d,width:i,height:r,decoding:s,"data-nimg":m?"fill":"1",className:u,style:l,sizes:n,srcSet:t,src:e,ref:I,onLoad:e=>{v(e.currentTarget,h,b,y,w,f,A)},onError:e=>{_(!0),"empty"!==h&&w(!0),P&&P(e)}})});function y({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&s.default.preload?(s.default.preload(t.src,n),null):(0,a.jsx)(u.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(h.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=m||r||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:i,localPatterns:"undefined"==typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:s,onLoadingComplete:u}=e,p=(0,o.useRef)(s);(0,o.useEffect)(()=>{p.current=s},[s]);let v=(0,o.useRef)(u);(0,o.useEffect)(()=>{v.current=u},[u]);let[g,w]=(0,o.useState)(!1),[_,A]=(0,o.useState)(!1),{props:C,meta:P}=(0,l.getImgProps)(e,{defaultLoader:f.default,imgConf:i,blurComplete:g,showAltText:_});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b,{...C,unoptimized:P.unoptimized,placeholder:P.placeholder,fill:P.fill,onLoadRef:p,onLoadingCompleteRef:v,setBlurComplete:w,setShowAltText:A,sizesInput:e.sizes,ref:t}),P.preload?(0,a.jsx)(y,{isAppRouter:!n,imgAttributes:C}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
3dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},913826,(e,t,n)=>{e.e,t.exports=(()=>{"use strict";var e,t,n,r,i,a,o,s,u,l,c,h,d,f,p,m,v,g,b,y,w,_,A,C,P,E,R,M,I,x,T,F,O,S,j,L,k,V,D,W,B,U,N,z,$,H,Y,X,G,q,J,Q,K,Z,ee,et,en,er,ei,ea,eo,es,eu=[,(e,t,n)=>{var r;n.r(t),n.d(t,{default:()=>i});let i=(r="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,i,a=new Promise((e,t)=>{n=e,i=t}),o="object"==typeof window,s="function"==typeof importScripts;function u(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.ua(),i&&i.Oa()}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&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Ma=function(e){a&&(document.body.remove(a),a=null),e||((a=document.createElement("div")).style.backgroundColor="black",a.style.position="fixed",a.style.right=0,a.style.top=0,a.style.color="white",a.style.padding="4px",a.innerHTML="RIVE FPS",e=function(e){a.innerHTML="RIVE FPS "+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Oa=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Ja=function(){a&&(document.body.remove(a),a=null),i=null},this.ua=function(){}}function l(e){console.assert(!0);let t=new Map,n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout(function(){t.delete(r),0==t.length?n=-1/0:r==n&&console.assert((n=Math.max(...t.keys()))<r)},1e3)),(n=Math.max(r,n))<<e}}let c=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){c&&c();let t=e.decodeAudio;
3e.decodeAudio=function(e,n){n(e=t(e))};let n=e.decodeFont;e.decodeFont=function(e,t){t(e=n(e))};let r=e.FileAssetLoader;e.ptrToAsset=t=>{let n=e.ptrToFileAsset(t);return n.isImage?e.ptrToImageAsset(t):n.isFont?e.ptrToFontAsset(t):n.isAudio?e.ptrToAudioAsset(t):n},e.CustomFileAssetLoader=r.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Da=e},loadContents:function(t,n){return t=e.ptrToAsset(t),this.Da(t,n)}}),e.CDNFileAssetLoader=r.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(t){var n,r,i;let a=e.ptrToAsset(t);return""!==(t=a.cdnUuid)&&(n=a.cdnBaseUrl+"/"+t,r=e=>{a.decode(new Uint8Array(e.response))},(i=new XMLHttpRequest).responseType="arraybuffer",i.onreadystatechange=function(){4==i.readyState&&200==i.status&&r(i)},i.open("GET",n,!0),i.send(null),!0)}}),e.FallbackFileAssetLoader=r.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.ta=[]},addLoader:function(e){this.ta.push(e)},loadContents:function(e,t){for(let n of this.ta)if(n.loadContents(e,t))return!0;return!1}});let i=e.computeAlignment;e.computeAlignment=function(e,t,n,r,a=1){return i.call(this,e,t,n,r,a)}};let h="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),d=new function(){function e(){if(!t){let l;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};if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(l=e.getContext("webgl",o),n=1,!l)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(l=e.getContext("webgl2",o))n=2;else{if(!(l=e.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function s(e,t,n){if(t=l.createShader(t),l.shaderSource(t,n),l.compileShader(t),0<((n=l.getShaderInfoLog(t))||"").length)throw n;l.attachShader(e,t)}if(r=Math.min((l=new Proxy(l,{get:(e,t)=>e.isContextLost()?(u||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",t),u=!0),"function"==typeof e[t])?function(){}:void 0:"function"==typeof e[t]?function(...n){return e[t].apply(e,n)}:e[t],set(e,t,n){if(!e.isContextLost())return e[t]=n,!0;u||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+t),u=!0)}})).getParameter(l.MAX_RENDERBUFFER_SIZE),l.getParameter(l.MAX_TEXTURE_SIZE)),s(e=l.createProgram(),l.VERTEX_SHADER,"attribute vec2 vertex;\n                attribute vec2 uv;\n                uniform vec4 mat;\n                uniform vec2 translate;\n                varying vec2 st;\n                void main() {\n                    st = uv;\n                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n                }"),s(e,l.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),l.bindAttribLocation(e,0,"vertex"),l.bindAttribLocation(e,1,"uv"),l.linkProgram(e),0<((o=l.getProgramInfoLog(e))||"").trim().length)throw o;i=l.getUniformLocation(e,"mat"),a=l.getUniformLocation(e,"translate"),l.useProgram(e),l.bindBuffer(l.ARRAY_BUFFER,l.createBuffer()),l.enableVertexAttribArray(0),l.enableVertexAttribArray(1),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,l.createBuffer()),l.uniform1i(l.getUniformLocation(e,"image"),0),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=l}return!0}let t=null,n=0,r=0,i=null,a=null,o=0,s=0,u=!1;e(),this.Wa=function(){return e(),r},this.Ia=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Ha=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),2==n?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),i):null};let c=new l(8),h=new l(8),d=new l(10),f=new l(10);this.La=function(n,r,u,l,p){if(e()){var m=c.push(n),v=h.push(r);if(t.canvas){for(var g of((t.canvas.width!=m||t.canvas.height!=v)&&(t.canvas.width=m,t.canvas.height=v),t.viewport(0,v-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),u.sort((e,t)=>
3t.xa-e.xa),m=d.push(l),o!=m&&(t.bufferData(t.ARRAY_BUFFER,8*m,t.DYNAMIC_DRAW),o=m),m=0,u))t.bufferSubData(t.ARRAY_BUFFER,m,g.ha),m+=4*g.ha.length;for(var b of(console.assert(m==4*l),u))t.bufferSubData(t.ARRAY_BUFFER,m,b.Aa),m+=4*b.Aa.length;for(var y of(console.assert(m==8*l),m=f.push(p),s!=m&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*m,t.DYNAMIC_DRAW),s=m),g=0,u))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,g,y.indices),g+=2*y.indices.length;for(let e of(console.assert(g==2*p),y=0,b=!0,m=g=0,u)){e.image.ca!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.ba||null),y=e.image.ca),e.Za?(t.scissor(e.ma,v-e.na-e.sa,e.kb,e.sa),b=!0):b&&(t.scissor(0,v-r,n,r),b=!1),u=2/n;let o=-2/r;t.uniform4f(i,e.M[0]*u*e.W,e.M[1]*o*e.X,e.M[2]*u*e.W,e.M[3]*o*e.X),t.uniform2f(a,e.M[4]*u*e.W+u*(e.ma-e.Xa*e.W)-1,e.M[5]*o*e.X+o*(e.na-e.Ya*e.X)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,m),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,m+4*l),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,g),m+=4*e.ha.length,g+=2*e.indices.length}console.assert(m==4*l),console.assert(g==2*p)}}},this.canvas=function(){return e()&&t.canvas}},f=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){function t(e){switch(e){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function n(e){return"rgba("+((0xff0000&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((0xff000000&e)>>>24)/255+")"}function r(){for(let e of(0<P.length&&(d.La(C.drawWidth(),C.drawHeight(),P,E,R),P=[],R=E=0,C.reset(512,512)),A)){for(let t of e.u)t();e.u=[]}A.clear()}f&&f();var i=e.RenderPaintStyle;let a=e.RenderPath,o=e.RenderPaint,s=e.Renderer,l=e.StrokeCap,c=e.StrokeJoin,p=e.BlendMode,m=i.fill,v=i.stroke,g=e.FillRule.evenOdd,b=1;var y=e.RenderImage.extend("CanvasRenderImage",{__construct:function({P:e,V:t}={}){this.__parent.__construct.call(this),this.ca=b,b=b+1&0x7fffffff||1,this.P=e,this.V=t},__destruct:function(){this.ba&&(d.Ia(this.ba),URL.revokeObjectURL(this.ka)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.V&&t.V(t);var n=new Image;t.ka=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Ca=n,t.ba=d.Ha(n),t.size(n.width,n.height),t.P&&t.P(t)},n.src=t.ka}}),w=a.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.G=new Path2D},rewind:function(){this.G=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.G,u=s.addPath;e=e.G;let l=new DOMMatrix;l.a=t,l.b=n,l.c=r,l.d=i,l.e=a,l.f=o,u.call(s,e,l)},fillRule:function(e){this.ja=e},moveTo:function(e,t){this.G.moveTo(e,t)},lineTo:function(e,t){this.G.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.G.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.G.closePath()}}),_=o.extend("CanvasRenderPaint",{color:function(e){this.la=n(e)},thickness:function(e){this.Fa=e},join:function(e){switch(e){case c.miter:this.aa="miter";break;case c.round:this.aa="round";break;case c.bevel:this.aa="bevel"}},cap:function(e){switch(e){case l.butt:this.$="butt";break;case l.round:this.$="round";break;case l.square:this.$="square"}},style:function(e){this.Ea=e},blendMode:function(e){this.Ba=t(e)},clearGradient:function(){this.O=null},linearGradient:function(e,t,n,r){this.O={ya:e,za:t,pa:n,qa:r,fa:[]}},radialGradient:function(e,t,n,r){this.O={ya:e,za:t,pa:n,qa:r,fa:[],Va:!0}},addStop:function(e,t){this.O.fa.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,t,r){let i=this.Ea;var a=this.la,o=this.O;if(e.globalCompositeOperation=this.Ba,null!=o){a=o.ya;var s=o.za;let t=o.pa;var u=o.qa;let r=o.fa;o.Va?(o=t-a,u-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=e.createLinearGradient(a,s,t,u);for(let e=0,t=r.length;e<t;e++)s=r[e],a.addColorStop(s.stop,n(s.color));this.la=a,this.O=null}switch(i){case v:e.strokeStyle=a,e.lineWidth=this.Fa,e.lineCap=this.$,e.lineJoin=this.aa,e.stroke(t);break;case m:e.fillStyle=a,e.fill(t,r)}}});let A=new Set,C=null,P=[],E=0,R=0;var M=e.CanvasRenderer=s.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.F=[1,0,0,1,0,0],this.m=e.getContext("2d"),this.ia=e,this.u=[]},save:function(){this.F.push(...this.F.slice(this.F.length-6)),this.u.push(this.m.save.bind(this.m))},restore:function(){let e=this.F.length-6;if(6>
3e)throw"restore() called without matching save().";this.F.splice(e),this.u.push(this.m.restore.bind(this.m))},transform:function(e,t,n,r,i,a){let o=this.F,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.m.transform.bind(this.m,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.m,e.G,e.ja===g?"evenodd":"nonzero"))},_drawRiveImage:function(e,n,r,i){var a=e.Ca;if(a){var o=this.m,s=t(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.F,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(n,i,a,o,s,u,l,c,h,f,p){i=this.m.canvas.width;var m=this.m.canvas.height;let v=f-c,g=p-h;c=Math.max(c,0),h=Math.max(h,0);let b=(f=Math.min(f,i))-c,y=(p=Math.min(p,m))-h;if(console.assert(b<=Math.min(v,i)),console.assert(y<=Math.min(g,m)),!(0>=b||0>=y)){f=b<v||y<g,i=p=1;var w=Math.ceil(b*p),_=Math.ceil(y*i);m=d.Wa(),w>m&&(p*=m/w,w=m),_>m&&(i*=m/_,_=m),C||(C=new e.DynamicRectanizer(m)).reset(512,512),0>(m=C.addRect(w,_))&&(r(),A.add(this),console.assert(0<=(m=C.addRect(w,_))));var M=65535&m,I=m>>16;P.push({M:this.F.slice(this.F.length-6),image:n,ma:M,na:I,Xa:c,Ya:h,kb:w,sa:_,W:p,X:i,ha:new Float32Array(s),Aa:new Float32Array(u),indices:new Uint16Array(l),Za:f,xa:n.ca<<1|!!f}),E+=s.length,R+=l.length;var x=this.m,T=t(a);this.u.push(function(){x.save(),x.resetTransform(),x.globalCompositeOperation=T,x.globalAlpha=o;let e=d.canvas();e&&x.drawImage(e,M,I,w,_,c,h,b,y),x.restore()})}},_clipPath:function(e){this.u.push(this.m.clip.bind(this.m,e.G,e.ja===g?"evenodd":"nonzero"))},clear:function(){A.add(this),this.u.push(this.m.clearRect.bind(this.m,0,0,this.ia.width,this.ia.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});e.makeRenderer=function(e){let t=new M(e),n=t.m;return new Proxy(t,{get(e,r){if("function"==typeof e[r])return function(...t){return e[r].apply(e,t)};if("function"==typeof n[r]){if(-1<h.indexOf(r))throw Error("RiveException: Method call to '"+r+"()' is not allowed, as the renderer cannot immediately pass through the return                 values of any canvas 2d context methods.");return function(...e){t.u.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.u.push(()=>{n[r]=i}),!0}})},e.decodeImage=function(e,t){new y({P:t}).decode(e)},e.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=x;return new y({V:()=>{e.total++},P:()=>{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let I=e.load,x=null;e.load=function(t,n,r=!0){let i=new e.FallbackFileAssetLoader;return void 0!==n&&i.addLoader(n),r&&(n=new e.CDNFileAssetLoader,i.addLoader(n)),new Promise(function(e){let n=null;x={total:0,loaded:0,ready:function(){e(n)}},n=I(t,i),0==x.total&&e(n)})};let T=e.RendererWrapper.prototype.align;e.RendererWrapper.prototype.align=function(e,t,n,r,i=1){T.call(this,e,t,n,r,i)},e.requestAnimationFrame=(i=new u).requestAnimationFrame.bind(i),e.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),e.enableFPSCounter=i.Ma.bind(i),e.disableFPSCounter=i.Ja,i.ua=r,e.resolveAnimationFrame=r,e.cleanup=function(){C&&C.delete()}};var p,m,v=Object.assign({},e),g="./this.program",b="";(o||s)&&(s?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),r&&(b=r),b=b.startsWith("blob:")?"":b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,n)=>{if(U(e)){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}else fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))).then(t,n)});var y=e.print||console.log.bind(console),w=e.printErr||console.error.bind(console);Object.assign(e,v),v=null,e.thisProgram&&(g=e.thisProgram),e.wasmBinary&&(_=e.wasmBinary);var _,A,C,P,E,R,M,I,x,T,F=!1;function O(){var t=A.buffer;e.HEAP8=C=new Int8Array(t),e.HEAP16=E=new Int16Array(t),e.HEAPU8=P=new Uint8Array(t),e.HEAPU16=R=new Uint16Array(t),e.HEAP32=M=new Int32Array(t),e.HEAPU32
3=I=new Uint32Array(t),e.HEAPF32=x=new Float32Array(t),e.HEAPF64=T=new Float64Array(t)}var S=[],j=[],L=[],k=0,V=null,D=null;function W(t){throw e.onAbort?.(t),w(t="Aborted("+t+")"),F=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),i(t),t}var B,U=e=>e.startsWith("file://");function N(e){if(e==B&&_)return new Uint8Array(_);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function z(e,t,n){return(_?Promise.resolve().then(()=>N(e)):new Promise((t,n)=>{p(e,e=>t(new Uint8Array(e)),()=>{try{t(N(e))}catch(e){n(e)}})})).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{w(`failed to asynchronously prepare wasm: ${e}`),W(e)})}var $,H,Y,X,G,q=t=>{for(;0<t.length;)t.shift()(e)},J=(e,t)=>Object.defineProperty(t,"name",{value:e}),Q=[],K=[],Z=e=>{if(!e)throw new $("Cannot use deleted val. handle = "+e);return K[e]},ee=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=Q.pop()||K.length;return K[t]=e,K[t+1]=1,t}},et=e=>{var t=Error,n=J(e,function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n},en=e=>{for(var t="";P[e];)t+=Y[P[e++]];return t},er=[],ei=()=>{for(;er.length;){var e=er.pop();e.g.L=!1,e.delete()}},ea={},eo=(e,t)=>{if(void 0===t)throw new $("ptr should not be undefined");for(;e.o;)t=e.R(t),e=e.o;return t},es={},eu=e=>{var t=en(e=td(e));return tc(e),t},el=(e,t)=>
3{var n=es[e];if(void 0===n)throw e=`${t} has unknown type ${eu(e)}`,new $(e);return n},ec=()=>{},eh=!1,ed=(e,t,n)=>t===n?e:void 0===n.o||null===(e=ed(e,t,n.o))?null:n.Ka(e),ef={},ep=(e,t)=>{if(!t.j||!t.i)throw new G("makeClassHandle requires ptr and ptrType");if(!!t.v!=!!t.s)throw new G("Both smartPtrType and smartPtr must be specified");return t.count={value:1},em(Object.create(e,{g:{value:t,writable:!0}}))},em=e=>"undefined"==typeof FinalizationRegistry?(em=e=>e,e):(eh=new FinalizationRegistry(e=>{e=e.g,--e.count.value,0===e.count.value&&(e.s?e.v.C(e.s):e.j.h.C(e.i))}),em=e=>{var t=e.g;return t.s&&eh.register(e,{g:t},e),e},ec=e=>{eh.unregister(e)},em(e)),ev={},eg=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function eb(e){return this.fromWireType(I[e>>2])}var ey={},ew={},e_=(e,t,n)=>{function r(t){if((t=n(t)).length!==e.length)throw new G("Mismatched type converter count");for(var r=0;r<e.length;++r)eA(e[r],t[r])}e.forEach(function(e){ew[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{es.hasOwnProperty(e)?i[t]=es[e]:(a.push(e),ey.hasOwnProperty(e)||(ey[e]=[]),ey[e].push(()=>{i[t]=es[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)};function eA(e,t,n={}){if(!("argPackAdvance"in t))throw TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,n={}){var r=t.name;if(!e)throw new $(`type "${r}" must have a positive integer typeid pointer`);if(es.hasOwnProperty(e)){if(n.Ua)return;throw new $(`Cannot register type '${r}' twice`)}es[e]=t,delete ew[e],ey.hasOwnProperty(e)&&(t=ey[e],delete ey[e],t.forEach(e=>e()))}(e,t,n)}var eC=e=>{throw new $(e.g.j.h.name+" instance already deleted")};function eP(){}var eE=(e,t,n)=>{if(void 0===e[t].l){var r=e[t];e[t]=function(...r){if(!e[t].l.hasOwnProperty(r.length))throw new $(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].l})!`);return e[t].l[r.length].apply(this,r)},e[t].l=[],e[t].l[r.K]=r}},eR=(t,n,r)=>{if(e.hasOwnProperty(t)){if(void 0===r||void 0!==e[t].l&&void 0!==e[t].l[r])throw new $(`Cannot register public name '${t}' twice`);if(eE(e,t,t),e.hasOwnProperty(r))throw new $(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);e[t].l[r]=n}else e[t]=n,void 0!==r&&(e[t].mb=r)};function eM(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.B=n,this.C=r,this.o=i,this.Pa=a,this.R=o,this.Ka=s,this.va=[]}var eI=(e,t,n)=>{for(;t!==n;){if(!t.R)throw new $(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.R(e),t=t.o}return e};function ex(e,t){if(null===t){if(this.da)throw new $(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new $(`Cannot pass "${eX(t)}" as a ${this.name}`);if(!t.g.i)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);return eI(t.g.i,t.g.j.h,this.h)}function eT(e,t){if(null===t){if(this.da)throw new $(`null is not a valid ${this.name}`);if(this.U){var n=this.ea();return null!==e&&e.push(this.C,n),n}return 0}if(!t||!t.g)throw new $(`Cannot pass "${eX(t)}" as a ${this.name}`);if(!t.g.i)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.T&&t.g.j.T)throw new $(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);if(n=eI(t.g.i,t.g.j.h,this.h),this.U){if(void 0===t.g.s)throw new $("Passing raw pointer to smart pointer is illegal");switch(this.fb){case 0:if(t.g.v===this)n=t.g.s;else throw new $(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);break;case 1:n=t.g.s;break;case 2:if(t.g.v===this)n=t.g.s;else{var r=t.clone();n=this.ab(n,ee(()=>r.delete())),null!==e&&e.push(this.C,n)}break;default:throw new $("Unsupporting sharing policy")}}return n}function eF(e,t){if(null===t){if(this.da)throw new $(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new $(`Cannot pass "${eX(t)}" as a ${this.name}`);if(!t.g.i)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.j.T)throw new $(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`);return eI(t.g.i,t.g.j.h,this.h)}function eO(e,t,n,r,i,a,o,s,u,l,c){this.name=e,this.h=t,this.da=n,this.T=r,this.U=i,this.$a=a,this.fb=o,this.wa=s,this.ea=u,this.ab=l,this.C=c,i||void 0!==t.o?this.toWireType=eT:(this.toWireType=r?ex:eF,this.A=null)}var eS,ej,eL=(t,n,r)=>{if(!e.hasOwnProperty(t))throw new G("Replacing nonexistent public symbol");void 0!==e[t].l&&void 0!==r?e[t].l[r]=n:(e[t]=n,e[t].K=r)},ek=[],eV=e=>{var t=ek[e];return t||(e>=ek.length&&(ek.length=e+1),ek[e]=t=eS.get(e)),t},eD=(t,n)=>{let r;var i=(t=en(t)).includes("j")?(r=t,(...t)=>((t,n,r=[])=>t.includes("j")?(0,e["dynCall_"+(t=t.replace(/p/g,"i"))])(n,...r):eV(n)(...r))(r,n,t)):eV(n);if("function"!=typeof i)throw new $(`unknown function pointer with signature ${t}: ${n}`);return i},eW=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||es[t]||(ew[t]?ew[t].forEach(e):(n.push(t),r[t]=!0))}),new ej(`${e}: `+n.map(eu).join([", "]))};function eB(e,t,n,r,i){var a=t.length;if(2>a)throw new $("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].A)return!0;return!1}(t),u="void"!==t[0].name,l=a-2,c=Array(l),h=[],d=[];return J(e,function(...n){if(n.length!==l)throw new $(`function ${e} called with ${n.length} arguments, expected ${l}`);if(d.length=0,h.length=o?2:1,h[0]=i,o){var a=t[1].toWireType(d,this);h[1]=a}for(var f=0;f<l;++f)c[f]=t[f+2].toWireType(d,n[f]),h.push(c[f]);if(n=r(...h),s)eg(d);else for(f=o?1:2;f<t.length;f++){var p=1===f?a:c[f-2];null!==t[f].A&&t[f].A(p)}return u?t[0].fromWireType(n):void 0})}var eU,eN=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(I[t+4*r>>2]);return n},ez=e=>{let t=(e=e.trim()).indexOf("(");return -1!==t?e.substr(0,t):e},e$=(e,t,n)=>{if(!(e instanceof Object))throw new $(`${n}
3 with invalid "this": ${e}`);if(!(e instanceof t.h.constructor))throw new $(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.i)throw new $(`cannot call emscripten binding method ${n} on deleted object`);return eI(e.g.i,e.g.j.h,t.h)},eH=e=>{9<e&&0==--K[e+1]&&(K[e]=void 0,Q.push(e))},eY={name:"emscripten::val",fromWireType:e=>{var t=Z(e);return eH(e),t},toWireType:(e,t)=>ee(t),argPackAdvance:8,readValueFromPointer:eb,A:null},eX=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},eG=(e,t,n,r)=>{if(0<r){r=n+r-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|63&a}}t[n]=0}},eq=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},eJ="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,eQ=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&eJ)return eJ.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},eK="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eZ=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&R[n];)++n;if(32<(n<<=1)-e&&eK)return eK.decode(P.subarray(e,n));for(r=0,n="";!(r>=t/2);++r){var i=E[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},e0=(e,t,n)=>{if(2>(n??=0x7fffffff))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},e1=e=>2*e.length,e2=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=M[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r},e3=(e,t,n)=>{if(4>(n??=0x7fffffff))return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),M[t>>2]=a,(t+=4)+4>n)break}return M[t>>2]=0,t-r},e4=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},e5=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(I[t>>
32]=ee(r)),e},e6={},e8=e=>{var t=e6[e];return void 0===t?en(e):t},e7=[],e9=Reflect.construct,te={},tt=()=>{if(!eU){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:g||"./this.program"};for(e in te)void 0===te[e]?delete t[e]:t[e]=te[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);eU=n}return eU},tn=[null,[],[]],tr=e=>0==e%4&&(0!=e%100||0==e%400),ti=[31,29,31,30,31,30,31,31,30,31,30,31],ta=[31,28,31,30,31,30,31,31,30,31,30,31];$=e.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},K.push(0,1,void 0,1,null,1,!0,1,!1,1),e.count_emval_handles=()=>K.length/2-5-Q.length,H=e.PureVirtualError=et("PureVirtualError");for(var to=Array(256),ts=0;256>ts;++ts)to[ts]=String.fromCharCode(ts);Y=to,e.getInheritedInstanceCount=()=>Object.keys(ea).length,e.getLiveInheritedInstances=()=>{var e,t=[];for(e in ea)ea.hasOwnProperty(e)&&t.push(ea[e]);return t},e.flushPendingDeletes=ei,e.setDelayFunction=e=>{X=e,er.length&&X&&X(ei)},G=e.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(eP.prototype,{isAliasOf:function(e){if(!(this instanceof eP&&e instanceof eP))return!1;var t=this.g.j.h,n=this.g.i;e.g=e.g;var r=e.g.j.h;for(e=e.g.i;t.o;)n=t.R(n),t=t.o;for(;r.o;)e=r.R(e),r=r.o;return t===r&&n===e},clone:function(){if(this.g.i||eC(this),this.g.N)return this.g.count.value+=1,this;var e=em,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,L:i.L,N:i.N,i:i.i,j:i.j,s:i.s,v:i.v}}})),e.g.count.value+=1,e.g.L=!1,e},delete(){if(this.g.i||eC(this),this.g.L&&!this.g.N)throw new $("Object already scheduled for deletion");ec(this);var e=this.g;--e.count.value,0===e.count.value&&(e.s?e.v.C(e.s):e.j.h.C(e.i)),this.g.N||(this.g.s=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){if(this.g.i||eC(this),this.g.L&&!this.g.N)throw new $("Object already scheduled for deletion");return er.push(this),1===er.length&&X&&X(ei),this.g.L=!0,this}}),Object.assign(eO.prototype,{Qa(e){return this.wa&&(e=this.wa(e)),e},oa(e){this.C?.(e)},argPackAdvance:8,readValueFromPointer:eb,fromWireType:function(e){function t(){return this.U?ep(this.h.B,{j:this.$a,i:n,v:this,s:e}):ep(this.h.B,{j:this,i:e})}var n=this.Qa(e);if(!n)return this.oa(e),null;var r=ea[eo(this.h,n)];if(void 0!==r)return 0===r.g.count.value?(r.g.i=n,r.g.s=e,r.clone()):(r=r.clone(),this.oa(e),r);if(!(r=ef[r=this.h.Pa(n)]))return t.call(this);r=this.T?r.Ga:r.pointerType;var i=ed(n,this.h,r.h);return null===i?t.call(this):this.U?ep(r.h.B,{j:r,i:i,v:this,s:e}):ep(r.h.B,{j:r,i:i})}}),ej=e.UnboundTypeError=et("UnboundTypeError");var tu={_abort_js:()=>{W("")},_embind_create_inheriting_constructor:(e,t,n)=>{e=en(e),t=el(t,"wrapper"),n=Z(n);var r=t.h,i=r.B,a=r.o.B,o=r.o.constructor;return e=J(e,function(...e){r.o.va.forEach((function(e){if(this[e]===a[e])throw new H(`Pure virtual function ${e} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:i}),this.__construct(...e)}),i.__construct=function(...e){if(this===i)throw new $("Pass correct 'this' to __construct");e=o.implement(this,...e),ec(e);var t=e.g;if(e.notifyOnDestruction(),t.N=!0,Object.defineProperties(this,{g:{value:t}}),em(this),e=eo(r,e=t.i),ea.hasOwnProperty(e))throw new $(`Tried to register registered instance: ${e}`);ea[e]=this},i.__destruct=function(){if(this===i)throw new $("Pass correct 'this' to __destruct");ec(this);var e=this.g.i;if(e=eo(r,e),ea.hasOwnProperty(e))delete ea[e];else throw new $(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),ee(e)},_embind_finalize_value_object:e=>{var t=ev[e];delete ev[e];var n=t.ea,r=t.C,i=t.ra;e_([e],i.map(e=>e.Ta).concat(i.map(e=>e.cb)),e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Ra,s=t.Sa,u=e[n+i.length],l=t.bb,c=t.eb;a[t.Na]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(c,e,u.toWireType(n,t)),eg(n)}}}),[{name:t.name,fromWireType:e=>{var t,n={};for(t in a)n[t]=a[t].read(e);return r(e),n},toWireType:(e,t)=>{for(var i in a)if(!(i in t))throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:eb,A:r}
3]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{eA(e,{name:t=en(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(P[e])},A:null})},_embind_register_class:(e,t,n,r,i,a,o,s,u,l,c,h,d)=>{c=en(c),a=eD(i,a),s&&=eD(o,s),l&&=eD(u,l),d=eD(h,d);var f=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e})(c);eR(f,function(){eW(`Cannot construct ${c} due to unbound types`,[r])}),e_([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n,i=t.h,o=i.B;else o=eP.prototype;var u=Object.create(o,{constructor:{value:t=J(c,function(...e){if(Object.getPrototypeOf(this)!==u)throw new $("Use 'new' to construct "+c);if(void 0===h.H)throw new $(c+" has no accessible constructor");var t=h.H[e.length];if(void 0===t)throw new $(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(h.H).toString()}) parameters instead!`);return t.apply(this,e)})}});t.prototype=u;var h=new eM(c,t,u,d,i,a,s,l);return h.o&&((n=h.o).S??(n.S=[]),h.o.S.push(h)),i=new eO(c,h,!0,!1,!1),n=new eO(c+"*",h,!1,!1,!1),o=new eO(c+" const*",h,!1,!0,!1),ef[e]={pointerType:n,Ga:o},eL(f,t),[i,n,o]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=eN(n,r);t=ez(t=en(t)),a=eD(i,a),e_([],[e],e=>{function r(){eW(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.h.constructor;return void 0===u[t]?(r.K=n-1,u[t]=r):(eE(u,t,i),u[t].l[n-1]=r),e_([],s,r=>{if(r=eB(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].l?(r.K=n-1,u[t]=r):u[t].l[n-1]=r,e.h.S)for(let n of e.h.S)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=en(t),a=eD(i,a),e_([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,u={get(){eW(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{eW(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new $(`${i} is a read-only property`)},Object.defineProperty(e.h.constructor,t,u),e_([],[n],n=>{n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=eD(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),eg(t)}),Object.defineProperty(e.h.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=eN(t,n);i=eD(r,i),e_([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(void 0===e.h.H&&(e.h.H=[]),void 0!==e.h.H[t-1])throw new $(`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.H[t-1]=()=>{eW(`Cannot construct ${e.name} due to unbound types`,o)},e_([],o,r=>(r.splice(1,0,null),e.h.H[t-1]=eB(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var u=eN(n,r);t=ez(t=en(t)),a=eD(i,a),e_([],[e],e=>{function r(){eW(`Cannot call ${i} due to unbound types`,u)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.h.va.push(t);var l=e.h.B,c=l[t];return void 0===c||void 0===c.l&&c.className!==e.name&&c.K===n-2?(r.K=n-2,r.className=e.name,l[t]=r):(eE(l,t,i),l[t].l[n-2]=r),e_([],u,r=>(r=eB(i,r,e,a,o),void 0===l[t].l?(r.K=n-2,l[t]=r):l[t].l[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,u,l)=>{t=en(t),i=eD(r,i),e_([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,c={get(){eW(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return c.set=u?()=>eW(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new $(r+" is a read-only property")},Object.defineProperty(e.h.B,t,c),e_([],u?[n,o]:[n],n=>{var o=n[0],c={get(){var t=e$(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=eD(s,u);var h=n[1];c.set=function(t){var n=e$(this,e,r+" setter"),i=[];u(l,n,h.toWireType(i,t)),eg(i)}}return Object.defineProperty(e.h.B,t,c),[]}),[]})},_embind_register_emval:e=>eA(e,eY),_embind_register_enum:(e,t,n,r)=>{function i(){}t=en(t),i.values={},eA(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:((e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(C[e])}:function(e){return this.fromWireType(P[e])};case 2:return n?function(e){return this.fromWireType(E[e>>1])}:function(e){return this.fromWireType(R[e>>1])};case 4:return n?function(e){return this.fromWireType(M[e>>2])}:function(e){return this.fromWireType(I[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}})(t,n,r),A:null}),eR(t,i)}
3,_embind_register_enum_value:(e,t,n)=>{var r=el(e,"enum");t=en(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:J(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{eA(e,{name:t=en(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:((e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(x[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}})(t,n),A:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=eN(t,n);e=ez(e=en(e)),i=eD(r,i),eR(e,function(){eW(`Cannot call ${e} due to unbound types`,o)},t-1),e_([],o,n=>(eL(e,eB(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=en(t),-1===i&&(i=0xffffffff),i=e=>e,0===r){var a=32-8*n;i=e=>e<<a>>>a}var o=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t};eA(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:((e,t,n)=>{switch(t){case 1:return n?e=>C[e]:e=>P[e];case 2:return n?e=>E[e>>1]:e=>R[e>>1];case 4:return n?e=>M[e>>2]:e=>I[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}})(t,n,0!==r),A:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(C.buffer,I[e+4>>2],I[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];eA(e,{name:n=en(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Ua:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=en(t));eA(e,{name:t,fromWireType:function(e){var t=I[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==P[o]){if(i=i?eQ(P,i,o-i):"",void 0===s)var s=i;else s+="\0",s+=i;i=o+1}}else{for(a=0,s=Array(t);a<t;++a)s[a]=String.fromCharCode(P[r+a]);s=s.join("")}return tc(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;if(!(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new $("Cannot pass non-string to std::string");var i=n&&r?eq(t):t.length,a=th(4+i+1),o=a+4;if(I[a>>2]=i,n&&r)eG(t,P,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw tc(o),new $("String has UTF-16 code units that do not fit in 8 bits");P[o+r]=s}else for(r=0;r<i;++r)P[o+r]=t[r];return null!==e&&e.push(tc,a),a},argPackAdvance:8,readValueFromPointer:eb,A(e){tc(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=en(n),2===t)var r=eZ,i=e0,a=e1,o=e=>R[e>>1];else 4===t&&(r=e2,i=e3,a=e4,o=e=>I[e>>2]);eA(e,{name:n,fromWireType:e=>{for(var n,i=I[e>>2],a=e+4,s=0;s<=i;++s){var u=e+4+s*t;(s==i||0==o(u))&&(a=r(a,u-a),void 0===n?n=a:(n+="\0",n+=a),a=u+t)}return tc(e),n},toWireType:(e,r)=>{if("string"!=typeof r)throw new $(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=th(4+o+t);return I[s>>2]=o/t,i(r,s+4,o+t),null!==e&&e.push(tc,s),s},argPackAdvance:8,readValueFromPointer:eb,A(e){tc(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{ev[e]={name:en(t),ea:eD(n,r),C:eD(i,a),ra:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,u,l)=>{ev[e].ra.push({Na:en(t),Ta:n,Ra:eD(r,i),Sa:a,cb:o,bb:eD(s,u),eb:l})},_embind_register_void:(e,t)=>{eA(e,{lb:!0,name:t=en(t),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>P.copyWithin(e,t,t+n),_emval_as:(e,t,n)=>(e=Z(e),e5(t=el(t,"emval::as"),n,e)),_emval_call_method:(e,t,n,r,i)=>(e=e7[e])(t=Z(t),t[n=e8(n)],r,i),_emval_decref:eH,_emval_get_method_caller:(e,t,n)=>{var r,i,a=((e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=el(I[t+4*r>>2],"parameter "+r);return n})(e,t),o=a.shift(),s=Array(--e);return r=J(t=`methodCaller<(${a.map(e=>e.name).join(", ")}) => ${o.name}>`,(t,r,i,u)=>{for(var l=0,c=0;c<e;++c)s[c]=a[c].readValueFromPointer(u+l),l+=a[c].argPackAdvance;return e5(o,i,t=1===n?e9(r,s):r.apply(t,s))}),i=e7.length,e7.push(r),i},_emval_get_module_property:t=>ee(e[t=e8(t)]),_emval_get_property:(e,t)=>ee((e=Z(e))[t=Z(t)]),_emval_incref:e=>{9<e&&(K[e+1]+=1)},_emval_new_array:()=>ee([]),_emval_new_cstring:e=>ee(e8(e)),_emval_new_object:()=>ee({}),_emval_run_destructors:e=>{eg(Z(e)),eH(e)},_emval_set_property:(e,t,n)=>{e=Z(e),t=Z(t),n=Z(n),e[t]=n},_emval_take_value:(e,t)=>
3ee(e=(e=el(e,"_emval_take_value")).readValueFromPointer(t)),emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=P.length;if(0x80000000<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math;r=Math.max(e,r);e:{i=(i.min.call(i,0x80000000,r+(65536-r%65536)%65536)-A.buffer.byteLength+65535)/65536;try{A.grow(i),O();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return tt().forEach((r,i)=>{var a=t+n;for(i=I[e+4*i>>2]=a,a=0;a<r.length;++a)C[i++]=r.charCodeAt(a);C[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=tt();I[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),I[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=I[t>>2],s=I[t+4>>2];t+=8;for(var u=0;u<s;u++){var l=P[o+u],c=tn[e];0===l||10===l?((1===e?y:w)(eQ(c,0)),c.length=0):c.push(l)}i+=s}return I[r>>2]=i,0},strftime_l:(e,t,n,r)=>((e,t,n,r)=>{function i(e,t,n){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,"0")}function o(e,t){var n;function r(e){return 0>e?-1:+(0<e)}return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function u(e){var t=e.I;for(e=new Date(new Date(e.J+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(tr(e.getFullYear())?ti:ta)[n];if(t>r-e.getDate())t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+t);break}}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l,c,h=I[r+40>>2];for(var d in r={ib:M[r>>2],hb:M[r+4>>2],Y:M[r+8>>2],ga:M[r+12>>2],Z:M[r+16>>2],J:M[r+20>>2],D:M[r+24>>2],I:M[r+28>>2],nb:M[r+32>>2],gb:M[r+36>>2],jb:h&&h?eQ(P,h):""},n=n?eQ(P,n):"",h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(RegExp(d,"g"),h[d]);var f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),p="January February March April May June July August September October November December".split(" ");for(d in h={"%a":e=>f[e.D].substring(0,3),"%A":e=>f[e.D],"%b":e=>p[e.Z].substring(0,3),"%B":e=>p[e.Z],"%C":e=>a((e.J+1900)/100|0,2),"%d":e=>a(e.ga,2),"%e":e=>i(e.ga,2," "),"%g":e=>u(e).toString().substring(2),"%G":u,"%H":e=>a(e.Y,2),"%I":e=>(0==(e=e.Y)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Z-1;t+=(tr(e.J+1900)?ti:ta)[n++]);return a(e.ga+t,3)},"%m":e=>a(e.Z+1,2),"%M":e=>a(e.hb,2),"%n":()=>"\n","%p":e=>0<=e.Y&&12>e.Y?"AM":"PM","%S":e=>a(e.ib,2),"%t":()=>"	","%u":e=>e.D||7,"%U":e=>a(Math.floor((e.I+7-e.D)/7),2),"%V":e=>{var t=Math.floor((e.I+7-(e.D+6)%7)/7);if(2>=(e.D+371-e.I-2)%7&&t++,t)53==t&&(4==(n=(e.D+371-e.I)%7)||3==n&&tr(e.J)||(t=1));else{t=52;var n=(e.D+7-e.I-1)%7;(4==n||5==n&&tr(e.J%400-1))&&t++}return a(t,2)},"%w":e=>e.D,"%W":e=>a(Math.floor((e.I+7-(e.D+6)%7)/7),2),"%y":e=>(e.J+1900).toString().substring(2),"%Y":e=>e.J+1900,"%z":e=>{var t=0<=(e=e.gb);return(t?"+":"-")+String("0000"+((e=Math.abs(e)/60)/60*100+e%60)).slice(-4)},"%Z":e=>e.jb,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),h)n.includes(d)&&(n=n.replace(RegExp(d,"g"),h[d](r)));return(c=Array(eq(l=n=n.replace(/\0\0/g,"%"))+1),eG(l,c,0,c.length),(d=c).length>t)?0:(C.set(d,e),d.length-1)})(e,t,n,r)},tl=function(){function t(t){return A=(tl=t.exports).memory,O(),eS=tl.__indirect_function_table,j.unshift(tl.__wasm_call_ctors),k--,e.monitorRunDependencies?.(k),0==k&&(null!==V&&(clearInterval(V),V=null),D&&(t=D,D=null,t())),tl}var n,r,a={env:tu,wasi_snapshot_preview1:tu};if(k++,e.monitorRunDependencies?.(k),e.instantiateWasm)try{return e.instantiateWasm(a,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return B||="canvas_advanced.wasm".startsWith("data:application/octet-stream;base64,")?"canvas_advanced.wasm":e.locateFile?e.locateFile("canvas_advanced.wasm",b):b+"canvas_advanced.wasm",(n=a,r=function(e){t(e.instance)},_||"function"!=typeof WebAssembly.instantiateStreaming||B.startsWith("data:application/octet-stream;base64,")||U(B)||"function"!=typeof fetch?z(B,n,r):fetch(B,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,n).then(r,function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),z(B,n,r)}
3))).catch(i),{}}(),tc=e=>(tc=tl.free)(e),th=e=>(th=tl.malloc)(e),td=e=>(td=tl.__getTypeName)(e);function tf(){function r(){if(!t&&(t=!0,e.calledRun=!0,!F)){if(q(j),n(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r=e.postRun.shift();L.unshift(r)}q(L)}}if(!(0<k)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)!function(){var t=e.preRun.shift();S.unshift(t)}();q(S),0<k||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),r()},1)):r())}}if(e.dynCall_jiji=(t,n,r,i,a)=>(e.dynCall_jiji=tl.dynCall_jiji)(t,n,r,i,a),e.dynCall_viijii=(t,n,r,i,a,o,s)=>(e.dynCall_viijii=tl.dynCall_viijii)(t,n,r,i,a,o,s),e.dynCall_iiiiij=(t,n,r,i,a,o,s)=>(e.dynCall_iiiiij=tl.dynCall_iiiiij)(t,n,r,i,a,o,s),e.dynCall_iiiiijj=(t,n,r,i,a,o,s,u,l)=>(e.dynCall_iiiiijj=tl.dynCall_iiiiijj)(t,n,r,i,a,o,s,u,l),e.dynCall_iiiiiijj=(t,n,r,i,a,o,s,u,l,c)=>(e.dynCall_iiiiiijj=tl.dynCall_iiiiiijj)(t,n,r,i,a,o,s,u,l,c),D=function e(){t||tf(),t||(D=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return tf(),a})},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.32.0","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}')},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return null!==this.scrubTo},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){null===this.scrubTo?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,FileFinalizer:()=>a.FileFinalizer,FontAssetWrapper:()=>a.FontAssetWrapper,FontWrapper:()=>a.FontWrapper,ImageAssetWrapper:()=>a.ImageAssetWrapper,ImageWrapper:()=>a.ImageWrapper,createFinalization:()=>a.createFinalization,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,n){var r,i,a=[];if(["touchstart","touchmove"].indexOf(e.type)>-1&&(null==(r=e.changedTouches)?void 0:r.length)){t||e.preventDefault();for(var o=0,s=n?e.changedTouches.length:1;o<s;){var u=e.changedTouches[o];a.push({clientX:u.clientX,clientY:u.clientY,identifier:u.identifier}),o++}}else if("touchend"===e.type&&(null==(i=e.changedTouches)?void 0:i.length))for(var o=0,s=n?e.changedTouches.length:1;o<s;){var u=e.changedTouches[o];a.push({clientX:u.clientX,clientY:u.clientY,identifier:u.identifier}),o++}else a.push({clientX:e.clientX,clientY:e.clientY,identifier:0});return a},a=function(e){var t=e.canvas,n=e.artboard,a=e.stateMachines,o=void 0===a?[]:a,s=e.renderer,u=e.rive,l=e.fit,c=e.alignment,h=e.isTouchScrollEnabled,d=void 0!==h&&h,f=e.dis
3patchPointerExit,p=void 0===f||f,m=e.enableMultiTouch,v=void 0!==m&&m,g=e.layoutScaleFactor,b=void 0===g?1:g;if(!t||!o.length||!s||!u||!n||"undefined"==typeof window)return null;var y=null,w=!1,_=(function(e){if(w&&e instanceof MouseEvent){"mouseup"==e.type&&(w=!1);return}w=d&&"touchend"===e.type&&"touchstart"===y,y=e.type;var t=e.currentTarget.getBoundingClientRect(),r=i(e,d,v),a=u.computeAlignment(l,c,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,b),s=new u.Mat2D;switch(a.invert(s),r.forEach(function(e){var n=e.clientX,r=e.clientY;if(n||r){var i=n-t.left,a=r-t.top,o=new u.Vec2D(i,a),l=u.mapXY(s,o),c=l.x(),h=l.y();e.transformedX=c,e.transformedY=h,l.delete(),o.delete()}}),s.delete(),a.delete(),e.type){case"mouseout":for(var h=function(e){p?r.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},f=0;f<o.length;f++){var m=o[f];h(m)}break;case"touchmove":case"mouseover":case"mousemove":for(var g=function(e){r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},_=0;_<o.length;_++){var m=o[_];g(m)}break;case"touchstart":case"mousedown":for(var A=function(e){r.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},C=0;C<o.length;C++){var m=o[C];A(m)}break;case"touchend":for(var P=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},E=0;E<o.length;E++){var m=o[E];P(m)}break;case"mouseup":for(var R=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},M=0;M<o.length;M++){var m=o[M];R(m)}}}).bind(r);return t.addEventListener("mouseover",_),t.addEventListener("mouseout",_),t.addEventListener("mousemove",_),t.addEventListener("mousedown",_),t.addEventListener("mouseup",_),t.addEventListener("touchmove",_,{passive:d}),t.addEventListener("touchstart",_,{passive:d}),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:()=>c});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,u=[".","/"],l="about:blank";function c(e){if(!e)return l;var t=e.replace(o,"").replace(i,function(e,t){return String.fromCharCode(t)}).replace(a,"").replace(o,"").trim();if(!t)return l;if(u.indexOf(t[0])>-1)return t;var n=t.match(s);if(!n)return t;var c=n[0];return r.test(c)?l:t}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>l,CustomFileAssetLoaderWrapper:()=>h,FileAssetWrapper:()=>d,FileFinalizer:()=>a,FontAssetWrapper:()=>m,FontWrapper:()=>c,ImageAssetWrapper:()=>f,ImageWrapper:()=>u,createFinalization:()=>b,finalizationRegistry:()=>g});var r,i=(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),o=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),s=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),u=function(e){function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage}
3,enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(s),l=function(e){function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(s),c=function(e){function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(s),h=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 f(e):e.isAudio?n=new p(e):e.isFont&&(n=new m(e)),this._assetLoaderCallback(n,t)},e}(),d=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}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(d),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(d),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(d),v=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),g=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:v)(function(e){null==e||e.unref()}),b=function(e,t){var n=new o(t);g.register(e,n)}}],el={};function ec(e){var t=el[e];if(void 0!==t)return t.exports;var n=el[e]={exports:{}};return eu[e](n,n.exports,ec),n.exports}ec.d=(e,t)=>{for(var n in t)ec.o(t,n)&&!ec.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},ec.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ec.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var eh={};return ec.r(eh),ec.d(eh,{Alignment:()=>t,DataEnum:()=>z,EventType:()=>i,Fit:()=>e,Layout:()=>_,LoopType:()=>a,Rive:()=>U,RiveEventType:()=>r,RiveFile:()=>B,RuntimeLoader:()=>A,StateMachineInput:()=>P,StateMachineInputType:()=>n,Testing:()=>ei,ViewModel:()=>N,ViewModelInstance:()=>H,ViewModelInstanceArtboard:()=>et,ViewModelInstanceAssetImage:()=>ee,ViewModelInstanceBoolean:()=>q,ViewModelInstanceColor:()=>Z,ViewModelInstanceEnum:()=>Q,ViewModelInstanceList:()=>K,ViewModelInstanceNumber:()=>G,ViewModelInstanceString:()=>X,ViewModelInstanceTrigger:()=>J,ViewModelInstanceValue:()=>Y,decodeAudio:()=>ea,decodeFont:()=>es,decodeImage:()=>eo}),u=ec(1),l=ec(2),c=ec(3),h=ec(5),d=function(e,t){return(d=Object.
3setPrototypeOf||({__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)},f=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((r=r.apply(e,t||[])).next())})},v=function(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){var l=[s,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},g=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return f(t,e),t}(Error),(y=e||(e={})).Cover="cover",y.Contain="contain",y.Fill="fill",y.FitWidth="fitWidth",y.FitHeight="fitHeight",y.None="none",y.ScaleDown="scaleDown",y.Layout="layout",(w=t||(t={})).Center="center",w.TopLeft="topLeft",w.TopCenter="topCenter",w.TopRight="topRight",w.CenterLeft="centerLeft",w.CenterRight="centerRight",w.BottomLeft="bottomLeft",w.BottomCenter="bottomCenter",w.BottomRight="bottomRight",_=function(){function n(n){var r,i,a,o,s,u,l;this.fit=null!=(r=null==n?void 0:n.fit)?r:e.Contain,this.alignment=null!=(i=null==n?void 0:n.alignment)?i:t.Center,this.layoutScaleFactor=null!=(a=null==n?void 0:n.layoutScaleFactor)?a:1,this.minX=null!=(o=null==n?void 0:n.minX)?o:0,this.minY=null!=(s=null==n?void 0:n.minY)?s:0,this.maxX=null!=(u=null==n?void 0:n.maxX)?u:0,this.maxY=null!=(l=null==n?void 0:n.maxY)?l:0}return n.new=function(e){var t=e.fit,r=e.alignment,i=e.minX,a=e.minY,o=e.maxX,s=e.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new n({fit:t,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},n.prototype.copyWith=function(e){var t=e.fit,r=e.alignment,i=e.layoutScaleFactor,a=e.minX,o=e.minY,s=e.maxX,u=e.maxY;return new n({fit:null!=t?t:this.fit,alignment:null!=r?r:this.alignment,layoutScaleFactor:null!=i?i:this.layoutScaleFactor,minX:null!=a?a:this.minX,minY:null!=o?o:this.minY,maxX:null!=s?s:this.maxX,maxY:null!=u?u:this.maxY})},n.prototype.runtimeFit=function(t){var n;return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===e.Cover?t.Fit.cover:this.fit===e.Contain?t.Fit.contain:this.fit===e.Fill?t.Fit.fill:this.fit===e.FitWidth?t.Fit.fitWidth:this.fit===e.FitHeight?t.Fit.fitHeight:this.fit===e.ScaleDown?t.Fit.scaleDown:this.fit===e.Layout?t.Fit.layout:t.Fit.none,this.cachedRuntimeFit=n,n)},n.prototype.runtimeAlignment=function(e){var n;return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(n=this.alignment===t.TopLeft?e.Alignment.topLeft:this.alignment===t.TopCenter?e.Alignment.topCenter:this.alignment===t.TopRight?e.Alignment.topRight:this.alignment===t.CenterLeft?e.Alignment.centerLeft:this.alignment===t.CenterRight?e.Alignment.centerRight:this.alignment===t.BottomLeft?e.Alignment.bottomLeft:this.alignment===t.BottomCenter?e.Alignment.bottomCenter:this.alignment===t.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=n,n)},n}(),A=function(){function e(){}return e.loadRuntime=function(){u.default({locateFile:function(){return e.wasmURL}
3}).then(function(t){var n;for(e.runtime=t;e.callBackQueue.length>0;)null==(n=e.callBackQueue.shift())||n(e.runtime)}).catch(function(t){var n={message:(null==t?void 0:t.message)||"Unknown error",type:(null==t?void 0:t.name)||"Error",wasmError:t instanceof WebAssembly.CompileError||t instanceof WebAssembly.RuntimeError,originalError:t};console.debug("Rive WASM load error details:",n);var r="https://cdn.jsdelivr.net/npm/".concat(l.name,"@").concat(l.version,"/rive_fallback.wasm");e.wasmURL.toLowerCase()!==r?(console.warn("Failed to load WASM from ".concat(e.wasmURL," (").concat(n.message,"), trying jsdelivr as a backup")),e.setWasmUrl(r),e.loadRuntime()):console.error(["Could not load Rive WASM file from ".concat(e.wasmURL," or ").concat(r,"."),"Possible reasons:\n- Network connection is down\n- WebAssembly is not supported in this environment\n- The WASM file is corrupted or incompatible\n\nError details:","- Type: ".concat(n.type),"- Message: ".concat(n.message),"- WebAssembly-specific error: ".concat(n.wasmError),"\nTo resolve, you may need to:\n1. Check your network connection\n2. Set a new WASM source via RuntimeLoader.setWasmUrl()\n3. Call RuntimeLoader.loadRuntime() again"].join("\n"))})},e.getInstance=function(t){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):e.callBackQueue.push(t)},e.awaitInstance=function(){return new Promise(function(t){return e.getInstance(function(e){return t(e)})})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(l.name,"@").concat(l.version,"/rive.wasm"),e}(),(C=n||(n={}))[C.Number=56]="Number",C[C.Trigger=58]="Trigger",C[C.Boolean=59]="Boolean",P=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===n.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),(E=r||(r={}))[E.General=128]="General",E[E.OpenUrl=131]="OpenUrl",M=function(e){function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return f(t,e),t}(R=function(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}),I=function(e){function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return f(t,e),t.prototype.destroy=function(){this.selfUnref&&this.nativeArtboard.unref()},t}(R),x=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){return e.type===t.SMIInput.bool?new P(n.Boolean,e.asBool()):e.type===t.SMIInput.number?new P(n.Number,e.asNumber()):e.type===t.SMIInput.trigger?new P(n.Trigger,e.asTrigger()):void 0},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){null!=e.runtimeInstance&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),T=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(void 0===n&&(n=!0),0===(e=er(e)).length)this.animations.forEach(function(e){return e.playing=t}
3),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<e.length;o++){var s=r.indexOf(e[o]),u=a.indexOf(e[o]);if(s>=0||u>=0)s>=0?this.animations[s].playing=t:this.stateMachines[u].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var h=new c.Animation(l,this.artboard,this.runtime,t);h.advance(0),h.apply(1),this.animations.push(h)}else{var d=this.artboard.stateMachineByName(e[o]);if(d){var f=new x(d,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:i.Play,data:this.playing}):this.eventManager.fire({type:i.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.animations[i].playing=t;else{var a=this.artboard.animationByName(e[r]);if(a){var o=new c.Animation(a,this.artboard,this.runtime,t);o.advance(0),o.apply(1),this.animations.push(o)}else console.error("Animation with name ".concat(e[r]," not found."))}}},e.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new x(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn("State Machine with name ".concat(e[r]," not found.")),this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(e){e.playing||e.advanceAndApply(0)})},e.prototype.pause=function(e){return this.add(e,!1)},e.prototype.scrub=function(e,t){var n=this.animations.filter(function(t){return e.includes(t.name)});return n.forEach(function(e){return e.scrubTo=t}),n.map(function(e){return e.name})},Object.defineProperty(e.prototype,"playing",{get:function(){return this.animations.filter(function(e){return e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),e.prototype.stop=function(e){var t=this;e=er(e);var n=[];if(0===e.length)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var a=this.stateMachines.filter(function(t){return e.includes(t.name)});a.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(a.map(function(e){return e.name}))}return this.eventManager.fire({type:i.Stop,data:n}),n},Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){var n;return void 0===t&&(t=!0),0===this.animations.length&&0===this.stateMachines.length&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:i.Loop,data:{animation:n.name,type:a.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:i.Loop,data:{animation:n.name,type:a.PingPong}}),n.loopCount=0)}},e.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter(function(e){return e.playing});t<n.length;t++){var r=n[t];e.push.apply(e,r.statesChanged)}e.length>0&&this.eventManager.fire({type:i.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:i.Advance,data:e})},e}(),(F=i||(i={})).Load="load",F.LoadError="loaderror",F.Play="play",F.Pause="pause",F.Stop="stop",F.Loop="loop",F.Draw="draw",F.Advance="advance",F.StateChange="statechange",F.RiveEvent="riveevent",F.AudioStatusChange="audiostatuschange",(O=a||(a={})).OneShot="oneshot",O.Loop="loop",O.PingPong="pingpong",S=function(){function e(e){void 0===e&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}
3).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}(),j=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();(null==e?void 0:e.action)&&e.action(),(null==e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}(),(L=o||(o={}))[L.AVAILABLE=0]="AVAILABLE",L[L.UNAVAILABLE=1]="UNAVAILABLE",k=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=o.UNAVAILABLE,t}return f(t,e),t.prototype.delay=function(e){return m(this,void 0,void 0,function(){return v(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:i.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return this._enabled||(this._enabled=!0,this._status=o.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:if(this._status!==o.UNAVAILABLE||null===this._audioContext)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:if(this._started)return[3,5];if(this._started=!0,"undefined"!=typeof window)return[3,1];return this.enableAudio(),[3,5];case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:if(this._status!==o.UNAVAILABLE)return[3,5];return[4,this.testAudio()];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener("pointerdown",function(){return m(e,void 0,void 0,function(){return v(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return m(this,void 0,void 0,function(){return v(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===o.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(S)),V=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),D=globalThis.ResizeObserver||V,W=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);null!==n?n.onResize(0==t.target.clientWidth||0==t.target.clientHeight):e._resizeObserver.unobserve(t.target)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new D(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}()),B=function(){function e(e){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new S,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&(null==(e=this.file)||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return m(this,void 0,void 0,function(){var t,n,r,a;return v(this,function(o){switch(o.label){case 0:if(!this.src)return[3,2];return t=this,[4,en(this.src)];case 1:t.buffer=o.sent(),o.label=2;case 2:if(this.destroyed)return[2];return this.assetLoader&&(n=new h.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader).assetLoader),r=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)];case 3:if(r.file=o.sent(),a=new h.FileFinalizer(this.file),h.finalizationRegistry.register(this,a),this.destroyed)return this.releaseFile(),[2];return null!==this.file?this.eventManager.fire({type:i.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2]}})})},e.prototype.init=function(){return m(this,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),t=this,[4,A.awaitInstance()];case 2:if(t.runtime=r.sent(),this.destroyed)return[2];return[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:i.LoadError,data:e}),Error(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(null!=e){var t=new I(e);return(0,h.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);
3if(null!=t)return new M(t,this)},e.prototype.getBindableArtboard=function(e){var t=this.file.bindableArtboardByName(e);return this.createBindableArtboard(t)},e.prototype.getDefaultBindableArtboard=function(){var e=this.file.bindableArtboardDefault();return this.createBindableArtboard(e)},e.prototype.internalBindableArtboardFromArtboard=function(e){var t=this.file.internalBindableArtboardFromArtboard(e);return this.createBindableArtboard(t)},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),U=function(){function t(e){var t,n=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=n._hasZeroSize!==e;n._hasZeroSize=e,e?n._layout.maxX&&n._layout.maxY||n.resizeToCanvas():t&&n.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=W.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!=(t=e.layout)?t:new _,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=!1===e.dispatchPointerExit?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new S,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError),e.onPlay&&this.on(i.Play,e.onPlay),e.onPause&&this.on(i.Pause,e.onPause),e.onStop&&this.on(i.Stop,e.onStop),e.onLoop&&this.on(i.Loop,e.onLoop),e.onStateChange&&this.on(i.StateChange,e.onStateChange),e.onAdvance&&this.on(i.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(i.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(i.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(i.Play,e.onplay),e.onpause&&!e.onPause&&this.on(i.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(i.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(i.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(i.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new j(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(t.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),t.new=function(e){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new t(e)},t.prototype.onSystemAudioChanged=function(){this.volume=this._volume},t.prototype.init=function(e){var n=this,r=e.src,i=e.buffer,a=e.riveFile,o=e.animations,s=e.stateMachines,u=e.artboard,l=e.autoplay,c=void 0!==l&&l,h=e.useOffscreenRenderer,d=void 0!==h&&h,f=e.autoBind,p=void 0!==f&&f;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new b(t.missingErrorMessage);var m=er(o),v=er(s);this.loaded=!1,this.readyForPlaying=!1,A.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,d),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,m,v,c,p).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){console.error(e)})}},t.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter(function(e){return e.playing&&t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),r=this.isTouchScrollEnabled,i=this.dispatchPointerExit,a=this.enableMultiTouch;e&&"isTouchScrollEnabled"in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,h.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,dispatchPointerExit:i,enableMultiTouch:a,layoutScaleFactor:this._layout.layoutScaleFactor})}},t.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},t.prototype.initializeAudio=function(){var e,t=this;k.status==o.UNAVAILABLE&&(null==(e=this.artboard)?void 0:e.hasAudio)&&null===this._audioEventListener&&(this._audioEventListener={type:i.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},k.add(this._audioEventListener),k.establishAudio())},t.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},t.prototype.initData=function(e,t,n,r,a){return m(this,void 0,void 0,function(){var o,s,u;return v(this,function(l){switch(l.label){case 0:if(l.trys.push([0,3,,4]),null!=this.riveFile)return[3,2];return o=new B({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=o,[4,o.init()];case 1:if(l.sent(),this.destroyed)return o.destroyIfUnused(),[2,!1];l.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,a),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:i.Load,data:null!=(u=this.src)?u:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:var c;return console.warn(s=(c=l.sent())&&c.isHandledError?c.message:"Problem loading file; may be corrupt!"),this.eventManager.fire({type:i.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},t.prototype.initArtboard=function(e,t,n,r,a){if(this.file){var o,s=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!s){var u="Invalid artboard name or no default artboard";console.warn(u),this.eventManager.fire({type:i.LoadError,data:u});return}if(this.artboard=s,s.volume=this._volume*k.systemVolume,this.animator=new T(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(o=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):o=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?i.Play:i.Pause,data:o}}),a){var l=this.file.defaultArtboardViewModel(s);if(null!==l){var c=l.defaultInstance();if(null!==c){var d=new H(c,null);(0,h.createFinalization)(d,d.runtimeInstance),this.bindViewModelInstance(d)}}}}},t.prototype.drawFrame=function(){var e,t;(null==(e=null==document?void 0:document.timeline)?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null==(t=this.runtime)||t.resolveAnimationFrame()):this.startRendering()},t.prototype.draw=function(e,t){this.frameRequestId=null;var n,a=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var o=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var s=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),u=0;u<s.length;u++){var l=s[u];l.advance(o),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var c=this.animator.stateMachines.filter(function(e){return e.playing}),d=0;d<c.length;d++){var f=c[d],p=f.reportedEventCount();if(p)for(var m=0;m<p;m++){var v=f.reportedEventAt(m);
3if(v)if(v.type===r.OpenUrl){if(this.eventManager.fire({type:i.RiveEvent,data:v}),this.automaticallyHandleEvents){var g=document.createElement("a"),b=v.url,y=v.target,w=(0,h.sanitizeUrl)(b);b&&g.setAttribute("href",w),y&&g.setAttribute("target",y),w&&w!==h.BLANK_URL&&g.click()}}else this.eventManager.fire({type:i.RiveEvent,data:v})}f.advanceAndApply(o)}0==this.animator.stateMachines.length&&this.artboard.advance(o);var _=this.renderer;_.clear(),_.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(_),_.restore(),_.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(o),this.frameCount++;var A=performance.now();for(this.frameTimes.push(A),this.durations.push(A-a);this.frameTimes[0]<=A-1e3;)this.frameTimes.shift(),this.durations.shift();null==(n=this._viewModelInstance)||n.handleCallbacks(),this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},t.prototype.alignRenderer=function(){var e=this.renderer,t=this.runtime,n=this._layout,r=this.artboard;e.align(n.runtimeFit(t),n.runtimeAlignment(t),{minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY},r.bounds,this._devicePixelRatioUsed*n.layoutScaleFactor)},Object.defineProperty(t.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frameTime",{get:function(){return 0===this.durations.length?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),t.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),null!==this._observed&&W.remove(this._observed),this.removeRiveListeners(),this.file&&(null==(e=this.riveFile)||e.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(k.remove(this._audioEventListener),this._audioEventListener=null),null==(t=this._viewModelInstance)||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},t.prototype.deleteRiveRenderer=function(){var e;null==(e=this.renderer)||e.delete(),this.renderer=null},t.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},t.prototype.retrieveTextRun=function(e){if(!e)return void console.warn("No text run name provided");if(!this.artboard)return void console.warn("Tried to access text run, but the Artboard is null");var t,n=this.artboard.textRun(e);return n||void console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null==(t=this.artboard)?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))},t.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},t.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},t.prototype.play=function(e,t){var n=this;(e=er(e),this.readyForPlaying)?(this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(e,t)}})},t.prototype.pause=function(e){var t=this;(e=er(e),this.readyForPlaying)?(this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)):this.taskQueue.add({action:function(){return t.pause(e)}})},t.prototype.scrub=function(e,t){var n=this;(e=er(e),this.readyForPlaying)?(this.animator.scrub(e,t||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(e,t)}})},t.prototype.stop=function(e){var t=this;(e=er(e),this.readyForPlaying)?(this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()):this.taskQueue.add({action:function(){return t.stop(e)}})},t.prototype.reset=function(e){var t,n,r=null==e?void 0:e.artboard,i=er(null==e?void 0:e.animations),a=er(null==e?void 0:e.stateMachines),o=null!=(t=null==e?void 0:e.autoplay)&&t,s=null!=(n=null==e?void 0:e.autoBind)&&n;this.cleanupInstances(),this.initArtboard(r,i,a,o,s),this.taskQueue.process()},t.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,e.maxX&&e.maxY||this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()}
3,enumerable:!1,configurable:!0}),t.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},t.prototype.resizeDrawingSurfaceToCanvas=function(t){if(this.canvas instanceof HTMLCanvasElement&&window){var n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,a=t||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*r,this.canvas.height=a*i,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===e.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=r/o,this.artboard.height=i/o}}},Object.defineProperty(t.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),t.prototype.stateMachineInputs=function(e){if(this.loaded){var t=this.animator.stateMachines.find(function(t){return t.name===e});return null==t?void 0:t.inputs}},t.prototype.retrieveInputAtPath=function(e,t){if(!e)return void console.warn("No input name provided for path '".concat(t,"'"));if(!this.artboard)return void console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));var n=this.artboard.inputByPath(e,t);return n||void console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.setBooleanStateAtPath=function(e,t,r){var i=this.retrieveInputAtPath(e,r);i&&(i.type===n.Boolean?i.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(r,"' is not a boolean")))},t.prototype.setNumberStateAtPath=function(e,t,r){var i=this.retrieveInputAtPath(e,r);i&&(i.type===n.Number?i.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(r,"' is not a number")))},t.prototype.fireStateAtPath=function(e,t){var r=this.retrieveInputAtPath(e,t);r&&(r.type===n.Trigger?r.asTrigger().fire():console.warn("Input with name: '".concat(e,"', at path:'").concat(t,"' is not a trigger")))},t.prototype.retrieveTextAtPath=function(e,t){if(!e)return void console.warn("No text name provided for path '".concat(t,"'"));if(!t)return void console.warn("No path provided for text '".concat(e,"'"));if(!this.artboard)return void console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));var n=this.artboard.textByPath(e,t);return n||void console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);return n?n.text:void console.warn("Could not get text with name: '".concat(e,"', at path:'").concat(t,"'"))},t.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);r?r.text=t:console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"))},Object.defineProperty(t.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]}
3,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),t.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},t.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},t.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},t.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},t.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},t.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},t.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},t.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},t.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(t.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();o++){for(var s=n.stateMachineByIndex(o),u=s.name,l=new this.runtime.StateMachineInstance(s,n),c=[],h=0;h<l.inputCount();h++){var d=l.input(h);c.push({name:d.name,type:d.type})}r.stateMachines.push({name:u,inputs:c})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*k.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!=(e=this._artboardWidth)?e:0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardHeight",{get:function(){var e;return this.artboard?this.artboard.height:null!=(e=this._artboardHeight)?e:0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),t.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(t.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),t.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),null==(t=this._viewModelInstance)||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(t.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance}
3,enumerable:!1,configurable:!0}),t.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new N(t):null},t.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new N(t):null},t.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map(function(e){return new z(e)})}return this._dataEnums},t.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new N(e)}return null},t.prototype.getArtboard=function(e){var t,n;return null!=(n=null==(t=this.riveFile)?void 0:t.getArtboard(e))?n:null},t.prototype.getBindableArtboard=function(e){var t,n;return null!=(n=null==(t=this.riveFile)?void 0:t.getBindableArtboard(e))?n:null},t.prototype.getDefaultBindableArtboard=function(){var e,t;return null!=(t=null==(e=this.riveFile)?void 0:e.getDefaultBindableArtboard())?t:null},t.missingErrorMessage="Rive source file or data buffer required",t.cleanupErrorMessage="Attempt to use file after calling cleanup.",t}(),N=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);if(null!==t){var n=new H(t,null);return(0,h.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(null!==t){var n=new H(t,null);return(0,h.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(null!==e){var t=new H(e,null);return(0,h.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(null!==e){var t=new H(e,null);return(0,h.createFinalization)(t,e),t}return 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}(),z=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}(),($=s||(s={})).Number="number",$.String="string",$.Boolean="boolean",$.Color="color",$.Trigger="trigger",$.Enum="enum",$.List="list",$.Image="image",$.Artboard="artboard",H=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,null!==t&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){0!==this._propertiesWithCallbacks.length&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()})),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){!this._parents.includes(e)&&(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);-1!==t&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;!this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>
30&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split("/");return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);if(null!==n)if(t==e.length-1)return n;else return n.viewModelFromPathSegments(e,t++);return null},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r,i,a,o,u,l,c,h,d,f,p,m,v,g,b,y,w,_,A=this.internalViewModelInstance(e[t]);return null!==A?A.propertyFromPathSegments(e,t+1,n):null}var C=null;switch(n){case s.Number:if(null!==(C=null!=(i=null==(r=this._runtimeInstance)?void 0:r.number(e[t]))?i:null))return new G(C,this);break;case s.String:if(null!==(C=null!=(o=null==(a=this._runtimeInstance)?void 0:a.string(e[t]))?o:null))return new X(C,this);break;case s.Boolean:if(null!==(C=null!=(l=null==(u=this._runtimeInstance)?void 0:u.boolean(e[t]))?l:null))return new q(C,this);break;case s.Color:if(null!==(C=null!=(h=null==(c=this._runtimeInstance)?void 0:c.color(e[t]))?h:null))return new Z(C,this);break;case s.Trigger:if(null!==(C=null!=(f=null==(d=this._runtimeInstance)?void 0:d.trigger(e[t]))?f:null))return new J(C,this);break;case s.Enum:if(null!==(C=null!=(m=null==(p=this._runtimeInstance)?void 0:p.enum(e[t]))?m:null))return new Q(C,this);break;case s.List:if(null!==(C=null!=(g=null==(v=this._runtimeInstance)?void 0:v.list(e[t]))?g:null))return new K(C,this);break;case s.Image:if(null!==(C=null!=(y=null==(b=this._runtimeInstance)?void 0:b.image(e[t]))?y:null))return new ee(C,this);break;case s.Artboard:if(null!==(C=null!=(_=null==(w=this._runtimeInstance)?void 0:w.artboard(e[t]))?_:null))return new et(C,this)}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n,r=null==(n=this._runtimeInstance)?void 0:n.viewModel(t);if(null!==r){var i=new e(r,this);return(0,h.createFinalization)(i,r),i.internalIncrementReferenceCount(),this._viewModelInstances.set(t,i),i}return null},e.prototype.number=function(e){return this.propertyFromPath(e,s.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,s.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,s.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,s.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,s.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,s.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,s.List)},e.prototype.image=function(e){return this.propertyFromPath(e,s.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,s.Artboard)},e.prototype.viewModel=function(e){var t=e.split("/"),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return null!=n?n.internalViewModelInstance(t[t.length-1]):null},e.prototype.internalReplaceViewModel=function(e,t){var n;if(null!==t.runtimeInstance){var r=(null==(n=this._runtimeInstance)?void 0:n.replaceViewModel(e,t.runtimeInstance))||!1;if(r){t.internalIncrementReferenceCount();var i=this.internalViewModelInstance(e);null!==i&&(i.removeParent(this),this._children.includes(i)&&(this._children=this._children.filter(function(e){return e!==i})),i.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return r}return!1},e.prototype.replaceViewModel=function(e,t){var n,r=e.split("/"),i=r.length>1?this.viewModelFromPathSegments(r.slice(0,r.length-1),0):this;return null!=(n=null==i?void 0:i.internalReplaceViewModel(r[r.length-1],t))&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null==(e=this._runtimeInstance)||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null==(e=this._runtimeInstance)||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null==(e=this._runtimeInstance)?void 0:e.getProperties().map(function(e){return p({},e)}))||[]}
3,enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e,t=this;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&(null==(e=this._runtimeInstance)||e.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=g([],this._children,!0);this._children.length=0;var r=g([],this._parents,!0);this._parents.length=0,n.forEach(function(e){e.removeParent(t)}),r.forEach(function(e){e.removeFromViewModelCallbacks(t)})}},e}(),X=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(Y=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){0===this.callbacks.length&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,0===this.callbacks.length&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}()),G=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(Y),q=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(Y),J=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(Y),Q=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(Y),K=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return!!(null!=e.runtimeInstance&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t))&&(e.addParent(this._parentViewModel),!0)},t.prototype.removeInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(null!=t){var n=new H(t,this._parentViewModel);return(0,h.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(Y),Z=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
3,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(255*Math.max(0,Math.min(1,e))))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(Y),ee=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!=(t=null==e?void 0:e.nativeImage)?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(Y),et=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t,n;n=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard),this._viewModelInstanceValue.value(null!=(t=null==n?void 0:n.nativeArtboard)?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(Y),en=function(e){return m(void 0,void 0,void 0,function(){return v(this,function(t){switch(t.label){case 0:return[4,fetch(new Request(e))];case 1:return[4,t.sent().arrayBuffer()];case 2:return[2,t.sent()]}})})},er=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},ei={EventManager:S,TaskQueueManager:j},ea=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeAudio(e,t)})})];case 1:return t=r.sent(),n=new h.AudioWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},eo=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeImage(e,t)})})];case 1:return t=r.sent(),n=new h.ImageWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},es=function(e){return m(void 0,void 0,void 0,function(){var t,n;return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return A.getInstance(function(n){n.decodeFont(e,t)})})];case 1:return t=r.sent(),n=new h.FontWrapper(t),h.finalizationRegistry.register(n,t),[2,n]}})})},eh})()},381449,(e,t,n)=>{Object.defineProperty(n,"__esModule",{value:!0});var r=e.r(900778),i=e.r(913826),a=r&&"object"==typeof r&&"default"in r?r:{default:r},o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function u(e){var t=e||l(),n=r.useState(t),i=n[0],a=n[1];return r.useEffect(function(){if("undefined"!=typeof window&&"matchMedia"in window){var t=function(){a(e||l())},n=window.matchMedia("screen and (resolution: ".concat(i,"dppx)"));return n.hasOwnProperty("addEventListener")?n.addEventListener("change",t):n.addListener(t),function(){n.hasOwnProperty("removeEventListener")?n.removeEventListener("change",t):n.removeListener(t)}}},[i,e]),i}function l(){return Math.min(Math.max(1,"undefined"!=typeof window&&"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1),3)}var c=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),h=globalThis.ResizeObserver||c,d=void 0!==globalThis.ResizeObserver,f=!d,p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function m(e){return Object.assign({},p,e)}function v(e){var t,n,i,a,o,s,l,c=e.riveLoaded,p=void 0!==c&&c,v=e.canvasElem,g=e.containerRef,b=e.options,y=e.onCanvasHasResized,w=e.artboardBounds,_=m(void 0===b?{}:b),A=r.useState({height:0,width:0}),C=A[0],P=C.height,E=C.width,R=A[1],M=r.useState({height:0,width:0}),I=M[0],x=I.height,T=I.width,F=M[1],O=r.useState(!0),S=O[0],j=O[1],L=_.fitCanvasToArtboardHeight,k=_.shouldResizeCanvasToContainer,V=_.useDevicePixelRatio,D=_.customDevicePixelRatio,W=(void 0===(t=k)&&(t=!0),i=(n=r.useState({width:0,height:0}))[0],a=n[1],r.useEffect(function(){if("undefined"!=typeof window&&t){var e=function(){a({width:window.innerWidth,height:window.innerHeight})};return f&&(e(),window.addEventListener("resize",e)),function(){return window.removeEventListener("resize",e)}}},[]),l=r.useRef(new h((o=function(e){d&&a({width:e[e.length-1].contentRect.width,height:e[e.length-1].contentRect.height})},s=0,function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];clearTimeout(s),s=window.setTimeout(function(){return o.apply(e,t)},0)}))),r.useEffect(function(){var e=l.current;if(t){var n=g.current;return g.current&&d&&e.observe(g.current),function(){e.disconnect(),n&&d&&e.unobserve(n)}}e.disconnect()},[g,l]),i),B=u(D),U=null!=w?w:{},N=U.maxX,z=U.maxY,$=r.useCallback(function(){var e,t,n,r,i=null!=(t=null==(e=g.current)?void 0:e.clientWidth)?t:0,a=null!=(r=null==(n=g.current)?void 0:n.clientHeight)?r:0;return L&&w?{width:i,height:i*(w.maxY/w.maxX)}:{width:i,height:a}},[g,L,N,z]);
3r.useEffect(function(){if(k&&g.current&&p){var e=$(),t=e.width,n=e.height,r=!1;if(v){var i=t!==E||n!==P;if(_.fitCanvasToArtboardHeight&&i&&(g.current.style.height=n+"px",r=!0),_.useDevicePixelRatio){if(i||t*B!==T||n*B!==x){var a=B*t,o=B*n;v.width=a,v.height=o,v.style.width=t+"px",v.style.height=n+"px",F({width:a,height:o}),r=!0}}else i&&(v.width=t,v.height=n,F({width:t,height:n}),r=!0);R({width:t,height:n})}y&&(S||r)&&y&&y(),S&&j(!1)}},[v,g,W,B,$,S,j,x,T,P,E,y,k,L,V,p]),r.useEffect(function(){F({width:0,height:0})},[v])}var g,b=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),y=globalThis.IntersectionObserver||b,w=function(){function e(){var e=this;this.elementsMap=new Map,this.onObserved=function(t){t.forEach(function(t){var n=e.elementsMap.get(t.target);n&&n(t)})},this.observer=new y(this.onObserved)}return e.prototype.registerCallback=function(e,t){this.observer.observe(e),this.elementsMap.set(e,t)},e.prototype.removeCallback=function(e){this.observer.unobserve(e),this.elementsMap.delete(e)},e}(),_=function(){return g||(g=new w),g};function A(e){var t=e.setContainerRef,n=e.setCanvasRef,r=e.className,i=void 0===r?"":r,u=e.style,l=e.children,c=s(e,["setContainerRef","setCanvasRef","className","style","children"]),h=o({width:"100%",height:"100%"},u);return a.default.createElement("div",o({ref:t,className:i},!i&&{style:h}),a.default.createElement("canvas",o({ref:n,style:{verticalAlign:"top",width:0,height:0}},c),l))}function C(e,t){void 0===t&&(t={});var n=r.useState(null),l=n[0],c=n[1],h=r.useRef(null),d=r.useRef(null),f=r.useState(null),p=f[0],g=f[1],b=!!e,y=m(t),w=u(),C=r.useCallback(function(){if(p){if(p.layout&&p.layout.fit===i.Fit.Layout&&l){var e=w*p.layout.layoutScaleFactor;p.devicePixelRatioUsed=w,p.artboardWidth=(null==l?void 0:l.width)/e,p.artboardHeight=(null==l?void 0:l.height)/e}p.startRendering(),p.resizeToCanvas()}},[p,w]);v({riveLoaded:!!p,canvasElem:l,containerRef:h,options:y,onCanvasHasResized:C,artboardBounds:null==p?void 0:p.bounds});var P=r.useCallback(function(e){null===e&&l&&(l.height=0,l.width=0),c(e)},[]);r.useEffect(function(){if(l&&e){var t,n=null!=p;if(null==p){var r=y.useOffscreenRenderer,a=e.onRiveReady,u=s(e,["onRiveReady"]);t=new i.Rive(o(o({useOffscreenRenderer:r},u),{canvas:l})),null!=d.current&&d.current.cleanup(),d.current=t,t.on(i.EventType.Load,function(){n=!0,a&&a(t),l?g(t):t.cleanup()})}return function(){n||null==t||t.cleanup()}}},[l,b,p]);var E=r.useCallback(function(e){h.current=e},[]),R={observe:r.useCallback(function(e,t){_().registerCallback(e,t)},[]),unobserve:r.useCallback(function(e){_().removeCallback(e)},[])},M=R.observe,I=R.unobserve;r.useEffect(function(){var e,t=!1,n=function(){if(l&&t){var e=l.getBoundingClientRect();e.width>0&&e.height>0&&e.top<(window.innerHeight||document.documentElement.clientHeight)&&e.bottom>0&&e.left<(window.innerWidth||document.documentElement.clientWidth)&&e.right>0&&(null==p||p.startRendering(),t=!1)}};return l&&!1!==y.shouldUseIntersectionObserver&&M(l,function(r){r.isIntersecting?p&&p.startRendering():p&&p.stopRendering(),t=!r.isIntersecting,clearTimeout(e),r.isIntersecting||0!==r.boundingClientRect.width||(e=setTimeout(n,10))}),function(){l&&I(l)}},[M,I,p,l,y.shouldUseIntersectionObserver]),r.useEffect(function(){return function(){p&&(p.cleanup(),g(null))}},[p,l]),r.useEffect(function(){return function(){null!=d.current&&d.current.cleanup()}},[]);var x=null==e?void 0:e.animations;r.useEffect(function(){p&&x&&(p.isPlaying?(p.stop(p.animationNames),p.play(x)):p.isPaused&&(p.stop(p.animationNames),p.pause(x)))},[x,p]);var T=r.useCallback(function(e){return a.default.createElement(A,o({setContainerRef:E,setCanvasRef:P},e))},[P,E]);return{canvas:l,container:h.current,setCanvasRef:P,setContainerRef:E,rive:p,RiveComponent:T}}function P(e,t,n){var i=r.useState(null),a=i[0],s=i[1],u=r.useState(n.defaultValue),l=u[0],c=u[1],h=r.useState(null),d=h[0],f=h[1],p=r.useRef(null),m=r.useRef(e),v=r.useRef(n);r.useEffect(function(){v.current=n},[n]);var g=r.useCallback(function(){var e=p.current,t=m.current,n=v.current;if(!e||!t)return s(null),c(n.defaultValue),f(null),function(){};var r=n.getProperty(e,t);if(r){s(r),c(n.getValue(r)),n.getExtendedData&&f(n.getExtendedData(r));var i=function(){c(n.getValue(r)),n.getExtendedData&&f(n.getExtendedData(r)),n.onPropertyEvent&&n.onPropertyEvent()};return r.on(i),function(){r.off(i)}}return function(){}},[]);r.useEffect(function(){return p.current=t,m.current=e,g()},[t,e,g]);
3var b=r.useCallback(function(e){if(a&&p.current===t)try{return e(a),void(v.current.getExtendedData&&f(v.current.getExtendedData(a)))}catch(e){}if(p.current)try{var n=v.current.getProperty(p.current,m.current);n&&(s(n),e(n),v.current.getExtendedData&&f(v.current.getExtendedData(n)))}catch(e){}},[a,t]),y=r.useMemo(function(){return v.current.buildPropertyOperations(b)},[b]),w=o({value:l},y);return n.getExtendedData&&(w.extendedData=d),w}n.default=function(e){var t=e.src,n=e.artboard,r=e.animations,i=e.stateMachines,u=e.layout,l=e.useOffscreenRenderer,c=e.shouldDisableRiveListeners,h=e.shouldResizeCanvasToContainer,d=e.automaticallyHandleEvents,f=e.children,p=s(e,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","automaticallyHandleEvents","children"]),m=C({src:t,artboard:n,animations:r,layout:u,stateMachines:i,autoplay:!0,shouldDisableRiveListeners:void 0!==c&&c,automaticallyHandleEvents:void 0!==d&&d},{useOffscreenRenderer:void 0===l||l,shouldResizeCanvasToContainer:void 0===h||h}).RiveComponent;return a.default.createElement(m,o({},p),f)},n.useResizeCanvas=v,n.useRive=C,n.useRiveFile=function(e){var t=this,n=r.useState(null),a=n[0],o=n[1],s=r.useState("idle"),u=s[0],l=s[1];return r.useEffect(function(){var n,r,a,s=null;return n=void 0,r=void 0,a=function(){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(t){try{l("loading"),(s=new i.RiveFile(e)).init(),s.on(i.EventType.Load,function(){null==s||s.getInstance(),o(s),l("success")}),s.on(i.EventType.LoadError,function(){l("failed")}),o(s)}catch(e){console.error(e),l("failed")}return[2]})},new(r||(r=Promise))(function(e,i){function o(e){try{u(a.next(e))}catch(e){i(e)}}function s(e){try{u(a.throw(e))}catch(e){i(e)}}function u(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}u((a=a.apply(t,n||[])).next())}),function(){null==s||s.cleanup()}},[e.src,e.buffer]),{riveFile:a,status:u}},n.useStateMachineInput=function(e,t,n,a){var o=r.useState(null),s=o[0],u=o[1];return r.useEffect(function(){function r(){if(e&&t&&n||u(null),e&&t&&n){var r=e.stateMachineInputs(t);if(r){var i=r.find(function(e){return e.name===n});void 0!==a&&i&&(i.value=a),u(i||null)}}else u(null)}r(),e&&e.on(i.EventType.Load,function(){r()})},[e]),s},n.useViewModel=function(e,t){var n=null!=t?t:{},a=n.name,o=n.useDefault,s=r.useState(null),u=s[0],l=s[1];return r.useEffect(function(){function t(){var t;if(e)l(null!=a?(null==(t=e.viewModelByName)?void 0:t.call(e,a))||null:e.defaultViewModel()||null);else l(null)}return t(),e&&e.on(i.EventType.Load,t),function(){e&&e.off(i.EventType.Load,t)}},[e,a,void 0!==o&&o]),u},n.useViewModelInstance=function(e,t){var n=null!=t?t:{},i=n.name,a=n.useDefault,o=void 0!==a&&a,s=n.useNew,u=void 0!==s&&s,l=n.rive,c=r.useState(null),h=c[0],d=c[1];return r.useEffect(function(){var t,n,r;if(e){var a=null;d(a=null!=i?e.instanceByName(i)||null:o?(null==(t=e.defaultInstance)?void 0:t.call(e))||null:u?(null==(n=e.instance)?void 0:n.call(e))||null:(null==(r=e.defaultInstance)?void 0:r.call(e))||null),l&&a&&l.viewModelInstance!==a&&l.bindViewModelInstance(a)}else d(null)},[e,i,o,u,l]),h},n.useViewModelInstanceArtboard=function(e,t){return{setValue:P(e,t,{getProperty:r.useCallback(function(e,t){return e.artboard(t)},[]),getValue:r.useCallback(function(){},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])}).setValue}},n.useViewModelInstanceBoolean=function(e,t){var n=P(e,t,{getProperty:r.useCallback(function(e,t){return e.boolean(t)},[]),getValue:r.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}},n.useViewModelInstanceColor=function(e,t){var n=P(e,t,{getProperty:r.useCallback(function(e,t){return e.color(t)},[]),getValue:r.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})},setRgb:function(t,n,r){e(function(e){e.rgb(t,n,r)})}
3,setRgba:function(t,n,r,i){e(function(e){e.rgba(t,n,r,i)})},setAlpha:function(t){e(function(e){e.alpha(t)})},setOpacity:function(t){e(function(e){e.opacity(t)})}}},[])});return{value:n.value,setValue:n.setValue,setRgb:n.setRgb,setRgba:n.setRgba,setAlpha:n.setAlpha,setOpacity:n.setOpacity}},n.useViewModelInstanceEnum=function(e,t){var n=P(e,t,{getProperty:r.useCallback(function(e,t){return e.enum(t)},[]),getValue:r.useCallback(function(e){return e.value},[]),defaultValue:null,getExtendedData:r.useCallback(function(e){return e.values},[]),buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,values:n.extendedData||[],setValue:n.setValue}},n.useViewModelInstanceImage=function(e,t){return{setValue:P(e,t,{getProperty:r.useCallback(function(e,t){return e.image(t)},[]),getValue:r.useCallback(function(){},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])}).setValue}},n.useViewModelInstanceList=function(e,t){var n,i=r.useState(0)[1],a=P(e,t,{getProperty:r.useCallback(function(e,t){return e.list(t)},[]),getValue:r.useCallback(function(e){return e.length},[]),defaultValue:null,onPropertyEvent:function(){i(function(e){return e+1})},buildPropertyOperations:r.useCallback(function(e){return{addInstance:function(t){e(function(e){return e.addInstance(t)})},addInstanceAt:function(t,n){var r=!1;return e(function(e){r=e.addInstanceAt(t,n)}),r},removeInstance:function(t){e(function(e){return e.removeInstance(t)})},removeInstanceAt:function(t){e(function(e){return e.removeInstanceAt(t)})},getInstanceAt:function(t){var n=null;return e(function(e){n=e.instanceAt(t)}),n},swap:function(t,n){e(function(e){return e.swap(t,n)})}}},[])});return{length:null!=(n=a.value)?n:0,addInstance:a.addInstance,addInstanceAt:a.addInstanceAt,removeInstance:a.removeInstance,removeInstanceAt:a.removeInstanceAt,getInstanceAt:a.getInstanceAt,swap:a.swap}},n.useViewModelInstanceNumber=function(e,t){var n=P(e,t,{getProperty:r.useCallback(function(e,t){return e.number(t)},[]),getValue:r.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}},n.useViewModelInstanceString=function(e,t){var n=P(e,t,{getProperty:r.useCallback(function(e,t){return e.string(t)},[]),getValue:r.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:r.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}},n.useViewModelInstanceTrigger=function(e,t,n){var i=(null!=n?n:{}).onTrigger;return{trigger:P(e,t,{getProperty:r.useCallback(function(e,t){return e.trigger(t)},[]),getValue:r.useCallback(function(){},[]),defaultValue:null,onPropertyEvent:i,buildPropertyOperations:r.useCallback(function(e){return{trigger:function(){e(function(e){e.trigger()})}}},[])}).trigger}}
3,Object.keys(i).forEach(function(e){"default"===e||n.hasOwnProperty(e)||Object.defineProperty(n,e,{enumerable:!0,get:function(){return i[e]}})})},858956,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return c},getImageProps:function(){return l}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(481258),o=e.r(701852),s=e.r(172039),u=a._(e.r(105656));function l(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:u.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let c=s.Image},259325,(e,t,n)=>{t.exports=e.r(858956)},59321,e=>{"use strict";var t=e.i(980506),n=e.i(381449),r=e.i(259325),i=e.i(900778);function a({src:e,artboard:a}){let[o,s]=(0,i.useState)(!1),[u,l]=(0,i.useState)(!1),{rive:c,RiveComponent:h}=(0,n.useRive)({src:e,artboard:a,stateMachines:"scroll",autoplay:!0,assetLoader:(e,t)=>"dotted-line"===e.name?(d(e,"https://s40vlb3kca.ufs.sh/f/acaed9dd-cf38-4cdb-a275-f5d2876d13cd-nbkjqe.webp"),!0):"dotted-line-unselect"===e.name?(d(e,"https://s40vlb3kca.ufs.sh/f/70ee56c2-dd1c-402a-bc7b-f6d6422d04f5-vt0j59.webp"),!0):"theo-selfie"===e.name&&(d(e,"https://s40vlb3kca.ufs.sh/f/f63ca7cf-9adc-4300-ad73-7d2e8c665da9-nqoxyv.webp"),!0),onLoad:()=>{s(!0),c?.resizeDrawingSurfaceToCanvas(),setTimeout(()=>{l(!0)},500)}}),d=(e,t)=>{fetch(t).then(async t=>{let r=await (0,n.decodeImage)(new Uint8Array(await t.arrayBuffer()));e.setRenderImage(r),r.unref()})};return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"relative flex h-[700px] w-[700px]",children:[(0,t.jsx)("div",{className:`h-[700px] w-[700px] ${!o?"hidden":"block"} z-10`,children:(0,t.jsx)(h,{})}),(0,t.jsx)("div",{className:`absolute left-[14px] h-[700px] w-[700x] animate-fade-in overflow-hidden ${o&&"duration-500 animate-out fade-out"} ${u&&"opacity-0"}`,children:(0,t.jsx)(r.default,{alt:"File upload",width:672,height:700,src:"https://s40vlb3kca.ufs.sh/f/b8806777-20e8-4cb2-8769-2a09a3a43e62-1tchgi.png"})})]})})}e.s(["default",()=>a])},233184,e=>{"use strict";var t=e.i(980506),n=e.i(522967),r=e.i(8331);function i(e){return(0,t.jsx)(r.default,{href:e.href,className:"line-clamp-1 flex items-center justify-center gap-2 rounded-md bg-primary px-6 py-3 text-center text-base font-bold text-white shadow-sm hover:bg-primary/80",children:"Get Started for Free"})}function a(){let e=(0,n.useUser)(),r=!!e.user?.id;return(0,t.jsx)(i,{href:r?"/dashboard":"/sign-in"})}e.s(["default",()=>a])},307362,e=>{"use strict";var t=e.i(980506),n=e.i(505132),r=e.i(8331),i=e.i(900778),a=e.i(142664),o=e.i(254850);let s=({children:e})=>(0,t.jsx)(r.default,{href:"/sign-in",className:"line-clamp-1 flex items-center justify-center gap-2 rounded-md bg-primary px-3.5 py-2.5 text-center text-base font-bold text-white shadow-sm hover:bg-primary/80",children:e});function u(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"hidden flex-1 items-center justify-end gap-x-6 md:flex",children:(0,t.jsxs)(i.Suspense,{children:[(0,t.jsx)(n.SignedIn,{children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(r.default,{href:"/dashboard",children:(0,t.jsx)("span",{className:"cursor-pointer text-sm font-semibold leading-6 text-white",children:"Dashboard"})}),(0,t.jsx)(o.UserButton,{})]})}),(0,t.jsx)(n.SignedOut,{children:(0,t.jsx)("div",{className:"flex items-center gap-4",children:(0,t.jsx)(s,{children:"Sign In "})})})]})}),(0,t.jsx)(a.MobileDropdown,{})]})}e.s(["HomeUserButton",()=>u])}]);

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.