@thorvg/lottie-player 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gl/lottie-player.cjs.js +2 -2
- package/dist/gl/lottie-player.cjs.js.map +1 -1
- package/dist/gl/lottie-player.esm.js +2 -2
- package/dist/gl/lottie-player.esm.js.map +1 -1
- package/dist/gl/lottie-player.js +2 -2
- package/dist/gl/lottie-player.js.map +1 -1
- package/dist/gl/thorvg.wasm +0 -0
- package/dist/gl-lite/lottie-player.cjs.js +2 -2
- package/dist/gl-lite/lottie-player.cjs.js.map +1 -1
- package/dist/gl-lite/lottie-player.esm.js +2 -2
- package/dist/gl-lite/lottie-player.esm.js.map +1 -1
- package/dist/gl-lite/lottie-player.js +2 -2
- package/dist/gl-lite/lottie-player.js.map +1 -1
- package/dist/gl-lite/thorvg.wasm +0 -0
- package/dist/lottie-player.cjs.js +2 -2
- package/dist/lottie-player.cjs.js.map +1 -1
- package/dist/lottie-player.d.ts +5 -0
- package/dist/lottie-player.esm.js +2 -2
- package/dist/lottie-player.esm.js.map +1 -1
- package/dist/lottie-player.js +2 -2
- package/dist/lottie-player.js.map +1 -1
- package/dist/sw/lottie-player.cjs.js +2 -2
- package/dist/sw/lottie-player.cjs.js.map +1 -1
- package/dist/sw/lottie-player.esm.js +2 -2
- package/dist/sw/lottie-player.esm.js.map +1 -1
- package/dist/sw/lottie-player.js +2 -2
- package/dist/sw/lottie-player.js.map +1 -1
- package/dist/sw/thorvg.wasm +0 -0
- package/dist/sw-lite/lottie-player.cjs.js +2 -2
- package/dist/sw-lite/lottie-player.cjs.js.map +1 -1
- package/dist/sw-lite/lottie-player.esm.js +2 -2
- package/dist/sw-lite/lottie-player.esm.js.map +1 -1
- package/dist/sw-lite/lottie-player.js +2 -2
- package/dist/sw-lite/lottie-player.js.map +1 -1
- package/dist/sw-lite/thorvg.wasm +0 -0
- package/dist/thorvg.wasm +0 -0
- package/dist/wg/lottie-player.cjs.js +2 -2
- package/dist/wg/lottie-player.cjs.js.map +1 -1
- package/dist/wg/lottie-player.esm.js +2 -2
- package/dist/wg/lottie-player.esm.js.map +1 -1
- package/dist/wg/lottie-player.js +2 -2
- package/dist/wg/lottie-player.js.map +1 -1
- package/dist/wg/thorvg.wasm +0 -0
- package/dist/wg-lite/lottie-player.cjs.js +2 -2
- package/dist/wg-lite/lottie-player.cjs.js.map +1 -1
- package/dist/wg-lite/lottie-player.esm.js +2 -2
- package/dist/wg-lite/lottie-player.esm.js.map +1 -1
- package/dist/wg-lite/lottie-player.js +2 -2
- package/dist/wg-lite/lottie-player.js.map +1 -1
- package/dist/wg-lite/thorvg.wasm +0 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let i=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const r=this.t;if(e&&void 0===t){const e=void 0!==r&&1===r.length;e&&(t=n.get(r)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(r,t))}return t}toString(){return this.cssText}};const a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new i("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:o,defineProperty:s,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:u,getPrototypeOf:h}=Object,d=globalThis,f=d.trustedTypes,p=f?f.emptyScript:"",m=d.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},w=(t,e)=>!o(t,e),g={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),d.litPropertyMetadata??=new WeakMap;let y=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&s(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:i}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const a=n?.call(this);i?.call(this,e),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??g}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=h(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...c(t),...u(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((r,n)=>{if(e)r.adoptedStyleSheets=n.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of n){const n=document.createElement("style"),i=t.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,r.appendChild(n)}})(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:v).toAttribute(e,r.type);this._$Em=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=n;const a=i.fromAttribute(e,t.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,i=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??w)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:i},a){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==i||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,m?.({ReactiveElement:y}),(d.reactiveElementVersions??=[]).push("2.1.1");const $={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:w},_=(t=$,e,r)=>{const{kind:n,metadata:i}=r;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),a.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const i=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,i,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];e.call(this,r),this.requestUpdate(n,i,t)}}throw Error("Unsupported decorator location: "+n)};function A(t){return(e,r)=>"object"==typeof r?_(t,e,r):((t,e,r)=>{const n=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),n?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}const x=globalThis,S=x.trustedTypes,k=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+I,T=`<${C}>`,P=document,M=()=>P.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,O="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,F=/>/g,V=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,B=/^(?:script|style|textarea|title)$/i,z=(t,...e)=>({_$litType$:1,strings:t,values:e}),J=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),G=new WeakMap,H=P.createTreeWalker(P,129);function q(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const X=(t,e)=>{const r=t.length-1,n=[];let i,a=2===e?"<svg>":3===e?"<math>":"",o=L;for(let e=0;e<r;e++){const r=t[e];let s,l,c=-1,u=0;for(;u<r.length&&(o.lastIndex=u,l=o.exec(r),null!==l);)u=o.lastIndex,o===L?"!--"===l[1]?o=N:void 0!==l[1]?o=F:void 0!==l[2]?(B.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=V):void 0!==l[3]&&(o=V):o===V?">"===l[0]?(o=i??L,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,s=l[1],o=void 0===l[3]?V:'"'===l[3]?j:D):o===j||o===D?o=V:o===N||o===F?o=L:(o=V,i=void 0);const h=o===V&&t[e+1].startsWith("/>")?" ":"";a+=o===L?r+T:c>=0?(n.push(s),r.slice(0,c)+E+r.slice(c)+I+h):r+I+(-2===c?e:h)}return[q(t,a+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class Y{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,a=0;const o=t.length-1,s=this.parts,[l,c]=X(t,e);if(this.el=Y.createElement(l,r),H.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=H.nextNode())&&s.length<o;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(E)){const e=c[a++],r=n.getAttribute(t).split(I),o=/([.?@])?(.*)/.exec(e);s.push({type:1,index:i,name:o[2],strings:r,ctor:"."===o[1]?et:"?"===o[1]?rt:"@"===o[1]?nt:tt}),n.removeAttribute(t)}else t.startsWith(I)&&(s.push({type:6,index:i}),n.removeAttribute(t));if(B.test(n.tagName)){const t=n.textContent.split(I),e=t.length-1;if(e>0){n.textContent=S?S.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],M()),H.nextNode(),s.push({type:2,index:++i});n.append(t[e],M())}}}else if(8===n.nodeType)if(n.data===C)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(I,t+1));)s.push({type:7,index:i}),t+=I.length-1}i++}}static createElement(t,e){const r=P.createElement("template");return r.innerHTML=t,r}}function K(t,e,r=t,n){if(e===J)return e;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const a=U(e)?void 0:e._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(e=K(t,i._$AS(t,e.values),i,n)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??P).importNode(e,!0);H.currentNode=n;let i=H.nextNode(),a=0,o=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new Z(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new it(i,this,t)),this._$AV.push(e),s=r[++o]}a!==s?.index&&(i=H.nextNode(),a++)}return H.currentNode=P,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>R(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Y.createElement(q(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new Q(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new Y(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new Z(this.O(M()),this.O(M()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,i){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=W}_$AI(t,e=this,r,n){const i=this.strings;let a=!1;if(void 0===i)t=K(this,t,e,0),a=!U(t)||t!==this._$AH&&t!==J,a&&(this._$AH=t);else{const n=t;let o,s;for(t=i[0],o=0;o<i.length-1;o++)s=K(this,n[r+o],e,o),s===J&&(s=this._$AH[o]),a||=!U(s)||s!==this._$AH[o],s===W?t=W:t!==W&&(t+=(s??"")+i[o+1]),this._$AH[o]=s}a&&!n&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class rt extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class nt extends tt{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??W)===J)return;const r=this._$AH,n=t===W&&r!==W||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==W&&(r===W||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const at=x.litHtmlPolyfillSupport;at?.(Y,Z),(x.litHtmlVersions??=[]).push("3.3.1");const ot=globalThis;class st extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let i=n._$litPart$;if(void 0===i){const t=r?.renderBefore??null;n._$litPart$=i=new Z(e.insertBefore(M(),t),t,void 0,r??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}st._$litElement$=!0,st.finalized=!0,ot.litElementHydrateSupport?.({LitElement:st});const lt=ot.litElementPolyfillSupport;function ct(t,e,r,n){var i,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,r,o):i(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}lt?.({LitElement:st}),(ot.litElementVersions??=[]).push("4.2.1");let ut=null,ht=!1;var dt=function(t){return t.JSON="json",t.LOT="lot",t.JPG="jpg",t.PNG="png",t.SVG="svg",t}({});const ft=t=>new Promise(e=>setTimeout(e,t));let pt="idle";class mt extends st{src;wasmUrl;fileType="json";speed=1;autoPlay=!1;count;loop=!1;direction=1;mode="normal";intermission=1;totalFrame=0;currentFrame=0;currentState="loading";get size(){return Float32Array.from(this.TVG?.size()||[0,0])}TVG=null;canvas;config;_imageData;_beginTime=Date.now();_counter=1;_timer;_observer;_observable=!1;_assetResolverCallback;_assetResolverData;async _init(){if(ht)for(;!ut;)await ft(100);if(ut||(ht=!0,ut=await async function(t={}){var e,r=t,n=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,a=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(a){const{createRequire:t}=await Promise.resolve().then(function(){return wt});var o=t(import.meta.url)}var s,l,c=(t,e)=>{throw e},u=import.meta.url,h="";if(a){var d=o("fs");u.startsWith("file:")&&(h=o("path").dirname(o("url").fileURLToPath(u))+"/"),l=t=>(t=P(t)?new URL(t):t,d.readFileSync(t)),s=async t=>(t=P(t)?new URL(t):t,d.readFileSync(t,void 0)),process.argv.slice(2),c=(t,e)=>{throw process.exitCode=t,e}}else if(n||i){try{h=new URL(".",u).href}catch{}i&&(l=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=async t=>{if(P(t))return new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r(n.status)},n.onerror=r,n.send(null)});var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)}}var f,p,m,b,v,w,g,y,$,_,A,x,S,k,E,I=function(){}.bind(),C=function(){}.bind(),T=!1,P=t=>t.startsWith("file://"),M=!1;function U(){var t=sn.buffer;v=new Int8Array(t),g=new Int16Array(t),w=new Uint8Array(t),y=new Uint16Array(t),$=new Int32Array(t),_=new Uint32Array(t),A=new Float32Array(t),x=new Float64Array(t),S=new BigInt64Array(t),k=new BigUint64Array(t)}function R(t){throw r.onAbort?.(t),C(t="Aborted("+t+")"),T=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),b?.(t),t}class O{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var L=t=>{for(;0<t.length;)t.shift()(r)},N=[],F=[],V=()=>{var t=r.preRun.shift();F.push(t)},D=!0,j=new TextDecoder,B=(t,e,r,n)=>{if(r=e+r,n)return r;for(;t[e]&&!(e>=r);)++e;return e},z=(t,e,r)=>t?j.decode(w.subarray(t,B(w,t,e,r))):"",J=t=>{for(var e="";;){var r=w[t++];if(!r)return e;e+=String.fromCharCode(r)}},W={},G={},H={},q=class extends Error{constructor(t){super(t),this.name="BindingError"}},X=t=>{throw new q(t)};function Y(t,e,r={}){return function(t,e,r={}){var n=e.name;if(!t)throw new q(`type "${n}" must have a positive integer typeid pointer`);if(G.hasOwnProperty(t)){if(r.Gc)return;throw new q(`Cannot register type '${n}' twice`)}G[t]=e,delete H[t],W.hasOwnProperty(t)&&(e=W[t],delete W[t],e.forEach(t=>t()))}(t,e,r)}var K=(t,e,r)=>{switch(e){case 1:return r?t=>v[t]:t=>w[t];case 2:return r?t=>g[t>>1]:t=>y[t>>1];case 4:return r?t=>$[t>>2]:t=>_[t>>2];case 8:return r?t=>S[t>>3]:t=>k[t>>3];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Q=t=>{throw new q(t.Ja.Xa.Ua.name+" instance already deleted")},Z=!1,tt=()=>{},et=t=>globalThis.FinalizationRegistry?(Z=new FinalizationRegistry(t=>{--(t=t.Ja).count.value,0===t.count.value&&(t.ib?t.mb.zb(t.ib):t.Xa.Ua.zb(t.Va))}),et=t=>{var e=t.Ja;return e.ib&&Z.register(t,{Ja:e},t),t},tt=t=>{Z.unregister(t)},et(t)):(et=t=>t,t);function rt(){}var nt=(t,e)=>Object.defineProperty(e,"name",{value:t}),it={},at=(t,e,r)=>{if(void 0===t[e].hb){var n=t[e];t[e]=function(...n){if(!t[e].hb.hasOwnProperty(n.length))throw new q(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${t[e].hb})!`);return t[e].hb[n.length].apply(this,n)},t[e].hb=[],t[e].hb[n.Hb]=n}},ot=(t,e,n)=>{if(r.hasOwnProperty(t)){if(void 0===n||void 0!==r[t].hb&&void 0!==r[t].hb[n])throw new q(`Cannot register public name '${t}' twice`);if(at(r,t,t),r[t].hb.hasOwnProperty(n))throw new q(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[t].hb[n]=e}else r[t]=e,r[t].Hb=n};function st(t,e,r,n,i,a,o,s){this.name=t,this.constructor=e,this.Eb=r,this.zb=n,this.kb=i,this.Cc=a,this.Mb=o,this.zc=s,this.Mc=[]}var lt=(t,e,r)=>{for(;e!==r;){if(!e.Mb)throw new q(`Expected null or instance of ${r.name}, got an instance of ${e.name}`);t=e.Mb(t),e=e.kb}return t},ct=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t};function ut(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);return 0}if(!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua)}function ht(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);if(this.Pb){var r=this.Nc();return null!==t&&t.push(this.zb,r),r}return 0}if(!e||!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ob&&e.Ja.Xa.Ob)throw new q(`Cannot convert argument of type ${e.Ja.mb?e.Ja.mb.name:e.Ja.Xa.name} to parameter type ${this.name}`);if(r=lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua),this.Pb){if(void 0===e.Ja.ib)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.Pc){case 0:if(e.Ja.mb!==this)throw new q(`Cannot convert argument of type ${e.Ja.mb?e.Ja.mb.name:e.Ja.Xa.name} to parameter type ${this.name}`);r=e.Ja.ib;break;case 1:r=e.Ja.ib;break;case 2:if(e.Ja.mb===this)r=e.Ja.ib;else{var n=e.clone();r=this.Oc(r,Ot(()=>n.delete())),null!==t&&t.push(this.zb,r)}break;default:throw new q("Unsupporting sharing policy")}}return r}function dt(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);return 0}if(!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.Ja.Xa.Ob)throw new q(`Cannot convert argument of type ${e.Ja.Xa.name} to parameter type ${this.name}`);return lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua)}function ft(t){return this.jb(_[t>>2])}var pt=(t,e,r)=>e===r?t:void 0===r.kb||null===(t=pt(t,e,r.kb))?null:r.zc(t),mt={},bt=class extends Error{constructor(t){super(t),this.name="InternalError"}},vt=(t,e)=>{if(!e.Xa||!e.Va)throw new bt("makeClassHandle requires ptr and ptrType");if(!!e.mb!=!!e.ib)throw new bt("Both smartPtrType and smartPtr must be specified");return e.count={value:1},et(Object.create(t,{Ja:{value:e,writable:!0}}))};function gt(t,e,r,n,i,a,o,s,l,c,u){this.name=t,this.Ua=e,this.Wb=r,this.Ob=n,this.Pb=i,this.Lc=a,this.Pc=o,this.pc=s,this.Nc=l,this.Oc=c,this.zb=u,i||void 0!==e.kb?this.nb=ht:(this.nb=n?ut:dt,this.ob=null)}var yt=(t,e,n)=>{if(!r.hasOwnProperty(t))throw new bt("Replacing nonexistent public symbol");void 0!==r[t].hb&&void 0!==n?r[t].hb[n]=e:(r[t]=e,r[t].Hb=n)},$t=(t,e)=>{t=J(t);var r=ln.get(e);if("function"!=typeof r)throw new q(`unknown function pointer with signature ${t}: ${e}`);return r};class _t extends Error{}var At=t=>{t=Vr(t);var e=J(t);return Nr(t),e},xt=(t,e)=>{var r=[],n={};throw e.forEach(function t(e){n[e]||G[e]||(H[e]?H[e].forEach(t):(r.push(e),n[e]=!0))}),new _t(`${t}: `+r.map(At).join([", "]))},St=(t,e,r)=>{function n(e){if((e=r(e)).length!==t.length)throw new bt("Mismatched type converter count");for(var n=0;n<t.length;++n)Y(t[n],e[n])}t.forEach(t=>H[t]=e);var i=Array(e.length),a=[],o=0;for(let[t,r]of e.entries())G.hasOwnProperty(r)?i[t]=G[r]:(a.push(r),W.hasOwnProperty(r)||(W[r]=[]),W[r].push(()=>{i[t]=G[r],++o===a.length&&n(i)}));0===a.length&&n(i)},kt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+4*n>>2]);return r},Et=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function It(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].ob)return!0;return!1}function Ct(t,e,r,n,i,a){var o=e.length;if(2>o)throw new q("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==e[1]&&null!==r,l=It(e);r=!e[0].nc;var c=e[0],u=e[1];for(n=[t,X,n,i,Et,c.jb.bind(c),u?.nb.bind(u)],i=2;i<o;++i)n.push((c=e[i]).nb.bind(c));if(!l)for(i=s?1:2;i<e.length;++i)null!==e[i].ob&&n.push(e[i].ob);for(l=It(e),i=e.length-2,u=[],c=["fn"],s&&c.push("thisWired"),o=0;o<i;++o)u.push(`arg${o}`),c.push(`arg${o}Wired`);u=u.join(","),c=c.join(","),u=`return function (${u}) {\n`,l&&(u+="var destructors = [];\n");var h=l?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(s&&(u+=`var thisWired = toClassParamWire(${h}, this);\n`),o=0;o<i;++o){var f=`toArg${o}Wire`;u+=`var arg${o}Wired = ${f}(${h}, arg${o});\n`,d.push(f)}if(u+=(r||a?"var rv = ":"")+`invoker(${c});\n`,l)u+="runDestructors(destructors);\n";else for(o=s?1:2;o<e.length;++o)a=1===o?"thisWired":"arg"+(o-2)+"Wired",null!==e[o].ob&&(u+=`${a}_dtor(${a});\n`,d.push(`${a}_dtor`));return r&&(u+="var ret = fromRetWire(rv);\nreturn ret;\n"),e=new Function(d,u+"}\n")(...n),nt(t,e)}var Tt=t=>{const e=(t=t.trim()).indexOf("(");return-1===e?t:t.slice(0,e)},Pt=[],Mt=[0,1,,1,null,1,!0,1,!1,1],Ut=t=>{9<t&&0===--Mt[t+1]&&(Mt[t]=void 0,Pt.push(t))},Rt=t=>{if(!t)throw new q(`Cannot use deleted val. handle = ${t}`);return Mt[t]},Ot=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const e=Pt.pop()||Mt.length;return Mt[e]=t,Mt[e+1]=1,e}},Lt={name:"emscripten::val",jb:t=>{var e=Rt(t);return Ut(t),e},nb:(t,e)=>Ot(e),xb:ft,ob:null},Nt=(t,e)=>{switch(e){case 4:return function(t){return this.jb(A[t>>2])};case 8:return function(t){return this.jb(x[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Ft=(t,e,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var a=0;a<t.length;++a){var o=t.codePointAt(a);if(127>=o){if(r>=n)break;e[r++]=o}else if(2047>=o){if(r+1>=n)break;e[r++]=192|o>>6,e[r++]=128|63&o}else if(65535>=o){if(r+2>=n)break;e[r++]=224|o>>12,e[r++]=128|o>>6&63,e[r++]=128|63&o}else{if(r+3>=n)break;e[r++]=240|o>>18,e[r++]=128|o>>12&63,e[r++]=128|o>>6&63,e[r++]=128|63&o,a++}}return e[r]=0,r-i},Vt=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);127>=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}return e},Dt=new TextDecoder("utf-16le"),jt=(t,e,r)=>Dt.decode(y.subarray(t>>=1,B(y,t,e/2,r))),Bt=(t,e,r)=>{if(r??=2147483647,2>r)return 0;var n=e;r=(r-=2)<2*t.length?r/2:t.length;for(var i=0;i<r;++i)g[e>>1]=t.charCodeAt(i),e+=2;return g[e>>1]=0,e-n},zt=t=>2*t.length,Jt=(t,e,r)=>{var n="";t>>=2;for(var i=0;!(i>=e/4);i++){var a=_[t+i];if(!a&&!r)break;n+=String.fromCodePoint(a)}return n},Wt=(t,e,r)=>{if(r??=2147483647,4>r)return 0;var n=e;r=n+r-4;for(var i=0;i<t.length;++i){var a=t.codePointAt(i);if(65535<a&&i++,$[e>>2]=a,(e+=4)+4>r)break}return $[e>>2]=0,e-n},Gt=t=>{for(var e=0,r=0;r<t.length;++r)65535<t.codePointAt(r)&&r++,e+=4;return e},Ht=0,qt=[],Xt=(t,e,r)=>{var n=[];return t=t(n,r),n.length&&(_[e>>2]=Ot(n)),t},Yt={},Kt=t=>{var e=Yt[t];return void 0===e?J(t):e},Qt={},Zt=t=>{p=t,D||0<Ht||(r.onExit?.(t),T=!0),c(t,new O(t))},te=t=>{if(!T)try{if(t(),!(D||0<Ht))try{p=t=p,Zt(t)}catch(t){t instanceof O||"unwind"==t||c(1,t)}}catch(t){t instanceof O||"unwind"==t||c(1,t)}},ee=t=>{var e=Vt(t)+1,r=an(e);return Ft(t,w,r,e),r},re=[],ne=[],ie=t=>{if(t)return re[t>>>0]},ae=t=>z(_[t>>2],_[t+4>>2]),oe=t=>{var e=_[t>>2];return t=_[t+4>>2],e?z(e,t):0===t?"":void 0},se=t=>({width:_[t>>2],height:_[t+4>>2],depthOrArrayLayers:_[t+8>>2]}),le=t=>{var e=t+8;return{texture:ie(_[t>>2]),mipLevel:_[t+4>>2],origin:{x:_[e>>2],y:_[e+4>>2],z:_[e+8>>2]},aspect:Me[_[t+20>>2]]}},ce=(t,e)=>{if(t){for(var r={},n=0;n<t;++n){var i=e+24*n;r[ae(i+4)]=x[i+16>>3]}return r}},ue=t=>t?ie(t):"auto",he=[,"clamp-to-edge","repeat","mirror-repeat"],de=[,"zero","one","src","one-minus-src","src-alpha","one-minus-src-alpha","dst","one-minus-dst","dst-alpha","one-minus-dst-alpha","src-alpha-saturated","constant","one-minus-constant","src1","one-minus-src1","src1alpha","one-minus-src1alpha"],fe=[,"add","subtract","reverse-subtract","min","max"],pe=["binding-not-used",,"uniform","storage","read-only-storage"],me=[,"never","less","equal","less-equal","greater","not-equal","greater-equal","always"],be=[,"opaque","premultiplied","unpremultiplied","inherit"],ve=[,"none","front","back"],we=[,"compatibility","core"],ge={1:"core-features-and-limits",2:"depth-clip-control",3:"depth32float-stencil8",4:"texture-compression-bc",5:"texture-compression-bc-sliced-3d",6:"texture-compression-etc2",7:"texture-compression-astc",8:"texture-compression-astc-sliced-3d",9:"timestamp-query",10:"indirect-first-instance",11:"shader-f16",12:"rg11b10ufloat-renderable",13:"bgra8unorm-storage",14:"float32-filterable",15:"float32-blendable",16:"clip-distances",17:"dual-source-blending",18:"subgroups",19:"texture-formats-tier1",20:"texture-formats-tier2",21:"primitive-index",327692:"chromium-experimental-unorm16-texture-formats",327693:"chromium-experimental-snorm16-texture-formats",327732:"chromium-experimental-multi-draw-indirect"},ye=[,"nearest","linear"],$e=[,"ccw","cw"],_e=[,"uint16","uint32"],Ae=[,"load","clear"],xe=[,"nearest","linear"],Se=[,"low-power","high-performance"],ke=[,"srgb","display-p3"],Ee=[,"point-list","line-list","line-strip","triangle-list","triangle-strip"],Ie=["binding-not-used",,"filtering","non-filtering","comparison"],Ce=[,"keep","zero","replace","invert","increment-clamp","decrement-clamp","increment-wrap","decrement-wrap"],Te=["binding-not-used",,"write-only","read-only","read-write"],Pe=[,"store","discard"],Me=[,"all","stencil-only","depth-only"],Ue=[,"1d","2d","3d"],Re=[,"r8unorm","r8snorm","r8uint","r8sint","r16unorm","r16snorm","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32float","r32uint","r32sint","rg16unorm","rg16snorm","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb10a2uint","rgb10a2unorm","rg11b10ufloat","rgb9e5ufloat","rg32float","rg32uint","rg32sint","rgba16unorm","rgba16snorm","rgba16uint","rgba16sint","rgba16float","rgba32float","rgba32uint","rgba32sint","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8","bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb","etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm","astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"],Oe=["binding-not-used",,"float","unfilterable-float","depth","sint","uint"],Le=[,"1d","2d","2d-array","cube","cube-array","3d"],Ne=[,"standard","extended"],Fe=[,"uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10-10-10-2","unorm8x4-bgra"],Ve=[,"vertex","instance"],De={undefined:1,unknown:1,destroyed:2},je=t=>-9007199254740992>t||9007199254740992<t?NaN:Number(t),Be=(t,e)=>{for(var r=0,n=t.length-1;0<=n;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},ze=t=>{var e="/"===t.charAt(0),r="/"===t.slice(-1);return(t=Be(t.split("/").filter(t=>!!t),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},Je=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],t||e?(e&&=e.slice(0,-1),t+e):"."},We=t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],Ge=t=>{(Ge=(()=>{if(a){var t=o("crypto");return e=>t.randomFillSync(e)}return t=>crypto.getRandomValues(t)})())(t)},He=(...t)=>{for(var e="",r=!1,n=t.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?t[n]:Or.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r="/"===r.charAt(0)}return e=Be(e.split("/").filter(t=>!!t),!r).join("/"),(r?"/":"")+e||"."},qe=(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;0<=r&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=He(t).slice(1),e=He(e).slice(1),t=r(t.split("/")),e=r(e.split("/"));for(var n=Math.min(t.length,e.length),i=n,a=0;a<n;a++)if(t[a]!==e[a]){i=a;break}for(n=[],a=i;a<t.length;a++)n.push("..");return(n=n.concat(e.slice(i))).join("/")},Xe=t=>{var e=B(t,0);return j.decode(t.buffer?t.subarray(0,e):new Uint8Array(t.slice(0,e)))},Ye=[],Ke=t=>{var e=Array(Vt(t)+1);return t=Ft(t,e,0,e.length),e.length=t,e},Qe=[];function Ze(t,e){Qe[t]={input:[],output:[],Gb:e},dr(t,tr)}var tr={open(t){var e=Qe[t.node.rdev];if(!e)throw new Or.Ia(43);t.tty=e,t.seekable=!1},close(t){t.tty.Gb.fsync(t.tty)},fsync(t){t.tty.Gb.fsync(t.tty)},read(t,e,r,n){if(!t.tty||!t.tty.Gb.kc)throw new Or.Ia(60);for(var i=0,a=0;a<n;a++){try{var o=t.tty.Gb.kc(t.tty)}catch(t){throw new Or.Ia(29)}if(void 0===o&&0===i)throw new Or.Ia(6);if(null==o)break;i++,e[r+a]=o}return i&&(t.node.atime=Date.now()),i},write(t,e,r,n){if(!t.tty||!t.tty.Gb.$b)throw new Or.Ia(60);try{for(var i=0;i<n;i++)t.tty.Gb.$b(t.tty,e[r+i])}catch(t){throw new Or.Ia(29)}return n&&(t.node.mtime=t.node.ctime=Date.now()),i}},er={kc(){t:{if(!Ye.length){var t=null;if(a){var e=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=d.readSync(n,e,0,256)}catch(t){if(!t.toString().includes("EOF"))throw t;r=0}0<r&&(t=e.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(t=window.prompt("Input: "))&&(t+="\n");if(!t){t=null;break t}Ye=Ke(t)}t=Ye.shift()}return t},$b(t,e){null===e||10===e?(I(Xe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(I(Xe(t.output)),t.output=[])},ld:()=>({Xc:25856,Zc:5,Wc:191,Yc:35387,Vc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),md:()=>0,nd:()=>[24,80]},rr={$b(t,e){null===e||10===e?(C(Xe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(C(Xe(t.output)),t.output=[])}},nr={tb:null,Wa:()=>nr.createNode(null,"/",16895,0),createNode(t,e,r,n){if(24576==(61440&r)||Or.isFIFO(r))throw new Or.Ia(63);return nr.tb||(nr.tb={dir:{node:{qb:nr.La.qb,sb:nr.La.sb,lookup:nr.La.lookup,vb:nr.La.vb,rename:nr.La.rename,unlink:nr.La.unlink,rmdir:nr.La.rmdir,readdir:nr.La.readdir,symlink:nr.La.symlink},stream:{lb:nr.Ma.lb}},file:{node:{qb:nr.La.qb,sb:nr.La.sb},stream:{lb:nr.Ma.lb,read:nr.Ma.read,write:nr.Ma.write,Fb:nr.Ma.Fb,Kb:nr.Ma.Kb}},link:{node:{qb:nr.La.qb,sb:nr.La.sb,readlink:nr.La.readlink},stream:{}},ec:{node:{qb:nr.La.qb,sb:nr.La.sb},stream:Or.xc}}),fr((r=Or.createNode(t,e,r,n)).mode)?(r.La=nr.tb.dir.node,r.Ma=nr.tb.dir.stream,r.Na={}):Or.isFile(r.mode)?(r.La=nr.tb.file.node,r.Ma=nr.tb.file.stream,r.Ya=0,r.Na=null):40960==(61440&r.mode)?(r.La=nr.tb.link.node,r.Ma=nr.tb.link.stream):8192==(61440&r.mode)&&(r.La=nr.tb.ec.node,r.Ma=nr.tb.ec.stream),r.atime=r.mtime=r.ctime=Date.now(),t&&(t.Na[e]=r,t.atime=t.mtime=t.ctime=r.atime),r},kd:t=>t.Na?t.Na.subarray?t.Na.subarray(0,t.Ya):new Uint8Array(t.Na):new Uint8Array(0),La:{qb(t){var e={};return e.dev=8192==(61440&t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,e.size=fr(t.mode)?4096:Or.isFile(t.mode)?t.Ya:40960==(61440&t.mode)?t.link.length:0,e.atime=new Date(t.atime),e.mtime=new Date(t.mtime),e.ctime=new Date(t.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},sb(t,e){for(var r of["mode","atime","mtime","ctime"])null!=e[r]&&(t[r]=e[r]);void 0!==e.size&&t.Ya!=(e=e.size)&&(0==e?(t.Na=null,t.Ya=0):(r=t.Na,t.Na=new Uint8Array(e),r&&t.Na.set(r.subarray(0,Math.min(e,t.Ya))),t.Ya=e))},lookup(){throw nr.Tb||(nr.Tb=new Or.Ia(44),nr.Tb.stack="<generic error, no stack>"),nr.Tb},vb:(t,e,r,n)=>nr.createNode(t,e,r,n),rename(t,e,r){try{var n=pr(e,r)}catch(t){}if(n){if(fr(t.mode))for(var i in n.Na)throw new Or.Ia(55);mr(n)}delete t.parent.Na[t.name],e.Na[r]=t,t.name=r,e.ctime=e.mtime=t.parent.ctime=t.parent.mtime=Date.now()},unlink(t,e){delete t.Na[e],t.ctime=t.mtime=Date.now()},rmdir(t,e){var r,n=pr(t,e);for(r in n.Na)throw new Or.Ia(55);delete t.Na[e],t.ctime=t.mtime=Date.now()},readdir:t=>[".","..",...Object.keys(t.Na)],symlink:(t,e,r)=>((t=nr.createNode(t,e,41471,0)).link=r,t),readlink(t){if(40960!=(61440&t.mode))throw new Or.Ia(28);return t.link}},Ma:{read(t,e,r,n,i){var a=t.node.Na;if(i>=t.node.Ya)return 0;if(8<(t=Math.min(t.node.Ya-i,n))&&a.subarray)e.set(a.subarray(i,i+t),r);else for(n=0;n<t;n++)e[r+n]=a[i+n];return t},write(t,e,r,n,i,a){if(e.buffer===v.buffer&&(a=!1),!n)return 0;if((t=t.node).mtime=t.ctime=Date.now(),e.subarray&&(!t.Na||t.Na.subarray)){if(a)return t.Na=e.subarray(r,r+n),t.Ya=n;if(0===t.Ya&&0===i)return t.Na=e.slice(r,r+n),t.Ya=n;if(i+n<=t.Ya)return t.Na.set(e.subarray(r,r+n),i),n}var o=t.Na?t.Na.length:0;if(o>=(a=i+n)||(a=Math.max(a,o*(1048576>o?2:1.125)>>>0),0!=o&&(a=Math.max(a,256)),o=t.Na,t.Na=new Uint8Array(a),0<t.Ya&&t.Na.set(o.subarray(0,t.Ya),0)),t.Na.subarray&&e.subarray)t.Na.set(e.subarray(r,r+n),i);else for(a=0;a<n;a++)t.Na[i+a]=e[r+a];return t.Ya=Math.max(t.Ya,i+n),n},lb(t,e,r){if(1===r?e+=t.position:2===r&&Or.isFile(t.node.mode)&&(e+=t.node.Ya),0>e)throw new Or.Ia(28);return e},Fb(t,e,r,n,i){if(!Or.isFile(t.node.mode))throw new Or.Ia(43);if(t=t.node.Na,2&i||!t||t.buffer!==v.buffer){if(n=!0,R(),!(i=void 0))throw new Or.Ia(48);t&&((0<r||r+e<t.length)&&(t=t.subarray?t.subarray(r,r+e):Array.prototype.slice.call(t,r,r+e)),v.set(t,i))}else n=!1,i=t.byteOffset;return{Va:i,Rc:n}},Kb:(t,e,r,n)=>(nr.Ma.write(t,e,0,n,r,!1),0)}},ir=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},ar=0,or=null,sr=()=>{if(ar--,r.monitorRunDependencies?.(ar),0==ar&&or){var t=or;or=null,t()}},lr=()=>{ar++,r.monitorRunDependencies?.(ar)},cr=[],ur=async(t,e,r,n,i,a,o,l)=>{var c=e?He(ze(t+"/"+e)):t;lr();try{var u=r;"string"==typeof r&&(u=await(async t=>(t=await s(t),new Uint8Array(t)))(r)),u=await(async(t,e)=>{for(var r of("undefined"!=typeof Browser&&hr(),cr))if(r.canHandle(e))return r.handle(t,e);return t})(u,c),l?.(),a||br(t,e,u,n,i,o)}finally{sr()}};function hr(){var t,e,n;Or.Vb=!0,t??=r.stdin,e??=r.stdout,n??=r.stderr,t?Or.yb("/dev","stdin",t):Or.symlink("/dev/tty","/dev/stdin"),e?Or.yb("/dev","stdout",null,e):Or.symlink("/dev/tty","/dev/stdout"),n?Or.yb("/dev","stderr",null,n):Or.symlink("/dev/tty1","/dev/stderr"),Or.open("/dev/stdin",0),Or.open("/dev/stdout",1),Or.open("/dev/stderr",1)}function dr(t,e){Or.ic[t]={Ma:e}}function fr(t){return 16384==(61440&t)}function pr(t,e){var r=fr(t.mode)?(r=_r(t,"x"))?r:t.La.lookup?0:2:54;if(r)throw new Or.Ia(r);for(r=Or.wb[gr(t.id,e)];r;r=r.Db)if(r.parent.id===t.id&&r.name===e)return r;return Or.lookup(t,e)}function mr(t){var e=gr(t.parent.id,t.name);if(Or.wb[e]===t)Or.wb[e]=t.Db;else for(e=Or.wb[e];e;){if(e.Db===t){e.Db=t.Db;break}e=e.Db}}function br(t,e,r,n,i,a){var o=e;if(t&&(t="string"==typeof t?t:wr(t),o=e?ze(t+"/"+e):t),t=ir(n,i),o=Or.create(o,t),r){if("string"==typeof r){for(e=Array(r.length),n=0,i=r.length;n<i;++n)e[n]=r.charCodeAt(n);r=e}Or.chmod(o,146|t),e=Or.open(o,577),Or.write(e,r,0,r.length,0,a),Or.close(e),Or.chmod(o,t)}}function vr(t,e={}){if(!t)throw new Or.Ia(44);e.Nb??(e.Nb=!0),"/"===t.charAt(0)||(t=Or.cwd()+"/"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(t=>!!t);for(var n=Or.root,i="/",a=0;a<t.length;a++){var o=a===t.length-1;if(o&&e.parent)break;if("."!==t[a])if(".."===t[a]){if(i=Je(i),Or.Xb(n)){t=i+"/"+t.slice(a+1).join("/"),r--;continue t}n=n.parent}else{i=ze(i+"/"+t[a]);try{n=pr(n,t[a])}catch(t){if(44===t?.Bb&&o&&e.Jc)return{path:i};throw t}if(!n.rb||o&&!e.Nb||(n=n.rb.root),40960==(61440&n.mode)&&(!o||e.pb)){if(!n.La.readlink)throw new Or.Ia(52);"/"===(n=n.La.readlink(n)).charAt(0)||(n=Je(i)+"/"+n),t=n+"/"+t.slice(a+1).join("/");continue t}}}return{path:i,node:n}}throw new Or.Ia(32)}function wr(t){for(var e;;){if(Or.Xb(t))return t=t.Wa.oc,e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t;e=e?`${t.name}/${e}`:t.name,t=t.parent}}function gr(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%Or.wb.length}function yr(t){var e=gr(t.parent.id,t.name);t.Db=Or.wb[e],Or.wb[e]=t}function $r(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e}function _r(t,e){return Or.lc?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2}function Ar(t,e){if(!fr(t.mode))return 54;try{return pr(t,e),20}catch(t){}return _r(t,"wx")}function xr(t,e,r){try{var n=pr(t,e)}catch(t){return t.Bb}if(t=_r(t,"wx"))return t;if(r){if(!fr(n.mode))return 54;if(Or.Xb(n)||wr(n)===Or.cwd())return 10}else if(fr(n.mode))return 31;return 0}function Sr(t,e){if(!t)throw new Or.Ia(e);return t}function kr(t){if(!(t=Or.Fc(t)))throw new Or.Ia(8);return t}function Er(t,e=-1){if(t=Object.assign(new Or.uc,t),-1==e)t:{for(e=0;e<=Or.vc;e++)if(!Or.streams[e])break t;throw new Or.Ia(33)}return t.fd=e,Or.streams[e]=t}function Ir(t,e,r){var n=t?.Ma.sb;t=n?t:e,n??=e.La.sb,Sr(n,63),n(t,r)}function Cr(t){var e=[];for(t=[t];t.length;){var r=t.pop();e.push(r),t.push(...r.Jb)}return e}function Tr(t){var e={Uc:4096,gd:4096,blocks:1e6,Tc:5e5,Sc:5e5,files:Or.Zb,dd:Or.Zb-1,hd:42,flags:2,qd:255};return t.La.rc&&Object.assign(e,t.La.rc(t.Wa.Kc.root)),e}function Pr(t,e,r){return void 0===r&&(r=e,e=438),Or.vb(t,8192|e,r)}function Mr(t,e,r,n){Ir(t,e,{mode:4095&r|-4096&e.mode,ctime:Date.now(),jc:n})}function Ur(t,e,r){if(fr(e.mode))throw new Or.Ia(31);if(!Or.isFile(e.mode))throw new Or.Ia(28);var n=_r(e,"w");if(n)throw new Or.Ia(n);Ir(t,e,{size:r,timestamp:Date.now()})}function Rr(t){if(!(t.Hc||t.Ic||t.link||t.Na))if(globalThis.XMLHttpRequest)R("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{t.Na=l(t.url)}catch(t){throw new Or.Ia(29)}}var Or={root:null,Jb:[],ic:{},streams:[],Zb:1,wb:null,fc:"/",Vb:!1,lc:!0,Bc:null,Qb:0,qc:{},Ia:class{name="ErrnoError";constructor(t){this.Bb=t}},uc:class{ub={};node=null;get object(){return this.node}set object(t){this.node=t}get flags(){return this.ub.flags}set flags(t){this.ub.flags=t}get position(){return this.ub.position}set position(t){this.ub.position=t}},tc:class{La={};Ma={};rb=null;constructor(t,e,r,n){t||=this,this.parent=t,this.Wa=t.Wa,this.id=Or.Zb++,this.name=e,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(t){t?this.mode|=146:this.mode&=-147}get Ic(){return fr(this.mode)}get Hc(){return 8192==(61440&this.mode)}},createNode:(t,e,r,n)=>(yr(t=new Or.tc(t,e,r,n)),t),Xb:t=>t===t.parent,isFile:t=>32768==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>!(49152&~t),vc:4096,Fc:t=>Or.streams[t],cd:(t,e=-1)=>(t=Er(t,e),t.Ma?.bd?.(t),t),xc:{open(t){t.Ma=Or.Dc(t.node.rdev).Ma,t.Ma.open?.(t)},lb(){throw new Or.Ia(70)}},Yb:t=>t>>8,od:t=>255&t,Cb:(t,e)=>t<<8|e,Dc:t=>Or.ic[t],sc(t,e){function r(t){return Or.Qb--,e(t)}function n(t){if(t){if(!n.Ac)return n.Ac=!0,r(t)}else++o>=a.length&&r(null)}"function"==typeof t&&(e=t,t=!1),Or.Qb++,1<Or.Qb&&C(`warning: ${Or.Qb} FS.syncfs operations in flight at once, probably just doing extra work`);var i,a=Cr(Or.root.Wa),o=0;for(i of a)i.type.sc?i.type.sc(i,t,n):n(null)},Wa(t,e,r){var n="/"===r;if(n&&Or.root)throw new Or.Ia(10);if(!n&&r){var i=vr(r,{Nb:!1});if(r=i.path,(i=i.node).rb)throw new Or.Ia(10);if(!fr(i.mode))throw new Or.Ia(54)}return(t=t.Wa(e={type:t,Kc:e,oc:r,Jb:[]})).Wa=e,e.root=t,n?Or.root=t:i&&(i.rb=e,i.Wa&&i.Wa.Jb.push(e)),t},xd(t){if(!(t=vr(t,{Nb:!1})).node.rb)throw new Or.Ia(28);var e=(t=t.node).rb,r=Cr(e);for([,i]of Object.entries(Or.wb))for(;i;){var n=i.Db;r.includes(i.Wa)&&mr(i);var i=n}t.rb=null,t.Wa.Jb.splice(t.Wa.Jb.indexOf(e),1)},lookup:(t,e)=>t.La.lookup(t,e),vb(t,e,r){var n=vr(t,{parent:!0}).node;if(!(t=We(t)))throw new Or.Ia(28);if("."===t||".."===t)throw new Or.Ia(20);var i=Ar(n,t);if(i)throw new Or.Ia(i);if(!n.La.vb)throw new Or.Ia(63);return n.La.vb(n,t,e,r)},rc:t=>Tr(vr(t,{pb:!0}).node),td:t=>Tr(t.node),create:(t,e=438)=>Or.vb(t,4095&e|32768,0),mkdir:(t,e=511)=>Or.vb(t,1023&e|16384,0),pd(t,e){var r,n=t.split("/"),i="";for(r of n)if(r){(i||"/"===t.charAt(0))&&(i+="/"),i+=r;try{Or.mkdir(i,e)}catch(t){if(20!=t.Bb)throw t}}},symlink(t,e){if(!He(t))throw new Or.Ia(44);var r=vr(e,{parent:!0}).node;if(!r)throw new Or.Ia(44);var n=Ar(r,e=We(e));if(n)throw new Or.Ia(n);if(!r.La.symlink)throw new Or.Ia(63);return r.La.symlink(r,e,t)},rename(t,e){var r=Je(t),n=Je(e),i=We(t),a=We(e),o=vr(t,{parent:!0}),s=o.node;if(o=(o=vr(e,{parent:!0})).node,!s||!o)throw new Or.Ia(44);if(s.Wa!==o.Wa)throw new Or.Ia(75);var l=pr(s,i);if("."!==(t=qe(t,n)).charAt(0))throw new Or.Ia(28);if("."!==(t=qe(e,r)).charAt(0))throw new Or.Ia(55);try{var c=pr(o,a)}catch(t){}if(l!==c){if(i=xr(s,i,e=fr(l.mode)))throw new Or.Ia(i);if(i=c?xr(o,a,e):Ar(o,a))throw new Or.Ia(i);if(!s.La.rename)throw new Or.Ia(63);if(l.rb||c&&c.rb)throw new Or.Ia(10);if(o!==s&&(i=_r(s,"w")))throw new Or.Ia(i);mr(l);try{s.La.rename(l,o,a),l.parent=o}catch(t){throw t}finally{yr(l)}}},rmdir(t){var e=vr(t,{parent:!0}).node,r=pr(e,t=We(t)),n=xr(e,t,!0);if(n)throw new Or.Ia(n);if(!e.La.rmdir)throw new Or.Ia(63);if(r.rb)throw new Or.Ia(10);e.La.rmdir(e,t),mr(r)},readdir:t=>Sr((t=vr(t,{pb:!0}).node).La.readdir,54)(t),unlink(t){var e=vr(t,{parent:!0}).node;if(!e)throw new Or.Ia(44);var r=pr(e,t=We(t)),n=xr(e,t,!1);if(n)throw new Or.Ia(n);if(!e.La.unlink)throw new Or.Ia(63);if(r.rb)throw new Or.Ia(10);e.La.unlink(e,t),mr(r)},readlink(t){if(!(t=vr(t).node))throw new Or.Ia(44);if(!t.La.readlink)throw new Or.Ia(28);return t.La.readlink(t)},stat:(t,e)=>Sr((t=vr(t,{pb:!e}).node).La.qb,63)(t),fstat(t){var e=kr(t);t=e.node;var r=e.Ma.qb;return e=r?e:t,r??=t.La.qb,Sr(r,63),r(e)},lstat:t=>Or.stat(t,!0),chmod(t,e,r){Mr(null,t="string"==typeof t?vr(t,{pb:!r}).node:t,e,r)},lchmod(t,e){Or.chmod(t,e,!0)},fchmod(t,e){Mr(t=kr(t),t.node,e,!1)},chown(t,e,r,n){Ir(null,t="string"==typeof t?vr(t,{pb:!n}).node:t,{timestamp:Date.now(),jc:n})},lchown(t,e,r){Or.chown(t,e,r,!0)},fchown(t){Ir(t=kr(t),t.node,{timestamp:Date.now(),jc:!1})},truncate(t,e){if(0>e)throw new Or.Ia(28);Ur(null,t="string"==typeof t?vr(t,{pb:!0}).node:t,e)},jd(t,e){if(t=kr(t),0>e||!(2097155&t.flags))throw new Or.Ia(28);Ur(t,t.node,e)},yd(t,e,r){Sr((t=vr(t,{pb:!0}).node).La.sb,63)(t,{atime:e,mtime:r})},open(t,e,n=438){if(""===t)throw new Or.Ia(44);if("string"==typeof e){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===i)throw Error(`Unknown file open mode: ${e}`);e=i}if(n=64&e?4095&n|32768:0,"object"==typeof t)i=t;else{var a=t.endsWith("/");i=(t=vr(t,{pb:!(131072&e),Jc:!0})).node,t=t.path}var o=!1;if(64&e)if(i){if(128&e)throw new Or.Ia(20)}else{if(a)throw new Or.Ia(31);i=Or.vb(t,511|n,0),o=!0}if(!i)throw new Or.Ia(44);if(8192==(61440&i.mode)&&(e&=-513),65536&e&&!fr(i.mode))throw new Or.Ia(54);if(!o&&(a=i?40960==(61440&i.mode)?32:fr(i.mode)&&("r"!==$r(e)||576&e)?31:_r(i,$r(e)):44))throw new Or.Ia(a);return 512&e&&!o&&Or.truncate(i,0),e&=-131713,(a=Er({node:i,path:wr(i),flags:e,seekable:!0,position:0,Ma:i.Ma,Qc:[],error:!1})).Ma.open&&a.Ma.open(a),o&&Or.chmod(i,511&n),!r.logReadFiles||1&e||t in Or.qc||(Or.qc[t]=1),a},close(t){if(null===t.fd)throw new Or.Ia(8);t.Ub&&(t.Ub=null);try{t.Ma.close&&t.Ma.close(t)}catch(t){throw t}finally{Or.streams[t.fd]=null}t.fd=null},lb(t,e,r){if(null===t.fd)throw new Or.Ia(8);if(!t.seekable||!t.Ma.lb)throw new Or.Ia(70);if(0!=r&&1!=r&&2!=r)throw new Or.Ia(28);return t.position=t.Ma.lb(t,e,r),t.Qc=[],t.position},read(t,e,r,n,i){if(0>n||0>i)throw new Or.Ia(28);if(null===t.fd)throw new Or.Ia(8);if(1==(2097155&t.flags))throw new Or.Ia(8);if(fr(t.node.mode))throw new Or.Ia(31);if(!t.Ma.read)throw new Or.Ia(28);var a=void 0!==i;if(a){if(!t.seekable)throw new Or.Ia(70)}else i=t.position;return e=t.Ma.read(t,e,r,n,i),a||(t.position+=e),e},write(t,e,r,n,i,a){if(0>n||0>i)throw new Or.Ia(28);if(null===t.fd)throw new Or.Ia(8);if(!(2097155&t.flags))throw new Or.Ia(8);if(fr(t.node.mode))throw new Or.Ia(31);if(!t.Ma.write)throw new Or.Ia(28);t.seekable&&1024&t.flags&&Or.lb(t,0,2);var o=void 0!==i;if(o){if(!t.seekable)throw new Or.Ia(70)}else i=t.position;return e=t.Ma.write(t,e,r,n,i,a),o||(t.position+=e),e},Fb(t,e,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&t.flags))throw new Or.Ia(2);if(1==(2097155&t.flags))throw new Or.Ia(2);if(!t.Ma.Fb)throw new Or.Ia(43);if(!e)throw new Or.Ia(28);return t.Ma.Fb(t,e,r,n,i)},Kb:(t,e,r,n,i)=>t.Ma.Kb?t.Ma.Kb(t,e,r,n,i):0,mc(t,e,r){if(!t.Ma.mc)throw new Or.Ia(59);return t.Ma.mc(t,e,r)},readFile(t,e={}){e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding&&R(`Invalid encoding type "${e.encoding}"`);var r=Or.open(t,e.flags);t=Or.stat(t).size;var n=new Uint8Array(t);return Or.read(r,n,0,t,0),"utf8"===e.encoding&&(n=Xe(n)),Or.close(r),n},writeFile(t,e,r={}){r.flags=r.flags||577,t=Or.open(t,r.flags,r.mode),"string"==typeof e&&(e=new Uint8Array(Ke(e))),ArrayBuffer.isView(e)?Or.write(t,e,0,e.byteLength,void 0,r.$c):R("Unsupported data type"),Or.close(t)},cwd:()=>Or.fc,chdir(t){if(null===(t=vr(t,{pb:!0})).node)throw new Or.Ia(44);if(!fr(t.node.mode))throw new Or.Ia(54);var e=_r(t.node,"x");if(e)throw new Or.Ia(e);Or.fc=t.path},sd(){for(var t of(Or.Vb=!1,Or.streams))t&&Or.close(t)},ed(t,e){try{var r=vr(t,{pb:!e});t=r.path}catch(t){}var n=!1,i=null;try{r=vr(t,{parent:!0}),We(t),r=vr(t,{pb:!e}),n=!0,i=r.node}catch(t){}return n?i:null},yb(t,e,r,n){var i;return t=((t,e)=>ze(t+"/"+e))("string"==typeof t?t:wr(t),e),e=ir(!!r,!!n),(i=Or.yb).Yb??(i.Yb=64),dr(i=Or.Cb(Or.yb.Yb++,0),{open(t){t.seekable=!1},close(){n?.buffer?.length&&n(10)},read(t,e,n,i){for(var a=0,o=0;o<i;o++){try{var s=r()}catch(t){throw new Or.Ia(29)}if(void 0===s&&0===a)throw new Or.Ia(6);if(null==s)break;a++,e[n+o]=s}return a&&(t.node.atime=Date.now()),a},write(t,e,r,i){for(var a=0;a<i;a++)try{n(e[r+a])}catch(t){throw new Or.Ia(29)}return i&&(t.node.mtime=t.node.ctime=Date.now()),a}}),Pr(t,e,i)}},Lr=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];if((()=>{let t=rt.prototype;Object.assign(t,{isAliasOf:function(t){if(!(this instanceof rt&&t instanceof rt))return!1;var e=this.Ja.Xa.Ua,r=this.Ja.Va;t.Ja=t.Ja;var n=t.Ja.Xa.Ua;for(t=t.Ja.Va;e.kb;)r=e.Mb(r),e=e.kb;for(;n.kb;)t=n.Mb(t),n=n.kb;return e===n&&r===t},clone:function(){if(this.Ja.Va||Q(this),this.Ja.Lb)return this.Ja.count.value+=1,this;var t=et,e=Object,r=e.create,n=Object.getPrototypeOf(this),i=this.Ja;return(t=t(r.call(e,n,{Ja:{value:{count:i.count,Ib:i.Ib,Lb:i.Lb,Va:i.Va,Xa:i.Xa,ib:i.ib,mb:i.mb}}}))).Ja.count.value+=1,t.Ja.Ib=!1,t},delete(){if(this.Ja.Va||Q(this),this.Ja.Ib&&!this.Ja.Lb)throw new q("Object already scheduled for deletion");tt(this);var t=this.Ja;--t.count.value,0===t.count.value&&(t.ib?t.mb.zb(t.ib):t.Xa.Ua.zb(t.Va)),this.Ja.Lb||(this.Ja.ib=void 0,this.Ja.Va=void 0)},isDeleted:function(){return!this.Ja.Va},deleteLater:function(){if(this.Ja.Va||Q(this),this.Ja.Ib&&!this.Ja.Lb)throw new q("Object already scheduled for deletion");return this.Ja.Ib=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)})(),Object.assign(gt.prototype,{Ec(t){return this.pc&&(t=this.pc(t)),t},hc(t){this.zb?.(t)},xb:ft,jb:function(t){function e(){return vt(this.Ua.Eb,this.Pb?{Xa:this.Lc,Va:r,mb:this,ib:t}:{Xa:this,Va:t})}var r=this.Ec(t);if(!r)return this.hc(t),null;var n=((t,e)=>{if(void 0===e)throw new q("ptr should not be undefined");for(;t.kb;)e=t.Mb(e),t=t.kb;return mt[e]})(this.Ua,r);if(void 0!==n)return 0===n.Ja.count.value?(n.Ja.Va=r,n.Ja.ib=t,n.clone()):(n=n.clone(),this.hc(t),n);if(n=this.Ua.Cc(r),!(n=it[n]))return e.call(this);var i=pt(r,this.Ua,(n=this.Ob?n.yc:n.pointerType).Ua);return null===i?e.call(this):vt(n.Ua.Eb,this.Pb?{Xa:n,Va:i,mb:this,ib:t}:{Xa:n,Va:i})}}),Or.ad=(t,e,r,n,i,a,o,s,l,c)=>{ur(t,e,r,n,i,s,l,c).then(a).catch(o)},Or.rd=ur,Or.wb=Array(4096),Or.Wa(nr,{},"/"),Or.mkdir("/tmp"),Or.mkdir("/home"),Or.mkdir("/home/web_user"),function(){Or.mkdir("/dev"),dr(Or.Cb(1,3),{read:()=>0,write:(t,e,r,n)=>n,lb:()=>0}),Pr("/dev/null",Or.Cb(1,3)),Ze(Or.Cb(5,0),er),Ze(Or.Cb(6,0),rr),Pr("/dev/tty",Or.Cb(5,0)),Pr("/dev/tty1",Or.Cb(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(Ge(t),e=t.byteLength),t[--e]);Or.yb("/dev","random",r),Or.yb("/dev","urandom",r),Or.mkdir("/dev/shm"),Or.mkdir("/dev/shm/tmp")}(),function(){Or.mkdir("/proc");var t=Or.mkdir("/proc/self");Or.mkdir("/proc/self/fd"),Or.Wa({Wa(){var e=Or.createNode(t,"fd",16895,73);return e.Ma={lb:nr.Ma.lb},e.La={lookup(t,e){var r=kr(t=+e);return(t={parent:null,Wa:{oc:"fake"},La:{readlink:()=>r.path},id:t+1}).parent=t},readdir:()=>Array.from(Or.streams.entries()).filter(([,t])=>t).map(([t])=>t.toString())},e}},{},"/proc/self/fd")}(),Or.Bc={MEMFS:nr},r.noExitRuntime&&(D=r.noExitRuntime),r.preloadPlugins&&(cr=r.preloadPlugins),r.print&&(I=r.print),r.printErr&&(C=r.printErr),r.wasmBinary&&(f=r.wasmBinary),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();r.addRunDependency=lr,r.removeRunDependency=sr,r.FS_preloadFile=ur,r.FS_unlink=(...t)=>Or.unlink(...t),r.FS_createPath=(...t)=>function(t,e){for(t="string"==typeof t?t:wr(t),e=e.split("/").reverse();e.length;){var r=e.pop();if(r){var n=ze(t+"/"+r);try{Or.mkdir(n)}catch(t){if(20!=t.Bb)throw t}t=n}}return n}(...t),r.FS_createDevice=(...t)=>Or.yb(...t),r.FS=Or,r.FS_createDataFile=(...t)=>br(...t),r.FS_createLazyFile=(...t)=>function(t,e,r,n,a){class o{Sb=!1;ub=[];Rb=void 0;bc=0;ac=0;get(t){if(!(t>this.length-1||0>t)){var e=t%this.chunkSize;return this.Rb(t/this.chunkSize|0)[e]}}wc(t){this.Rb=t}cc(){var t=new XMLHttpRequest;t.open("HEAD",r,!1),t.send(null),200<=t.status&&300>t.status||304===t.status||R("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e;t=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e;var a=1048576;i||(a=n);var o=this;o.wc(t=>{var e=t*a,i=(t+1)*a-1;if(i=Math.min(i,n-1),void 0===o.ub[t]){var s=o.ub;e>i&&R("invalid range ("+e+", "+i+") or no bytes requested!"),i>n-1&&R("only "+n+" bytes available! programmer error!");var l=new XMLHttpRequest;l.open("GET",r,!1),n!==a&&l.setRequestHeader("Range","bytes="+e+"-"+i),l.responseType="arraybuffer",l.overrideMimeType&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send(null),200<=l.status&&300>l.status||304===l.status||R("Couldn't load "+r+". Status: "+l.status),e=void 0!==l.response?new Uint8Array(l.response||[]):Ke(l.responseText||""),s[t]=e}return void 0===o.ub[t]&&R("doXHR failed!"),o.ub[t]}),!t&&n||(a=n=1,a=n=this.Rb(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this.bc=n,this.ac=a,this.Sb=!0}get length(){return this.Sb||this.cc(),this.bc}get chunkSize(){return this.Sb||this.cc(),this.ac}}if(globalThis.XMLHttpRequest){i||R("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var s=new o,l=void 0}else l=r,s=void 0;var c=function(t,e,r,n){return t="string"==typeof t?t:wr(t),e=ze(t+"/"+e),Or.create(e,ir(r,n))}(t,e,n,a);s?c.Na=s:l&&(c.Na=null,c.url=l),Object.defineProperties(c,{Ya:{get:function(){return this.Na.length}}}),t={};for(const[e,r]of Object.entries(c.Ma))t[e]=(...t)=>(Rr(c),r(...t));return t.read=(t,e,r,n,i)=>{if(Rr(c),i>=(t=t.node.Na).length)e=0;else{if(n=Math.min(t.length-i,n),t.slice)for(var a=0;a<n;a++)e[r+a]=t[i+a];else for(a=0;a<n;a++)e[r+a]=t.get(i+a);e=n}return e},t.Fb=()=>{throw Rr(c),R(),new Or.Ia(48)},c.Ma=t,c}(...t);var Nr,Fr,Vr,Dr,jr,Br,zr,Jr,Wr,Gr,Hr,qr,Xr,Yr,Kr,Qr,Zr,tn,en,rn,nn,an,on,sn,ln,cn,un={a:(t,e,r,n)=>R(`Assertion failed: ${z(t)}, at: `+[e?z(e):"unknown filename",r,n?z(n):"unknown function"]),Z:()=>R(""),O:(t,e,r,n,i)=>{e=J(e);let a=t=>t;if(n=0n===n){const t=8*r;a=e=>BigInt.asUintN(t,e),i=a(i)}Y(t,{name:e,jb:a,nb:(t,e)=>("number"==typeof e&&(e=BigInt(e)),e),xb:K(e,r,!n),ob:null})},va:(t,e,r,n)=>{Y(t,{name:e=J(e),jb:function(t){return!!t},nb:function(t,e){return e?r:n},xb:function(t){return this.jb(w[t])},ob:null})},sa:(t,e,r,n,i,a,o,s,l,c,u,h,d)=>{u=J(u),a=$t(i,a),s&&=$t(o,s),c&&=$t(l,c),d=$t(h,d);var f=(t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t})(u);ot(f,function(){xt(`Cannot construct ${u} due to unbound types`,[n])}),St([t,e,r],n?[n]:[],e=>{if(e=e[0],n)var r=e.Ua,i=r.Eb;else i=rt.prototype;e=nt(u,function(...t){if(Object.getPrototypeOf(this)!==o)throw new q(`Use 'new' to construct ${u}`);if(void 0===h.Ab)throw new q(`${u} has no accessible constructor`);var e=h.Ab[t.length];if(void 0===e)throw new q(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(h.Ab).toString()}) parameters instead!`);return e.apply(this,t)});var o=Object.create(i,{constructor:{value:e}});e.prototype=o;var l,h=new st(u,e,o,d,r,a,s,c);return h.kb&&((l=h.kb).dc??(l.dc=[]),h.kb.dc.push(h)),r=new gt(u,h,!0,!1,!1),l=new gt(u+"*",h,!1,!1,!1),i=new gt(u+" const*",h,!1,!0,!1),it[t]={pointerType:l,yc:i},yt(f,e),[r,l,i]})},ja:(t,e,r,n,i,a)=>{var o=kt(e,r);i=$t(n,i),St([],[t],t=>{var r=`constructor ${(t=t[0]).name}`;if(void 0===t.Ua.Ab&&(t.Ua.Ab=[]),void 0!==t.Ua.Ab[e-1])throw new q(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.Ua.Ab[e-1]=()=>{xt(`Cannot construct ${t.name} due to unbound types`,o)},St([],o,n=>(n.splice(1,0,null),t.Ua.Ab[e-1]=Ct(r,n,null,i,a),[])),[]})},n:(t,e,r,n,i,a,o,s,l)=>{var c=kt(r,n);e=J(e),e=Tt(e),a=$t(i,a),St([],[t],t=>{function n(){xt(`Cannot call ${i} due to unbound types`,c)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.Ua.Mc.push(e);var u=t.Ua.Eb,h=u[e];return void 0===h||void 0===h.hb&&h.className!==t.name&&h.Hb===r-2?(n.Hb=r-2,n.className=t.name,u[e]=n):(at(u,e,i),u[e].hb[r-2]=n),St([],c,n=>(n=Ct(i,n,t,a,o,l),void 0===u[e].hb?(n.Hb=r-2,u[e]=n):u[e].hb[r-2]=n,[])),[]})},ta:t=>Y(t,Lt),N:(t,e,r)=>{Y(t,{name:e=J(e),jb:t=>t,nb:(t,e)=>e,xb:Nt(e,r),ob:null})},P:(t,e,r,n,i,a,o)=>{var s=kt(e,r);t=J(t),t=Tt(t),i=$t(n,i),ot(t,function(){xt(`Cannot call ${t} due to unbound types`,s)},e-1),St([],s,r=>(r=[r[0],null].concat(r.slice(1)),yt(t,Ct(t,r,null,i,a,o),e-1),[]))},q:(t,e,r,n,i)=>{e=J(e);let a=t=>t;if(0===n){var o=32-8*r;a=t=>t<<o>>>o,i=a(i)}Y(t,{name:e,jb:a,nb:(t,e)=>e,xb:K(e,r,0!==n),ob:null})},m:(t,e,r)=>{function n(t){return new i(v.buffer,_[t+4>>2],_[t>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];Y(t,{name:r=J(r),jb:n,xb:n},{Gc:!0})},ua:(t,e)=>{Y(t,{name:e=J(e),jb(t){var e=z(t+4,_[t>>2],!0);return Nr(t),e},nb(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;if(!(r||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT))throw new q("Cannot pass non-string to std::string");var n=r?Vt(e):e.length,i=Fr(4+n+1),a=i+4;return _[i>>2]=n,r?Ft(e,w,a,n+1):w.set(e,a),null!==t&&t.push(Nr,i),i},xb:ft,ob(t){Nr(t)}})},D:(t,e,r)=>{if(r=J(r),2===e)var n=jt,i=Bt,a=zt;else n=Jt,i=Wt,a=Gt;Y(t,{name:r,jb:t=>{var r=n(t+4,_[t>>2]*e,!0);return Nr(t),r},nb:(t,n)=>{if("string"!=typeof n)throw new q(`Cannot pass non-string to C++ string type ${r}`);var o=a(n),s=Fr(4+o+e);return _[s>>2]=o/e,i(n,s+4,o+e),null!==t&&t.push(Nr,s),s},xb:ft,ob(t){Nr(t)}})},E:t=>{Y(t,Lt)},wa:(t,e)=>{Y(t,{nc:!0,name:e=J(e),jb:()=>{},nb:()=>{}})},T:()=>{D=!1,Ht=0},R:()=>{throw 1/0},s:(t,e,r)=>{var[n,...i]=((t,e)=>{for(var r=Array(t),n=0;n<t;++n){var i=n,a=_[e+4*n>>2],o=G[a];if(void 0===o)throw t=`parameter ${n} has unknown type ${At(a)}`,new q(t);r[i]=o}return r})(t,e);e=n.nb.bind(n);var a=i.map(t=>t.xb.bind(t));t--;var o={toValue:Rt};switch(t=a.map((t,e)=>{var r=`argFromPtr${e}`;return o[r]=t,`${r}(args${e?"+"+8*e:""})`}),r){case 0:var s="toValue(handle)";break;case 2:s="new (toValue(handle))";break;case 3:s="";break;case 1:o.getStringOrSymbol=Kt,s="toValue(handle)[getStringOrSymbol(methodName)]"}return s+=`(${t})`,n.nc||(o.toReturnWire=e,o.emval_returnValue=Xt,s=`return emval_returnValue(toReturnWire, destructorsRef, ${s})`),s=`return function (handle, methodName, destructorsRef, args) {\n ${s}\n }`,r=new Function(Object.keys(o),s)(...Object.values(o)),s=`methodCaller<(${i.map(t=>t.name)}) => ${n.name}>`,(t=>{var e=qt.length;return qt.push(t),e})(nt(s,r))},qa:Ut,xa:t=>t?(t=Kt(t),Ot(globalThis[t])):Ot(globalThis),v:(t,e)=>(t=Rt(t),e=Rt(e),Ot(t[e])),F:t=>{9<t&&(Mt[t+1]+=1)},r:(t,e,r,n,i)=>qt[t](e,r,n,i),ya:t=>Ot(Kt(t)),Q:t=>{var e=Rt(t);Et(e),Ut(t)},U:(t,e)=>{if(Qt[t]&&(clearTimeout(Qt[t].id),delete Qt[t]),!e)return 0;var r=setTimeout(()=>{delete Qt[t],te(()=>en(t,performance.now()))},e);return Qt[t]={id:r,vd:e},0},V:t=>{var e=w.length;if(2147483648<(t>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);t:{n=(Math.min(2147483648,65536*Math.ceil(Math.max(t,n)/65536))-sn.buffer.byteLength+65535)/65536|0;try{sn.grow(n),U();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},ba:function(t,e,r,n,i,a){e=je(e),r=je(r),t=ie(t);var o={};if(a){var s=_[a+12>>2];if(s){var l=_[a+16>>2];o.requiredFeatures=Array.from(_.subarray(l>>2,l+4*s>>2),t=>ge[t])}var c=_[a+20>>2];if(c){var u={};function h(t,e,r=!1){4294967295==(e=_[c+e>>2])||r&&0==e||(u[t]=e)}function d(t,e){4294967295==_[(e=c+e)>>2]&&4294967295==_[e+4>>2]||(u[t]=4294967296*_[e+4>>2]+_[e>>2])}h("maxTextureDimension1D",4),h("maxTextureDimension2D",8),h("maxTextureDimension3D",12),h("maxTextureArrayLayers",16),h("maxBindGroups",20),h("maxBindGroupsPlusVertexBuffers",24),h("maxDynamicUniformBuffersPerPipelineLayout",32),h("maxDynamicStorageBuffersPerPipelineLayout",36),h("maxSampledTexturesPerShaderStage",40),h("maxSamplersPerShaderStage",44),h("maxStorageBuffersPerShaderStage",48),h("maxStorageTexturesPerShaderStage",52),h("maxUniformBuffersPerShaderStage",56),h("minUniformBufferOffsetAlignment",80),h("minStorageBufferOffsetAlignment",84),d("maxUniformBufferBindingSize",64),d("maxStorageBufferBindingSize",72),h("maxVertexBuffers",88),d("maxBufferSize",96),h("maxVertexAttributes",104),h("maxVertexBufferArrayStride",108),h("maxInterStageShaderVariables",112),h("maxColorAttachments",116),h("maxColorAttachmentBytesPerSample",120),h("maxComputeWorkgroupStorageSize",124),h("maxComputeInvocationsPerWorkgroup",128),h("maxComputeWorkgroupSizeX",132),h("maxComputeWorkgroupSizeY",136),h("maxComputeWorkgroupSizeZ",140),h("maxComputeWorkgroupsPerDimension",144),h("maxImmediateSize",148,!0),o.requiredLimits=u}(s=_[a+24>>2])&&(s={label:oe(s+4)},o.defaultQueue=s),o.label=oe(a+4)}t.requestDevice(o).then(t=>{te(()=>{re[i>>>0]=t.queue,re[n>>>0]=t,t.lost.then(e=>{te(()=>{t.onuncapturederror=()=>{};var n=on(),i=ee(e.message);Kr(r,De[e.reason],i),nn(n)})}),t.onuncapturederror=t=>{var e=5;t.error instanceof GPUValidationError?e=2:t.error instanceof GPUOutOfMemoryError?e=3:t.error instanceof GPUInternalError&&(e=4);var r=on();t=ee(t.error.message),tn(n,e,t),nn(r)},Zr(e,1,n,0)})},t=>{te(()=>{var i=on(),a=ee(t.message);Zr(e,3,n,a),r&&Kr(r,4,a),nn(i)})})},da:t=>{var e=ie(t),r=ne[t];if(r){for(var n=0;n<r.length;++n)r[n]();delete ne[t]}e.destroy()},g:t=>{delete re[t]},aa:(t,e,r)=>{var n=!!_[e+32>>2];e={label:oe(e+4),usage:_[e+16>>2],size:4294967296*_[e+4+24>>2]+_[e+24>>2],mappedAtCreation:n},t=ie(t);try{var i=t.createBuffer(e)}catch(t){return!1}return re[r>>>0]=i,n&&(ne[r]=[]),!0},$:(t,e,r)=>{var n=_[e>>2],i=_[n+4>>2];e={label:oe(e+4),code:""},2===i&&(e.code=ae(n+8)),t=ie(t).createShaderModule(e),re[r>>>0]=t},ca:t=>{(t=ie(t)).onuncapturederror=null,t.destroy()},_:function(t,e,r,n){if(e=je(e),r){var i={featureLevel:we[_[r+4>>2]],powerPreference:Se[_[r+8>>2]],forceFallbackAdapter:!!_[r+12>>2]};0!==(t=_[r>>2])&&(i.zd=!!_[t+8>>2])}"gpu"in navigator?navigator.gpu.requestAdapter(i).then(t=>{te(()=>{if(t)re[n>>>0]=t,Qr(e,1,n,0);else{var r=on(),i=ee("WebGPU not available on this browser (requestAdapter returned null)");Qr(e,3,n,i),nn(r)}})},t=>{te(()=>{var r=on(),i=ee(t.message);Qr(e,4,n,i),nn(r)})}):(i=on(),t=ee("WebGPU not available on this browser (navigator.gpu is not available)"),Qr(e,3,n,t),nn(i))},X:function(t){try{var e=kr(t);return Or.close(e),0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},W:function(t,e,r,n){e=je(e);try{if(isNaN(e))return 61;var i=kr(t);return Or.lb(i,e,r),S[n>>3]=BigInt(i.position),i.Ub&&0===e&&0===r&&(i.Ub=null),0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},Y:function(t,e,r,n){try{t:{var i=kr(t);t=e;for(var a,o=e=0;o<r;o++){var s=_[t>>2],l=_[t+4>>2];t+=8;var c=Or.write(i,v,s,l,a);if(0>c){var u=-1;break t}if(e+=c,c<l)break;void 0!==a&&(a+=c)}u=e}return _[n>>2]=u,0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},o:function(t,e){var r=on();try{return ln.get(t)(e)}catch(t){if(nn(r),t!==t+0)throw t;rn(1,0)}},i:function(t,e,r){var n=on();try{return ln.get(t)(e,r)}catch(t){if(nn(n),t!==t+0)throw t;rn(1,0)}},f:function(t,e,r,n){var i=on();try{return ln.get(t)(e,r,n)}catch(t){if(nn(i),t!==t+0)throw t;rn(1,0)}},H:function(t,e,r,n,i,a){var o=on();try{return ln.get(t)(e,r,n,i,a)}catch(t){if(nn(o),t!==t+0)throw t;rn(1,0)}},G:function(t){var e=on();try{ln.get(t)()}catch(t){if(nn(e),t!==t+0)throw t;rn(1,0)}},b:function(t,e){var r=on();try{ln.get(t)(e)}catch(t){if(nn(r),t!==t+0)throw t;rn(1,0)}},c:function(t,e,r){var n=on();try{ln.get(t)(e,r)}catch(t){if(nn(n),t!==t+0)throw t;rn(1,0)}},l:function(t,e,r,n){var i=on();try{ln.get(t)(e,r,n)}catch(t){if(nn(i),t!==t+0)throw t;rn(1,0)}},t:function(t,e,r,n,i){var a=on();try{ln.get(t)(e,r,n,i)}catch(t){if(nn(a),t!==t+0)throw t;rn(1,0)}},S:Zt,y:function(t){return BigInt(ie(t).size)},B:(t,e)=>{var r=_[e>>2],n=void 0;0!==r&&(n=4294967296*_[r+12>>2]+_[r+8>>2]),r=oe(e+4);for(var i=_[e+12>>2],a=_[e+16>>2],o=[],s=0;s<i;++s){var l=o,c=l.push,u=a+56*s,h=_[u+4>>2];if(0!==h){var d=$[u+8>>2];-1==d&&(d=void 0);var f=u+24;u={view:ie(h),depthSlice:d,resolveTarget:ie(_[u+12>>2]),clearValue:{r:x[f>>3],g:x[f+8>>3],b:x[f+16>>3],a:x[f+24>>3]},loadOp:Ae[_[u+16>>2]],storeOp:Pe[_[u+20>>2]]}}else u=void 0;c.call(l,u)}return i=0!==(i=_[e+20>>2])?{view:ie(_[i+4>>2]),depthClearValue:A[i+16>>2],depthLoadOp:Ae[_[i+8>>2]],depthStoreOp:Pe[_[i+12>>2]],depthReadOnly:!!_[i+20>>2],stencilClearValue:_[i+32>>2],stencilLoadOp:Ae[_[i+24>>2]],stencilStoreOp:Pe[_[i+28>>2]],stencilReadOnly:!!_[i+36>>2]}:void 0,a=0!==(a=_[e+28>>2])?{querySet:ie(_[a+4>>2]),beginningOfPassWriteIndex:_[a+8>>2],endOfPassWriteIndex:_[a+12>>2]}:void 0,e={label:r,colorAttachments:o,depthStencilAttachment:i,occlusionQuerySet:ie(_[e+24>>2]),timestampWrites:a,maxDrawCount:n},n=ie(t),t=Wr(0),e=n.beginRenderPass(e),re[t>>>0]=e,t},ia:(t,e,r,n)=>{ie(t).copyTextureToTexture(le(e),le(r),se(n))},la:t=>{var e=ie(t);return t=Br(0),e=e.finish(),re[t>>>0]=e,t},x:(t,e)=>{var r=oe(e+4),n=ie(_[e+12>>2]),i=_[e+16>>2];e=_[e+20>>2];for(var a=[],o=0;o<i;++o){var s=a,l=s.push,c=e+40*o,u=_[c+8>>2],h=_[c+32>>2],d=_[c+36>>2],f=_[c+4>>2];u?(-1==(h=_[(h=c+24)>>2]+4294967296*$[h+4>>2])&&(h=void 0),c={binding:f,resource:{buffer:ie(u),offset:4294967296*_[c+4+16>>2]+_[c+16>>2],size:h}}):c=h?{binding:f,resource:ie(h)}:{binding:f,resource:ie(d)},l.call(s,c)}return r={label:r,layout:n,entries:a},n=ie(t),t=Dr(0),r=n.createBindGroup(r),re[t>>>0]=r,t},p:(t,e)=>{var r=oe(e+4),n=_[e+12>>2];e=_[e+16>>2];for(var i=[],a=0;a<n;++a){var o=e+88*a,s=_[o+4>>2],l=_[o+8>>2],c=o+24,u=_[c+4>>2];c=u?{type:pe[u],hasDynamicOffset:!!_[c+8>>2],minBindingSize:4294967296*_[c+4+16>>2]+_[c+16>>2]}:void 0,u=(u=_[o+48+4>>2])?{type:Ie[u]}:void 0;var h=o+56,d=_[h+4>>2];h=d?{sampleType:Oe[d],viewDimension:Le[_[h+8>>2]],multisampled:!!_[h+12>>2]}:void 0,o=(d=_[(o+=72)+4>>2])?{access:Te[d],format:Re[_[o+8>>2]],viewDimension:Le[_[o+12>>2]]}:void 0,i.push.call(i,{binding:s,visibility:l,buffer:c,sampler:u,texture:h,storageTexture:o})}return r={label:r,entries:i},n=ie(t),t=jr(0),r=n.createBindGroupLayout(r),re[t>>>0]=r,t},ma:(t,e)=>{var r;return e&&(r={label:oe(e+4)}),e=ie(t),t=zr(0),r=e.createCommandEncoder(r),re[t>>>0]=r,t},ka:(t,e)=>{for(var r=_[e+12>>2],n=_[e+16>>2],i=[],a=0;a<r;++a)i.push(ie(_[n+4*a>>2]));return e={label:oe(e+4),bindGroupLayouts:i},r=ie(t),t=Jr(0),e=r.createPipelineLayout(e),re[t>>>0]=e,t},j:(t,e)=>{e=(t=>{function e(t){if(t)return{operation:fe[_[t>>2]],srcFactor:de[_[t+4>>2]],dstFactor:de[_[t+8>>2]]}}function r(t){return{compare:me[_[t>>2]],failOp:Ce[_[t+4>>2]],depthFailOp:Ce[_[t+8>>2]],passOp:Ce[_[t+12>>2]]}}return{label:oe(t+4),layout:ue(_[t+12>>2]),vertex:function(t){if(t){var e=ie(_[t+4>>2]),r=ce(_[t+16>>2],_[t+20>>2]),n=_[t+24>>2],i=_[t+28>>2];if(n){for(var a=[],o=0;o<n;++o){var s=a,l=s.push,c=i+24*o;if(c){var u=_[c+4>>2],h=_[c+16>>2];if(0===u&&0===h)var d=null;else{d=4294967296*_[c+4+8>>2]+_[c+8>>2],u=Ve[u],c=_[c+20>>2];for(var f=[],p=0;p<h;++p){var m=c+24*p;f.push.call(f,{format:Fe[_[m+4>>2]],offset:4294967296*_[m+4+8>>2]+_[m+8>>2],shaderLocation:_[m+16>>2]})}d={arrayStride:d,stepMode:u,attributes:f}}}else d=void 0;l.call(s,d)}n=a}else n=void 0;return{module:e,constants:r,buffers:n,entryPoint:oe(t+8)}}}(t+16),primitive:function(t){if(t)return{topology:Ee[_[t+4>>2]],stripIndexFormat:_e[_[t+8>>2]],frontFace:$e[_[t+12>>2]],cullMode:ve[_[t+16>>2]],unclippedDepth:!!_[t+20>>2]}}(t+48),depthStencil:function(t){if(t)return{format:Re[_[t+4>>2]],depthWriteEnabled:!!_[t+8>>2],depthCompare:me[_[t+12>>2]],stencilFront:r(t+16),stencilBack:r(t+32),stencilReadMask:_[t+48>>2],stencilWriteMask:_[t+52>>2],depthBias:$[t+56>>2],depthBiasSlopeScale:A[t+60>>2],depthBiasClamp:A[t+64>>2]}}(_[t+72>>2]),multisample:function(t){if(t)return{count:_[t+4>>2],mask:_[t+8>>2],alphaToCoverageEnabled:!!_[t+12>>2]}}(t+76),fragment:function(t){if(t){for(var r=ie(_[t+4>>2]),n=ce(_[t+16>>2],_[t+20>>2]),i=_[t+24>>2],a=_[t+28>>2],o=[],s=0;s<i;++s){var l=o,c=l.push,u=a+24*s,h=_[u+4>>2];if(0===h)u=void 0;else{h=Re[h];var d=(d=_[u+8>>2])?{alpha:e(d+12),color:e(d+0)}:void 0;u={format:h,blend:d,writeMask:_[u+16>>2]}}c.call(l,u)}return{module:r,constants:n,targets:o,entryPoint:oe(t+8)}}}(_[t+92>>2])}})(e);var r=ie(t);return t=Gr(0),e=r.createRenderPipeline(e),re[t>>>0]=e,t},ra:(t,e)=>{var r;return e&&(r={label:oe(e+4),addressModeU:he[_[e+12>>2]],addressModeV:he[_[e+16>>2]],addressModeW:he[_[e+20>>2]],magFilter:ye[_[e+24>>2]],minFilter:ye[_[e+28>>2]],mipmapFilter:xe[_[e+32>>2]],lodMinClamp:A[e+36>>2],lodMaxClamp:A[e+40>>2],compare:me[_[e+44>>2]],maxAnisotropy:y[e+48>>1]}),e=ie(t),t=Hr(0),r=e.createSampler(r),re[t>>>0]=r,t},C:(t,e)=>{var r={label:oe(e+4),size:se(e+28),mipLevelCount:_[e+44>>2],sampleCount:_[e+48>>2],dimension:Ue[_[e+24>>2]],format:Re[_[e+40>>2]],usage:_[e+16>>2]},n=_[e+52>>2];return n&&(e=_[e+56>>2],r.viewFormats=Array.from($.subarray(e>>2,e+4*n>>2),t=>Re[t])),t=ie(t),((t,e)=>{re[t>>>0]=e})(n=Xr(0),t.createTexture(r)),n},ha:(t,e)=>(t=2<(t=_[_[e>>2]+8>>2])?z(t):t,(t=(Lr[t]||("undefined"!=typeof document?document.querySelector(t):null)).getContext("webgpu"))?(t.ud=oe(e+4),e=qr(0),re[e>>>0]=t,e):0),J:(t,e,r)=>{t=ie(t),e=Array.from($.subarray(r>>2,r+4*e>>2),t=>ie(t)),t.submit(e)},u:function(t,e,r,n,i){r=je(r),ie(t).writeBuffer(ie(e),r,w.subarray(n,n+i),0,i)},K:(t,e,r,n,i,a)=>{var o=_[i+8>>2],s=_[i+12>>2];ie(t).writeTexture(le(e),w.subarray(r,r+n),{offset:4294967296*_[i+4>>2]+_[i>>2],bytesPerRow:4294967295===o?void 0:o,rowsPerImage:4294967295===s?void 0:s},se(a))},z:(t,e,r,n,i,a)=>{ie(t).drawIndexed(e,r,n>>>0,i,a>>>0)},I:t=>{ie(t).end()},d:(t,e,r,n,i)=>{t=ie(t),r=ie(r),0==n?t.setBindGroup(e,r):t.setBindGroup(e,r,_,i>>2,n)},A:function(t,e,r,n,i){n=je(n),i=je(i),t=ie(t),e=ie(e),-1==i&&(i=void 0),t.setIndexBuffer(e,_e[r],n,i)},e:(t,e)=>{ie(t).setPipeline(ie(e))},k:(t,e,r,n,i)=>{ie(t).setScissorRect(e,r,n,i)},h:(t,e)=>{ie(t).setStencilReference(e>>>0)},w:function(t,e,r,n,i){n=je(n),i=je(i),t=ie(t),r=ie(r),-1==i&&(i=void 0),t.setVertexBuffer(e,r,n,i)},fa:(t,e)=>{var r=_[e+4>>2];t=ie(t);var n=[_[e+24>>2],_[e+28>>2]];if(0!==n[0]&&(t.canvas.width=n[0]),0!==n[1]&&(t.canvas.height=n[1]),r={device:ie(r),format:Re[_[e+8>>2]],usage:_[e+16>>2],alphaMode:be[_[e+40>>2]]},n=_[e+32>>2]){var i=_[e+36>>2];r.viewFormats=Array.from($.subarray(i>>2,i+4*n>>2),t=>Re[t])}0!==(e=_[e>>2])&&(r.colorSpace=ke[_[e+8>>2]],r.wd={mode:Ne[_[e+12>>2]]}),t.configure(r)},ea:(t,e)=>{t=ie(t);try{var r=Xr(0),n=t.getCurrentTexture();re[r>>>0]=n,_[e+4>>2]=r,$[e+8>>2]=1}catch(t){_[e+4>>2]=0,$[e+8>>2]=6}},ga:t=>{ie(t).unconfigure()},oa:(t,e)=>{if(e){var r=_[e+24>>2],n=_[e+32>>2];r={label:oe(e+4),format:Re[_[e+12>>2]],dimension:Le[_[e+16>>2]],baseMipLevel:_[e+20>>2],mipLevelCount:4294967295===r?void 0:r,baseArrayLayer:_[e+28>>2],arrayLayerCount:4294967295===n?void 0:n,aspect:Me[_[e+36>>2]]}}return e=ie(t),t=Yr(0),e=e.createView(r),re[t>>>0]=e,t},na:t=>{ie(t).destroy()},pa:t=>Re.indexOf(ie(t).format),L:t=>ie(t).height,M:t=>ie(t).width};return cn=await async function(){function t(t){return t=cn=t.exports,Nr=t.Ba,Fr=t.Ca,Vr=t.Da,Dr=t.Ea,jr=t.Fa,Br=t.Ga,zr=t.Ha,Jr=t.Ka,Wr=t.Oa,Gr=t.Pa,Hr=t.Qa,qr=t.Ra,Xr=t.Sa,Yr=t.Ta,Kr=t.Za,Qr=t._a,Zr=t.$a,tn=t.ab,en=t.cb,rn=t.db,nn=t.eb,an=t.fb,on=t.gb,sn=t.za,ln=t.bb,U(),cn}var e={a:un};return r.instantiateWasm?new Promise(n=>{r.instantiateWasm(e,(e,r)=>{n(t(e))})}):(E??=r.locateFile?r.locateFile?r.locateFile("thorvg.wasm",h):h+"thorvg.wasm":new URL("thorvg.wasm",import.meta.url).href,t((await async function(t){var e=E;if(!f&&!P(e)&&!a)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(t){C(`wasm streaming compile failed: ${t}`),C("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var r=await async function(t){if(!f)try{var e=await s(t);return new Uint8Array(e)}catch{}if(t==E&&f)t=new Uint8Array(f);else{if(!l)throw"both async and sync fetching of the wasm failed";t=l(t)}return t}(t);return await WebAssembly.instantiate(r,e)}catch(t){C(`failed to asynchronously prepare wasm: ${t}`),R(t)}}(e,t)}(e)).instance))}(),function t(){function e(){if(r.calledRun=!0,!T){if(M=!0,r.noFSInit||Or.Vb||hr(),cn.Aa(),Or.lc=!1,m?.(r),r.onRuntimeInitialized?.(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var t=r.postRun.shift();N.push(t)}L(N)}}if(0<ar)or=t;else{if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)V();L(F),0<ar?or=t:r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),e()},1)):e()}}(),e=M?r:new Promise((t,e)=>{m=t,b=e}),e}({locateFile:(t,e)=>t.endsWith(".wasm")?this.wasmUrl||"https://unpkg.com/@thorvg/lottie-player@latest/dist/thorvg.wasm":e+t})),!this._timer)return;clearInterval(this._timer),this._timer=void 0;const t=this.config?.renderer||"wg";if(await(async t=>{if("wg"===t){for(;"requested"===pt;)await ft(100);if("initialized"!==pt&&(pt="requested",ut))for(;;)switch(ut.init()){case 0:return void(pt="initialized");case 1:return void(pt="failed");case 2:await ft(100)}}})(t),"failed"===pt)return this.currentState="error",void this.dispatchEvent(new CustomEvent("error"));this.TVG=new ut.TvgLottieAnimation(t,`#${this.canvas.id}`),this.src&&this.load(this.src,this.fileType)}_viewport(){const{left:t,right:e,top:r,bottom:n}=this.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight;let o=0,s=0,l=this.canvas.width,c=this.canvas.height;t<0&&(o=Math.abs(t),l-=o),r<0&&(s=Math.abs(r),c-=s),e>i&&(l-=e-i),n>a&&(c-=n-a),this.TVG.viewport(o,s,l,c)}_observerCallback(t){const e=t[0],r=e.target;r._observable=e.isIntersecting,e.isIntersecting?"frozen"===r.currentState&&r.play():"playing"===r.currentState&&(r.freeze(),r.dispatchEvent(new CustomEvent("freeze")))}firstUpdated(t){this.canvas=this.querySelector(".thorvg"),this.canvas.id=`thorvg-${Date.now().toString(36)+Math.random().toString(36).substring(2)}`,this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,this._observer=new IntersectionObserver(this._observerCallback),this._observer.observe(this),this.TVG?this.src&&this.load(this.src,this.fileType):this._timer=setInterval(this._init.bind(this),100)}createRenderRoot(){return this.style.display="block",this}async _animLoop(){this.TVG&&await this._update()&&(this._render(),window.requestAnimationFrame(this._animLoop.bind(this)))}_loadBytes(t){if(!this.TVG)throw new Error("TVG is not initialized");if(this._assetResolverCallback&&this.TVG.setAssetResolver(this._assetResolverCallback,this._assetResolverData),!this.TVG.load(t,this.fileType,this.canvas.width,this.canvas.height))throw new Error(`Unable to load an image. Error: ${this.TVG.error()}`);this._render(),this.dispatchEvent(new CustomEvent("load")),this.autoPlay&&this.play()}_flush(){this.canvas.getContext("2d").putImageData(this._imageData,0,0)}_render(){if(!this.TVG)return;if(!1!==this.config?.enableDevicePixelRatio){const t=1+.75*(window.devicePixelRatio-1),{width:e,height:r}=this.canvas.getBoundingClientRect();this.canvas.width=e*t,this.canvas.height=r*t}if(this.TVG.resize(this.canvas.width,this.canvas.height),this._viewport(),!this.TVG.update())return;if("wg"===this.config?.renderer||"gl"===this.config?.renderer)return void this.TVG.render();const t=this.TVG.render(),e=new Uint8ClampedArray(t,0,t.byteLength);e.length<1||(this._imageData=new ImageData(e,this.canvas.width,this.canvas.height),this._flush())}async _update(){if(!this.TVG)return!1;if("playing"!==this.currentState)return!1;const t=this.TVG.duration(),e=Date.now()/1e3;if(this.currentFrame=(e-this._beginTime)/t*this.totalFrame*this.speed,-1===this.direction&&(this.currentFrame=this.totalFrame-this.currentFrame),1===this.direction&&this.currentFrame>=this.totalFrame||-1===this.direction&&this.currentFrame<=0){const t=this.count?"bounce"===this.mode?2*this.count:this.count:0;if(this.loop||t&&this._counter<t)return"bounce"===this.mode&&(this.direction=1===this.direction?-1:1,this.currentFrame=1===this.direction?0:this.totalFrame),this.count&&(this._counter+=1),await ft(this.intermission),this.play(),!0;this.dispatchEvent(new CustomEvent("complete")),this.currentState="stopped"}return this.dispatchEvent(new CustomEvent("frame",{detail:{frame:this.currentFrame}})),this.TVG.frame(this.currentFrame)}_frame(t){this.TVG&&(this.pause(),this.currentFrame=t,this.TVG.frame(t))}async load(t,e="json"){try{await this._init();const r=await(async(t,e)=>{const r=new TextEncoder;let n=t;switch(typeof n){case"object":return n instanceof ArrayBuffer?new Uint8Array(n):(n=JSON.stringify(n),r.encode(n));case"string":if("json"===e||"lot"===e)return n=await(async t=>{try{t=JSON.parse(t)}catch(e){const r=await(async t=>{if("string"!=typeof t)throw new Error("The url value must be a string");try{const e=new URL(t),r=await fetch(e.toString());return await r.json()}catch(t){throw new Error("An error occurred while trying to load the Lottie file from URL")}})(t);t=JSON.stringify(r)}return t})(n),r.encode(n);const t=await(async t=>(await fetch(t)).arrayBuffer())(n);return new Uint8Array(t);default:throw new Error("Invalid src type")}})(t,e);this.dispatchEvent(new CustomEvent("ready")),this.fileType=e,await this._loadBytes(r)}catch(t){this.currentState="error",this.dispatchEvent(new CustomEvent("error"))}}play(){if(this.TVG&&!("json"!==this.fileType&&"lot"!==this.fileType||(this.totalFrame=this.TVG.totalFrame(),this.totalFrame<1||(this._beginTime=Date.now()/1e3,"playing"===this.currentState))))return this._observable?(this.currentState="playing",void window.requestAnimationFrame(this._animLoop.bind(this))):void(this.currentState="frozen")}pause(){this.currentState="paused",this.dispatchEvent(new CustomEvent("pause"))}stop(){this.currentState="stopped",this.currentFrame=0,this._counter=1,this.seek(0),this.dispatchEvent(new CustomEvent("stop"))}freeze(){this.currentState="frozen",this.dispatchEvent(new CustomEvent("freeze"))}async seek(t){this._frame(t),await this._update(),this._render()}resize(t,e){this.canvas.width=t,this.canvas.height=e,"playing"!==this.currentState&&this._render()}destroy(){this.TVG&&(this.TVG.delete(),this.TVG=null,this.currentState="destroyed",this._observer&&(this._observer.disconnect(),this._observer=void 0),this.dispatchEvent(new CustomEvent("destroyed")),this.remove())}term(){ut&&(ut.term(),ut=null)}setLooping(t){this.TVG&&(this.loop=t)}setDirection(t){this.TVG&&(this.direction=t)}setSpeed(t){this.TVG&&(this.speed=t)}setBgColor(t){this.TVG&&(this.canvas.style.backgroundColor=t)}setQuality(t){this.TVG&&this.TVG.quality(t)&&"playing"!==this.currentState&&this._render()}setAssetResolver(t,e){this._assetResolverCallback=t,this._assetResolverData=e,this.TVG&&this.TVG.setAssetResolver(t,e)}getVersion(){return{THORVG_VERSION:"1.0.2"}}render(){return z`
|
|
1
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let i=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const r=this.t;if(e&&void 0===t){const e=void 0!==r&&1===r.length;e&&(t=n.get(r)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(r,t))}return t}toString(){return this.cssText}};const a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new i("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:o,defineProperty:s,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:u,getPrototypeOf:h}=Object,d=globalThis,f=d.trustedTypes,p=f?f.emptyScript:"",m=d.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},w=(t,e)=>!o(t,e),g={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),d.litPropertyMetadata??=new WeakMap;let y=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&s(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:i}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const a=n?.call(this);i?.call(this,e),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??g}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=h(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...c(t),...u(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((r,n)=>{if(e)r.adoptedStyleSheets=n.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of n){const n=document.createElement("style"),i=t.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,r.appendChild(n)}})(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:v).toAttribute(e,r.type);this._$Em=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=n;const a=i.fromAttribute(e,t.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,i=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??w)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:i},a){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==i||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,m?.({ReactiveElement:y}),(d.reactiveElementVersions??=[]).push("2.1.1");const $={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:w},_=(t=$,e,r)=>{const{kind:n,metadata:i}=r;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),a.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const i=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,i,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];e.call(this,r),this.requestUpdate(n,i,t)}}throw Error("Unsupported decorator location: "+n)};function A(t){return(e,r)=>"object"==typeof r?_(t,e,r):((t,e,r)=>{const n=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),n?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}const x=globalThis,S=x.trustedTypes,k=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+I,T=`<${C}>`,P=document,M=()=>P.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,O="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,F=/>/g,V=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,B=/^(?:script|style|textarea|title)$/i,z=(t,...e)=>({_$litType$:1,strings:t,values:e}),J=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),G=new WeakMap,H=P.createTreeWalker(P,129);function q(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const X=(t,e)=>{const r=t.length-1,n=[];let i,a=2===e?"<svg>":3===e?"<math>":"",o=L;for(let e=0;e<r;e++){const r=t[e];let s,l,c=-1,u=0;for(;u<r.length&&(o.lastIndex=u,l=o.exec(r),null!==l);)u=o.lastIndex,o===L?"!--"===l[1]?o=N:void 0!==l[1]?o=F:void 0!==l[2]?(B.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=V):void 0!==l[3]&&(o=V):o===V?">"===l[0]?(o=i??L,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,s=l[1],o=void 0===l[3]?V:'"'===l[3]?j:D):o===j||o===D?o=V:o===N||o===F?o=L:(o=V,i=void 0);const h=o===V&&t[e+1].startsWith("/>")?" ":"";a+=o===L?r+T:c>=0?(n.push(s),r.slice(0,c)+E+r.slice(c)+I+h):r+I+(-2===c?e:h)}return[q(t,a+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class Y{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,a=0;const o=t.length-1,s=this.parts,[l,c]=X(t,e);if(this.el=Y.createElement(l,r),H.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=H.nextNode())&&s.length<o;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(E)){const e=c[a++],r=n.getAttribute(t).split(I),o=/([.?@])?(.*)/.exec(e);s.push({type:1,index:i,name:o[2],strings:r,ctor:"."===o[1]?et:"?"===o[1]?rt:"@"===o[1]?nt:tt}),n.removeAttribute(t)}else t.startsWith(I)&&(s.push({type:6,index:i}),n.removeAttribute(t));if(B.test(n.tagName)){const t=n.textContent.split(I),e=t.length-1;if(e>0){n.textContent=S?S.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],M()),H.nextNode(),s.push({type:2,index:++i});n.append(t[e],M())}}}else if(8===n.nodeType)if(n.data===C)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(I,t+1));)s.push({type:7,index:i}),t+=I.length-1}i++}}static createElement(t,e){const r=P.createElement("template");return r.innerHTML=t,r}}function K(t,e,r=t,n){if(e===J)return e;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const a=U(e)?void 0:e._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(e=K(t,i._$AS(t,e.values),i,n)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??P).importNode(e,!0);H.currentNode=n;let i=H.nextNode(),a=0,o=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new Z(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new it(i,this,t)),this._$AV.push(e),s=r[++o]}a!==s?.index&&(i=H.nextNode(),a++)}return H.currentNode=P,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>R(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Y.createElement(q(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new Q(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new Y(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new Z(this.O(M()),this.O(M()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,i){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=W}_$AI(t,e=this,r,n){const i=this.strings;let a=!1;if(void 0===i)t=K(this,t,e,0),a=!U(t)||t!==this._$AH&&t!==J,a&&(this._$AH=t);else{const n=t;let o,s;for(t=i[0],o=0;o<i.length-1;o++)s=K(this,n[r+o],e,o),s===J&&(s=this._$AH[o]),a||=!U(s)||s!==this._$AH[o],s===W?t=W:t!==W&&(t+=(s??"")+i[o+1]),this._$AH[o]=s}a&&!n&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class rt extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class nt extends tt{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??W)===J)return;const r=this._$AH,n=t===W&&r!==W||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==W&&(r===W||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const at=x.litHtmlPolyfillSupport;at?.(Y,Z),(x.litHtmlVersions??=[]).push("3.3.1");const ot=globalThis;class st extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let i=n._$litPart$;if(void 0===i){const t=r?.renderBefore??null;n._$litPart$=i=new Z(e.insertBefore(M(),t),t,void 0,r??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}st._$litElement$=!0,st.finalized=!0,ot.litElementHydrateSupport?.({LitElement:st});const lt=ot.litElementPolyfillSupport;function ct(t,e,r,n){var i,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,r,o):i(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}lt?.({LitElement:st}),(ot.litElementVersions??=[]).push("4.2.1");let ut=null,ht=!1;var dt=function(t){return t.JSON="json",t.LOT="lot",t.JPG="jpg",t.PNG="png",t.SVG="svg",t}({});const ft=t=>new Promise(e=>setTimeout(e,t));let pt="idle";class mt extends st{src;wasmUrl;fileType="json";speed=1;autoPlay=!1;count;loop=!1;direction=1;mode="normal";intermission=1;totalFrame=0;currentFrame=0;currentState="loading";get size(){return Float32Array.from(this.TVG?.size()||[0,0])}get dpr(){return!1===this.config?.enableDevicePixelRatio?1:1+.75*(window.devicePixelRatio-1)}TVG=null;canvas;config;_imageData;_beginTime=Date.now();_counter=1;_timer;_observer;_observable=!1;_assetResolverCallback;_assetResolverData;async _init(){if(ht)for(;!ut;)await ft(100);if(ut||(ht=!0,ut=await async function(t={}){var e,r=t,n=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,a=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(a){const{createRequire:t}=await Promise.resolve().then(function(){return wt});var o=t(import.meta.url)}var s,l,c=(t,e)=>{throw e},u=import.meta.url,h="";if(a){var d=o("fs");u.startsWith("file:")&&(h=o("path").dirname(o("url").fileURLToPath(u))+"/"),l=t=>(t=P(t)?new URL(t):t,d.readFileSync(t)),s=async t=>(t=P(t)?new URL(t):t,d.readFileSync(t,void 0)),process.argv.slice(2),c=(t,e)=>{throw process.exitCode=t,e}}else if(n||i){try{h=new URL(".",u).href}catch{}i&&(l=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=async t=>{if(P(t))return new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r(n.status)},n.onerror=r,n.send(null)});var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)}}var f,p,m,b,v,w,g,y,$,_,A,x,S,k,E,I=function(){}.bind(),C=function(){}.bind(),T=!1,P=t=>t.startsWith("file://"),M=!1;function U(){var t=sn.buffer;v=new Int8Array(t),g=new Int16Array(t),w=new Uint8Array(t),y=new Uint16Array(t),$=new Int32Array(t),_=new Uint32Array(t),A=new Float32Array(t),x=new Float64Array(t),S=new BigInt64Array(t),k=new BigUint64Array(t)}function R(t){throw r.onAbort?.(t),C(t="Aborted("+t+")"),T=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),b?.(t),t}class O{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var L=t=>{for(;0<t.length;)t.shift()(r)},N=[],F=[],V=()=>{var t=r.preRun.shift();F.push(t)},D=!0,j=new TextDecoder,B=(t,e,r,n)=>{if(r=e+r,n)return r;for(;t[e]&&!(e>=r);)++e;return e},z=(t,e,r)=>t?j.decode(w.subarray(t,B(w,t,e,r))):"",J=t=>{for(var e="";;){var r=w[t++];if(!r)return e;e+=String.fromCharCode(r)}},W={},G={},H={},q=class extends Error{constructor(t){super(t),this.name="BindingError"}},X=t=>{throw new q(t)};function Y(t,e,r={}){return function(t,e,r={}){var n=e.name;if(!t)throw new q(`type "${n}" must have a positive integer typeid pointer`);if(G.hasOwnProperty(t)){if(r.Gc)return;throw new q(`Cannot register type '${n}' twice`)}G[t]=e,delete H[t],W.hasOwnProperty(t)&&(e=W[t],delete W[t],e.forEach(t=>t()))}(t,e,r)}var K=(t,e,r)=>{switch(e){case 1:return r?t=>v[t]:t=>w[t];case 2:return r?t=>g[t>>1]:t=>y[t>>1];case 4:return r?t=>$[t>>2]:t=>_[t>>2];case 8:return r?t=>S[t>>3]:t=>k[t>>3];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Q=t=>{throw new q(t.Ja.Xa.Ua.name+" instance already deleted")},Z=!1,tt=()=>{},et=t=>globalThis.FinalizationRegistry?(Z=new FinalizationRegistry(t=>{--(t=t.Ja).count.value,0===t.count.value&&(t.ib?t.mb.zb(t.ib):t.Xa.Ua.zb(t.Va))}),et=t=>{var e=t.Ja;return e.ib&&Z.register(t,{Ja:e},t),t},tt=t=>{Z.unregister(t)},et(t)):(et=t=>t,t);function rt(){}var nt=(t,e)=>Object.defineProperty(e,"name",{value:t}),it={},at=(t,e,r)=>{if(void 0===t[e].hb){var n=t[e];t[e]=function(...n){if(!t[e].hb.hasOwnProperty(n.length))throw new q(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${t[e].hb})!`);return t[e].hb[n.length].apply(this,n)},t[e].hb=[],t[e].hb[n.Hb]=n}},ot=(t,e,n)=>{if(r.hasOwnProperty(t)){if(void 0===n||void 0!==r[t].hb&&void 0!==r[t].hb[n])throw new q(`Cannot register public name '${t}' twice`);if(at(r,t,t),r[t].hb.hasOwnProperty(n))throw new q(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[t].hb[n]=e}else r[t]=e,r[t].Hb=n};function st(t,e,r,n,i,a,o,s){this.name=t,this.constructor=e,this.Eb=r,this.zb=n,this.kb=i,this.Cc=a,this.Mb=o,this.zc=s,this.Mc=[]}var lt=(t,e,r)=>{for(;e!==r;){if(!e.Mb)throw new q(`Expected null or instance of ${r.name}, got an instance of ${e.name}`);t=e.Mb(t),e=e.kb}return t},ct=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t};function ut(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);return 0}if(!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua)}function ht(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);if(this.Pb){var r=this.Nc();return null!==t&&t.push(this.zb,r),r}return 0}if(!e||!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ob&&e.Ja.Xa.Ob)throw new q(`Cannot convert argument of type ${e.Ja.mb?e.Ja.mb.name:e.Ja.Xa.name} to parameter type ${this.name}`);if(r=lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua),this.Pb){if(void 0===e.Ja.ib)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.Pc){case 0:if(e.Ja.mb!==this)throw new q(`Cannot convert argument of type ${e.Ja.mb?e.Ja.mb.name:e.Ja.Xa.name} to parameter type ${this.name}`);r=e.Ja.ib;break;case 1:r=e.Ja.ib;break;case 2:if(e.Ja.mb===this)r=e.Ja.ib;else{var n=e.clone();r=this.Oc(r,Ot(()=>n.delete())),null!==t&&t.push(this.zb,r)}break;default:throw new q("Unsupporting sharing policy")}}return r}function dt(t,e){if(null===e){if(this.Wb)throw new q(`null is not a valid ${this.name}`);return 0}if(!e.Ja)throw new q(`Cannot pass "${ct(e)}" as a ${this.name}`);if(!e.Ja.Va)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.Ja.Xa.Ob)throw new q(`Cannot convert argument of type ${e.Ja.Xa.name} to parameter type ${this.name}`);return lt(e.Ja.Va,e.Ja.Xa.Ua,this.Ua)}function ft(t){return this.jb(_[t>>2])}var pt=(t,e,r)=>e===r?t:void 0===r.kb||null===(t=pt(t,e,r.kb))?null:r.zc(t),mt={},bt=class extends Error{constructor(t){super(t),this.name="InternalError"}},vt=(t,e)=>{if(!e.Xa||!e.Va)throw new bt("makeClassHandle requires ptr and ptrType");if(!!e.mb!=!!e.ib)throw new bt("Both smartPtrType and smartPtr must be specified");return e.count={value:1},et(Object.create(t,{Ja:{value:e,writable:!0}}))};function gt(t,e,r,n,i,a,o,s,l,c,u){this.name=t,this.Ua=e,this.Wb=r,this.Ob=n,this.Pb=i,this.Lc=a,this.Pc=o,this.pc=s,this.Nc=l,this.Oc=c,this.zb=u,i||void 0!==e.kb?this.nb=ht:(this.nb=n?ut:dt,this.ob=null)}var yt=(t,e,n)=>{if(!r.hasOwnProperty(t))throw new bt("Replacing nonexistent public symbol");void 0!==r[t].hb&&void 0!==n?r[t].hb[n]=e:(r[t]=e,r[t].Hb=n)},$t=(t,e)=>{t=J(t);var r=ln.get(e);if("function"!=typeof r)throw new q(`unknown function pointer with signature ${t}: ${e}`);return r};class _t extends Error{}var At=t=>{t=Vr(t);var e=J(t);return Nr(t),e},xt=(t,e)=>{var r=[],n={};throw e.forEach(function t(e){n[e]||G[e]||(H[e]?H[e].forEach(t):(r.push(e),n[e]=!0))}),new _t(`${t}: `+r.map(At).join([", "]))},St=(t,e,r)=>{function n(e){if((e=r(e)).length!==t.length)throw new bt("Mismatched type converter count");for(var n=0;n<t.length;++n)Y(t[n],e[n])}t.forEach(t=>H[t]=e);var i=Array(e.length),a=[],o=0;for(let[t,r]of e.entries())G.hasOwnProperty(r)?i[t]=G[r]:(a.push(r),W.hasOwnProperty(r)||(W[r]=[]),W[r].push(()=>{i[t]=G[r],++o===a.length&&n(i)}));0===a.length&&n(i)},kt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+4*n>>2]);return r},Et=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function It(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].ob)return!0;return!1}function Ct(t,e,r,n,i,a){var o=e.length;if(2>o)throw new q("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==e[1]&&null!==r,l=It(e);r=!e[0].nc;var c=e[0],u=e[1];for(n=[t,X,n,i,Et,c.jb.bind(c),u?.nb.bind(u)],i=2;i<o;++i)n.push((c=e[i]).nb.bind(c));if(!l)for(i=s?1:2;i<e.length;++i)null!==e[i].ob&&n.push(e[i].ob);for(l=It(e),i=e.length-2,u=[],c=["fn"],s&&c.push("thisWired"),o=0;o<i;++o)u.push(`arg${o}`),c.push(`arg${o}Wired`);u=u.join(","),c=c.join(","),u=`return function (${u}) {\n`,l&&(u+="var destructors = [];\n");var h=l?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(s&&(u+=`var thisWired = toClassParamWire(${h}, this);\n`),o=0;o<i;++o){var f=`toArg${o}Wire`;u+=`var arg${o}Wired = ${f}(${h}, arg${o});\n`,d.push(f)}if(u+=(r||a?"var rv = ":"")+`invoker(${c});\n`,l)u+="runDestructors(destructors);\n";else for(o=s?1:2;o<e.length;++o)a=1===o?"thisWired":"arg"+(o-2)+"Wired",null!==e[o].ob&&(u+=`${a}_dtor(${a});\n`,d.push(`${a}_dtor`));return r&&(u+="var ret = fromRetWire(rv);\nreturn ret;\n"),e=new Function(d,u+"}\n")(...n),nt(t,e)}var Tt=t=>{const e=(t=t.trim()).indexOf("(");return-1===e?t:t.slice(0,e)},Pt=[],Mt=[0,1,,1,null,1,!0,1,!1,1],Ut=t=>{9<t&&0===--Mt[t+1]&&(Mt[t]=void 0,Pt.push(t))},Rt=t=>{if(!t)throw new q(`Cannot use deleted val. handle = ${t}`);return Mt[t]},Ot=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const e=Pt.pop()||Mt.length;return Mt[e]=t,Mt[e+1]=1,e}},Lt={name:"emscripten::val",jb:t=>{var e=Rt(t);return Ut(t),e},nb:(t,e)=>Ot(e),xb:ft,ob:null},Nt=(t,e)=>{switch(e){case 4:return function(t){return this.jb(A[t>>2])};case 8:return function(t){return this.jb(x[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Ft=(t,e,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var a=0;a<t.length;++a){var o=t.codePointAt(a);if(127>=o){if(r>=n)break;e[r++]=o}else if(2047>=o){if(r+1>=n)break;e[r++]=192|o>>6,e[r++]=128|63&o}else if(65535>=o){if(r+2>=n)break;e[r++]=224|o>>12,e[r++]=128|o>>6&63,e[r++]=128|63&o}else{if(r+3>=n)break;e[r++]=240|o>>18,e[r++]=128|o>>12&63,e[r++]=128|o>>6&63,e[r++]=128|63&o,a++}}return e[r]=0,r-i},Vt=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);127>=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}return e},Dt=new TextDecoder("utf-16le"),jt=(t,e,r)=>Dt.decode(y.subarray(t>>=1,B(y,t,e/2,r))),Bt=(t,e,r)=>{if(r??=2147483647,2>r)return 0;var n=e;r=(r-=2)<2*t.length?r/2:t.length;for(var i=0;i<r;++i)g[e>>1]=t.charCodeAt(i),e+=2;return g[e>>1]=0,e-n},zt=t=>2*t.length,Jt=(t,e,r)=>{var n="";t>>=2;for(var i=0;!(i>=e/4);i++){var a=_[t+i];if(!a&&!r)break;n+=String.fromCodePoint(a)}return n},Wt=(t,e,r)=>{if(r??=2147483647,4>r)return 0;var n=e;r=n+r-4;for(var i=0;i<t.length;++i){var a=t.codePointAt(i);if(65535<a&&i++,$[e>>2]=a,(e+=4)+4>r)break}return $[e>>2]=0,e-n},Gt=t=>{for(var e=0,r=0;r<t.length;++r)65535<t.codePointAt(r)&&r++,e+=4;return e},Ht=0,qt=[],Xt=(t,e,r)=>{var n=[];return t=t(n,r),n.length&&(_[e>>2]=Ot(n)),t},Yt={},Kt=t=>{var e=Yt[t];return void 0===e?J(t):e},Qt={},Zt=t=>{p=t,D||0<Ht||(r.onExit?.(t),T=!0),c(t,new O(t))},te=t=>{if(!T)try{if(t(),!(D||0<Ht))try{p=t=p,Zt(t)}catch(t){t instanceof O||"unwind"==t||c(1,t)}}catch(t){t instanceof O||"unwind"==t||c(1,t)}},ee=t=>{var e=Vt(t)+1,r=an(e);return Ft(t,w,r,e),r},re=[],ne=[],ie=t=>{if(t)return re[t>>>0]},ae=t=>z(_[t>>2],_[t+4>>2]),oe=t=>{var e=_[t>>2];return t=_[t+4>>2],e?z(e,t):0===t?"":void 0},se=t=>({width:_[t>>2],height:_[t+4>>2],depthOrArrayLayers:_[t+8>>2]}),le=t=>{var e=t+8;return{texture:ie(_[t>>2]),mipLevel:_[t+4>>2],origin:{x:_[e>>2],y:_[e+4>>2],z:_[e+8>>2]},aspect:Me[_[t+20>>2]]}},ce=(t,e)=>{if(t){for(var r={},n=0;n<t;++n){var i=e+24*n;r[ae(i+4)]=x[i+16>>3]}return r}},ue=t=>t?ie(t):"auto",he=[,"clamp-to-edge","repeat","mirror-repeat"],de=[,"zero","one","src","one-minus-src","src-alpha","one-minus-src-alpha","dst","one-minus-dst","dst-alpha","one-minus-dst-alpha","src-alpha-saturated","constant","one-minus-constant","src1","one-minus-src1","src1alpha","one-minus-src1alpha"],fe=[,"add","subtract","reverse-subtract","min","max"],pe=["binding-not-used",,"uniform","storage","read-only-storage"],me=[,"never","less","equal","less-equal","greater","not-equal","greater-equal","always"],be=[,"opaque","premultiplied","unpremultiplied","inherit"],ve=[,"none","front","back"],we=[,"compatibility","core"],ge={1:"core-features-and-limits",2:"depth-clip-control",3:"depth32float-stencil8",4:"texture-compression-bc",5:"texture-compression-bc-sliced-3d",6:"texture-compression-etc2",7:"texture-compression-astc",8:"texture-compression-astc-sliced-3d",9:"timestamp-query",10:"indirect-first-instance",11:"shader-f16",12:"rg11b10ufloat-renderable",13:"bgra8unorm-storage",14:"float32-filterable",15:"float32-blendable",16:"clip-distances",17:"dual-source-blending",18:"subgroups",19:"texture-formats-tier1",20:"texture-formats-tier2",21:"primitive-index",327692:"chromium-experimental-unorm16-texture-formats",327693:"chromium-experimental-snorm16-texture-formats",327732:"chromium-experimental-multi-draw-indirect"},ye=[,"nearest","linear"],$e=[,"ccw","cw"],_e=[,"uint16","uint32"],Ae=[,"load","clear"],xe=[,"nearest","linear"],Se=[,"low-power","high-performance"],ke=[,"srgb","display-p3"],Ee=[,"point-list","line-list","line-strip","triangle-list","triangle-strip"],Ie=["binding-not-used",,"filtering","non-filtering","comparison"],Ce=[,"keep","zero","replace","invert","increment-clamp","decrement-clamp","increment-wrap","decrement-wrap"],Te=["binding-not-used",,"write-only","read-only","read-write"],Pe=[,"store","discard"],Me=[,"all","stencil-only","depth-only"],Ue=[,"1d","2d","3d"],Re=[,"r8unorm","r8snorm","r8uint","r8sint","r16unorm","r16snorm","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32float","r32uint","r32sint","rg16unorm","rg16snorm","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb10a2uint","rgb10a2unorm","rg11b10ufloat","rgb9e5ufloat","rg32float","rg32uint","rg32sint","rgba16unorm","rgba16snorm","rgba16uint","rgba16sint","rgba16float","rgba32float","rgba32uint","rgba32sint","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8","bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb","etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm","astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"],Oe=["binding-not-used",,"float","unfilterable-float","depth","sint","uint"],Le=[,"1d","2d","2d-array","cube","cube-array","3d"],Ne=[,"standard","extended"],Fe=[,"uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10-10-10-2","unorm8x4-bgra"],Ve=[,"vertex","instance"],De={undefined:1,unknown:1,destroyed:2},je=t=>-9007199254740992>t||9007199254740992<t?NaN:Number(t),Be=(t,e)=>{for(var r=0,n=t.length-1;0<=n;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},ze=t=>{var e="/"===t.charAt(0),r="/"===t.slice(-1);return(t=Be(t.split("/").filter(t=>!!t),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},Je=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],t||e?(e&&=e.slice(0,-1),t+e):"."},We=t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],Ge=t=>{(Ge=(()=>{if(a){var t=o("crypto");return e=>t.randomFillSync(e)}return t=>crypto.getRandomValues(t)})())(t)},He=(...t)=>{for(var e="",r=!1,n=t.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?t[n]:Or.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r="/"===r.charAt(0)}return e=Be(e.split("/").filter(t=>!!t),!r).join("/"),(r?"/":"")+e||"."},qe=(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;0<=r&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=He(t).slice(1),e=He(e).slice(1),t=r(t.split("/")),e=r(e.split("/"));for(var n=Math.min(t.length,e.length),i=n,a=0;a<n;a++)if(t[a]!==e[a]){i=a;break}for(n=[],a=i;a<t.length;a++)n.push("..");return(n=n.concat(e.slice(i))).join("/")},Xe=t=>{var e=B(t,0);return j.decode(t.buffer?t.subarray(0,e):new Uint8Array(t.slice(0,e)))},Ye=[],Ke=t=>{var e=Array(Vt(t)+1);return t=Ft(t,e,0,e.length),e.length=t,e},Qe=[];function Ze(t,e){Qe[t]={input:[],output:[],Gb:e},dr(t,tr)}var tr={open(t){var e=Qe[t.node.rdev];if(!e)throw new Or.Ia(43);t.tty=e,t.seekable=!1},close(t){t.tty.Gb.fsync(t.tty)},fsync(t){t.tty.Gb.fsync(t.tty)},read(t,e,r,n){if(!t.tty||!t.tty.Gb.kc)throw new Or.Ia(60);for(var i=0,a=0;a<n;a++){try{var o=t.tty.Gb.kc(t.tty)}catch(t){throw new Or.Ia(29)}if(void 0===o&&0===i)throw new Or.Ia(6);if(null==o)break;i++,e[r+a]=o}return i&&(t.node.atime=Date.now()),i},write(t,e,r,n){if(!t.tty||!t.tty.Gb.$b)throw new Or.Ia(60);try{for(var i=0;i<n;i++)t.tty.Gb.$b(t.tty,e[r+i])}catch(t){throw new Or.Ia(29)}return n&&(t.node.mtime=t.node.ctime=Date.now()),i}},er={kc(){t:{if(!Ye.length){var t=null;if(a){var e=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=d.readSync(n,e,0,256)}catch(t){if(!t.toString().includes("EOF"))throw t;r=0}0<r&&(t=e.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(t=window.prompt("Input: "))&&(t+="\n");if(!t){t=null;break t}Ye=Ke(t)}t=Ye.shift()}return t},$b(t,e){null===e||10===e?(I(Xe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(I(Xe(t.output)),t.output=[])},ld:()=>({Xc:25856,Zc:5,Wc:191,Yc:35387,Vc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),md:()=>0,nd:()=>[24,80]},rr={$b(t,e){null===e||10===e?(C(Xe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(C(Xe(t.output)),t.output=[])}},nr={tb:null,Wa:()=>nr.createNode(null,"/",16895,0),createNode(t,e,r,n){if(24576==(61440&r)||Or.isFIFO(r))throw new Or.Ia(63);return nr.tb||(nr.tb={dir:{node:{qb:nr.La.qb,sb:nr.La.sb,lookup:nr.La.lookup,vb:nr.La.vb,rename:nr.La.rename,unlink:nr.La.unlink,rmdir:nr.La.rmdir,readdir:nr.La.readdir,symlink:nr.La.symlink},stream:{lb:nr.Ma.lb}},file:{node:{qb:nr.La.qb,sb:nr.La.sb},stream:{lb:nr.Ma.lb,read:nr.Ma.read,write:nr.Ma.write,Fb:nr.Ma.Fb,Kb:nr.Ma.Kb}},link:{node:{qb:nr.La.qb,sb:nr.La.sb,readlink:nr.La.readlink},stream:{}},ec:{node:{qb:nr.La.qb,sb:nr.La.sb},stream:Or.xc}}),fr((r=Or.createNode(t,e,r,n)).mode)?(r.La=nr.tb.dir.node,r.Ma=nr.tb.dir.stream,r.Na={}):Or.isFile(r.mode)?(r.La=nr.tb.file.node,r.Ma=nr.tb.file.stream,r.Ya=0,r.Na=null):40960==(61440&r.mode)?(r.La=nr.tb.link.node,r.Ma=nr.tb.link.stream):8192==(61440&r.mode)&&(r.La=nr.tb.ec.node,r.Ma=nr.tb.ec.stream),r.atime=r.mtime=r.ctime=Date.now(),t&&(t.Na[e]=r,t.atime=t.mtime=t.ctime=r.atime),r},kd:t=>t.Na?t.Na.subarray?t.Na.subarray(0,t.Ya):new Uint8Array(t.Na):new Uint8Array(0),La:{qb(t){var e={};return e.dev=8192==(61440&t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,e.size=fr(t.mode)?4096:Or.isFile(t.mode)?t.Ya:40960==(61440&t.mode)?t.link.length:0,e.atime=new Date(t.atime),e.mtime=new Date(t.mtime),e.ctime=new Date(t.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},sb(t,e){for(var r of["mode","atime","mtime","ctime"])null!=e[r]&&(t[r]=e[r]);void 0!==e.size&&t.Ya!=(e=e.size)&&(0==e?(t.Na=null,t.Ya=0):(r=t.Na,t.Na=new Uint8Array(e),r&&t.Na.set(r.subarray(0,Math.min(e,t.Ya))),t.Ya=e))},lookup(){throw nr.Tb||(nr.Tb=new Or.Ia(44),nr.Tb.stack="<generic error, no stack>"),nr.Tb},vb:(t,e,r,n)=>nr.createNode(t,e,r,n),rename(t,e,r){try{var n=pr(e,r)}catch(t){}if(n){if(fr(t.mode))for(var i in n.Na)throw new Or.Ia(55);mr(n)}delete t.parent.Na[t.name],e.Na[r]=t,t.name=r,e.ctime=e.mtime=t.parent.ctime=t.parent.mtime=Date.now()},unlink(t,e){delete t.Na[e],t.ctime=t.mtime=Date.now()},rmdir(t,e){var r,n=pr(t,e);for(r in n.Na)throw new Or.Ia(55);delete t.Na[e],t.ctime=t.mtime=Date.now()},readdir:t=>[".","..",...Object.keys(t.Na)],symlink:(t,e,r)=>((t=nr.createNode(t,e,41471,0)).link=r,t),readlink(t){if(40960!=(61440&t.mode))throw new Or.Ia(28);return t.link}},Ma:{read(t,e,r,n,i){var a=t.node.Na;if(i>=t.node.Ya)return 0;if(8<(t=Math.min(t.node.Ya-i,n))&&a.subarray)e.set(a.subarray(i,i+t),r);else for(n=0;n<t;n++)e[r+n]=a[i+n];return t},write(t,e,r,n,i,a){if(e.buffer===v.buffer&&(a=!1),!n)return 0;if((t=t.node).mtime=t.ctime=Date.now(),e.subarray&&(!t.Na||t.Na.subarray)){if(a)return t.Na=e.subarray(r,r+n),t.Ya=n;if(0===t.Ya&&0===i)return t.Na=e.slice(r,r+n),t.Ya=n;if(i+n<=t.Ya)return t.Na.set(e.subarray(r,r+n),i),n}var o=t.Na?t.Na.length:0;if(o>=(a=i+n)||(a=Math.max(a,o*(1048576>o?2:1.125)>>>0),0!=o&&(a=Math.max(a,256)),o=t.Na,t.Na=new Uint8Array(a),0<t.Ya&&t.Na.set(o.subarray(0,t.Ya),0)),t.Na.subarray&&e.subarray)t.Na.set(e.subarray(r,r+n),i);else for(a=0;a<n;a++)t.Na[i+a]=e[r+a];return t.Ya=Math.max(t.Ya,i+n),n},lb(t,e,r){if(1===r?e+=t.position:2===r&&Or.isFile(t.node.mode)&&(e+=t.node.Ya),0>e)throw new Or.Ia(28);return e},Fb(t,e,r,n,i){if(!Or.isFile(t.node.mode))throw new Or.Ia(43);if(t=t.node.Na,2&i||!t||t.buffer!==v.buffer){if(n=!0,R(),!(i=void 0))throw new Or.Ia(48);t&&((0<r||r+e<t.length)&&(t=t.subarray?t.subarray(r,r+e):Array.prototype.slice.call(t,r,r+e)),v.set(t,i))}else n=!1,i=t.byteOffset;return{Va:i,Rc:n}},Kb:(t,e,r,n)=>(nr.Ma.write(t,e,0,n,r,!1),0)}},ir=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},ar=0,or=null,sr=()=>{if(ar--,r.monitorRunDependencies?.(ar),0==ar&&or){var t=or;or=null,t()}},lr=()=>{ar++,r.monitorRunDependencies?.(ar)},cr=[],ur=async(t,e,r,n,i,a,o,l)=>{var c=e?He(ze(t+"/"+e)):t;lr();try{var u=r;"string"==typeof r&&(u=await(async t=>(t=await s(t),new Uint8Array(t)))(r)),u=await(async(t,e)=>{for(var r of("undefined"!=typeof Browser&&hr(),cr))if(r.canHandle(e))return r.handle(t,e);return t})(u,c),l?.(),a||br(t,e,u,n,i,o)}finally{sr()}};function hr(){var t,e,n;Or.Vb=!0,t??=r.stdin,e??=r.stdout,n??=r.stderr,t?Or.yb("/dev","stdin",t):Or.symlink("/dev/tty","/dev/stdin"),e?Or.yb("/dev","stdout",null,e):Or.symlink("/dev/tty","/dev/stdout"),n?Or.yb("/dev","stderr",null,n):Or.symlink("/dev/tty1","/dev/stderr"),Or.open("/dev/stdin",0),Or.open("/dev/stdout",1),Or.open("/dev/stderr",1)}function dr(t,e){Or.ic[t]={Ma:e}}function fr(t){return 16384==(61440&t)}function pr(t,e){var r=fr(t.mode)?(r=_r(t,"x"))?r:t.La.lookup?0:2:54;if(r)throw new Or.Ia(r);for(r=Or.wb[gr(t.id,e)];r;r=r.Db)if(r.parent.id===t.id&&r.name===e)return r;return Or.lookup(t,e)}function mr(t){var e=gr(t.parent.id,t.name);if(Or.wb[e]===t)Or.wb[e]=t.Db;else for(e=Or.wb[e];e;){if(e.Db===t){e.Db=t.Db;break}e=e.Db}}function br(t,e,r,n,i,a){var o=e;if(t&&(t="string"==typeof t?t:wr(t),o=e?ze(t+"/"+e):t),t=ir(n,i),o=Or.create(o,t),r){if("string"==typeof r){for(e=Array(r.length),n=0,i=r.length;n<i;++n)e[n]=r.charCodeAt(n);r=e}Or.chmod(o,146|t),e=Or.open(o,577),Or.write(e,r,0,r.length,0,a),Or.close(e),Or.chmod(o,t)}}function vr(t,e={}){if(!t)throw new Or.Ia(44);e.Nb??(e.Nb=!0),"/"===t.charAt(0)||(t=Or.cwd()+"/"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(t=>!!t);for(var n=Or.root,i="/",a=0;a<t.length;a++){var o=a===t.length-1;if(o&&e.parent)break;if("."!==t[a])if(".."===t[a]){if(i=Je(i),Or.Xb(n)){t=i+"/"+t.slice(a+1).join("/"),r--;continue t}n=n.parent}else{i=ze(i+"/"+t[a]);try{n=pr(n,t[a])}catch(t){if(44===t?.Bb&&o&&e.Jc)return{path:i};throw t}if(!n.rb||o&&!e.Nb||(n=n.rb.root),40960==(61440&n.mode)&&(!o||e.pb)){if(!n.La.readlink)throw new Or.Ia(52);"/"===(n=n.La.readlink(n)).charAt(0)||(n=Je(i)+"/"+n),t=n+"/"+t.slice(a+1).join("/");continue t}}}return{path:i,node:n}}throw new Or.Ia(32)}function wr(t){for(var e;;){if(Or.Xb(t))return t=t.Wa.oc,e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t;e=e?`${t.name}/${e}`:t.name,t=t.parent}}function gr(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%Or.wb.length}function yr(t){var e=gr(t.parent.id,t.name);t.Db=Or.wb[e],Or.wb[e]=t}function $r(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e}function _r(t,e){return Or.lc?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2}function Ar(t,e){if(!fr(t.mode))return 54;try{return pr(t,e),20}catch(t){}return _r(t,"wx")}function xr(t,e,r){try{var n=pr(t,e)}catch(t){return t.Bb}if(t=_r(t,"wx"))return t;if(r){if(!fr(n.mode))return 54;if(Or.Xb(n)||wr(n)===Or.cwd())return 10}else if(fr(n.mode))return 31;return 0}function Sr(t,e){if(!t)throw new Or.Ia(e);return t}function kr(t){if(!(t=Or.Fc(t)))throw new Or.Ia(8);return t}function Er(t,e=-1){if(t=Object.assign(new Or.uc,t),-1==e)t:{for(e=0;e<=Or.vc;e++)if(!Or.streams[e])break t;throw new Or.Ia(33)}return t.fd=e,Or.streams[e]=t}function Ir(t,e,r){var n=t?.Ma.sb;t=n?t:e,n??=e.La.sb,Sr(n,63),n(t,r)}function Cr(t){var e=[];for(t=[t];t.length;){var r=t.pop();e.push(r),t.push(...r.Jb)}return e}function Tr(t){var e={Uc:4096,gd:4096,blocks:1e6,Tc:5e5,Sc:5e5,files:Or.Zb,dd:Or.Zb-1,hd:42,flags:2,qd:255};return t.La.rc&&Object.assign(e,t.La.rc(t.Wa.Kc.root)),e}function Pr(t,e,r){return void 0===r&&(r=e,e=438),Or.vb(t,8192|e,r)}function Mr(t,e,r,n){Ir(t,e,{mode:4095&r|-4096&e.mode,ctime:Date.now(),jc:n})}function Ur(t,e,r){if(fr(e.mode))throw new Or.Ia(31);if(!Or.isFile(e.mode))throw new Or.Ia(28);var n=_r(e,"w");if(n)throw new Or.Ia(n);Ir(t,e,{size:r,timestamp:Date.now()})}function Rr(t){if(!(t.Hc||t.Ic||t.link||t.Na))if(globalThis.XMLHttpRequest)R("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{t.Na=l(t.url)}catch(t){throw new Or.Ia(29)}}var Or={root:null,Jb:[],ic:{},streams:[],Zb:1,wb:null,fc:"/",Vb:!1,lc:!0,Bc:null,Qb:0,qc:{},Ia:class{name="ErrnoError";constructor(t){this.Bb=t}},uc:class{ub={};node=null;get object(){return this.node}set object(t){this.node=t}get flags(){return this.ub.flags}set flags(t){this.ub.flags=t}get position(){return this.ub.position}set position(t){this.ub.position=t}},tc:class{La={};Ma={};rb=null;constructor(t,e,r,n){t||=this,this.parent=t,this.Wa=t.Wa,this.id=Or.Zb++,this.name=e,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(t){t?this.mode|=146:this.mode&=-147}get Ic(){return fr(this.mode)}get Hc(){return 8192==(61440&this.mode)}},createNode:(t,e,r,n)=>(yr(t=new Or.tc(t,e,r,n)),t),Xb:t=>t===t.parent,isFile:t=>32768==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>!(49152&~t),vc:4096,Fc:t=>Or.streams[t],cd:(t,e=-1)=>(t=Er(t,e),t.Ma?.bd?.(t),t),xc:{open(t){t.Ma=Or.Dc(t.node.rdev).Ma,t.Ma.open?.(t)},lb(){throw new Or.Ia(70)}},Yb:t=>t>>8,od:t=>255&t,Cb:(t,e)=>t<<8|e,Dc:t=>Or.ic[t],sc(t,e){function r(t){return Or.Qb--,e(t)}function n(t){if(t){if(!n.Ac)return n.Ac=!0,r(t)}else++o>=a.length&&r(null)}"function"==typeof t&&(e=t,t=!1),Or.Qb++,1<Or.Qb&&C(`warning: ${Or.Qb} FS.syncfs operations in flight at once, probably just doing extra work`);var i,a=Cr(Or.root.Wa),o=0;for(i of a)i.type.sc?i.type.sc(i,t,n):n(null)},Wa(t,e,r){var n="/"===r;if(n&&Or.root)throw new Or.Ia(10);if(!n&&r){var i=vr(r,{Nb:!1});if(r=i.path,(i=i.node).rb)throw new Or.Ia(10);if(!fr(i.mode))throw new Or.Ia(54)}return(t=t.Wa(e={type:t,Kc:e,oc:r,Jb:[]})).Wa=e,e.root=t,n?Or.root=t:i&&(i.rb=e,i.Wa&&i.Wa.Jb.push(e)),t},xd(t){if(!(t=vr(t,{Nb:!1})).node.rb)throw new Or.Ia(28);var e=(t=t.node).rb,r=Cr(e);for([,i]of Object.entries(Or.wb))for(;i;){var n=i.Db;r.includes(i.Wa)&&mr(i);var i=n}t.rb=null,t.Wa.Jb.splice(t.Wa.Jb.indexOf(e),1)},lookup:(t,e)=>t.La.lookup(t,e),vb(t,e,r){var n=vr(t,{parent:!0}).node;if(!(t=We(t)))throw new Or.Ia(28);if("."===t||".."===t)throw new Or.Ia(20);var i=Ar(n,t);if(i)throw new Or.Ia(i);if(!n.La.vb)throw new Or.Ia(63);return n.La.vb(n,t,e,r)},rc:t=>Tr(vr(t,{pb:!0}).node),td:t=>Tr(t.node),create:(t,e=438)=>Or.vb(t,4095&e|32768,0),mkdir:(t,e=511)=>Or.vb(t,1023&e|16384,0),pd(t,e){var r,n=t.split("/"),i="";for(r of n)if(r){(i||"/"===t.charAt(0))&&(i+="/"),i+=r;try{Or.mkdir(i,e)}catch(t){if(20!=t.Bb)throw t}}},symlink(t,e){if(!He(t))throw new Or.Ia(44);var r=vr(e,{parent:!0}).node;if(!r)throw new Or.Ia(44);var n=Ar(r,e=We(e));if(n)throw new Or.Ia(n);if(!r.La.symlink)throw new Or.Ia(63);return r.La.symlink(r,e,t)},rename(t,e){var r=Je(t),n=Je(e),i=We(t),a=We(e),o=vr(t,{parent:!0}),s=o.node;if(o=(o=vr(e,{parent:!0})).node,!s||!o)throw new Or.Ia(44);if(s.Wa!==o.Wa)throw new Or.Ia(75);var l=pr(s,i);if("."!==(t=qe(t,n)).charAt(0))throw new Or.Ia(28);if("."!==(t=qe(e,r)).charAt(0))throw new Or.Ia(55);try{var c=pr(o,a)}catch(t){}if(l!==c){if(i=xr(s,i,e=fr(l.mode)))throw new Or.Ia(i);if(i=c?xr(o,a,e):Ar(o,a))throw new Or.Ia(i);if(!s.La.rename)throw new Or.Ia(63);if(l.rb||c&&c.rb)throw new Or.Ia(10);if(o!==s&&(i=_r(s,"w")))throw new Or.Ia(i);mr(l);try{s.La.rename(l,o,a),l.parent=o}catch(t){throw t}finally{yr(l)}}},rmdir(t){var e=vr(t,{parent:!0}).node,r=pr(e,t=We(t)),n=xr(e,t,!0);if(n)throw new Or.Ia(n);if(!e.La.rmdir)throw new Or.Ia(63);if(r.rb)throw new Or.Ia(10);e.La.rmdir(e,t),mr(r)},readdir:t=>Sr((t=vr(t,{pb:!0}).node).La.readdir,54)(t),unlink(t){var e=vr(t,{parent:!0}).node;if(!e)throw new Or.Ia(44);var r=pr(e,t=We(t)),n=xr(e,t,!1);if(n)throw new Or.Ia(n);if(!e.La.unlink)throw new Or.Ia(63);if(r.rb)throw new Or.Ia(10);e.La.unlink(e,t),mr(r)},readlink(t){if(!(t=vr(t).node))throw new Or.Ia(44);if(!t.La.readlink)throw new Or.Ia(28);return t.La.readlink(t)},stat:(t,e)=>Sr((t=vr(t,{pb:!e}).node).La.qb,63)(t),fstat(t){var e=kr(t);t=e.node;var r=e.Ma.qb;return e=r?e:t,r??=t.La.qb,Sr(r,63),r(e)},lstat:t=>Or.stat(t,!0),chmod(t,e,r){Mr(null,t="string"==typeof t?vr(t,{pb:!r}).node:t,e,r)},lchmod(t,e){Or.chmod(t,e,!0)},fchmod(t,e){Mr(t=kr(t),t.node,e,!1)},chown(t,e,r,n){Ir(null,t="string"==typeof t?vr(t,{pb:!n}).node:t,{timestamp:Date.now(),jc:n})},lchown(t,e,r){Or.chown(t,e,r,!0)},fchown(t){Ir(t=kr(t),t.node,{timestamp:Date.now(),jc:!1})},truncate(t,e){if(0>e)throw new Or.Ia(28);Ur(null,t="string"==typeof t?vr(t,{pb:!0}).node:t,e)},jd(t,e){if(t=kr(t),0>e||!(2097155&t.flags))throw new Or.Ia(28);Ur(t,t.node,e)},yd(t,e,r){Sr((t=vr(t,{pb:!0}).node).La.sb,63)(t,{atime:e,mtime:r})},open(t,e,n=438){if(""===t)throw new Or.Ia(44);if("string"==typeof e){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===i)throw Error(`Unknown file open mode: ${e}`);e=i}if(n=64&e?4095&n|32768:0,"object"==typeof t)i=t;else{var a=t.endsWith("/");i=(t=vr(t,{pb:!(131072&e),Jc:!0})).node,t=t.path}var o=!1;if(64&e)if(i){if(128&e)throw new Or.Ia(20)}else{if(a)throw new Or.Ia(31);i=Or.vb(t,511|n,0),o=!0}if(!i)throw new Or.Ia(44);if(8192==(61440&i.mode)&&(e&=-513),65536&e&&!fr(i.mode))throw new Or.Ia(54);if(!o&&(a=i?40960==(61440&i.mode)?32:fr(i.mode)&&("r"!==$r(e)||576&e)?31:_r(i,$r(e)):44))throw new Or.Ia(a);return 512&e&&!o&&Or.truncate(i,0),e&=-131713,(a=Er({node:i,path:wr(i),flags:e,seekable:!0,position:0,Ma:i.Ma,Qc:[],error:!1})).Ma.open&&a.Ma.open(a),o&&Or.chmod(i,511&n),!r.logReadFiles||1&e||t in Or.qc||(Or.qc[t]=1),a},close(t){if(null===t.fd)throw new Or.Ia(8);t.Ub&&(t.Ub=null);try{t.Ma.close&&t.Ma.close(t)}catch(t){throw t}finally{Or.streams[t.fd]=null}t.fd=null},lb(t,e,r){if(null===t.fd)throw new Or.Ia(8);if(!t.seekable||!t.Ma.lb)throw new Or.Ia(70);if(0!=r&&1!=r&&2!=r)throw new Or.Ia(28);return t.position=t.Ma.lb(t,e,r),t.Qc=[],t.position},read(t,e,r,n,i){if(0>n||0>i)throw new Or.Ia(28);if(null===t.fd)throw new Or.Ia(8);if(1==(2097155&t.flags))throw new Or.Ia(8);if(fr(t.node.mode))throw new Or.Ia(31);if(!t.Ma.read)throw new Or.Ia(28);var a=void 0!==i;if(a){if(!t.seekable)throw new Or.Ia(70)}else i=t.position;return e=t.Ma.read(t,e,r,n,i),a||(t.position+=e),e},write(t,e,r,n,i,a){if(0>n||0>i)throw new Or.Ia(28);if(null===t.fd)throw new Or.Ia(8);if(!(2097155&t.flags))throw new Or.Ia(8);if(fr(t.node.mode))throw new Or.Ia(31);if(!t.Ma.write)throw new Or.Ia(28);t.seekable&&1024&t.flags&&Or.lb(t,0,2);var o=void 0!==i;if(o){if(!t.seekable)throw new Or.Ia(70)}else i=t.position;return e=t.Ma.write(t,e,r,n,i,a),o||(t.position+=e),e},Fb(t,e,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&t.flags))throw new Or.Ia(2);if(1==(2097155&t.flags))throw new Or.Ia(2);if(!t.Ma.Fb)throw new Or.Ia(43);if(!e)throw new Or.Ia(28);return t.Ma.Fb(t,e,r,n,i)},Kb:(t,e,r,n,i)=>t.Ma.Kb?t.Ma.Kb(t,e,r,n,i):0,mc(t,e,r){if(!t.Ma.mc)throw new Or.Ia(59);return t.Ma.mc(t,e,r)},readFile(t,e={}){e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding&&R(`Invalid encoding type "${e.encoding}"`);var r=Or.open(t,e.flags);t=Or.stat(t).size;var n=new Uint8Array(t);return Or.read(r,n,0,t,0),"utf8"===e.encoding&&(n=Xe(n)),Or.close(r),n},writeFile(t,e,r={}){r.flags=r.flags||577,t=Or.open(t,r.flags,r.mode),"string"==typeof e&&(e=new Uint8Array(Ke(e))),ArrayBuffer.isView(e)?Or.write(t,e,0,e.byteLength,void 0,r.$c):R("Unsupported data type"),Or.close(t)},cwd:()=>Or.fc,chdir(t){if(null===(t=vr(t,{pb:!0})).node)throw new Or.Ia(44);if(!fr(t.node.mode))throw new Or.Ia(54);var e=_r(t.node,"x");if(e)throw new Or.Ia(e);Or.fc=t.path},sd(){for(var t of(Or.Vb=!1,Or.streams))t&&Or.close(t)},ed(t,e){try{var r=vr(t,{pb:!e});t=r.path}catch(t){}var n=!1,i=null;try{r=vr(t,{parent:!0}),We(t),r=vr(t,{pb:!e}),n=!0,i=r.node}catch(t){}return n?i:null},yb(t,e,r,n){var i;return t=((t,e)=>ze(t+"/"+e))("string"==typeof t?t:wr(t),e),e=ir(!!r,!!n),(i=Or.yb).Yb??(i.Yb=64),dr(i=Or.Cb(Or.yb.Yb++,0),{open(t){t.seekable=!1},close(){n?.buffer?.length&&n(10)},read(t,e,n,i){for(var a=0,o=0;o<i;o++){try{var s=r()}catch(t){throw new Or.Ia(29)}if(void 0===s&&0===a)throw new Or.Ia(6);if(null==s)break;a++,e[n+o]=s}return a&&(t.node.atime=Date.now()),a},write(t,e,r,i){for(var a=0;a<i;a++)try{n(e[r+a])}catch(t){throw new Or.Ia(29)}return i&&(t.node.mtime=t.node.ctime=Date.now()),a}}),Pr(t,e,i)}},Lr=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];if((()=>{let t=rt.prototype;Object.assign(t,{isAliasOf:function(t){if(!(this instanceof rt&&t instanceof rt))return!1;var e=this.Ja.Xa.Ua,r=this.Ja.Va;t.Ja=t.Ja;var n=t.Ja.Xa.Ua;for(t=t.Ja.Va;e.kb;)r=e.Mb(r),e=e.kb;for(;n.kb;)t=n.Mb(t),n=n.kb;return e===n&&r===t},clone:function(){if(this.Ja.Va||Q(this),this.Ja.Lb)return this.Ja.count.value+=1,this;var t=et,e=Object,r=e.create,n=Object.getPrototypeOf(this),i=this.Ja;return(t=t(r.call(e,n,{Ja:{value:{count:i.count,Ib:i.Ib,Lb:i.Lb,Va:i.Va,Xa:i.Xa,ib:i.ib,mb:i.mb}}}))).Ja.count.value+=1,t.Ja.Ib=!1,t},delete(){if(this.Ja.Va||Q(this),this.Ja.Ib&&!this.Ja.Lb)throw new q("Object already scheduled for deletion");tt(this);var t=this.Ja;--t.count.value,0===t.count.value&&(t.ib?t.mb.zb(t.ib):t.Xa.Ua.zb(t.Va)),this.Ja.Lb||(this.Ja.ib=void 0,this.Ja.Va=void 0)},isDeleted:function(){return!this.Ja.Va},deleteLater:function(){if(this.Ja.Va||Q(this),this.Ja.Ib&&!this.Ja.Lb)throw new q("Object already scheduled for deletion");return this.Ja.Ib=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)})(),Object.assign(gt.prototype,{Ec(t){return this.pc&&(t=this.pc(t)),t},hc(t){this.zb?.(t)},xb:ft,jb:function(t){function e(){return vt(this.Ua.Eb,this.Pb?{Xa:this.Lc,Va:r,mb:this,ib:t}:{Xa:this,Va:t})}var r=this.Ec(t);if(!r)return this.hc(t),null;var n=((t,e)=>{if(void 0===e)throw new q("ptr should not be undefined");for(;t.kb;)e=t.Mb(e),t=t.kb;return mt[e]})(this.Ua,r);if(void 0!==n)return 0===n.Ja.count.value?(n.Ja.Va=r,n.Ja.ib=t,n.clone()):(n=n.clone(),this.hc(t),n);if(n=this.Ua.Cc(r),!(n=it[n]))return e.call(this);var i=pt(r,this.Ua,(n=this.Ob?n.yc:n.pointerType).Ua);return null===i?e.call(this):vt(n.Ua.Eb,this.Pb?{Xa:n,Va:i,mb:this,ib:t}:{Xa:n,Va:i})}}),Or.ad=(t,e,r,n,i,a,o,s,l,c)=>{ur(t,e,r,n,i,s,l,c).then(a).catch(o)},Or.rd=ur,Or.wb=Array(4096),Or.Wa(nr,{},"/"),Or.mkdir("/tmp"),Or.mkdir("/home"),Or.mkdir("/home/web_user"),function(){Or.mkdir("/dev"),dr(Or.Cb(1,3),{read:()=>0,write:(t,e,r,n)=>n,lb:()=>0}),Pr("/dev/null",Or.Cb(1,3)),Ze(Or.Cb(5,0),er),Ze(Or.Cb(6,0),rr),Pr("/dev/tty",Or.Cb(5,0)),Pr("/dev/tty1",Or.Cb(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(Ge(t),e=t.byteLength),t[--e]);Or.yb("/dev","random",r),Or.yb("/dev","urandom",r),Or.mkdir("/dev/shm"),Or.mkdir("/dev/shm/tmp")}(),function(){Or.mkdir("/proc");var t=Or.mkdir("/proc/self");Or.mkdir("/proc/self/fd"),Or.Wa({Wa(){var e=Or.createNode(t,"fd",16895,73);return e.Ma={lb:nr.Ma.lb},e.La={lookup(t,e){var r=kr(t=+e);return(t={parent:null,Wa:{oc:"fake"},La:{readlink:()=>r.path},id:t+1}).parent=t},readdir:()=>Array.from(Or.streams.entries()).filter(([,t])=>t).map(([t])=>t.toString())},e}},{},"/proc/self/fd")}(),Or.Bc={MEMFS:nr},r.noExitRuntime&&(D=r.noExitRuntime),r.preloadPlugins&&(cr=r.preloadPlugins),r.print&&(I=r.print),r.printErr&&(C=r.printErr),r.wasmBinary&&(f=r.wasmBinary),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();r.addRunDependency=lr,r.removeRunDependency=sr,r.FS_preloadFile=ur,r.FS_unlink=(...t)=>Or.unlink(...t),r.FS_createPath=(...t)=>function(t,e){for(t="string"==typeof t?t:wr(t),e=e.split("/").reverse();e.length;){var r=e.pop();if(r){var n=ze(t+"/"+r);try{Or.mkdir(n)}catch(t){if(20!=t.Bb)throw t}t=n}}return n}(...t),r.FS_createDevice=(...t)=>Or.yb(...t),r.FS=Or,r.FS_createDataFile=(...t)=>br(...t),r.FS_createLazyFile=(...t)=>function(t,e,r,n,a){class o{Sb=!1;ub=[];Rb=void 0;bc=0;ac=0;get(t){if(!(t>this.length-1||0>t)){var e=t%this.chunkSize;return this.Rb(t/this.chunkSize|0)[e]}}wc(t){this.Rb=t}cc(){var t=new XMLHttpRequest;t.open("HEAD",r,!1),t.send(null),200<=t.status&&300>t.status||304===t.status||R("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e;t=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e;var a=1048576;i||(a=n);var o=this;o.wc(t=>{var e=t*a,i=(t+1)*a-1;if(i=Math.min(i,n-1),void 0===o.ub[t]){var s=o.ub;e>i&&R("invalid range ("+e+", "+i+") or no bytes requested!"),i>n-1&&R("only "+n+" bytes available! programmer error!");var l=new XMLHttpRequest;l.open("GET",r,!1),n!==a&&l.setRequestHeader("Range","bytes="+e+"-"+i),l.responseType="arraybuffer",l.overrideMimeType&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send(null),200<=l.status&&300>l.status||304===l.status||R("Couldn't load "+r+". Status: "+l.status),e=void 0!==l.response?new Uint8Array(l.response||[]):Ke(l.responseText||""),s[t]=e}return void 0===o.ub[t]&&R("doXHR failed!"),o.ub[t]}),!t&&n||(a=n=1,a=n=this.Rb(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this.bc=n,this.ac=a,this.Sb=!0}get length(){return this.Sb||this.cc(),this.bc}get chunkSize(){return this.Sb||this.cc(),this.ac}}if(globalThis.XMLHttpRequest){i||R("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var s=new o,l=void 0}else l=r,s=void 0;var c=function(t,e,r,n){return t="string"==typeof t?t:wr(t),e=ze(t+"/"+e),Or.create(e,ir(r,n))}(t,e,n,a);s?c.Na=s:l&&(c.Na=null,c.url=l),Object.defineProperties(c,{Ya:{get:function(){return this.Na.length}}}),t={};for(const[e,r]of Object.entries(c.Ma))t[e]=(...t)=>(Rr(c),r(...t));return t.read=(t,e,r,n,i)=>{if(Rr(c),i>=(t=t.node.Na).length)e=0;else{if(n=Math.min(t.length-i,n),t.slice)for(var a=0;a<n;a++)e[r+a]=t[i+a];else for(a=0;a<n;a++)e[r+a]=t.get(i+a);e=n}return e},t.Fb=()=>{throw Rr(c),R(),new Or.Ia(48)},c.Ma=t,c}(...t);var Nr,Fr,Vr,Dr,jr,Br,zr,Jr,Wr,Gr,Hr,qr,Xr,Yr,Kr,Qr,Zr,tn,en,rn,nn,an,on,sn,ln,cn,un={a:(t,e,r,n)=>R(`Assertion failed: ${z(t)}, at: `+[e?z(e):"unknown filename",r,n?z(n):"unknown function"]),Z:()=>R(""),O:(t,e,r,n,i)=>{e=J(e);let a=t=>t;if(n=0n===n){const t=8*r;a=e=>BigInt.asUintN(t,e),i=a(i)}Y(t,{name:e,jb:a,nb:(t,e)=>("number"==typeof e&&(e=BigInt(e)),e),xb:K(e,r,!n),ob:null})},va:(t,e,r,n)=>{Y(t,{name:e=J(e),jb:function(t){return!!t},nb:function(t,e){return e?r:n},xb:function(t){return this.jb(w[t])},ob:null})},sa:(t,e,r,n,i,a,o,s,l,c,u,h,d)=>{u=J(u),a=$t(i,a),s&&=$t(o,s),c&&=$t(l,c),d=$t(h,d);var f=(t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t})(u);ot(f,function(){xt(`Cannot construct ${u} due to unbound types`,[n])}),St([t,e,r],n?[n]:[],e=>{if(e=e[0],n)var r=e.Ua,i=r.Eb;else i=rt.prototype;e=nt(u,function(...t){if(Object.getPrototypeOf(this)!==o)throw new q(`Use 'new' to construct ${u}`);if(void 0===h.Ab)throw new q(`${u} has no accessible constructor`);var e=h.Ab[t.length];if(void 0===e)throw new q(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(h.Ab).toString()}) parameters instead!`);return e.apply(this,t)});var o=Object.create(i,{constructor:{value:e}});e.prototype=o;var l,h=new st(u,e,o,d,r,a,s,c);return h.kb&&((l=h.kb).dc??(l.dc=[]),h.kb.dc.push(h)),r=new gt(u,h,!0,!1,!1),l=new gt(u+"*",h,!1,!1,!1),i=new gt(u+" const*",h,!1,!0,!1),it[t]={pointerType:l,yc:i},yt(f,e),[r,l,i]})},ja:(t,e,r,n,i,a)=>{var o=kt(e,r);i=$t(n,i),St([],[t],t=>{var r=`constructor ${(t=t[0]).name}`;if(void 0===t.Ua.Ab&&(t.Ua.Ab=[]),void 0!==t.Ua.Ab[e-1])throw new q(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.Ua.Ab[e-1]=()=>{xt(`Cannot construct ${t.name} due to unbound types`,o)},St([],o,n=>(n.splice(1,0,null),t.Ua.Ab[e-1]=Ct(r,n,null,i,a),[])),[]})},n:(t,e,r,n,i,a,o,s,l)=>{var c=kt(r,n);e=J(e),e=Tt(e),a=$t(i,a),St([],[t],t=>{function n(){xt(`Cannot call ${i} due to unbound types`,c)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.Ua.Mc.push(e);var u=t.Ua.Eb,h=u[e];return void 0===h||void 0===h.hb&&h.className!==t.name&&h.Hb===r-2?(n.Hb=r-2,n.className=t.name,u[e]=n):(at(u,e,i),u[e].hb[r-2]=n),St([],c,n=>(n=Ct(i,n,t,a,o,l),void 0===u[e].hb?(n.Hb=r-2,u[e]=n):u[e].hb[r-2]=n,[])),[]})},ta:t=>Y(t,Lt),N:(t,e,r)=>{Y(t,{name:e=J(e),jb:t=>t,nb:(t,e)=>e,xb:Nt(e,r),ob:null})},P:(t,e,r,n,i,a,o)=>{var s=kt(e,r);t=J(t),t=Tt(t),i=$t(n,i),ot(t,function(){xt(`Cannot call ${t} due to unbound types`,s)},e-1),St([],s,r=>(r=[r[0],null].concat(r.slice(1)),yt(t,Ct(t,r,null,i,a,o),e-1),[]))},q:(t,e,r,n,i)=>{e=J(e);let a=t=>t;if(0===n){var o=32-8*r;a=t=>t<<o>>>o,i=a(i)}Y(t,{name:e,jb:a,nb:(t,e)=>e,xb:K(e,r,0!==n),ob:null})},m:(t,e,r)=>{function n(t){return new i(v.buffer,_[t+4>>2],_[t>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];Y(t,{name:r=J(r),jb:n,xb:n},{Gc:!0})},ua:(t,e)=>{Y(t,{name:e=J(e),jb(t){var e=z(t+4,_[t>>2],!0);return Nr(t),e},nb(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;if(!(r||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT))throw new q("Cannot pass non-string to std::string");var n=r?Vt(e):e.length,i=Fr(4+n+1),a=i+4;return _[i>>2]=n,r?Ft(e,w,a,n+1):w.set(e,a),null!==t&&t.push(Nr,i),i},xb:ft,ob(t){Nr(t)}})},D:(t,e,r)=>{if(r=J(r),2===e)var n=jt,i=Bt,a=zt;else n=Jt,i=Wt,a=Gt;Y(t,{name:r,jb:t=>{var r=n(t+4,_[t>>2]*e,!0);return Nr(t),r},nb:(t,n)=>{if("string"!=typeof n)throw new q(`Cannot pass non-string to C++ string type ${r}`);var o=a(n),s=Fr(4+o+e);return _[s>>2]=o/e,i(n,s+4,o+e),null!==t&&t.push(Nr,s),s},xb:ft,ob(t){Nr(t)}})},E:t=>{Y(t,Lt)},wa:(t,e)=>{Y(t,{nc:!0,name:e=J(e),jb:()=>{},nb:()=>{}})},T:()=>{D=!1,Ht=0},R:()=>{throw 1/0},s:(t,e,r)=>{var[n,...i]=((t,e)=>{for(var r=Array(t),n=0;n<t;++n){var i=n,a=_[e+4*n>>2],o=G[a];if(void 0===o)throw t=`parameter ${n} has unknown type ${At(a)}`,new q(t);r[i]=o}return r})(t,e);e=n.nb.bind(n);var a=i.map(t=>t.xb.bind(t));t--;var o={toValue:Rt};switch(t=a.map((t,e)=>{var r=`argFromPtr${e}`;return o[r]=t,`${r}(args${e?"+"+8*e:""})`}),r){case 0:var s="toValue(handle)";break;case 2:s="new (toValue(handle))";break;case 3:s="";break;case 1:o.getStringOrSymbol=Kt,s="toValue(handle)[getStringOrSymbol(methodName)]"}return s+=`(${t})`,n.nc||(o.toReturnWire=e,o.emval_returnValue=Xt,s=`return emval_returnValue(toReturnWire, destructorsRef, ${s})`),s=`return function (handle, methodName, destructorsRef, args) {\n ${s}\n }`,r=new Function(Object.keys(o),s)(...Object.values(o)),s=`methodCaller<(${i.map(t=>t.name)}) => ${n.name}>`,(t=>{var e=qt.length;return qt.push(t),e})(nt(s,r))},qa:Ut,xa:t=>t?(t=Kt(t),Ot(globalThis[t])):Ot(globalThis),v:(t,e)=>(t=Rt(t),e=Rt(e),Ot(t[e])),F:t=>{9<t&&(Mt[t+1]+=1)},r:(t,e,r,n,i)=>qt[t](e,r,n,i),ya:t=>Ot(Kt(t)),Q:t=>{var e=Rt(t);Et(e),Ut(t)},U:(t,e)=>{if(Qt[t]&&(clearTimeout(Qt[t].id),delete Qt[t]),!e)return 0;var r=setTimeout(()=>{delete Qt[t],te(()=>en(t,performance.now()))},e);return Qt[t]={id:r,vd:e},0},V:t=>{var e=w.length;if(2147483648<(t>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);t:{n=(Math.min(2147483648,65536*Math.ceil(Math.max(t,n)/65536))-sn.buffer.byteLength+65535)/65536|0;try{sn.grow(n),U();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},ba:function(t,e,r,n,i,a){e=je(e),r=je(r),t=ie(t);var o={};if(a){var s=_[a+12>>2];if(s){var l=_[a+16>>2];o.requiredFeatures=Array.from(_.subarray(l>>2,l+4*s>>2),t=>ge[t])}var c=_[a+20>>2];if(c){var u={};function h(t,e,r=!1){4294967295==(e=_[c+e>>2])||r&&0==e||(u[t]=e)}function d(t,e){4294967295==_[(e=c+e)>>2]&&4294967295==_[e+4>>2]||(u[t]=4294967296*_[e+4>>2]+_[e>>2])}h("maxTextureDimension1D",4),h("maxTextureDimension2D",8),h("maxTextureDimension3D",12),h("maxTextureArrayLayers",16),h("maxBindGroups",20),h("maxBindGroupsPlusVertexBuffers",24),h("maxDynamicUniformBuffersPerPipelineLayout",32),h("maxDynamicStorageBuffersPerPipelineLayout",36),h("maxSampledTexturesPerShaderStage",40),h("maxSamplersPerShaderStage",44),h("maxStorageBuffersPerShaderStage",48),h("maxStorageTexturesPerShaderStage",52),h("maxUniformBuffersPerShaderStage",56),h("minUniformBufferOffsetAlignment",80),h("minStorageBufferOffsetAlignment",84),d("maxUniformBufferBindingSize",64),d("maxStorageBufferBindingSize",72),h("maxVertexBuffers",88),d("maxBufferSize",96),h("maxVertexAttributes",104),h("maxVertexBufferArrayStride",108),h("maxInterStageShaderVariables",112),h("maxColorAttachments",116),h("maxColorAttachmentBytesPerSample",120),h("maxComputeWorkgroupStorageSize",124),h("maxComputeInvocationsPerWorkgroup",128),h("maxComputeWorkgroupSizeX",132),h("maxComputeWorkgroupSizeY",136),h("maxComputeWorkgroupSizeZ",140),h("maxComputeWorkgroupsPerDimension",144),h("maxImmediateSize",148,!0),o.requiredLimits=u}(s=_[a+24>>2])&&(s={label:oe(s+4)},o.defaultQueue=s),o.label=oe(a+4)}t.requestDevice(o).then(t=>{te(()=>{re[i>>>0]=t.queue,re[n>>>0]=t,t.lost.then(e=>{te(()=>{t.onuncapturederror=()=>{};var n=on(),i=ee(e.message);Kr(r,De[e.reason],i),nn(n)})}),t.onuncapturederror=t=>{var e=5;t.error instanceof GPUValidationError?e=2:t.error instanceof GPUOutOfMemoryError?e=3:t.error instanceof GPUInternalError&&(e=4);var r=on();t=ee(t.error.message),tn(n,e,t),nn(r)},Zr(e,1,n,0)})},t=>{te(()=>{var i=on(),a=ee(t.message);Zr(e,3,n,a),r&&Kr(r,4,a),nn(i)})})},da:t=>{var e=ie(t),r=ne[t];if(r){for(var n=0;n<r.length;++n)r[n]();delete ne[t]}e.destroy()},g:t=>{delete re[t]},aa:(t,e,r)=>{var n=!!_[e+32>>2];e={label:oe(e+4),usage:_[e+16>>2],size:4294967296*_[e+4+24>>2]+_[e+24>>2],mappedAtCreation:n},t=ie(t);try{var i=t.createBuffer(e)}catch(t){return!1}return re[r>>>0]=i,n&&(ne[r]=[]),!0},$:(t,e,r)=>{var n=_[e>>2],i=_[n+4>>2];e={label:oe(e+4),code:""},2===i&&(e.code=ae(n+8)),t=ie(t).createShaderModule(e),re[r>>>0]=t},ca:t=>{(t=ie(t)).onuncapturederror=null,t.destroy()},_:function(t,e,r,n){if(e=je(e),r){var i={featureLevel:we[_[r+4>>2]],powerPreference:Se[_[r+8>>2]],forceFallbackAdapter:!!_[r+12>>2]};0!==(t=_[r>>2])&&(i.zd=!!_[t+8>>2])}"gpu"in navigator?navigator.gpu.requestAdapter(i).then(t=>{te(()=>{if(t)re[n>>>0]=t,Qr(e,1,n,0);else{var r=on(),i=ee("WebGPU not available on this browser (requestAdapter returned null)");Qr(e,3,n,i),nn(r)}})},t=>{te(()=>{var r=on(),i=ee(t.message);Qr(e,4,n,i),nn(r)})}):(i=on(),t=ee("WebGPU not available on this browser (navigator.gpu is not available)"),Qr(e,3,n,t),nn(i))},X:function(t){try{var e=kr(t);return Or.close(e),0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},W:function(t,e,r,n){e=je(e);try{if(isNaN(e))return 61;var i=kr(t);return Or.lb(i,e,r),S[n>>3]=BigInt(i.position),i.Ub&&0===e&&0===r&&(i.Ub=null),0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},Y:function(t,e,r,n){try{t:{var i=kr(t);t=e;for(var a,o=e=0;o<r;o++){var s=_[t>>2],l=_[t+4>>2];t+=8;var c=Or.write(i,v,s,l,a);if(0>c){var u=-1;break t}if(e+=c,c<l)break;void 0!==a&&(a+=c)}u=e}return _[n>>2]=u,0}catch(t){if(void 0===Or||"ErrnoError"!==t.name)throw t;return t.Bb}},o:function(t,e){var r=on();try{return ln.get(t)(e)}catch(t){if(nn(r),t!==t+0)throw t;rn(1,0)}},i:function(t,e,r){var n=on();try{return ln.get(t)(e,r)}catch(t){if(nn(n),t!==t+0)throw t;rn(1,0)}},f:function(t,e,r,n){var i=on();try{return ln.get(t)(e,r,n)}catch(t){if(nn(i),t!==t+0)throw t;rn(1,0)}},H:function(t,e,r,n,i,a){var o=on();try{return ln.get(t)(e,r,n,i,a)}catch(t){if(nn(o),t!==t+0)throw t;rn(1,0)}},G:function(t){var e=on();try{ln.get(t)()}catch(t){if(nn(e),t!==t+0)throw t;rn(1,0)}},b:function(t,e){var r=on();try{ln.get(t)(e)}catch(t){if(nn(r),t!==t+0)throw t;rn(1,0)}},c:function(t,e,r){var n=on();try{ln.get(t)(e,r)}catch(t){if(nn(n),t!==t+0)throw t;rn(1,0)}},l:function(t,e,r,n){var i=on();try{ln.get(t)(e,r,n)}catch(t){if(nn(i),t!==t+0)throw t;rn(1,0)}},t:function(t,e,r,n,i){var a=on();try{ln.get(t)(e,r,n,i)}catch(t){if(nn(a),t!==t+0)throw t;rn(1,0)}},S:Zt,y:function(t){return BigInt(ie(t).size)},B:(t,e)=>{var r=_[e>>2],n=void 0;0!==r&&(n=4294967296*_[r+12>>2]+_[r+8>>2]),r=oe(e+4);for(var i=_[e+12>>2],a=_[e+16>>2],o=[],s=0;s<i;++s){var l=o,c=l.push,u=a+56*s,h=_[u+4>>2];if(0!==h){var d=$[u+8>>2];-1==d&&(d=void 0);var f=u+24;u={view:ie(h),depthSlice:d,resolveTarget:ie(_[u+12>>2]),clearValue:{r:x[f>>3],g:x[f+8>>3],b:x[f+16>>3],a:x[f+24>>3]},loadOp:Ae[_[u+16>>2]],storeOp:Pe[_[u+20>>2]]}}else u=void 0;c.call(l,u)}return i=0!==(i=_[e+20>>2])?{view:ie(_[i+4>>2]),depthClearValue:A[i+16>>2],depthLoadOp:Ae[_[i+8>>2]],depthStoreOp:Pe[_[i+12>>2]],depthReadOnly:!!_[i+20>>2],stencilClearValue:_[i+32>>2],stencilLoadOp:Ae[_[i+24>>2]],stencilStoreOp:Pe[_[i+28>>2]],stencilReadOnly:!!_[i+36>>2]}:void 0,a=0!==(a=_[e+28>>2])?{querySet:ie(_[a+4>>2]),beginningOfPassWriteIndex:_[a+8>>2],endOfPassWriteIndex:_[a+12>>2]}:void 0,e={label:r,colorAttachments:o,depthStencilAttachment:i,occlusionQuerySet:ie(_[e+24>>2]),timestampWrites:a,maxDrawCount:n},n=ie(t),t=Wr(0),e=n.beginRenderPass(e),re[t>>>0]=e,t},ia:(t,e,r,n)=>{ie(t).copyTextureToTexture(le(e),le(r),se(n))},la:t=>{var e=ie(t);return t=Br(0),e=e.finish(),re[t>>>0]=e,t},x:(t,e)=>{var r=oe(e+4),n=ie(_[e+12>>2]),i=_[e+16>>2];e=_[e+20>>2];for(var a=[],o=0;o<i;++o){var s=a,l=s.push,c=e+40*o,u=_[c+8>>2],h=_[c+32>>2],d=_[c+36>>2],f=_[c+4>>2];u?(-1==(h=_[(h=c+24)>>2]+4294967296*$[h+4>>2])&&(h=void 0),c={binding:f,resource:{buffer:ie(u),offset:4294967296*_[c+4+16>>2]+_[c+16>>2],size:h}}):c=h?{binding:f,resource:ie(h)}:{binding:f,resource:ie(d)},l.call(s,c)}return r={label:r,layout:n,entries:a},n=ie(t),t=Dr(0),r=n.createBindGroup(r),re[t>>>0]=r,t},p:(t,e)=>{var r=oe(e+4),n=_[e+12>>2];e=_[e+16>>2];for(var i=[],a=0;a<n;++a){var o=e+88*a,s=_[o+4>>2],l=_[o+8>>2],c=o+24,u=_[c+4>>2];c=u?{type:pe[u],hasDynamicOffset:!!_[c+8>>2],minBindingSize:4294967296*_[c+4+16>>2]+_[c+16>>2]}:void 0,u=(u=_[o+48+4>>2])?{type:Ie[u]}:void 0;var h=o+56,d=_[h+4>>2];h=d?{sampleType:Oe[d],viewDimension:Le[_[h+8>>2]],multisampled:!!_[h+12>>2]}:void 0,o=(d=_[(o+=72)+4>>2])?{access:Te[d],format:Re[_[o+8>>2]],viewDimension:Le[_[o+12>>2]]}:void 0,i.push.call(i,{binding:s,visibility:l,buffer:c,sampler:u,texture:h,storageTexture:o})}return r={label:r,entries:i},n=ie(t),t=jr(0),r=n.createBindGroupLayout(r),re[t>>>0]=r,t},ma:(t,e)=>{var r;return e&&(r={label:oe(e+4)}),e=ie(t),t=zr(0),r=e.createCommandEncoder(r),re[t>>>0]=r,t},ka:(t,e)=>{for(var r=_[e+12>>2],n=_[e+16>>2],i=[],a=0;a<r;++a)i.push(ie(_[n+4*a>>2]));return e={label:oe(e+4),bindGroupLayouts:i},r=ie(t),t=Jr(0),e=r.createPipelineLayout(e),re[t>>>0]=e,t},j:(t,e)=>{e=(t=>{function e(t){if(t)return{operation:fe[_[t>>2]],srcFactor:de[_[t+4>>2]],dstFactor:de[_[t+8>>2]]}}function r(t){return{compare:me[_[t>>2]],failOp:Ce[_[t+4>>2]],depthFailOp:Ce[_[t+8>>2]],passOp:Ce[_[t+12>>2]]}}return{label:oe(t+4),layout:ue(_[t+12>>2]),vertex:function(t){if(t){var e=ie(_[t+4>>2]),r=ce(_[t+16>>2],_[t+20>>2]),n=_[t+24>>2],i=_[t+28>>2];if(n){for(var a=[],o=0;o<n;++o){var s=a,l=s.push,c=i+24*o;if(c){var u=_[c+4>>2],h=_[c+16>>2];if(0===u&&0===h)var d=null;else{d=4294967296*_[c+4+8>>2]+_[c+8>>2],u=Ve[u],c=_[c+20>>2];for(var f=[],p=0;p<h;++p){var m=c+24*p;f.push.call(f,{format:Fe[_[m+4>>2]],offset:4294967296*_[m+4+8>>2]+_[m+8>>2],shaderLocation:_[m+16>>2]})}d={arrayStride:d,stepMode:u,attributes:f}}}else d=void 0;l.call(s,d)}n=a}else n=void 0;return{module:e,constants:r,buffers:n,entryPoint:oe(t+8)}}}(t+16),primitive:function(t){if(t)return{topology:Ee[_[t+4>>2]],stripIndexFormat:_e[_[t+8>>2]],frontFace:$e[_[t+12>>2]],cullMode:ve[_[t+16>>2]],unclippedDepth:!!_[t+20>>2]}}(t+48),depthStencil:function(t){if(t)return{format:Re[_[t+4>>2]],depthWriteEnabled:!!_[t+8>>2],depthCompare:me[_[t+12>>2]],stencilFront:r(t+16),stencilBack:r(t+32),stencilReadMask:_[t+48>>2],stencilWriteMask:_[t+52>>2],depthBias:$[t+56>>2],depthBiasSlopeScale:A[t+60>>2],depthBiasClamp:A[t+64>>2]}}(_[t+72>>2]),multisample:function(t){if(t)return{count:_[t+4>>2],mask:_[t+8>>2],alphaToCoverageEnabled:!!_[t+12>>2]}}(t+76),fragment:function(t){if(t){for(var r=ie(_[t+4>>2]),n=ce(_[t+16>>2],_[t+20>>2]),i=_[t+24>>2],a=_[t+28>>2],o=[],s=0;s<i;++s){var l=o,c=l.push,u=a+24*s,h=_[u+4>>2];if(0===h)u=void 0;else{h=Re[h];var d=(d=_[u+8>>2])?{alpha:e(d+12),color:e(d+0)}:void 0;u={format:h,blend:d,writeMask:_[u+16>>2]}}c.call(l,u)}return{module:r,constants:n,targets:o,entryPoint:oe(t+8)}}}(_[t+92>>2])}})(e);var r=ie(t);return t=Gr(0),e=r.createRenderPipeline(e),re[t>>>0]=e,t},ra:(t,e)=>{var r;return e&&(r={label:oe(e+4),addressModeU:he[_[e+12>>2]],addressModeV:he[_[e+16>>2]],addressModeW:he[_[e+20>>2]],magFilter:ye[_[e+24>>2]],minFilter:ye[_[e+28>>2]],mipmapFilter:xe[_[e+32>>2]],lodMinClamp:A[e+36>>2],lodMaxClamp:A[e+40>>2],compare:me[_[e+44>>2]],maxAnisotropy:y[e+48>>1]}),e=ie(t),t=Hr(0),r=e.createSampler(r),re[t>>>0]=r,t},C:(t,e)=>{var r={label:oe(e+4),size:se(e+28),mipLevelCount:_[e+44>>2],sampleCount:_[e+48>>2],dimension:Ue[_[e+24>>2]],format:Re[_[e+40>>2]],usage:_[e+16>>2]},n=_[e+52>>2];return n&&(e=_[e+56>>2],r.viewFormats=Array.from($.subarray(e>>2,e+4*n>>2),t=>Re[t])),t=ie(t),((t,e)=>{re[t>>>0]=e})(n=Xr(0),t.createTexture(r)),n},ha:(t,e)=>(t=2<(t=_[_[e>>2]+8>>2])?z(t):t,(t=(Lr[t]||("undefined"!=typeof document?document.querySelector(t):null)).getContext("webgpu"))?(t.ud=oe(e+4),e=qr(0),re[e>>>0]=t,e):0),J:(t,e,r)=>{t=ie(t),e=Array.from($.subarray(r>>2,r+4*e>>2),t=>ie(t)),t.submit(e)},u:function(t,e,r,n,i){r=je(r),ie(t).writeBuffer(ie(e),r,w.subarray(n,n+i),0,i)},K:(t,e,r,n,i,a)=>{var o=_[i+8>>2],s=_[i+12>>2];ie(t).writeTexture(le(e),w.subarray(r,r+n),{offset:4294967296*_[i+4>>2]+_[i>>2],bytesPerRow:4294967295===o?void 0:o,rowsPerImage:4294967295===s?void 0:s},se(a))},z:(t,e,r,n,i,a)=>{ie(t).drawIndexed(e,r,n>>>0,i,a>>>0)},I:t=>{ie(t).end()},d:(t,e,r,n,i)=>{t=ie(t),r=ie(r),0==n?t.setBindGroup(e,r):t.setBindGroup(e,r,_,i>>2,n)},A:function(t,e,r,n,i){n=je(n),i=je(i),t=ie(t),e=ie(e),-1==i&&(i=void 0),t.setIndexBuffer(e,_e[r],n,i)},e:(t,e)=>{ie(t).setPipeline(ie(e))},k:(t,e,r,n,i)=>{ie(t).setScissorRect(e,r,n,i)},h:(t,e)=>{ie(t).setStencilReference(e>>>0)},w:function(t,e,r,n,i){n=je(n),i=je(i),t=ie(t),r=ie(r),-1==i&&(i=void 0),t.setVertexBuffer(e,r,n,i)},fa:(t,e)=>{var r=_[e+4>>2];t=ie(t);var n=[_[e+24>>2],_[e+28>>2]];if(0!==n[0]&&(t.canvas.width=n[0]),0!==n[1]&&(t.canvas.height=n[1]),r={device:ie(r),format:Re[_[e+8>>2]],usage:_[e+16>>2],alphaMode:be[_[e+40>>2]]},n=_[e+32>>2]){var i=_[e+36>>2];r.viewFormats=Array.from($.subarray(i>>2,i+4*n>>2),t=>Re[t])}0!==(e=_[e>>2])&&(r.colorSpace=ke[_[e+8>>2]],r.wd={mode:Ne[_[e+12>>2]]}),t.configure(r)},ea:(t,e)=>{t=ie(t);try{var r=Xr(0),n=t.getCurrentTexture();re[r>>>0]=n,_[e+4>>2]=r,$[e+8>>2]=1}catch(t){_[e+4>>2]=0,$[e+8>>2]=6}},ga:t=>{ie(t).unconfigure()},oa:(t,e)=>{if(e){var r=_[e+24>>2],n=_[e+32>>2];r={label:oe(e+4),format:Re[_[e+12>>2]],dimension:Le[_[e+16>>2]],baseMipLevel:_[e+20>>2],mipLevelCount:4294967295===r?void 0:r,baseArrayLayer:_[e+28>>2],arrayLayerCount:4294967295===n?void 0:n,aspect:Me[_[e+36>>2]]}}return e=ie(t),t=Yr(0),e=e.createView(r),re[t>>>0]=e,t},na:t=>{ie(t).destroy()},pa:t=>Re.indexOf(ie(t).format),L:t=>ie(t).height,M:t=>ie(t).width};return cn=await async function(){function t(t){return t=cn=t.exports,Nr=t.Ba,Fr=t.Ca,Vr=t.Da,Dr=t.Ea,jr=t.Fa,Br=t.Ga,zr=t.Ha,Jr=t.Ka,Wr=t.Oa,Gr=t.Pa,Hr=t.Qa,qr=t.Ra,Xr=t.Sa,Yr=t.Ta,Kr=t.Za,Qr=t._a,Zr=t.$a,tn=t.ab,en=t.cb,rn=t.db,nn=t.eb,an=t.fb,on=t.gb,sn=t.za,ln=t.bb,U(),cn}var e={a:un};return r.instantiateWasm?new Promise(n=>{r.instantiateWasm(e,(e,r)=>{n(t(e))})}):(E??=r.locateFile?r.locateFile?r.locateFile("thorvg.wasm",h):h+"thorvg.wasm":new URL("thorvg.wasm",import.meta.url).href,t((await async function(t){var e=E;if(!f&&!P(e)&&!a)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(t){C(`wasm streaming compile failed: ${t}`),C("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var r=await async function(t){if(!f)try{var e=await s(t);return new Uint8Array(e)}catch{}if(t==E&&f)t=new Uint8Array(f);else{if(!l)throw"both async and sync fetching of the wasm failed";t=l(t)}return t}(t);return await WebAssembly.instantiate(r,e)}catch(t){C(`failed to asynchronously prepare wasm: ${t}`),R(t)}}(e,t)}(e)).instance))}(),function t(){function e(){if(r.calledRun=!0,!T){if(M=!0,r.noFSInit||Or.Vb||hr(),cn.Aa(),Or.lc=!1,m?.(r),r.onRuntimeInitialized?.(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var t=r.postRun.shift();N.push(t)}L(N)}}if(0<ar)or=t;else{if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)V();L(F),0<ar?or=t:r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),e()},1)):e()}}(),e=M?r:new Promise((t,e)=>{m=t,b=e}),e}({locateFile:(t,e)=>t.endsWith(".wasm")?this.wasmUrl||"https://unpkg.com/@thorvg/lottie-player@latest/dist/thorvg.wasm":e+t})),!this._timer)return;clearInterval(this._timer),this._timer=void 0;const t=this.config?.renderer||"wg";if(await(async t=>{if("wg"===t){for(;"requested"===pt;)await ft(100);if("initialized"!==pt&&(pt="requested",ut))for(;;)switch(ut.init()){case 0:return void(pt="initialized");case 1:return void(pt="failed");case 2:await ft(100)}}})(t),"failed"===pt)return this.currentState="error",void this.dispatchEvent(new CustomEvent("error"));this.TVG=new ut.TvgLottieAnimation(t,`#${this.canvas.id}`),this.src&&this.load(this.src,this.fileType)}_viewport(){const{left:t,right:e,top:r,bottom:n}=this.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight;let o=0,s=0,l=this.canvas.width,c=this.canvas.height;t<0&&(o=Math.abs(t),l-=o),r<0&&(s=Math.abs(r),c-=s),e>i&&(l-=e-i),n>a&&(c-=n-a),this.TVG.viewport(o,s,l,c)}_observerCallback(t){const e=t[0],r=e.target;r._observable=e.isIntersecting,e.isIntersecting?"frozen"===r.currentState&&r.play():"playing"===r.currentState&&(r.freeze(),r.dispatchEvent(new CustomEvent("freeze")))}firstUpdated(t){this.canvas=this.querySelector(".thorvg"),this.canvas.id=`thorvg-${Date.now().toString(36)+Math.random().toString(36).substring(2)}`,this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,this._observer=new IntersectionObserver(this._observerCallback),this._observer.observe(this),this.TVG?this.src&&this.load(this.src,this.fileType):this._timer=setInterval(this._init.bind(this),100)}createRenderRoot(){return this.style.display="block",this}async _animLoop(){this.TVG&&await this._update()&&(this._render(),window.requestAnimationFrame(this._animLoop.bind(this)))}_loadBytes(t){if(!this.TVG)throw new Error("TVG is not initialized");if(this._assetResolverCallback&&this.TVG.setAssetResolver(this._assetResolverCallback,this._assetResolverData),!this.TVG.load(t,this.fileType,this.canvas.width,this.canvas.height))throw new Error(`Unable to load an image. Error: ${this.TVG.error()}`);this._render(),this.dispatchEvent(new CustomEvent("load")),this.autoPlay&&this.play()}_flush(){this.canvas.getContext("2d").putImageData(this._imageData,0,0)}_render(){if(!this.TVG)return;if(!1!==this.config?.enableDevicePixelRatio){const t=1+.75*(window.devicePixelRatio-1),{width:e,height:r}=this.canvas.getBoundingClientRect();this.canvas.width=e*t,this.canvas.height=r*t}if(this.TVG.resize(this.canvas.width,this.canvas.height),this._viewport(),!this.TVG.update())return;if("wg"===this.config?.renderer||"gl"===this.config?.renderer)return void this.TVG.render();const t=this.TVG.render(),e=new Uint8ClampedArray(t,0,t.byteLength);e.length<1||(this._imageData=new ImageData(e,this.canvas.width,this.canvas.height),this._flush())}async _update(){if(!this.TVG)return!1;if("playing"!==this.currentState)return!1;const t=this.TVG.duration(),e=Date.now()/1e3;if(this.currentFrame=(e-this._beginTime)/t*this.totalFrame*this.speed,-1===this.direction&&(this.currentFrame=this.totalFrame-this.currentFrame),1===this.direction&&this.currentFrame>=this.totalFrame||-1===this.direction&&this.currentFrame<=0){const t=this.count?"bounce"===this.mode?2*this.count:this.count:0;if(this.loop||t&&this._counter<t)return"bounce"===this.mode&&(this.direction=1===this.direction?-1:1,this.currentFrame=1===this.direction?0:this.totalFrame),this.count&&(this._counter+=1),await ft(this.intermission),this.play(),!0;this.dispatchEvent(new CustomEvent("complete")),this.currentState="stopped"}return this.dispatchEvent(new CustomEvent("frame",{detail:{frame:this.currentFrame}})),this.TVG.frame(this.currentFrame)}_frame(t){this.TVG&&(this.pause(),this.currentFrame=t,this.TVG.frame(t))}async load(t,e="json"){try{this.currentState="loading",await this._init();const r=await(async(t,e)=>{const r=new TextEncoder;let n=t;switch(typeof n){case"object":return n instanceof ArrayBuffer?new Uint8Array(n):(n=JSON.stringify(n),r.encode(n));case"string":if("json"===e||"lot"===e)return n=await(async t=>{try{t=JSON.parse(t)}catch(e){const r=await(async t=>{if("string"!=typeof t)throw new Error("The url value must be a string");try{const e=new URL(t),r=await fetch(e.toString());return await r.json()}catch(t){throw new Error("An error occurred while trying to load the Lottie file from URL")}})(t);t=JSON.stringify(r)}return t})(n),r.encode(n);const t=await(async t=>(await fetch(t)).arrayBuffer())(n);return new Uint8Array(t);default:throw new Error("Invalid src type")}})(t,e);this.dispatchEvent(new CustomEvent("ready")),this.fileType=e,await this._loadBytes(r)}catch(t){this.currentState="error",this.dispatchEvent(new CustomEvent("error"))}}play(){if(this.TVG&&!("json"!==this.fileType&&"lot"!==this.fileType||(this.totalFrame=this.TVG.totalFrame(),this.totalFrame<1||(this._beginTime=Date.now()/1e3,"playing"===this.currentState))))return this._observable?(this.currentState="playing",void window.requestAnimationFrame(this._animLoop.bind(this))):void(this.currentState="frozen")}pause(){this.currentState="paused",this.dispatchEvent(new CustomEvent("pause"))}stop(){this.currentState="stopped",this.currentFrame=0,this._counter=1,this.seek(0),this.dispatchEvent(new CustomEvent("stop"))}freeze(){this.currentState="frozen",this.dispatchEvent(new CustomEvent("freeze"))}async seek(t){this._frame(t),await this._update(),this._render()}resize(t,e){this.canvas.width=t,this.canvas.height=e,"playing"!==this.currentState&&this._render()}destroy(){this.TVG&&(this.TVG.delete(),this.TVG=null,this.currentState="destroyed",this._observer&&(this._observer.disconnect(),this._observer=void 0),this.dispatchEvent(new CustomEvent("destroyed")),this.remove())}term(){ut&&(ut.term(),ut=null)}setLooping(t){this.TVG&&(this.loop=t)}setDirection(t){this.TVG&&(this.direction=t)}setSpeed(t){this.TVG&&(this.speed=t)}setBgColor(t){this.TVG&&(this.canvas.style.backgroundColor=t)}setQuality(t){this.TVG&&this.TVG.quality(t)&&"playing"!==this.currentState&&this._render()}setAssetResolver(t,e){this._assetResolverCallback=t,this._assetResolverData=e,this.TVG&&this.TVG.setAssetResolver(t,e)}getVersion(){return{THORVG_VERSION:"1.0.3"}}render(){return z`
|
|
2
2
|
<canvas class="thorvg" style="width: 100%; height: 100%;" />
|
|
3
|
-
`}}function bt(t,e,r,n){var i,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,r,o):i(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}ct([A({type:String})],mt.prototype,"src",void 0),ct([A({type:String})],mt.prototype,"wasmUrl",void 0),ct([A({type:dt})],mt.prototype,"fileType",void 0),ct([A({type:Number})],mt.prototype,"speed",void 0),ct([A({type:Boolean})],mt.prototype,"autoPlay",void 0),ct([A({type:Number})],mt.prototype,"count",void 0),ct([A({type:Boolean})],mt.prototype,"loop",void 0),ct([A({type:Number})],mt.prototype,"direction",void 0),ct([A()],mt.prototype,"mode",void 0),ct([A()],mt.prototype,"intermission",void 0),ct([A({type:Number})],mt.prototype,"totalFrame",void 0),ct([A({type:Number})],mt.prototype,"currentFrame",void 0),ct([A({type:Number})],mt.prototype,"currentState",void 0),ct([A({type:Float32Array})],mt.prototype,"size",null);class vt extends mt{set renderConfig(t){this.config={renderer:"wg",enableDevicePixelRatio:t.enableDevicePixelRatio}}get renderConfig(){return this.config||{}}}bt([A({type:Object})],vt.prototype,"renderConfig",null),vt=bt([(t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("lottie-player")],vt);var wt=Object.freeze({__proto__:null});export{vt as LottiePresetPlayer};
|
|
3
|
+
`}}function bt(t,e,r,n){var i,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,r,o):i(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}ct([A({type:String})],mt.prototype,"src",void 0),ct([A({type:String})],mt.prototype,"wasmUrl",void 0),ct([A({type:dt})],mt.prototype,"fileType",void 0),ct([A({type:Number})],mt.prototype,"speed",void 0),ct([A({type:Boolean})],mt.prototype,"autoPlay",void 0),ct([A({type:Number})],mt.prototype,"count",void 0),ct([A({type:Boolean})],mt.prototype,"loop",void 0),ct([A({type:Number})],mt.prototype,"direction",void 0),ct([A()],mt.prototype,"mode",void 0),ct([A()],mt.prototype,"intermission",void 0),ct([A({type:Number})],mt.prototype,"totalFrame",void 0),ct([A({type:Number})],mt.prototype,"currentFrame",void 0),ct([A({type:Number})],mt.prototype,"currentState",void 0),ct([A({type:Float32Array})],mt.prototype,"size",null),ct([A({type:Number})],mt.prototype,"dpr",null);class vt extends mt{set renderConfig(t){this.config={renderer:"wg",enableDevicePixelRatio:t.enableDevicePixelRatio}}get renderConfig(){return this.config||{}}}bt([A({type:Object})],vt.prototype,"renderConfig",null),vt=bt([(t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("lottie-player")],vt);var wt=Object.freeze({__proto__:null});export{vt as LottiePresetPlayer};
|
|
4
4
|
//# sourceMappingURL=lottie-player.esm.js.map
|