UNPKG

@thorvg/lottie-player

Version:

A web lottie player using ThorVG as a renderer

1 lines 81.5 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["lottie-player"]={})}(this,(function(e){"use strict";var t="undefined"!=typeof document?document.currentScript:null;const r=globalThis,n=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new WeakMap;let a=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(t,e))}return e}toString(){return this.cssText}};const s=(e,t)=>{if(n)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},c=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,i))(t)})(e):e,{is:l,defineProperty:h,getOwnPropertyDescriptor:u,getOwnPropertyNames:d,getOwnPropertySymbols:f,getPrototypeOf:b}=Object,p=globalThis,m=p.trustedTypes,v=m?m.emptyScript:"",w=p.reactiveElementPolyfillSupport,y=(e,t)=>e,g={toAttribute(e,t){switch(t){case Boolean:e=e?v:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},_=(e,t)=>!l(e,t),E={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class $ extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&h(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=u(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const e=b(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const e=this.properties,t=[...d(e),...f(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:g).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:g;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??_)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[y("elementProperties")]=new Map,$[y("finalized")]=new Map,w?.({ReactiveElement:$}),(p.reactiveElementVersions??=[]).push("2.0.4");const A={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:_},S=(e=A,t,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function x(e){return(t,r)=>"object"==typeof r?S(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}const T=globalThis,k=T.trustedTypes,P=k?k.createPolicy("lit-html",{createHTML:e=>e}):void 0,R="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+C,O=`<${U}>`,L=document,B=()=>L.createComment(""),F=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,I="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,G=/>/g,z=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,q=/"/g,V=/^(?:script|style|textarea|title)$/i,H=(e,...t)=>({_$litType$:1,strings:e,values:t}),W=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),J=new WeakMap,K=L.createTreeWalker(L,129);function Q(e,t){if(!N(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(t):t}class Z{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[c,l]=((e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",a=D;for(let t=0;t<r;t++){const r=e[t];let s,c,l=-1,h=0;for(;h<r.length&&(a.lastIndex=h,c=a.exec(r),null!==c);)h=a.lastIndex,a===D?"!--"===c[1]?a=M:void 0!==c[1]?a=G:void 0!==c[2]?(V.test(c[2])&&(i=RegExp("</"+c[2],"g")),a=z):void 0!==c[3]&&(a=z):a===z?">"===c[0]?(a=i??D,l=-1):void 0===c[1]?l=-2:(l=a.lastIndex-c[2].length,s=c[1],a=void 0===c[3]?z:'"'===c[3]?q:j):a===q||a===j?a=z:a===M||a===G?a=D:(a=z,i=void 0);const u=a===z&&e[t+1].startsWith("/>")?" ":"";o+=a===D?r+O:l>=0?(n.push(s),r.slice(0,l)+R+r.slice(l)+C+u):r+C+(-2===l?t:u)}return[Q(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(e,t);if(this.el=Z.createElement(c,r),K.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=K.nextNode())&&s.length<a;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(R)){const t=l[o++],r=n.getAttribute(e).split(C),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:i,name:a[2],strings:r,ctor:"."===a[1]?ne:"?"===a[1]?ie:"@"===a[1]?oe:re}),n.removeAttribute(e)}else e.startsWith(C)&&(s.push({type:6,index:i}),n.removeAttribute(e));if(V.test(n.tagName)){const e=n.textContent.split(C),t=e.length-1;if(t>0){n.textContent=k?k.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],B()),K.nextNode(),s.push({type:2,index:++i});n.append(e[t],B())}}}else if(8===n.nodeType)if(n.data===U)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(C,e+1));)s.push({type:7,index:i}),e+=C.length-1}i++}}static createElement(e,t){const r=L.createElement("template");return r.innerHTML=e,r}}function Y(e,t,r=e,n){if(t===W)return t;let i=void 0!==n?r.o?.[n]:r.l;const o=F(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r.o??=[])[n]=i:r.l=i),void 0!==i&&(t=Y(e,i._$AS(e,t.values),i,n)),t}class ee{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??L).importNode(t,!0);K.currentNode=n;let i=K.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new te(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new ae(i,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(i=K.nextNode(),o++)}return K.currentNode=L,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class te{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,n){this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this.v=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Y(this,e,t),F(e)?e===X||null==e||""===e?(this._$AH!==X&&this._$AR(),this._$AH=X):e!==this._$AH&&e!==W&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>N(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==X&&F(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Z.createElement(Q(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new ee(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=J.get(e.strings);return void 0===t&&J.set(e.strings,t=new Z(e)),t}k(e){N(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new te(this.O(B()),this.O(B()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=X,this._$AN=void 0,this.element=e,this.name=t,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=X}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Y(this,e,t,0),o=!F(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{const n=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Y(this,n[r+a],t,a),s===W&&(s=this._$AH[a]),o||=!F(s)||s!==this._$AH[a],s===X?e=X:e!==X&&(e+=(s??"")+i[a+1]),this._$AH[a]=s}o&&!n&&this.j(e)}j(e){e===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ne extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===X?void 0:e}}class ie extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==X)}}class oe extends re{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=Y(this,e,t,0)??X)===W)return;const r=this._$AH,n=e===X&&r!==X||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==X&&(r===X||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ae{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Y(this,e)}}const se=T.litHtmlPolyfillSupport;se?.(Z,te),(T.litHtmlVersions??=[]).push("3.2.0");class ce extends ${constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=((e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new te(t.insertBefore(B(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return W}}ce._$litElement$=!0,ce.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ce});const le=globalThis.litElementPolyfillSupport;async function he(e={}){var r,n=e,i=!!globalThis.window,o=!!globalThis.WorkerGlobalScope,a=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(a){const{createRequire:e}=await Promise.resolve().then((function(){return Se}));var s=e("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.js",document.baseURI).href)}var c,l,h=(e,t)=>{throw t},u="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.js",document.baseURI).href,d="";if(a){var f=s("fs");u.startsWith("file:")&&(d=s("path").dirname(s("url").fileURLToPath(u))+"/"),l=e=>(e=U(e)?new URL(e):e,f.readFileSync(e)),c=async e=>(e=U(e)?new URL(e):e,f.readFileSync(e,void 0)),process.argv.slice(2),h=(e,t)=>{throw process.exitCode=e,t}}else if(i||o){try{d=new URL(".",u).href}catch{}o&&(l=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),c=async e=>{if(U(e))return new Promise(((t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r(n.status)},n.onerror=r,n.send(null)}));var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)}}var b,p,m,v,w,y,g,_,E,$,A,S,x,T,k,P=void 0,R=void 0,C=!1,U=e=>e.startsWith("file://"),O=!1;function L(){var e=kr.buffer;w=new Int8Array(e),g=new Int16Array(e),y=new Uint8Array(e),_=new Uint16Array(e),E=new Int32Array(e),$=new Uint32Array(e),A=new Float32Array(e),S=new Float64Array(e),x=new BigInt64Array(e),T=new BigUint64Array(e)}function B(e){throw n.onAbort?.(e),R(e="Aborted("+e+")"),C=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),v?.(e),e}class F{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var N=e=>{for(;0<e.length;)e.shift()(n)},I=[],D=[],M=()=>{var e=n.preRun.shift();D.push(e)},G=!0,z=new TextDecoder,j=(e,t,r,n)=>{if(r=t+r,n)return r;for(;e[t]&&!(t>=r);)++t;return t},q=(e,t,r)=>e?z.decode(y.subarray(e,j(y,e,t,r))):"",V=e=>{for(var t="";;){var r=y[e++];if(!r)return t;t+=String.fromCharCode(r)}},H={},W={},X={},J=class extends Error{constructor(e){super(e),this.name="BindingError"}},K=e=>{throw new J(e)};function Q(e,t,r={}){return function(e,t,r={}){var n=t.name;if(!e)throw new J(`type "${n}" must have a positive integer typeid pointer`);if(W.hasOwnProperty(e)){if(r.zd)return;throw new J(`Cannot register type '${n}' twice`)}W[e]=t,delete X[e],H.hasOwnProperty(e)&&(t=H[e],delete H[e],t.forEach((e=>e())))}(e,t,r)}var Z=(e,t,r)=>{switch(t){case 1:return r?e=>w[e]:e=>y[e];case 2:return r?e=>g[e>>1]:e=>_[e>>1];case 4:return r?e=>E[e>>2]:e=>$[e>>2];case 8:return r?e=>x[e>>3]:e=>T[e>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Y=e=>{throw new J(e.pb.wb.ub.name+" instance already deleted")},ee=!1,te=()=>{},re=e=>globalThis.FinalizationRegistry?(ee=new FinalizationRegistry((e=>{--(e=e.pb).count.value,0===e.count.value&&(e.zb?e.Eb.Qb(e.zb):e.wb.ub.Qb(e.tb))})),re=e=>{var t=e.pb;return t.zb&&ee.register(e,{pb:t},e),e},te=e=>{ee.unregister(e)},re(e)):(re=e=>e,e);function ne(){}var ie=(e,t)=>Object.defineProperty(t,"name",{value:e}),oe={},ae=(e,t,r)=>{if(void 0===e[t].yb){var n=e[t];e[t]=function(...n){if(!e[t].yb.hasOwnProperty(n.length))throw new J(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].yb})!`);return e[t].yb[n.length].apply(this,n)},e[t].yb=[],e[t].yb[n.cc]=n}},se=(e,t,r)=>{if(n.hasOwnProperty(e)){if(void 0===r||void 0!==n[e].yb&&void 0!==n[e].yb[r])throw new J(`Cannot register public name '${e}' twice`);if(ae(n,e,e),n[e].yb.hasOwnProperty(r))throw new J(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);n[e].yb[r]=t}else n[e]=t,n[e].cc=r};function ce(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.Yb=r,this.Qb=n,this.Bb=i,this.vd=o,this.lc=a,this.rd=s,this.Gd=[]}var le=(e,t,r)=>{for(;t!==r;){if(!t.lc)throw new J(`Expected null or instance of ${r.name}, got an instance of ${t.name}`);e=t.lc(e),t=t.Bb}return e},he=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e};function ue(e,t){if(null===t){if(this.Ac)throw new J(`null is not a valid ${this.name}`);return 0}if(!t.pb)throw new J(`Cannot pass "${he(t)}" as a ${this.name}`);if(!t.pb.tb)throw new J(`Cannot pass deleted object as a pointer of type ${this.name}`);return le(t.pb.tb,t.pb.wb.ub,this.ub)}function de(e,t){if(null===t){if(this.Ac)throw new J(`null is not a valid ${this.name}`);if(this.qc){var r=this.Hd();return null!==e&&e.push(this.Qb,r),r}return 0}if(!t||!t.pb)throw new J(`Cannot pass "${he(t)}" as a ${this.name}`);if(!t.pb.tb)throw new J(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.pc&&t.pb.wb.pc)throw new J(`Cannot convert argument of type ${t.pb.Eb?t.pb.Eb.name:t.pb.wb.name} to parameter type ${this.name}`);if(r=le(t.pb.tb,t.pb.wb.ub,this.ub),this.qc){if(void 0===t.pb.zb)throw new J("Passing raw pointer to smart pointer is illegal");switch(this.Jd){case 0:if(t.pb.Eb!==this)throw new J(`Cannot convert argument of type ${t.pb.Eb?t.pb.Eb.name:t.pb.wb.name} to parameter type ${this.name}`);r=t.pb.zb;break;case 1:r=t.pb.zb;break;case 2:if(t.pb.Eb===this)r=t.pb.zb;else{var n=t.clone();r=this.Id(r,Me((()=>n.delete()))),null!==e&&e.push(this.Qb,r)}break;default:throw new J("Unsupporting sharing policy")}}return r}function fe(e,t){if(null===t){if(this.Ac)throw new J(`null is not a valid ${this.name}`);return 0}if(!t.pb)throw new J(`Cannot pass "${he(t)}" as a ${this.name}`);if(!t.pb.tb)throw new J(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.pb.wb.pc)throw new J(`Cannot convert argument of type ${t.pb.wb.name} to parameter type ${this.name}`);return le(t.pb.tb,t.pb.wb.ub,this.ub)}function be(e){return this.Ab($[e>>2])}var pe=(e,t,r)=>t===r?e:void 0===r.Bb||null===(e=pe(e,t,r.Bb))?null:r.rd(e),me={},ve=class extends Error{constructor(e){super(e),this.name="InternalError"}},we=(e,t)=>{if(!t.wb||!t.tb)throw new ve("makeClassHandle requires ptr and ptrType");if(!!t.Eb!=!!t.zb)throw new ve("Both smartPtrType and smartPtr must be specified");return t.count={value:1},re(Object.create(e,{pb:{value:t,writable:!0}}))};function ye(e,t,r,n,i,o,a,s,c,l,h){this.name=e,this.ub=t,this.Ac=r,this.pc=n,this.qc=i,this.Fd=o,this.Jd=a,this.Zc=s,this.Hd=c,this.Id=l,this.Qb=h,i||void 0!==t.Bb?this.Fb=de:(this.Fb=n?ue:fe,this.Gb=null)}var ge=(e,t,r)=>{if(!n.hasOwnProperty(e))throw new ve("Replacing nonexistent public symbol");void 0!==n[e].yb&&void 0!==r?n[e].yb[r]=t:(n[e]=t,n[e].cc=r)},_e=(e,t)=>{e=V(e);var r=Pr.get(t);if("function"!=typeof r)throw new J(`unknown function pointer with signature ${e}: ${t}`);return r};class Ee extends Error{}var $e=e=>{e=$r(e);var t=V(e);return _r(e),t},Ae=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||W[t]||(X[t]?X[t].forEach(e):(r.push(t),n[t]=!0))})),new Ee(`${e}: `+r.map($e).join([", "]))},xe=(e,t,r)=>{function n(t){if((t=r(t)).length!==e.length)throw new ve("Mismatched type converter count");for(var n=0;n<e.length;++n)Q(e[n],t[n])}e.forEach((e=>X[e]=t));var i=Array(t.length),o=[],a=0;t.forEach(((e,t)=>{W.hasOwnProperty(e)?i[t]=W[e]:(o.push(e),H.hasOwnProperty(e)||(H[e]=[]),H[e].push((()=>{i[t]=W[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},Te=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push($[t+4*n>>2]);return r},ke=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Pe(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].Gb)return!0;return!1}function Re(e,t,r,n,i,o){var a=t.length;if(2>a)throw new J("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==t[1]&&null!==r,c=Pe(t);r=!t[0].Vc;var l=t[0],h=t[1];for(n=[e,K,n,i,ke,l.Ab.bind(l),h?.Fb.bind(h)],i=2;i<a;++i)n.push((l=t[i]).Fb.bind(l));if(!c)for(i=s?1:2;i<t.length;++i)null!==t[i].Gb&&n.push(t[i].Gb);for(c=Pe(t),i=t.length-2,h=[],l=["fn"],s&&l.push("thisWired"),a=0;a<i;++a)h.push(`arg${a}`),l.push(`arg${a}Wired`);h=h.join(","),l=l.join(","),h=`return function (${h}) {\n`,c&&(h+="var destructors = [];\n");var u=c?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(s&&(h+=`var thisWired = toClassParamWire(${u}, this);\n`),a=0;a<i;++a){var f=`toArg${a}Wire`;h+=`var arg${a}Wired = ${f}(${u}, arg${a});\n`,d.push(f)}if(h+=(r||o?"var rv = ":"")+`invoker(${l});\n`,c)h+="runDestructors(destructors);\n";else for(a=s?1:2;a<t.length;++a)o=1===a?"thisWired":"arg"+(a-2)+"Wired",null!==t[a].Gb&&(h+=`${o}_dtor(${o});\n`,d.push(`${o}_dtor`));return r&&(h+="var ret = fromRetWire(rv);\nreturn ret;\n"),t=new Function(d,h+"}\n")(...n),ie(e,t)}var Ce,Ue,Oe,Le,Be=e=>{const t=(e=e.trim()).indexOf("(");return-1===t?e:e.slice(0,t)},Fe=[],Ne=[0,1,,1,null,1,!0,1,!1,1],Ie=e=>{9<e&&0==--Ne[e+1]&&(Ne[e]=void 0,Fe.push(e))},De=e=>{if(!e)throw new J(`Cannot use deleted val. handle = ${e}`);return Ne[e]},Me=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const t=Fe.pop()||Ne.length;return Ne[t]=e,Ne[t+1]=1,t}},Ge={name:"emscripten::val",Ab:e=>{var t=De(e);return Ie(e),t},Fb:(e,t)=>Me(t),Ob:be,Gb:null},ze=(e,t)=>{switch(t){case 4:return function(e){return this.Ab(A[e>>2])};case 8:return function(e){return this.Ab(S[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},je=(e,t,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var o=0;o<e.length;++o){var a=e.codePointAt(o);if(127>=a){if(r>=n)break;t[r++]=a}else if(2047>=a){if(r+1>=n)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(65535>=a){if(r+2>=n)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=n)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a,o++}}return t[r]=0,r-i},qe=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);127>=n?t++:2047>=n?t+=2:55296<=n&&57343>=n?(t+=4,++r):t+=3}return t},Ve=new TextDecoder("utf-16le"),He=(e,t,r)=>Ve.decode(_.subarray(e>>=1,j(_,e,t/2,r))),We=(e,t,r)=>{if(r??=2147483647,2>r)return 0;var n=t;r=(r-=2)<2*e.length?r/2:e.length;for(var i=0;i<r;++i)g[t>>1]=e.charCodeAt(i),t+=2;return g[t>>1]=0,t-n},Xe=e=>2*e.length,Je=(e,t,r)=>{var n="";e>>=2;for(var i=0;!(i>=t/4);i++){var o=$[e+i];if(!o&&!r)break;n+=String.fromCodePoint(o)}return n},Ke=(e,t,r)=>{if(r??=2147483647,4>r)return 0;var n=t;r=n+r-4;for(var i=0;i<e.length;++i){var o=e.codePointAt(i);if(65535<o&&i++,E[t>>2]=o,(t+=4)+4>r)break}return E[t>>2]=0,t-n},Qe=e=>{for(var t=0,r=0;r<e.length;++r)65535<e.codePointAt(r)&&r++,t+=4;return t},Ze=0,Ye=[],et=(e,t,r)=>{var n=[];return e=e(n,r),n.length&&($[t>>2]=Me(n)),e},tt={},rt=e=>{var t=tt[e];return void 0===t?V(e):t},nt={},it=e=>{p=e,G||0<Ze||(n.onExit?.(e),C=!0),h(e,new F(e))},ot=e=>{var t="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");return(e.getSupportedExtensions()||[]).filter((e=>t.includes(e)))},at=1,st=[],ct=[],lt=[],ht=[],ut=[],dt=[],ft=[],bt=[],pt=[1,1,2,2,4,4,4,2,3,4,8],mt=e=>{for(var t=at++,r=e.length;r<t;r++)e[r]=null;for(;e[t];)t=at++;return t},vt=(e,t,r,n)=>{for(var i=0;i<e;i++){var o=Ce[r](),a=o&&mt(n);o?(o.name=a,n[a]=o):Ue||=1282,E[t+4*i>>2]=a}},wt=["default","low-power","high-performance"],yt=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0],gt=(e,t)=>{for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},_t=e=>{var t="/"===e.charAt(0),r="/"===e.slice(-1);return(e=gt(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},Et=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.slice(0,-1),e+t):"."},$t=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],At=e=>{(At=(()=>{if(a){var e=s("crypto");return t=>e.randomFillSync(t)}return e=>crypto.getRandomValues(e)})())(e)},St=(...e)=>{for(var t="",r=!1,n=e.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?e[n]:fr.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";t=r+"/"+t,r="/"===r.charAt(0)}return t=gt(t.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+t||"."},xt=(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=St(e).slice(1),t=St(t).slice(1),e=r(e.split("/")),t=r(t.split("/"));for(var n=Math.min(e.length,t.length),i=n,o=0;o<n;o++)if(e[o]!==t[o]){i=o;break}for(n=[],o=i;o<e.length;o++)n.push("..");return(n=n.concat(t.slice(i))).join("/")},Tt=e=>{var t=j(e,0);return z.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},kt=[],Pt=e=>{var t=Array(qe(e)+1);return e=je(e,t,0,t.length),t.length=e,t},Rt=[];function Ct(e,t){Rt[e]={input:[],output:[],$b:t},qt(e,Ut)}var Ut={open(e){var t=Rt[e.node.rdev];if(!t)throw new fr.ob(43);e.tty=t,e.seekable=!1},close(e){e.tty.$b.fsync(e.tty)},fsync(e){e.tty.$b.fsync(e.tty)},read(e,t,r,n){if(!e.tty||!e.tty.$b.Sc)throw new fr.ob(60);for(var i=0,o=0;o<n;o++){try{var a=e.tty.$b.Sc(e.tty)}catch(e){throw new fr.ob(29)}if(void 0===a&&0===i)throw new fr.ob(6);if(null==a)break;i++,t[r+o]=a}return i&&(e.node.atime=Date.now()),i},write(e,t,r,n){if(!e.tty||!e.tty.$b.Gc)throw new fr.ob(60);try{for(var i=0;i<n;i++)e.tty.$b.Gc(e.tty,t[r+i])}catch(e){throw new fr.ob(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),i}},Ot={Sc(){e:{if(!kt.length){var e=null;if(a){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=f.readSync(n,t,0,256)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}0<r&&(e=t.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n");if(!e){e=null;break e}kt=Pt(e)}e=kt.shift()}return e},Gc(e,t){null===t||10===t?(P(Tt(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){0<e.output?.length&&(P(Tt(e.output)),e.output=[])},he:()=>({Sd:25856,Ud:5,Rd:191,Td:35387,Qd:[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]}),ie:()=>0,je:()=>[24,80]},Lt={Gc(e,t){null===t||10===t?(R(Tt(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){0<e.output?.length&&(R(Tt(e.output)),e.output=[])}},Bt={Mb:null,vb:()=>Bt.createNode(null,"/",16895,0),createNode(e,t,r,n){if(24576==(61440&r)||fr.isFIFO(r))throw new fr.ob(63);return Bt.Mb||(Bt.Mb={dir:{node:{Ib:Bt.qb.Ib,Kb:Bt.qb.Kb,lookup:Bt.qb.lookup,Nb:Bt.qb.Nb,rename:Bt.qb.rename,unlink:Bt.qb.unlink,rmdir:Bt.qb.rmdir,readdir:Bt.qb.readdir,symlink:Bt.qb.symlink},stream:{Cb:Bt.rb.Cb}},file:{node:{Ib:Bt.qb.Ib,Kb:Bt.qb.Kb},stream:{Cb:Bt.rb.Cb,read:Bt.rb.read,write:Bt.rb.write,Zb:Bt.rb.Zb,hc:Bt.rb.hc}},link:{node:{Ib:Bt.qb.Ib,Kb:Bt.qb.Kb,readlink:Bt.qb.readlink},stream:{}},Kc:{node:{Ib:Bt.qb.Ib,Kb:Bt.qb.Kb},stream:fr.od}}),Vt((r=fr.createNode(e,t,r,n)).mode)?(r.qb=Bt.Mb.dir.node,r.rb=Bt.Mb.dir.stream,r.sb={}):fr.isFile(r.mode)?(r.qb=Bt.Mb.file.node,r.rb=Bt.Mb.file.stream,r.xb=0,r.sb=null):40960==(61440&r.mode)?(r.qb=Bt.Mb.link.node,r.rb=Bt.Mb.link.stream):8192==(61440&r.mode)&&(r.qb=Bt.Mb.Kc.node,r.rb=Bt.Mb.Kc.stream),r.atime=r.mtime=r.ctime=Date.now(),e&&(e.sb[t]=r,e.atime=e.mtime=e.ctime=r.atime),r},ge:e=>e.sb?e.sb.subarray?e.sb.subarray(0,e.xb):new Uint8Array(e.sb):new Uint8Array(0),qb:{Ib(e){var t={};return t.dev=8192==(61440&e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=Vt(e.mode)?4096:fr.isFile(e.mode)?e.xb:40960==(61440&e.mode)?e.link.length:0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},Kb(e,t){for(var r of["mode","atime","mtime","ctime"])null!=t[r]&&(e[r]=t[r]);void 0!==t.size&&e.xb!=(t=t.size)&&(0==t?(e.sb=null,e.xb=0):(r=e.sb,e.sb=new Uint8Array(t),r&&e.sb.set(r.subarray(0,Math.min(t,e.xb))),e.xb=t))},lookup(){throw Bt.xc||(Bt.xc=new fr.ob(44),Bt.xc.stack="<generic error, no stack>"),Bt.xc},Nb:(e,t,r,n)=>Bt.createNode(e,t,r,n),rename(e,t,r){try{var n=Ht(t,r)}catch(e){}if(n){if(Vt(e.mode))for(var i in n.sb)throw new fr.ob(55);Wt(n)}delete e.parent.sb[e.name],t.sb[r]=e,e.name=r,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.sb[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var r,n=Ht(e,t);for(r in n.sb)throw new fr.ob(55);delete e.sb[t],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.sb)],symlink:(e,t,r)=>((e=Bt.createNode(e,t,41471,0)).link=r,e),readlink(e){if(40960!=(61440&e.mode))throw new fr.ob(28);return e.link}},rb:{read(e,t,r,n,i){var o=e.node.sb;if(i>=e.node.xb)return 0;if(8<(e=Math.min(e.node.xb-i,n))&&o.subarray)t.set(o.subarray(i,i+e),r);else for(n=0;n<e;n++)t[r+n]=o[i+n];return e},write(e,t,r,n,i,o){if(t.buffer===w.buffer&&(o=!1),!n)return 0;if((e=e.node).mtime=e.ctime=Date.now(),t.subarray&&(!e.sb||e.sb.subarray)){if(o)return e.sb=t.subarray(r,r+n),e.xb=n;if(0===e.xb&&0===i)return e.sb=t.slice(r,r+n),e.xb=n;if(i+n<=e.xb)return e.sb.set(t.subarray(r,r+n),i),n}var a=e.sb?e.sb.length:0;if(a>=(o=i+n)||(o=Math.max(o,a*(1048576>a?2:1.125)>>>0),0!=a&&(o=Math.max(o,256)),a=e.sb,e.sb=new Uint8Array(o),0<e.xb&&e.sb.set(a.subarray(0,e.xb),0)),e.sb.subarray&&t.subarray)e.sb.set(t.subarray(r,r+n),i);else for(o=0;o<n;o++)e.sb[i+o]=t[r+o];return e.xb=Math.max(e.xb,i+n),n},Cb(e,t,r){if(1===r?t+=e.position:2===r&&fr.isFile(e.node.mode)&&(t+=e.node.xb),0>t)throw new fr.ob(28);return t},Zb(e,t,r,n,i){if(!fr.isFile(e.node.mode))throw new fr.ob(43);if(e=e.node.sb,2&i||!e||e.buffer!==w.buffer){if(n=!0,B(),!(i=void 0))throw new fr.ob(48);e&&((0<r||r+t<e.length)&&(e=e.subarray?e.subarray(r,r+t):Array.prototype.slice.call(e,r,r+t)),w.set(e,i))}else n=!1,i=e.byteOffset;return{tb:i,Md:n}},hc:(e,t,r,n)=>(Bt.rb.write(e,t,0,n,r,!1),0)}},Ft=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Nt=0,It=null,Dt=()=>{if(Nt--,n.monitorRunDependencies?.(Nt),0==Nt&&It){var e=It;It=null,e()}},Mt=()=>{Nt++,n.monitorRunDependencies?.(Nt)},Gt=[],zt=async(e,t,r,n,i,o,a,s)=>{var l=t?St(_t(e+"/"+t)):e;Mt();try{var h=r;"string"==typeof r&&(h=await(async e=>(e=await c(e),new Uint8Array(e)))(r)),h=await(async(e,t)=>{for(var r of("undefined"!=typeof Browser&&jt(),Gt))if(r.canHandle(t))return r.handle(e,t);return e})(h,l),s?.(),o||Xt(e,t,h,n,i,a)}finally{Dt()}};function jt(){var e,t,r;fr.zc=!0,e??=n.stdin,t??=n.stdout,r??=n.stderr,e?fr.Pb("/dev","stdin",e):fr.symlink("/dev/tty","/dev/stdin"),t?fr.Pb("/dev","stdout",null,t):fr.symlink("/dev/tty","/dev/stdout"),r?fr.Pb("/dev","stderr",null,r):fr.symlink("/dev/tty1","/dev/stderr"),fr.open("/dev/stdin",0),fr.open("/dev/stdout",1),fr.open("/dev/stderr",1)}function qt(e,t){fr.Oc[e]={rb:t}}function Vt(e){return 16384==(61440&e)}function Ht(e,t){var r=Vt(e.mode)?(r=er(e,"x"))?r:e.qb.lookup?0:2:54;if(r)throw new fr.ob(r);for(r=fr.Lb[Qt(e.id,t)];r;r=r.Vb)if(r.parent.id===e.id&&r.name===t)return r;return fr.lookup(e,t)}function Wt(e){var t=Qt(e.parent.id,e.name);if(fr.Lb[t]===e)fr.Lb[t]=e.Vb;else for(t=fr.Lb[t];t;){if(t.Vb===e){t.Vb=e.Vb;break}t=t.Vb}}function Xt(e,t,r,n,i,o){var a=t;if(e&&(e="string"==typeof e?e:Kt(e),a=t?_t(e+"/"+t):e),e=Ft(n,i),a=fr.create(a,e),r){if("string"==typeof r){for(t=Array(r.length),n=0,i=r.length;n<i;++n)t[n]=r.charCodeAt(n);r=t}fr.chmod(a,146|e),t=fr.open(a,577),fr.write(t,r,0,r.length,0,o),fr.close(t),fr.chmod(a,e)}}function Jt(e,t={}){if(!e)throw new fr.ob(44);t.oc??(t.oc=!0),"/"===e.charAt(0)||(e=fr.cwd()+"/"+e);var r=0;e:for(;40>r;r++){e=e.split("/").filter((e=>!!e));for(var n=fr.root,i="/",o=0;o<e.length;o++){var a=o===e.length-1;if(a&&t.parent)break;if("."!==e[o])if(".."===e[o]){if(i=Et(i),fr.Bc(n)){e=i+"/"+e.slice(o+1).join("/"),r--;continue e}n=n.parent}else{i=_t(i+"/"+e[o]);try{n=Ht(n,e[o])}catch(e){if(44===e?.Tb&&a&&t.Dd)return{path:i};throw e}if(!n.Jb||a&&!t.oc||(n=n.Jb.root),40960==(61440&n.mode)&&(!a||t.Hb)){if(!n.qb.readlink)throw new fr.ob(52);"/"===(n=n.qb.readlink(n)).charAt(0)||(n=Et(i)+"/"+n),e=n+"/"+e.slice(o+1).join("/");continue e}}}return{path:i,node:n}}throw new fr.ob(32)}function Kt(e){for(var t;;){if(fr.Bc(e))return e=e.vb.Xc,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Qt(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%fr.Lb.length}function Zt(e){var t=Qt(e.parent.id,e.name);e.Vb=fr.Lb[t],fr.Lb[t]=e}function Yt(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function er(e,t){return fr.Tc?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function tr(e,t){if(!Vt(e.mode))return 54;try{return Ht(e,t),20}catch(e){}return er(e,"wx")}function rr(e,t,r){try{var n=Ht(e,t)}catch(e){return e.Tb}if(e=er(e,"wx"))return e;if(r){if(!Vt(n.mode))return 54;if(fr.Bc(n)||Kt(n)===fr.cwd())return 10}else if(Vt(n.mode))return 31;return 0}function nr(e,t){if(!e)throw new fr.ob(t);return e}function ir(e){if(!(e=fr.yd(e)))throw new fr.ob(8);return e}function or(e,t=-1){if(e=Object.assign(new fr.ld,e),-1==t)e:{for(t=0;t<=fr.nd;t++)if(!fr.streams[t])break e;throw new fr.ob(33)}return e.fd=t,fr.streams[t]=e}function ar(e,t,r){var n=e?.rb.Kb;e=n?e:t,n??=t.qb.Kb,nr(n,63),n(e,r)}function sr(e){var t=[];for(e=[e];e.length;){var r=e.pop();t.push(r),e.push(...r.fc)}return t}function cr(e){var t={Pd:4096,de:4096,blocks:1e6,Od:5e5,Nd:5e5,files:fr.Ec,be:fr.Ec-1,ee:42,flags:2,pe:255};return e.qb.cd&&Object.assign(t,e.qb.cd(e.vb.Ed.root)),t}function lr(e,t,r){return void 0===r&&(r=t,t=438),fr.Nb(e,8192|t,r)}function hr(e,t,r,n){ar(e,t,{mode:4095&r|-4096&t.mode,ctime:Date.now(),Qc:n})}function ur(e,t,r){if(Vt(t.mode))throw new fr.ob(31);if(!fr.isFile(t.mode))throw new fr.ob(28);var n=er(t,"w");if(n)throw new fr.ob(n);ar(e,t,{size:r,timestamp:Date.now()})}function dr(e){if(!(e.Bd||e.Cd||e.link||e.sb))if(globalThis.XMLHttpRequest)B("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{e.sb=l(e.url)}catch(e){throw new fr.ob(29)}}var fr={root:null,fc:[],Oc:{},streams:[],Ec:1,Lb:null,Lc:"/",zc:!1,Tc:!0,ud:null,uc:0,ad:{},ob:class{name="ErrnoError";constructor(e){this.Tb=e}},ld:class{Db={};node=null;get object(){return this.node}set object(e){this.node=e}get flags(){return this.Db.flags}set flags(e){this.Db.flags=e}get position(){return this.Db.position}set position(e){this.Db.position=e}},kd:class{qb={};rb={};Jb=null;constructor(e,t,r,n){e||=this,this.parent=e,this.vb=e.vb,this.id=fr.Ec++,this.name=t,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}get Cd(){return Vt(this.mode)}get Bd(){return 8192==(61440&this.mode)}},createNode:(e,t,r,n)=>(Zt(e=new fr.kd(e,t,r,n)),e),Bc:e=>e===e.parent,isFile:e=>32768==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),nd:4096,yd:e=>fr.streams[e],Zd:(e,t=-1)=>(e=or(e,t),e.rb?.Yd?.(e),e),od:{open(e){e.rb=fr.wd(e.node.rdev).rb,e.rb.open?.(e)},Cb(){throw new fr.ob(70)}},Cc:e=>e>>8,le:e=>255&e,Ub:(e,t)=>e<<8|t,wd:e=>fr.Oc[e],dd(e,t){function r(e){return fr.uc--,t(e)}function n(e){if(e){if(!n.sd)return n.sd=!0,r(e)}else++o>=i.length&&r(null)}"function"==typeof e&&(t=e,e=!1),fr.uc++,1<fr.uc&&R(`warning: ${fr.uc} FS.syncfs operations in flight at once, probably just doing extra work`);var i=sr(fr.root.vb),o=0;i.forEach((t=>{if(!t.type.dd)return n(null);t.type.dd(t,e,n)}))},vb(e,t,r){var n="/"===r;if(n&&fr.root)throw new fr.ob(10);if(!n&&r){var i=Jt(r,{oc:!1});if(r=i.path,(i=i.node).Jb)throw new fr.ob(10);if(!Vt(i.mode))throw new fr.ob(54)}return(e=e.vb(t={type:e,Ed:t,Xc:r,fc:[]})).vb=t,t.root=e,n?fr.root=e:i&&(i.Jb=t,i.vb&&i.vb.fc.push(t)),e},ye(e){if(!(e=Jt(e,{oc:!1})).node.Jb)throw new fr.ob(28);var t=(e=e.node).Jb,r=sr(t);Object.keys(fr.Lb).forEach((e=>{for(e=fr.Lb[e];e;){var t=e.Vb;r.includes(e.vb)&&Wt(e),e=t}})),e.Jb=null,e.vb.fc.splice(e.vb.fc.indexOf(t),1)},lookup:(e,t)=>e.qb.lookup(e,t),Nb(e,t,r){var n=Jt(e,{parent:!0}).node;if(!(e=$t(e)))throw new fr.ob(28);if("."===e||".."===e)throw new fr.ob(20);var i=tr(n,e);if(i)throw new fr.ob(i);if(!n.qb.Nb)throw new fr.ob(63);return n.qb.Nb(n,e,t,r)},cd:e=>cr(Jt(e,{Hb:!0}).node),we:e=>cr(e.node),create:(e,t=438)=>fr.Nb(e,4095&t|32768,0),mkdir:(e,t=511)=>fr.Nb(e,1023&t|16384,0),ne(e,t){var r,n=e.split("/"),i="";for(r of n)if(r){(i||"/"===e.charAt(0))&&(i+="/"),i+=r;try{fr.mkdir(i,t)}catch(e){if(20!=e.Tb)throw e}}},symlink(e,t){if(!St(e))throw new fr.ob(44);var r=Jt(t,{parent:!0}).node;if(!r)throw new fr.ob(44);var n=tr(r,t=$t(t));if(n)throw new fr.ob(n);if(!r.qb.symlink)throw new fr.ob(63);return r.qb.symlink(r,t,e)},rename(e,t){var r=Et(e),n=Et(t),i=$t(e),o=$t(t),a=Jt(e,{parent:!0}),s=a.node;if(a=(a=Jt(t,{parent:!0})).node,!s||!a)throw new fr.ob(44);if(s.vb!==a.vb)throw new fr.ob(75);var c=Ht(s,i);if("."!==(e=xt(e,n)).charAt(0))throw new fr.ob(28);if("."!==(e=xt(t,r)).charAt(0))throw new fr.ob(55);try{var l=Ht(a,o)}catch(e){}if(c!==l){if(i=rr(s,i,t=Vt(c.mode)))throw new fr.ob(i);if(i=l?rr(a,o,t):tr(a,o))throw new fr.ob(i);if(!s.qb.rename)throw new fr.ob(63);if(c.Jb||l&&l.Jb)throw new fr.ob(10);if(a!==s&&(i=er(s,"w")))throw new fr.ob(i);Wt(c);try{s.qb.rename(c,a,o),c.parent=a}catch(e){throw e}finally{Zt(c)}}},rmdir(e){var t=Jt(e,{parent:!0}).node,r=Ht(t,e=$t(e)),n=rr(t,e,!0);if(n)throw new fr.ob(n);if(!t.qb.rmdir)throw new fr.ob(63);if(r.Jb)throw new fr.ob(10);t.qb.rmdir(t,e),Wt(r)},readdir:e=>nr((e=Jt(e,{Hb:!0}).node).qb.readdir,54)(e),unlink(e){var t=Jt(e,{parent:!0}).node;if(!t)throw new fr.ob(44);var r=Ht(t,e=$t(e)),n=rr(t,e,!1);if(n)throw new fr.ob(n);if(!t.qb.unlink)throw new fr.ob(63);if(r.Jb)throw new fr.ob(10);t.qb.unlink(t,e),Wt(r)},readlink(e){if(!(e=Jt(e).node))throw new fr.ob(44);if(!e.qb.readlink)throw new fr.ob(28);return e.qb.readlink(e)},stat:(e,t)=>nr((e=Jt(e,{Hb:!t}).node).qb.Ib,63)(e),fstat(e){var t=ir(e);e=t.node;var r=t.rb.Ib;return t=r?t:e,r??=e.qb.Ib,nr(r,63),r(t)},lstat:e=>fr.stat(e,!0),chmod(e,t,r){hr(null,e="string"==typeof e?Jt(e,{Hb:!r}).node:e,t,r)},lchmod(e,t){fr.chmod(e,t,!0)},fchmod(e,t){hr(e=ir(e),e.node,t,!1)},chown(e,t,r,n){ar(null,e="string"==typeof e?Jt(e,{Hb:!n}).node:e,{timestamp:Date.now(),Qc:n})},lchown(e,t,r){fr.chown(e,t,r,!0)},fchown(e){ar(e=ir(e),e.node,{timestamp:Date.now(),Qc:!1})},truncate(e,t){if(0>t)throw new fr.ob(28);ur(null,e="string"==typeof e?Jt(e,{Hb:!0}).node:e,t)},fe(e,t){if(e=ir(e),0>t||!(2097155&e.flags))throw new fr.ob(28);ur(e,e.node,t)},ze(e,t,r){nr((e=Jt(e,{Hb:!0}).node).qb.Kb,63)(e,{atime:t,mtime:r})},open(e,t,r=438){if(""===e)throw new fr.ob(44);if("string"==typeof t){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===i)throw Error(`Unknown file open mode: ${t}`);t=i}if(r=64&t?4095&r|32768:0,"object"==typeof e)i=e;else{var o=e.endsWith("/");i=(e=Jt(e,{Hb:!(131072&t),Dd:!0})).node,e=e.path}var a=!1;if(64&t)if(i){if(128&t)throw new fr.ob(20)}else{if(o)throw new fr.ob(31);i=fr.Nb(e,511|r,0),a=!0}if(!i)throw new fr.ob(44);if(8192==(61440&i.mode)&&(t&=-513),65536&t&&!Vt(i.mode))throw new fr.ob(54);if(!a&&(o=i?40960==(61440&i.mode)?32:Vt(i.mode)&&("r"!==Yt(t)||576&t)?31:er(i,Yt(t)):44))throw new fr.ob(o);return 512&t&&!a&&fr.truncate(i,0),t&=-131713,(o=or({node:i,path:Kt(i),flags:t,seekable:!0,position:0,rb:i.rb,Ld:[],error:!1})).rb.open&&o.rb.open(o),a&&fr.chmod(i,511&r),!n.logReadFiles||1&t||e in fr.ad||(fr.ad[e]=1),o},close(e){if(null===e.fd)throw new fr.ob(8);e.yc&&(e.yc=null);try{e.rb.close&&e.rb.close(e)}catch(e){throw e}finally{fr.streams[e.fd]=null}e.fd=null},Cb(e,t,r){if(null===e.fd)throw new fr.ob(8);if(!e.seekable||!e.rb.Cb)throw new fr.ob(70);if(0!=r&&1!=r&&2!=r)throw new fr.ob(28);return e.position=e.rb.Cb(e,t,r),e.Ld=[],e.position},read(e,t,r,n,i){if(0>n||0>i)throw new fr.ob(28);if(null===e.fd)throw new fr.ob(8);if(1==(2097155&e.flags))throw new fr.ob(8);if(Vt(e.node.mode))throw new fr.ob(31);if(!e.rb.read)throw new fr.ob(28);var o=void 0!==i;if(o){if(!e.seekable)throw new fr.ob(70)}else i=e.position;return t=e.rb.read(e,t,r,n,i),o||(e.position+=t),t},write(e,t,r,n,i,o){if(0>n||0>i)throw new fr.ob(28);if(null===e.fd)throw new fr.ob(8);if(!(2097155&e.flags))throw new fr.ob(8);if(Vt(e.node.mode))throw new fr.ob(31);if(!e.rb.write)throw new fr.ob(28);e.seekable&&1024&e.flags&&fr.Cb(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new fr.ob(70)}else i=e.position;return t=e.rb.write(e,t,r,n,i,o),a||(e.position+=t),t},Zb(e,t,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&e.flags))throw new fr.ob(2);if(1==(2097155&e.flags))throw new fr.ob(2);if(!e.rb.Zb)throw new fr.ob(43);if(!t)throw new fr.ob(28);return e.rb.Zb(e,t,r,n,i)},hc:(e,t,r,n,i)=>e.rb.hc?e.rb.hc(e,t,r,n,i):0,Uc(e,t,r){if(!e.rb.Uc)throw new fr.ob(59);return e.rb.Uc(e,t,r)},readFile(e,t={}){t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding&&B(`Invalid encoding type "${t.encoding}"`);var r=fr.open(e,t.flags);e=fr.stat(e).size;var n=new Uint8Array(e);return fr.read(r,n,0,e,0),"utf8"===t.encoding&&(n=Tt(n)),fr.close(r),n},writeFile(e,t,r={}){r.flags=r.flags||577,e=fr.open(e,r.flags,r.mode),"string"==typeof t&&(t=new Uint8Array(Pt(t))),ArrayBuffer.isView(t)?fr.write(e,t,0,t.byteLength,void 0,r.Vd):B("Unsupported data type"),fr.close(e)},cwd:()=>fr.Lc,chdir(e){if(null===(e=Jt(e,{Hb:!0})).node)throw new fr.ob(44);if(!Vt(e.node.mode))throw new fr.ob(54);var t=er(e.node,"x");if(t)throw new fr.ob(t);fr.Lc=e.path},te(){for(var e of(fr.zc=!1,fr.streams))e&&fr.close(e)},ce(e,t){try{var r=Jt(e,{Hb:!t});e=r.path}catch(e){}var n=!1,i=null;try{r=Jt(e,{parent:!0}),$t(e),r=Jt(e,{Hb:!t}),n=!0,i=r.node}catch(e){}return n?i:null},Pb(e,t,r,n){var i;return e=((e,t)=>_t(e+"/"+t))("string"==typeof e?e:Kt(e),t),t=Ft(!!r,!!n),(i=fr.Pb).Cc??(i.Cc=64),qt(i=fr.Ub(fr.Pb.Cc++,0),{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,t,n,i){for(var o=0,a=0;a<i;a++){try{var s=r()}catch(e){throw new fr.ob(29)}if(void 0===s&&0===o)throw new fr.ob(6);if(null==s)break;o++,t[n+a]=s}return o&&(e.node.atime=Date.now()),o},write(e,t,r,i){for(var o=0;o<i;o++)try{n(t[r+o])}catch(e){throw new fr.ob(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),o}}),lr(e,t,i)}},br=e=>"]"==e.slice(-1)&&e.lastIndexOf("["),pr=[],mr=e=>0==(e-=5120)?w:1==e?y:2==e?g:4==e?E:6==e?A:5==e||28922==e||28520==e||30779==e||30782==e?$:_,vr=e=>{var t=Ce.qd;if(t){var r=t.kc[e];return"number"==typeof r&&(t.kc[e]=r=Ce.getUniformLocation(t,t.gd[e]+(0<r?`[${r}]`:""))),r}Ue||=1282},wr=[];(()=>{let e=ne.prototype;Object.assign(e,{isAliasOf:function(e){if(!(this instanceof ne&&e instanceof ne))return!1;var t=this.pb.wb.ub,r=this.pb.tb;e.pb=e.pb;var n=e.pb.wb.ub;for(e=e.pb.tb;t.Bb;)r=t.lc(r),t=t.Bb;for(;n.Bb;)e=n.lc(e),n=n.Bb;return t===n&&r===e},clone:function(){if(this.pb.tb||Y(this),this.pb.ic)return this.pb.count.value+=1,this;var e=re,t=Object,r=t.create,n=Object.getPrototypeOf(this),i=this.pb;return(e=e(r.call(t,n,{pb:{value:{count:i.count,ec:i.ec,ic:i.ic,tb:i.tb,wb:i.wb,zb:i.zb,Eb:i.Eb}}}))).pb.count.value+=1,e.pb.ec=!1,e},delete(){if(this.pb.tb||Y(this),this.pb.ec&&!this.pb.ic)throw new J("Object already scheduled for deletion");te(this);var e=this.pb;--e.count.value,0===e.count.value&&(e.zb?e.Eb.Qb(e.zb):e.wb.ub.Qb(e.tb)),this.pb.ic||(this.pb.zb=void 0,this.pb.tb=void 0)},isDeleted:function(){return!this.pb.tb},deleteLater:function(){if(this.pb.tb||Y(this),this.pb.ec&&!this.pb.ic)throw new J("Object already scheduled for deletion");return this.pb.ec=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(ye.prototype,{xd(e){return this.Zc&&(e=this.Zc(e)),e},Nc(e){this.Qb?.(e)},Ob:be,Ab:function(e){function t(){return we(this.ub.Yb,this.qc?{wb:this.Fd,tb:r,Eb:this,zb:e}:{wb:this,tb:e})}var r=this.xd(e);if(!r)return this.Nc(e),null;var n=((e,t)=>{if(void 0===t)throw new J("ptr should not be undefined");for(;e.Bb;)t=e.lc(t),e=e.Bb;return me[t]})(this.ub,r);if(void 0!==n)return 0===n.pb.count.value?(n.pb.tb=r,n.pb.zb=e,n.clone()):(n=n.clone(),this.Nc(e),n);if(n=this.ub.vd(r),!(n=oe[n]))return t.call(this);var i=pe(r,this.ub,(n=this.pc?n.pd:n.pointerType).ub);return null===i?t.call(this):we(n.ub.Yb,this.qc?{wb:n,tb:i,Eb:this,zb:e}:{wb:n,tb:i})}}),"undefined"!=typeof MainLoop&&MainLoop.qe.push((()=>{if(Oe){var e=Oe.bc;for(Oe.bc=Oe.jc,Oe.jc=e,e=Oe.Rb,Oe.Rb=Oe.vc,Oe.vc=e,e=0;21>=e;++e)Oe.Rb[e]=0}})),fr.Wd=(e,t,r,n,i,o,a,s,c,l)=>{zt(e,t,r,n,i,s,c,l).then(o).catch(a)},fr.re=zt,fr.Lb=Array(4096),fr.vb(Bt,{},"/"),fr.mkdir("/tmp"),fr.mkdir("/home"),fr.mkdir("/home/web_user"),function(){fr.mkdir("/dev"),qt(fr.Ub(1,3),{read:()=>0,write:(e,t,r,n)=>n,Cb:()=>0}),lr("/dev/null",fr.Ub(1,3)),Ct(fr.Ub(5,0),Ot),Ct(fr.Ub(6,0),Lt),lr("/dev/tty",fr.Ub(5,0)),lr("/dev/tty1",fr.Ub(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(At(e),t=e.byteLength),e[--t]);fr.Pb("/dev","random",r),fr.Pb("/dev","urandom",r),fr.mkdir("/dev/shm"),fr.mkdir("/dev/shm/tmp")}(),function(){fr.mkdir("/proc");var e=fr.mkdir("/proc/self");fr.mkdir("/proc/self/fd"),fr.vb({vb(){var t=fr.createNode(e,"fd",16895,73);return t.rb={Cb:Bt.rb.Cb},t.qb={lookup(e,t){var r=ir(e=+t);return(e={parent:null,vb:{Xc:"fake"},qb:{readlink:()=>r.path},id:e+1}).parent=e},readdir:()=>Array.from(fr.streams.entries()).filter((([,e])=>e)).map((([e])=>e.toString()))},t}},{},"/proc/self/fd")}(),fr.ud={MEMFS:Bt};for(let e=0;32>e;++e)pr.push(Array(e));for(var yr=new In