PageSourceSearch

https://vite.dev/assets/index.md.ty_2xaHu.lean.js

js vite.dev collected 2026-09-24 07:31:30 UTC 139,411 bytes, 19 lines download raw bytes

1import{$ as e,B as t,Bt as n,G as r,J as i,Lt as a,Nt as o,Rt as s,Vt as c,X as l,Z as u,_t as d,dt as f,et as p,n as m,pt as h,q as g,rt as _,tt as v,ut as y}from"./chunks/framework.AV5jleBi.js";import{n as b,p as x}from"./chunks/theme.Bmx4YkTH.js";import{C as S,S as C,_ as w,b as T,c as E,d as D,f as O,g as k,h as A,m as j,p as ee,u as te,v as ne,x as re,y as ie}from"./chunks/assets.XsPvQS_v.js";import{t as ae}from"./chunks/Footer.3j-OBc13.js";var M=Object.create,N=Object.defineProperty,P=Object.getOwnPropertyDescriptor,F=Object.getOwnPropertyNames,oe=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty,ce=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),le=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=F(t),a=0,o=i.length,s;a<o;a++)s=i[a],!se.call(e,s)&&s!==n&&N(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=P(t,s))||r.enumerable});return e},ue=(e,t,n)=>(n=e==null?{}:M(oe(e)),le(t||!e||!e.__esModule||!se.call(e,`default`)?N(n,`default`,{value:e,enumerable:!0}):n,e)),de={class:`wrapper border-t px-5 sm:px-10 py-14 sm:py-28 flex flex-col justify-center gap-3 text-center items-center`},fe={class:`text-white max-w-2xl text-balance text-center`},I={key:0,class:`max-w-md text-white/70 text-balance sm:text-pretty`},L=_({__name:`HeadingSection`,props:{heading:{},subheading:{}},setup(e){return(t,n)=>(h(),u(`section`,de,[i(`h2`,fe,c(e.heading),1),e.subheading?(h(),u(`p`,I,c(e.subheading),1)):l(``,!0)]))}}),pe={class:`wrapper wrapper--ticks border-t py-14 sm:py-30 px-10`},R={class:`flex flex-col md:flex-row justify-between items-center gap-8 md:gap-20 text-center md:text-left md:pl-15`},z={class:`flex flex-col gap-3`},B={class:`text-white max-w-xl text-balance`},V={class:`max-w-lg text-white/70 text-balance`},me=[`href`],he={class:`py-5 px-5 sm:px-10 border-b border-nickel`},ge={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},H={key:0,class:`backers-grid px-5 sm:px-10 py-6`},_e=[`href`],ve=[`src`,`alt`],ye={class:`backer-tooltip`},U=[`href`],be=[`src`,`alt`],W={class:`spsr-name ml-5`},xe={key:0,class:`grid grid-cols-1 lg:grid-cols-2 border-t border-nickel`},Se={class:`border-b lg:border-b-0 lg:border-r border-nickel`},Ce={class:`py-5 px-5 sm:px-10 border-b border-nickel`},we={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},Te={class:`flex flex-col`},Ee=[`href`],De=[`src`,`alt`],Oe={class:`spsr-name ml-5`},ke={class:`py-5 px-5 sm:px-10 border-b border-nickel`},G={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},Ae={key:0,class:`backers-grid px-5 sm:px-10 py-6`},je=[`href`],Me=[`src`,`alt`],K={class:`backer-tooltip`},Ne=[`href`],q=[`src`,`alt`],Pe={class:`spsr-name ml-5`},J=m(_({__name:`Sponsors`,props:{sponsors:{},heading:{default:`Free & open source`},description:{default:`Vite is MIT Licensed and will always be free and open source. This is made possible by our contributors and these companies:`},sponsorLink:{default:`https://github.com/sponsors/vitejs`},sponsorLinkText:{default:`Become a Sponsor`},sideBySideTiers:{},logoStyle:{}},setup(e){let t=e,n={big:{columns:3,padding:`py-16`,logoSize:`h-13 w-[220px]`},medium:{columns:5,padding:`py-7`,logoSize:`h-8 w-[120px]`},small:{columns:7,padding:`py-5`,logoSize:`h-6 w-[100px]`},avatar:{columns:15,padding:`py-3`,logoSize:`w-10 h-10`,avatarMode:!0}},a={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-4`,5:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-5`,6:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-6`,7:`grid-cols-2 sm:grid-cols-4 lg:grid-cols-7`},o=(e,t)=>Math.min(n[e].columns,t),f=(e,t)=>a[o(e,t)]||`grid-cols-1`,p=(e,t)=>{let n=o(t,e),r=e%n;return r===0?0:n-r},m=(e,t=30)=>Math.max(0,Math.max(e,t)-e),_=g(()=>{if(!t.sponsors||!t.sideBySideTiers)return null;let[e,n]=t.sideBySideTiers,r=t.sponsors.find(t=>t.tier.toLowerCase()===e.toLowerCase()),i=t.sponsors.find(e=>e.tier.toLowerCase()===n.toLowerCase());return!r||!i?null:{left:r,right:i}}),v=g(()=>{if(!t.sponsors)return[];if(!t.sideBySideTiers)return t.sponsors;let e=t.sideBySideTiers.map(e=>e.toLowerCase());return t.sponsors.filter(t=>!e.includes(t.tier.toLowerCase()))});return(t,a)=>(h(),u(r,null,[i(`div`,pe,[i(`div`,R,[i(`div`,z,[i(`h3`,B,c(e.heading),
11),i(`p`,V,c(e.description),1),i(`a`,{href:e.sponsorLink,target:`_blank`,class:`button w-fit mt-8 mx-auto md:mx-0`},c(e.sponsorLinkText),9,me)]),a[0]||=i(`a`,{class:`flex gap-8 md:gap-12 items-start justify-center md:justify-start md:pr-25`,href:`https://voidzero.dev`,target:`_blank`},[i(`img`,{src:S,alt:`Brought to you by VoidZero`,class:`h-44 max-w-full object-contain mt-10 md:mt-0`})],-1)])]),e.sponsors&&e.sponsors.length>0?(h(),u(`div`,{key:0,class:s([`wrapper`,{"spsr-style-oc":e.logoStyle===`opencollective`}])},[(h(!0),u(r,null,d(v.value,(e,t)=>(h(),u(`div`,{key:t,class:`border-t border-nickel`},[i(`div`,he,[i(`span`,ge,c(e.tier),1)]),n[e.size].avatarMode?(h(),u(`div`,H,[(h(!0),u(r,null,d(e.items,(e,t)=>(h(),u(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`backer-avatar group relative`},[i(`img`,{src:e.img,alt:e.name,class:`w-10 h-10 rounded object-cover border border-nickel transition-all group-hover:border-white/50 group-hover:scale-110`},null,8,ve),i(`span`,ye,c(e.name),1)],8,_e))),128)),(h(!0),u(r,null,d(m(e.items.length),e=>(h(),u(`div`,{key:`empty-${e}`,class:`backer-avatar-placeholder`,"aria-hidden":`true`},[...a[1]||=[i(`div`,{class:`w-10 h-10 rounded border border-nickel/30`},null,-1)]]))),128))])):(h(),u(`div`,{key:1,class:s([`grid *:border-r *:border-b *:border-nickel`,f(e.size,e.items.length)])},[(h(!0),u(r,null,d(e.items,(t,r)=>(h(),u(`a`,{key:r,href:t.url,target:`_blank`,rel:`noopener noreferrer`,class:s([`spsr-link flex items-center justify-center px-8 transition-opacity opacity-85 hover:opacity-100`,n[e.size].padding])},[i(`img`,{src:t.img,alt:t.name,class:s([`spsr-logo object-contain`,n[e.size].logoSize])},null,10,be),i(`span`,W,c(t.name),1)],10,U))),128)),(h(!0),u(r,null,d(p(e.items.length,e.size),t=>(h(),u(`div`,{key:`empty-${t}`,class:s([`spsr-link flex items-center justify-center px-8`,n[e.size].padding]),"aria-hidden":`true`},null,2))),128))],2))]))),128)),_.value?(h(),u(`div`,xe,[i(`div`,Se,[i(`div`,Ce,[i(`span`,we,c(_.value.left.tier),1)]),i(`div`,Te,[(h(!0),u(r,null,d(_.value.left.items,(e,t)=>(h(),u(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`spsr-link flex items-center justify-center px-8 py-12 transition-opacity opacity-85 hover:opacity-100 border-b border-nickel last:border-b-0`},[i(`img`,{src:e.img,alt:e.name,class:s([`spsr-logo object-contain`,n[_.value.left.size].logoSize])},null,10,De),i(`span`,Oe,c(e.name),1)],8,Ee))),128))])]),i(`div`,null,[i(`div`,ke,[i(`span`,G,c(_.value.right.tier),1)]),n[_.value.right.size].avatarMode?(h(),u(`div`,Ae,[(h(!0),u(r,null,d(_.value.right.items,(e,t)=>(h(),u(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`backer-avatar group relative`},[i(`img`,{src:e.img,alt:e.name,class:`w-10 h-10 rounded object-cover border border-nickel transition-all group-hover:border-white/50 group-hover:scale-110`},null,8,Me),i(`span`,K,c(e.name),1)],8,je))),128)),(h(!0),u(r,null,d(m(_.value.right.items.length),e=>(h(),u(`div`,{key:`empty-${e}`,class:`backer-avatar-placeholder`,"aria-hidden":`true`},[...a[2]||=[i(`div`,{class:`w-10 h-10 rounded border border-nickel/30`},null,-1)]]))),128))])):(h(),u(`div`,{key:1,class:s([`grid *:border-r *:border-b *:border-nickel`,f(_.value.right.size,_.value.right.items.length)])},[(h(!0),u(r,null,d(_.value.right.items,(e,t)=>(h(),u(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:s([`spsr-link flex items-center justify-center px-8 transition-opacity opacity-85 hover:opacity-100`,n[_.value.right.size].padding])},[i(`img`,{src:e.img,alt:e.name,class:s([`spsr-logo object-contain`,n[_.value.right.size].logoSize])},null,10,q),i(`span`,Pe,c(e.name),1)],10,Ne))),128))],2))])])):l(``,!0)],2)):l(``,!0)],64))}}),[[`__scopeId`,`data-v-38fb555f`]]),Fe={key:0,class:`scroll-container`},Ie=[`src`,`alt`],Le=[`src`,`alt`],Re={key:1,class:`flex items-center justify-evenly`},ze=[`src`,`alt`],Be={key:0,class:`divider`},Y=120,Ve=25,He=80,Ue=m(_({__name:`LogoGrid`,props:{logos:{}},setup(e){t(e=>({d22c35d6:He,b02a825a:Y,v41e74826:e.logos.length}));let a=e,s=o(null),c=o(!1),p=g(()=>{let e=a.logos.length;return e*Y+(e-1)*He}),m=g(()=>a.logos.length*3),_=()=>{if(!s.value)return;let e=s.value.offsetWidth;c.value=p.value>e},v=null;return y(()=>{_(),s.value&&(v=new ResizeObserver(()=>{_()}),v.observe(s.value))}),f(()=>{v&&v.disconnect()}),(t,a)=>(h(),u(`div`,{ref_key:`containerRef`,ref:s,class:`overflow-hidden py-6`},[c.value?(h(),u(`div`,Fe,[i(`div`,{class:`scroll-content`,style:n({gap:`${He}px`,animationDuration:`${m.value}s`})},[i(`div`,{class:`flex items-center`,style:n({gap:`${He}px`})},[(h(!0),u(r,null,d(e.logos,e=>(h(),u(`div`,{key:e.alt,class:`logo-container flex-shrink-0 relative flex items-center justify-center has-div
1ider`,style:n({width:`${Y}px`,height:`${Ve}px`})},[i(`img`,{loading:`lazy`,src:e.src,alt:e.alt,class:`max-w-full max-h-full object-contain grayscale`},null,8,Ie)],4))),128))],4),i(`div`,{class:`flex items-center`,style:n({gap:`${He}px`})},[(h(!0),u(r,null,d(e.logos,e=>(h(),u(`div`,{key:`${e.alt}-duplicate`,class:`logo-container flex-shrink-0 relative flex items-center justify-center has-divider`,style:n({width:`${Y}px`,height:`${Ve}px`})},[i(`img`,{loading:`lazy`,src:e.src,alt:e.alt,class:`max-w-full max-h-full object-contain grayscale`},null,8,Le)],4))),128))],4)],4)])):(h(),u(`div`,Re,[(h(!0),u(r,null,d(e.logos,(t,a)=>(h(),u(r,{key:t.alt},[i(`div`,{class:`logo-container-static flex items-center justify-center`,style:n({width:`${Y}px`,height:`${Ve}px`})},[i(`img`,{loading:`lazy`,src:t.src,alt:t.alt,class:`max-w-full max-h-full object-contain grayscale`},null,8,ze)],4),a<e.logos.length-1?(h(),u(`div`,Be)):l(``,!0)],64))),128))]))],512))}}),[[`__scopeId`,`data-v-0e8241cb`]]),We={class:`wrapper wrapper--ticks border-t`},Ge=m(_({__name:`TrustedBy`,props:{logos:{}},setup(e){let t=e.logos.map(e=>({src:`/trusted-by/${e}.svg`,alt:e}));return(e,n)=>(h(),u(r,null,[n[0]||=i(`section`,{class:`wrapper wrapper--ticks border-t px-10 py-6 md:py-8 flex flex-col justify-center gap-5`},[i(`h6`,{class:`text-center md:text-start text-white`},`Trusted by the world's best software teams`)],-1),i(`section`,We,[v(Ue,{logos:a(t)},null,8,[`logos`])])],64))}}),[[`__scopeId`,`data-v-d2df713e`]]),Ke={},qe={class:`wrapper wrapper--ticks border-t h-16 sm:h-30`};function Je(e,t){return h(),u(`section`,qe)}var Ye=m(Ke,[[`render`,Je]]),Xe={class:`wrapper wrapper--ticks border-t pt-14 sm:pt-30 px-5 sm:px-10`},X={class:`flex flex-col sm:flex-row justify-between items-center gap-8 sm:gap-20 text-center sm:text-left`},Ze={class:`flex gap-8 sm:gap-12 items-start justify-center sm:justify-start sm:pr-20`},Z={class:`flex flex-col gap-3`},Qe={class:`text-grey flex items-center gap-2`},$e={class:`pt-14 sm:pt-30 h-[50rem] overflow-clip [mask-image:linear-gradient(to_bottom,black_70%,transparent_100%)]`},et={class:`columns-1 sm:columns-2 lg:columns-3 gap-5`},tt={class:`testimonial-card relative overflow-clip isolate rounded-lg p-6 sm:px-8 sm:py-10 flex flex-col gap-6 before:content-[''] before:absolute before:inset-0 before:opacity-0 before:z-0 before:pointer-events-none before:transition-opacity before:duration-100 before:ease-in-out after:content-[''] after:absolute after:inset-px after:z-[1] after:rounded-lg after:bg-slate after:border after:border-nickel after:transition-[border-color,background] after:duration-100 after:ease-in-out hover:before:opacity-100 hover:after:border-transparent`},nt={class:`relative z-[2] flex flex-col gap-4`},rt={class:`relative z-[2] flex items-center gap-5 mt-auto`},it=[`src`,`alt`],at={class:`flex flex-col`},ot={class:`text-grey text-sm font-mono`},st={class:`text-biege text-sm font-mono`},ct=m(_({__name:`Community`,setup(e){let t=[{name:`Ryan Carniato`,handle:`@RyanCarniato`,avatar:`https://pbs.twimg.com/profile_images/1810837163447308292/8Piov0f6_400x400.jpg`,comment:[`I'm loving what Vite enables. We've found building SolidStart that it is less a metaframework but a system of symbiotic Vite plugins. While built with SolidJS in mind, they should scale from our simplest template to opinionated starter. We're building an ecosystem on Vite.`]},{name:`Rich Harris`,handle:`@Rich_Harris`,avatar:`https://pbs.twimg.com/profile_images/557940120184041473/bFyXy8Pu_400x400.jpeg`,comment:[`Vite is basically the united nations of JavaScript at this point. I'll be there as a representative of Sveltelandia`]},{name:`David East`,handle:`@_davideast`,avatar:`https://pbs.twimg.com/profile_images/1691627325794725888/voQFcYjY_400x400.jpg`,comment:[`Each and every time I use Vite, I feel a true sense of pure and unbridled joy.`]},{name:`Mark Dalgleish`,handle:`@markdalgleish`,avatar:`https://pbs.twimg.com/profile_images/754886061872979968/BzaOWhs1_400x400.jpg`,comment:[`It's also a great platform to build a framework on since it provides a pluggable dev environment.`,`Community is amazing too.`]},{name:`Jason Miller`,handle:`@_developit`,avatar:`https://pbs.twimg.com/profile_images/1374778373239681025/Sc9ehtAr_400x400.jpg`,comment:[`Every time I suspect I've hit the bounds of what Vite can do, I end up being wrong.`]},{name:`David Cramer`,handle:`@zeeg`,avatar:`https://pbs.twimg.com/profile_images/1911613315765133312/HVkULegC_400x400.jpg`,comment:[`Vite has been a game changer for the industry.`]},{name:`Dion Almaer`,handle:`@dalmaer`,avatar:`https://pbs.twimg.com/profile_images/3380865881/f73b3687ff39b795db05fcaf35972270_400x400.jpeg`,comment:[`I am so excited to see so many great frameworks teaming up on top of vite. So many will benef
1it. ❤️ to the vite team.`]},{name:`Christoph Nakazawa`,handle:`@cpojer`,avatar:`https://pbs.twimg.com/profile_images/1910252462126313472/gXgT-jxL_400x400.jpg`,comment:[`Vite is gonna eat the (JavaScript) world.`]},{name:`Nikolaj`,handle:`@lopugit`,avatar:`https://avatars.githubusercontent.com/u/13629190?v=4`,comment:[`Wow, wow, wow, wow, wow, wow, Vite is..... Vite is.... Wow 🤤🤯🙏`]}];return(e,n)=>(h(),u(`div`,Xe,[i(`div`,X,[n[3]||=i(`div`,{class:`flex flex-col gap-3`},[i(`h3`,{class:`text-white max-w-xl text-balance`},`Loved by the community`),i(`p`,{class:`max-w-md text-white/70 text-balance`},` Don't take our word for it - listen to what Vite community members have to say. `)],-1),i(`div`,Ze,[i(`div`,Z,[n[1]||=i(`h2`,{class:`text-white`},`80k+`,-1),i(`p`,Qe,[v(a(x),{icon:`simple-icons:github`,width:`20px`,height:`20px`}),n[0]||=p(` Github Stars `,-1)])]),n[2]||=i(`div`,{class:`flex flex-col gap-3`},[i(`h2`,{class:`text-white`},`80m+`),i(`p`,{class:`text-grey`},`Weekly NPM downloads`)],-1)])]),i(`div`,$e,[i(`div`,et,[(h(),u(r,null,d(t,(e,t)=>i(`div`,{key:t,class:`break-inside-avoid mb-5`},[i(`div`,tt,[i(`div`,nt,[(h(!0),u(r,null,d(e.comment,(e,t)=>(h(),u(`p`,{key:t,class:`text-white/70 leading-relaxed text-sm sm:text-base`},c(e),1))),128))]),i(`div`,rt,[i(`img`,{src:e.avatar,alt:e.name,class:`w-12 h-12 rounded-sm object-cover flex-shrink-0`,loading:`lazy`},null,8,it),i(`div`,at,[i(`span`,ot,c(e.name),1),i(`span`,st,c(e.handle),1)])])])])),64))])])]))}}),[[`__scopeId`,`data-v-b8c764af`]]),lt=ue(ce(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.rive=r():n.rive=r()})(e,()=>(()=>{var e=[,((e,t,n)=>{n.r(t),n.d(t,{default:()=>r});let r=(()=>{var e=typeof document<`u`?document.currentScript?.src:void 0;return(function(t={}){var n,r=t,i,a,o=new Promise((e,t)=>{i=e,a=t}),s=typeof window==`object`,c=typeof importScripts==`function`;function l(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.va(),i&&i.Pa()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||=requestAnimationFrame(e.bind(this));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&r.size==0&&(cancelAnimationFrame(t),t=0)},this.Na=function(e){a&&=(document.body.remove(a),null),e||(a=document.createElement(`div`),a.style.backgroundColor=`black`,a.style.position=`fixed`,a.style.right=0,a.style.top=0,a.style.color=`white`,a.style.padding=`4px`,a.innerHTML=`RIVE FPS`,e=function(e){a.innerHTML=`RIVE FPS `+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Pa=function(){var r=performance.now();n?(++t,r-=n,1e3<r&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Ka=function(){a&&=(document.body.remove(a),null),i=null},this.va=function(){}}function u(e){console.assert(!0);let t=new Map,n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout(function(){t.delete(r),t.length==0?n=-1/0:r==n&&(n=Math.max(...t.keys()),console.assert(n<r))},1e3)),n=Math.max(r,n),n<<e}}let d=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){d&&d();let e=r.decodeAudio;r.decodeAudio=function(t,n){t=e(t),n(t)};let t=r.decodeFont;r.decodeFont=function(e,n){e=t(e),n(e)};let n=r.FileAssetLoader;r.ptrToAsset=e=>{let t=r.ptrToFileAsset(e);return t.isImage?r.ptrToImageAsset(e):t.isFont?r.ptrToFontAsset(e):t.isAudio?r.ptrToAudioAsset(e):t},r.CustomFileAssetLoader=n.extend(`CustomFileAssetLoader`,{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Ea=e},loadContents:function(e,t){return e=r.ptrToAsset(e),this.Ea(e,t)}}),r.CDNFileAssetLoader=n.extend(`CDNFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=r.ptrToAsset(e);return e=t.cdnUuid,e!==``&&((function(e,t){var n=new XMLHttpRequest;n.responseType=`arraybuffer`,n.onreadystatechange=function(){n.readyState==4&&n.status==200&&t(n)},n.open(`GET`,e,!0),n.send(null)})(t.cdnBaseUrl+`/`+e,e=>{t.decode(new Uint8Array(e.response))}),!0)}}),r.FallbackFileAssetLoader=n.extend(`FallbackFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this),this.ua=[]},addLoader:function(e){this.ua.push(e)},loadContents:function(e,t){for(let n of this.ua)if(n.loadContents(e,t))return!0;return!1}});let i=r.computeAlignment;r.computeAlignment=function(e,t,n,r,a=1){return i.call(this,e,t,n,r,a)}};let f=`createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText`.split(` `),p=new function(){function e(){if(!t){var e=document.createElement(`canvas`),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext(`webgl`,o),n=1,!s)return console.log(`No WebGL support. Image mesh will not be drawn.`),!1}else if(s=e.getContext(`webgl2`,o))n=2;else if(s=e.getContext(`webgl`,o))n=1;else return console.log(`No WebGL support. Image mesh will not be drawn.`),!1;s=new Proxy(s,{get(e,t){if(e.isContextLost()){if(c||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to invoke `,t),!0),typeof e[t]==`function`)return function(){}}else return typeof e[t]==`function`?function(...n){return e[t].apply(e,n)}:e[t]},set(e,t,n){if(e.isContextLost())c||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to set property `+t),!0);else return e[t]=n,!0}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE));function l(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),n=s.getShaderInfoLog(t),0<(n||``).length)throw n;s.attachShader(e,t)}if(e=s.createProgram(),l(e,s.VERTEX_SHADER,`attribute vec2 vertex;
2                attribute vec2 uv;
3                uniform vec4 mat;
4                uniform vec2 translate;
5                varying vec2 st;
6                void main() {
7                    st = uv;
8                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);
9                }`),l(e,s.FRAGMENT_SHADER,`precision highp float;
10                uniform sampler2D image;
11                varying vec2 st;
12                void main() {
13                    gl_FragColor = texture2D(image, st);
14                }`),s.bindAttribLocation(e,0,`vertex`),s.bindAttribLocation(e,1,`uv`),s.linkProgram(e),o=s.getProgramInfoLog(e),0<(o||``).trim().length)throw o;i=s.getUniformLocation(e,`mat`),a=s.getUniformLocation(e,`translate`),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,`image`),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,o=0,s=0,c=!1;e(),this.Xa=function(){return e(),r},this.Ja=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Ia=function(r){if(!e())return null;let i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),n==2?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),i):null};let l=new u(8),d=new u(8),f=new u(10),p=new u(10);this.Ma=function(n,r,c,u,m){if(e()){var h=l.push(n),g=d.push(r);if(t.canvas){(t.canvas.width!=h||t.canvas.height!=g)&&(t.canvas.width=h,t.canvas.height=g),t.viewport(0,g-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),c.sort((e,t)=>
14t.ya-e.ya),h=f.push(u),o!=h&&(t.bufferData(t.ARRAY_BUFFER,8*h,t.DYNAMIC_DRAW),o=h),h=0;for(var _ of c)t.bufferSubData(t.ARRAY_BUFFER,h,_.ia),h+=4*_.ia.length;console.assert(h==4*u);for(var v of c)t.bufferSubData(t.ARRAY_BUFFER,h,v.Ba),h+=4*v.Ba.length;console.assert(h==8*u),h=p.push(m),s!=h&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*h,t.DYNAMIC_DRAW),s=h),_=0;for(var y of c)t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,_,y.indices),_+=2*y.indices.length;console.assert(_==2*m),y=0,v=!0,h=_=0;for(let e of c){e.image.da!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.ca||null),y=e.image.da),e.$a?(t.scissor(e.na,g-e.oa-e.ta,e.lb,e.ta),v=!0):v&&=(t.scissor(0,g-r,n,r),!1),c=2/n;let o=-2/r;t.uniform4f(i,e.N[0]*c*e.X,e.N[1]*o*e.Y,e.N[2]*c*e.X,e.N[3]*o*e.Y),t.uniform2f(a,e.N[4]*c*e.X+c*(e.na-e.Ya*e.X)-1,e.N[5]*o*e.Y+o*(e.oa-e.Za*e.Y)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,h),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,h+4*u),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,_),h+=4*e.ia.length,_+=2*e.indices.length}console.assert(h==4*u),console.assert(_==2*m)}}},this.canvas=function(){return e()&&t.canvas}},m=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){function e(e){switch(e){case d.srcOver:return`source-over`;case d.screen:return`screen`;case d.overlay:return`overlay`;case d.darken:return`darken`;case d.lighten:return`lighten`;case d.colorDodge:return`color-dodge`;case d.colorBurn:return`color-burn`;case d.hardLight:return`hard-light`;case d.softLight:return`soft-light`;case d.difference:return`difference`;case d.exclusion:return`exclusion`;case d.multiply:return`multiply`;case d.hue:return`hue`;case d.saturation:return`saturation`;case d.color:return`color`;case d.luminosity:return`luminosity`}}function t(e){return`rgba(`+((16711680&e)>>>16)+`,`+((65280&e)>>>8)+`,`+((255&e)>>>0)+`,`+((4278190080&e)>>>24)/255+`)`}function n(){0<w.length&&(p.Ma(C.drawWidth(),C.drawHeight(),w,T,E),w=[],E=T=0,C.reset(512,512));for(let e of S){for(let t of e.v)t();e.v=[]}S.clear()}m&&m();var i=r.RenderPaintStyle;let a=r.RenderPath,o=r.RenderPaint,s=r.Renderer,c=r.StrokeCap,u=r.StrokeJoin,d=r.BlendMode,h=i.fill,g=i.stroke,_=r.FillRule.evenOdd,v=1;var y=r.RenderImage.extend(`CanvasRenderImage`,{__construct:function({R:e,W:t}={}){this.__parent.__construct.call(this),this.da=v,v=v+1&2147483647||1,this.R=e,this.W=t},__destruct:function(){this.ca&&(p.Ja(this.ca),URL.revokeObjectURL(this.la)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.W&&t.W(t);var n=new Image;t.la=URL.createObjectURL(new Blob([e],{type:`image/png`})),n.onload=function(){t.Da=n,t.ca=p.Ia(n),t.size(n.width,n.height),t.R&&t.R(t)},n.src=t.la}}),b=a.extend(`CanvasRenderPath`,{__construct:function(){this.__parent.__construct.call(this),this.H=new Path2D},rewind:function(){this.H=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.H,c=s.addPath;e=e.H;let l=new DOMMatrix;l.a=t,l.b=n,l.c=r,l.d=i,l.e=a,l.f=o,c.call(s,e,l)},fillRule:function(e){this.ka=e},moveTo:function(e,t){this.H.moveTo(e,t)},lineTo:function(e,t){this.H.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.H.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.H.closePath()}}),x=o.extend(`CanvasRenderPaint`,{color:function(e){this.ma=t(e)},thickness:function(e){this.Ga=e},join:function(e){switch(e){case u.miter:this.ba=`miter`;break;case u.round:this.ba=`round`;break;case u.bevel:this.ba=`bevel`}},cap:function(e){switch(e){case c.butt:this.aa=`butt`;break;case c.round:this.aa=`round`;break;case c.square:this.aa=`square`}},style:function(e){this.Fa=e},blendMode:function(t){this.Ca=e(t)},clearGradient:function(){this.P=null},linearGradient:function(e,t,n,r){this.P={za:e,Aa:t,qa:n,ra:r,ga:[]}},radialGradient:function(e,t,n,r){this.P={za:e,Aa:t,qa:n,ra:r,ga:[],Wa:!0}},addStop:function(e,t){this.P.ga.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,r,i){let a=this.Fa;var o=this.ma,s=this.P;let c=e.globalCompositeOperation,l=e.globalAlpha;if(e.globalCompositeOperation=this.Ca,e.globalAlpha=i,s!=null){o=s.za;let n=s.Aa,r=s.qa;var u=s.ra;i=s.ga,s.Wa?(s=r-o,u-=n,o=e.createRadialGradient(o,n,0,o,n,Math.sqrt(s*s+u*u))):o=e.createLinearGradient(o,n,r,u);for(let e=0,n=i.length;e<n;e++)s=i[e],o.addColorStop(s.stop,t(s.color));this.ma=o,this.P=null}switch(a){case g:e.strokeStyle=o,e.lineWidth=this.Ga,e.lineCap=this.aa,e.lineJoin=this.ba,e.stroke(n);break;case h:e.fillStyle=o,e.fill(n,r)}e.globalCompositeOperation=c,e.globalAlpha=l}});let S=new Set,C=null,w=[],T=0,E=0;var D=r.CanvasRenderer=s.extend(`Renderer`,{__construct:function(e){this.__parent.__construct.call(this),this.G=[1,0,0,1,0,0],this.u=[1],this.m=e.getContext(`2d`),this.ja=e,this.v=[]},save:function(){this.G.push(...this.G.slice(this.G.length-6)),this.u.push(this.u[this.u.length-1]),this.v.push(this.m.save.bind(this.m))},restore:function(){let e=this.G.length-6;if(6>
14e)throw`restore() called without matching save().`;this.G.splice(e),this.u.pop(),this.v.push(this.m.restore.bind(this.m))},transform:function(e,t,n,r,i,a){let o=this.G,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.v.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)},modulateOpacity:function(e){this.u[this.u.length-1]*=e},_drawPath:function(e,t){this.v.push(t.draw.bind(t,this.m,e.H,e.ka===_?`evenodd`:`nonzero`,Math.max(0,this.u[this.u.length-1])))},_drawRiveImage:function(t,n,r,i){var a=t.Da;if(a){var o=this.m,s=e(r),c=Math.max(0,i*this.u[this.u.length-1]);this.v.push(function(){o.globalCompositeOperation=s,o.globalAlpha=c,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){let t=this.G,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,i,a,o,s,c,l,u,d,f,m){i=this.m.canvas.width;var h=this.m.canvas.height;let g=f-u,_=m-d;u=Math.max(u,0),d=Math.max(d,0),f=Math.min(f,i),m=Math.min(m,h);let v=f-u,y=m-d;if(console.assert(v<=Math.min(g,i)),console.assert(y<=Math.min(_,h)),!(0>=v||0>=y)){f=v<g||y<_,i=m=1;var b=Math.ceil(v*m),x=Math.ceil(y*i);h=p.Xa(),b>h&&(m*=h/b,b=h),x>h&&(i*=h/x,x=h),C||(C=new r.DynamicRectanizer(h),C.reset(512,512)),h=C.addRect(b,x),0>h&&(n(),S.add(this),h=C.addRect(b,x),console.assert(0<=h));var D=h&65535,O=h>>16;w.push({N:this.G.slice(this.G.length-6),image:t,na:D,oa:O,Ya:u,Za:d,lb:b,ta:x,X:m,Y:i,ia:new Float32Array(s),Ba:new Float32Array(c),indices:new Uint16Array(l),$a:f,ya:t.da<<1|!!f}),T+=s.length,E+=l.length;var k=this.m,A=e(a),j=Math.max(0,o*this.u[this.u.length-1]);this.v.push(function(){k.save(),k.resetTransform(),k.globalCompositeOperation=A,k.globalAlpha=j;let e=p.canvas();e&&k.drawImage(e,D,O,b,x,u,d,v,y),k.restore()})}},_clipPath:function(e){this.v.push(this.m.clip.bind(this.m,e.H,e.ka===_?`evenodd`:`nonzero`))},clear:function(){S.add(this),this.v.push(this.m.clearRect.bind(this.m,0,0,this.ja.width,this.ja.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});r.makeRenderer=function(e){let t=new D(e),n=t.m;return new Proxy(t,{get(e,r){if(typeof e[r]==`function`)return function(...t){return e[r].apply(e,t)};if(typeof n[r]==`function`){if(-1<f.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.v.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.v.push(()=>{n[r]=i}),!0}})},r.decodeImage=function(e,t){new y({R:t}).decode(e)},r.renderFactory={makeRenderPaint:function(){return new x},makeRenderPath:function(){return new b},makeRenderImage:function(){let e=k;return new y({W:()=>{e.total++},R:()=>{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let O=r.load,k=null;r.load=function(e,t,n=!0){let i=new r.FallbackFileAssetLoader;return t!==void 0&&i.addLoader(t),n&&(t=new r.CDNFileAssetLoader,i.addLoader(t)),new Promise(function(t){let n=null;k={total:0,loaded:0,ready:function(){t(n)}},n=O(e,i),k.total==0&&t(n)})};let A=r.RendererWrapper.prototype.align;r.RendererWrapper.prototype.align=function(e,t,n,r,i=1){A.call(this,e,t,n,r,i)},i=new l,r.requestAnimationFrame=i.requestAnimationFrame.bind(i),r.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),r.enableFPSCounter=i.Na.bind(i),r.disableFPSCounter=i.Ka,i.va=n,r.resolveAnimationFrame=n,r.cleanup=function(){C&&C.delete()}};var h=Object.assign({},r),g=`./this.program`,_=``,v,y;(s||c)&&(c?_=self.location.href:typeof document<`u`&&document.currentScript&&(_=document.currentScript.src),e&&(_=e),_=_.startsWith(`blob:`)?``:_.substr(0,_.replace(/[?#].*/,``).lastIndexOf(`/`)+1),c&&(y=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),v=(e,t,n)=>{if(se(e)){var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}else fetch(e,{credentials:`same-origin`}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+` : `+e.url))).then(t,n)});var b=r.print||console.log.bind(console),x=r.printErr||console.error.bind(console);Object.assign(r,h),h=null,r.thisProgram&&(g=r.thisProgram);var S;r.wasmBinary&&(S=r.wasmBinary);var C,w=!1,T,E,D,O,k,A,j,ee;function te(){var e=C.buffer;r.HEAP8=T=new Int8Array(e),r.HEAP16=D=new Int16Array(e),r.HEAPU8=E=new Uint8Array(e),r.HEAPU16=O=ne
14w Uint16Array(e),r.HEAP32=k=new Int32Array(e),r.HEAPU32=A=new Uint32Array(e),r.HEAPF32=j=new Float32Array(e),r.HEAPF64=ee=new Float64Array(e)}var ne=[],re=[],ie=[];function ae(){var e=r.preRun.shift();ne.unshift(e)}var M=0,N=null,P=null;function F(e){throw r.onAbort?.(e),e=`Aborted(`+e+`)`,x(e),w=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),a(e),e}var oe=e=>e.startsWith(`data:application/octet-stream;base64,`),se=e=>e.startsWith(`file://`),ce;function le(e){if(e==ce&&S)return new Uint8Array(S);if(y)return y(e);throw`both async and sync fetching of the wasm failed`}function ue(e){return S?Promise.resolve().then(()=>le(e)):new Promise((t,n)=>{v(e,e=>t(new Uint8Array(e)),()=>{try{t(le(e))}catch(e){n(e)}})})}function de(e,t,n){return ue(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{x(`failed to asynchronously prepare wasm: ${e}`),F(e)})}function fe(e,t){var n=ce;return S||typeof WebAssembly.instantiateStreaming!=`function`||oe(n)||se(n)||typeof fetch!=`function`?de(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return x(`wasm streaming compile failed: ${r}`),x(`falling back to ArrayBuffer instantiation`),de(n,e,t)}))}var I=e=>{for(;0<e.length;)e.shift()(r)},L=(e,t)=>Object.defineProperty(t,"name",{value:e}),pe=[],R=[],z,B=e=>{if(!e)throw new z(`Cannot use deleted val. handle = `+e);return R[e]},V=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=pe.pop()||R.length;return R[t]=e,R[t+1]=1,t}},me=e=>{var t=Error,n=L(e,function(t){this.name=e,this.message=t,t=Error(t).stack,t!==void 0&&(this.stack=this.toString()+`
15`+t.replace(/^Error(:[^\n]*)?\n/,``))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},he,ge,H=e=>{for(var t=``;E[e];)t+=ge[E[e++]];return t},_e=[],ve=()=>{for(;_e.length;){var e=_e.pop();e.g.M=!1,e.delete()}},ye,U={},be=(e,t)=>{if(t===void 0)throw new z(`ptr should not be undefined`);for(;e.o;)t=e.S(t),e=e.o;return t},W={},xe=e=>{e=Bt(e);var t=H(e);return $(e),t},Se=(e,t)=>{var n=W[e];if(n===void 0)throw e=`${t} has unknown type ${xe(e)}`,new z(e);return n},Ce=()=>{},we=!1,Te=(e,t,n)=>t===n?e:n.o===void 0?null:(e=Te(e,t,n.o),e===null?null:n.La(e)),Ee={},De=(e,t)=>(t=be(e,t),U[t]),Oe,ke=(e,t)=>{if(!t.j||!t.i)throw new Oe(`makeClassHandle requires ptr and ptrType`);if(!!t.A!=!!t.s)throw new Oe(`Both smartPtrType and smartPtr must be specified`);return t.count={value:1},G(Object.create(e,{g:{value:t,writable:!0}}))},G=e=>typeof FinalizationRegistry>`u`?(G=e=>e,e):(we=new FinalizationRegistry(e=>{e=e.g,--e.count.value,e.count.value===0&&(e.s?e.A.D(e.s):e.j.h.D(e.i))}),G=e=>{var t=e.g;return t.s&&we.register(e,{g:t},e),e},Ce=e=>{we.unregister(e)},G(e)),Ae={},je=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Me(e){return this.fromWireType(A[e>>2])}var K={},Ne={}
15,q=(e,t,n)=>{function r(t){if(t=n(t),t.length!==e.length)throw new Oe(`Mismatched type converter count`);for(var r=0;r<e.length;++r)J(e[r],t[r])}e.forEach(function(e){Ne[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{W.hasOwnProperty(e)?i[t]=W[e]:(a.push(e),K.hasOwnProperty(e)||(K[e]=[]),K[e].push(()=>{i[t]=W[e],++o,o===a.length&&r(i)}))}),a.length===0&&r(i)};function Pe(e,t,n={}){var r=t.name;if(!e)throw new z(`type "${r}" must have a positive integer typeid pointer`);if(W.hasOwnProperty(e)){if(n.Va)return;throw new z(`Cannot register type '${r}' twice`)}W[e]=t,delete Ne[e],K.hasOwnProperty(e)&&(t=K[e],delete K[e],t.forEach(e=>e()))}function J(e,t,n={}){if(!(`argPackAdvance`in t))throw TypeError(`registerType registeredInstance requires argPackAdvance`);return Pe(e,t,n)}var Fe=e=>{throw new z(e.g.j.h.name+` instance already deleted`)};function Ie(){}var Le=(e,t,n)=>{if(e[t].l===void 0){var r=e[t];e[t]=function(...r){if(!e[t].l.hasOwnProperty(r.length))throw new z(`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.L]=r}},Re=(e,t,n)=>{if(r.hasOwnProperty(e)){if(n===void 0||r[e].l!==void 0&&r[e].l[n]!==void 0)throw new z(`Cannot register public name '${e}' twice`);if(Le(r,e,e),r.hasOwnProperty(n))throw new z(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].l[n]=t}else r[e]=t,n!==void 0&&(r[e].nb=n)},ze=e=>{if(e===void 0)return`_unknown`;e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e};function Be(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.C=n,this.D=r,this.o=i,this.Qa=a,this.S=o,this.La=s,this.wa=[]}var Y=(e,t,n)=>{for(;t!==n;){if(!t.S)throw new z(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.S(e),t=t.o}return e};function Ve(e,t){if(t===null){if(this.ea)throw new z(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new z(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);return Y(t.g.i,t.g.j.h,this.h)}function He(e,t){if(t===null){if(this.ea)throw new z(`null is not a valid ${this.name}`);if(this.V){var n=this.fa();return e!==null&&e.push(this.D,n),n}return 0}if(!t||!t.g)throw new z(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.U&&t.g.j.U)throw new z(`Cannot convert argument of type ${t.g.A?t.g.A.name:t.g.j.name} to parameter type ${this.name}`);if(n=Y(t.g.i,t.g.j.h,this.h),this.V){if(t.g.s===void 0)throw new z(`Passing raw pointer to smart pointer is illegal`);switch(this.gb){case 0:if(t.g.A===this)n=t.g.s;else throw new z(`Cannot convert argument of type ${t.g.A?t.g.A.name:t.g.j.name} to parameter type ${this.name}`);break;case 1:n=t.g.s;break;case 2:if(t.g.A===this)n=t.g.s;else{var r=t.clone();n=this.bb(n,V(()=>r.delete())),e!==null&&e.push(this.D,n)}break;default:throw new z(`Unsupporting sharing policy`)}}return n}function Ue(e,t){if(t===null){if(this.ea)throw new z(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new z(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.j.U)throw new z(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`);return Y(t.g.i,t.g.j.h,this.h)}function We(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.h=t,this.ea=n,this.U=r,this.V=i,this.ab=a,this.gb=o,this.xa=s,this.fa=c,this.bb=l,this.D=u,i||t.o!==void 0?this.toWireType=He:(this.toWireType=r?Ve:Ue,this.B=null)}var Ge=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new Oe(`Replacing nonexistent public symbol`);r[e].l!==void 0&&n!==void 0?r[e].l[n]=t:(r[e]=t,r[e].L=n)},Ke=[],qe,Je=e=>{var t=Ke[e];return t||(e>=Ke.length&&(Ke.length=e+1),Ke[e]=t=qe.get(e)),t},Ye=(e,t,n=[])=>(e.includes(`j`)?(e=e.replace(/p/g,`i`),t=(0,r[`dynCall_`+e])(t,...n)):t=Je(t)(...n),t),Xe=(e,t)=>(...n)=>Ye(e,t,n),X=(e,t)=>{e=H(e);var n=e.includes(`j`)?Xe(e,t):Je(t);if(typeof n!=`function`)throw new z(`unknown function pointer with signature ${e}: ${t}`);return n},Ze,Z=(e,t)=>{function n(e){i[e]||W[e]||(Ne[e]?Ne[e].forEach(n):(r.push(e),i[e]=!0))}var r=[],i={};throw t.forEach(n),new Ze(`${e}: `+r.map(xe).join([`, `]))};function Qe(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].B===void 0)return!0;return!1}function $e(e,t,n,r,i){var a=t.length;if(2>a)throw new z(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var o=t[1]!==null&&n!==null,s=Qe(t),c=t[0].name!==`void`,l=a-2,u=Array(l),d=[],f=[];return L(e,function(...n){if(n.length!==l)throw new z(`function ${e} called with ${n.length} arguments, expected ${l}`);if(f.length=0,d.length=o?2:1,d[0]=i,o){var a=t[1].toWireType(f,this);d[1]=a}for(var p=0;p<l;++p)u[p]=t[p+2].toWireType(f,n[p]),d.push(u[p]);if(n=r(...d),s)je(f);else for(p=o?1:2;p<t.length;p++){var m=p===1?a:u[p-2];t[p].B!==null&&t[p].B(m)}return a=c?t[0].fromWireType(n):void 0,a})}var et=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(A[t+4*r>>2]);return n},tt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.substr(0,t)}
15,nt=(e,t,n)=>{if(!(e instanceof Object))throw new z(`${n} with invalid "this": ${e}`);if(!(e instanceof t.h.constructor))throw new z(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.i)throw new z(`cannot call emscripten binding method ${n} on deleted object`);return Y(e.g.i,e.g.j.h,t.h)},rt=e=>{9<e&&--R[e+1]===0&&(R[e]=void 0,pe.push(e))},it={name:`emscripten::val`,fromWireType:e=>{var t=B(e);return rt(e),t},toWireType:(e,t)=>V(t),argPackAdvance:8,readValueFromPointer:Me,B:null},at=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(T[e])}:function(e){return this.fromWireType(E[e])};case 2:return n?function(e){return this.fromWireType(D[e>>1])}:function(e){return this.fromWireType(O[e>>1])};case 4:return n?function(e){return this.fromWireType(k[e>>2])}:function(e){return this.fromWireType(A[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}},ot=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e},st=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(j[e>>2])};case 8:return function(e){return this.fromWireType(ee[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},ct=(e,t,n)=>{switch(t){case 1:return n?e=>T[e]:e=>E[e];case 2:return n?e=>D[e>>1]:e=>O[e>>1];case 4:return n?e=>k[e>>2]:e=>A[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},lt=(e,t,n,r)=>{if(0<r){r=n+r-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|a&63}}t[n]=0}},ut=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},dt=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,ft=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&dt)return dt.decode(e.subarray(t,n));for(r=``;t<n;){var i=e[t++];if(i&128){var a=e[t++]&63;if((i&224)==192)r+=String.fromCharCode((i&31)<<6|a);else{var o=e[t++]&63;i=(i&240)==224?(i&15)<<12|a<<6|o:(i&7)<<18|a<<12|o<<6|e[t++]&63,65536>i?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else r+=String.fromCharCode(i)}return r},pt=typeof TextDecoder<`u`?new TextDecoder(`utf-16le`):void 0,mt=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&O[n];)++n;if(n<<=1,32<n-e&&pt)return pt.decode(E.subarray(e,n));for(n=``,r=0;!(r>=t/2);++r){var i=D[e+2*r>>1];if(i==0)break;n+=String.fromCharCode(i)}return n},ht=(e,t,n)=>{if(n??=2147483647,2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)D[t>>1]=e.charCodeAt(i),t+=2;return D[t>>1]=0,t-r},gt=e=>2*e.length,_t=(e,t)=>{for(var n=0,r=``;!(n>=t/4);){var i=k[e+4*n>>2];if(i==0)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023)):r+=String.fromCharCode(i)}return r},vt=(e,t,n)=>{if(n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(k[t>>2]=a,t+=4,t+4>n)break}return k[t>>2]=0,t-r},yt=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},bt=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(A[t>>2]=V(r)),e},xt={},St=e=>{var t=xt[e];return t===void 0?H(e):t},Ct=[],wt=e=>{var t=Ct.length;return Ct.push(e),t},Tt=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Se(A[t+4*r>>2],`parameter `+r);return n},Et=Reflect.construct,Dt={},Ot=()=>{if(!kt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:g||`./this.program`},t;for(t in Dt)Dt[t]===void 0?delete e[t]:e[t]=Dt[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);kt=n}return kt},kt,At=[null,[],[]],jt=e=>e%4==0&&(e%100!=0||e%400==0),Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Nt=[31,28,31,30,31,30,31,31,30,31,30,31];function Pt(e){var t=Array(ut(e)+1);return lt(e,t,0,t.length),t}var Ft=(e,t,n,r)=>{function i(e,t,n){for(e=typeof e==`number`?e.toString():e||``;e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,`0`)}function o(e,t){function n(e){return 0>e?-1:+(0<e)}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function c(e){var t=e.J;for(e=new Date(new Date(e.K+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(jt(e.getFullYear())?Mt:Nt)[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=A[r+40>>2];for(var u in r={jb:k[r>>2],ib:k[r+4>>2],Z:k[r+8>>2],ha:k[r+12>>2],$:k[r+16>>2],K:k[r+20>>2],F:k[r+24>>2],J:k[r+28>>2],ob:k[r+32>>2],hb:k[r+36>>2],kb:l&&l?ft(E,l):``},n=n?ft(E,n):``,l={"%c":`%a %b %d %H:%M:%S %Y`,"%D":`%m/%d/%y`,"%F":`%Y-%m-%d`,"%h":`%b`,"%r":`%I:%M:%S %p`,"%R":`%H:%M`,"%T":`%H:%M:%S`,"%x":`%m/%d/%y`,"%X":`%H:%M:%S`,"%Ec":`%c`,"%EC":`%C`,"%Ex":`%m/%d/%y`,"%EX":`%H:%M:%S`,"%Ey":`%y`,"%EY":`%Y`,"%Od":`%d`,"%Oe":`%e`,"%OH":`%H`,"%OI":`%I`,"%Om":`%m`,"%OM":`%M`,"%OS":`%S`,"%Ou":`%u`,"%OU":`%U`,"%OV":`%V`,"%Ow":`%w`,"%OW":`%W`,"%Oy":`%y`},l)n=n.replace(new RegExp(u,`g`),l[u]);var d=`Sunday Monday Tuesday Wednesday Thursday Friday Saturday`.split(` `),f=`January February March April May June July August September October November December`.split(` `);for(u in l={"%a":e=>d[e.F].substring(0,3),"%A":e=>d[e.F],"%b":e=>f[e.$].substring(0,3),"%B":e=>f[e.$],"%C":e=>a((e.K+1900)/100|0,2),"%d":e=>a(e.ha,2),"%e":e=>i(e.ha,2,` `),"%g":e=>c(e).toString().substring(2),"%G":c,"%H":e=>a(e.Z,2),"%I":e=>(e=e.Z,e==0?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.$-1;t+=(jt(e.K+1900)?Mt:Nt)[n++]);return a(e.ha+t,3)},"%m":e=>a(e.$+1,2),"%M":e=>a(e.ib,2),"%n":()=>`
16`,"%p":e=>0<=e.Z&&12>e.Z?`AM`:`PM`,"%S":e=>a(e.jb,2),"%t":()=>`	`,"%u":e=>e.F||7,"%U":e=>a(Math.floor((e.J+7-e.F)/7),2),"%V":e=>{var t=Math.floor((e.J+7-(e.F+6)%7)/7);if(2>=(e.F+371-e.J-2)%7&&t++,t)t==53&&(n=(e.F+371-e.J)%7,n==4||n==3&&jt(e.K)||(t=1));else{t=52;var n=(e.F+7-e.J-1)%7;(n==4||n==5&&jt(e.K%400-1))&&t++}return a(t,2)},"%w":e=>e.F,"%W":e=>a(Math.floor((e.J+7-(e.F+6)%7)/7),2),"%y":e=>(e.K+1900).toString().substring(2),"%Y":e=>
16e.K+1900,"%z":e=>{e=e.hb;var t=0<=e;return e=Math.abs(e)/60,(t?`+`:`-`)+String(`0000`+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.kb,"%%":()=>`%`},n=n.replace(/%%/g,`\0\0`),l)n.includes(u)&&(n=n.replace(new RegExp(u,`g`),l[u](r)));return n=n.replace(/\0\0/g,`%`),u=Pt(n),u.length>t?0:(T.set(u,e),u.length-1)};z=r.BindingError=class extends Error{constructor(e){super(e),this.name=`BindingError`}},R.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>R.length/2-5-pe.length,he=r.PureVirtualError=me(`PureVirtualError`);for(var It=Array(256),Lt=0;256>Lt;++Lt)It[Lt]=String.fromCharCode(Lt);ge=It,r.getInheritedInstanceCount=()=>Object.keys(U).length,r.getLiveInheritedInstances=()=>{var e=[],t;for(t in U)U.hasOwnProperty(t)&&e.push(U[t]);return e},r.flushPendingDeletes=ve,r.setDelayFunction=e=>{ye=e,_e.length&&ye&&ye(ve)},Oe=r.InternalError=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Object.assign(Ie.prototype,{isAliasOf:function(e){if(!(this instanceof Ie&&e instanceof Ie))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.S(n),t=t.o;for(;r.o;)e=r.S(e),r=r.o;return t===r&&n===e},clone:function(){if(this.g.i||Fe(this),this.g.O)return this.g.count.value+=1,this;var e=G,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,M:i.M,O:i.O,i:i.i,j:i.j,s:i.s,A:i.A}}})),e.g.count.value+=1,e.g.M=!1,e},delete(){if(this.g.i||Fe(this),this.g.M&&!this.g.O)throw new z(`Object already scheduled for deletion`);Ce(this);var e=this.g;--e.count.value,e.count.value===0&&(e.s?e.A.D(e.s):e.j.h.D(e.i)),this.g.O||(this.g.s=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){if(this.g.i||Fe(this),this.g.M&&!this.g.O)throw new z(`Object already scheduled for deletion`);return _e.push(this),_e.length===1&&ye&&ye(ve),this.g.M=!0,this}}),Object.assign(We.prototype,{Ra(e){return this.xa&&(e=this.xa(e)),e},pa(e){this.D?.(e)},argPackAdvance:8,readValueFromPointer:Me,fromWireType:function(e){function t(){return this.V?ke(this.h.C,{j:this.ab,i:n,A:this,s:e}):ke(this.h.C,{j:this,i:e})}var n=this.Ra(e);if(!n)return this.pa(e),null;var r=De(this.h,n);if(r!==void 0)return r.g.count.value===0?(r.g.i=n,r.g.s=e,r.clone()):(r=r.clone(),this.pa(e),r);if(r=this.h.Qa(n),r=Ee[r],!r)return t.call(this);r=this.U?r.Ha:r.pointerType;var i=Te(n,this.h,r.h);return i===null?t.call(this):this.V?ke(r.h.C,{j:r,i,A:this,s:e}):ke(r.h.C,{j:r,i})}}),Ze=r.UnboundTypeError=me(`UnboundTypeError`);var Rt={_abort_js:()=>{F(``)},_embind_create_inheriting_constructor:(e,t,n)=>{e=H(e),t=Se(t,`wrapper`),n=B(n);var r=t.h,i=r.C,a=r.o.C,o=r.o.constructor;return e=L(e,function(...e){r.o.wa.forEach(function(e){if(this[e]===a[e])throw new he(`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 z(`Pass correct 'this' to __construct`);e=o.implement(this,...e),Ce(e);var t=e.g;if(e.notifyOnDestruction(),t.O=!0,Object.defineProperties(this,{g:{value:t}}),G(this),e=t.i,e=be(r,e),U.hasOwnProperty(e))throw new z(`Tried to register registered instance: ${e}`);U[e]=this},i.__destruct=function(){if(this===i)throw new z(`Pass correct 'this' to __destruct`);Ce(this);var e=this.g.i;if(e=be(r,e),U.hasOwnProperty(e))delete U[e];else throw new z(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),V(e)},_embind_finalize_value_object:e=>{var t=Ae[e];delete Ae[e];var n=t.fa,r=t.D,i=t.sa,a=i.map(e=>e.Ua).concat(i.map(e=>e.eb));q([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Sa,s=t.Ta,c=e[n+i.length],l=t.cb,u=t.fb;a[t.Oa]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),je(n)}}}),[{name:t.name,fromWireType:e=>{var t={},n;for(n in a)t[n]=a[n].read(e);return r(e),t},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 e!==null&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:Me,B:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{t=H(t),J(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(E[e])},B:null})},_embind_register_class:(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=H(u),a=X(i,a),s&&=X(o,s),l&&=X(c,l),f=X(d,f);var p=ze(u);Re(p,function(){Z(`Cannot construct ${u} due to unbound types`,[r])}),q([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n=t.h,i=n.C;else i=Ie.prototype;t=L(u,function(...e){if(Object.getPrototypeOf(this)!==o)throw new z(`Use 'new' to construct `+u);if(c.I===void 0)throw new z(u+` has no accessible constructor`);var t=c.I[e.length];if(t===void 0)throw new z(`Tried to invoke ctor of ${u}
16 with invalid number of parameters (${e.length}) - expected (${Object.keys(c.I).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var c=new Be(u,t,o,f,n,a,s,l);if(c.o){var d;(d=c.o).T??(d.T=[]),c.o.T.push(c)}return n=new We(u,c,!0,!1,!1),d=new We(u+`*`,c,!1,!1,!1),i=new We(u+` const*`,c,!1,!0,!1),Ee[e]={pointerType:d,Ha:i},Ge(p,t),[n,d,i]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=et(n,r);t=H(t),t=tt(t),a=X(i,a),q([],[e],e=>{function r(){Z(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]);var c=e.h.constructor;return c[t]===void 0?(r.L=n-1,c[t]=r):(Le(c,t,i),c[t].l[n-1]=r),q([],s,r=>{if(r=$e(i,[r[0],null].concat(r.slice(1)),null,a,o),c[t].l===void 0?(r.L=n-1,c[t]=r):c[t].l[n-1]=r,e.h.T)for(let n of e.h.T)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=H(t),a=X(i,a),q([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,c={get(){Z(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return c.set=s?()=>{Z(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new z(`${i} is a read-only property`)},Object.defineProperty(e.h.constructor,t,c),q([],[n],n=>{n=n[0];var i={get(){return n.fromWireType(a(r))},enumerable:!0};return s&&(s=X(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),je(t)}),Object.defineProperty(e.h.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=et(t,n);i=X(r,i),q([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.h.I===void 0&&(e.h.I=[]),e.h.I[t-1]!==void 0)throw new z(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.h.I[t-1]=()=>{Z(`Cannot construct ${e.name} due to unbound types`,o)},q([],o,r=>(r.splice(1,0,null),e.h.I[t-1]=$e(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var c=et(n,r);t=H(t),t=tt(t),a=X(i,a),q([],[e],e=>{function r(){Z(`Cannot call ${i} due to unbound types`,c)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.h.wa.push(t);var l=e.h.C,u=l[t];return u===void 0||u.l===void 0&&u.className!==e.name&&u.L===n-2?(r.L=n-2,r.className=e.name,l[t]=r):(Le(l,t,i),l[t].l[n-2]=r),q([],c,r=>(r=$e(i,r,e,a,o),l[t].l===void 0?(r.L=n-2,l[t]=r):l[t].l[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,c,l)=>{t=H(t),i=X(r,i),q([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,u={get(){Z(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>Z(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new z(r+` is a read-only property`)},Object.defineProperty(e.h.C,t,u),q([],c?[n,o]:[n],n=>{var o=n[0],u={get(){var t=nt(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=X(s,c);var d=n[1];u.set=function(t){var n=nt(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),je(i)}}return Object.defineProperty(e.h.C,t,u),[]}),[]})},_embind_register_emval:e=>J(e,it),_embind_register_enum:(e,t,n,r)=>{function i(){}t=H(t),i.values={},J(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:at(t,n,r),B:null}),Re(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=Se(e,`enum`);t=H(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:L(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{t=H(t),J(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:st(t,n),B:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=et(t,n);e=H(e),e=tt(e),i=X(r,i),Re(e,function(){Z(`Cannot call ${e} due to unbound types`,o)},t-1),q([],o,n=>(Ge(e,$e(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=H(t),i===-1&&(i=4294967295),i=e=>e,r===0){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};J(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:ct(t,n,r!==0),B:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(T.buffer,A[e+4>>2],A[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
16][t];n=H(n),J(e,{name:n,fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Va:!0})},_embind_register_std_string:(e,t)=>{t=H(t);var n=t===`std::string`;J(e,{name:t,fromWireType:function(e){var t=A[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||E[o]==0){if(i=i?ft(E,i,o-i):``,s===void 0)var s=i;else s+=`\0`,s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(E[r+a]);s=s.join(``)}return $(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r=typeof t==`string`;if(!(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new z(`Cannot pass non-string to std::string`);var i=n&&r?ut(t):t.length,a=zt(4+i+1),o=a+4;if(A[a>>2]=i,n&&r)lt(t,E,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw $(o),new z(`String has UTF-16 code units that do not fit in 8 bits`);E[o+r]=s}else for(r=0;r<i;++r)E[o+r]=t[r];return e!==null&&e.push($,a),a},argPackAdvance:8,readValueFromPointer:Me,B(e){$(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=H(n),t===2)var r=mt,i=ht,a=gt,o=e=>O[e>>1];else t===4&&(r=_t,i=vt,a=yt,o=e=>A[e>>2]);J(e,{name:n,fromWireType:e=>{for(var n=A[e>>2],i,a=e+4,s=0;s<=n;++s){var c=e+4+s*t;(s==n||o(c)==0)&&(a=r(a,c-a),i===void 0?i=a:(i+=`\0`,i+=a),a=c+t)}return $(e),i},toWireType:(e,r)=>{if(typeof r!=`string`)throw new z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=zt(4+o+t);return A[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push($,s),s},argPackAdvance:8,readValueFromPointer:Me,B(e){$(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{Ae[e]={name:H(t),fa:X(n,r),D:X(i,a),sa:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,c,l)=>{Ae[e].sa.push({Oa:H(t),Ua:n,Sa:X(r,i),Ta:a,eb:o,cb:X(s,c),fb:l})},_embind_register_void:(e,t)=>{t=H(t),J(e,{mb:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>E.copyWithin(e,t,t+n),_emval_as:(e,t,n)=>(e=B(e),t=Se(t,`emval::as`),bt(t,n,e)),_emval_call_method:(e,t,n,r,i)=>(e=Ct[e],t=B(t),n=St(n),e(t,t[n],r,i)),_emval_decref:rt,_emval_get_method_caller:(e,t,n)=>{var r=Tt(e,t),i=r.shift();e--;var a=Array(e);return t=`methodCaller<(${r.map(e=>e.name).join(`, `)}) => ${i.name}>`,wt(L(t,(t,o,s,c)=>{for(var l=0,u=0;u<e;++u)a[u]=r[u].readValueFromPointer(c+l),l+=r[u].argPackAdvance;return t=n===1?Et(o,a):o.apply(t,a),bt(i,s,t)}))},_emval_get_module_property:e=>(e=St(e),V(r[e])),_emval_get_property:(e,t)=>(e=B(e),t=B(t),V(e[t])),_emval_incref:e=>{9<e&&(R[e+1]+=1)},_emval_new_array:()=>V([]),_emval_new_cstring:e=>V(St(e)),_emval_new_object:()=>V({}),_emval_run_destructors:e=>{je(B(e)),rt(e)},_emval_set_property:(e,t,n)=>{e=B(e),t=B(t),n=B(n),e[t]=n},_emval_take_value:(e,t)=>(e=Se(e,`_emval_take_value`),e=e.readValueFromPointer(t),V(e)),emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=E.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);a:{i=(i.min.call(i,2147483648,r+(65536-r%65536)%65536)-C.buffer.byteLength+65535)/65536;try{C.grow(i),te();var a=1;break a}catch{}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return Ot().forEach((r,i)=>{var a=t+n;for(i=A[e+4*i>>2]=a,a=0;a<r.length;++a)T[i++]=r.charCodeAt(a);T[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=Ot();A[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),A[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=A[t>>2],s=A[t+4>>2];t+=8;for(var c=0;c<s;c++){var l=E[o+c],u=At[e];l===0||l===10?((e===1?b:x)(ft(u,0)),u.length=0):u.push(l)}i+=s}return A[r>>2]=i,0},strftime_l:(e,t,n,r)=>Ft(e,t,n,r)},Q=function(){function e(e){return Q=e.exports,C=Q.memory,te(),qe=Q.__indirect_function_table,re.unshift(Q.__wasm_call_ctors),M--,r.monitorRunDependencies?.(M),M==0&&(N!==null&&(clearInterval(N),N=null),P&&(e=P,P=null,e())),Q}var t={env:Rt,wasi_snapshot_preview1:Rt};if(M++,r.monitorRunDependencies?.(M),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){x(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return ce||=oe(`canvas_advanced.wasm`)?`canvas_advanced.wasm`:r.locateFile?r.locateFile(`canvas_advanced.wasm`,_):_+`canvas_advanced.wasm`,fe(t,function(t){e(t.instance)}).catch(a),{}}(),$=e=>($=Q.free)(e),zt=e=>(zt=Q.malloc)(e),Bt=e=>(Bt=Q.__getTypeName)(e);r.dynCall_jiji=(e,t,n,i,a)=>(r.dynCall_jiji=Q.dynCall_jiji)(e,t,n,i,a),r.dynCall_viijii=(e,t,n,i,a,o,s)=>(r.dynCall_viijii=Q.dynCall_viijii)(e,t,n,i,a,o,s),r.dynCall_iiiiij=(e,t,n,i,a,o,s)=>(r.dynCall_iiiiij=Q.dynCall_iiiiij)(e,t,n,i,a,o,s),r.dynCall_iiiiijj=(e,t,n,i,a,o,s,c,l)=>(r.dynCall_iiiiijj=Q.dynCall_iiiiijj)(e,t,n,i,a,o,s,c,l),r.dynCall_iiiiiijj=(e,t,n,i,a,o,s,c,l,u)=>(r.dynCall_iiiiiijj=Q.dynCall_iiiiiijj)(e,t,n,i,a,o,s,c,l,u);var Vt;P=function e(){Vt||Ht(),Vt||(P=e)};function Ht(){function e(){if(!Vt&&(Vt=!0,r.calledRun=!0,!w)){if
16(I(re),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();ie.unshift(e)}I(ie)}}if(!(0<M)){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)ae();I(ne),0<M||(r.setStatus?(r.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){r.setStatus(``)},1),e()},1)):e())}}if(r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return Ht(),n=o,n})})()}),(e=>{e.exports=JSON.parse(`{"name":"@rive-app/canvas-lite","version":"2.35.1","description":"A lite version of Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)}),((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)}),((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.scrubTo===null?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,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=[];if([`touchstart`,`touchmove`].indexOf(e.type)>-1&&e.changedTouches?.length){t||e.preventDefault();for(var i=0,a=n?e.changedTouches.length:1;i<a;){var o=e.changedTouches[i];r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier}),i++}}else if(e.type===`touchend`&&e.changedTouches?.length)for(var i=0,a=n?e.changedTouches.length:1;i<a;){var o=e.changedTouches[i];r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier}),i++}else r.push({clientX:e.clientX,clientY:e.clientY,identifier:0});return r},a=function(e){var t=e.canvas,n=e.artboard,a=e.stateMachines,o=a===void 0?[]:a,s=e.renderer,c=e.rive,l=e.fit,u=e.alignment,d=e.isTouchScrollEnabled,f=d!==void 0&&d,p=e.dispatchPointerExit,m=p===void 0||p,h=e.enableMultiTouch,g=h!==void 0&&h,_=e.layoutScaleFactor,v=_===void 0?1:_;if(!t||!o.length||!s||!c||!n||typeof window>`u`)return null;var y=null,b=!1,x=function(e){if(b&&e instanceof MouseEvent){e.type==`mouseup`&&(b=!1);return}b=f&&e.type===`touchend`&&y===`touchstart`,y=e.type;var t=e.currentTarget.getBoundingClientRect(),r=i(e,f,g),a=c.computeAlignment(l,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,v),s=new c.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 c.Vec2D(i,a),l=c.mapXY(s,o),u=l.x(),d=l.y();e.transformedX=u,e.transformedY=d,l.delete(),o.delete()}}),s.delete(),a.delete(),e.type){case`mouseout`:for(var d=function(e){m?r.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},p=0,h=o;p<h.length;p++){var _=h[p];d(_)}break;case`touchmove`:case`mouseover`:case`mousemove`:for(var x=function(e){r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},S=0,C=o;S<C.length;S++){var _=C[S];x(_)}break;case`touchstart`:case`mousedown`:for(var w=function(e){r.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},T=0,E=o;T<E.length;T++){var _=E[T];w(_)}break;case`touchend`:for(var D=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},O=0,k=o;O<k.length;O++){var _=k[O];D(_)}break;case`mouseup`:for(var A=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},j=0,ee=o;j<ee.length;j++){var _=ee[j];A(_)}}}.bind(r);return t.addEventListener(`mouseover`,x),t.addEventListener(`mouseout`,x),t.addEventListener(`mousemove`,x),t.addEventListener(`mousedown`,x),t.addEventListener(`mouseup`,x),t.addEventListener(`touchmove`,x,{passive:f}),t.addEventListener(`touchstart`,x,{passive:f}),t.addEventListener(`touchend`,x),function(){t.removeEventListener(`mouseover`,x),t.removeEventListener(`mouseout`,x),t.removeEventListener(`mousemove`,x),t.removeEventListener(`mousedown`,x),t.removeEventListener(`mouseup`,x),t.removeEventListener(`touchmove`,x),t.removeEventListener(`touchstart`,x),t.removeEventListener(`touchend`,x)}}}),((e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>f});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,c=[`.`,`/`],l=`about:blank`;function u(e){return c.indexOf(e[0])>-1}function d(e){return e.replace(o,``).replace(i,function(e,t){return String.fromCharCode(t)})}function f(e){if(!e)return l;var t=d(e).replace(a,``).replace(o,``).trim();if(!t)return l;if(u(t))return t;var n=t.match(s);if(!n)return t;var i=n[0];return r.test(i)?l:t}}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>c,CustomFileAssetLoaderWrapper:()=>u,FileAssetWrapper:()=>d,FileFinalizer:()=>i,FontAssetWrapper:()=>m,FontWrapper:()=>l,ImageAssetWrapper:()=>f,ImageWrapper:()=>s,createFinalization:()=>_,finalizationRegistry:()=>g});var r=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
16t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),a=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),o=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),s=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(o),c=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(o),l=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(o),u=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;return e.isImage?n=new 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){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(d),p=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(d),m=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(d),h=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),g=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:h)(function(e){e?.unref()}),_=function(e,t){var n=new a(t);g.register(e,n)}})],t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>m,DataEnum:()=>M,DrawOptimizationOptions:()=>h,EventType:()=>E,Fit:()=>p,Layout:()=>g,LoopType:()=>D,Rive:()=>ie,RiveEventType:()=>b,RiveFile:()=>re,RuntimeLoader:()=>
16_,StateMachineInput:()=>y,StateMachineInputType:()=>v,Testing:()=>z,ViewModel:()=>ae,ViewModelInstance:()=>P,ViewModelInstanceArtboard:()=>L,ViewModelInstanceAssetImage:()=>I,ViewModelInstanceBoolean:()=>ce,ViewModelInstanceColor:()=>fe,ViewModelInstanceEnum:()=>ue,ViewModelInstanceList:()=>de,ViewModelInstanceNumber:()=>se,ViewModelInstanceString:()=>oe,ViewModelInstanceTrigger:()=>le,ViewModelInstanceValue:()=>F,decodeAudio:()=>B,decodeFont:()=>me,decodeImage:()=>V});var e=n(1),t=n(2),i=n(3),a=n(5),o=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},l=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},u=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},d=function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return t}(Error),f=function(e){return e&&e.isHandledError?e.message:`Problem loading file; may be corrupt!`},p;(function(e){e.Cover=`cover`,e.Contain=`contain`,e.Fill=`fill`,e.FitWidth=`fitWidth`,e.FitHeight=`fitHeight`,e.None=`none`,e.ScaleDown=`scaleDown`,e.Layout=`layout`})(p||={});var m;(function(e){e.Center=`center`,e.TopLeft=`topLeft`,e.TopCenter=`topCenter`,e.TopRight=`topRight`,e.CenterLeft=`centerLeft`,e.CenterRight=`centerRight`,e.BottomLeft=`bottomLeft`,e.BottomCenter=`bottomCenter`,e.BottomRight=`bottomRight`})(m||={});var h;(function(e){e.AlwaysDraw=`alwaysDraw`,e.DrawOnChanged=`drawOnChanged`})(h||={});var g=function(){function e(e){this.fit=e?.fit??p.Contain,this.alignment=e?.alignment??m.Center,this.layoutScaleFactor=e?.layoutScaleFactor??1,this.minX=e?.minX??0,this.minY=e?.minY??0,this.maxX=e?.maxX??0,this.maxY=e?.maxY??0}return e.new=function(t){var n=t.fit,r=t.alignment,i=t.minX,a=t.minY,o=t.maxX,s=t.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new e({fit:n,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},e.prototype.copyWith=function(t){var n=t.fit,r=t.alignment,i=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,c=t.maxY;return new e({fit:n??this.fit,alignment:r??this.alignment,layoutScaleFactor:i??this.layoutScaleFactor,minX:a??this.minX,minY:o??this.minY,maxX:s??this.maxX,maxY:c??this.maxY})},e.prototype.runtimeFit=function(e){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var t=this.fit===p.Cover?e.Fit.cover:this.fit===p.Contain?e.Fit.contain:this.fit===p.Fill?e.Fit.fill:this.fit===p.FitWidth?e.Fit.fitWidth:this.fit===p.FitHeight?e.Fit.fitHeight:this.fit===p.ScaleDown?e.Fit.scaleDown:this.fit===p.Layout?e.Fit.layout:e.Fit.none;return this.cachedRuntimeFit=t,t},e.prototype.runtimeAlignment=function(e){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var t=this.alignment===m.TopLeft?e.Alignment.topLeft:this.alignment===m.TopCenter?e.Alignment.topCenter:this.alignment===m.TopRight?e.Alignment.topRight:this.alignment===m.CenterLeft?e.Alignment.centerLeft:this.alignment===m.CenterRight?e.Alignment.centerRight:this.alignment===m.BottomLeft?e.Alignment.bottomLeft:this.alignment===m.BottomCenter?e.Alignment.bottomCenter:this.alignment===m.BottomRight?e.Alignment.bottomRight:e.Alignment.center;return this.cachedRuntimeAlignment=t,t},e}(),_=function(){function n(){}return n.loadRuntime=function(){e.default({locateFile:function(){return n.wasmURL}}).then(function(e){var t;for(n.runtime=e;n.callBackQueue.length>0;)(t=n.callBackQueue.shift())==null||t(n.runtime)}).catch(function(e){var r={message:e?.message||`Unknown error`,type:e?.name||`Error`,wasmError:e instanceof WebAssembly.CompileError||e instanceof WebAssembly.RuntimeError,originalError:e};
16console.debug(`Rive WASM load error details:`,r);var i=`https://cdn.jsdelivr.net/npm/${t.name}@${t.version}/rive_fallback.wasm`;if(n.wasmURL.toLowerCase()!==i)console.warn(`Failed to load WASM from ${n.wasmURL} (${r.message}), trying jsdelivr as a backup`),n.setWasmUrl(i),n.loadRuntime();else{var a=[`Could not load Rive WASM file from ${n.wasmURL} or ${i}.`,`Possible reasons:`,`- Network connection is down`,`- WebAssembly is not supported in this environment`,`- The WASM file is corrupted or incompatible`,`
17Error details:`,`- Type: ${r.type}`,`- Message: ${r.message}`,`- WebAssembly-specific error: ${r.wasmError}`,`
18To resolve, you may need to:`,`1. Check your network connection`,`2. Set a new WASM source via RuntimeLoader.setWasmUrl()`,`3. Call RuntimeLoader.loadRuntime() again`].join(`
19`);console.error(a)}})},n.getInstance=function(e){n.isLoading||(n.isLoading=!0,n.loadRuntime()),n.runtime?e(n.runtime):n.callBackQueue.push(e)},n.awaitInstance=function(){return new Promise(function(e){return n.getInstance(function(t){return e(t)})})},n.setWasmUrl=function(e){n.wasmURL=e},n.getWasmUrl=function(){return n.wasmURL},n.isLoading=!1,n.callBackQueue=[],n.wasmURL=`https://unpkg.com/${t.name}@${t.version}/rive.wasm`,n}(),v;(function(e){e[e.Number=56]=`Number`,e[e.Trigger=58]=`Trigger`,e[e.Boolean=59]=`Boolean`})(v||={});var y=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===v.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),b;(function(e){e[e.General=128]=`General`,e[e.OpenUrl=131]=`OpenUrl`})(b||={});var x=function(){function e(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}return e}(),S=function(e){o(t,e);function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return t}(x),C=function(e){o(t,e);function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return Object.defineProperty(t.prototype,"viewModel",{set:function(e){this.nativeViewModel=e.nativeInstance},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;this.selfUnref&&(this.nativeArtboard.unref(),(e=this.nativeViewModel)==null||e.unref())},t}(x),w=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){if(e.type===t.SMIInput.bool)return new y(v.Boolean,e.asBool());if(e.type===t.SMIInput.number)return new y(v.Number,e.asNumber());if(e.type===t.SMIInput.trigger)return new y(v.Trigger,e.asTrigger())},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){e.runtimeInstance!=null&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),T=function(){function e(e,t,n,r,i){r===void 0&&(r=[]),i===void 0&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(n===void 0&&(n=!0),e=R(e),e.length===0)this.animations.forEach(function(e){return e.playing=t}
19),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<e.length;o++){var s=r.indexOf(e[o]),c=a.indexOf(e[o]);if(s>=0||c>=0)s>=0?this.animations[s].playing=t:this.stateMachines[c].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var u=new i.Animation(l,this.artboard,this.runtime,t);u.advance(0),u.apply(1),this.animations.push(u)}else{var d=this.artboard.stateMachineByName(e[o]);if(d){var f=new w(d,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:E.Play,data:this.playing}):this.eventManager.fire({type:E.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map(function(e){return e.name}),r=0;r<e.length;r++){var a=n.indexOf(e[r]);if(a>=0)this.animations[a].playing=t;else{var o=this.artboard.animationByName(e[r]);if(o){var s=new i.Animation(o,this.artboard,this.runtime,t);s.advance(0),s.apply(1),this.animations.push(s)}else console.error(`Animation with name ${e[r]} not found.`)}}},e.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new w(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn(`State Machine with name ${e[r]} not found.`),this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.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=R(e);var n=[];if(e.length===0)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var i=this.stateMachines.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(i.map(function(e){return e.name}))}return this.eventManager.fire({type:E.Stop,data:n}),n},Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){t===void 0&&(t=!0);var n;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];n.loopValue===0&&n.loopCount?(n.loopCount=0,this.stop(n.name)):n.loopValue===1&&n.loopCount?(this.eventManager.fire({type:E.Loop,data:{animation:n.name,type:D.Loop}}),n.loopCount=0):n.loopValue===2&&n.loopCount>1&&(this.eventManager.fire({type:E.Loop,data:{animation:n.name,type:D.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:E.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:E.Advance,data:e})},e}(),E;(function(e){e.Load=`load`,e.LoadError=`loaderror`,e.Play=`play`,e.Pause=`pause`,e.Stop=`stop`,e.Loop=`loop`,e.Draw=`draw`,e.Advance=`advance`,e.StateChange=`statechange`,e.RiveEvent=`riveevent`,e.AudioStatusChange=`audiostatuschange`})(E||={});var D;
19(function(e){e.OneShot=`oneshot`,e.Loop=`loop`,e.PingPong=`pingpong`})(D||={});var O=function(){function e(e){e===void 0&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}).forEach(function(e){return t.remove(e)}):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach(function(t){return t.callback(e)})},e}(),k=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();e?.action&&e.action(),e?.event&&this.eventManager.fire(e.event)}},e}(),A;(function(e){e[e.AVAILABLE=0]=`AVAILABLE`,e[e.UNAVAILABLE=1]=`UNAVAILABLE`})(A||={});var j=new(function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=A.UNAVAILABLE,t}return t.prototype.delay=function(e){return c(this,void 0,void 0,function(){return l(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:E.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._enabled||(this._enabled=!0,this._status=A.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:if(this._status!==A.UNAVAILABLE||this._audioContext===null)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window<`u`?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status===A.UNAVAILABLE?[4,this.testAudio()]:[3,5];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener(`pointerdown`,function(){return c(e,void 0,void 0,function(){return l(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===A.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(O)),ee=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),te=globalThis.ResizeObserver||ee,ne=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);n===null?e._resizeObserver.unobserve(t.target):n.onResize(t.target.clientWidth==0||t.target.clientHeight==0)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new te(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}()),re=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=typeof e.enableRiveAssetCDN!=`boolean`||e.enableRiveAssetCDN,this.eventManager=new O,e.onLoad&&this.on(E.Load,e.onLoad),e.onLoadError&&this.on(E.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&((e=this.file)==null||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return c(this,void 0,void 0,function(){var t,n,r,i,o;return l(this,function(s){switch(s.label){case 0:return this.src?(t=this,[4,pe(this.src)]):[3,2];case 1:t.buffer=s.sent(),s.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(r=new a.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),n=r.assetLoader),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:return i.file=s.sent(),o=new a.FileFinalizer(this.file),a.finalizationRegistry.register(this,o),this.destroyed?(this.releaseFile(),[2]):(this.file===null?this.fireLoadError(e.fileLoadErrorMessage):this.eventManager.fire({type:E.Load,data:this}),[2])}})})},e.prototype.init=function(){return c(this,void 0,void 0,function(){var t,n;return l(this,function(r){switch(r.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),t=this,[4,_.awaitInstance()];case 2:return t.runtime=r.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:E.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,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(this.file!==null)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(e!=null){var t=new C(e);return(0,a.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);
19if(t!=null)return new S(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.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return t===null?null:new ae(t)},e.missingErrorMessage=`Rive source file or data buffer required`,e.fileLoadErrorMessage=`The file failed to load`,e}(),ie=function(){function e(e){var t=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.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._needsRedraw=!1,this._currentCanvasWidth=0,this._currentCanvasHeight=0,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.drawOptimization=h.DrawOnChanged,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var n=t._hasZeroSize!==e;t._hasZeroSize=e,e?(!t._layout.maxX||!t._layout.maxY)&&t.resizeToCanvas():n&&t.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=ne.add(this.canvas,this.onCanvasResize)),this._currentCanvasWidth=this.canvas.width,this._currentCanvasHeight=this.canvas.height,this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=e.layout??new g,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=e.dispatchPointerExit===!1?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.drawOptimization=e.drawingOptions??this.drawOptimization,this.enableRiveAssetCDN=e.enableRiveAssetCDN===void 0||e.enableRiveAssetCDN,this.eventManager=new O,e.onLoad&&this.on(E.Load,e.onLoad),e.onLoadError&&this.on(E.LoadError,e.onLoadError),e.onPlay&&this.on(E.Play,e.onPlay),e.onPause&&this.on(E.Pause,e.onPause),e.onStop&&this.on(E.Stop,e.onStop),e.onLoop&&this.on(E.Loop,e.onLoop),e.onStateChange&&this.on(E.StateChange,e.onStateChange),e.onAdvance&&this.on(E.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(E.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(E.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(E.Play,e.onplay),e.onpause&&!e.onPause&&this.on(E.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(E.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(E.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(E.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new k(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(e.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new e(t)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(t){var n=this,r=t.src,i=t.buffer,a=t.riveFile,o=t.animations,s=t.stateMachines,c=t.artboard,l=t.autoplay,u=l!==void 0&&l,f=t.useOffscreenRenderer,p=f!==void 0&&f,m=t.autoBind,h=m!==void 0&&m;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new d(e.missingErrorMessage);var g=R(o),v=R(s);this.loaded=!1,this.readyForPlaying=!1,_.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRen
19derer(),n.renderer=n.runtime.makeRenderer(n.canvas,p),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(c,g,v,u,h).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){console.error(e)})}},e.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter(function(e){return e.playing&&t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),r=this.isTouchScrollEnabled,i=this.dispatchPointerExit,o=this.enableMultiTouch;e&&`isTouchScrollEnabled`in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,a.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,dispatchPointerExit:i,enableMultiTouch:o,layoutScaleFactor:this._layout.layoutScaleFactor})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&=(this.eventCleanup(),null)},e.prototype.initializeAudio=function(){var e=this;j.status==A.UNAVAILABLE&&(this.file.hasAudio||this.artboard?.hasAudio&&this._audioEventListener===null)&&(this._audioEventListener={type:E.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}},j.add(this._audioEventListener),j.establishAudio())},e.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},e.prototype.initData=function(e,t,n,r,i){return c(this,void 0,void 0,function(){var a,o,s;return l(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),this.riveFile==null?(a=new re({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=a,[4,a.init()]):[3,2];case 1:if(c.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];c.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:E.Load,data:this.src??`buffer`}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=c.sent(),s=f(o),console.warn(s),this.eventManager.fire({type:E.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},e.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o){var s=`Invalid artboard name or no default artboard`;console.warn(s),this.eventManager.fire({type:E.LoadError,data:s});return}this.artboard=o,o.volume=this._volume*j.systemVolume,this.animator=new T(this.runtime,this.artboard,this.eventManager);var c;if(t.length>0||n.length>0?(c=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):c=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?E.Play:E.Pause,data:c}}),i){var l=this.file.defaultArtboardViewModel(o);if(l!==null){var u=l.defaultInstance();if(u!==null){var d=new P(u,null);(0,a.createFinalization)(d,d.runtimeInstance),this.bindViewModelInstance(d)}}}}},e.prototype.drawFrame=function(){var e;(document==null?void 0:document.timeline)?.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(e=this.runtime)==null||e.resolveAnimationFrame()):this.scheduleRendering()},e.prototype._canvasSizeChanged=function(){var e=!1;return this.canvas&&(this.canvas.width!==this._currentCanvasWidth&&(this._currentCanvasWidth=this.canvas.width,e=!0),this.canvas.height!==this._currentCanvasHeight&&(this._currentCanvasHeight=this.canvas.height,e=!0)),e},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||=e,this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,t?.());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var o=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),s=0,c=o;s<c.length;s++){var l=c[s];l.advance(i),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var u=this.animator.stateMachines.filter(function(e){return e.playing}),d=0,f=u;d<f.length;d++){var p=f[d],m=p.reportedEventCount();if(m)for(var g=0;g<m;g++){var _=p.reportedEventAt(g);if(_){if(_.type===b.OpenUrl){if(this.eventManager.fire({type:E.RiveEvent,data:_}),this.automaticallyHandleEvents){var v=document.createElement(`a`),y=_,x=y.url,S=y.target,C=(0,a.sanitizeUrl)(x);x&&v.setAttribute(`href`,C),S&&v.setAttribute(`target`,S),C&&C!==a.BLANK_URL&&v.click()}}else this.eventManager.fire({type:E.RiveEvent,data:_})}}p.advanceAndApply(i)}this.animator.stateMachines.length==0&&this.artboard.advance(i);var w=this.renderer;this._hasZeroSize||(this.drawOptimization==h.AlwaysDraw||this.artboard.didChange()||this._needsRedraw||this._canvasSizeChanged())&&(w.clear(),w.save(),this.alignRenderer(),this.artboard.draw(w),w.restore(
19),w.flush(),this._needsRedraw=!1),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var T=performance.now();for(this.frameTimes.push(T),this.durations.push(T-r);this.frameTimes[0]<=T-1e3;)this.frameTimes.shift(),this.durations.shift();(n=this._viewModelInstance)==null||n.handleCallbacks(),this.animator.isPlaying?this.scheduleRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(e.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),e.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&ne.remove(this._observed),this.removeRiveListeners(),this.file&&=((e=this.riveFile)==null||e.cleanup(),null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(j.remove(this._audioEventListener),this._audioEventListener=null),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;(e=this.renderer)==null||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&=(this.artboard.delete(),null)},e.prototype.retrieveTextRun=function(e){if(!e){console.warn(`No text run name provided`);return}if(!this.artboard){console.warn(`Tried to access text run, but the Artboard is null`);return}var t=this.artboard.textRun(e);if(!t){console.warn(`Could not access a text run with name '${e}' in the '${this.artboard?.name}' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime.`);return}return t},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.play(e,t)}});return}this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},e.prototype.pause=function(e){var t=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.pause(e)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},e.prototype.scrub=function(e,t){var n=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.scrub(e,t)}});return}this.animator.scrub(e,t||0),this.drawFrame()},e.prototype.stop=function(e){var t=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.stop(e)}});return}this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},e.prototype.reset=function(e){var t=e?.artboard,n=R(e?.animations),r=R(e?.stateMachines),i=e?.autoplay??!1,a=e?.autoBind??!1;this.cleanupInstances(),this.initArtboard(t,n,r,i,a),this.taskQueue.process()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,(!e.maxX||!e.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var t=this.canvas.getBoundingClientRect(),n=t.width,r=t.height,i=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=i,this.canvas.width=i*n,this.canvas.height=i*r,this._needsRedraw=!0,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===p.Layout){var a=this._layout.layoutScaleFactor;this.artboard.width=n/a,this.artboard.height=r/a}}},Object.defineProperty(e.prototype,"source",{get:function(){return this.src}
19,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:``},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),e.prototype.stateMachineInputs=function(e){if(this.loaded)return this.animator.stateMachines.find(function(t){return t.name===e})?.inputs},e.prototype.retrieveInputAtPath=function(e,t){if(!e){console.warn(`No input name provided for path '${t}'`);return}if(!this.artboard){console.warn(`Tried to access input: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.inputByPath(e,t);if(!n){console.warn(`Could not access an input with name: '${e}', at path:'${t}'`);return}return n},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Boolean?r.asBool().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a boolean`))},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Number?r.asNumber().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a number`))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===v.Trigger?n.asTrigger().fire():console.warn(`Input with name: '${e}', at path:'${t}' is not a trigger`))},e.prototype.retrieveTextAtPath=function(e,t){if(!e){console.warn(`No text name provided for path '${t}'`);return}if(!t){console.warn(`No path provided for text '${e}'`);return}if(!this.artboard){console.warn(`Tried to access text: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.textByPath(e,t);if(!n){console.warn(`Could not access text with name: '${e}', at path:'${t}'`);return}return n},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(!n){console.warn(`Could not get text with name: '${e}', at path:'${t}'`);return}return n.text},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);if(!r){console.warn(`Could not set text with name: '${e}', at path:'${n}'`);return}r.text=t},Object.defineProperty(e.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.animator?.isStopped??!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this.drawFrame()},e.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.frameRequestId=this.runtime.requestAnimationFrame?this.runtime.requestAnimationFrame(this._boundDraw):requestAnimationFrame(this._boundDraw))},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();
19o++){for(var s=n.stateMachineByIndex(o),c=s.name,l=new this.runtime.StateMachineInstance(s,n),u=[],d=0;d<l.inputCount();d++){var f=l.input(d);u.push({name:f.name,type:f.type})}r.stateMachines.push({name:c,inputs:u})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*j.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardWidth",{get:function(){return this.artboard?this.artboard.width:this._artboardWidth??0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardHeight",{get:function(){return this.artboard?this.artboard.height:this._artboardHeight??0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),e.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(e.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(e.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return t===null?null:new ae(t)},e.prototype.viewModelByName=function(e){return this.riveFile?.viewModelByName(e)},e.prototype.enums=function(){if(this._dataEnums===null){var e=this.file.enums();this._dataEnums=e.map(function(e){return new M(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new ae(e)}return null},e.prototype.getArtboard=function(e){return this.riveFile?.getArtboard(e)??null},e.prototype.getBindableArtboard=function(e){return this.riveFile?.getBindableArtboard(e)??null},e.prototype.getDefaultBindableArtboard=function(){return this.riveFile?.getDefaultBindableArtboard()??null},e.missingErrorMessage=`Rive source file or data buffer required`,e.cleanupErrorMessage=`Attempt to use file after calling cleanup.`,e}(),ae=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(t!==null){var n=new P(t,null);return(0,a.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(t!==null){var n=new P(t,null);return(0,a.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(e!==null){var t=new P(e,null);return(0,a.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(e!==null){var t=new P(e,null);return(0,a.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()}
19,enumerable:!1,configurable:!0}),e}(),M=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}(),N;(function(e){e.Number=`number`,e.String=`string`,e.Boolean=`boolean`,e.Color=`color`,e.Trigger=`trigger`,e.Enum=`enum`,e.List=`list`,e.Image=`image`,e.Artboard=`artboard`})(N||={});var P=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,t!==null&&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(){this._propertiesWithCallbacks.length!==0&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()})),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){this._parents.includes(e)||(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);t!==-1&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)||(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split(`/`);return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return n===null?null:t==e.length-1?n:n.viewModelFromPathSegments(e,t++)},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r=this.internalViewModelInstance(e[t]);return r===null?null:r.propertyFromPathSegments(e,t+1,n)}var i=null;switch(n){case N.Number:if(i=this._runtimeInstance?.number(e[t])??null,i!==null)return new se(i,this);break;case N.String:if(i=this._runtimeInstance?.string(e[t])??null,i!==null)return new oe(i,this);break;case N.Boolean:if(i=this._runtimeInstance?.boolean(e[t])??null,i!==null)return new ce(i,this);break;case N.Color:if(i=this._runtimeInstance?.color(e[t])??null,i!==null)return new fe(i,this);break;case N.Trigger:if(i=this._runtimeInstance?.trigger(e[t])??null,i!==null)return new le(i,this);break;case N.Enum:if(i=this._runtimeInstance?.enum(e[t])??null,i!==null)return new ue(i,this);break;case N.List:if(i=this._runtimeInstance?.list(e[t])??null,i!==null)return new de(i,this);break;case N.Image:if(i=this._runtimeInstance?.image(e[t])??null,i!==null)return new I(i,this);break;case N.Artboard:if(i=this._runtimeInstance?.artboard(e[t])??null,i!==null)return new L(i,this)}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n=this._runtimeInstance?.viewModel(t);if(n!==null){var r=new e(n,this);return(0,a.createFinalization)(r,n),r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,N.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,N.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,N.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,N.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,N.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,N.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,N.List)},e.prototype.image=function(e){return this.propertyFromPath(e,N.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,N.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 n==null?null:n.internalViewModelInstance(t[t.length-1])},e.prototype.internalReplaceViewModel=function(e,t){if(t.runtimeInstance!==null){var n=this._runtimeInstance?.replaceViewModel(e,t.runtimeInstance)||!1;if(n){t.internalIncrementReferenceCount();var r=this.internalViewModelInstance(e);r!==null&&(r.removeParent(this),this._children.includes(r)&&(this._children=this._children.filter(function(e){return e!==r})),r.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return n}return!1},e.prototype.replaceViewModel=function(e,t){var n=e.split(`/`);return(n.length>1?this.viewModelFromPathSegments(n.slice(0,n.length-1),0):this)?.internalReplaceViewModel(n[n.length-1],t)??!1},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,(e=this._runtimeInstance)==null||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,(e=this._runtimeInstance)==null||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){return this._runtimeInstance?.getProperties().map(function(e){return s({},e)})||[]}
19,enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e=this,t;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&((t=this._runtimeInstance)==null||t.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=u([],this._children,!0);this._children.length=0;var r=u([],this._parents,!0);this._parents.length=0,n.forEach(function(t){t.removeParent(e)}),r.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),F=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){this.callbacks.length===0&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,this.callbacks.length===0&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}(),oe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),se=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),ce=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),le=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(F),ue=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),de=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return e.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t)?(e.addParent(this._parentViewModel),!0):!1},t.prototype.removeInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(t!=null){var n=new P(t,this._parentViewModel);return(0,a.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(F),fe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
19,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,e))*255))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),I=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{set:function(e){this._viewModelInstanceValue.value(e?.nativeImage??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(F),L=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{set:function(e){var t=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard);this._viewModelInstanceValue.value(t?.nativeArtboard??null),t?.nativeViewModel&&this._viewModelInstanceValue.viewModelInstance(t?.nativeViewModel??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(F),pe=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return n=i.sent(),[4,n.arrayBuffer()];case 2:return r=i.sent(),[2,r]}})})},R=function(e){return typeof e==`string`?[e]:e instanceof Array?e:[]},z={EventManager:O,TaskQueueManager:k},B=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeAudio(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.AudioWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},V=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeImage(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.ImageWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},me=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeFont(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.FontWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})}})(),r})())}))(),1),ut=[`width`,`height`],dt=_({__name:`RiveAnimation`,props:{desktopSrc:{},mobileSrc:{},breakpoint:{default:768},stateMachines:{default:`State Machine 1`},canvasClass:{default:`w-full`},desktopWidth:{},desktopHeight:{},mobileWidth:{},mobileHeight:{},enableHover:{type:Boolean,default:!1}},setup(e){lt.RuntimeLoader.setWasmUrl(k);let t=e,n=o(null),r=o(null),a=null,c=o(!1),l=null,d=o(!1),p=o(!1),m=o(!1),_=()=>{m.value=window.innerWidth<t.breakpoint},v=()=>m.value&&t.mobileSrc?t.mobileSrc:t.desktopSrc,b=g(()=>m.value&&t.mobileWidth?t.mobileWidth:t.desktopWidth),x=g(()=>m.value&&t.mobileHeight?t.mobileHeight:t.desktopHeight),S=()=>
19{if(!n.value||a)return;let e={src:v(),canvas:n.value,autoplay:!1,onLoad:()=>{a?.resizeDrawingSurfaceToCanvas();let e=a?.animationNames||[];d.value=e.includes(`hover`)}};t.enableHover&&!m.value?e.animations=`hover`:e.stateMachines=t.stateMachines,a=new lt.Rive(e)},C=()=>{a&&a.play()},w=()=>{t.enableHover&&!m.value&&d.value&&a&&!p.value&&(p.value=!0,a.play(`hover`))},T=()=>{},E=()=>{a&&=(a.cleanup(),null)},D=()=>{let e=m.value;if(_(),e!==m.value){let e=c.value;E(),S(),e&&C()}};return y(()=>{_(),S(),(!t.enableHover||m.value)&&(l=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&!c.value&&(c.value=!0,C())})},{threshold:.1}),r.value&&l.observe(r.value)),window.addEventListener(`resize`,D)}),f(()=>{E(),l&&r.value&&(l.unobserve(r.value),l.disconnect()),window.removeEventListener(`resize`,D)}),(t,a)=>(h(),u(`div`,{ref_key:`containerRef`,ref:r,class:s([`touch-none select-none`,{"pointer-events-none":m.value}]),onMouseenter:w,onMouseleave:T},[i(`canvas`,{ref_key:`canvasRef`,ref:n,width:b.value,height:x.value,class:s(e.canvasClass)},null,10,ut)],34))}}),ft={class:`wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel`},pt={class:`p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3 lg:border-b-0`},mt={__name:`FeatureGrid1`,setup(t){return(t,n)=>(h(),u(`section`,ft,[n[2]||=e("",2),i(`div`,pt,[n[0]||=i(`h5`,{class:`text-white`},`Rich Features Out of the Box`,-1),n[1]||=i(`p`,{class:`sm:max-w-[28rem] text-pretty`},` TypeScript, JSX, CSS, Workers, WebAssembly... and more just a plugin away. `,-1),v(dt,{"desktop-src":a(w),"mobile-src":a(w),"desktop-width":563,"desktop-height":300,"mobile-width":563,"mobile-height":420,"canvas-class":`w-full`},null,8,[`desktop-src`,`mobile-src`])]),n[3]||=e("",1)]))}},ht={class:`wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel`},gt={class:`p-5 sm:p-10 flex flex-col gap-3`},_t={__name:`FeatureGrid2`,setup(t){return(t,n)=>(h(),u(`section`,ht,[i(`div`,gt,[n[0]||=i(`h5`,{class:`text-balance sm:text-pretty text-white`},` Flexible Plugin System `,-1),n[1]||=i(`p`,{class:`sm:max-w-[28rem] text-pretty`},` Vite plugins extends Rollup's well-designed plugin interface with a few extra Vite-specific options. `,-1),v(dt,{"desktop-src":a(O),"desktop-width":640,"desktop-height":300,"canvas-class":`w-[calc(100%_+_2.5rem)] mt-5 -mx-5`},null,8,[`desktop-src`])]),n[2]||=e("",3)]))}},vt={},yt={class:`wrapper wrapper--ticks border-t py-8 sm:py-16 px-5 sm:px-10`};function bt(e,t){return h(),u(`section`,yt,[...t[0]||=[i(`img`,{src:D,alt:`Frameworks powered by Vite`,loading:`lazy`,class:`w-full block sm:hidden`},null,-1),i(`img`,{src:te,alt:`Frameworks powered by Vite`,loading:`lazy`,class:`w-full hidden sm:block`},null,-1)]])}var xt=m(vt,[[`render`,bt]]),St={class:`vp-doc`},Ct={class:`vp-code-group`},wt={class:`tabs`},Tt=[`id`,`name`,`checked`,`onChange`],Et=[`for`],Dt={class:`lang`},Ot={key:0,style:{"user-select":`none`,"-webkit-user-select":`none`}},kt=m(_({__name:`CodeGroup`,props:{tabs:{}},setup(e){let t=o(0),n=Math.random().toString(36).substring(7);return(o,f)=>(h(),u(`div`,St,[i(`div`,Ct,[i(`div`,wt,[(h(!0),u(r,null,d(e.tabs,(e,o)=>(h(),u(r,{key:o},[i(`input`,{id:`tab-${a(n)}-${o}`,type:`radio`,name:`code-group-tabs-${a(n)}`,checked:o===t.value,onChange:e=>t.value=o},null,40,Tt),i(`label`,{for:`tab-${a(n)}-${o}`},c(e.label),9,Et)],64))),128))]),(h(!0),u(r,null,d(e.tabs,(e,n)=>(h(),u(`div`,{key:`content-${n}`,class:s([`language-`+(e.language||`bash`),{active:n===t.value}])},[f[0]||=i(`button`,{class:`copy`,title:`Copy code`},null,-1),i(`span`,Dt,c(e.language||`bash`),1),i(`pre`,null,[i(`code`,null,[e.prefix?(h(),u(`span`,Ot,c(e.prefix),1)):l(``,!0),i(`span`,null,c(e.code),1)])])],2))),128))])]))}}),[[`__scopeId`,`data-v-ee72c65e`]]),At={class:`wrapper wrapper--ticks grid md:grid-cols-2 w-full border-nickel md:divide-x`},jt={class:`flex flex-col p-10 justify-between gap-20 items-center md:items-start`},Mt={class:`flex flex-col sm:min-h-[30rem]`},Nt={class:`relative px-10 pb-10 md:pt-10 h-full flex flex-col justify-center overflow-clip`},Pt={__name:`Hero`,setup(t){if(typeof document<`u`){let e=document.createElement(`link`);e.rel=`preload`,e.href=E,e.as=`fetch`,e.crossOrigin=`anonymous`,document.head.appendChild(e)}let n=[{label:`npm`,code:`npm create vite@latest`,prefix:`$ `},{label:`Yarn`,code:`yarn create vite`,prefix:`$ `},{label:`pnpm`,code:`pnpm create vite`,prefix:`$ `},{label:`Bun`,code:`bun create vite`,prefix:`$ `},{label:`Deno`,code:`deno init --npm vite`,prefix:`$ `}];return(t,r)=>(h(),u(`div`,At,[i(`div`,jt,[r[0]||=e("",1),v(kt,{tabs:n,class:`hidden md:block w-full -mb-[16px]`,style:{"--vp-code-tab-bg":`var(--color-slate)`,"--vp-code-block-bg":`var(--color-slate)`,"--vp-code-tab-divider":`#000`}})]),i(`div`,Mt,[i(`div`,Nt,[v(dt,{"desktop-src":a(E),"mobile-src":a(E),"desktop-width":641,"desktop-height":629,"mobile-width":641,"mobile-height":629,"canvas-class":`w-full`},null,8,[`desktop-src`,`mobile-src`])])])]))}},Ft={__name:`Layout`,setup(e){let t=b(),n=g(()=>t.value?.filter(e=>e.tier!==`Brought to you by`)??[]);return(e,t)=>(h(),u(r,null,[v(Pt),v(Ge,{logos:[`openai`,`shopify`,`stripe`,`linear`,`clickup`,`wiz`]}),v(L,{heading:`Redefining developer experience`,subheading:`Vite makes web development enjoyable again`}),v(mt),v(L,{heading:`A shared foundation to build upon`}),v(_t),v(L,{heading:`Powering your favorite frameworks and tools`}),v(xt),v(ct),v(J,{sponsors:n.value},null,8,[`sponsors`]),v(Ye),v(ae,{heading:`Start building with Vite`,subheading:`Prepare for a development environment that can finally keep pace with the speed of your mind.`,"button-text":`Get Started`,"button-link":`/guide/`})],64))}}
19,It=JSON.parse(`{"title":"Vite","titleTemplate":"Next Generation Frontend Tooling","description":"","frontmatter":{"title":"Vite","titleTemplate":"Next Generation Frontend Tooling","layout":"home","theme":"dark"},"headers":[],"relativePath":"index.md","filePath":"index.md"}`),Lt=Object.assign({name:`index.md`},{setup(e){return(e,t)=>(h(),u(`div`,null,[t[0]||=i(`div`,{style:{display:`none`},hidden:``,"data-nosnippet":``},`Are you an LLM? View /llms.txt for optimized Markdown documentation, or /llms-full.txt for full documentation bundle`,-1),v(Ft)]))}});export{It as __pageData,Lt as default};

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.