function __decorate(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */}const t$1=window,e$4=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),n$4=new WeakMap;class o$4{constructor(e,t,r){if(this._$cssResult$=!0,r!==s$3)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(e$4&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=n$4.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&n$4.set(t,e))}return e}toString(){return this.cssText}}const r$2=e=>new o$4("string"==typeof e?e:e+"",void 0,s$3),S$1=(e,t)=>{e$4?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const r=document.createElement("style"),n=t$1.litNonce;void 0!==n&&r.setAttribute("nonce",n),r.textContent=t.cssText,e.appendChild(r)}))},c$1=e$4?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return r$2(t)})(e):e
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */;var s$2;const e$3=window,r$1=e$3.trustedTypes,h$1=r$1?r$1.emptyScript:"",o$3=e$3.reactiveElementPolyfillSupport,n$3={toAttribute(e,t){switch(t){case Boolean:e=e?h$1: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}},a$1=(e,t)=>t!==e&&(t==t||e==e),l$2={attribute:!0,type:String,converter:n$3,reflect:!1,hasChanged:a$1};class d$1 extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const n=this._$Ep(r,t);void 0!==n&&(this._$Ev.set(n,r),e.push(n))})),e}static createProperty(e,t=l$2){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||l$2}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}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$1(e))}else void 0!==e&&t.push(c$1(e));return t}static _$Ep(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,r;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=l$2){var n;const i=this.constructor._$Ep(e,r);if(void 0!==i&&!0===r.reflect){const a=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:n$3).toAttribute(t,r.type);this._$El=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(r=e.converter)||void 0===r?void 0:r.fromAttribute)?e.converter:n$3;this._$El=i,this[i]=a.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||a$1)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(r)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
var t;d$1.finalized=!0,d$1.elementProperties=new Map,d$1.elementStyles=[],d$1.shadowRootOptions={mode:"open"},null==o$3||o$3({ReactiveElement:d$1}),(null!==(s$2=e$3.reactiveElementVersions)&&void 0!==s$2?s$2:e$3.reactiveElementVersions=[]).push("1.6.1");const i$2=window,s$1=i$2.trustedTypes,e$2=s$1?s$1.createPolicy("lit-html",{createHTML:e=>e}):void 0,o$2=`lit$${(Math.random()+"").slice(9)}$`,n$2="?"+o$2,l$1=`<${n$2}>`,h=document,r=(e="")=>h.createComment(e),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,u=Array.isArray,c=e=>u(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,a=/-->/g,f=/>/g,_=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),m=/'/g,p=/"/g,$=/^(?:script|style|textarea|title)$/i,g=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),y=g(1),x=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),T=new WeakMap,A=h.createTreeWalker(h,129,null,!1),E=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":"",s=v;for(let t=0;t<r;t++){const r=e[t];let c,l,u=-1,d=0;for(;d<r.length&&(s.lastIndex=d,l=s.exec(r),null!==l);)d=s.lastIndex,s===v?"!--"===l[1]?s=a:void 0!==l[1]?s=f:void 0!==l[2]?($.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=_):void 0!==l[3]&&(s=_):s===_?">"===l[0]?(s=null!=i?i:v,u=-1):void 0===l[1]?u=-2:(u=s.lastIndex-l[2].length,c=l[1],s=void 0===l[3]?_:'"'===l[3]?p:m):s===p||s===m?s=_:s===a||s===f?s=v:(s=_,i=void 0);const g=s===_&&e[t+1].startsWith("/>")?" ":"";o+=s===v?r+l$1:u>=0?(n.push(c),r.slice(0,u)+"$lit$"+r.slice(u)+o$2+g):r+o$2+(-2===u?(n.push(void 0),t):g)}const c=o+(e[r]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e$2?e$2.createHTML(c):c,n]};class C{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let a=0,o=0;const s=e.length-1,c=this.parts,[l,u]=E(e,t);if(this.el=C.createElement(l,n),A.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=A.nextNode())&&c.length<s;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(o$2)){const r=u[o++];if(e.push(t),void 0!==r){const e=i.getAttribute(r.toLowerCase()+"$lit$").split(o$2),t=/([.?@])?(.*)/.exec(r);c.push({type:1,index:a,name:t[2],strings:e,ctor:"."===t[1]?M:"?"===t[1]?k:"@"===t[1]?H:S})}else c.push({type:6,index:a})}for(const t of e)i.removeAttribute(t)}if($.test(i.tagName)){const e=i.textContent.split(o$2),t=e.length-1;if(t>0){i.textContent=s$1?s$1.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],r()),A.nextNode(),c.push({type:2,index:++a});i.append(e[t],r())}}}else if(8===i.nodeType)if(i.data===n$2)c.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(o$2,e+1));)c.push({type:7,index:a}),e+=o$2.length-1}a++}}static createElement(e,t){const r=h.createElement("template");return r.innerHTML=e,r}}function P(e,t,r=e,n){var i,a,o,s;if(t===x)return t;let c=void 0!==n?null===(i=r._$Co)||void 0===i?void 0:i[n]:r._$Cl;const l=d(t)?void 0:t._$litDirective$;return(null==c?void 0:c.constructor)!==l&&(null===(a=null==c?void 0:c._$AO)||void 0===a||a.call(c,!1),void 0===l?c=void 0:(c=new l(e),c._$AT(e,r,n)),void 0!==n?(null!==(o=(s=r)._$Co)&&void 0!==o?o:s._$Co=[])[n]=c:r._$Cl=c),void 0!==c&&(t=P(e,c._$AS(e,t.values),c,n)),t}class V{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:r},parts:n}=this._$AD,i=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:h).importNode(r,!0);A.currentNode=i;let a=A.nextNode(),o=0,s=0,c=n[0];for(;void 0!==c;){if(o===c.index){let t;2===c.type?t=new N(a,a.nextSibling,this,e):1===c.type?t=new c.ctor(a,c.name,c.strings,this,e):6===c.type&&(t=new I(a,this,e)),this.u.push(t),c=n[++s]}o!==(null==c?void 0:c.index)&&(a=A.nextNode(),o++)}return i}p(e){let t=0;for(const r of this.u)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class N{constructor(e,t,r,n){var i;this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cm=null===(i=null==n?void 0:n.isConnected)||void 0===i||i}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cm}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=P(this,e,t),d(e)?e===b||null==e||""===e?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==x&&this.g(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):c(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==b&&d(this._$AH)?this._$AA.nextSibling.data=e:this.T(h.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=C.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.p(r);else{const e=new V(i,this),t=e.v(this.options);e.p(r),this.T(t),this._$AH=e}}_$AC(e){let t=T.get(e.strings);return void 0===t&&T.set(e.strings,t=new C(e)),t}k(e){u(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const a of e)i===t.length?t.push(n=new N(this.O(r()),this.O(r()),this,this.options)):n=t[i],n._$AI(a),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var r;for(null===(r=this._$AP)||void 0===r||r.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cm=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class S{constructor(e,t,r,n,i){this.type=1,this._$AH=b,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=b}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let a=!1;if(void 0===i)e=P(this,e,t,0),a=!d(e)||e!==this._$AH&&e!==x,a&&(this._$AH=e);else{const n=e;let o,s;for(e=i[0],o=0;o<i.length-1;o++)s=P(this,n[r+o],t,o),s===x&&(s=this._$AH[o]),a||(a=!d(s)||s!==this._$AH[o]),s===b?e=b:e!==b&&(e+=(null!=s?s:"")+i[o+1]),this._$AH[o]=s}a&&!n&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class M extends S{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}}const R=s$1?s$1.emptyScript:"";class k extends S{constructor(){super(...arguments),this.type=4}j(e){e&&e!==b?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class H extends S{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){var r;if((e=null!==(r=P(this,e,t,0))&&void 0!==r?r:b)===x)return;const n=this._$AH,i=e===b&&n!==b||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==b&&(n===b||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;"function"==typeof this._$AH?this._$AH.call(null!==(r=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==r?r:this.element,e):this._$AH.handleEvent(e)}}class I{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){P(this,e)}}const z=i$2.litHtmlPolyfillSupport;null==z||z(C,N),(null!==(t=i$2.litHtmlVersions)&&void 0!==t?t:i$2.litHtmlVersions=[]).push("2.6.1");const Z=(e,t,n)=>{var i,a;const o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let s=o._$litPart$;if(void 0===s){const e=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;o._$litPart$=s=new N(t.insertBefore(r(),e),e,void 0,null!=n?n:{})}return s._$AI(e),s
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */};var l,o$1;class s extends d$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Z(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return x}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n$1=globalThis.litElementPolyfillSupport;null==n$1||n$1({LitElement:s}),(null!==(o$1=globalThis.litElementVersions)&&void 0!==o$1?o$1:globalThis.litElementVersions=[]).push("3.2.2");
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const i$1=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function e$1(e){return(t,r)=>void 0!==r?((e,t,r)=>{t.constructor.createProperty(r,e)})(e,t,r):i$1(e,t)
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */}const o=({finisher:e,descriptor:t})=>(r,n)=>{var i;if(void 0===n){const n=null!==(i=r.originalKey)&&void 0!==i?i:r.key,a=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(r.key)}:{...r,key:n};return null!=e&&(a.finisher=function(t){e(t,n)}),a}{const i=r.constructor;void 0!==t&&Object.defineProperty(r,n,t(n)),null==e||e(i,n)}}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */;function i(e,t){return o({descriptor:r=>{const n={get(){var t,r;return null!==(r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==r?r:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof r?Symbol():"__"+r;n.get=function(){var r,n;return void 0===this[t]&&(this[t]=null!==(n=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e))&&void 0!==n?n:null),this[t]}}return n}})}
/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */var n;null===(n=window.HTMLSlotElement)||void 0===n||n.prototype.assignedElements;const debounce=(e,t)=>{let r=null;return(...n)=>{null!=r&&window.clearTimeout(r),r=window.setTimeout((()=>{r=null,e(...n)}),t)}};function splitpath(e){const t=e.split("/").pop()||"",r=t.split("."),n=r.pop()||"";return{name:t,basename:r.join("."),ext:n}}function mkstemp(e){return`${e}data_${Math.floor(1e6*Math.random())}`}function rmtree(e,t){const r=e.stat(t);if(!r)return!1;if(e.isFile(r.mode))e.unlink(t);else if(e.isDir(r.mode)){const r=e.readdir(t);for(const n of r)"."!==n&&".."!==n&&rmtree(e,`${t}/${n}`);e.rmdir(t)}return!0}const MAX_BITS$1=15,D_CODES=30,BL_CODES=19,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,HEAP_SIZE=2*L_CODES+1,END_BLOCK=256,MAX_BL_BITS=7,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,Buf_size=16,Z_DEFAULT_COMPRESSION=-1,Z_FILTERED=1,Z_HUFFMAN_ONLY=2,Z_DEFAULT_STRATEGY=0,Z_NO_FLUSH$1=0,Z_PARTIAL_FLUSH=1,Z_FULL_FLUSH=3,Z_FINISH$1=4,Z_OK$1=0,Z_STREAM_END$1=1,Z_NEED_DICT$1=2,Z_STREAM_ERROR$1=-2,Z_DATA_ERROR$1=-3,Z_BUF_ERROR$1=-5;function extractArray(e){return flatArray(e.map((([e,t])=>new Array(e).fill(t,0,e))))}function flatArray(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?flatArray(t):t)),[])}const _dist_code=[0,1,2,3].concat(...extractArray([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Tree(){const e=this;function t(e,t){let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}e.build_tree=function(r){const n=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,s,c,l=-1;for(r.heap_len=0,r.heap_max=HEAP_SIZE,o=0;o<a;o++)0!==n[2*o]?(r.heap[++r.heap_len]=l=o,r.depth[o]=0):n[2*o+1]=0;for(;r.heap_len<2;)c=r.heap[++r.heap_len]=l<2?++l:0,n[2*c]=1,r.depth[c]=0,r.opt_len--,i&&(r.static_len-=i[2*c+1]);for(e.max_code=l,o=Math.floor(r.heap_len/2);o>=1;o--)r.pqdownheap(n,o);c=a;do{o=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(n,1),s=r.heap[1],r.heap[--r.heap_max]=o,r.heap[--r.heap_max]=s,n[2*c]=n[2*o]+n[2*s],r.depth[c]=Math.max(r.depth[o],r.depth[s])+1,n[2*o+1]=n[2*s+1]=c,r.heap[1]=c++,r.pqdownheap(n,1)}while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],function(t){const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,o=e.stat_desc.max_length;let s,c,l,u,d,f,_=0;for(u=0;u<=MAX_BITS$1;u++)t.bl_count[u]=0;for(r[2*t.heap[t.heap_max]+1]=0,s=t.heap_max+1;s<HEAP_SIZE;s++)c=t.heap[s],u=r[2*r[2*c+1]+1]+1,u>o&&(u=o,_++),r[2*c+1]=u,c>e.max_code||(t.bl_count[u]++,d=0,c>=a&&(d=i[c-a]),f=r[2*c],t.opt_len+=f*(u+d),n&&(t.static_len+=f*(n[2*c+1]+d)));if(0!==_){do{for(u=o-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[o]--,_-=2}while(_>0);for(u=o;0!==u;u--)for(c=t.bl_count[u];0!==c;)l=t.heap[--s],l>e.max_code||(r[2*l+1]!=u&&(t.opt_len+=(u-r[2*l+1])*r[2*l],r[2*l+1]=u),c--)}}(r),function(e,r,n){const i=[];let a,o,s,c=0;for(a=1;a<=MAX_BITS$1;a++)i[a]=c=c+n[a-1]<<1;for(o=0;o<=r;o++)s=e[2*o+1],0!==s&&(e[2*o]=t(i[s]++,s))}(n,e.max_code,r.bl_count)}}function StaticTree(e,t,r,n,i){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=r,a.elems=n,a.max_length=i}Tree._length_code=[0,1,2,3,4,5,6,7].concat(...extractArray([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Tree.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Tree.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Tree.d_code=function(e){return e<256?_dist_code[e]:_dist_code[256+(e>>>7)]},Tree.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Tree.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Tree.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Tree.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const static_ltree2_first_part=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],static_ltree2_second_part=extractArray([[144,8],[112,9],[24,7],[8,8]]);StaticTree.static_ltree=flatArray(static_ltree2_first_part.map(((e,t)=>[e,static_ltree2_second_part[t]])));const static_dtree_first_part=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],static_dtree_second_part=extractArray([[30,5]]);StaticTree.static_dtree=flatArray(static_dtree_first_part.map(((e,t)=>[e,static_dtree_second_part[t]]))),StaticTree.static_l_desc=new StaticTree(StaticTree.static_ltree,Tree.extra_lbits,LITERALS+1,L_CODES,MAX_BITS$1),StaticTree.static_d_desc=new StaticTree(StaticTree.static_dtree,Tree.extra_dbits,0,D_CODES,MAX_BITS$1),StaticTree.static_bl_desc=new StaticTree(null,Tree.extra_blbits,0,BL_CODES,MAX_BL_BITS);const MAX_MEM_LEVEL=9,DEF_MEM_LEVEL=8;function Config(e,t,r,n,i){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=r,a.max_chain=n,a.func=i}const STORED$1=0,FAST=1,SLOW=2,config_table=[new Config(0,0,0,0,STORED$1),new Config(4,4,8,4,FAST),new Config(4,5,16,8,FAST),new Config(4,6,32,32,FAST),new Config(4,4,16,16,SLOW),new Config(8,16,32,32,SLOW),new Config(8,16,128,128,SLOW),new Config(8,32,128,256,SLOW),new Config(32,128,258,1024,SLOW),new Config(32,258,258,4096,SLOW)],z_errmsg=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],NeedMore=0,BlockDone=1,FinishStarted=2,FinishDone=3,PRESET_DICT$1=32,INIT_STATE=42,BUSY_STATE=113,FINISH_STATE=666,Z_DEFLATED$1=8,STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;function smaller(e,t,r,n){const i=e[2*t],a=e[2*r];return i<a||i==a&&n[t]<=n[r]}function Deflate(){const e=this;let t,r,n,i,a,o,s,c,l,u,d,f,_,m,p,g,h,v,E,b,w,x,y,S,A,L,T,F,k,P,G,R,D;const M=new Tree,C=new Tree,I=new Tree;let H,O,U,B,N,z;function j(){let t;for(t=0;t<L_CODES;t++)G[2*t]=0;for(t=0;t<D_CODES;t++)R[2*t]=0;for(t=0;t<BL_CODES;t++)D[2*t]=0;G[2*END_BLOCK]=1,e.opt_len=e.static_len=0,O=U=0}function $(e,t){let r,n=-1,i=e[1],a=0,o=7,s=4;0===i&&(o=138,s=3),e[2*(t+1)+1]=65535;for(let c=0;c<=t;c++)r=i,i=e[2*(c+1)+1],++a<o&&r==i||(a<s?D[2*r]+=a:0!==r?(r!=n&&D[2*r]++,D[2*REP_3_6]++):a<=10?D[2*REPZ_3_10]++:D[2*REPZ_11_138]++,a=0,n=r,0===i?(o=138,s=3):r==i?(o=6,s=3):(o=7,s=4))}function W(t){e.pending_buf[e.pending++]=t}function V(e){W(255&e),W(e>>>8&255)}function Z(e,t){let r;const n=t;z>Buf_size-n?(r=e,N|=r<<z&65535,V(N),N=r>>>Buf_size-z,z+=n-Buf_size):(N|=e<<z&65535,z+=n)}function Y(e,t){const r=2*e;Z(65535&t[r],65535&t[r+1])}function q(e,t){let r,n,i=-1,a=e[1],o=0,s=7,c=4;for(0===a&&(s=138,c=3),r=0;r<=t;r++)if(n=a,a=e[2*(r+1)+1],!(++o<s&&n==a)){if(o<c)do{Y(n,D)}while(0!=--o);else 0!==n?(n!=i&&(Y(n,D),o--),Y(REP_3_6,D),Z(o-3,2)):o<=10?(Y(REPZ_3_10,D),Z(o-3,3)):(Y(REPZ_11_138,D),Z(o-11,7));o=0,i=n,0===a?(s=138,c=3):n==a?(s=6,c=3):(s=7,c=4)}}function K(){16==z?(V(N),N=0,z=0):z>=8&&(W(255&N),N>>>=8,z-=8)}function X(t,r){let n,i,a;if(e.dist_buf[O]=t,e.lc_buf[O]=255&r,O++,0===t?G[2*r]++:(U++,t--,G[2*(Tree._length_code[r]+LITERALS+1)]++,R[2*Tree.d_code(t)]++),0==(8191&O)&&T>2){for(n=8*O,i=w-h,a=0;a<D_CODES;a++)n+=R[2*a]*(5+Tree.extra_dbits[a]);if(n>>>=3,U<Math.floor(O/2)&&n<Math.floor(i/2))return!0}return O==H-1}function J(t,r){let n,i,a,o,s=0;if(0!==O)do{n=e.dist_buf[s],i=e.lc_buf[s],s++,0===n?Y(i,t):(a=Tree._length_code[i],Y(a+LITERALS+1,t),o=Tree.extra_lbits[a],0!==o&&(i-=Tree.base_length[a],Z(i,o)),n--,a=Tree.d_code(n),Y(a,r),o=Tree.extra_dbits[a],0!==o&&(n-=Tree.base_dist[a],Z(n,o)))}while(s<O);Y(END_BLOCK,t),B=t[2*END_BLOCK+1]}function Q(){z>8?V(N):z>0&&W(255&N),N=0,z=0}function ee(t,r,n){Z((STORED_BLOCK<<1)+(n?1:0),3),function(t,r,n){Q(),B=8,n&&(V(r),V(~r)),e.pending_buf.set(c.subarray(t,t+r),e.pending),e.pending+=r}(t,r,!0)}function te(t,r,n){let i,a,o=0;T>0?(M.build_tree(e),C.build_tree(e),o=function(){let t;for($(G,M.max_code),$(R,C.max_code),I.build_tree(e),t=BL_CODES-1;t>=3&&0===D[2*Tree.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!=t?ee(t,r,n):a==i?(Z((STATIC_TREES<<1)+(n?1:0),3),J(StaticTree.static_ltree,StaticTree.static_dtree)):(Z((DYN_TREES<<1)+(n?1:0),3),function(e,t,r){let n;for(Z(e-257,5),Z(t-1,5),Z(r-4,4),n=0;n<r;n++)Z(D[2*Tree.bl_order[n]+1],3);q(G,e-1),q(R,t-1)}(M.max_code+1,C.max_code+1,o+1),J(G,R)),j(),n&&Q()}function re(e){te(h>=0?h:-1,w-h,e),h=w,t.flush_pending()}function ne(){let e,r,n,i;do{if(i=l-y-w,0===i&&0===w&&0===y)i=a;else if(-1==i)i--;else if(w>=a+a-MIN_LOOKAHEAD){c.set(c.subarray(a,a+a),0),x-=a,w-=a,h-=a,e=_,n=e;do{r=65535&d[--n],d[n]=r>=a?r-a:0}while(0!=--e);e=a,n=e;do{r=65535&u[--n],u[n]=r>=a?r-a:0}while(0!=--e);i+=a}if(0===t.avail_in)return;e=t.read_buf(c,w+y,i),y+=e,y>=MIN_MATCH&&(f=255&c[w],f=(f<<g^255&c[w+1])&p)}while(y<MIN_LOOKAHEAD&&0!==t.avail_in)}function ie(e){let t,r,n=A,i=w,o=S;const l=w>a-MIN_LOOKAHEAD?w-(a-MIN_LOOKAHEAD):0;let d=P;const f=s,_=w+MAX_MATCH;let m=c[i+o-1],p=c[i+o];S>=k&&(n>>=2),d>y&&(d=y);do{if(t=e,c[t+o]==p&&c[t+o-1]==m&&c[t]==c[i]&&c[++t]==c[i+1]){i+=2,t++;do{}while(c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&i<_);if(r=MAX_MATCH-(_-i),i=_-MAX_MATCH,r>o){if(x=e,o=r,r>=d)break;m=c[i+o-1],p=c[i+o]}}}while((e=65535&u[e&f])>l&&0!=--n);return o<=y?o:y}function ae(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,r=BUSY_STATE,i=Z_NO_FLUSH$1,M.dyn_tree=G,M.stat_desc=StaticTree.static_l_desc,C.dyn_tree=R,C.stat_desc=StaticTree.static_d_desc,I.dyn_tree=D,I.stat_desc=StaticTree.static_bl_desc,N=0,z=0,B=8,j(),function(){l=2*a,d[_-1]=0;for(let e=0;e<_-1;e++)d[e]=0;L=config_table[T].max_lazy,k=config_table[T].good_length,P=config_table[T].nice_length,A=config_table[T].max_chain,w=0,h=0,y=0,v=S=MIN_MATCH-1,b=0,f=0}(),Z_OK$1}e.depth=[],e.bl_count=[],e.heap=[],G=[],R=[],D=[],e.pqdownheap=function(t,r){const n=e.heap,i=n[r];let a=r<<1;for(;a<=e.heap_len&&(a<e.heap_len&&smaller(t,n[a+1],n[a],e.depth)&&a++,!smaller(t,i,n[a],e.depth));)n[r]=n[a],r=a,a<<=1;n[r]=i},e.deflateInit=function(t,r,i,l,f,h){return l||(l=Z_DEFLATED$1),f||(f=DEF_MEM_LEVEL),h||(h=Z_DEFAULT_STRATEGY),t.msg=null,r==Z_DEFAULT_COMPRESSION&&(r=6),f<1||f>MAX_MEM_LEVEL||l!=Z_DEFLATED$1||i<9||i>15||r<0||r>9||h<0||h>Z_HUFFMAN_ONLY?Z_STREAM_ERROR$1:(t.dstate=e,o=i,a=1<<o,s=a-1,m=f+7,_=1<<m,p=_-1,g=Math.floor((m+MIN_MATCH-1)/MIN_MATCH),c=new Uint8Array(2*a),u=[],d=[],H=1<<f+6,e.pending_buf=new Uint8Array(4*H),n=4*H,e.dist_buf=new Uint16Array(H),e.lc_buf=new Uint8Array(H),T=r,F=h,ae(t))},e.deflateEnd=function(){return r!=INIT_STATE&&r!=BUSY_STATE&&r!=FINISH_STATE?Z_STREAM_ERROR$1:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,d=null,u=null,c=null,e.dstate=null,r==BUSY_STATE?Z_DATA_ERROR$1:Z_OK$1)},e.deflateParams=function(e,t,r){let n=Z_OK$1;return t==Z_DEFAULT_COMPRESSION&&(t=6),t<0||t>9||r<0||r>Z_HUFFMAN_ONLY?Z_STREAM_ERROR$1:(config_table[T].func!=config_table[t].func&&0!==e.total_in&&(n=e.deflate(Z_PARTIAL_FLUSH)),T!=t&&(T=t,L=config_table[T].max_lazy,k=config_table[T].good_length,P=config_table[T].nice_length,A=config_table[T].max_chain),F=r,n)},e.deflateSetDictionary=function(e,t,n){let i,o=n,l=0;if(!t||r!=INIT_STATE)return Z_STREAM_ERROR$1;if(o<MIN_MATCH)return Z_OK$1;for(o>a-MIN_LOOKAHEAD&&(o=a-MIN_LOOKAHEAD,l=n-o),c.set(t.subarray(l,l+o),0),w=o,h=o,f=255&c[0],f=(f<<g^255&c[1])&p,i=0;i<=o-MIN_MATCH;i++)f=(f<<g^255&c[i+(MIN_MATCH-1)])&p,u[i&s]=d[f],d[f]=i;return Z_OK$1},e.deflate=function(l,m){let A,k,P,G,R;if(m>Z_FINISH$1||m<0)return Z_STREAM_ERROR$1;if(!l.next_out||!l.next_in&&0!==l.avail_in||r==FINISH_STATE&&m!=Z_FINISH$1)return l.msg=z_errmsg[Z_NEED_DICT$1-Z_STREAM_ERROR$1],Z_STREAM_ERROR$1;if(0===l.avail_out)return l.msg=z_errmsg[Z_NEED_DICT$1-Z_BUF_ERROR$1],Z_BUF_ERROR$1;if(t=l,G=i,i=m,r==INIT_STATE&&(k=Z_DEFLATED$1+(o-8<<4)<<8,P=(T-1&255)>>1,P>3&&(P=3),k|=P<<6,0!==w&&(k|=PRESET_DICT$1),k+=31-k%31,r=BUSY_STATE,function(e){W(e>>8&255),W(255&e)}(k)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return i=-1,Z_OK$1}else if(0===t.avail_in&&m<=G&&m!=Z_FINISH$1)return t.msg=z_errmsg[Z_NEED_DICT$1-Z_BUF_ERROR$1],Z_BUF_ERROR$1;if(r==FINISH_STATE&&0!==t.avail_in)return l.msg=z_errmsg[Z_NEED_DICT$1-Z_BUF_ERROR$1],Z_BUF_ERROR$1;if(0!==t.avail_in||0!==y||m!=Z_NO_FLUSH$1&&r!=FINISH_STATE){switch(R=-1,config_table[T].func){case STORED$1:R=function(e){let r,i=65535;for(i>n-5&&(i=n-5);;){if(y<=1){if(ne(),0===y&&e==Z_NO_FLUSH$1)return NeedMore;if(0===y)break}if(w+=y,y=0,r=h+i,(0===w||w>=r)&&(y=w-r,w=r,re(!1),0===t.avail_out))return NeedMore;if(w-h>=a-MIN_LOOKAHEAD&&(re(!1),0===t.avail_out))return NeedMore}return re(e==Z_FINISH$1),0===t.avail_out?e==Z_FINISH$1?FinishStarted:NeedMore:e==Z_FINISH$1?FinishDone:BlockDone}(m);break;case FAST:R=function(e){let r,n=0;for(;;){if(y<MIN_LOOKAHEAD){if(ne(),y<MIN_LOOKAHEAD&&e==Z_NO_FLUSH$1)return NeedMore;if(0===y)break}if(y>=MIN_MATCH&&(f=(f<<g^255&c[w+(MIN_MATCH-1)])&p,n=65535&d[f],u[w&s]=d[f],d[f]=w),0!==n&&(w-n&65535)<=a-MIN_LOOKAHEAD&&F!=Z_HUFFMAN_ONLY&&(v=ie(n)),v>=MIN_MATCH)if(r=X(w-x,v-MIN_MATCH),y-=v,v<=L&&y>=MIN_MATCH){v--;do{w++,f=(f<<g^255&c[w+(MIN_MATCH-1)])&p,n=65535&d[f],u[w&s]=d[f],d[f]=w}while(0!=--v);w++}else w+=v,v=0,f=255&c[w],f=(f<<g^255&c[w+1])&p;else r=X(0,255&c[w]),y--,w++;if(r&&(re(!1),0===t.avail_out))return NeedMore}return re(e==Z_FINISH$1),0===t.avail_out?e==Z_FINISH$1?FinishStarted:NeedMore:e==Z_FINISH$1?FinishDone:BlockDone}(m);break;case SLOW:R=function(e){let r,n,i=0;for(;;){if(y<MIN_LOOKAHEAD){if(ne(),y<MIN_LOOKAHEAD&&e==Z_NO_FLUSH$1)return NeedMore;if(0===y)break}if(y>=MIN_MATCH&&(f=(f<<g^255&c[w+(MIN_MATCH-1)])&p,i=65535&d[f],u[w&s]=d[f],d[f]=w),S=v,E=x,v=MIN_MATCH-1,0!==i&&S<L&&(w-i&65535)<=a-MIN_LOOKAHEAD&&(F!=Z_HUFFMAN_ONLY&&(v=ie(i)),v<=5&&(F==Z_FILTERED||v==MIN_MATCH&&w-x>4096)&&(v=MIN_MATCH-1)),S>=MIN_MATCH&&v<=S){n=w+y-MIN_MATCH,r=X(w-1-E,S-MIN_MATCH),y-=S-1,S-=2;do{++w<=n&&(f=(f<<g^255&c[w+(MIN_MATCH-1)])&p,i=65535&d[f],u[w&s]=d[f],d[f]=w)}while(0!=--S);if(b=0,v=MIN_MATCH-1,w++,r&&(re(!1),0===t.avail_out))return NeedMore}else if(0!==b){if(r=X(0,255&c[w-1]),r&&re(!1),w++,y--,0===t.avail_out)return NeedMore}else b=1,w++,y--}return 0!==b&&(r=X(0,255&c[w-1]),b=0),re(e==Z_FINISH$1),0===t.avail_out?e==Z_FINISH$1?FinishStarted:NeedMore:e==Z_FINISH$1?FinishDone:BlockDone}(m)}if(R!=FinishStarted&&R!=FinishDone||(r=FINISH_STATE),R==NeedMore||R==FinishStarted)return 0===t.avail_out&&(i=-1),Z_OK$1;if(R==BlockDone){if(m==Z_PARTIAL_FLUSH)Z(STATIC_TREES<<1,3),Y(END_BLOCK,StaticTree.static_ltree),K(),1+B+10-z<9&&(Z(STATIC_TREES<<1,3),Y(END_BLOCK,StaticTree.static_ltree),K()),B=7;else if(ee(0,0,!1),m==Z_FULL_FLUSH)for(A=0;A<_;A++)d[A]=0;if(t.flush_pending(),0===t.avail_out)return i=-1,Z_OK$1}}return m!=Z_FINISH$1?Z_OK$1:Z_STREAM_END$1}}function ZStream$1(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}function ZipDeflate(e){const t=new ZStream$1,r=getMaximumCompressedSize(e&&e.chunkSize?e.chunkSize:65536),n=Z_NO_FLUSH$1,i=new Uint8Array(r);let a=e?e.level:Z_DEFAULT_COMPRESSION;void 0===a&&(a=Z_DEFAULT_COMPRESSION),t.deflateInit(a),t.next_out=i,this.append=function(e,a){let o,s,c=0,l=0,u=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,o=t.deflate(n),o!=Z_OK$1)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?d.push(new Uint8Array(i)):d.push(i.slice(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(s=new Uint8Array(u),d.forEach((function(e){s.set(e,l),l+=e.length}))):s=d[0]||new Uint8Array,s}},this.flush=function(){let e,n,a=0,o=0;const s=[];do{if(t.next_out_index=0,t.avail_out=r,e=t.deflate(Z_FINISH$1),e!=Z_STREAM_END$1&&e!=Z_OK$1)throw new Error("deflating: "+t.msg);r-t.avail_out>0&&s.push(i.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new Uint8Array(o),s.forEach((function(e){n.set(e,a),a+=e.length})),n}}function getMaximumCompressedSize(e){return e+5*(Math.floor(e/16383)+1)}ZStream$1.prototype={deflateInit(e,t){const r=this;return r.dstate=new Deflate,t||(t=MAX_BITS$1),r.dstate.deflateInit(r,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):Z_STREAM_ERROR$1},deflateEnd(){const e=this;if(!e.dstate)return Z_STREAM_ERROR$1;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const r=this;return r.dstate?r.dstate.deflateParams(r,e,t):Z_STREAM_ERROR$1},deflateSetDictionary(e,t){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,e,t):Z_STREAM_ERROR$1},read_buf(e,t,r){const n=this;let i=n.avail_in;return i>r&&(i=r),0===i?0:(n.avail_in-=i,e.set(n.next_in.subarray(n.next_in_index,n.next_in_index+i),t),n.next_in_index+=i,n.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const MAX_BITS=15,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,inflate_mask=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],MANY=1440,Z_NO_FLUSH=0,Z_FINISH=4,fixed_bl=9,fixed_bd=5,fixed_tl=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],fixed_td=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],cplens=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cplext=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],cpdist=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],cpdext=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],BMAX=15;function InfTree(){let e,t,r,n,i,a;function o(e,t,o,s,c,l,u,d,f,_,m){let p,g,h,v,E,b,w,x,y,S,A,L,T,F,k;S=0,E=o;do{r[e[t+S]]++,S++,E--}while(0!==E);if(r[0]==o)return u[0]=-1,d[0]=0,Z_OK;for(x=d[0],b=1;b<=BMAX&&0===r[b];b++);for(w=b,x<b&&(x=b),E=BMAX;0!==E&&0===r[E];E--);for(h=E,x>E&&(x=E),d[0]=x,F=1<<b;b<E;b++,F<<=1)if((F-=r[b])<0)return Z_DATA_ERROR;if((F-=r[E])<0)return Z_DATA_ERROR;for(r[E]+=F,a[1]=b=0,S=1,T=2;0!=--E;)a[T]=b+=r[S],T++,S++;E=0,S=0;do{0!==(b=e[t+S])&&(m[a[b]++]=E),S++}while(++E<o);for(o=a[h],a[0]=E=0,S=0,v=-1,L=-x,i[0]=0,A=0,k=0;w<=h;w++)for(p=r[w];0!=p--;){for(;w>L+x;){if(v++,L+=x,k=h-L,k=k>x?x:k,(g=1<<(b=w-L))>p+1&&(g-=p+1,T=w,b<k))for(;++b<k&&!((g<<=1)<=r[++T]);)g-=r[T];if(k=1<<b,_[0]+k>MANY)return Z_DATA_ERROR;i[v]=A=_[0],_[0]+=k,0!==v?(a[v]=E,n[0]=b,n[1]=x,b=E>>>L-x,n[2]=A-i[v-1]-b,f.set(n,3*(i[v-1]+b))):u[0]=A}for(n[1]=w-L,S>=o?n[0]=192:m[S]<s?(n[0]=m[S]<256?0:96,n[2]=m[S++]):(n[0]=l[m[S]-s]+16+64,n[2]=c[m[S++]-s]),g=1<<w-L,b=E>>>L;b<k;b+=g)f.set(n,3*(A+b));for(b=1<<w-1;0!=(E&b);b>>>=1)E^=b;for(E^=b,y=(1<<L)-1;(E&y)!=a[v];)v--,L-=x,y=(1<<L)-1}return 0!==F&&1!=h?Z_BUF_ERROR:Z_OK}function s(o){let s;for(e||(e=[],t=[],r=new Int32Array(BMAX+1),n=[],i=new Int32Array(BMAX),a=new Int32Array(BMAX+1)),t.length<o&&(t=[]),s=0;s<o;s++)t[s]=0;for(s=0;s<BMAX+1;s++)r[s]=0;for(s=0;s<3;s++)n[s]=0;i.set(r.subarray(0,BMAX),0),a.set(r.subarray(0,BMAX+1),0)}this.inflate_trees_bits=function(r,n,i,a,c){let l;return s(19),e[0]=0,l=o(r,0,19,19,null,null,i,n,a,e,t),l==Z_DATA_ERROR?c.msg="oversubscribed dynamic bit lengths tree":l!=Z_BUF_ERROR&&0!==n[0]||(c.msg="incomplete dynamic bit lengths tree",l=Z_DATA_ERROR),l},this.inflate_trees_dynamic=function(r,n,i,a,c,l,u,d,f){let _;return s(288),e[0]=0,_=o(i,0,r,257,cplens,cplext,l,a,d,e,t),_!=Z_OK||0===a[0]?(_==Z_DATA_ERROR?f.msg="oversubscribed literal/length tree":_!=Z_MEM_ERROR&&(f.msg="incomplete literal/length tree",_=Z_DATA_ERROR),_):(s(288),_=o(i,r,n,0,cpdist,cpdext,u,c,d,e,t),_!=Z_OK||0===c[0]&&r>257?(_==Z_DATA_ERROR?f.msg="oversubscribed distance tree":_==Z_BUF_ERROR?(f.msg="incomplete distance tree",_=Z_DATA_ERROR):_!=Z_MEM_ERROR&&(f.msg="empty distance tree with lengths",_=Z_DATA_ERROR),_):Z_OK)}}InfTree.inflate_trees_fixed=function(e,t,r,n){return e[0]=fixed_bl,t[0]=fixed_bd,r[0]=fixed_tl,n[0]=fixed_td,Z_OK};const START=0,LEN=1,LENEXT=2,DIST=3,DISTEXT=4,COPY=5,LIT=6,WASH=7,END=8,BADCODE=9;function InfCodes(){const e=this;let t,r,n,i,a=0,o=0,s=0,c=0,l=0,u=0,d=0,f=0,_=0,m=0;function p(e,t,r,n,i,a,o,s){let c,l,u,d,f,_,m,p,g,h,v,E,b,w,x,y;m=s.next_in_index,p=s.avail_in,f=o.bitb,_=o.bitk,g=o.write,h=g<o.read?o.read-g-1:o.end-g,v=inflate_mask[e],E=inflate_mask[t];do{for(;_<20;)p--,f|=(255&s.read_byte(m++))<<_,_+=8;if(c=f&v,l=r,u=n,y=3*(u+c),0!==(d=l[y]))for(;;){if(f>>=l[y+1],_-=l[y+1],0!=(16&d)){for(d&=15,b=l[y+2]+(f&inflate_mask[d]),f>>=d,_-=d;_<15;)p--,f|=(255&s.read_byte(m++))<<_,_+=8;for(c=f&E,l=i,u=a,y=3*(u+c),d=l[y];;){if(f>>=l[y+1],_-=l[y+1],0!=(16&d)){for(d&=15;_<d;)p--,f|=(255&s.read_byte(m++))<<_,_+=8;if(w=l[y+2]+(f&inflate_mask[d]),f>>=d,_-=d,h-=b,g>=w)x=g-w,g-x>0&&2>g-x?(o.win[g++]=o.win[x++],o.win[g++]=o.win[x++],b-=2):(o.win.set(o.win.subarray(x,x+2),g),g+=2,x+=2,b-=2);else{x=g-w;do{x+=o.end}while(x<0);if(d=o.end-x,b>d){if(b-=d,g-x>0&&d>g-x)do{o.win[g++]=o.win[x++]}while(0!=--d);else o.win.set(o.win.subarray(x,x+d),g),g+=d,x+=d,d=0;x=0}}if(g-x>0&&b>g-x)do{o.win[g++]=o.win[x++]}while(0!=--b);else o.win.set(o.win.subarray(x,x+b),g),g+=b,x+=b,b=0;break}if(0!=(64&d))return s.msg="invalid distance code",b=s.avail_in-p,b=_>>3<b?_>>3:b,p+=b,m-=b,_-=b<<3,o.bitb=f,o.bitk=_,s.avail_in=p,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,Z_DATA_ERROR;c+=l[y+2],c+=f&inflate_mask[d],y=3*(u+c),d=l[y]}break}if(0!=(64&d))return 0!=(32&d)?(b=s.avail_in-p,b=_>>3<b?_>>3:b,p+=b,m-=b,_-=b<<3,o.bitb=f,o.bitk=_,s.avail_in=p,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,Z_STREAM_END):(s.msg="invalid literal/length code",b=s.avail_in-p,b=_>>3<b?_>>3:b,p+=b,m-=b,_-=b<<3,o.bitb=f,o.bitk=_,s.avail_in=p,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,Z_DATA_ERROR);if(c+=l[y+2],c+=f&inflate_mask[d],y=3*(u+c),0===(d=l[y])){f>>=l[y+1],_-=l[y+1],o.win[g++]=l[y+2],h--;break}}else f>>=l[y+1],_-=l[y+1],o.win[g++]=l[y+2],h--}while(h>=258&&p>=10);return b=s.avail_in-p,b=_>>3<b?_>>3:b,p+=b,m-=b,_-=b<<3,o.bitb=f,o.bitk=_,s.avail_in=p,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,Z_OK}e.init=function(e,a,o,s,c,l){t=START,d=e,f=a,n=o,_=s,i=c,m=l,r=null},e.proc=function(e,g,h){let v,E,b,w,x,y,S,A=0,L=0,T=0;for(T=g.next_in_index,w=g.avail_in,A=e.bitb,L=e.bitk,x=e.write,y=x<e.read?e.read-x-1:e.end-x;;)switch(t){case START:if(y>=258&&w>=10&&(e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,h=p(d,f,n,_,i,m,e,g),T=g.next_in_index,w=g.avail_in,A=e.bitb,L=e.bitk,x=e.write,y=x<e.read?e.read-x-1:e.end-x,h!=Z_OK)){t=h==Z_STREAM_END?WASH:BADCODE;break}s=d,r=n,o=_,t=LEN;case LEN:for(v=s;L<v;){if(0===w)return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);h=Z_OK,w--,A|=(255&g.read_byte(T++))<<L,L+=8}if(E=3*(o+(A&inflate_mask[v])),A>>>=r[E+1],L-=r[E+1],b=r[E],0===b){c=r[E+2],t=LIT;break}if(0!=(16&b)){l=15&b,a=r[E+2],t=LENEXT;break}if(0==(64&b)){s=b,o=E/3+r[E+2];break}if(0!=(32&b)){t=WASH;break}return t=BADCODE,g.msg="invalid literal/length code",h=Z_DATA_ERROR,e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);case LENEXT:for(v=l;L<v;){if(0===w)return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);h=Z_OK,w--,A|=(255&g.read_byte(T++))<<L,L+=8}a+=A&inflate_mask[v],A>>=v,L-=v,s=f,r=i,o=m,t=DIST;case DIST:for(v=s;L<v;){if(0===w)return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);h=Z_OK,w--,A|=(255&g.read_byte(T++))<<L,L+=8}if(E=3*(o+(A&inflate_mask[v])),A>>=r[E+1],L-=r[E+1],b=r[E],0!=(16&b)){l=15&b,u=r[E+2],t=DISTEXT;break}if(0==(64&b)){s=b,o=E/3+r[E+2];break}return t=BADCODE,g.msg="invalid distance code",h=Z_DATA_ERROR,e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);case DISTEXT:for(v=l;L<v;){if(0===w)return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);h=Z_OK,w--,A|=(255&g.read_byte(T++))<<L,L+=8}u+=A&inflate_mask[v],A>>=v,L-=v,t=COPY;case COPY:for(S=x-u;S<0;)S+=e.end;for(;0!==a;){if(0===y&&(x==e.end&&0!==e.read&&(x=0,y=x<e.read?e.read-x-1:e.end-x),0===y&&(e.write=x,h=e.inflate_flush(g,h),x=e.write,y=x<e.read?e.read-x-1:e.end-x,x==e.end&&0!==e.read&&(x=0,y=x<e.read?e.read-x-1:e.end-x),0===y)))return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);e.win[x++]=e.win[S++],y--,S==e.end&&(S=0),a--}t=START;break;case LIT:if(0===y&&(x==e.end&&0!==e.read&&(x=0,y=x<e.read?e.read-x-1:e.end-x),0===y&&(e.write=x,h=e.inflate_flush(g,h),x=e.write,y=x<e.read?e.read-x-1:e.end-x,x==e.end&&0!==e.read&&(x=0,y=x<e.read?e.read-x-1:e.end-x),0===y)))return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);h=Z_OK,e.win[x++]=c,y--,t=START;break;case WASH:if(L>7&&(L-=8,w++,T--),e.write=x,h=e.inflate_flush(g,h),x=e.write,y=x<e.read?e.read-x-1:e.end-x,e.read!=e.write)return e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);t=END;case END:return h=Z_STREAM_END,e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);case BADCODE:return h=Z_DATA_ERROR,e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h);default:return h=Z_STREAM_ERROR,e.bitb=A,e.bitk=L,g.avail_in=w,g.total_in+=T-g.next_in_index,g.next_in_index=T,e.write=x,e.inflate_flush(g,h)}},e.free=function(){}}const border=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],TYPE=0,LENS=1,STORED=2,TABLE=3,BTREE=4,DTREE=5,CODES=6,DRY=7,DONELOCKS=8,BADBLOCKS=9;function InfBlocks(e,t){const r=this;let n,i=TYPE,a=0,o=0,s=0;const c=[0],l=[0],u=new InfCodes;let d=0,f=new Int32Array(3*MANY);const _=new InfTree;r.bitk=0,r.bitb=0,r.win=new Uint8Array(t),r.end=t,r.read=0,r.write=0,r.reset=function(e,t){t&&(t[0]=0),i==CODES&&u.free(e),i=TYPE,r.bitk=0,r.bitb=0,r.read=r.write=0},r.reset(e,null),r.inflate_flush=function(e,t){let n,i,a;return i=e.next_out_index,a=r.read,n=(a<=r.write?r.write:r.end)-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==Z_BUF_ERROR&&(t=Z_OK),e.avail_out-=n,e.total_out+=n,e.next_out.set(r.win.subarray(a,a+n),i),i+=n,a+=n,a==r.end&&(a=0,r.write==r.end&&(r.write=0),n=r.write-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==Z_BUF_ERROR&&(t=Z_OK),e.avail_out-=n,e.total_out+=n,e.next_out.set(r.win.subarray(a,a+n),i),i+=n,a+=n),e.next_out_index=i,r.read=a,t},r.proc=function(e,t){let m,p,g,h,v,E,b,w;for(h=e.next_in_index,v=e.avail_in,p=r.bitb,g=r.bitk,E=r.write,b=E<r.read?r.read-E-1:r.end-E;;){let x,y,S,A,L,T,F,k;switch(i){case TYPE:for(;g<3;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}switch(m=7&p,d=1&m,m>>>1){case 0:p>>>=3,g-=3,m=7&g,p>>>=m,g-=m,i=LENS;break;case 1:x=[],y=[],S=[[]],A=[[]],InfTree.inflate_trees_fixed(x,y,S,A),u.init(x[0],y[0],S[0],0,A[0],0),p>>>=3,g-=3,i=CODES;break;case 2:p>>>=3,g-=3,i=TABLE;break;case 3:return p>>>=3,g-=3,i=BADBLOCKS,e.msg="invalid block type",t=Z_DATA_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t)}break;case LENS:for(;g<32;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}if((~p>>>16&65535)!=(65535&p))return i=BADBLOCKS,e.msg="invalid stored block lengths",t=Z_DATA_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);a=65535&p,p=g=0,i=0!==a?STORED:0!==d?DRY:TYPE;break;case STORED:if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);if(0===b&&(E==r.end&&0!==r.read&&(E=0,b=E<r.read?r.read-E-1:r.end-E),0===b&&(r.write=E,t=r.inflate_flush(e,t),E=r.write,b=E<r.read?r.read-E-1:r.end-E,E==r.end&&0!==r.read&&(E=0,b=E<r.read?r.read-E-1:r.end-E),0===b)))return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);if(t=Z_OK,m=a,m>v&&(m=v),m>b&&(m=b),r.win.set(e.read_buf(h,m),E),h+=m,v-=m,E+=m,b-=m,0!=(a-=m))break;i=0!==d?DRY:TYPE;break;case TABLE:for(;g<14;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}if(o=m=16383&p,(31&m)>29||(m>>5&31)>29)return i=BADBLOCKS,e.msg="too many length or distance symbols",t=Z_DATA_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);if(m=258+(31&m)+(m>>5&31),!n||n.length<m)n=[];else for(w=0;w<m;w++)n[w]=0;p>>>=14,g-=14,s=0,i=BTREE;case BTREE:for(;s<4+(o>>>10);){for(;g<3;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}n[border[s++]]=7&p,p>>>=3,g-=3}for(;s<19;)n[border[s++]]=0;if(c[0]=7,m=_.inflate_trees_bits(n,c,l,f,e),m!=Z_OK)return(t=m)==Z_DATA_ERROR&&(n=null,i=BADBLOCKS),r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);s=0,i=DTREE;case DTREE:for(;m=o,!(s>=258+(31&m)+(m>>5&31));){let a,u;for(m=c[0];g<m;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}if(m=f[3*(l[0]+(p&inflate_mask[m]))+1],u=f[3*(l[0]+(p&inflate_mask[m]))+2],u<16)p>>>=m,g-=m,n[s++]=u;else{for(w=18==u?7:u-14,a=18==u?11:3;g<m+w;){if(0===v)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);t=Z_OK,v--,p|=(255&e.read_byte(h++))<<g,g+=8}if(p>>>=m,g-=m,a+=p&inflate_mask[w],p>>>=w,g-=w,w=s,m=o,w+a>258+(31&m)+(m>>5&31)||16==u&&w<1)return n=null,i=BADBLOCKS,e.msg="invalid bit length repeat",t=Z_DATA_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);u=16==u?n[w-1]:0;do{n[w++]=u}while(0!=--a);s=w}}if(l[0]=-1,L=[],T=[],F=[],k=[],L[0]=9,T[0]=6,m=o,m=_.inflate_trees_dynamic(257+(31&m),1+(m>>5&31),n,L,T,F,k,f,e),m!=Z_OK)return m==Z_DATA_ERROR&&(n=null,i=BADBLOCKS),t=m,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);u.init(L[0],T[0],f,F[0],f,k[0]),i=CODES;case CODES:if(r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,(t=u.proc(r,e,t))!=Z_STREAM_END)return r.inflate_flush(e,t);if(t=Z_OK,u.free(e),h=e.next_in_index,v=e.avail_in,p=r.bitb,g=r.bitk,E=r.write,b=E<r.read?r.read-E-1:r.end-E,0===d){i=TYPE;break}i=DRY;case DRY:if(r.write=E,t=r.inflate_flush(e,t),E=r.write,b=E<r.read?r.read-E-1:r.end-E,r.read!=r.write)return r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);i=DONELOCKS;case DONELOCKS:return t=Z_STREAM_END,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);case BADBLOCKS:return t=Z_DATA_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t);default:return t=Z_STREAM_ERROR,r.bitb=p,r.bitk=g,e.avail_in=v,e.total_in+=h-e.next_in_index,e.next_in_index=h,r.write=E,r.inflate_flush(e,t)}}},r.free=function(e){r.reset(e,null),r.win=null,f=null},r.set_dictionary=function(e,t,n){r.win.set(e.subarray(t,t+n),0),r.read=r.write=n},r.sync_point=function(){return i==LENS?1:0}}const PRESET_DICT=32,Z_DEFLATED=8,METHOD=0,FLAG=1,DICT4=2,DICT3=3,DICT2=4,DICT1=5,DICT0=6,BLOCKS=7,DONE=12,BAD=13,mark=[0,0,255,255];function Inflate(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=BLOCKS,e.istate.blocks.reset(e,null),Z_OK):Z_STREAM_ERROR}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,Z_OK},e.inflateInit=function(r,n){return r.msg=null,e.blocks=null,n<8||n>15?(e.inflateEnd(r),Z_STREAM_ERROR):(e.wbits=n,r.istate.blocks=new InfBlocks(r,1<<n),t(r),Z_OK)},e.inflate=function(e,t){let r,n;if(!e||!e.istate||!e.next_in)return Z_STREAM_ERROR;const i=e.istate;for(t=t==Z_FINISH?Z_BUF_ERROR:Z_OK,r=Z_BUF_ERROR;;)switch(i.mode){case METHOD:if(0===e.avail_in)return r;if(r=t,e.avail_in--,e.total_in++,(15&(i.method=e.read_byte(e.next_in_index++)))!=Z_DEFLATED){i.mode=BAD,e.msg="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.wbits){i.mode=BAD,e.msg="invalid win size",i.marker=5;break}i.mode=FLAG;case FLAG:if(0===e.avail_in)return r;if(r=t,e.avail_in--,e.total_in++,n=255&e.read_byte(e.next_in_index++),((i.method<<8)+n)%31!=0){i.mode=BAD,e.msg="incorrect header check",i.marker=5;break}if(0==(n&PRESET_DICT)){i.mode=BLOCKS;break}i.mode=DICT4;case DICT4:if(0===e.avail_in)return r;r=t,e.avail_in--,e.total_in++,i.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,i.mode=DICT3;case DICT3:if(0===e.avail_in)return r;r=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,i.mode=DICT2;case DICT2:if(0===e.avail_in)return r;r=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,i.mode=DICT1;case DICT1:return 0===e.avail_in?r:(r=t,e.avail_in--,e.total_in++,i.need+=255&e.read_byte(e.next_in_index++),i.mode=DICT0,Z_NEED_DICT);case DICT0:return i.mode=BAD,e.msg="need dictionary",i.marker=0,Z_STREAM_ERROR;case BLOCKS:if(r=i.blocks.proc(e,r),r==Z_DATA_ERROR){i.mode=BAD,i.marker=0;break}if(r==Z_OK&&(r=t),r!=Z_STREAM_END)return r;r=t,i.blocks.reset(e,i.was),i.mode=DONE;case DONE:return e.avail_in=0,Z_STREAM_END;case BAD:return Z_DATA_ERROR;default:return Z_STREAM_ERROR}},e.inflateSetDictionary=function(e,t,r){let n=0,i=r;if(!e||!e.istate||e.istate.mode!=DICT0)return Z_STREAM_ERROR;const a=e.istate;return i>=1<<a.wbits&&(i=(1<<a.wbits)-1,n=r-i),a.blocks.set_dictionary(t,n,i),a.mode=BLOCKS,Z_OK},e.inflateSync=function(e){let r,n,i,a,o;if(!e||!e.istate)return Z_STREAM_ERROR;const s=e.istate;if(s.mode!=BAD&&(s.mode=BAD,s.marker=0),0===(r=e.avail_in))return Z_BUF_ERROR;for(n=e.next_in_index,i=s.marker;0!==r&&i<4;)e.read_byte(n)==mark[i]?i++:i=0!==e.read_byte(n)?0:4-i,n++,r--;return e.total_in+=n-e.next_in_index,e.next_in_index=n,e.avail_in=r,s.marker=i,4!=i?Z_DATA_ERROR:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,s.mode=BLOCKS,Z_OK)},e.inflateSyncPoint=function(e){return e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():Z_STREAM_ERROR}}function ZStream(){}function ZipInflate(e){const t=new ZStream,r=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,n=Z_NO_FLUSH,i=new Uint8Array(r);let a=!1;t.inflateInit(),t.next_out=i,this.append=function(e,o){const s=[];let c,l,u=0,d=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,0!==t.avail_in||a||(t.next_in_index=0,a=!0),c=t.inflate(n),a&&c===Z_BUF_ERROR){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(c!==Z_OK&&c!==Z_STREAM_END)throw new Error("inflating: "+t.msg);if((a||c===Z_STREAM_END)&&t.avail_in===e.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===r?s.push(new Uint8Array(i)):s.push(i.slice(0,t.next_out_index))),f+=t.next_out_index,o&&t.next_in_index>0&&t.next_in_index!=u&&(o(t.next_in_index),u=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new Uint8Array(f),s.forEach((function(e){l.set(e,d),d+=e.length}))):l=s[0]||new Uint8Array,l}},this.flush=function(){t.inflateEnd()}}ZStream.prototype={inflateInit(e){const t=this;return t.istate=new Inflate,e||(e=MAX_BITS),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):Z_STREAM_ERROR},inflateEnd(){const e=this;if(!e.istate)return Z_STREAM_ERROR;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Z_STREAM_ERROR},inflateSetDictionary(e,t){const r=this;return r.istate?r.istate.inflateSetDictionary(r,e,t):Z_STREAM_ERROR},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const MAX_32_BITS=4294967295,MAX_16_BITS=65535,COMPRESSION_METHOD_DEFLATE=8,COMPRESSION_METHOD_STORE=0,COMPRESSION_METHOD_AES=99,LOCAL_FILE_HEADER_SIGNATURE=67324752,SPLIT_ZIP_FILE_SIGNATURE=134695760,CENTRAL_FILE_HEADER_SIGNATURE=33639248,END_OF_CENTRAL_DIR_SIGNATURE=101010256,ZIP64_END_OF_CENTRAL_DIR_SIGNATURE=101075792,ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE=117853008,END_OF_CENTRAL_DIR_LENGTH=22,ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH=20,ZIP64_END_OF_CENTRAL_DIR_LENGTH=56,EXTRAFIELD_TYPE_ZIP64=1,EXTRAFIELD_TYPE_AES=39169,EXTRAFIELD_TYPE_NTFS=10,EXTRAFIELD_TYPE_NTFS_TAG1=1,EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP=21589,EXTRAFIELD_TYPE_UNICODE_PATH=28789,EXTRAFIELD_TYPE_UNICODE_COMMENT=25461,BITFLAG_ENCRYPTED=1,BITFLAG_LEVEL=6,BITFLAG_DATA_DESCRIPTOR=8,BITFLAG_LANG_ENCODING_FLAG=2048,FILE_ATTR_MSDOS_DIR_MASK=16,DIRECTORY_SIGNATURE="/",UNDEFINED_VALUE=void 0,UNDEFINED_TYPE$1="undefined",FUNCTION_TYPE$1="function";class StreamAdapter{constructor(e){return class extends TransformStream{constructor(t,r){const n=new e(r);super({transform(e,t){t.enqueue(n.append(e))},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}}}const MINIMUM_CHUNK_SIZE=64;let maxWorkers=2;try{typeof navigator!=UNDEFINED_TYPE$1&&navigator.hardwareConcurrency&&(maxWorkers=navigator.hardwareConcurrency)}catch(e){}const DEFAULT_CONFIGURATION={chunkSize:524288,maxWorkers,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:UNDEFINED_VALUE,CompressionStreamNative:typeof CompressionStream!=UNDEFINED_TYPE$1&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=UNDEFINED_TYPE$1&&DecompressionStream},config=Object.assign({},DEFAULT_CONFIGURATION);function getConfiguration(){return config}function getChunkSize(e){return Math.max(e.chunkSize,MINIMUM_CHUNK_SIZE)}function configure(e){const{baseURL:t,chunkSize:r,maxWorkers:n,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:s,Inflate:c,CompressionStream:l,DecompressionStream:u,workerScripts:d}=e;if(setIfDefined("baseURL",t),setIfDefined("chunkSize",r),setIfDefined("maxWorkers",n),setIfDefined("terminateWorkerTimeout",i),setIfDefined("useCompressionStream",a),setIfDefined("useWebWorkers",o),s&&(config.CompressionStream=new StreamAdapter(s)),c&&(config.DecompressionStream=new StreamAdapter(c)),setIfDefined("CompressionStream",l),setIfDefined("DecompressionStream",u),d!==UNDEFINED_VALUE){const{deflate:e,inflate:t}=d;if((e||t)&&(config.workerScripts||(config.workerScripts={})),e){if(!Array.isArray(e))throw new Error("workerScripts.deflate must be an array");config.workerScripts.deflate=e}if(t){if(!Array.isArray(t))throw new Error("workerScripts.inflate must be an array");config.workerScripts.inflate=t}}}function setIfDefined(e,t){t!==UNDEFINED_VALUE&&(config[e]=t)}const table$1={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const t in table$1)if(table$1.hasOwnProperty(t))for(const r in table$1[t])if(table$1[t].hasOwnProperty(r)){const n=table$1[t][r];if("string"==typeof n)e[n]=t+"/"+r;else for(let i=0;i<n.length;i++)e[n[i]]=t+"/"+r}})();const table=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;table[e]=t}class Crc32{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let r=0,n=0|e.length;r<n;r++)t=t>>>8^table[255&(t^e[r])];this.crc=t}get(){return~this.crc}}class Crc32Stream extends TransformStream{constructor(){const e=new Crc32;super({transform(t){e.append(t)},flush(t){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.enqueue(r)}})}}function encodeText(e){if("undefined"==typeof TextEncoder){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<t.length;r++)t[r]=e.charCodeAt(r);return t}return(new TextEncoder).encode(e)}const bitArray={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const r=e[e.length-1],n=bitArray.getPartial(r);return 32===n?e.concat(t):bitArray._shiftRight(t,n,0|r,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const r=e[t-1];return 32*(t-1)+bitArray.getPartial(r)},clamp(e,t){if(32*e.length<t)return e;const r=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,r>0&&t&&(e[r-1]=bitArray.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:(e,t,r)=>32===e?t:(r?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,r,n){for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(let i=0;i<e.length;i++)n.push(r|e[i]>>>t),r=e[i]<<32-t;const i=e.length?e[e.length-1]:0,a=bitArray.getPartial(i);return n.push(bitArray.partial(t+a&31,t+a>32?r:n.pop(),1)),n}},codec={bytes:{fromBits(e){const t=bitArray.bitLength(e)/8,r=new Uint8Array(t);let n;for(let i=0;i<t;i++)0==(3&i)&&(n=e[i/4]),r[i]=n>>>24,n<<=8;return r},toBits(e){const t=[];let r,n=0;for(r=0;r<e.length;r++)n=n<<8|e[r],3==(3&r)&&(t.push(n),n=0);return 3&r&&t.push(bitArray.partial(8*(3&r),n)),t}}},hash={sha1:class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=codec.utf8String.toBits(e));const r=t._buffer=bitArray.concat(t._buffer,e),n=t._length,i=t._length=n+bitArray.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let o=0;for(let e=t.blockSize+n-(t.blockSize+n&t.blockSize-1);e<=i;e+=t.blockSize)t._block(a.subarray(16*o,16*(o+1))),o+=1;return r.splice(0,16*o),t}finalize(){const e=this;let t=e._buffer;const r=e._h;t=bitArray.concat(t,[bitArray.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),r}_f(e,t,r,n){return e<=19?t&r|~t&n:e<=39?t^r^n:e<=59?t&r|t&n|r&n:e<=79?t^r^n:void 0}_S(e,t){return t<<e|t>>>32-e}_block(e){const t=this,r=t._h,n=Array(80);for(let t=0;t<16;t++)n[t]=e[t];let i=r[0],a=r[1],o=r[2],s=r[3],c=r[4];for(let e=0;e<=79;e++){e>=16&&(n[e]=t._S(1,n[e-3]^n[e-8]^n[e-14]^n[e-16]));const r=t._S(5,i)+t._f(e,a,o,s)+c+n[e]+t._key[Math.floor(e/20)]|0;c=s,s=o,o=t._S(30,a),a=i,i=r}r[0]=r[0]+i|0,r[1]=r[1]+a|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}}},cipher={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const r=t._tables[0][4],n=t._tables[1],i=e.length;let a,o,s,c=1;if(4!==i&&6!==i&&8!==i)throw new Error("invalid aes key size");for(t._key=[o=e.slice(0),s=[]],a=i;a<4*i+28;a++){let e=o[a-1];(a%i==0||8===i&&a%i==4)&&(e=r[e>>>24]<<24^r[e>>16&255]<<16^r[e>>8&255]<<8^r[255&e],a%i==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),o[a]=o[a-i]^e}for(let e=0;a;e++,a--){const t=o[3&e?a:a-4];s[e]=a<=4||e<4?t:n[0][r[t>>>24]]^n[1][r[t>>16&255]]^n[2][r[t>>8&255]]^n[3][r[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],r=e[4],n=t[4],i=[],a=[];let o,s,c,l;for(let e=0;e<256;e++)a[(i[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!r[u];u^=s||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,r[u]=a,n[a]=u,l=i[c=i[s=i[u]]];let d=16843009*l^65537*c^257*s^16843008*u,f=257*i[a]^16843008*a;for(let r=0;r<4;r++)e[r][u]=f=f<<24^f>>>8,t[r][a]=d=d<<24^d>>>8}for(let r=0;r<5;r++)e[r]=e[r].slice(0),t[r]=t[r].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const r=this._key[t],n=r.length/4-2,i=[0,0,0,0],a=this._tables[t],o=a[0],s=a[1],c=a[2],l=a[3],u=a[4];let d,f,_,m=e[0]^r[0],p=e[t?3:1]^r[1],g=e[2]^r[2],h=e[t?1:3]^r[3],v=4;for(let e=0;e<n;e++)d=o[m>>>24]^s[p>>16&255]^c[g>>8&255]^l[255&h]^r[v],f=o[p>>>24]^s[g>>16&255]^c[h>>8&255]^l[255&m]^r[v+1],_=o[g>>>24]^s[h>>16&255]^c[m>>8&255]^l[255&p]^r[v+2],h=o[h>>>24]^s[m>>16&255]^c[p>>8&255]^l[255&g]^r[v+3],v+=4,m=d,p=f,g=_;for(let e=0;e<4;e++)i[t?3&-e:e]=u[m>>>24]<<24^u[p>>16&255]<<16^u[g>>8&255]<<8^u[255&h]^r[v++],d=m,m=p,p=g,g=h,h=d;return i}}},random={getRandomValues(e){const t=new Uint32Array(e.buffer),r=e=>{let t=987654321;const r=4294967295;return function(){t=36969*(65535&t)+(t>>16)&r;return(((t<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n,i=0;i<e.length;i+=4){const e=r(4294967296*(n||Math.random()));n=987654071*e(),t[i/4]=4294967296*e()|0}return e}},mode={ctrGladman:class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,r){let n;if(!(n=t.length))return[];const i=bitArray.bitLength(t);for(let i=0;i<n;i+=4){this.incCounter(r);const n=e.encrypt(r);t[i]^=n[0],t[i+1]^=n[1],t[i+2]^=n[2],t[i+3]^=n[3]}return bitArray.clamp(t,i)}}},misc={importKey:e=>new misc.hmacSha1(codec.bytes.toBits(e)),pbkdf2(e,t,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const i=1+(n>>5)<<2;let a,o,s,c,l;const u=new ArrayBuffer(i),d=new DataView(u);let f=0;const _=bitArray;for(t=codec.bytes.toBits(t),l=1;f<(i||1);l++){for(a=o=e.encrypt(_.concat(t,[l])),s=1;s<r;s++)for(o=e.encrypt(o),c=0;c<o.length;c++)a[c]^=o[c];for(s=0;f<(i||1)&&s<a.length;s++)d.setInt32(f,a[s]),f+=4}return u.slice(0,n/8)},hmacSha1:class{constructor(e){const t=this,r=t._hash=hash.sha1,n=[[],[]];t._baseHash=[new r,new r];const i=t._baseHash[0].blockSize/32;e.length>i&&(e=(new r).update(e).finalize());for(let t=0;t<i;t++)n[0][t]=909522486^e[t],n[1][t]=1549556828^e[t];t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new r(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),r=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),r}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},GET_RANDOM_VALUES_SUPPORTED="undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues,ERR_INVALID_PASSWORD="Invalid password",ERR_INVALID_SIGNATURE="Invalid signature";function getRandomValues(e){return GET_RANDOM_VALUES_SUPPORTED?crypto.getRandomValues(e):random.getRandomValues(e)}const BLOCK_LENGTH=16,RAW_FORMAT="raw",PBKDF2_ALGORITHM={name:"PBKDF2"},HASH_ALGORITHM={name:"HMAC"},HASH_FUNCTION="SHA-1",BASE_KEY_ALGORITHM=Object.assign({hash:HASH_ALGORITHM},PBKDF2_ALGORITHM),DERIVED_BITS_ALGORITHM=Object.assign({iterations:1e3,hash:{name:HASH_FUNCTION}},PBKDF2_ALGORITHM),DERIVED_BITS_USAGE=["deriveBits"],SALT_LENGTH=[8,12,16],KEY_LENGTH=[16,24,32],SIGNATURE_LENGTH=10,COUNTER_DEFAULT_VALUE=[0,0,0,0],UNDEFINED_TYPE="undefined",FUNCTION_TYPE="function",CRYPTO_API_SUPPORTED=typeof crypto!=UNDEFINED_TYPE,subtle=CRYPTO_API_SUPPORTED&&crypto.subtle,SUBTLE_API_SUPPORTED=CRYPTO_API_SUPPORTED&&typeof subtle!=UNDEFINED_TYPE,codecBytes=codec.bytes,Aes=cipher.aes,CtrGladman=mode.ctrGladman,HmacSha1=misc.hmacSha1;let IMPORT_KEY_SUPPORTED=CRYPTO_API_SUPPORTED&&SUBTLE_API_SUPPORTED&&typeof subtle.importKey==FUNCTION_TYPE,DERIVE_BITS_SUPPORTED=CRYPTO_API_SUPPORTED&&SUBTLE_API_SUPPORTED&&typeof subtle.deriveBits==FUNCTION_TYPE;class AESDecryptionStream extends TransformStream{constructor({password:e,signed:t,encryptionStrength:r}){super({start(){Object.assign(this,{ready:new Promise((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new Uint8Array})},async transform(e,t){const r=this,{password:n,strength:i,resolveReady:a,ready:o}=r;n?(await createDecryptionKeys(r,i,n,subarray(e,0,SALT_LENGTH[i]+2)),e=subarray(e,SALT_LENGTH[i]+2),a()):await o;const s=new Uint8Array(e.length-SIGNATURE_LENGTH-(e.length-SIGNATURE_LENGTH)%BLOCK_LENGTH);t.enqueue(append(r,e,s,0,SIGNATURE_LENGTH,!0))},async flush(e){const{signed:t,ctr:r,hmac:n,pending:i,ready:a}=this;await a;const o=subarray(i,0,i.length-SIGNATURE_LENGTH),s=subarray(i,i.length-SIGNATURE_LENGTH);let c=new Uint8Array;if(o.length){const e=toBits(codecBytes,o);n.update(e);const t=r.update(e);c=fromBits(codecBytes,t)}if(t){const e=subarray(fromBits(codecBytes,n.digest()),0,SIGNATURE_LENGTH);for(let t=0;t<SIGNATURE_LENGTH;t++)if(e[t]!=s[t])throw new Error(ERR_INVALID_SIGNATURE)}e.enqueue(c)}})}}class AESEncryptionStream extends TransformStream{constructor({password:e,encryptionStrength:t}){let r;super({start(){Object.assign(this,{ready:new Promise((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new Uint8Array})},async transform(e,t){const r=this,{password:n,strength:i,resolveReady:a,ready:o}=r;let s=new Uint8Array;n?(s=await createEncryptionKeys(r,i,n),a()):await o;const c=new Uint8Array(s.length+e.length-e.length%BLOCK_LENGTH);c.set(s,0),t.enqueue(append(r,e,c,s.length,0))},async flush(e){const{ctr:t,hmac:n,pending:i,ready:a}=this;await a;let o=new Uint8Array;if(i.length){const e=t.update(toBits(codecBytes,i));n.update(e),o=fromBits(codecBytes,e)}r.signature=fromBits(codecBytes,n.digest()).slice(0,SIGNATURE_LENGTH),e.enqueue(concat(o,r.signature))}}),r=this}}function append(e,t,r,n,i,a){const{ctr:o,hmac:s,pending:c}=e,l=t.length-i;let u;for(c.length&&(t=concat(c,t),r=expand(r,l-l%BLOCK_LENGTH)),u=0;u<=l-BLOCK_LENGTH;u+=BLOCK_LENGTH){const e=toBits(codecBytes,subarray(t,u,u+BLOCK_LENGTH));a&&s.update(e);const i=o.update(e);a||s.update(i),r.set(fromBits(codecBytes,i),u+n)}return e.pending=subarray(t,u),r}async function createDecryptionKeys(e,t,r,n){const i=await createKeys$1(e,t,r,subarray(n,0,SALT_LENGTH[t])),a=subarray(n,SALT_LENGTH[t]);if(i[0]!=a[0]||i[1]!=a[1])throw new Error(ERR_INVALID_PASSWORD)}async function createEncryptionKeys(e,t,r){const n=getRandomValues(new Uint8Array(SALT_LENGTH[t]));return concat(n,await createKeys$1(e,t,r,n))}async function createKeys$1(e,t,r,n){e.password=null;const i=encodeText(r),a=await importKey(RAW_FORMAT,i,BASE_KEY_ALGORITHM,!1,DERIVED_BITS_USAGE),o=await deriveBits(Object.assign({salt:n},DERIVED_BITS_ALGORITHM),a,8*(2*KEY_LENGTH[t]+2)),s=new Uint8Array(o),c=toBits(codecBytes,subarray(s,0,KEY_LENGTH[t])),l=toBits(codecBytes,subarray(s,KEY_LENGTH[t],2*KEY_LENGTH[t])),u=subarray(s,2*KEY_LENGTH[t]);return Object.assign(e,{keys:{key:c,authentication:l,passwordVerification:u},ctr:new CtrGladman(new Aes(c),Array.from(COUNTER_DEFAULT_VALUE)),hmac:new HmacSha1(l)}),u}async function importKey(e,t,r,n,i){if(!IMPORT_KEY_SUPPORTED)return misc.importKey(t);try{return await subtle.importKey(e,t,r,n,i)}catch(e){return IMPORT_KEY_SUPPORTED=!1,misc.importKey(t)}}async function deriveBits(e,t,r){if(!DERIVE_BITS_SUPPORTED)return misc.pbkdf2(t,e.salt,DERIVED_BITS_ALGORITHM.iterations,r);try{return await subtle.deriveBits(e,t,r)}catch(n){return DERIVE_BITS_SUPPORTED=!1,misc.pbkdf2(t,e.salt,DERIVED_BITS_ALGORITHM.iterations,r)}}function concat(e,t){let r=e;return e.length+t.length&&(r=new Uint8Array(e.length+t.length),r.set(e,0),r.set(t,e.length)),r}function expand(e,t){if(t&&t>e.length){const r=e;(e=new Uint8Array(t)).set(r,0)}return e}function subarray(e,t,r){return e.subarray(t,r)}function fromBits(e,t){return e.fromBits(t)}function toBits(e,t){return e.toBits(t)}const HEADER_LENGTH=12;class ZipCryptoDecryptionStream extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),createKeys(this,e)},transform(e,t){const r=this;if(r.password){const t=decrypt(r,e.subarray(0,HEADER_LENGTH));if(r.password=null,t[HEADER_LENGTH-1]!=r.passwordVerification)throw new Error(ERR_INVALID_PASSWORD);e=e.subarray(HEADER_LENGTH)}t.enqueue(decrypt(r,e))}})}}class ZipCryptoEncryptionStream extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),createKeys(this,e)},transform(e,t){const r=this;let n,i;if(r.password){r.password=null;const t=getRandomValues(new Uint8Array(HEADER_LENGTH));t[HEADER_LENGTH-1]=r.passwordVerification,n=new Uint8Array(e.length+t.length),n.set(encrypt(r,t),0),i=HEADER_LENGTH}else n=new Uint8Array(e.length),i=0;n.set(encrypt(r,e),i),t.enqueue(n)}})}}function decrypt(e,t){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=getByte(e)^t[n],updateKeys(e,r[n]);return r}function encrypt(e,t){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=getByte(e)^t[n],updateKeys(e,t[n]);return r}function createKeys(e,t){const r=[305419896,591751049,878082192];Object.assign(e,{keys:r,crcKey0:new Crc32(r[0]),crcKey2:new Crc32(r[2])});for(let r=0;r<t.length;r++)updateKeys(e,t.charCodeAt(r))}function updateKeys(e,t){let[r,n,i]=e.keys;e.crcKey0.append([t]),r=~e.crcKey0.get(),n=getInt32(Math.imul(getInt32(n+getInt8(r)),134775813)+1),e.crcKey2.append([n>>>24]),i=~e.crcKey2.get(),e.keys=[r,n,i]}function getByte(e){const t=2|e.keys[2];return getInt8(Math.imul(t,1^t)>>>8)}function getInt8(e){return 255&e}function getInt32(e){return 4294967295&e}const COMPRESSION_FORMAT="deflate-raw";class DeflateStream extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:r,CompressionStreamNative:n}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:s,signed:c,level:l}=e,u=this;let d,f,_=filterEmptyChunks(super.readable);a&&!s||!c||([_,d]=_.tee(),d=pipeThrough(d,new Crc32Stream)),i&&(_=pipeThroughCommpressionStream(_,o,{level:l,chunkSize:t},n,r)),a&&(s?_=pipeThrough(_,new ZipCryptoEncryptionStream(e)):(f=new AESEncryptionStream(e),_=pipeThrough(_,f))),setReadable(u,_,(async()=>{let e;a&&!s&&(e=f.signature),a&&!s||!c||(e=await d.getReader().read(),e=new DataView(e.value.buffer).getUint32(0)),u.signature=e}))}}class InflateStream extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:n}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:s,compressed:c,useCompressionStream:l}=e;let u,d,f=filterEmptyChunks(super.readable);a&&(i?f=pipeThrough(f,new ZipCryptoDecryptionStream(e)):(d=new AESDecryptionStream(e),f=pipeThrough(f,d))),c&&(f=pipeThroughCommpressionStream(f,l,{chunkSize:t},n,r)),a&&!i||!o||([f,u]=f.tee(),u=pipeThrough(u,new Crc32Stream)),setReadable(this,f,(async()=>{if((!a||i)&&o){const e=await u.getReader().read(),t=new DataView(e.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(ERR_INVALID_SIGNATURE)}}))}}function filterEmptyChunks(e){return pipeThrough(e,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function setReadable(e,t,r){t=pipeThrough(t,new TransformStream({flush:r})),Object.defineProperty(e,"readable",{get:()=>t})}function pipeThroughCommpressionStream(e,t,r,n,i){try{e=pipeThrough(e,new(t&&n?n:i)(COMPRESSION_FORMAT,r))}catch(n){if(!t)throw n;e=pipeThrough(e,new i(COMPRESSION_FORMAT,r))}return e}function pipeThrough(e,t){return e.pipeThrough(t)}const MESSAGE_EVENT_TYPE="message",MESSAGE_START="start",MESSAGE_PULL="pull",MESSAGE_DATA="data",MESSAGE_ACK_DATA="ack",MESSAGE_CLOSE="close",CODEC_DEFLATE="deflate",CODEC_INFLATE="inflate";class CodecStream extends TransformStream{constructor(e,t){super({});const r=this,{codecType:n}=e;let i;n.startsWith(CODEC_DEFLATE)?i=DeflateStream:n.startsWith(CODEC_INFLATE)&&(i=InflateStream);let a=0;const o=new i(e,t),s=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;Object.assign(r,{signature:e,size:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(o).pipeThrough(c)})}}const WEB_WORKERS_SUPPORTED=typeof Worker!=UNDEFINED_TYPE$1;class CodecWorker{constructor(e,{readable:t,writable:r},{options:n,config:i,streamOptions:a,useWebWorkers:o,transferStreams:s,scripts:c},l){const{signal:u}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new ProgressWatcherStream(t,a,i),{signal:u}),writable:r,options:Object.assign({},n),scripts:c,transferStreams:s,terminate(){const{worker:t,busy:r}=e;t&&!r&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,l(e)}}),(o&&WEB_WORKERS_SUPPORTED?createWebWorkerInterface:createWorkerInterface)(e,i)}}class ProgressWatcherStream extends TransformStream{constructor(e,{onstart:t,onprogress:r,size:n,onend:i},{chunkSize:a}){let o=0;super({start(){t&&callHandler(t,n)},async transform(e,t){o+=e.length,r&&await callHandler(r,o,n),t.enqueue(e)},flush(){e.size=o,i&&callHandler(i,o)}},{highWaterMark:1,size:()=>a})}}async function callHandler(e,...t){try{await e(...t)}catch(e){}}function createWorkerInterface(e,t){return{run:()=>runWorker$1(e,t)}}function createWebWorkerInterface(e,{baseURL:t,chunkSize:r}){return e.interface||Object.assign(e,{worker:getWebWorker(e.scripts[0],t,e),interface:{run:()=>runWebWorker(e,{chunkSize:r})}}),e.interface}async function runWorker$1({options:e,readable:t,writable:r,onTaskFinished:n},i){const a=new CodecStream(e,i);try{await t.pipeThrough(a).pipeTo(r,{preventClose:!0,preventAbort:!0});const{signature:e,size:i}=a;return{signature:e,size:i}}finally{n()}}async function runWebWorker(e,t){let r,n;const i=new Promise(((e,t)=>{r=e,n=t}));Object.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:n,result:i});const{readable:a,options:o,scripts:s}=e,{writable:c,closed:l}=watchClosedStream(e.writable);sendMessage({type:MESSAGE_START,scripts:s.slice(1),options:o,config:t,readable:a,writable:c},e)||Object.assign(e,{reader:a.getReader(),writer:c.getWriter()});const u=await i;try{await c.close()}catch(e){}return await l,u}function watchClosedStream(e){const t=e.getWriter();let r;const n=new Promise((e=>r=e));return{writable:new WritableStream({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),r()},abort:e=>t.abort(e)}),closed:n}}let classicWorkersSupported=!0,transferStreamsSupported=!0;function getWebWorker(e,t,r){const n={type:"module"};let i,a;typeof e==FUNCTION_TYPE$1&&(e=e());try{i=new URL(e,t)}catch(t){i=e}if(classicWorkersSupported)try{a=new Worker(i)}catch(e){classicWorkersSupported=!1,a=new Worker(i,n)}else a=new Worker(i,n);return a.addEventListener(MESSAGE_EVENT_TYPE,(e=>onMessage(e,r))),a}function sendMessage(e,{worker:t,writer:r,onTaskFinished:n,transferStreams:i}){try{let{value:r,readable:n,writable:a}=e;const o=[];if(r){const{buffer:t,length:n}=r;n!=t.byteLength&&(r=new Uint8Array(r)),e.value=r.buffer,o.push(e.value)}if(i&&transferStreamsSupported?(n&&o.push(n),a&&o.push(a)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch(r){transferStreamsSupported=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw r&&r.releaseLock(),n(),e}}async function onMessage({data:e},t){const{type:r,value:n,messageId:i,result:a,error:o}=e,{reader:s,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:d}=t;try{if(o){const{message:e,stack:t,code:r,name:n}=o,i=new Error(e);Object.assign(i,{stack:t,code:r,name:n}),f(i)}else{if(r==MESSAGE_PULL){const{value:e,done:r}=await s.read();sendMessage({type:MESSAGE_DATA,value:e,done:r,messageId:i},t)}r==MESSAGE_DATA&&(await c.ready,await c.write(new Uint8Array(n)),sendMessage({type:MESSAGE_ACK_DATA,messageId:i},t)),r==MESSAGE_CLOSE&&f(null,a)}}catch(o){f(o)}function f(e,t){e?u(e):l(t),c&&c.releaseLock(),d()}}let pool=[];const pendingRequests=[];let indexWorker=0;async function runWorker(e,t){const{options:r,config:n}=t,{transferStreams:i,useWebWorkers:a,useCompressionStream:o,codecType:s,compressed:c,signed:l,encrypted:u}=r,{workerScripts:d,maxWorkers:f,terminateWorkerTimeout:_}=n;t.transferStreams=i||i===UNDEFINED_VALUE;const m=!(c||l||u||t.transferStreams);let p;t.useWebWorkers=!m&&(a||a===UNDEFINED_VALUE&&n.useWebWorkers),t.scripts=t.useWebWorkers&&d?d[s]:[],r.useCompressionStream=o||o===UNDEFINED_VALUE&&n.useCompressionStream;const g=pool.find((e=>!e.busy));if(g)clearTerminateTimeout(g),p=new CodecWorker(g,e,t,h);else if(pool.length<f){const r={indexWorker};indexWorker++,pool.push(r),p=new CodecWorker(r,e,t,h)}else p=await new Promise((r=>pendingRequests.push({resolve:r,stream:e,workerOptions:t})));return p.run();function h(e){if(pendingRequests.length){const[{resolve:t,stream:r,workerOptions:n}]=pendingRequests.splice(0,1);t(new CodecWorker(e,r,n,h))}else e.worker?(clearTerminateTimeout(e),Number.isFinite(_)&&_>=0&&(e.terminateTimeout=setTimeout((()=>{pool=pool.filter((t=>t!=e)),e.terminate()}),_))):pool=pool.filter((t=>t!=e))}}function clearTerminateTimeout(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(C.h(8*(3&n),r)),t}}},x={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},_={importKey:e=>new _.k(I.p.g(e)),v(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},k:class{constructor(t){const n=this,i=n.S=class{constructor(e){const t=this;t.blockSize=512,t.C=[1732584193,4023233417,2562383102,271733878,3285377520],t.I=[1518500249,1859775393,2400959708,3395469782],e?(t._=e._.slice(0),t.A=e.A.slice(0),t.D=e.D):t.reset()}reset(){const e=this;return e._=e.C.slice(0),e.A=[],e.D=0,e}update(e){const t=this;"string"==typeof e&&(e=I.V.g(e));const n=t.A=C.concat(t.A,e),r=t.D,i=t.D=r+C.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.R(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}B(){const e=this;let t=e.A;const n=e._;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.D/4294967296)),t.push(0|e.D);t.length;)e.R(t.splice(0,16));return e.reset(),n}M(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}K(e,t){return t<<e|t>>>32-e}R(t){const n=this,s=n._,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.K(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.K(5,o)+n.M(e,c,f,a)+l+i[e]+n.I[r.floor(e/20)]|0;l=a,a=f,f=n.K(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},o=[[],[]];n.P=[new i,new i];const f=n.P[0].blockSize/32;t.length>f&&(t=(new i).update(t).B());for(let e=0;f>e;e++)o[0][e]=909522486^t[e],o[1][e]=1549556828^t[e];n.P[0].update(o[0]),n.P[1].update(o[1]),n.U=new i(n.P[0])}reset(){const e=this;e.U=new e.S(e.P[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.B(),n=new e.S(e.P[1]).update(t).B();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},A=void 0!==h&&"function"==typeof h.getRandomValues;function D(e){return A?h.getRandomValues(e):x.getRandomValues(e)}const V={name:"PBKDF2"},R=t.assign({hash:{name:"HMAC"}},V),B=t.assign({iterations:1e3,hash:{name:"SHA-1"}},V),E=["deriveBits"],M=[8,12,16],K=[16,24,32],P=[0,0,0,0],U=void 0!==h,N=U&&h.subtle,T=U&&void 0!==N,W=I.p,H=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.I=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.H(e,0)}decrypt(e){return this.H(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}H(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.I[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},L=class{constructor(e,t){this.L=e,this.j=t,this.F=t}reset(){this.F=this.j}update(e){return this.O(this.L,e,this.F)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}O(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},j=_.k;let F=U&&T&&"function"==typeof N.importKey,O=U&&T&&"function"==typeof N.deriveBits;class q extends p{constructor({password:e,signed:n,encryptionStrength:r}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:c,ready:f}=n;r?(await(async(e,t,n,r)=>{const i=await Q(e,t,n,Y(r,0,M[t])),o=Y(r,M[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s("Invalid password")})(n,o,r,Y(e,0,M[o]+2)),e=Y(e,M[o]+2),c()):await f;const a=new i(e.length-10-(e.length-10)%16);t.enqueue(J(n,e,a,0,10,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=Y(o,0,o.length-10),a=Y(o,o.length-10);let l=new i;if(f.length){const e=$(W,f);r.update(e);const t=n.update(e);l=Z(W,t)}if(t){const e=Y(Z(W,r.digest()),0,10);for(let t=0;10>t;t++)if(e[t]!=a[t])throw new s("Invalid signature")}e.enqueue(l)}})}}class G extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=D(new i(M[t]));return X(r,await Q(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%16);a.set(f,0),t.enqueue(J(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update($(W,s));n.update(e),c=Z(W,e)}r.signature=Z(W,n.digest()).slice(0,10),e.enqueue(X(c,r.signature))}}),r=this}}function J(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=X(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%16)),u=0;l-16>=u;u+=16){const e=$(W,Y(t,u,u+16));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(Z(W,s),u+r)}return e.pending=Y(t,u),n}async function Q(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(s),f=await(async(e,t,n,r,s)=>{if(!F)return _.importKey(t);try{return await N.importKey("raw",t,n,!1,s)}catch(e){return F=!1,_.importKey(t)}})(0,c,R,0,E),a=await(async(e,t,n)=>{if(!O)return _.v(t,e.salt,B.iterations,n);try{return await N.deriveBits(e,t,n)}catch(r){return O=!1,_.v(t,e.salt,B.iterations,n)}})(t.assign({salt:o},B),f,8*(2*K[r]+2)),l=new i(a),u=$(W,Y(l,0,K[r])),h=$(W,Y(l,K[r],2*K[r])),d=Y(l,2*K[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new L(new H(u),e.from(P)),Z:new j(h)}),d}function X(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Y(e,t,n){return e.subarray(t,n)}function Z(e,t){return e.m(t)}function $(e,t){return e.g(t)}class ee extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;if(n.password){const t=ne(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s("Invalid password");e=e.subarray(12)}t.enqueue(ne(n,e))}})}}class te extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=D(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(re(n,t),0),s=12}else r=new i(e.length),s=0;r.set(re(n,e),s),t.enqueue(r)}})}}function ne(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=oe(e)^t[r],ie(e,n[r]);return n}function re(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=oe(e)^t[r],ie(e,t[r]);return n}function se(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new S(r[0]),te:new S(r[2])});for(let t=0;t<n.length;t++)ie(e,n.charCodeAt(t))}function ie(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=fe(r.imul(fe(s+ce(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function oe(e){const t=2|e.keys[2];return ce(r.imul(t,1^t)>>>8)}function ce(e){return 255&e}function fe(e){return 4294967295&e}class ae extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ue(super.readable);i&&!c||!f||([d,w]=d.tee(),w=de(w,new z)),s&&(d=he(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=de(d,new te(e)):(h=new G(e),d=de(d,h))),we(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class le extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ue(super.readable);o&&(i?d=de(d,new ee(e)):(h=new q(e),d=de(d,h))),a&&(d=he(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=de(w,new z)),we(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s("Invalid signature")}}))}}function ue(e){return de(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function we(e,n,r){n=de(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function he(e,t,n,r,s){try{e=de(e,new(t&&r?r:s)("deflate-raw",n))}catch(r){if(!t)throw r;e=de(e,new s("deflate-raw",n))}return e}function de(e,t){return e.pipeThrough(t)}class pe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ae:s.startsWith("inflate")&&(i=le);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const ye=new a,me=new a;let be=0;async function ge(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>ye.set(be,e)));ke({type:"pull",messageId:be}),be=(be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));me.set(be,t),ke({type:"data",value:e,messageId:be}),be=(be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new pe(t,s);await o.pipeThrough(f).pipeTo(c,{preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;ke({type:"close",result:{signature:a,size:l}})}catch(e){ve(e)}}function ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function ve(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}function Se(t){return ze(t.map((([t,n])=>new e(t).fill(n,0,t))))}function ze(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?ze(n):n)),[])}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&ge(e),"data"==t){const e=ye.get(n);ye.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=me.get(n);me.delete(n),e()}}catch(e){ve(e)}}));const Ce=[0,1,2,3].concat(...Se([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ie(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function xe(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ie.ge=[0,1,2,3,4,5,6,7].concat(...Se([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ie.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ie.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ie.Se=e=>256>e?Ce[e]:Ce[256+(e>>>7)],Ie.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ie.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie.Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie.xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const _e=Se([[144,8],[112,9],[24,7],[8,8]]);xe._e=ze([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,_e[t]])));const Ae=Se([[30,5]]);function De(e,t,n,r,s){const i=this;i.Ae=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}xe.Ee=ze([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Ae[t]]))),xe.Me=new xe(xe._e,Ie.ze,257,286,15),xe.Ke=new xe(xe.Ee,Ie.Ce,0,30,15),xe.Pe=new xe(null,Ie.Ie,0,19,7);const Ve=[new De(0,0,0,0,0),new De(4,4,8,4,1),new De(4,5,16,8,1),new De(4,6,32,32,1),new De(4,4,16,16,2),new De(8,16,32,32,2),new De(8,16,128,128,2),new De(8,32,128,256,2),new De(32,128,258,1024,2),new De(32,258,258,4096,2)],Re=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function Be(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ee(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,I,x,_,A,D,V,R,B,E,M,K,P;const U=new Ie,N=new Ie,T=new Ie;let W,H,L,j,F,O;function q(){let t;for(t=0;286>t;t++)M[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;M[512]=1,e.ue=e.we=0,H=L=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?P[2*n]+=i:0!==n?(n!=r&&P[2*n]++,P[32]++):i>10?P[36]++:P[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;O>16-r?(n=e,F|=n<<O&65535,Q(F),F=n>>>16-O,O+=r-16):(F|=e<<O&65535,O+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,P)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,P),o--),Y(16,P),X(o-3,2)):o>10?(Y(18,P),X(o-11,7)):(Y(17,P),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==O?(Q(F),F=0,O=0):8>O||(J(255&F),F>>>=8,O-=8)}function ee(t,n){let s,i,o;if(e.Ne[H]=t,e.Te[H]=255&n,H++,0===t?M[2*n]++:(L++,t--,M[2*(Ie.ge[n]+256+1)]++,K[2*Ie.Se(t)]++),0==(8191&H)&&V>2){for(s=8*H,i=C-k,o=0;30>o;o++)s+=K[2*o]*(5+Ie.Ce[o]);if(s>>>=3,L<r.floor(H/2)&&s<r.floor(i/2))return!0}return H==W-1}function te(t,n){let r,s,i,o,c=0;if(0!==H)do{r=e.Ne[c],s=e.Te[c],c++,0===r?Y(s,t):(i=Ie.ge[s],Y(i+256+1,t),o=Ie.ze[i],0!==o&&(s-=Ie.ke[i],X(s,o)),r--,i=Ie.Se(r),Y(i,n),o=Ie.Ce[i],0!==o&&(r-=Ie.ve[i],X(r,o)))}while(H>c);Y(256,t),j=t[513]}function ne(){O>8?Q(F):O>0&&J(255&F),F=0,O=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),j=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(M,U.he),G(K,N.he),T.ne(e),t=18;t>=3&&0===P[2*Ie.xe[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(xe._e,xe.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(P[2*Ie.xe[r]+1],3);Z(M,e-1),Z(K,t-1)})(U.he+1,N.he+1,o+1),te(M,K)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-x-C,0===s&&0===C&&0===x)s=f;else if(-1==s)s--;else if(C>=f+f-262){u.set(u.subarray(f,f+f),0),I-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.He)return;e=t.Le(u,C+x,s),x+=e,3>x||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(262>x&&0!==t.He)}function oe(e){let t,n,r=A,s=C,i=_;const o=C>f-262?C-(f-262):0;let c=E;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];B>_||(r>>=2),c>x&&(c=x);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(I=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>x?x:i}e.le=[],e.be=[],e.ae=[],M=[],K=[],P=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&Be(t,r[i+1],r[i],e.le)&&i++,!Be(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.je=(t,S,I,H,L,G)=>(H||(H=8),L||(L=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>L||L>9||8!=H||9>I||I>15||0>S||S>9||0>G||G>2?-2:(t.Oe=e,a=I,f=1<<a,l=f-1,m=L+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],W=1<<L+6,e.Ue=new i(4*W),s=4*W,e.Ne=new o(W),e.Te=new i(W),V=S,R=G,(t=>(t.qe=t.Ge=0,t.Fe=null,e.pending=0,e.Je=0,n=113,c=0,U.re=M,U.ie=xe.Me,N.re=K,N.ie=xe.Ke,T.re=P,T.ie=xe.Pe,F=0,O=0,j=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=Ve[V].De,B=Ve[V].Ae,E=Ve[V].Ve,A=Ve[V].Re,C=0,k=0,x=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&113!=n&&666!=n?-2:(e.Te=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Oe=null,113==n?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?-2:(Ve[V].Be!=Ve[t].Be&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=Ve[V].De,B=Ve[V].Ae,E=Ve[V].Ve,A=Ve[V].Re),R=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return-2;if(3>i)return 0;for(i>f-262&&(i=f-262,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,A,B;if(i>4||0>i)return-2;if(!r.$e||!r.et&&0!==r.He||666==n&&4!=i)return r.Fe=Re[4],-2;if(0===r.tt)return r.Fe=Re[7],-5;var E;if(t=r,A=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=113,J((E=w)>>8&255),J(255&E)),0!==e.pending){if(t.We(),0===t.tt)return c=-1,0}else if(0===t.He&&A>=i&&4!=i)return t.Fe=Re[7],-5;if(666==n&&0!==t.He)return r.Fe=Re[7],-5;if(0!==t.He||0!==x||0!=i&&666!=n){switch(B=-1,Ve[V].Be){case 0:B=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=x){if(ie(),0===x&&0==e)return 0;if(0===x)break}if(C+=x,x=0,n=k+r,(0===C||C>=n)&&(x=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-262&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:B=(e=>{let n,r=0;for(;;){if(262>x){if(ie(),262>x&&0==e)return 0;if(0===x)break}if(3>x||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-262||2!=R&&(v=oe(r)),3>v)n=ee(0,255&u[C]),x--,C++;else if(n=ee(C-I,v-3),x-=v,v>D||3>x)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:B=(e=>{let n,r,s=0;for(;;){if(262>x){if(ie(),262>x&&0==e)return 0;if(0===x)break}if(3>x||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=I,v=2,0!==s&&D>_&&f-262>=(C-s&65535)&&(2!=R&&(v=oe(s)),5>=v&&(1==R||3==v&&C-I>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,x--,0===t.tt)return 0}else z=1,C++,x--;else{r=C+x-3,n=ee(C-1-S,_-3),x-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=B&&3!=B||(n=666),0==B||2==B)return 0===t.tt&&(c=-1),0;if(1==B){if(1==i)X(2,3),Y(256,xe._e),$(),9>1+j+10-O&&(X(2,3),Y(256,xe._e),$()),j=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Me(){const e=this;e.nt=0,e.rt=0,e.He=0,e.qe=0,e.tt=0,e.Ge=0}function Ke(e){const t=new Me,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.je(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.He=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Fe);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.He>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.He>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Me.prototype={je(e,t){const n=this;return n.Oe=new Ee,t||(t=15),n.Oe.je(n,e,t)},Ye(e){const t=this;return t.Oe?t.Oe.Ye(t,e):-2},Qe(){const e=this;if(!e.Oe)return-2;const t=e.Oe.Qe();return e.Oe=null,t},Xe(e,t){const n=this;return n.Oe?n.Oe.Xe(n,e,t):-2},Ze(e,t){const n=this;return n.Oe?n.Oe.Ze(n,e,t):-2},Le(e,t,n){const r=this;let s=r.He;return s>n&&(s=n),0===s?0:(r.He-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},We(){const e=this;let t=e.Oe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Oe.Ue.subarray(e.Oe.Je,e.Oe.Je+t),e.rt),e.rt+=t,e.Oe.Je+=t,e.Ge+=t,e.tt-=t,e.Oe.pending-=t,0===e.Oe.pending&&(e.Oe.Je=0))}};const Pe=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ue=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ne=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Te=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],We=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],He=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Le=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function je(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,I,x,_,A,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,A=1<<k;g>k;k++,A<<=1)if(0>(A-=n[k]))return-3;if(0>(A-=n[g]))return-3;for(n[g]+=A,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,x=-S,s[0]=0,I=0,D=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>x+S;){if(b++,x+=S,D=m-x,D=D>S?S:D,(y=1<<(k=v-x))>p+1&&(y-=p+1,_=v,D>k))for(;++k<D&&(y<<=1)>n[++_];)y-=n[_];if(D=1<<k,h[0]+D>1440)return-3;s[b]=I=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>x-S,r[2]=I-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=I}for(r[1]=v-x,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-x,k=g>>>x;D>k;k+=y)w.set(r,3*(I+k));for(k=1<<v-1;0!=(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<x)-1;(g&z)!=i[b];)b--,x-=S,z=(1<<x)-1}return 0!==A&&1!=m?-5:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),-3==a?f.Fe="oversubscribed dynamic bit lengths tree":-5!=a&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=-3),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,Te,We,a,i,u,e,t),0!=h||0===i[0]?(-3==h?w.Fe="oversubscribed literal/length tree":-4!=h&&(w.Fe="incomplete literal/length tree",h=-3),h):(c(288),h=o(s,n,r,0,He,Le,l,f,u,e,t),0!=h||0===f[0]&&n>257?(-3==h?w.Fe="oversubscribed distance tree":-5==h?(w.Fe="incomplete distance tree",h=-3):-4!=h&&(w.Fe="empty distance tree with lengths",h=-3),h):0)}}function Fe(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.He,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=Pe[e],g=Pe[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&Pe[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&Pe[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Fe="invalid distance code",k=c.He-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.He=p,c.qe+=d-c.nt,c.nt=d,o.write=y,-3;f+=a[z+2],f+=w&Pe[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.He-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.He=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Fe="invalid literal/length code",k=c.He-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.He=p,c.qe+=d-c.nt,c.nt=d,o.write=y,-3);if(f+=a[z+2],f+=w&Pe[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.He-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.He=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,I=0,x=0,_=0;for(_=y.nt,v=y.He,I=e.ot,x=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.He,I=e.ot,x=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>x;){if(0===v)return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,I|=(255&y.ft(_++))<<x,x+=8}if(g=3*(o+(I&Pe[b])),I>>>=n[g+1],x-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Fe="invalid literal/length code",m=-3,e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>x;){if(0===v)return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,I|=(255&y.ft(_++))<<x,x+=8}i+=I&Pe[b],I>>=b,x-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>x;){if(0===v)return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,I|=(255&y.ft(_++))<<x,x+=8}if(g=3*(o+(I&Pe[b])),I>>=n[g+1],x-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Fe="invalid distance code",m=-3,e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>x;){if(0===v)return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,I|=(255&y.ft(_++))<<x,x+=8}l+=I&Pe[b],I>>=b,x-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(x>7&&(x-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 9:return m=-3,e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);default:return m=-2,e.ot=I,e.ct=x,y.He=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m)}},e.ht=()=>{}}je.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Ue,r[0]=Ne,0);const Oe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function qe(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new Fe;let h=0,d=new f(4320);const p=new je;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&-5==t&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&-5==t&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.He,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,I,x,_,A,D;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],I=[[]],je.dt(S,z,C,I),w.init(S[0],z[0],C[0],0,I[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Fe="invalid block type",t=-3,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Fe="invalid stored block lengths",t=-3,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.Le(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Fe="too many length or distance symbols",t=-3,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[Oe[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[Oe[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return-3==(t=i)&&(r=null,s=9),n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&Pe[i]))+1],w=d[3*(u[0]+(f&Pe[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&Pe[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Fe="invalid bit length repeat",t=-3,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,x=[],_=[],A=[],D=[],x[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,x,_,A,D,d,e),0!=i)return-3==i&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(x[0],_[0],d,A[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.He,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=-3,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=-2,n.ot=f,n.ct=y,e.He=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const Ge=[0,0,255,255];function Je(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Fe=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):-2}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.It=(n,r)=>(n.Fe=null,e.kt=null,8>r||r>15?(e.Ct(n),-2):(e.zt=r,n.gt.kt=new qe(n,1<<r),t(n),0)),e.xt=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return-2;const s=e.gt;for(t=4==t?-5:0,n=-5;;)switch(s.mode){case 0:if(0===e.He)return n;if(n=t,e.He--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=13,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=13,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.He)return n;if(n=t,e.He--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=13,e.Fe="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.He)return n;n=t,e.He--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.He)return n;n=t,e.He--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.He)return n;n=t,e.He--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.He?n:(n=t,e.He--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=13,e.Fe="need dictionary",s.marker=0,-2;case 7:if(n=s.kt.ut(e,n),-3==n){s.mode=13,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.He=0,1;case 13:return-3;default:return-2}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return-2;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.At=e=>{let n,r,s,i,o;if(!e||!e.gt)return-2;const c=e.gt;if(13!=c.mode&&(c.mode=13,c.marker=0),0===(n=e.He))return-5;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==Ge[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.He=n,c.marker=s,4!=s?-3:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():-2}function Qe(){}function Xe(e){const t=new Qe,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.It(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.He=e.length;do{if(t.rt=0,t.tt=n,0!==t.He||c||(t.nt=0,c=!0),a=t.xt(0),c&&-5===a){if(0!==t.He)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Fe);if((c||1===a)&&t.He===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.He>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}Qe.prototype={It(e){const t=this;return t.gt=new Je,e||(e=15),t.gt.It(t,e)},xt(e){const t=this;return t.gt?t.gt.xt(t,e):-2},Ct(){const e=this;if(!e.gt)return-2;const t=e.gt.Ct(e);return e.gt=null,t},At(){const e=this;return e.gt?e.gt.At(e):-2},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):-2},ft(e){return this.et[e]},Le(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Ke,self.Inflate=Xe};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}const ERR_ITERATOR_COMPLETED_TOO_SOON="Writer iterator completed too soon",DEFAULT_CHUNK_SIZE=65536,PROPERTY_NAME_WRITABLE="writable";class Stream{constructor(){this.size=0}init(){this.initialized=!0}}class Reader extends Stream{get readable(){const e=this,{chunkSize:t=DEFAULT_CHUNK_SIZE}=e,r=new ReadableStream({start(){this.chunkOffset=0},async pull(n){const{offset:i=0,size:a,diskNumberStart:o}=r,{chunkOffset:s}=this;n.enqueue(await readUint8Array(e,i+s,Math.min(t,a-s),o)),s+t>a?n.close():this.chunkOffset+=t}});return r}}class Writer extends Stream{constructor(){super();const e=this,t=new WritableStream({write:t=>e.writeUint8Array(t)});Object.defineProperty(e,PROPERTY_NAME_WRITABLE,{get:()=>t})}writeUint8Array(){}}class BlobReader extends Reader{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const r=this,n=e+t,i=e||n<r.size?r.blob.slice(e,n):r.blob;return new Uint8Array(await i.arrayBuffer())}}class Uint8ArrayReader extends Reader{constructor(e){super(),Object.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}}class Uint8ArrayWriter extends Writer{init(e=0){super.init(),Object.assign(this,{offset:0,array:new Uint8Array(e)})}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const r=t.array;t.array=new Uint8Array(r.length+e.length),t.array.set(r)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class SplitDataReader extends Reader{constructor(e){super(),this.readers=e}async init(){super.init();const e=this,{readers:t}=e;e.lastDiskNumber=0,await Promise.all(t.map((async t=>{await t.init(),e.size+=t.size})))}async readUint8Array(e,t,r=0){const n=this,{readers:i}=this;let a,o=r;-1==o&&(o=i.length-1);let s=e;for(;s>=i[o].size;)s-=i[o].size,o++;const c=i[o],l=c.size;if(s+t<=l)a=await readUint8Array(c,s,t);else{const i=l-s;a=new Uint8Array(t),a.set(await readUint8Array(c,s,i)),a.set(await n.readUint8Array(e+i,t-i,r),i)}return n.lastDiskNumber=Math.max(o,n.lastDiskNumber),a}}class SplitDataWriter extends Stream{constructor(e,t=4294967295){super();const r=this;let n,i,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new WritableStream({async write(t){const{availableSize:o}=r;if(a)t.length>=o?(await s(t.slice(0,o)),await c(),r.diskOffset+=n.size,r.diskNumber++,a=null,await this.write(t.slice(o))):await s(t);else{const{value:o,done:s}=await e.next();if(s&&!o)throw new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);n=o,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await initStream(n),i=o.writable,a=i.getWriter(),await this.write(t)}},async close(){await a.ready,await c()}});async function s(e){const t=e.length;t&&(await a.ready,await a.write(e),n.size+=t,r.size+=t,r.availableSize-=t)}async function c(){i.size=n.size,await a.close()}Object.defineProperty(r,PROPERTY_NAME_WRITABLE,{get:()=>o})}}async function initStream(e,t){e.init&&!e.initialized&&await e.init(t)}function initReader(e){return Array.isArray(e)&&(e=new SplitDataReader(e)),e instanceof ReadableStream&&(e={readable:e}),e}function initWriter(e){e.writable===UNDEFINED_VALUE&&typeof e.next==FUNCTION_TYPE$1&&(e=new SplitDataWriter(e)),e instanceof WritableStream&&(e={writable:e});const{writable:t}=e;t.size===UNDEFINED_VALUE&&(t.size=0);return e instanceof SplitDataWriter||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function readUint8Array(e,t,r,n){return e.readUint8Array(t,r,n)}const CP437="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñÑªº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),VALID_CP437=256==CP437.length;function decodeCP437(e){if(VALID_CP437){let t="";for(let r=0;r<e.length;r++)t+=CP437[e[r]];return t}return(new TextDecoder).decode(e)}function decodeText(e,t){return t&&"cp437"==t.trim().toLowerCase()?decodeCP437(e):new TextDecoder(t).decode(e)}const PROPERTY_NAME_FILENAME="filename",PROPERTY_NAME_RAW_FILENAME="rawFilename",PROPERTY_NAME_COMMENT="comment",PROPERTY_NAME_RAW_COMMENT="rawComment",PROPERTY_NAME_UNCOMPPRESSED_SIZE="uncompressedSize",PROPERTY_NAME_COMPPRESSED_SIZE="compressedSize",PROPERTY_NAME_OFFSET="offset",PROPERTY_NAME_DISK_NUMBER_START="diskNumberStart",PROPERTY_NAME_LAST_MODIFICATION_DATE="lastModDate",PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE="rawLastModDate",PROPERTY_NAME_LAST_ACCESS_DATE="lastAccessDate",PROPERTY_NAME_RAW_LAST_ACCESS_DATE="rawLastAccessDate",PROPERTY_NAME_CREATION_DATE="creationDate",PROPERTY_NAME_RAW_CREATION_DATE="rawCreationDate",PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE="internalFileAttribute",PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE="externalFileAttribute",PROPERTY_NAME_MS_DOS_COMPATIBLE="msDosCompatible",PROPERTY_NAME_ZIP64="zip64",PROPERTY_NAMES=[PROPERTY_NAME_FILENAME,PROPERTY_NAME_RAW_FILENAME,PROPERTY_NAME_COMPPRESSED_SIZE,PROPERTY_NAME_UNCOMPPRESSED_SIZE,PROPERTY_NAME_LAST_MODIFICATION_DATE,PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,PROPERTY_NAME_COMMENT,PROPERTY_NAME_RAW_COMMENT,PROPERTY_NAME_LAST_ACCESS_DATE,PROPERTY_NAME_CREATION_DATE,PROPERTY_NAME_OFFSET,PROPERTY_NAME_DISK_NUMBER_START,PROPERTY_NAME_DISK_NUMBER_START,PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,PROPERTY_NAME_MS_DOS_COMPATIBLE,PROPERTY_NAME_ZIP64,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Entry{constructor(e){PROPERTY_NAMES.forEach((t=>this[t]=e[t]))}}const ERR_BAD_FORMAT="File format is not recognized",ERR_EOCDR_NOT_FOUND="End of central directory not found",ERR_EOCDR_ZIP64_NOT_FOUND="End of Zip64 central directory not found",ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND="End of Zip64 central directory locator not found",ERR_CENTRAL_DIRECTORY_NOT_FOUND="Central directory header not found",ERR_LOCAL_FILE_HEADER_NOT_FOUND="Local file header not found",ERR_EXTRAFIELD_ZIP64_NOT_FOUND="Zip64 extra field not found",ERR_ENCRYPTED="File contains encrypted entry",ERR_UNSUPPORTED_ENCRYPTION="Encryption method not supported",ERR_UNSUPPORTED_COMPRESSION="Compression method not supported",ERR_SPLIT_ZIP_FILE="Split zip file",CHARSET_UTF8="utf-8",CHARSET_CP437="cp437",ZIP64_PROPERTIES=[[PROPERTY_NAME_UNCOMPPRESSED_SIZE,MAX_32_BITS],[PROPERTY_NAME_COMPPRESSED_SIZE,MAX_32_BITS],[PROPERTY_NAME_OFFSET,MAX_32_BITS],[PROPERTY_NAME_DISK_NUMBER_START,MAX_16_BITS]],ZIP64_EXTRACTION={[MAX_16_BITS]:{getValue:getUint32,bytes:4},[MAX_32_BITS]:{getValue:getBigUint64,bytes:8}};class ZipReader{constructor(e,t={}){Object.assign(this,{reader:initReader(e),options:t,config:getConfiguration()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:n}=t;if(await initStream(r),r.size!==UNDEFINED_VALUE&&r.readUint8Array||(r=new BlobReader(await new Response(r.readable).blob()),await initStream(r)),r.size<END_OF_CENTRAL_DIR_LENGTH)throw new Error(ERR_BAD_FORMAT);r.chunkSize=getChunkSize(n);const i=await seekSignature(r,END_OF_CENTRAL_DIR_SIGNATURE,r.size,END_OF_CENTRAL_DIR_LENGTH,16*MAX_16_BITS);if(!i){throw getUint32(getDataView(await readUint8Array(r,0,4)))==SPLIT_ZIP_FILE_SIGNATURE?new Error(ERR_SPLIT_ZIP_FILE):new Error(ERR_EOCDR_NOT_FOUND)}const a=getDataView(i);let o=getUint32(a,12),s=getUint32(a,16);const c=i.offset,l=getUint16(a,20),u=c+END_OF_CENTRAL_DIR_LENGTH+l;let d=getUint16(a,4);const f=r.lastDiskNumber||0;let _=getUint16(a,6),m=getUint16(a,8),p=0,g=0;if(s==MAX_32_BITS||o==MAX_32_BITS||m==MAX_16_BITS||_==MAX_16_BITS){const e=getDataView(await readUint8Array(r,i.offset-ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH));if(getUint32(e,0)!=ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE)throw new Error(ERR_EOCDR_ZIP64_NOT_FOUND);s=getBigUint64(e,8);let t=await readUint8Array(r,s,ZIP64_END_OF_CENTRAL_DIR_LENGTH,-1),n=getDataView(t);const a=i.offset-ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH-ZIP64_END_OF_CENTRAL_DIR_LENGTH;if(getUint32(n,0)!=ZIP64_END_OF_CENTRAL_DIR_SIGNATURE&&s!=a){const e=s;s=a,p=s-e,t=await readUint8Array(r,s,ZIP64_END_OF_CENTRAL_DIR_LENGTH,-1),n=getDataView(t)}if(getUint32(n,0)!=ZIP64_END_OF_CENTRAL_DIR_SIGNATURE)throw new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);d==MAX_16_BITS&&(d=getUint32(n,16)),_==MAX_16_BITS&&(_=getUint32(n,20)),m==MAX_16_BITS&&(m=getBigUint64(n,32)),o==MAX_32_BITS&&(o=getBigUint64(n,40)),s-=o}if(f!=d)throw new Error(ERR_SPLIT_ZIP_FILE);if(s<0||s>=r.size)throw new Error(ERR_BAD_FORMAT);let h=0,v=await readUint8Array(r,s,o,_),E=getDataView(v);if(o){const e=i.offset-o;if(getUint32(E,h)!=CENTRAL_FILE_HEADER_SIGNATURE&&s!=e){const t=s;s=e,p=s-t,v=await readUint8Array(r,s,o,_),E=getDataView(v)}}if(s<0||s>=r.size)throw new Error(ERR_BAD_FORMAT);const b=getOptionValue(t,e,"filenameEncoding"),w=getOptionValue(t,e,"commentEncoding");for(let i=0;i<m;i++){const a=new ZipEntry(r,n,t.options);if(getUint32(E,h)!=CENTRAL_FILE_HEADER_SIGNATURE)throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);readCommonHeader(a,E,h+6);const o=Boolean(a.bitFlag.languageEncodingFlag),s=h+46,c=s+a.filenameLength,l=c+a.extraFieldLength,u=getUint16(E,h+4),d=0==(0&u),f=v.subarray(s,c),_=getUint16(E,h+32),x=l+_,y=v.subarray(l,x),S=o,A=o,L=d&&(getUint8(E,h+38)&FILE_ATTR_MSDOS_DIR_MASK)==FILE_ATTR_MSDOS_DIR_MASK,T=getUint32(E,h+42)+p;Object.assign(a,{versionMadeBy:u,msDosCompatible:d,compressedSize:0,uncompressedSize:0,commentLength:_,directory:L,offset:T,diskNumberStart:getUint16(E,h+34),internalFileAttribute:getUint16(E,h+36),externalFileAttribute:getUint32(E,h+38),rawFilename:f,filenameUTF8:S,commentUTF8:A,rawExtraField:v.subarray(c,l)});const[F,k]=await Promise.all([decodeText(f,S?CHARSET_UTF8:b||CHARSET_CP437),decodeText(y,A?CHARSET_UTF8:w||CHARSET_CP437)]);Object.assign(a,{rawComment:y,filename:F,comment:k,directory:L||F.endsWith(DIRECTORY_SIGNATURE)}),g=Math.max(T,g),await readCommonFooter(a,a,E,h+6);const P=new Entry(a);P.getData=(e,t)=>a.getData(e,P,t),h=x;const{onprogress:G}=e;if(G)try{await G(i+1,m,new Entry(a))}catch(e){}yield P}const x=getOptionValue(t,e,"extractPrependedData"),y=getOptionValue(t,e,"extractAppendedData");return x&&(t.prependedData=g>0?await readUint8Array(r,0,g):new Uint8Array),t.comment=l?await readUint8Array(r,c+END_OF_CENTRAL_DIR_LENGTH,l):new Uint8Array,y&&(t.appendedData=u<r.size?await readUint8Array(r,u,r.size-u):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const r of this.getEntriesGenerator(e))t.push(r);return t}async close(){}}class ZipEntry{constructor(e,t,r){Object.assign(this,{reader:e,config:t,options:r})}async getData(e,t,r={}){const n=this,{reader:i,offset:a,diskNumberStart:o,extraFieldAES:s,compressionMethod:c,config:l,bitFlag:u,signature:d,rawLastModDate:f,uncompressedSize:_,compressedSize:m}=n,p=n.localDirectory={},g=getDataView(await readUint8Array(i,a,30,o));let h=getOptionValue(n,r,"password");if(h=h&&h.length&&h,s&&s.originalCompressionMethod!=COMPRESSION_METHOD_AES)throw new Error(ERR_UNSUPPORTED_COMPRESSION);if(c!=COMPRESSION_METHOD_STORE&&c!=COMPRESSION_METHOD_DEFLATE)throw new Error(ERR_UNSUPPORTED_COMPRESSION);if(getUint32(g,0)!=LOCAL_FILE_HEADER_SIGNATURE)throw new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);readCommonHeader(p,g,4),p.rawExtraField=p.extraFieldLength?await readUint8Array(i,a+30+p.filenameLength,p.extraFieldLength,o):new Uint8Array,await readCommonFooter(n,p,g,4),Object.assign(t,{lastAccessDate:p.lastAccessDate,creationDate:p.creationDate});const v=n.encrypted&&p.encrypted,E=v&&!s;if(v){if(!E&&s.strength===UNDEFINED_VALUE)throw new Error(ERR_UNSUPPORTED_ENCRYPTION);if(!h)throw new Error(ERR_ENCRYPTED)}const b=a+30+p.filenameLength+p.extraFieldLength,w=i.readable;w.diskNumberStart=o,w.offset=b;const x=w.size=m,y=getOptionValue(n,r,"signal");e=initWriter(e),await initStream(e,_);const{writable:S}=e,{onstart:A,onprogress:L,onend:T}=r,F={options:{codecType:CODEC_INFLATE,password:h,zipCrypto:E,encryptionStrength:s&&s.strength,signed:getOptionValue(n,r,"checkSignature"),passwordVerification:E&&(u.dataDescriptor?f>>>8&255:d>>>24&255),signature:d,compressed:0!=c,encrypted:v,useWebWorkers:getOptionValue(n,r,"useWebWorkers"),useCompressionStream:getOptionValue(n,r,"useCompressionStream"),transferStreams:getOptionValue(n,r,"transferStreams")},config:l,streamOptions:{signal:y,size:x,onstart:A,onprogress:L,onend:T}};S.size+=(await runWorker({readable:w,writable:S},F)).size;return getOptionValue(n,r,"preventClose")||await S.close(),e.getData?e.getData():S}}function readCommonHeader(e,t,r){const n=e.rawBitFlag=getUint16(t,r+2),i=(n&BITFLAG_ENCRYPTED)==BITFLAG_ENCRYPTED,a=getUint32(t,r+6);Object.assign(e,{encrypted:i,version:getUint16(t,r),bitFlag:{level:(n&BITFLAG_LEVEL)>>1,dataDescriptor:(n&BITFLAG_DATA_DESCRIPTOR)==BITFLAG_DATA_DESCRIPTOR,languageEncodingFlag:(n&BITFLAG_LANG_ENCODING_FLAG)==BITFLAG_LANG_ENCODING_FLAG},rawLastModDate:a,lastModDate:getDate(a),filenameLength:getUint16(t,r+22),extraFieldLength:getUint16(t,r+24)})}async function readCommonFooter(e,t,r,n){const{rawExtraField:i}=t,a=t.extraField=new Map,o=getDataView(new Uint8Array(i));let s=0;try{for(;s<i.length;){const e=getUint16(o,s),t=getUint16(o,s+2);a.set(e,{type:e,data:i.slice(s+4,s+4+t)}),s+=4+t}}catch(e){}const c=getUint16(r,n+4);Object.assign(t,{signature:getUint32(r,n+10),uncompressedSize:getUint32(r,n+18),compressedSize:getUint32(r,n+14)});const l=a.get(EXTRAFIELD_TYPE_ZIP64);l&&(readExtraFieldZip64(l,t),t.extraFieldZip64=l);const u=a.get(EXTRAFIELD_TYPE_UNICODE_PATH);u&&(await readExtraFieldUnicode(u,PROPERTY_NAME_FILENAME,PROPERTY_NAME_RAW_FILENAME,t,e),t.extraFieldUnicodePath=u);const d=a.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);d&&(await readExtraFieldUnicode(d,PROPERTY_NAME_COMMENT,PROPERTY_NAME_RAW_COMMENT,t,e),t.extraFieldUnicodeComment=d);const f=a.get(EXTRAFIELD_TYPE_AES);f?(readExtraFieldAES(f,t,c),t.extraFieldAES=f):t.compressionMethod=c;const _=a.get(EXTRAFIELD_TYPE_NTFS);_&&(readExtraFieldNTFS(_,t),t.extraFieldNTFS=_);const m=a.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);m&&(readExtraFieldExtendedTimestamp(m,t),t.extraFieldExtendedTimestamp=m)}function readExtraFieldZip64(e,t){t.zip64=!0;const r=getDataView(e.data),n=ZIP64_PROPERTIES.filter((([e,r])=>t[e]==r));for(let i=0,a=0;i<n.length;i++){const[o,s]=n[i];if(t[o]==s){const n=ZIP64_EXTRACTION[s];t[o]=e[o]=n.getValue(r,a),a+=n.bytes}else if(e[o])throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND)}}async function readExtraFieldUnicode(e,t,r,n,i){const a=getDataView(e.data),o=new Crc32;o.append(i[r]);const s=getDataView(new Uint8Array(4));s.setUint32(0,o.get(),!0),Object.assign(e,{version:getUint8(a,0),signature:getUint32(a,1),[t]:await decodeText(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&e.signature==getUint32(s,0)}),e.valid&&(n[t]=e[t],n[t+"UTF8"]=!0)}function readExtraFieldAES(e,t,r){const n=getDataView(e.data),i=getUint8(n,4);Object.assign(e,{vendorVersion:getUint8(n,0),vendorId:getUint8(n,2),strength:i,originalCompressionMethod:r,compressionMethod:getUint16(n,5)}),t.compressionMethod=e.compressionMethod}function readExtraFieldNTFS(e,t){const r=getDataView(e.data);let n,i=4;try{for(;i<e.data.length&&!n;){const t=getUint16(r,i),a=getUint16(r,i+2);t==EXTRAFIELD_TYPE_NTFS_TAG1&&(n=e.data.slice(i+4,i+4+a)),i+=4+a}}catch(e){}try{if(n&&24==n.length){const r=getDataView(n),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),o=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:o});const s=getDateNTFS(i),c=getDateNTFS(a),l={lastModDate:s,lastAccessDate:c,creationDate:getDateNTFS(o)};Object.assign(e,l),Object.assign(t,l)}}catch(e){}}function readExtraFieldExtendedTimestamp(e,t){const r=getDataView(e.data),n=getUint8(r,0),i=[],a=[];1==(1&n)&&(i.push(PROPERTY_NAME_LAST_MODIFICATION_DATE),a.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE)),2==(2&n)&&(i.push(PROPERTY_NAME_LAST_ACCESS_DATE),a.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE)),4==(4&n)&&(i.push(PROPERTY_NAME_CREATION_DATE),a.push(PROPERTY_NAME_RAW_CREATION_DATE));let o=1;i.forEach(((n,i)=>{if(e.data.length>=o+4){const s=getUint32(r,o);t[n]=e[n]=new Date(1e3*s);const c=a[i];e[c]=s}o+=4}))}async function seekSignature(e,t,r,n,i){const a=new Uint8Array(4);setUint32(getDataView(a),0,t);const o=n+i;return await s(n)||await s(Math.min(o,r));async function s(t){const i=r-t,o=await readUint8Array(e,i,t);for(let e=o.length-n;e>=0;e--)if(o[e]==a[0]&&o[e+1]==a[1]&&o[e+2]==a[2]&&o[e+3]==a[3])return{offset:i+e,buffer:o.slice(e,e+n).buffer}}}function getOptionValue(e,t,r){return t[r]===UNDEFINED_VALUE?e.options[r]:t[r]}function getDate(e){const t=(4294901760&e)>>16,r=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&r)>>11,(2016&r)>>5,2*(31&r),0)}catch(e){}}function getDateNTFS(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function getUint8(e,t){return e.getUint8(t)}function getUint16(e,t){return e.getUint16(t,!0)}function getUint32(e,t){return e.getUint32(t,!0)}function getBigUint64(e,t){return Number(e.getBigUint64(t,!0))}function setUint32(e,t,r){e.setUint32(t,r,!0)}function getDataView(e){return new DataView(e.buffer)}let baseURL;try{baseURL=import.meta.url}catch(e){}configure({baseURL}),e(configure),configure({Deflate:ZipDeflate,Inflate:ZipInflate});class Unpacker{constructor(e){this.directories=[],this.files=[],this._fs=e}async extract(e,t){this._fs.createPath("/",t,!0,!0);try{const r=new ZipReader(new Uint8ArrayReader(e));for await(const e of r.getEntriesGenerator())e.filename.startsWith("__MACOSX/")||(e.directory?this.directories.push(e):this.files.push(e));for(const e of this.directories)this._fs.createPath(t,e.filename,!0,!0);for(const e of this.files){const r=await(e.getData?.(new Uint8ArrayWriter));if(!r)throw new Error(`Failed to extract file: ${e.filename}`);this._fs.createDataFile(t,e.filename,r,!0,!0,!0)}return!0}catch(e){throw rmtree(this._fs,t),this._fs.errorFromErrno(e)}}}const templateResult=y`<style>:host{box-sizing:border-box;margin:0;padding:0;display:inline-block;position:relative;contain:strict;--error-display:block;--drag-display:block;--drag-color:white;--progress-color:lightskyblue}.container{width:100%;height:100%;position:relative;overflow:hidden}.userInput{display:block;position:relative}canvas{position:absolute;display:none;transform:translateZ(0)}canvas.show{display:block}.screen-reader-only{border:0;left:0;top:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;pointer-events:none}.slot{position:absolute;pointer-events:none;top:0;left:0;width:100%;height:100%;font-family:Arial,Helvetica,sans-serif}.slot>*{pointer-events:initial}.progress{display:none;pointer-events:none}.progress.show{display:block}.error{display:none;pointer-events:none;top:50%;left:50%;height:auto;padding:10px 10% 10px 10%;transform:translate(-50%,-50%);color:#721c24;background-color:#f8d7da;text-align:center;font-weight:700;font-size:1.5rem}.error.show{display:var(--error-display)}.drag{display:none;pointer-events:none;color:var(--drag-color);opacity:.8;text-align:center}.drag.show{display:var(--drag-display)}#drag{position:absolute;left:calc(50% - 60px);bottom:2%;animation:move 8s infinite;transition:transform fade-out .3s}#drag>div{margin-top:-10px}#drag>svg{fill:var(--drag-color);transform:scale(.7)}@keyframes move{0%{transform:translateX(-30%)}50%{transform:translateX(30%)}100%{transform:translateX(-30%)}}#default-progress{pointer-events:none;width:4rem;height:4rem;border:.2em solid transparent;border-top-color:var(--progress-color);border-bottom-color:var(--progress-color);border-radius:50%;animation:rotate-animation .8s linear infinite;top:0;bottom:0;left:0;right:0;position:absolute;margin:auto}@keyframes rotate-animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style><div class="container"><div class="userInput" tabindex="0" role="img" aria-label="3D model"><div class="slot canvas"><slot name="canvas"><canvas id="canvas"></canvas></slot></div></div><div class="slot default"><slot></slot><div class="slot progress"><slot name="progress"><div id="default-progress" aria-hidden="true"></div></slot></div><div class="slot error"><slot name="error"><div id="error"></div></slot></div><div class="slot drag"><slot name="drag"><div id="drag"><svg xmlns="http://www.w3.org/2000/svg" width="120" height="100"><path d="M79.735 42.868c-.334 0-.887.064-1.492.193-.862-3.448-4.013-5.982-7.667-5.982a7.87 7.87 0 0 0-3.73.939c-1.287-2.367-3.692-3.846-6.433-3.846-1.299 0-2.534.321-3.64.913l-.193-5.545a14.212 14.212 0 0 0 5.441-11.153c0-7.821-6.367-14.176-14.189-14.176-7.821 0-14.176 6.368-14.176 14.176 0 5.03 2.663 9.648 6.998 12.195l.412 19.104c-.772.476-1.827 1.235-3.1 2.38-5.596 5.08-7.462 17.289-1.223 26.693 6.831 10.291 14.846 14.69 26.796 14.69 12.852 0 17.29-6.727 20.442-13.03 3.087-6.163 3.177-28.148 3.177-30.63-.026-3.68-3.486-6.921-7.423-6.921zm-.398 35.26c-2.882 5.764-5.88 10.176-15.823 10.176-10.137 0-16.647-3.59-22.487-12.375-3.19-4.799-4.682-15.013.142-19.785l.167 7.744c.026 1.415 1.145 2.534 2.637 2.534a2.544 2.544 0 0 0 1.814-.798 2.604 2.604 0 0 0 .72-1.852l-.952-44.407c0-1.917 1.094-3.216 2.74-3.216 1.66 0 2.74 1.286 2.74 3.306L52 46.521c.052 1.338 1.08 2.406 2.573 2.496 1.274 0 2.341-.9 2.56-2.149l.733-4.335a2.55 2.55 0 0 0 .039-.45c0-1.582 1.055-2.727 2.496-2.727 1.788 0 2.264 1.71 2.264 2.727v2.894a2.586 2.586 0 0 0 5.171 0 2.729 2.729 0 0 1 2.727-2.727 2.729 2.729 0 0 1 2.727 2.727v6.278a2.586 2.586 0 0 0 5.172 0v-2.92c.463-.154.978-.283 1.26-.283 1.184 0 2.226.99 2.226 1.762.013 8.902-.695 24.48-2.611 28.314z"/><path d="m86.288 18.158-3.595-3.372a.506.506 0 0 0-.36-.141c-.14 0-.261.044-.361.143a.435.435 0 0 0-.154.338v1.83h-3.853v-3.853h1.83c.13 0 .242-.05.34-.154.092-.1.141-.22.141-.36a.521.521 0 0 0-.143-.361l-3.371-3.595a.45.45 0 0 0-.68 0l-3.37 3.595a.501.501 0 0 0-.143.36c0 .14.045.26.143.361a.435.435 0 0 0 .338.154h1.83v3.853h-3.853v-1.83a.438.438 0 0 0-.154-.34.496.496 0 0 0-.36-.141.501.501 0 0 0-.361.143l-3.595 3.37a.451.451 0 0 0 0 .68l3.595 3.372a.527.527 0 0 0 .721-.001.442.442 0 0 0 .154-.338v-1.83h3.853v3.852h-1.83a.438.438 0 0 0-.34.155.496.496 0 0 0-.141.36c0 .137.045.258.143.361l3.37 3.595a.451.451 0 0 0 .68 0l3.372-3.595a.527.527 0 0 0-.001-.721.442.442 0 0 0-.338-.155h-1.83v-3.852h3.853v1.83c0 .13.049.242.154.34.1.092.22.141.36.141.138 0 .258-.05.361-.143l3.595-3.372a.45.45 0 0 0 0-.68z"/></svg><div>Hold and drag to rotate</div></div></slot></div></div></div>`,makeTemplate=e=>{Z(templateResult,e)};class Emb3DModule{constructor(e,t){this.preInit=[this.preInit_specialHTMLTargets.bind(this),this.preInit_EGL_contextAttributes.bind(this)],this.preRun=[],this.postRun=[],this.logReadFiles=!0,this.canvas=t,this.arguments=[e,`#${this.canvas.id}`]}preInit_EGL_contextAttributes(){this.EGL&&(this.EGL.contextAttributes.antialias=!0,this.EGL.contextAttributes.alpha=!0)}preInit_specialHTMLTargets(){this.specialHTMLTargets&&(this.specialHTMLTargets["#canvas"]=this.specialHTMLTargets[`#${this.canvas.id}`]=this.canvas)}print(e){console.log(e)}printErr(e){console.error(e)}locateFile(e,t){let r=import.meta.url;t.startsWith("file://")&&(t=""),r.startsWith("file://")&&(r=document.location.href);const n="1.1.0",i=n.startsWith("[VI")?(new Date).getTime():n;return new URL(`${t}${e}`,r).toString()+"?v="+i}setStatus(e){console.log(`status: ${e}`)}}var createCatwalkModule=(()=>{var _scriptDir=import.meta.url;return function(config){var createCatwalkModule=config||{},Module=void 0!==createCatwalkModule?createCatwalkModule:{},readyPromiseResolve,readyPromiseReject;Module.ready=new Promise((function(e,t){readyPromiseResolve=e,readyPromiseReject=t})),Module.expectedDataFileDownloads||(Module.expectedDataFileDownloads=0),Module.expectedDataFileDownloads++,function(){if(!Module.ENVIRONMENT_IS_PTHREAD){!function(e){"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):"undefined"==typeof process&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/");var t="catwalk.data";"function"!=typeof Module.locateFilePackage||Module.locateFile||(Module.locateFile=Module.locateFilePackage,err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r=Module.locateFile?Module.locateFile(t,""):t,n=e.remote_package_size;var i,a,o,s,c=null,l=Module.getPreloadedPackage?Module.getPreloadedPackage(r,n):null;function u(){function t(e,t){if(!e)throw t+(new Error).stack}function r(e,t,r){this.start=e,this.end=t,this.audio=r}Module.FS_createPath("/","data",!0,!0),Module.FS_createPath("/data","environments",!0,!0),Module.FS_createPath("/data/environments","uffizi",!0,!0),Module.FS_createPath("/data","images",!0,!0),r.prototype={requests:{},open:function(e,t){this.name=t,this.requests[t]=this,Module.addRunDependency("fp "+this.name)},send:function(){},onload:function(){var e=this.byteArray.subarray(this.start,this.end);this.finish(e)},finish:function(e){var t=this;Module.FS_createPreloadedFile(this.name,null,e,!0,!0,(function(){Module.removeRunDependency("fp "+t.name)}),(function(){t.audio?Module.removeRunDependency("fp "+t.name):err("Preloading file "+t.name+" failed")}),!1,!0),this.requests[this.name]=null}};for(var n=e.files,i=0;i<n.length;++i)new r(n[i].start,n[i].end,n[i].audio||0).open("GET",n[i].filename);function a(n){t(n,"Loading data file failed."),t(n.constructor.name===ArrayBuffer.name,"bad input to processPackageData");var i=new Uint8Array(n);r.prototype.byteArray=i;for(var a=e.files,o=0;o<a.length;++o)r.prototype.requests[a[o].filename].onload();Module.removeRunDependency("datafile_catwalk.data")}Module.addRunDependency("datafile_catwalk.data"),Module.preloadResults||(Module.preloadResults={}),Module.preloadResults["catwalk.data"]={fromCache:!1},l?(a(l),l=null):c=a}l||(i=r,a=n,o=function(e){c?(c(e),c=null):l=e},(s=new XMLHttpRequest).open("GET",i,!0),s.responseType="arraybuffer",s.onprogress=function(e){var t=i,r=a;if(e.total&&(r=e.total),e.loaded){s.addedTotal?Module.dataFileDownloads[t].loaded=e.loaded:(s.addedTotal=!0,Module.dataFileDownloads||(Module.dataFileDownloads={}),Module.dataFileDownloads[t]={loaded:e.loaded,total:r});var n=0,o=0,c=0;for(var l in Module.dataFileDownloads){var u=Module.dataFileDownloads[l];n+=u.total,o+=u.loaded,c++}n=Math.ceil(n*Module.expectedDataFileDownloads/c),Module.setStatus&&Module.setStatus("Downloading data... ("+o+"/"+n+")")}else Module.dataFileDownloads||Module.setStatus&&Module.setStatus("Downloading data...")},s.onerror=function(e){throw new Error("NetworkError for: "+i)},s.onload=function(e){if(!(200==s.status||304==s.status||206==s.status||0==s.status&&s.response))throw new Error(s.statusText+" : "+s.responseURL);var t=s.response;o(t)},s.send(null)),Module.calledRun?u():(Module.preRun||(Module.preRun=[]),Module.preRun.push(u))}({files:[{filename:"/data/environments/uffizi/brdfLUT.png",start:0,end:11972},{filename:"/data/environments/uffizi/diffuse_c00.jpg",start:11972,end:12923},{filename:"/data/environments/uffizi/diffuse_c01.jpg",start:12923,end:13857},{filename:"/data/environments/uffizi/diffuse_c02.jpg",start:13857,end:14253},{filename:"/data/environments/uffizi/diffuse_c03.jpg",start:14253,end:14883},{filename:"/data/environments/uffizi/diffuse_c04.jpg",start:14883,end:15900},{filename:"/data/environments/uffizi/diffuse_c05.jpg",start:15900,end:16922},{filename:"/data/environments/uffizi/specular_m00_c00.jpg",start:16922,end:44426},{filename:"/data/environments/uffizi/specular_m00_c01.jpg",start:44426,end:71590},{filename:"/data/environments/uffizi/specular_m00_c02.jpg",start:71590,end:101540},{filename:"/data/environments/uffizi/specular_m00_c03.jpg",start:101540,end:116193},{filename:"/data/environments/uffizi/specular_m00_c04.jpg",start:116193,end:133909},{filename:"/data/environments/uffizi/specular_m00_c05.jpg",start:133909,end:151138},{filename:"/data/environments/uffizi/specular_m01_c00.jpg",start:151138,end:154514},{filename:"/data/environments/uffizi/specular_m01_c01.jpg",start:154514,end:158089},{filename:"/data/environments/uffizi/specular_m01_c02.jpg",start:158089,end:162094},{filename:"/data/environments/uffizi/specular_m01_c03.jpg",start:162094,end:164129},{filename:"/data/environments/uffizi/specular_m01_c04.jpg",start:164129,end:166669},{filename:"/data/environments/uffizi/specular_m01_c05.jpg",start:166669,end:169115},{filename:"/data/environments/uffizi/specular_m02_c00.jpg",start:169115,end:170462},{filename:"/data/environments/uffizi/specular_m02_c01.jpg",start:170462,end:171881},{filename:"/data/environments/uffizi/specular_m02_c02.jpg",start:171881,end:173182},{filename:"/data/environments/uffizi/specular_m02_c03.jpg",start:173182,end:173940},{filename:"/data/environments/uffizi/specular_m02_c04.jpg",start:173940,end:174873},{filename:"/data/environments/uffizi/specular_m02_c05.jpg",start:174873,end:175759},{filename:"/data/environments/uffizi/specular_m03_c00.jpg",start:175759,end:176515},{filename:"/data/environments/uffizi/specular_m03_c01.jpg",start:176515,end:177252},{filename:"/data/environments/uffizi/specular_m03_c02.jpg",start:177252,end:177911},{filename:"/data/environments/uffizi/specular_m03_c03.jpg",start:177911,end:178346},{filename:"/data/environments/uffizi/specular_m03_c04.jpg",start:178346,end:178853},{filename:"/data/environments/uffizi/specular_m03_c05.jpg",start:178853,end:179356},{filename:"/data/environments/uffizi/specular_m04_c00.jpg",start:179356,end:179858},{filename:"/data/environments/uffizi/specular_m04_c01.jpg",start:179858,end:180368},{filename:"/data/environments/uffizi/specular_m04_c02.jpg",start:180368,end:180790},{filename:"/data/environments/uffizi/specular_m04_c03.jpg",start:180790,end:181153},{filename:"/data/environments/uffizi/specular_m04_c04.jpg",start:181153,end:181600},{filename:"/data/environments/uffizi/specular_m04_c05.jpg",start:181600,end:182055},{filename:"/data/environments/uffizi/specular_m05_c00.jpg",start:182055,end:182456},{filename:"/data/environments/uffizi/specular_m05_c01.jpg",start:182456,end:182860},{filename:"/data/environments/uffizi/specular_m05_c02.jpg",start:182860,end:183192},{filename:"/data/environments/uffizi/specular_m05_c03.jpg",start:183192,end:183537},{filename:"/data/environments/uffizi/specular_m05_c04.jpg",start:183537,end:183927},{filename:"/data/environments/uffizi/specular_m05_c05.jpg",start:183927,end:184314},{filename:"/data/environments/uffizi/specular_m06_c00.jpg",start:184314,end:184665},{filename:"/data/environments/uffizi/specular_m06_c01.jpg",start:184665,end:185017},{filename:"/data/environments/uffizi/specular_m06_c02.jpg",start:185017,end:185348},{filename:"/data/environments/uffizi/specular_m06_c03.jpg",start:185348,end:185687},{filename:"/data/environments/uffizi/specular_m06_c04.jpg",start:185687,end:186042},{filename:"/data/environments/uffizi/specular_m06_c05.jpg",start:186042,end:186400},{filename:"/data/environments/uffizi/specular_m07_c00.jpg",start:186400,end:186749},{filename:"/data/environments/uffizi/specular_m07_c01.jpg",start:186749,end:187097},{filename:"/data/environments/uffizi/specular_m07_c02.jpg",start:187097,end:187428},{filename:"/data/environments/uffizi/specular_m07_c03.jpg",start:187428,end:187771},{filename:"/data/environments/uffizi/specular_m07_c04.jpg",start:187771,end:188128},{filename:"/data/environments/uffizi/specular_m07_c05.jpg",start:188128,end:188484},{filename:"/data/environments/uffizi/specular_m08_c00.jpg",start:188484,end:188832},{filename:"/data/environments/uffizi/specular_m08_c01.jpg",start:188832,end:189181},{filename:"/data/environments/uffizi/specular_m08_c02.jpg",start:189181,end:189512},{filename:"/data/environments/uffizi/specular_m08_c03.jpg",start:189512,end:189848},{filename:"/data/environments/uffizi/specular_m08_c04.jpg",start:189848,end:190197},{filename:"/data/environments/uffizi/specular_m08_c05.jpg",start:190197,end:190548},{filename:"/data/environments/uffizi/specular_m09_c00.jpg",start:190548,end:190881},{filename:"/data/environments/uffizi/specular_m09_c01.jpg",start:190881,end:191214},{filename:"/data/environments/uffizi/specular_m09_c02.jpg",start:191214,end:191547},{filename:"/data/environments/uffizi/specular_m09_c03.jpg",start:191547,end:191880},{filename:"/data/environments/uffizi/specular_m09_c04.jpg",start:191880,end:192213},{filename:"/data/environments/uffizi/specular_m09_c05.jpg",start:192213,end:192546},{filename:"/data/images/emb3d.png",start:192546,end:196297},{filename:"/data/images/matcap_red_clay.png",start:196297,end:342024}],remote_package_size:342024})}}();var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts;"object"==typeof process&&"object"==typeof process.versions&&process.versions.node;var scriptDirectory="",read_,readAsync,readBinary,setWindowTitle;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:"undefined"!=typeof document&&document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1):"",read_=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=(e,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.onerror=r,n.send(null)},setWindowTitle=e=>document.title=e);var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console),wasmBinary;Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit),Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0,wasmMemory;"object"!=typeof WebAssembly&&abort("no native wasm support detected");var ABORT=!1,EXITSTATUS;function assert(e,t){e||abort(t)}var UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,wasmTable;function UTF8ArrayToString(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var c=63&e[t++];if((o=224==(240&o)?(15&o)<<12|s<<6|c:(7&o)<<18|s<<12|c<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}function UTF8ToString(e,t){return e?UTF8ArrayToString(HEAPU8,e,t):""}function stringToUTF8Array(e,t,r,n){if(!(n>0))return 0;for(var i=r,a=r+n-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o);if(s<=127){if(r>=a)break;t[r++]=s}else if(s<=2047){if(r+1>=a)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=a)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i}function stringToUTF8(e,t,r){return stringToUTF8Array(e,HEAPU8,t,r)}function lengthBytesUTF8(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t}function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}Module.INITIAL_MEMORY;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[];function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){Module.noFSInit||FS.init.initialized||FS.init(),FS.ignorePermissions=!1,callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){Module.onAbort&&Module.onAbort(e),err(e="Aborted("+e+")"),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject(t),t}var dataURIPrefix="data:application/octet-stream;base64,",wasmBinaryFile,tempDouble,tempI64;function isDataURI(e){return e.startsWith(dataURIPrefix)}function isFileURI(e){return e.startsWith("file://")}function getBinary(e){try{if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}catch(e){abort(e)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if("function"==typeof fetch&&!isFileURI(wasmBinaryFile))return fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()})).catch((function(){return getBinary(wasmBinaryFile)}));if(readAsync)return new Promise((function(e,t){readAsync(wasmBinaryFile,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return getBinary(wasmBinaryFile)}))}function createWasm(){var e={a:asmLibraryArg};function t(e,t){var r=e.exports;Module.asm=r,wasmMemory=Module.asm.ti,updateMemoryViews(),wasmTable=Module.asm.Ai,addOnInit(Module.asm.ui),removeRunDependency()}function r(e){t(e.instance)}function n(t){return getBinaryPromise().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){err("failed to asynchronously prepare wasm: "+e),abort(e)}))}if(addRunDependency(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){err("Module.instantiateWasm callback failed with error: "+e),readyPromiseReject(e)}return(wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||isFileURI(wasmBinaryFile)||"function"!=typeof fetch?n(r):fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(readyPromiseReject),{}}Module.locateFile?(wasmBinaryFile="catwalk.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile))):wasmBinaryFile=new URL("catwalk.wasm",import.meta.url).href;var ASM_CONSTS={289792:()=>Module.getRandomValue(),289828:()=>{if(void 0===Module.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,r=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};r(),Module.getRandomValue=r}catch(e){try{var n=require("crypto"),i=function(){var e=n.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};i(),Module.getRandomValue=i}catch(e){throw"No secure random number generator found"}}},290550:()=>"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext,290697:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia||void 0!==navigator.webkitGetUserMedia,290931:e=>{void 0===Module.SDL2&&(Module.SDL2={});var t=Module.SDL2;return e?t.capture={}:t.audio={},t.audioContext||("undefined"!=typeof AudioContext?t.audioContext=new AudioContext:"undefined"!=typeof webkitAudioContext&&(t.audioContext=new webkitAudioContext),t.audioContext&&autoResumeAudioContext(t.audioContext)),void 0===t.audioContext?-1:0},291424:()=>Module.SDL2.audioContext.sampleRate,291492:(e,t,r,n)=>{var i=Module.SDL2,a=function(a){void 0!==i.capture.silenceTimer&&(clearTimeout(i.capture.silenceTimer),i.capture.silenceTimer=void 0),i.capture.mediaStreamNode=i.audioContext.createMediaStreamSource(a),i.capture.scriptProcessorNode=i.audioContext.createScriptProcessor(t,e,1),i.capture.scriptProcessorNode.onaudioprocess=function(e){void 0!==i&&void 0!==i.capture&&(e.outputBuffer.getChannelData(0).fill(0),i.capture.currentCaptureBuffer=e.inputBuffer,dynCall("vi",r,[n]))},i.capture.mediaStreamNode.connect(i.capture.scriptProcessorNode),i.capture.scriptProcessorNode.connect(i.audioContext.destination),i.capture.stream=a},o=function(e){};i.capture.silenceBuffer=i.audioContext.createBuffer(e,t,i.audioContext.sampleRate),i.capture.silenceBuffer.getChannelData(0).fill(0);i.capture.silenceTimer=setTimeout((function(){i.capture.currentCaptureBuffer=i.capture.silenceBuffer,dynCall("vi",r,[n])}),t/i.audioContext.sampleRate*1e3),void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(a).catch(o):void 0!==navigator.webkitGetUserMedia&&navigator.webkitGetUserMedia({audio:!0,video:!1},a,o)},293144:(e,t,r,n)=>{var i=Module.SDL2;i.audio.scriptProcessorNode=i.audioContext.createScriptProcessor(t,0,e),i.audio.scriptProcessorNode.onaudioprocess=function(e){void 0!==i&&void 0!==i.audio&&(i.audio.currentOutputBuffer=e.outputBuffer,dynCall("vi",r,[n]))},i.audio.scriptProcessorNode.connect(i.audioContext.destination)},293554:(e,t)=>{for(var r=Module.SDL2,n=r.capture.currentCaptureBuffer.numberOfChannels,i=0;i<n;++i){var a=r.capture.currentCaptureBuffer.getChannelData(i);if(a.length!=t)throw"Web Audio capture buffer length mismatch! Destination size: "+a.length+" samples vs expected "+t+" samples!";if(1==n)for(var o=0;o<t;++o)setValue(e+4*o,a[o],"float");else for(o=0;o<t;++o)setValue(e+4*(o*n+i),a[o],"float")}},294159:(e,t)=>{for(var r=Module.SDL2,n=r.audio.currentOutputBuffer.numberOfChannels,i=0;i<n;++i){var a=r.audio.currentOutputBuffer.getChannelData(i);if(a.length!=t)throw"Web Audio output buffer length mismatch! Destination size: "+a.length+" samples vs expected "+t+" samples!";for(var o=0;o<t;++o)a[o]=HEAPF32[e+(o*n+i<<2)>>2]}},294639:e=>{var t=Module.SDL2;if(e){if(void 0!==t.capture.silenceTimer&&clearTimeout(t.capture.silenceTimer),void 0!==t.capture.stream){for(var r=t.capture.stream.getAudioTracks(),n=0;n<r.length;n++)t.capture.stream.removeTrack(r[n]);t.capture.stream=void 0}void 0!==t.capture.scriptProcessorNode&&(t.capture.scriptProcessorNode.onaudioprocess=function(e){},t.capture.scriptProcessorNode.disconnect(),t.capture.scriptProcessorNode=void 0),void 0!==t.capture.mediaStreamNode&&(t.capture.mediaStreamNode.disconnect(),t.capture.mediaStreamNode=void 0),void 0!==t.capture.silenceBuffer&&(t.capture.silenceBuffer=void 0),t.capture=void 0}else null!=t.audio.scriptProcessorNode&&(t.audio.scriptProcessorNode.disconnect(),t.audio.scriptProcessorNode=void 0),t.audio=void 0;void 0!==t.audioContext&&void 0===t.audio&&void 0===t.capture&&(t.audioContext.close(),t.audioContext=void 0)},295811:(e,t,r)=>{var n=e,i=t,a=r;Module.SDL2||(Module.SDL2={});var o=Module.SDL2;o.ctxCanvas!==Module.canvas&&(o.ctx=Module.createContext(Module.canvas,!1,!0),o.ctxCanvas=Module.canvas),o.w===n&&o.h===i&&o.imageCtx===o.ctx||(o.image=o.ctx.createImageData(n,i),o.w=n,o.h=i,o.imageCtx=o.ctx);var s,c=o.image.data,l=a>>2,u=0;if("undefined"!=typeof CanvasPixelArray&&c instanceof CanvasPixelArray)for(s=c.length;u<s;){var d=HEAP32[l];c[u]=255&d,c[u+1]=d>>8&255,c[u+2]=d>>16&255,c[u+3]=255,l++,u+=4}else{o.data32Data!==c&&(o.data32=new Int32Array(c.buffer),o.data8=new Uint8Array(c.buffer),o.data32Data=c);var f=o.data32;s=f.length,f.set(HEAP32.subarray(l,l+s));var _=o.data8,m=3,p=m+4*s;if(s%8==0)for(;m<p;)_[m]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,_[m=m+4|0]=255,m=m+4|0;else for(;m<p;)_[m]=255,m=m+4|0}o.ctx.putImageData(o.image,0,0)},297280:(e,t,r,n,i)=>{var a=e,o=t,s=r,c=n,l=i,u=document.createElement("canvas");u.width=a,u.height=o;var d,f=u.getContext("2d"),_=f.createImageData(a,o),m=_.data,p=l>>2,g=0;if("undefined"!=typeof CanvasPixelArray&&m instanceof CanvasPixelArray)for(d=m.length;g<d;){var h=HEAP32[p];m[g]=255&h,m[g+1]=h>>8&255,m[g+2]=h>>16&255,m[g+3]=h>>24&255,p++,g+=4}else{var v=new Int32Array(m.buffer);d=v.length,v.set(HEAP32.subarray(p,p+d))}f.putImageData(_,0,0);var E=0===s&&0===c?"url("+u.toDataURL()+"), auto":"url("+u.toDataURL()+") "+s+" "+c+", auto",b=_malloc(E.length+1);return stringToUTF8(E,b,E.length+1),b},298269:e=>{Module.canvas&&(Module.canvas.style.cursor=UTF8ToString(e))},298352:()=>{Module.canvas&&(Module.canvas.style.cursor="none")},298421:()=>window.innerWidth,298451:()=>window.innerHeight},_emscripten_get_now;function _emscripten_set_main_loop_timing(e,t){if(Browser.mainLoop.timingMode=e,Browser.mainLoop.timingValue=t,!Browser.mainLoop.func)return 1;if(Browser.mainLoop.running||(Browser.mainLoop.running=!0),0==e)Browser.mainLoop.scheduler=function(){var e=0|Math.max(0,Browser.mainLoop.tickStartTime+t-_emscripten_get_now());setTimeout(Browser.mainLoop.runner,e)},Browser.mainLoop.method="timeout";else if(1==e)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(2==e){if("undefined"==typeof setImmediate){var r=[],n="setimmediate";addEventListener("message",(e=>{e.data!==n&&e.data.target!==n||(e.stopPropagation(),r.shift()())}),!0),setImmediate=function(e){r.push(e),ENVIRONMENT_IS_WORKER?(void 0===Module.setImmediates&&(Module.setImmediates=[]),Module.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}Browser.mainLoop.scheduler=function(){setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function setMainLoop(e,t,r,n,i){assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=e,Browser.mainLoop.arg=n;var a=Browser.mainLoop.currentlyRunningMainloop;function o(){return!(a<Browser.mainLoop.currentlyRunningMainloop)}if(Browser.mainLoop.running=!1,Browser.mainLoop.runner=function(){if(!ABORT)if(Browser.mainLoop.queue.length>0){var t=Date.now(),r=Browser.mainLoop.queue.shift();if(r.func(r.arg),Browser.mainLoop.remainingBlockers){var n=Browser.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?Browser.mainLoop.remainingBlockers=i:(i+=.5,Browser.mainLoop.remainingBlockers=(8*n+i)/9)}if(out('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),Browser.mainLoop.updateStatus(),!o())return;setTimeout(Browser.mainLoop.runner,0)}else o()&&(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,1==Browser.mainLoop.timingMode&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0?Browser.mainLoop.scheduler():(0==Browser.mainLoop.timingMode&&(Browser.mainLoop.tickStartTime=_emscripten_get_now()),Browser.mainLoop.runIter(e),o()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())))},i||(t&&t>0?_emscripten_set_main_loop_timing(0,1e3/t):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"unwind"}function handleException(e){if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)}function callUserCallback(e){if(!ABORT)try{e()}catch(e){handleException(e)}}function safeSetTimeout(e,t){return setTimeout((function(){callUserCallback(e)}),t)}function warnOnce(e){warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,err(e))}_emscripten_get_now=()=>performance.now();var Browser={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var e=Browser.mainLoop.timingMode,t=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,setMainLoop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(e,t),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",t=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;t?t<r?Module.setStatus(e+" ("+(r-t)+"/"+r+")"):Module.setStatus(e):Module.setStatus("")}},runIter:function(e){if(!ABORT){if(Module.preMainLoop)if(!1===Module.preMainLoop())return;callUserCallback(e),Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),!Browser.initted){Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch(e){Browser.hasBlobConstructor=!1,err("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Browser.hasBlobConstructor?null:err("warning: no BlobBuilder"),Browser.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,Module.noImageDecoding||void 0!==Browser.URLObject||(err("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var e={canHandle:function(e){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,n){var i=null;if(Browser.hasBlobConstructor)try{(i=new Blob([e],{type:Browser.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:Browser.getMimetype(t)}))}catch(e){warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new Browser.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var o=Browser.URLObject.createObjectURL(i),s=new Image;s.onload=()=>{assert(s.complete,"Image "+t+" could not be decoded");var n=document.createElement("canvas");n.width=s.width,n.height=s.height,n.getContext("2d").drawImage(s,0,0),Browser.URLObject.revokeObjectURL(o),r&&r(e)},s.onerror=e=>{out("Image "+o+" could not be decoded"),n&&n()},s.src=o}};Module.preloadPlugins.push(e);var t={canHandle:function(e){return!Module.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var i=!1;function a(t){i||(i=!0,r&&r(e))}function o(){i||(i=!0,new Audio,n&&n())}if(!Browser.hasBlobConstructor)return o();try{var s=new Blob([e],{type:Browser.getMimetype(t)})}catch(e){return o()}var c=Browser.URLObject.createObjectURL(s),l=new Audio;l.addEventListener("canplaythrough",(()=>a()),!1),l.onerror=function(r){i||(err("warning: browser could not fully decode audio "+t+", trying slower base64 approach"),l.src="data:audio/x-"+t.substr(-3)+";base64,"+function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="",n=0,i=0,a=0;a<e.length;a++)for(n=n<<8|e[a],i+=8;i>=6;){var o=n>>i-6&63;i-=6,r+=t[o]}return 2==i?(r+=t[(3&n)<<4],r+="=="):4==i&&(r+=t[(15&n)<<2],r+="="),r}(e),a())},l.src=c,safeSetTimeout((function(){a()}),1e4)}};Module.preloadPlugins.push(t);var r=Module.canvas;r&&(r.requestPointerLock=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||(()=>{}),r.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),r.exitPointerLock=r.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",n,!1),document.addEventListener("mozpointerlockchange",n,!1),document.addEventListener("webkitpointerlockchange",n,!1),document.addEventListener("mspointerlockchange",n,!1),Module.elementPointerLock&&r.addEventListener("click",(e=>{!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}},handledByPreloadPlugin:function(e,t,r,n){Browser.init();var i=!1;return Module.preloadPlugins.forEach((function(a){i||a.canHandle(t)&&(a.handle(e,t,r,n),i=!0)})),i},createContext:function(e,t,r,n){if(t&&Module.ctx&&e==Module.canvas)return Module.ctx;var i,a;if(t){var o={antialias:!1,alpha:!1,majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1};if(n)for(var s in n)o[s]=n[s];void 0!==GL&&(a=GL.createContext(e,o))&&(i=GL.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||assert(void 0===GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=i,t&&GL.makeContextCurrent(a),Module.useWebGL=t,Browser.moduleContextCreatedCallbacks.forEach((function(e){e()})),Browser.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){Browser.lockPointer=e,Browser.resizeCanvas=t,void 0===Browser.lockPointer&&(Browser.lockPointer=!0),void 0===Browser.resizeCanvas&&(Browser.resizeCanvas=!1);var r=Module.canvas;function n(){Browser.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=Browser.exitFullscreen,Browser.lockPointer&&r.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas?Browser.setFullscreenCanvasSize():Browser.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),Browser.resizeCanvas?Browser.setWindowedCanvasSize():Browser.updateCanvasDimensions(r)),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var i=document.createElement("div");r.parentNode.insertBefore(i,r),i.appendChild(r),i.requestFullscreen=i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullscreen?()=>i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(i.webkitRequestFullScreen?()=>i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),i.requestFullscreen()},exitFullscreen:function(){return!!Browser.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)},nextRAF:0,fakeRequestAnimationFrame:function(e){var t=Date.now();if(0===Browser.nextRAF)Browser.nextRAF=t+1e3/60;else for(;t+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,Browser.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e,t){return safeSetTimeout(e,t)},safeRequestAnimationFrame:function(e){return Browser.requestAnimationFrame((function(){callUserCallback(e)}))},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(Browser.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),"undefined"!=typeof SDL?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var t=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,n=Module.canvas.height,i=void 0!==window.scrollX?window.scrollX:window.pageXOffset,a=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var o=e.touch;if(void 0===o)return;var s=o.pageX-(i+t.left),c=o.pageY-(a+t.top),l={x:s*=r/t.width,y:c*=n/t.height};if("touchstart"===e.type)Browser.lastTouches[o.identifier]=l,Browser.touches[o.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var u=Browser.touches[o.identifier];u||(u=l),Browser.lastTouches[o.identifier]=u,Browser.touches[o.identifier]=l}return}var d=e.pageX-(i+t.left),f=e.pageY-(a+t.top);d*=r/t.width,f*=n/t.height,Browser.mouseMovementX=d-Browser.mouseX,Browser.mouseMovementY=f-Browser.mouseY,Browser.mouseX=d,Browser.mouseY=f}},resizeListeners:[],updateResizeListeners:function(){var e=Module.canvas;Browser.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,t),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=HEAPU32[SDL.screen>>2];e|=8388608,HEAP32[SDL.screen>>2]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=HEAPU32[SDL.screen>>2];e&=-8388609,HEAP32[SDL.screen>>2]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},updateCanvasDimensions:function(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,i=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/i<Module.forcedAspectRatio?n=Math.round(i*Module.forcedAspectRatio):i=Math.round(n/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/i);n=Math.round(n*a),i=Math.round(i*a)}Browser.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=i&&(e.height=i),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(n!=t||i!=r?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",i+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function listenOnce(e,t,r){e.addEventListener(t,r,{once:!0})}function autoResumeAudioContext(e,t){t||(t=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach((function(r){t.forEach((function(t){t&&listenOnce(t,r,(()=>{"suspended"===e.state&&e.resume()}))}))}))}function callRuntimeCallbacks(e){for(;e.length>0;)e.shift()(Module)}function dynCallLegacy(e,t,r){var n=Module["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}var wasmTableMirror=[];function getWasmTableEntry(e){var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t}function dynCall(e,t,r){return e.includes("j")?dynCallLegacy(e,t,r):getWasmTableEntry(t).apply(null,r)}function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;case"*":HEAPU32[e>>2]=t;break;default:abort("invalid type for setValue: "+r)}}var exceptionCaught=[];function exception_addRef(e){e.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(e){var t=new ExceptionInfo(e);return t.get_caught()||(t.set_caught(!0),uncaughtExceptionCount--),t.set_rethrown(!1),exceptionCaught.push(t),exception_addRef(t),t.get_exception_ptr()}function ___cxa_current_primary_exception(){if(!exceptionCaught.length)return 0;var e=exceptionCaught[exceptionCaught.length-1];return exception_addRef(e),e.excPtr}function exception_decRef(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&getWasmTableEntry(t)(e.excPtr),___cxa_free_exception(e.excPtr)}}function ExceptionInfo(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){HEAPU32[this.ptr+4>>2]=e},this.get_type=function(){return HEAPU32[this.ptr+4>>2]},this.set_destructor=function(e){HEAPU32[this.ptr+8>>2]=e},this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]},this.set_refcount=function(e){HEAP32[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,HEAP8[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=HEAP8[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,HEAP8[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=HEAP8[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=e+1},this.release_ref=function(){var e=HEAP32[this.ptr>>2];return HEAP32[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){HEAPU32[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]},this.get_exception_ptr=function(){if(___cxa_is_pointer_type(this.get_type()))return HEAPU32[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function ___cxa_decrement_exception_refcount(e){e&&exception_decRef(new ExceptionInfo(e))}var exceptionLast=0;function ___cxa_end_catch(){_setThrew(0),exception_decRef(exceptionCaught.pop()),exceptionLast=0}function ___resumeException(e){throw exceptionLast||(exceptionLast=e),e}function ___cxa_find_matching_catch_2(){var e=exceptionLast;if(!e)return setTempRet0(0),0;var t=new ExceptionInfo(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return setTempRet0(0),e;for(var n=0;n<arguments.length;n++){var i=arguments[n];if(0===i||i===r)break;var a=t.ptr+16;if(___cxa_can_catch(i,r,a))return setTempRet0(i),e}return setTempRet0(r),e}function ___cxa_find_matching_catch_3(){var e=exceptionLast;if(!e)return setTempRet0(0),0;var t=new ExceptionInfo(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return setTempRet0(0),e;for(var n=0;n<arguments.length;n++){var i=arguments[n];if(0===i||i===r)break;var a=t.ptr+16;if(___cxa_can_catch(i,r,a))return setTempRet0(i),e}return setTempRet0(r),e}function ___cxa_find_matching_catch_4(){var e=exceptionLast;if(!e)return setTempRet0(0),0;var t=new ExceptionInfo(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return setTempRet0(0),e;for(var n=0;n<arguments.length;n++){var i=arguments[n];if(0===i||i===r)break;var a=t.ptr+16;if(___cxa_can_catch(i,r,a))return setTempRet0(i),e}return setTempRet0(r),e}function ___cxa_find_matching_catch_5(){var e=exceptionLast;if(!e)return setTempRet0(0),0;var t=new ExceptionInfo(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return setTempRet0(0),e;for(var n=0;n<arguments.length;n++){var i=arguments[n];if(0===i||i===r)break;var a=t.ptr+16;if(___cxa_can_catch(i,r,a))return setTempRet0(i),e}return setTempRet0(r),e}function ___cxa_increment_exception_refcount(e){e&&exception_addRef(new ExceptionInfo(e))}function ___cxa_rethrow(){var e=exceptionCaught.pop();e||abort("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(exceptionCaught.push(e),e.set_rethrown(!0),e.set_caught(!1),uncaughtExceptionCount++),exceptionLast=t,t}function ___cxa_throw(e,t,r){throw new ExceptionInfo(e).init(t,r),exceptionLast=e,uncaughtExceptionCount++,e}function ___cxa_uncaught_exceptions(){return uncaughtExceptionCount}var PATH={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;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},normalize:e=>{var t=PATH.isAbs(e),r="/"===e.substr(-1);return e=PATH.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=PATH.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=PATH.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return PATH.normalize(e.join("/"))},join2:(e,t)=>PATH.normalize(e+"/"+t)};function getRandomDevice(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>abort("randomDevice")}var PATH_FS={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:FS.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=PATH.isAbs(n)}return e=PATH.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=PATH_FS.resolve(e).substr(1),t=PATH_FS.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),a=Math.min(n.length,i.length),o=a,s=0;s<a;s++)if(n[s]!==i[s]){o=s;break}var c=[];for(s=o;s<n.length;s++)c.push("..");return(c=c.concat(i.slice(o))).join("/")}};function intArrayFromString(e,t,r){var n=r>0?r:lengthBytesUTF8(e)+1,i=new Array(n),a=stringToUTF8Array(e,i,0,i.length);return t&&(i.length=a),i}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var a=0,o=0;o<n;o++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new FS.ErrnoError(29)}if(void 0===s&&0===a)throw new FS.ErrnoError(6);if(null==s)break;a++,t[r+o]=s}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,t[r+a])}catch(e){throw new FS.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=intArrayFromString(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(out(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(err(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}};function mmapAlloc(e){abort()}var MEMFS={ops_table:null,mount:function(e){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(FS.isBlkdev(r)||FS.isFIFO(r))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var i=FS.createNode(e,t,r,n);return FS.isDir(i.mode)?(i.node_ops=MEMFS.ops_table.dir.node,i.stream_ops=MEMFS.ops_table.dir.stream,i.contents={}):FS.isFile(i.mode)?(i.node_ops=MEMFS.ops_table.file.node,i.stream_ops=MEMFS.ops_table.file.stream,i.usedBytes=0,i.contents=null):FS.isLink(i.mode)?(i.node_ops=MEMFS.ops_table.link.node,i.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(i.mode)&&(i.node_ops=MEMFS.ops_table.chrdev.node,i.stream_ops=MEMFS.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=FS.isChrdev(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,FS.isDir(e.mode)?t.size=4096:FS.isFile(e.mode)?t.size=e.usedBytes:FS.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&MEMFS.resizeFileStorage(e,t.size)},lookup:function(e,t){throw FS.genericErrors[44]},mknod:function(e,t,r,n){return MEMFS.createNode(e,t,r,n)},rename:function(e,t,r){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new FS.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=FS.lookupNode(e,t);for(var n in r.contents)throw new FS.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=MEMFS.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,i){var a=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&a.subarray)t.set(a.subarray(i,i+o),r);else for(var s=0;s<o;s++)t[r+s]=a[i+s];return o},write:function(e,t,r,n,i,a){if(t.buffer===HEAP8.buffer&&(a=!1),!n)return 0;var o=e.node;if(o.timestamp=Date.now(),t.subarray&&(!o.contents||o.contents.subarray)){if(a)return o.contents=t.subarray(r,r+n),o.usedBytes=n,n;if(0===o.usedBytes&&0===i)return o.contents=t.slice(r,r+n),o.usedBytes=n,n;if(i+n<=o.usedBytes)return o.contents.set(t.subarray(r,r+n),i),n}if(MEMFS.expandFileStorage(o,i+n),o.contents.subarray&&t.subarray)o.contents.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)o.contents[i+s]=t[r+s];return o.usedBytes=Math.max(o.usedBytes,i+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&FS.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new FS.ErrnoError(28);return n},allocate:function(e,t,r){MEMFS.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,i){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(43);var a,o,s=e.node.contents;if(2&i||s.buffer!==HEAP8.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),o=!0,!(a=mmapAlloc()))throw new FS.ErrnoError(48);HEAP8.set(s,a)}else o=!1,a=s.byteOffset;return{ptr:a,allocated:o}},msync:function(e,t,r,n,i){return MEMFS.stream_ops.write(e,t,0,n,r,!1),0}}};function asyncLoad(e,t,r,n){var i=n?"":getUniqueRunDependency("al "+e);readAsync(e,(r=>{assert(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),i&&removeRunDependency()}),(t=>{if(!r)throw'Loading data file "'+e+'" failed.';r()})),i&&addRunDependency()}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=PATH_FS.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new FS.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=FS.root,i="/",a=0;a<r.length;a++){var o=a===r.length-1;if(o&&t.parent)break;if(n=FS.lookupNode(n,r[a]),i=PATH.join2(i,r[a]),FS.isMountpoint(n)&&(!o||o&&t.follow_mount)&&(n=n.mounted.root),!o||t.follow)for(var s=0;FS.isLink(n.mode);){var c=FS.readlink(i);if(i=PATH_FS.resolve(PATH.dirname(i),c),n=FS.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new FS.ErrnoError(32)}}return{path:i,node:n}},getPath:e=>{for(var t;;){if(FS.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%FS.nameTable.length},hashAddNode:e=>{var t=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[t],FS.nameTable[t]=e},hashRemoveNode:e=>{var t=FS.hashName(e.parent.id,e.name);if(FS.nameTable[t]===e)FS.nameTable[t]=e.name_next;else for(var r=FS.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=FS.mayLookup(e);if(r)throw new FS.ErrnoError(r,e);for(var n=FS.hashName(e.id,t),i=FS.nameTable[n];i;i=i.name_next){var a=i.name;if(i.parent.id===e.id&&a===t)return i}return FS.lookup(e,t)},createNode:(e,t,r,n)=>{var i=new FS.FSNode(e,t,r,n);return FS.hashAddNode(i),i},destroyNode:e=>{FS.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=FS.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>FS.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=FS.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{FS.lookupNode(e,t);return 20}catch(e){}return FS.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=FS.lookupNode(e,t)}catch(e){return e.errno}var i=FS.nodePermissions(e,"wx");if(i)return i;if(r){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&("r"!==FS.flagsToPermissionString(t)||512&t)?31:FS.nodePermissions(e,FS.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=FS.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!FS.streams[r])return r;throw new FS.ErrnoError(33)},getStream:e=>FS.streams[e],createStream:(e,t,r)=>{FS.FSStream||(FS.FSStream=function(){this.shared={}},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new FS.FSStream,e);var n=FS.nextfd(t,r);return e.fd=n,FS.streams[n]=e,e},closeStream:e=>{FS.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=FS.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new FS.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{FS.devices[e]={stream_ops:t}},getDevice:e=>FS.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=FS.getMounts(FS.root.mount),n=0;function i(e){return FS.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount:(e,t,r)=>{var n,i="/"===r,a=!r;if(i&&FS.root)throw new FS.ErrnoError(10);if(!i&&!a){var o=FS.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,FS.isMountpoint(n))throw new FS.ErrnoError(10);if(!FS.isDir(n.mode))throw new FS.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,i?FS.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(t.node))throw new FS.ErrnoError(28);var r=t.node,n=r.mounted,i=FS.getMounts(n);Object.keys(FS.nameTable).forEach((e=>{for(var t=FS.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&FS.destroyNode(t),t=r}})),r.mounted=null;var a=r.mount.mounts.indexOf(n);r.mount.mounts.splice(a,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=FS.lookupPath(e,{parent:!0}).node,i=PATH.basename(e);if(!i||"."===i||".."===i)throw new FS.ErrnoError(28);var a=FS.mayCreate(n,i);if(a)throw new FS.ErrnoError(a);if(!n.node_ops.mknod)throw new FS.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,FS.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,FS.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{FS.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,FS.mknod(e,t,r)),symlink:(e,t)=>{if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var r=FS.lookupPath(t,{parent:!0}).node;if(!r)throw new FS.ErrnoError(44);var n=PATH.basename(t),i=FS.mayCreate(r,n);if(i)throw new FS.ErrnoError(i);if(!r.node_ops.symlink)throw new FS.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,i=PATH.dirname(e),a=PATH.dirname(t),o=PATH.basename(e),s=PATH.basename(t);if(r=FS.lookupPath(e,{parent:!0}).node,n=FS.lookupPath(t,{parent:!0}).node,!r||!n)throw new FS.ErrnoError(44);if(r.mount!==n.mount)throw new FS.ErrnoError(75);var c,l=FS.lookupNode(r,o),u=PATH_FS.relative(e,a);if("."!==u.charAt(0))throw new FS.ErrnoError(28);if("."!==(u=PATH_FS.relative(t,i)).charAt(0))throw new FS.ErrnoError(55);try{c=FS.lookupNode(n,s)}catch(e){}if(l!==c){var d=FS.isDir(l.mode),f=FS.mayDelete(r,o,d);if(f)throw new FS.ErrnoError(f);if(f=c?FS.mayDelete(n,s,d):FS.mayCreate(n,s))throw new FS.ErrnoError(f);if(!r.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(l)||c&&FS.isMountpoint(c))throw new FS.ErrnoError(10);if(n!==r&&(f=FS.nodePermissions(r,"w")))throw new FS.ErrnoError(f);FS.hashRemoveNode(l);try{r.node_ops.rename(l,n,s)}catch(e){throw e}finally{FS.hashAddNode(l)}}},rmdir:e=>{var t=FS.lookupPath(e,{parent:!0}).node,r=PATH.basename(e),n=FS.lookupNode(t,r),i=FS.mayDelete(t,r,!0);if(i)throw new FS.ErrnoError(i);if(!t.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(n))throw new FS.ErrnoError(10);t.node_ops.rmdir(t,r),FS.destroyNode(n)},readdir:e=>{var t=FS.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new FS.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=FS.lookupPath(e,{parent:!0}).node;if(!t)throw new FS.ErrnoError(44);var r=PATH.basename(e),n=FS.lookupNode(t,r),i=FS.mayDelete(t,r,!1);if(i)throw new FS.ErrnoError(i);if(!t.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(n))throw new FS.ErrnoError(10);t.node_ops.unlink(t,r),FS.destroyNode(n)},readlink:e=>{var t=FS.lookupPath(e).node;if(!t)throw new FS.ErrnoError(44);if(!t.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=FS.lookupPath(e,{follow:!t}).node;if(!r)throw new FS.ErrnoError(44);if(!r.node_ops.getattr)throw new FS.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>FS.stat(e,!0),chmod:(e,t,r)=>{var n;"string"==typeof e?n=FS.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{FS.chmod(e,t,!0)},fchmod:(e,t)=>{var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);FS.chmod(r.node,t)},chown:(e,t,r,n)=>{var i;"string"==typeof e?i=FS.lookupPath(e,{follow:!n}).node:i=e;if(!i.node_ops.setattr)throw new FS.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown:(e,t,r)=>{FS.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(8);FS.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new FS.ErrnoError(28);var r;"string"==typeof e?r=FS.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(r.mode))throw new FS.ErrnoError(31);if(!FS.isFile(r.mode))throw new FS.ErrnoError(28);var n=FS.nodePermissions(r,"w");if(n)throw new FS.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);if(0==(2097155&r.flags))throw new FS.ErrnoError(28);FS.truncate(r.node,t)},utime:(e,t,r)=>{var n=FS.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r)=>{if(""===e)throw new FS.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?FS.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=PATH.normalize(e);try{n=FS.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new FS.ErrnoError(20)}else n=FS.mknod(e,r,0),i=!0;if(!n)throw new FS.ErrnoError(44);if(FS.isChrdev(n.mode)&&(t&=-513),65536&t&&!FS.isDir(n.mode))throw new FS.ErrnoError(54);if(!i){var a=FS.mayOpen(n,t);if(a)throw new FS.ErrnoError(a)}512&t&&!i&&FS.truncate(n,0),t&=-131713;var o=FS.createStream({node:n,path:FS.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return o.stream_ops.open&&o.stream_ops.open(o),!Module.logReadFiles||1&t||(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1)),o},close:e=>{if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{FS.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,i)=>{if(n<0||i<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(1==(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var a=void 0!==i;if(a){if(!e.seekable)throw new FS.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return a||(e.position+=o),o},write:(e,t,r,n,i,a)=>{if(n<0||i<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(0==(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&1024&e.flags&&FS.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new FS.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,a);return o||(e.position+=s),s},allocate:(e,t,r)=>{if(FS.isClosed(e))throw new FS.ErrnoError(8);if(t<0||r<=0)throw new FS.ErrnoError(28);if(0==(2097155&e.flags))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,i)=>{if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new FS.ErrnoError(2);if(1==(2097155&e.flags))throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=FS.open(e,t.flags),i=FS.stat(e).size,a=new Uint8Array(i);return FS.read(n,a,0,i,0),"utf8"===t.encoding?r=UTF8ArrayToString(a,0):"binary"===t.encoding&&(r=a),FS.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=FS.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(lengthBytesUTF8(t)+1),a=stringToUTF8Array(t,i,0,i.length);FS.write(n,i,0,a,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");FS.write(n,t,0,t.byteLength,void 0,r.canOwn)}FS.close(n)},cwd:()=>FS.currentPath,chdir:e=>{var t=FS.lookupPath(e,{follow:!0});if(null===t.node)throw new FS.ErrnoError(44);if(!FS.isDir(t.node.mode))throw new FS.ErrnoError(54);var r=FS.nodePermissions(t.node,"x");if(r)throw new FS.ErrnoError(r);FS.currentPath=t.path},createDefaultDirectories:()=>{FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e=getRandomDevice();FS.createDevice("/dev","random",e),FS.createDevice("/dev","urandom",e),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var e=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd"),FS.mount({mount:()=>{var t=FS.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=FS.getStream(r);if(!n)throw new FS.ErrnoError(8);var i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr"),FS.open("/dev/stdin",0),FS.open("/dev/stdout",1),FS.open("/dev/stderr",1)},ensureErrnoError:()=>{FS.ErrnoError||(FS.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[44].forEach((e=>{FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS}},init:(e,t,r)=>{FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=t||Module.stdout,Module.stderr=r||Module.stderr,FS.createStandardStreams()},quit:()=>{FS.init.initialized=!1;for(var e=0;e<FS.streams.length;e++){var t=FS.streams[e];t&&FS.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=FS.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=FS.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=FS.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=PATH.basename(e),n=FS.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:FS.getPath(e);for(var i=t.split("/").reverse();i.length;){var a=i.pop();if(a){var o=PATH.join2(e,a);try{FS.mkdir(o)}catch(e){}e=o}}return o},createFile:(e,t,r,n,i)=>{var a=PATH.join2("string"==typeof e?e:FS.getPath(e),t),o=FS.getMode(n,i);return FS.create(a,o)},createDataFile:(e,t,r,n,i,a)=>{var o=t;e&&(e="string"==typeof e?e:FS.getPath(e),o=t?PATH.join2(e,t):e);var s=FS.getMode(n,i),c=FS.create(o,s);if(r){if("string"==typeof r){for(var l=new Array(r.length),u=0,d=r.length;u<d;++u)l[u]=r.charCodeAt(u);r=l}FS.chmod(c,146|s);var f=FS.open(c,577);FS.write(f,r,0,r.length,0,a),FS.close(f),FS.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var i=PATH.join2("string"==typeof e?e:FS.getPath(e),t),a=FS.getMode(!!r,!!n);FS.createDevice.major||(FS.createDevice.major=64);var o=FS.makedev(FS.createDevice.major++,0);return FS.registerDevice(o,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,i,a)=>{for(var o=0,s=0;s<i;s++){var c;try{c=r()}catch(e){throw new FS.ErrnoError(29)}if(void 0===c&&0===o)throw new FS.ErrnoError(6);if(null==c)break;o++,t[n+s]=c}return o&&(e.node.timestamp=Date.now()),o},write:(e,t,r,i,a)=>{for(var o=0;o<i;o++)try{n(t[r+o])}catch(e){throw new FS.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}}),FS.mkdev(i,a,o)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("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.");if(!read_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(read_(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new FS.ErrnoError(29)}},createLazyFile:(e,t,r,n,i)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var s=this;s.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):intArrayFromString(i.responseText||"",!0)})(t,i)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(o=n=1,n=this.getter(0).length,o=n,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new a;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:o}}else s={isDevice:!1,url:r};var c=FS.createFile(e,t,s,n,i);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function u(e,t,r,n,i){var a=e.node.contents;if(i>=a.length)return 0;var o=Math.min(a.length-i,n);if(a.slice)for(var s=0;s<o;s++)t[r+s]=a[i+s];else for(s=0;s<o;s++)t[r+s]=a.get(i+s);return o}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];l[e]=function(){return FS.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(e,t,r,n,i)=>(FS.forceLoadFile(c),u(e,t,r,n,i)),l.mmap=(e,t,r,n,i)=>{FS.forceLoadFile(c);var a=mmapAlloc();if(!a)throw new FS.ErrnoError(48);return u(e,HEAP8,a,t,r),{ptr:a,allocated:!0}},c.stream_ops=l,c},createPreloadedFile:(e,t,r,n,i,a,o,s,c,l)=>{var u=t?PATH_FS.resolve(PATH.join2(e,t)):e;function d(r){function d(r){l&&l(),s||FS.createDataFile(e,t,r,n,i,c),a&&a(),removeRunDependency()}Browser.handledByPreloadPlugin(r,u,d,(()=>{o&&o(),removeRunDependency()}))||d(r)}addRunDependency(),"string"==typeof r?asyncLoad(r,(e=>d(e)),o):d(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=FS.indexedDB();try{var i=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return r(e)}i.onupgradeneeded=()=>{out("creating db"),i.result.createObjectStore(FS.DB_STORE_NAME)},i.onsuccess=()=>{var n=i.result.transaction([FS.DB_STORE_NAME],"readwrite"),a=n.objectStore(FS.DB_STORE_NAME),o=0,s=0,c=e.length;function l(){0==s?t():r()}e.forEach((e=>{var t=a.put(FS.analyzePath(e).object.contents,e);t.onsuccess=()=>{++o+s==c&&l()},t.onerror=()=>{s++,o+s==c&&l()}})),n.onerror=r},i.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=FS.indexedDB();try{var i=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return r(e)}i.onupgradeneeded=r,i.onsuccess=()=>{var n=i.result;try{var a=n.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var o=a.objectStore(FS.DB_STORE_NAME),s=0,c=0,l=e.length;function u(){0==c?t():r()}e.forEach((e=>{var t=o.get(e);t.onsuccess=()=>{FS.analyzePath(e).exists&&FS.unlink(e),FS.createDataFile(PATH.dirname(e),PATH.basename(e),t.result,!0,!0,!0),++s+c==l&&u()},t.onerror=()=>{c++,s+c==l&&u()}})),a.onerror=r},i.onerror=r}},SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var n;-100===e?n=FS.cwd():n=SYSCALLS.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new FS.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(FS.getPath(e.node)))return-54;throw e}HEAP32[r>>2]=n.dev,HEAP32[r+8>>2]=n.ino,HEAP32[r+12>>2]=n.mode,HEAPU32[r+16>>2]=n.nlink,HEAP32[r+20>>2]=n.uid,HEAP32[r+24>>2]=n.gid,HEAP32[r+28>>2]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>2]=tempI64[0],HEAP32[r+44>>2]=tempI64[1],HEAP32[r+48>>2]=4096,HEAP32[r+52>>2]=n.blocks;var i=n.atime.getTime(),a=n.mtime.getTime(),o=n.ctime.getTime();return tempI64=[Math.floor(i/1e3)>>>0,(tempDouble=Math.floor(i/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+56>>2]=tempI64[0],HEAP32[r+60>>2]=tempI64[1],HEAPU32[r+64>>2]=i%1e3*1e3,tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+72>>2]=tempI64[0],HEAP32[r+76>>2]=tempI64[1],HEAPU32[r+80>>2]=a%1e3*1e3,tempI64=[Math.floor(o/1e3)>>>0,(tempDouble=Math.floor(o/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+88>>2]=tempI64[0],HEAP32[r+92>>2]=tempI64[1],HEAPU32[r+96>>2]=o%1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+104>>2]=tempI64[0],HEAP32[r+108>>2]=tempI64[1],0},doMsync:function(e,t,r,n,i){if(!FS.isFile(t.node.mode))throw new FS.ErrnoError(43);if(2&n)return 0;var a=HEAPU8.slice(e,e+r);FS.msync(t,a,i,r,n)},varargs:void 0,get:function(){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(e){return UTF8ToString(e)},getStreamFromFD:function(e){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t}};function ___syscall_chdir(e){try{return e=SYSCALLS.getStr(e),FS.chdir(e),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function setErrNo(e){return HEAP32[___errno_location()>>2]=e,e}function ___syscall_fcntl64(e,t,r){SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 0:return(i=SYSCALLS.get())<0?-28:FS.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=SYSCALLS.get();return n.flags|=i,0;case 5:i=SYSCALLS.get();return HEAP16[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return setErrNo(28),-1}}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getcwd(e,t){try{if(0===t)return-28;var r=FS.cwd(),n=lengthBytesUTF8(r)+1;return t<n?-68:(stringToUTF8(r,e,t),n)}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_getdents64(e,t,r){try{var n=SYSCALLS.getStreamFromFD(e);n.getdents||(n.getdents=FS.readdir(n.path));for(var i=280,a=0,o=FS.llseek(n,0,1),s=Math.floor(o/i);s<n.getdents.length&&a+i<=r;){var c,l,u=n.getdents[s];if("."===u)c=n.node.id,l=4;else if(".."===u){c=FS.lookupPath(n.path,{parent:!0}).node.id,l=4}else{var d=FS.lookupNode(n.node,u);c=d.id,l=FS.isChrdev(d.mode)?2:FS.isDir(d.mode)?4:FS.isLink(d.mode)?10:8}tempI64=[c>>>0,(tempDouble=c,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+a>>2]=tempI64[0],HEAP32[t+a+4>>2]=tempI64[1],tempI64=[(s+1)*i>>>0,(tempDouble=(s+1)*i,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+a+8>>2]=tempI64[0],HEAP32[t+a+12>>2]=tempI64[1],HEAP16[t+a+16>>1]=280,HEAP8[t+a+18>>0]=l,stringToUTF8(u,t+a+19,256),a+=i,s+=1}return FS.llseek(n,s*i,0),a}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_ioctl(e,t,r){SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var i=SYSCALLS.get();return HEAP32[i>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:i=SYSCALLS.get();return FS.ioctl(n,t,i);default:return-28}}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_mkdirat(e,t,r){try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),"/"===(t=PATH.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),FS.mkdir(t,r,0),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(e,t,r,n){SYSCALLS.varargs=n;try{t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t);var i=n?SYSCALLS.get():0;return FS.open(t,r,i).fd}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_readlinkat(e,t,r,n){try{if(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),n<=0)return-28;var i=FS.readlink(t),a=Math.min(n,lengthBytesUTF8(i)),o=HEAP8[r+a];return stringToUTF8(i,r,n+1),HEAP8[r+a]=o,a}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_rmdir(e){try{return e=SYSCALLS.getStr(e),FS.rmdir(e),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_stat64(e,t){try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.stat,e,t)}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_unlinkat(e,t,r){try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),0===r?FS.unlink(t):512===r?FS.rmdir(t):abort("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function __embind_register_bigint(e,t,r,n,i){}function getShiftFromSize(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function embind_init_charCodes(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);embind_charCodes=e}var embind_charCodes=void 0;function readLatin1String(e){for(var t="",r=e;HEAPU8[r];)t+=embind_charCodes[HEAPU8[r++]];return t}var awaitingDependencies={},registeredTypes={},typeDependencies={},char_0=48,char_9=57;function makeLegalFunctionName(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=char_0&&t<=char_9?"_"+e:e}function createNamedFunction(e,t){return e=makeLegalFunctionName(e),new Function("body","return function "+e+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(t)}function extendError(e,t){var r=createNamedFunction(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var BindingError=void 0;function throwBindingError(e){throw new BindingError(e)}var InternalError=void 0;function throwInternalError(e){throw new InternalError(e)}function whenDependentTypesAreResolved(e,t,r){function n(t){var n=r(t);n.length!==e.length&&throwInternalError("Mismatched type converter count");for(var i=0;i<e.length;++i)registerType(e[i],n[i])}e.forEach((function(e){typeDependencies[e]=t}));var i=new Array(t.length),a=[],o=0;t.forEach(((e,t)=>{registeredTypes.hasOwnProperty(e)?i[t]=registeredTypes[e]:(a.push(e),awaitingDependencies.hasOwnProperty(e)||(awaitingDependencies[e]=[]),awaitingDependencies[e].push((()=>{i[t]=registeredTypes[e],++o===a.length&&n(i)})))})),0===a.length&&n(i)}function registerType(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||throwBindingError('type "'+n+'" must have a positive integer typeid pointer'),registeredTypes.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '"+n+"' twice")}if(registeredTypes[e]=t,delete typeDependencies[e],awaitingDependencies.hasOwnProperty(e)){var i=awaitingDependencies[e];delete awaitingDependencies[e],i.forEach((e=>e()))}}function __embind_register_bool(e,t,r,n,i){var a=getShiftFromSize(r);registerType(e,{name:t=readLatin1String(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=HEAP8;else if(2===r)n=HEAP16;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=HEAP32}return this.fromWireType(n[e>>a])},destructorFunction:null})}var emval_free_list=[],emval_handle_array=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function __emval_decref(e){e>4&&0==--emval_handle_array[e].refcount&&(emval_handle_array[e]=void 0,emval_free_list.push(e))}function count_emval_handles(){for(var e=0,t=5;t<emval_handle_array.length;++t)void 0!==emval_handle_array[t]&&++e;return e}function get_first_emval(){for(var e=5;e<emval_handle_array.length;++e)if(void 0!==emval_handle_array[e])return emval_handle_array[e];return null}function init_emval(){Module.count_emval_handles=count_emval_handles,Module.get_first_emval=get_first_emval}var Emval={toValue:e=>(e||throwBindingError("Cannot use deleted val. handle = "+e),emval_handle_array[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;return emval_handle_array[t]={refcount:1,value:e},t}}};function simpleReadValueFromPointer(e){return this.fromWireType(HEAP32[e>>2])}function __embind_register_emval(e,t){registerType(e,{name:t=readLatin1String(t),fromWireType:function(e){var t=Emval.toValue(e);return __emval_decref(e),t},toWireType:function(e,t){return Emval.toHandle(t)},argPackAdvance:8,readValueFromPointer:simpleReadValueFromPointer,destructorFunction:null})}function floatReadValueFromPointer(e,t){switch(t){case 2:return function(e){return this.fromWireType(HEAPF32[e>>2])};case 3:return function(e){return this.fromWireType(HEAPF64[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function __embind_register_float(e,t,r){var n=getShiftFromSize(r);registerType(e,{name:t=readLatin1String(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:floatReadValueFromPointer(t,n),destructorFunction:null})}function new_(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=createNamedFunction(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function runDestructors(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function craftInvokerFunction(e,t,r,n,i){var a=t.length;a<2&&throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var l="void"!==t[0].name,u="",d="";for(c=0;c<a-2;++c)u+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+makeLegalFunctionName(e)+"("+u+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var _=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],p=[throwBindingError,n,i,runDestructors,t[0],t[1]];o&&(f+="var thisWired = classParam.toWireType("+_+", this);\n");for(c=0;c<a-2;++c)f+="var arg"+c+"Wired = argType"+c+".toWireType("+_+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),p.push(t[c+2]);if(o&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(l?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="runDestructors(destructors);\n";else for(c=o?1:2;c<t.length;++c){var g=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(f+=g+"_dtor("+g+"); // "+t[c].name+"\n",m.push(g+"_dtor"),p.push(t[c].destructorFunction))}return l&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",m.push(f),new_(Function,m).apply(null,p)}function ensureOverloadTable(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||throwBindingError("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function exposePublicSymbol(e,t,r){Module.hasOwnProperty(e)?((void 0===r||void 0!==Module[e].overloadTable&&void 0!==Module[e].overloadTable[r])&&throwBindingError("Cannot register public name '"+e+"' twice"),ensureOverloadTable(Module,e,e),Module.hasOwnProperty(r)&&throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),Module[e].overloadTable[r]=t):(Module[e]=t,void 0!==r&&(Module[e].numArguments=r))}function heap32VectorToArray(e,t){for(var r=[],n=0;n<e;n++)r.push(HEAPU32[t+4*n>>2]);return r}function replacePublicSymbol(e,t,r){Module.hasOwnProperty(e)||throwInternalError("Replacing nonexistant public symbol"),void 0!==Module[e].overloadTable&&void 0!==r?Module[e].overloadTable[r]=t:(Module[e]=t,Module[e].argCount=r)}function getDynCaller(e,t){var r=[];return function(){return r.length=0,Object.assign(r,arguments),dynCall(e,t,r)}}function embind__requireFunction(e,t){var r=(e=readLatin1String(e)).includes("j")?getDynCaller(e,t):getWasmTableEntry(t);return"function"!=typeof r&&throwBindingError("unknown function pointer with signature "+e+": "+t),r}var UnboundTypeError=void 0;function getTypeName(e){var t=___getTypeName(e),r=readLatin1String(t);return _free(t),r}function throwUnboundTypeError(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||registeredTypes[t]||(typeDependencies[t]?typeDependencies[t].forEach(e):(r.push(t),n[t]=!0))})),new UnboundTypeError(e+": "+r.map(getTypeName).join([", "]))}function __embind_register_function(e,t,r,n,i,a){var o=heap32VectorToArray(t,r);e=readLatin1String(e),i=embind__requireFunction(n,i),exposePublicSymbol(e,(function(){throwUnboundTypeError("Cannot call "+e+" due to unbound types",o)}),t-1),whenDependentTypesAreResolved([],o,(function(r){var n=[r[0],null].concat(r.slice(1));return replacePublicSymbol(e,craftInvokerFunction(e,n,null,i,a),t-1),[]}))}function integerReadValueFromPointer(e,t,r){switch(t){case 0:return r?function(e){return HEAP8[e]}:function(e){return HEAPU8[e]};case 1:return r?function(e){return HEAP16[e>>1]}:function(e){return HEAPU16[e>>1]};case 2:return r?function(e){return HEAP32[e>>2]}:function(e){return HEAPU32[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function __embind_register_integer(e,t,r,n,i){t=readLatin1String(t);var a=getShiftFromSize(r),o=e=>e;if(0===n){var s=32-8*r;o=e=>e<<s>>>s}var c=t.includes("unsigned");registerType(e,{name:t,fromWireType:o,toWireType:c?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:integerReadValueFromPointer(t,a,0!==n),destructorFunction:null})}function __embind_register_memory_view(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=HEAPU32,r=t[e>>=2],i=t[e+1];return new n(t.buffer,i,r)}registerType(e,{name:r=readLatin1String(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})}function __embind_register_std_string(e,t){var r="std::string"===(t=readLatin1String(t));registerType(e,{name:t,fromWireType:function(e){var t,n=HEAPU32[e>>2],i=e+4;if(r)for(var a=i,o=0;o<=n;++o){var s=i+o;if(o==n||0==HEAPU8[s]){var c=UTF8ToString(a,s-a);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),a=s+1}}else{var l=new Array(n);for(o=0;o<n;++o)l[o]=String.fromCharCode(HEAPU8[i+o]);t=l.join("")}return _free(e),t},toWireType:function(e,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var i="string"==typeof t;i||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||throwBindingError("Cannot pass non-string to std::string"),n=r&&i?lengthBytesUTF8(t):t.length;var a=_malloc(4+n+1),o=a+4;if(HEAPU32[a>>2]=n,r&&i)stringToUTF8(t,o,n+1);else if(i)for(var s=0;s<n;++s){var c=t.charCodeAt(s);c>255&&(_free(o),throwBindingError("String has UTF-16 code units that do not fit in 8 bits")),HEAPU8[o+s]=c}else for(s=0;s<n;++s)HEAPU8[o+s]=t[s];return null!==e&&e.push(_free,a),a},argPackAdvance:8,readValueFromPointer:simpleReadValueFromPointer,destructorFunction:function(e){_free(e)}})}var UTF16Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function UTF16ToString(e,t){for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&HEAPU16[n];)++n;if((r=n<<1)-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e,r));for(var a="",o=0;!(o>=t/2);++o){var s=HEAP16[e+2*o>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function stringToUTF16(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);HEAP16[t>>1]=o,t+=2}return HEAP16[t>>1]=0,t-n}function lengthBytesUTF16(e){return 2*e.length}function UTF32ToString(e,t){for(var r=0,n="";!(r>=t/4);){var i=HEAP32[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(i)}return n}function stringToUTF32(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,a=0;a<e.length;++a){var o=e.charCodeAt(a);if(o>=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a);if(HEAP32[t>>2]=o,(t+=4)+4>i)break}return HEAP32[t>>2]=0,t-n}function lengthBytesUTF32(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function __embind_register_std_wstring(e,t,r){var n,i,a,o,s;r=readLatin1String(r),2===t?(n=UTF16ToString,i=stringToUTF16,o=lengthBytesUTF16,a=()=>HEAPU16,s=1):4===t&&(n=UTF32ToString,i=stringToUTF32,o=lengthBytesUTF32,a=()=>HEAPU32,s=2),registerType(e,{name:r,fromWireType:function(e){for(var r,i=HEAPU32[e>>2],o=a(),c=e+4,l=0;l<=i;++l){var u=e+4+l*t;if(l==i||0==o[u>>s]){var d=n(c,u-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=u+t}}return _free(e),r},toWireType:function(e,n){"string"!=typeof n&&throwBindingError("Cannot pass non-string to C++ string type "+r);var a=o(n),c=_malloc(4+a+t);return HEAPU32[c>>2]=a>>s,i(n,c+4,a+t),null!==e&&e.push(_free,c),c},argPackAdvance:8,readValueFromPointer:simpleReadValueFromPointer,destructorFunction:function(e){_free(e)}})}function __embind_register_void(e,t){registerType(e,{isVoid:!0,name:t=readLatin1String(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}var nowIsMonotonic=!0;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function _abort(){abort("")}var EGL={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){EGL.errorCode=e},chooseConfig:function(e,t,r,n,i){if(62e3!=e)return EGL.setErrorCode(12296),0;if(t)for(;;){var a=HEAP32[t>>2];if(12321==a){var o=HEAP32[t+4>>2];EGL.contextAttributes.alpha=o>0}else if(12325==a){var s=HEAP32[t+4>>2];EGL.contextAttributes.depth=s>0}else if(12326==a){var c=HEAP32[t+4>>2];EGL.contextAttributes.stencil=c>0}else if(12337==a){var l=HEAP32[t+4>>2];EGL.contextAttributes.antialias=l>0}else if(12338==a){l=HEAP32[t+4>>2];EGL.contextAttributes.antialias=1==l}else if(12544==a){var u=HEAP32[t+4>>2];EGL.contextAttributes.lowLatency=12547!=u}else if(12344==a)break;t+=8}return r&&n||i?(i&&(HEAP32[i>>2]=1),r&&n>0&&(HEAP32[r>>2]=62002),EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0)}};function _eglBindAPI(e){return 12448==e?(EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0)}function _eglChooseConfig(e,t,r,n,i){return EGL.chooseConfig(e,t,r,n,i)}function __webgl_enable_ANGLE_instanced_arrays(e){var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,i){t.drawArraysInstancedANGLE(e,r,n,i)},e.drawElementsInstanced=function(e,r,n,i,a){t.drawElementsInstancedANGLE(e,r,n,i,a)},1}function __webgl_enable_OES_vertex_array_object(e){var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)},1}function __webgl_enable_WEBGL_draw_buffers(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function __webgl_enable_WEBGL_multi_draw(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){GL.lastError||(GL.lastError=e)},getNewId:function(e){for(var t=GL.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var i="",a=0;a<t;++a){var o=n?HEAP32[n+4*a>>2]:-1;i+=UTF8ToString(HEAP32[r+4*a>>2],o<0?void 0:o)}return i},createContext:function(e,t){if(!e.getContextSafariWebGL2Fixed){e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null}}var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?GL.registerContext(r,t):0},registerContext:function(e,t){var r=GL.getNewId(GL.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),GL.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&GL.initExtensions(n),r},makeContextCurrent:function(e){return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx,!(e&&!GLctx)},getContext:function(e){return GL.contexts[e]},deleteContext:function(e){GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),"object"==typeof JSEvents&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),GL.contexts[e]=null},initExtensions:function(e){if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;__webgl_enable_ANGLE_instanced_arrays(t),__webgl_enable_OES_vertex_array_object(t),__webgl_enable_WEBGL_draw_buffers(t),__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(t),__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(t),e.version>=2&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!t.disjointTimerQueryExt)&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query")),__webgl_enable_WEBGL_multi_draw(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function _eglCreateContext(e,t,r,n){if(62e3!=e)return EGL.setErrorCode(12296),0;for(var i=1;;){var a=HEAP32[n>>2];if(12440!=a){if(12344==a)break;return EGL.setErrorCode(12292),0}i=HEAP32[n+4>>2],n+=8}return i<2||i>3?(EGL.setErrorCode(12293),0):(EGL.contextAttributes.majorVersion=i-1,EGL.contextAttributes.minorVersion=0,EGL.context=GL.createContext(Module.canvas,EGL.contextAttributes),0!=EGL.context?(EGL.setErrorCode(12288),GL.makeContextCurrent(EGL.context),Module.useWebGL=!0,Browser.moduleContextCreatedCallbacks.forEach((function(e){e()})),GL.makeContextCurrent(null),62004):(EGL.setErrorCode(12297),0))}function _eglCreateWindowSurface(e,t,r,n){return 62e3!=e?(EGL.setErrorCode(12296),0):62002!=t?(EGL.setErrorCode(12293),0):(EGL.setErrorCode(12288),62006)}function _eglDestroyContext(e,t){return 62e3!=e?(EGL.setErrorCode(12296),0):62004!=t?(EGL.setErrorCode(12294),0):(GL.deleteContext(EGL.context),EGL.setErrorCode(12288),EGL.currentContext==t&&(EGL.currentContext=0),1)}function _eglDestroySurface(e,t){return 62e3!=e?(EGL.setErrorCode(12296),0):62006!=t?(EGL.setErrorCode(12301),1):(EGL.currentReadSurface==t&&(EGL.currentReadSurface=0),EGL.currentDrawSurface==t&&(EGL.currentDrawSurface=0),EGL.setErrorCode(12288),1)}function _eglGetConfigAttrib(e,t,r,n){if(62e3!=e)return EGL.setErrorCode(12296),0;if(62002!=t)return EGL.setErrorCode(12293),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12320:return HEAP32[n>>2]=EGL.contextAttributes.alpha?32:24,1;case 12321:return HEAP32[n>>2]=EGL.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return HEAP32[n>>2]=8,1;case 12325:return HEAP32[n>>2]=EGL.contextAttributes.depth?24:0,1;case 12326:return HEAP32[n>>2]=EGL.contextAttributes.stencil?8:0,1;case 12327:case 12335:case 12340:return HEAP32[n>>2]=12344,1;case 12328:return HEAP32[n>>2]=62002,1;case 12329:case 12333:case 12334:case 12345:case 12346:case 12347:case 12349:case 12350:case 12354:return HEAP32[n>>2]=0,1;case 12330:case 12332:return HEAP32[n>>2]=4096,1;case 12331:return HEAP32[n>>2]=16777216,1;case 12337:return HEAP32[n>>2]=EGL.contextAttributes.antialias?4:0,1;case 12338:return HEAP32[n>>2]=EGL.contextAttributes.antialias?1:0,1;case 12339:case 12352:return HEAP32[n>>2]=4,1;case 12341:case 12342:case 12343:return HEAP32[n>>2]=-1,1;case 12348:return HEAP32[n>>2]=1,1;case 12351:return HEAP32[n>>2]=12430,1;default:return EGL.setErrorCode(12292),0}}function _eglGetDisplay(e){return EGL.setErrorCode(12288),62e3}function _eglGetError(){return EGL.errorCode}function _eglInitialize(e,t,r){return 62e3!=e?(EGL.setErrorCode(12296),0):(t&&(HEAP32[t>>2]=1),r&&(HEAP32[r>>2]=4),EGL.defaultDisplayInitialized=!0,EGL.setErrorCode(12288),1)}function _eglMakeCurrent(e,t,r,n){return 62e3!=e?(EGL.setErrorCode(12296),0):0!=n&&62004!=n?(EGL.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(EGL.setErrorCode(12301),0):(GL.makeContextCurrent(n?EGL.context:null),EGL.currentContext=n,EGL.currentDrawSurface=t,EGL.currentReadSurface=r,EGL.setErrorCode(12288),1)}function allocateUTF8(e){var t=lengthBytesUTF8(e)+1,r=_malloc(t);return r&&stringToUTF8Array(e,HEAP8,r,t),r}function _eglQueryString(e,t){if(62e3!=e)return EGL.setErrorCode(12296),0;if(EGL.setErrorCode(12288),EGL.stringCache[t])return EGL.stringCache[t];var r;switch(t){case 12371:r=allocateUTF8("Emscripten");break;case 12372:r=allocateUTF8("1.4 Emscripten EGL");break;case 12373:r=allocateUTF8("");break;case 12429:r=allocateUTF8("OpenGL_ES");break;default:return EGL.setErrorCode(12300),0}return EGL.stringCache[t]=r,r}function _eglSwapBuffers(){if(EGL.defaultDisplayInitialized)if(Module.ctx){if(!Module.ctx.isContextLost())return EGL.setErrorCode(12288),1;EGL.setErrorCode(12302)}else EGL.setErrorCode(12290);else EGL.setErrorCode(12289);return 0}function _eglSwapInterval(e,t){return 62e3!=e?(EGL.setErrorCode(12296),0):(0==t?_emscripten_set_main_loop_timing(0,0):_emscripten_set_main_loop_timing(1,t),EGL.setErrorCode(12288),1)}function _eglTerminate(e){return 62e3!=e?(EGL.setErrorCode(12296),0):(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.defaultDisplayInitialized=!1,EGL.setErrorCode(12288),1)}function _eglWaitClient(){return EGL.setErrorCode(12288),1}var _eglWaitGL=_eglWaitClient;function _eglWaitNative(e){return EGL.setErrorCode(12288),1}var readEmAsmArgsArray=[];function readEmAsmArgs(e,t){var r;for(readEmAsmArgsArray.length=0,t>>=2;r=HEAPU8[e++];)t+=105!=r&t,readEmAsmArgsArray.push(105==r?HEAP32[t]:HEAPF64[t++>>1]),++t;return readEmAsmArgsArray}function runEmAsmFunction(e,t,r){var n=readEmAsmArgs(t,r);return ASM_CONSTS[e].apply(null,n)}function _emscripten_asm_const_int(e,t,r){return runEmAsmFunction(e,t,r)}function runMainThreadEmAsm(e,t,r,n){var i=readEmAsmArgs(t,r);return ASM_CONSTS[e].apply(null,i)}function _emscripten_asm_const_int_sync_on_main_thread(e,t,r){return runMainThreadEmAsm(e,t,r)}function _emscripten_cancel_main_loop(){Browser.mainLoop.pause(),Browser.mainLoop.func=null}function _emscripten_date_now(){return Date.now()}function withStackSave(e){var t=stackSave(),r=e();return stackRestore(t),r}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var e=JSEvents.eventHandlers.length-1;e>=0;--e)JSEvents._removeHandler(e);JSEvents.eventHandlers=[],JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){JSEvents.removeEventListenersRegistered||(JSEvents.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var i in JSEvents.deferredCalls){var a=JSEvents.deferredCalls[i];if(a.targetFunction==e&&n(a.argsList,r))return}JSEvents.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),JSEvents.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<JSEvents.deferredCalls.length;++t)JSEvents.deferredCalls[t].targetFunction==e&&(JSEvents.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(JSEvents.canPerformEventHandlerRequests())for(var e=0;e<JSEvents.deferredCalls.length;++e){var t=JSEvents.deferredCalls[e];JSEvents.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<JSEvents.eventHandlers.length;++r)JSEvents.eventHandlers[r].target!=e||t&&t!=JSEvents.eventHandlers[r].eventTypeString||JSEvents._removeHandler(r--)},_removeHandler:function(e){var t=JSEvents.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),JSEvents.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++JSEvents.inEventHandler,JSEvents.currentEventHandler=e,JSEvents.runDeferredCalls(),e.handlerFunc(t),JSEvents.runDeferredCalls(),--JSEvents.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),JSEvents.eventHandlers.push(e),JSEvents.registerRemoveEventListeners();else for(var r=0;r<JSEvents.eventHandlers.length;++r)JSEvents.eventHandlers[r].target==e.target&&JSEvents.eventHandlers[r].eventTypeString==e.eventTypeString&&JSEvents._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},currentFullscreenStrategy={};function maybeCStringToJsString(e){return e>2?UTF8ToString(e):e}var specialHTMLTargets=[0,document,window];function findEventTarget(e){return e=maybeCStringToJsString(e),specialHTMLTargets[e]||document.querySelector(e)}function findCanvasEventTarget(e){return findEventTarget(e)}function _emscripten_get_canvas_element_size(e,t,r){var n=findCanvasEventTarget(e);if(!n)return-4;HEAP32[t>>2]=n.width,HEAP32[r>>2]=n.height}function getCanvasElementSize(e){return withStackSave((function(){var t=stackAlloc(8),r=t+4,n=stackAlloc(e.id.length+1);return stringToUTF8(e.id,n,e.id.length+1),_emscripten_get_canvas_element_size(n,t,r),[HEAP32[t>>2],HEAP32[r>>2]]}))}function _emscripten_set_canvas_element_size(e,t,r){var n=findCanvasEventTarget(e);return n?(n.width=t,n.height=r,0):-4}function setCanvasElementSize(e,t,r){e.controlTransferredOffscreen?withStackSave((function(){var n=stackAlloc(e.id.length+1);stringToUTF8(e.id,n,e.id.length+1),_emscripten_set_canvas_element_size(n,t,r)})):(e.width=t,e.height=r)}function registerRestoreOldStyle(e){var t=getCanvasElementSize(e),r=t[0],n=t[1],i=e.style.width,a=e.style.height,o=e.style.backgroundColor,s=document.body.style.backgroundColor,c=e.style.paddingLeft,l=e.style.paddingRight,u=e.style.paddingTop,d=e.style.paddingBottom,f=e.style.marginLeft,_=e.style.marginRight,m=e.style.marginTop,p=e.style.marginBottom,g=document.body.style.margin,h=document.documentElement.style.overflow,v=document.body.scroll,E=e.style.imageRendering;function b(){document.fullscreenElement||document.webkitFullscreenElement||(document.removeEventListener("fullscreenchange",b),document.removeEventListener("webkitfullscreenchange",b),setCanvasElementSize(e,r,n),e.style.width=i,e.style.height=a,e.style.backgroundColor=o,s||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=s,e.style.paddingLeft=c,e.style.paddingRight=l,e.style.paddingTop=u,e.style.paddingBottom=d,e.style.marginLeft=f,e.style.marginRight=_,e.style.marginTop=m,e.style.marginBottom=p,document.body.style.margin=g,document.documentElement.style.overflow=h,document.body.scroll=v,e.style.imageRendering=E,e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,r,n),currentFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData))}return document.addEventListener("fullscreenchange",b),document.addEventListener("webkitfullscreenchange",b),b}function setLetterbox(e,t,r){e.style.paddingLeft=e.style.paddingRight=r+"px",e.style.paddingTop=e.style.paddingBottom=t+"px"}function getBoundingClientRect(e){return specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0}}function JSEvents_resizeCanvasForFullscreen(e,t){var r=registerRestoreOldStyle(e),n=t.softFullscreen?innerWidth:screen.width,i=t.softFullscreen?innerHeight:screen.height,a=getBoundingClientRect(e),o=a.width,s=a.height,c=getCanvasElementSize(e),l=c[0],u=c[1];if(3==t.scaleMode)setLetterbox(e,(i-s)/2,(n-o)/2),n=o,i=s;else if(2==t.scaleMode)if(n*u<l*i){var d=u*n/l;setLetterbox(e,(i-d)/2,0),i=d}else{var f=l*i/u;setLetterbox(e,0,(n-f)/2),n=f}e.style.backgroundColor||(e.style.backgroundColor="black"),document.body.style.backgroundColor||(document.body.style.backgroundColor="black"),e.style.width=n+"px",e.style.height=i+"px",1==t.filteringMode&&(e.style.imageRendering="optimizeSpeed",e.style.imageRendering="-moz-crisp-edges",e.style.imageRendering="-o-crisp-edges",e.style.imageRendering="-webkit-optimize-contrast",e.style.imageRendering="optimize-contrast",e.style.imageRendering="crisp-edges",e.style.imageRendering="pixelated");var _=2==t.canvasResolutionScaleMode?devicePixelRatio:1;if(0!=t.canvasResolutionScaleMode){var m=n*_|0,p=i*_|0;setCanvasElementSize(e,m,p),e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,m,p)}return r}function JSEvents_requestFullscreen(e,t){if(0==t.scaleMode&&0==t.canvasResolutionScaleMode||JSEvents_resizeCanvasForFullscreen(e,t),e.requestFullscreen)e.requestFullscreen();else{if(!e.webkitRequestFullscreen)return JSEvents.fullscreenEnabled()?-3:-1;e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}return currentFullscreenStrategy=t,t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),0}function _emscripten_exit_fullscreen(){if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var e=specialHTMLTargets[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else{if(!e.webkitExitFullscreen)return-1;e.webkitFullscreenElement&&e.webkitExitFullscreen()}return 0}function requestPointerLock(e){return e.requestPointerLock?(e.requestPointerLock(),0):document.body.requestPointerLock?-3:-1}function _emscripten_exit_pointerlock(){return JSEvents.removeDeferredCalls(requestPointerLock),document.exitPointerLock?(document.exitPointerLock(),0):-1}function _emscripten_get_device_pixel_ratio(){return devicePixelRatio}function _emscripten_get_element_css_size(e,t,r){if(!(e=findEventTarget(e)))return-4;var n=getBoundingClientRect(e);return HEAPF64[t>>3]=n.width,HEAPF64[r>>3]=n.height,0}function fillGamepadEventData(e,t){HEAPF64[e>>3]=t.timestamp;for(var r=0;r<t.axes.length;++r)HEAPF64[e+8*r+16>>3]=t.axes[r];for(r=0;r<t.buttons.length;++r)"object"==typeof t.buttons[r]?HEAPF64[e+8*r+528>>3]=t.buttons[r].value:HEAPF64[e+8*r+528>>3]=t.buttons[r];for(r=0;r<t.buttons.length;++r)"object"==typeof t.buttons[r]?HEAP32[e+4*r+1040>>2]=t.buttons[r].pressed:HEAP32[e+4*r+1040>>2]=1==t.buttons[r];HEAP32[e+1296>>2]=t.connected,HEAP32[e+1300>>2]=t.index,HEAP32[e+8>>2]=t.axes.length,HEAP32[e+12>>2]=t.buttons.length,stringToUTF8(t.id,e+1304,64),stringToUTF8(t.mapping,e+1368,64)}function _emscripten_get_gamepad_status(e,t){return e<0||e>=JSEvents.lastGamepadState.length?-5:JSEvents.lastGamepadState[e]?(fillGamepadEventData(t,JSEvents.lastGamepadState[e]),0):-7}function _emscripten_get_num_gamepads(){return JSEvents.lastGamepadState.length}function _emscripten_get_screen_size(e,t){HEAP32[e>>2]=screen.width,HEAP32[t>>2]=screen.height}function _emscripten_glActiveTexture(e){GLctx.activeTexture(e)}function _emscripten_glAttachShader(e,t){GLctx.attachShader(GL.programs[e],GL.shaders[t])}function _emscripten_glBeginQuery(e,t){GLctx.beginQuery(e,GL.queries[t])}function _emscripten_glBeginQueryEXT(e,t){GLctx.disjointTimerQueryExt.beginQueryEXT(e,GL.queries[t])}function _emscripten_glBeginTransformFeedback(e){GLctx.beginTransformFeedback(e)}function _emscripten_glBindAttribLocation(e,t,r){GLctx.bindAttribLocation(GL.programs[e],t,UTF8ToString(r))}function _emscripten_glBindBuffer(e,t){35051==e?GLctx.currentPixelPackBufferBinding=t:35052==e&&(GLctx.currentPixelUnpackBufferBinding=t),GLctx.bindBuffer(e,GL.buffers[t])}function _emscripten_glBindBufferBase(e,t,r){GLctx.bindBufferBase(e,t,GL.buffers[r])}function _emscripten_glBindBufferRange(e,t,r,n,i){GLctx.bindBufferRange(e,t,GL.buffers[r],n,i)}function _emscripten_glBindFramebuffer(e,t){GLctx.bindFramebuffer(e,GL.framebuffers[t])}function _emscripten_glBindRenderbuffer(e,t){GLctx.bindRenderbuffer(e,GL.renderbuffers[t])}function _emscripten_glBindSampler(e,t){GLctx.bindSampler(e,GL.samplers[t])}function _emscripten_glBindTexture(e,t){GLctx.bindTexture(e,GL.textures[t])}function _emscripten_glBindTransformFeedback(e,t){GLctx.bindTransformFeedback(e,GL.transformFeedbacks[t])}function _emscripten_glBindVertexArray(e){GLctx.bindVertexArray(GL.vaos[e])}function _emscripten_glBindVertexArrayOES(e){GLctx.bindVertexArray(GL.vaos[e])}function _emscripten_glBlendColor(e,t,r,n){GLctx.blendColor(e,t,r,n)}function _emscripten_glBlendEquation(e){GLctx.blendEquation(e)}function _emscripten_glBlendEquationSeparate(e,t){GLctx.blendEquationSeparate(e,t)}function _emscripten_glBlendFunc(e,t){GLctx.blendFunc(e,t)}function _emscripten_glBlendFuncSeparate(e,t,r,n){GLctx.blendFuncSeparate(e,t,r,n)}function _emscripten_glBlitFramebuffer(e,t,r,n,i,a,o,s,c,l){GLctx.blitFramebuffer(e,t,r,n,i,a,o,s,c,l)}function _emscripten_glBufferData(e,t,r,n){GL.currentContext.version>=2?r&&t?GLctx.bufferData(e,HEAPU8,n,r,t):GLctx.bufferData(e,t,n):GLctx.bufferData(e,r?HEAPU8.subarray(r,r+t):t,n)}function _emscripten_glBufferSubData(e,t,r,n){GL.currentContext.version>=2?r&&GLctx.bufferSubData(e,t,HEAPU8,n,r):GLctx.bufferSubData(e,t,HEAPU8.subarray(n,n+r))}function _emscripten_glCheckFramebufferStatus(e){return GLctx.checkFramebufferStatus(e)}function _emscripten_glClear(e){GLctx.clear(e)}function _emscripten_glClearBufferfi(e,t,r,n){GLctx.clearBufferfi(e,t,r,n)}function _emscripten_glClearBufferfv(e,t,r){GLctx.clearBufferfv(e,t,HEAPF32,r>>2)}function _emscripten_glClearBufferiv(e,t,r){GLctx.clearBufferiv(e,t,HEAP32,r>>2)}function _emscripten_glClearBufferuiv(e,t,r){GLctx.clearBufferuiv(e,t,HEAPU32,r>>2)}function _emscripten_glClearColor(e,t,r,n){GLctx.clearColor(e,t,r,n)}function _emscripten_glClearDepthf(e){GLctx.clearDepth(e)}function _emscripten_glClearStencil(e){GLctx.clearStencil(e)}function convertI32PairToI53(e,t){return(e>>>0)+4294967296*t}function _emscripten_glClientWaitSync(e,t,r,n){return GLctx.clientWaitSync(GL.syncs[e],t,convertI32PairToI53(r,n))}function _emscripten_glColorMask(e,t,r,n){GLctx.colorMask(!!e,!!t,!!r,!!n)}function _emscripten_glCompileShader(e){GLctx.compileShader(GL.shaders[e])}function _emscripten_glCompressedTexImage2D(e,t,r,n,i,a,o,s){GL.currentContext.version>=2?GLctx.currentPixelUnpackBufferBinding||!o?GLctx.compressedTexImage2D(e,t,r,n,i,a,o,s):GLctx.compressedTexImage2D(e,t,r,n,i,a,HEAPU8,s,o):GLctx.compressedTexImage2D(e,t,r,n,i,a,s?HEAPU8.subarray(s,s+o):null)}function _emscripten_glCompressedTexImage3D(e,t,r,n,i,a,o,s,c){GLctx.currentPixelUnpackBufferBinding?GLctx.compressedTexImage3D(e,t,r,n,i,a,o,s,c):GLctx.compressedTexImage3D(e,t,r,n,i,a,o,HEAPU8,c,s)}function _emscripten_glCompressedTexSubImage2D(e,t,r,n,i,a,o,s,c){GL.currentContext.version>=2?GLctx.currentPixelUnpackBufferBinding||!s?GLctx.compressedTexSubImage2D(e,t,r,n,i,a,o,s,c):GLctx.compressedTexSubImage2D(e,t,r,n,i,a,o,HEAPU8,c,s):GLctx.compressedTexSubImage2D(e,t,r,n,i,a,o,c?HEAPU8.subarray(c,c+s):null)}function _emscripten_glCompressedTexSubImage3D(e,t,r,n,i,a,o,s,c,l,u){GLctx.currentPixelUnpackBufferBinding?GLctx.compressedTexSubImage3D(e,t,r,n,i,a,o,s,c,l,u):GLctx.compressedTexSubImage3D(e,t,r,n,i,a,o,s,c,HEAPU8,u,l)}function _emscripten_glCopyBufferSubData(e,t,r,n,i){GLctx.copyBufferSubData(e,t,r,n,i)}function _emscripten_glCopyTexImage2D(e,t,r,n,i,a,o,s){GLctx.copyTexImage2D(e,t,r,n,i,a,o,s)}function _emscripten_glCopyTexSubImage2D(e,t,r,n,i,a,o,s){GLctx.copyTexSubImage2D(e,t,r,n,i,a,o,s)}function _emscripten_glCopyTexSubImage3D(e,t,r,n,i,a,o,s,c){GLctx.copyTexSubImage3D(e,t,r,n,i,a,o,s,c)}function _emscripten_glCreateProgram(){var e=GL.getNewId(GL.programs),t=GLctx.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,GL.programs[e]=t,e}function _emscripten_glCreateShader(e){var t=GL.getNewId(GL.shaders);return GL.shaders[t]=GLctx.createShader(e),t}function _emscripten_glCullFace(e){GLctx.cullFace(e)}function _emscripten_glDeleteBuffers(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.buffers[n];i&&(GLctx.deleteBuffer(i),i.name=0,GL.buffers[n]=null,n==GLctx.currentPixelPackBufferBinding&&(GLctx.currentPixelPackBufferBinding=0),n==GLctx.currentPixelUnpackBufferBinding&&(GLctx.currentPixelUnpackBufferBinding=0))}}function _emscripten_glDeleteFramebuffers(e,t){for(var r=0;r<e;++r){var n=HEAP32[t+4*r>>2],i=GL.framebuffers[n];i&&(GLctx.deleteFramebuffer(i),i.name=0,GL.framebuffers[n]=null)}}function _emscripten_glDeleteProgram(e){if(e){var t=GL.programs[e];t?(GLctx.deleteProgram(t),t.name=0,GL.programs[e]=null):GL.recordError(1281)}}function _emscripten_glDeleteQueries(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.queries[n];i&&(GLctx.deleteQuery(i),GL.queries[n]=null)}}function _emscripten_glDeleteQueriesEXT(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.queries[n];i&&(GLctx.disjointTimerQueryExt.deleteQueryEXT(i),GL.queries[n]=null)}}function _emscripten_glDeleteRenderbuffers(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.renderbuffers[n];i&&(GLctx.deleteRenderbuffer(i),i.name=0,GL.renderbuffers[n]=null)}}function _emscripten_glDeleteSamplers(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.samplers[n];i&&(GLctx.deleteSampler(i),i.name=0,GL.samplers[n]=null)}}function _emscripten_glDeleteShader(e){if(e){var t=GL.shaders[e];t?(GLctx.deleteShader(t),GL.shaders[e]=null):GL.recordError(1281)}}function _emscripten_glDeleteSync(e){if(e){var t=GL.syncs[e];t?(GLctx.deleteSync(t),t.name=0,GL.syncs[e]=null):GL.recordError(1281)}}function _emscripten_glDeleteTextures(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.textures[n];i&&(GLctx.deleteTexture(i),i.name=0,GL.textures[n]=null)}}function _emscripten_glDeleteTransformFeedbacks(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.transformFeedbacks[n];i&&(GLctx.deleteTransformFeedback(i),i.name=0,GL.transformFeedbacks[n]=null)}}function _emscripten_glDeleteVertexArrays(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}function _emscripten_glDeleteVertexArraysOES(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}function _emscripten_glDepthFunc(e){GLctx.depthFunc(e)}function _emscripten_glDepthMask(e){GLctx.depthMask(!!e)}function _emscripten_glDepthRangef(e,t){GLctx.depthRange(e,t)}function _emscripten_glDetachShader(e,t){GLctx.detachShader(GL.programs[e],GL.shaders[t])}function _emscripten_glDisable(e){GLctx.disable(e)}function _emscripten_glDisableVertexAttribArray(e){GLctx.disableVertexAttribArray(e)}function _emscripten_glDrawArrays(e,t,r){GLctx.drawArrays(e,t,r)}function _emscripten_glDrawArraysInstanced(e,t,r,n){GLctx.drawArraysInstanced(e,t,r,n)}function _emscripten_glDrawArraysInstancedANGLE(e,t,r,n){GLctx.drawArraysInstanced(e,t,r,n)}function _emscripten_glDrawArraysInstancedARB(e,t,r,n){GLctx.drawArraysInstanced(e,t,r,n)}function _emscripten_glDrawArraysInstancedEXT(e,t,r,n){GLctx.drawArraysInstanced(e,t,r,n)}function _emscripten_glDrawArraysInstancedNV(e,t,r,n){GLctx.drawArraysInstanced(e,t,r,n)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffers(e,t){for(var r=tempFixedLengthArray[e],n=0;n<e;n++)r[n]=HEAP32[t+4*n>>2];GLctx.drawBuffers(r)}function _emscripten_glDrawBuffersEXT(e,t){for(var r=tempFixedLengthArray[e],n=0;n<e;n++)r[n]=HEAP32[t+4*n>>2];GLctx.drawBuffers(r)}function _emscripten_glDrawBuffersWEBGL(e,t){for(var r=tempFixedLengthArray[e],n=0;n<e;n++)r[n]=HEAP32[t+4*n>>2];GLctx.drawBuffers(r)}function _emscripten_glDrawElements(e,t,r,n){GLctx.drawElements(e,t,r,n)}function _emscripten_glDrawElementsInstanced(e,t,r,n,i){GLctx.drawElementsInstanced(e,t,r,n,i)}function _emscripten_glDrawElementsInstancedANGLE(e,t,r,n,i){GLctx.drawElementsInstanced(e,t,r,n,i)}function _emscripten_glDrawElementsInstancedARB(e,t,r,n,i){GLctx.drawElementsInstanced(e,t,r,n,i)}function _emscripten_glDrawElementsInstancedEXT(e,t,r,n,i){GLctx.drawElementsInstanced(e,t,r,n,i)}function _emscripten_glDrawElementsInstancedNV(e,t,r,n,i){GLctx.drawElementsInstanced(e,t,r,n,i)}function _glDrawElements(e,t,r,n){GLctx.drawElements(e,t,r,n)}function _emscripten_glDrawRangeElements(e,t,r,n,i,a){_glDrawElements(e,n,i,a)}function _emscripten_glEnable(e){GLctx.enable(e)}function _emscripten_glEnableVertexAttribArray(e){GLctx.enableVertexAttribArray(e)}function _emscripten_glEndQuery(e){GLctx.endQuery(e)}function _emscripten_glEndQueryEXT(e){GLctx.disjointTimerQueryExt.endQueryEXT(e)}function _emscripten_glEndTransformFeedback(){GLctx.endTransformFeedback()}function _emscripten_glFenceSync(e,t){var r=GLctx.fenceSync(e,t);if(r){var n=GL.getNewId(GL.syncs);return r.name=n,GL.syncs[n]=r,n}return 0}function _emscripten_glFinish(){GLctx.finish()}function _emscripten_glFlush(){GLctx.flush()}function _emscripten_glFramebufferRenderbuffer(e,t,r,n){GLctx.framebufferRenderbuffer(e,t,r,GL.renderbuffers[n])}function _emscripten_glFramebufferTexture2D(e,t,r,n,i){GLctx.framebufferTexture2D(e,t,r,GL.textures[n],i)}function _emscripten_glFramebufferTextureLayer(e,t,r,n,i){GLctx.framebufferTextureLayer(e,t,GL.textures[r],n,i)}function _emscripten_glFrontFace(e){GLctx.frontFace(e)}function __glGenObject(e,t,r,n){for(var i=0;i<e;i++){var a=GLctx[r](),o=a&&GL.getNewId(n);a?(a.name=o,n[o]=a):GL.recordError(1282),HEAP32[t+4*i>>2]=o}}function _emscripten_glGenBuffers(e,t){__glGenObject(e,t,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(e,t){__glGenObject(e,t,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueries(e,t){__glGenObject(e,t,"createQuery",GL.queries)}function _emscripten_glGenQueriesEXT(e,t){for(var r=0;r<e;r++){var n=GLctx.disjointTimerQueryExt.createQueryEXT();if(!n){for(GL.recordError(1282);r<e;)HEAP32[t+4*r++>>2]=0;return}var i=GL.getNewId(GL.queries);n.name=i,GL.queries[i]=n,HEAP32[t+4*r>>2]=i}}function _emscripten_glGenRenderbuffers(e,t){__glGenObject(e,t,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(e,t){__glGenObject(e,t,"createSampler",GL.samplers)}function _emscripten_glGenTextures(e,t){__glGenObject(e,t,"createTexture",GL.textures)}function _emscripten_glGenTransformFeedbacks(e,t){__glGenObject(e,t,"createTransformFeedback",GL.transformFeedbacks)}function _emscripten_glGenVertexArrays(e,t){__glGenObject(e,t,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(e,t){__glGenObject(e,t,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(e){GLctx.generateMipmap(e)}function __glGetActiveAttribOrUniform(e,t,r,n,i,a,o,s){t=GL.programs[t];var c=GLctx[e](t,r);if(c){var l=s&&stringToUTF8(c.name,s,n);i&&(HEAP32[i>>2]=l),a&&(HEAP32[a>>2]=c.size),o&&(HEAP32[o>>2]=c.type)}}function _emscripten_glGetActiveAttrib(e,t,r,n,i,a,o){__glGetActiveAttribOrUniform("getActiveAttrib",e,t,r,n,i,a,o)}function _emscripten_glGetActiveUniform(e,t,r,n,i,a,o){__glGetActiveAttribOrUniform("getActiveUniform",e,t,r,n,i,a,o)}function _emscripten_glGetActiveUniformBlockName(e,t,r,n,i){e=GL.programs[e];var a=GLctx.getActiveUniformBlockName(e,t);if(a)if(i&&r>0){var o=stringToUTF8(a,i,r);n&&(HEAP32[n>>2]=o)}else n&&(HEAP32[n>>2]=0)}function _emscripten_glGetActiveUniformBlockiv(e,t,r,n){if(n)if(e=GL.programs[e],35393!=r){var i=GLctx.getActiveUniformBlockParameter(e,t,r);if(null!==i)if(35395==r)for(var a=0;a<i.length;a++)HEAP32[n+4*a>>2]=i[a];else HEAP32[n>>2]=i}else{var o=GLctx.getActiveUniformBlockName(e,t);HEAP32[n>>2]=o.length+1}else GL.recordError(1281)}function _emscripten_glGetActiveUniformsiv(e,t,r,n,i){if(i)if(t>0&&0==r)GL.recordError(1281);else{e=GL.programs[e];for(var a=[],o=0;o<t;o++)a.push(HEAP32[r+4*o>>2]);var s=GLctx.getActiveUniforms(e,a,n);if(s){var c=s.length;for(o=0;o<c;o++)HEAP32[i+4*o>>2]=s[o]}}else GL.recordError(1281)}function _emscripten_glGetAttachedShaders(e,t,r,n){var i=GLctx.getAttachedShaders(GL.programs[e]),a=i.length;a>t&&(a=t),HEAP32[r>>2]=a;for(var o=0;o<a;++o){var s=GL.shaders.indexOf(i[o]);HEAP32[n+4*o>>2]=s}}function _emscripten_glGetAttribLocation(e,t){return GLctx.getAttribLocation(GL.programs[e],UTF8ToString(t))}function writeI53ToI64(e,t){HEAPU32[e>>2]=t,HEAPU32[e+4>>2]=(t-HEAPU32[e>>2])/4294967296}function emscriptenWebGLGet(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&GL.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var i=GLctx.getParameter(34467);n=i?i.length:0;break;case 33309:if(GL.currentContext.version<2)return void GL.recordError(1282);n=2*(GLctx.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(GL.currentContext.version<2)return void GL.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=GLctx.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void GL.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void GL.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var o=0;o<a.length;++o)switch(r){case 0:HEAP32[t+4*o>>2]=a[o];break;case 2:HEAPF32[t+4*o>>2]=a[o];break;case 4:HEAP8[t+o>>0]=a[o]?1:0}return}try{n=0|a.name}catch(t){return GL.recordError(1280),void err("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return GL.recordError(1280),void err("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(r){case 1:writeI53ToI64(t,n);break;case 0:HEAP32[t>>2]=n;break;case 2:HEAPF32[t>>2]=n;break;case 4:HEAP8[t>>0]=n?1:0}}else GL.recordError(1281)}function _emscripten_glGetBooleanv(e,t){emscriptenWebGLGet(e,t,4)}function _emscripten_glGetBufferParameteri64v(e,t,r){r?writeI53ToI64(r,GLctx.getBufferParameter(e,t)):GL.recordError(1281)}function _emscripten_glGetBufferParameteriv(e,t,r){r?HEAP32[r>>2]=GLctx.getBufferParameter(e,t):GL.recordError(1281)}function _emscripten_glGetError(){var e=GLctx.getError()||GL.lastError;return GL.lastError=0,e}function _emscripten_glGetFloatv(e,t){emscriptenWebGLGet(e,t,2)}function _emscripten_glGetFragDataLocation(e,t){return GLctx.getFragDataLocation(GL.programs[e],UTF8ToString(t))}function _emscripten_glGetFramebufferAttachmentParameteriv(e,t,r,n){var i=GLctx.getFramebufferAttachmentParameter(e,t,r);(i instanceof WebGLRenderbuffer||i instanceof WebGLTexture)&&(i=0|i.name),HEAP32[n>>2]=i}function emscriptenWebGLGetIndexed(e,t,r,n){if(r){var i,a=GLctx.getIndexedParameter(e,t);switch(typeof a){case"boolean":i=a?1:0;break;case"number":i=a;break;case"object":if(null===a)switch(e){case 35983:case 35368:i=0;break;default:return void GL.recordError(1280)}else{if(!(a instanceof WebGLBuffer))return void GL.recordError(1280);i=0|a.name}break;default:return void GL.recordError(1280)}switch(n){case 1:writeI53ToI64(r,i);break;case 0:HEAP32[r>>2]=i;break;case 2:HEAPF32[r>>2]=i;break;case 4:HEAP8[r>>0]=i?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else GL.recordError(1281)}function _emscripten_glGetInteger64i_v(e,t,r){emscriptenWebGLGetIndexed(e,t,r,1)}function _emscripten_glGetInteger64v(e,t){emscriptenWebGLGet(e,t,1)}function _emscripten_glGetIntegeri_v(e,t,r){emscriptenWebGLGetIndexed(e,t,r,0)}function _emscripten_glGetIntegerv(e,t){emscriptenWebGLGet(e,t,0)}function _emscripten_glGetInternalformativ(e,t,r,n,i){if(n<0)GL.recordError(1281);else if(i){var a=GLctx.getInternalformatParameter(e,t,r);if(null!==a)for(var o=0;o<a.length&&o<n;++o)HEAP32[i+4*o>>2]=a[o]}else GL.recordError(1281)}function _emscripten_glGetProgramBinary(e,t,r,n,i){GL.recordError(1282)}function _emscripten_glGetProgramInfoLog(e,t,r,n){var i=GLctx.getProgramInfoLog(GL.programs[e]);null===i&&(i="(unknown error)");var a=t>0&&n?stringToUTF8(i,n,t):0;r&&(HEAP32[r>>2]=a)}function _emscripten_glGetProgramiv(e,t,r){if(r)if(e>=GL.counter)GL.recordError(1281);else if(e=GL.programs[e],35716==t){var n=GLctx.getProgramInfoLog(e);null===n&&(n="(unknown error)"),HEAP32[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var i=0;i<GLctx.getProgramParameter(e,35718);++i)e.maxUniformLength=Math.max(e.maxUniformLength,GLctx.getActiveUniform(e,i).name.length+1);HEAP32[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(i=0;i<GLctx.getProgramParameter(e,35721);++i)e.maxAttributeLength=Math.max(e.maxAttributeLength,GLctx.getActiveAttrib(e,i).name.length+1);HEAP32[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(i=0;i<GLctx.getProgramParameter(e,35382);++i)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,GLctx.getActiveUniformBlockName(e,i).length+1);HEAP32[r>>2]=e.maxUniformBlockNameLength}else HEAP32[r>>2]=GLctx.getProgramParameter(e,t);else GL.recordError(1281)}function _emscripten_glGetQueryObjecti64vEXT(e,t,r){if(r){var n,i=GL.queries[e];writeI53ToI64(r,"boolean"==typeof(n=GL.currentContext.version<2?GLctx.disjointTimerQueryExt.getQueryObjectEXT(i,t):GLctx.getQueryParameter(i,t))?n?1:0:n)}else GL.recordError(1281)}function _emscripten_glGetQueryObjectivEXT(e,t,r){if(r){var n,i=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(i,t);n="boolean"==typeof a?a?1:0:a,HEAP32[r>>2]=n}else GL.recordError(1281)}function _emscripten_glGetQueryObjectui64vEXT(e,t,r){if(r){var n,i=GL.queries[e];writeI53ToI64(r,"boolean"==typeof(n=GL.currentContext.version<2?GLctx.disjointTimerQueryExt.getQueryObjectEXT(i,t):GLctx.getQueryParameter(i,t))?n?1:0:n)}else GL.recordError(1281)}function _emscripten_glGetQueryObjectuiv(e,t,r){if(r){var n,i=GL.queries[e],a=GLctx.getQueryParameter(i,t);n="boolean"==typeof a?a?1:0:a,HEAP32[r>>2]=n}else GL.recordError(1281)}function _emscripten_glGetQueryObjectuivEXT(e,t,r){if(r){var n,i=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(i,t);n="boolean"==typeof a?a?1:0:a,HEAP32[r>>2]=n}else GL.recordError(1281)}function _emscripten_glGetQueryiv(e,t,r){r?HEAP32[r>>2]=GLctx.getQuery(e,t):GL.recordError(1281)}function _emscripten_glGetQueryivEXT(e,t,r){r?HEAP32[r>>2]=GLctx.disjointTimerQueryExt.getQueryEXT(e,t):GL.recordError(1281)}function _emscripten_glGetRenderbufferParameteriv(e,t,r){r?HEAP32[r>>2]=GLctx.getRenderbufferParameter(e,t):GL.recordError(1281)}function _emscripten_glGetSamplerParameterfv(e,t,r){r?HEAPF32[r>>2]=GLctx.getSamplerParameter(GL.samplers[e],t):GL.recordError(1281)}function _emscripten_glGetSamplerParameteriv(e,t,r){r?HEAP32[r>>2]=GLctx.getSamplerParameter(GL.samplers[e],t):GL.recordError(1281)}function _emscripten_glGetShaderInfoLog(e,t,r,n){var i=GLctx.getShaderInfoLog(GL.shaders[e]);null===i&&(i="(unknown error)");var a=t>0&&n?stringToUTF8(i,n,t):0;r&&(HEAP32[r>>2]=a)}function _emscripten_glGetShaderPrecisionFormat(e,t,r,n){var i=GLctx.getShaderPrecisionFormat(e,t);HEAP32[r>>2]=i.rangeMin,HEAP32[r+4>>2]=i.rangeMax,HEAP32[n>>2]=i.precision}function _emscripten_glGetShaderSource(e,t,r,n){var i=GLctx.getShaderSource(GL.shaders[e]);if(i){var a=t>0&&n?stringToUTF8(i,n,t):0;r&&(HEAP32[r>>2]=a)}}function _emscripten_glGetShaderiv(e,t,r){if(r)if(35716==t){var n=GLctx.getShaderInfoLog(GL.shaders[e]);null===n&&(n="(unknown error)");var i=n?n.length+1:0;HEAP32[r>>2]=i}else if(35720==t){var a=GLctx.getShaderSource(GL.shaders[e]),o=a?a.length+1:0;HEAP32[r>>2]=o}else HEAP32[r>>2]=GLctx.getShaderParameter(GL.shaders[e],t);else GL.recordError(1281)}function stringToNewUTF8(e){var t=lengthBytesUTF8(e)+1,r=_malloc(t);return stringToUTF8(e,r,t),r}function _emscripten_glGetString(e){var t=GL.stringCache[e];if(!t){switch(e){case 7939:var r=GLctx.getSupportedExtensions()||[];r=r.concat(r.map((function(e){return"GL_"+e}))),t=stringToNewUTF8(r.join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=GLctx.getParameter(e);n||GL.recordError(1280),t=n&&stringToNewUTF8(n);break;case 7938:var i=GLctx.getParameter(7938);t=stringToNewUTF8(i=GL.currentContext.version>=2?"OpenGL ES 3.0 ("+i+")":"OpenGL ES 2.0 ("+i+")");break;case 35724:var a=GLctx.getParameter(35724),o=a.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==o&&(3==o[1].length&&(o[1]=o[1]+"0"),a="OpenGL ES GLSL ES "+o[1]+" ("+a+")"),t=stringToNewUTF8(a);break;default:GL.recordError(1280)}GL.stringCache[e]=t}return t}function _emscripten_glGetStringi(e,t){if(GL.currentContext.version<2)return GL.recordError(1282),0;var r=GL.stringiCache[e];if(r)return t<0||t>=r.length?(GL.recordError(1281),0):r[t];if(7939===e){var n=GLctx.getSupportedExtensions()||[];return n=n.concat(n.map((function(e){return"GL_"+e}))),n=n.map((function(e){return stringToNewUTF8(e)})),r=GL.stringiCache[e]=n,t<0||t>=r.length?(GL.recordError(1281),0):r[t]}return GL.recordError(1280),0}function _emscripten_glGetSynciv(e,t,r,n,i){if(r<0)GL.recordError(1281);else if(i){var a=GLctx.getSyncParameter(GL.syncs[e],t);null!==a&&(HEAP32[i>>2]=a,n&&(HEAP32[n>>2]=1))}else GL.recordError(1281)}function _emscripten_glGetTexParameterfv(e,t,r){r?HEAPF32[r>>2]=GLctx.getTexParameter(e,t):GL.recordError(1281)}function _emscripten_glGetTexParameteriv(e,t,r){r?HEAP32[r>>2]=GLctx.getTexParameter(e,t):GL.recordError(1281)}function _emscripten_glGetTransformFeedbackVarying(e,t,r,n,i,a,o){e=GL.programs[e];var s=GLctx.getTransformFeedbackVarying(e,t);if(s){if(o&&r>0){var c=stringToUTF8(s.name,o,r);n&&(HEAP32[n>>2]=c)}else n&&(HEAP32[n>>2]=0);i&&(HEAP32[i>>2]=s.size),a&&(HEAP32[a>>2]=s.type)}}function _emscripten_glGetUniformBlockIndex(e,t){return GLctx.getUniformBlockIndex(GL.programs[e],UTF8ToString(t))}function _emscripten_glGetUniformIndices(e,t,r,n){if(n)if(t>0&&(0==r||0==n))GL.recordError(1281);else{e=GL.programs[e];for(var i=[],a=0;a<t;a++)i.push(UTF8ToString(HEAP32[r+4*a>>2]));var o=GLctx.getUniformIndices(e,i);if(o){var s=o.length;for(a=0;a<s;a++)HEAP32[n+4*a>>2]=o[a]}}else GL.recordError(1281)}function jstoi_q(e){return parseInt(e)}function webglGetLeftBracePos(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function webglPrepareUniformLocationsBeforeFirstUse(e){var t,r,n=e.uniformLocsById,i=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<GLctx.getProgramParameter(e,35718);++t){var a=GLctx.getActiveUniform(e,t),o=a.name,s=a.size,c=webglGetLeftBracePos(o),l=c>0?o.slice(0,c):o,u=e.uniformIdCounter;for(e.uniformIdCounter+=s,i[l]=[s,u],r=0;r<s;++r)n[u]=r,e.uniformArrayNamesById[u++]=l}}function _emscripten_glGetUniformLocation(e,t){if(t=UTF8ToString(t),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var r=e.uniformLocsById,n=0,i=t,a=webglGetLeftBracePos(t);a>0&&(n=jstoi_q(t.slice(a+1))>>>0,i=t.slice(0,a));var o=e.uniformSizeAndIdsByName[i];if(o&&n<o[0]&&(r[n+=o[1]]=r[n]||GLctx.getUniformLocation(e,t)))return n}else GL.recordError(1281);return-1}function webglGetUniformLocation(e){var t=GLctx.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=GLctx.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}GL.recordError(1282)}function emscriptenWebGLGetUniform(e,t,r,n){if(r){webglPrepareUniformLocationsBeforeFirstUse(e=GL.programs[e]);var i=GLctx.getUniform(e,webglGetUniformLocation(t));if("number"==typeof i||"boolean"==typeof i)switch(n){case 0:HEAP32[r>>2]=i;break;case 2:HEAPF32[r>>2]=i}else for(var a=0;a<i.length;a++)switch(n){case 0:HEAP32[r+4*a>>2]=i[a];break;case 2:HEAPF32[r+4*a>>2]=i[a]}}else GL.recordError(1281)}function _emscripten_glGetUniformfv(e,t,r){emscriptenWebGLGetUniform(e,t,r,2)}function _emscripten_glGetUniformiv(e,t,r){emscriptenWebGLGetUniform(e,t,r,0)}function _emscripten_glGetUniformuiv(e,t,r){emscriptenWebGLGetUniform(e,t,r,0)}function emscriptenWebGLGetVertexAttrib(e,t,r,n){if(r){var i=GLctx.getVertexAttrib(e,t);if(34975==t)HEAP32[r>>2]=i&&i.name;else if("number"==typeof i||"boolean"==typeof i)switch(n){case 0:HEAP32[r>>2]=i;break;case 2:HEAPF32[r>>2]=i;break;case 5:HEAP32[r>>2]=Math.fround(i)}else for(var a=0;a<i.length;a++)switch(n){case 0:HEAP32[r+4*a>>2]=i[a];break;case 2:HEAPF32[r+4*a>>2]=i[a];break;case 5:HEAP32[r+4*a>>2]=Math.fround(i[a])}}else GL.recordError(1281)}function _emscripten_glGetVertexAttribIiv(e,t,r){emscriptenWebGLGetVertexAttrib(e,t,r,0)}function _emscripten_glGetVertexAttribIuiv(e,t,r){emscriptenWebGLGetVertexAttrib(e,t,r,0)}function _emscripten_glGetVertexAttribPointerv(e,t,r){r?HEAP32[r>>2]=GLctx.getVertexAttribOffset(e,t):GL.recordError(1281)}function _emscripten_glGetVertexAttribfv(e,t,r){emscriptenWebGLGetVertexAttrib(e,t,r,2)}function _emscripten_glGetVertexAttribiv(e,t,r){emscriptenWebGLGetVertexAttrib(e,t,r,5)}function _emscripten_glHint(e,t){GLctx.hint(e,t)}function _emscripten_glInvalidateFramebuffer(e,t,r){for(var n=tempFixedLengthArray[t],i=0;i<t;i++)n[i]=HEAP32[r+4*i>>2];GLctx.invalidateFramebuffer(e,n)}function _emscripten_glInvalidateSubFramebuffer(e,t,r,n,i,a,o){for(var s=tempFixedLengthArray[t],c=0;c<t;c++)s[c]=HEAP32[r+4*c>>2];GLctx.invalidateSubFramebuffer(e,s,n,i,a,o)}function _emscripten_glIsBuffer(e){var t=GL.buffers[e];return t?GLctx.isBuffer(t):0}function _emscripten_glIsEnabled(e){return GLctx.isEnabled(e)}function _emscripten_glIsFramebuffer(e){var t=GL.framebuffers[e];return t?GLctx.isFramebuffer(t):0}function _emscripten_glIsProgram(e){return(e=GL.programs[e])?GLctx.isProgram(e):0}function _emscripten_glIsQuery(e){var t=GL.queries[e];return t?GLctx.isQuery(t):0}function _emscripten_glIsQueryEXT(e){var t=GL.queries[e];return t?GLctx.disjointTimerQueryExt.isQueryEXT(t):0}function _emscripten_glIsRenderbuffer(e){var t=GL.renderbuffers[e];return t?GLctx.isRenderbuffer(t):0}function _emscripten_glIsSampler(e){var t=GL.samplers[e];return t?GLctx.isSampler(t):0}function _emscripten_glIsShader(e){var t=GL.shaders[e];return t?GLctx.isShader(t):0}function _emscripten_glIsSync(e){return GLctx.isSync(GL.syncs[e])}function _emscripten_glIsTexture(e){var t=GL.textures[e];return t?GLctx.isTexture(t):0}function _emscripten_glIsTransformFeedback(e){return GLctx.isTransformFeedback(GL.transformFeedbacks[e])}function _emscripten_glIsVertexArray(e){var t=GL.vaos[e];return t?GLctx.isVertexArray(t):0}function _emscripten_glIsVertexArrayOES(e){var t=GL.vaos[e];return t?GLctx.isVertexArray(t):0}function _emscripten_glLineWidth(e){GLctx.lineWidth(e)}function _emscripten_glLinkProgram(e){e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function _emscripten_glPauseTransformFeedback(){GLctx.pauseTransformFeedback()}function _emscripten_glPixelStorei(e,t){3317==e&&(GL.unpackAlignment=t),GLctx.pixelStorei(e,t)}function _emscripten_glPolygonOffset(e,t){GLctx.polygonOffset(e,t)}function _emscripten_glProgramBinary(e,t,r,n){GL.recordError(1280)}function _emscripten_glProgramParameteri(e,t,r){GL.recordError(1280)}function _emscripten_glQueryCounterEXT(e,t){GLctx.disjointTimerQueryExt.queryCounterEXT(GL.queries[e],t)}function _emscripten_glReadBuffer(e){GLctx.readBuffer(e)}function computeUnpackAlignedImageSize(e,t,r,n){var i=function(e,t){return e+t-1&-t}(e*r,n);return t*i}function __colorChannelsInGlTextureFormat(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function heapObjectForWebGLType(e){return 0==(e-=5120)?HEAP8:1==e?HEAPU8:2==e?HEAP16:4==e?HEAP32:6==e?HEAPF32:5==e||28922==e||28520==e||30779==e||30782==e?HEAPU32:HEAPU16}function heapAccessShiftForWebGLHeap(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(e,t,r,n,i,a){var o=heapObjectForWebGLType(e),s=heapAccessShiftForWebGLHeap(o),c=1<<s,l=computeUnpackAlignedImageSize(r,n,__colorChannelsInGlTextureFormat(t)*c,GL.unpackAlignment);return o.subarray(i>>s,i+l>>s)}function _emscripten_glReadPixels(e,t,r,n,i,a,o){if(GL.currentContext.version>=2)if(GLctx.currentPixelPackBufferBinding)GLctx.readPixels(e,t,r,n,i,a,o);else{var s=heapObjectForWebGLType(a);GLctx.readPixels(e,t,r,n,i,a,s,o>>heapAccessShiftForWebGLHeap(s))}else{var c=emscriptenWebGLGetTexPixelData(a,i,r,n,o);c?GLctx.readPixels(e,t,r,n,i,a,c):GL.recordError(1280)}}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(e,t,r,n){GLctx.renderbufferStorage(e,t,r,n)}function _emscripten_glRenderbufferStorageMultisample(e,t,r,n,i){GLctx.renderbufferStorageMultisample(e,t,r,n,i)}function _emscripten_glResumeTransformFeedback(){GLctx.resumeTransformFeedback()}function _emscripten_glSampleCoverage(e,t){GLctx.sampleCoverage(e,!!t)}function _emscripten_glSamplerParameterf(e,t,r){GLctx.samplerParameterf(GL.samplers[e],t,r)}function _emscripten_glSamplerParameterfv(e,t,r){var n=HEAPF32[r>>2];GLctx.samplerParameterf(GL.samplers[e],t,n)}function _emscripten_glSamplerParameteri(e,t,r){GLctx.samplerParameteri(GL.samplers[e],t,r)}function _emscripten_glSamplerParameteriv(e,t,r){var n=HEAP32[r>>2];GLctx.samplerParameteri(GL.samplers[e],t,n)}function _emscripten_glScissor(e,t,r,n){GLctx.scissor(e,t,r,n)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(e,t,r,n){var i=GL.getSource(e,t,r,n);GLctx.shaderSource(GL.shaders[e],i)}function _emscripten_glStencilFunc(e,t,r){GLctx.stencilFunc(e,t,r)}function _emscripten_glStencilFuncSeparate(e,t,r,n){GLctx.stencilFuncSeparate(e,t,r,n)}function _emscripten_glStencilMask(e){GLctx.stencilMask(e)}function _emscripten_glStencilMaskSeparate(e,t){GLctx.stencilMaskSeparate(e,t)}function _emscripten_glStencilOp(e,t,r){GLctx.stencilOp(e,t,r)}function _emscripten_glStencilOpSeparate(e,t,r,n){GLctx.stencilOpSeparate(e,t,r,n)}function _emscripten_glTexImage2D(e,t,r,n,i,a,o,s,c){if(GL.currentContext.version>=2)if(GLctx.currentPixelUnpackBufferBinding)GLctx.texImage2D(e,t,r,n,i,a,o,s,c);else if(c){var l=heapObjectForWebGLType(s);GLctx.texImage2D(e,t,r,n,i,a,o,s,l,c>>heapAccessShiftForWebGLHeap(l))}else GLctx.texImage2D(e,t,r,n,i,a,o,s,null);else GLctx.texImage2D(e,t,r,n,i,a,o,s,c?emscriptenWebGLGetTexPixelData(s,o,n,i,c):null)}function _emscripten_glTexImage3D(e,t,r,n,i,a,o,s,c,l){if(GLctx.currentPixelUnpackBufferBinding)GLctx.texImage3D(e,t,r,n,i,a,o,s,c,l);else if(l){var u=heapObjectForWebGLType(c);GLctx.texImage3D(e,t,r,n,i,a,o,s,c,u,l>>heapAccessShiftForWebGLHeap(u))}else GLctx.texImage3D(e,t,r,n,i,a,o,s,c,null)}function _emscripten_glTexParameterf(e,t,r){GLctx.texParameterf(e,t,r)}function _emscripten_glTexParameterfv(e,t,r){var n=HEAPF32[r>>2];GLctx.texParameterf(e,t,n)}function _emscripten_glTexParameteri(e,t,r){GLctx.texParameteri(e,t,r)}function _emscripten_glTexParameteriv(e,t,r){var n=HEAP32[r>>2];GLctx.texParameteri(e,t,n)}function _emscripten_glTexStorage2D(e,t,r,n,i){GLctx.texStorage2D(e,t,r,n,i)}function _emscripten_glTexStorage3D(e,t,r,n,i,a){GLctx.texStorage3D(e,t,r,n,i,a)}function _emscripten_glTexSubImage2D(e,t,r,n,i,a,o,s,c){if(GL.currentContext.version>=2)if(GLctx.currentPixelUnpackBufferBinding)GLctx.texSubImage2D(e,t,r,n,i,a,o,s,c);else if(c){var l=heapObjectForWebGLType(s);GLctx.texSubImage2D(e,t,r,n,i,a,o,s,l,c>>heapAccessShiftForWebGLHeap(l))}else GLctx.texSubImage2D(e,t,r,n,i,a,o,s,null);else{var u=null;c&&(u=emscriptenWebGLGetTexPixelData(s,o,i,a,c)),GLctx.texSubImage2D(e,t,r,n,i,a,o,s,u)}}function _emscripten_glTexSubImage3D(e,t,r,n,i,a,o,s,c,l,u){if(GLctx.currentPixelUnpackBufferBinding)GLctx.texSubImage3D(e,t,r,n,i,a,o,s,c,l,u);else if(u){var d=heapObjectForWebGLType(l);GLctx.texSubImage3D(e,t,r,n,i,a,o,s,c,l,d,u>>heapAccessShiftForWebGLHeap(d))}else GLctx.texSubImage3D(e,t,r,n,i,a,o,s,c,l,null)}function _emscripten_glTransformFeedbackVaryings(e,t,r,n){e=GL.programs[e];for(var i=[],a=0;a<t;a++)i.push(UTF8ToString(HEAP32[r+4*a>>2]));GLctx.transformFeedbackVaryings(e,i,n)}function _emscripten_glUniform1f(e,t){GLctx.uniform1f(webglGetUniformLocation(e),t)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform1fv(webglGetUniformLocation(e),HEAPF32,r>>2,t);else{if(t<=288)for(var n=miniTempWebGLFloatBuffers[t-1],i=0;i<t;++i)n[i]=HEAPF32[r+4*i>>2];else n=HEAPF32.subarray(r>>2,r+4*t>>2);GLctx.uniform1fv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform1i(e,t){GLctx.uniform1i(webglGetUniformLocation(e),t)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform1iv(webglGetUniformLocation(e),HEAP32,r>>2,t);else{if(t<=288)for(var n=__miniTempWebGLIntBuffers[t-1],i=0;i<t;++i)n[i]=HEAP32[r+4*i>>2];else n=HEAP32.subarray(r>>2,r+4*t>>2);GLctx.uniform1iv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform1ui(e,t){GLctx.uniform1ui(webglGetUniformLocation(e),t)}function _emscripten_glUniform1uiv(e,t,r){t&&GLctx.uniform1uiv(webglGetUniformLocation(e),HEAPU32,r>>2,t)}function _emscripten_glUniform2f(e,t,r){GLctx.uniform2f(webglGetUniformLocation(e),t,r)}function _emscripten_glUniform2fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform2fv(webglGetUniformLocation(e),HEAPF32,r>>2,2*t);else{if(t<=144)for(var n=miniTempWebGLFloatBuffers[2*t-1],i=0;i<2*t;i+=2)n[i]=HEAPF32[r+4*i>>2],n[i+1]=HEAPF32[r+(4*i+4)>>2];else n=HEAPF32.subarray(r>>2,r+8*t>>2);GLctx.uniform2fv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform2i(e,t,r){GLctx.uniform2i(webglGetUniformLocation(e),t,r)}function _emscripten_glUniform2iv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform2iv(webglGetUniformLocation(e),HEAP32,r>>2,2*t);else{if(t<=144)for(var n=__miniTempWebGLIntBuffers[2*t-1],i=0;i<2*t;i+=2)n[i]=HEAP32[r+4*i>>2],n[i+1]=HEAP32[r+(4*i+4)>>2];else n=HEAP32.subarray(r>>2,r+8*t>>2);GLctx.uniform2iv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform2ui(e,t,r){GLctx.uniform2ui(webglGetUniformLocation(e),t,r)}function _emscripten_glUniform2uiv(e,t,r){t&&GLctx.uniform2uiv(webglGetUniformLocation(e),HEAPU32,r>>2,2*t)}function _emscripten_glUniform3f(e,t,r,n){GLctx.uniform3f(webglGetUniformLocation(e),t,r,n)}function _emscripten_glUniform3fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform3fv(webglGetUniformLocation(e),HEAPF32,r>>2,3*t);else{if(t<=96)for(var n=miniTempWebGLFloatBuffers[3*t-1],i=0;i<3*t;i+=3)n[i]=HEAPF32[r+4*i>>2],n[i+1]=HEAPF32[r+(4*i+4)>>2],n[i+2]=HEAPF32[r+(4*i+8)>>2];else n=HEAPF32.subarray(r>>2,r+12*t>>2);GLctx.uniform3fv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform3i(e,t,r,n){GLctx.uniform3i(webglGetUniformLocation(e),t,r,n)}function _emscripten_glUniform3iv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform3iv(webglGetUniformLocation(e),HEAP32,r>>2,3*t);else{if(t<=96)for(var n=__miniTempWebGLIntBuffers[3*t-1],i=0;i<3*t;i+=3)n[i]=HEAP32[r+4*i>>2],n[i+1]=HEAP32[r+(4*i+4)>>2],n[i+2]=HEAP32[r+(4*i+8)>>2];else n=HEAP32.subarray(r>>2,r+12*t>>2);GLctx.uniform3iv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform3ui(e,t,r,n){GLctx.uniform3ui(webglGetUniformLocation(e),t,r,n)}function _emscripten_glUniform3uiv(e,t,r){t&&GLctx.uniform3uiv(webglGetUniformLocation(e),HEAPU32,r>>2,3*t)}function _emscripten_glUniform4f(e,t,r,n,i){GLctx.uniform4f(webglGetUniformLocation(e),t,r,n,i)}function _emscripten_glUniform4fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform4fv(webglGetUniformLocation(e),HEAPF32,r>>2,4*t);else{if(t<=72){var n=miniTempWebGLFloatBuffers[4*t-1],i=HEAPF32;r>>=2;for(var a=0;a<4*t;a+=4){var o=r+a;n[a]=i[o],n[a+1]=i[o+1],n[a+2]=i[o+2],n[a+3]=i[o+3]}}else n=HEAPF32.subarray(r>>2,r+16*t>>2);GLctx.uniform4fv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform4i(e,t,r,n,i){GLctx.uniform4i(webglGetUniformLocation(e),t,r,n,i)}function _emscripten_glUniform4iv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform4iv(webglGetUniformLocation(e),HEAP32,r>>2,4*t);else{if(t<=72)for(var n=__miniTempWebGLIntBuffers[4*t-1],i=0;i<4*t;i+=4)n[i]=HEAP32[r+4*i>>2],n[i+1]=HEAP32[r+(4*i+4)>>2],n[i+2]=HEAP32[r+(4*i+8)>>2],n[i+3]=HEAP32[r+(4*i+12)>>2];else n=HEAP32.subarray(r>>2,r+16*t>>2);GLctx.uniform4iv(webglGetUniformLocation(e),n)}}function _emscripten_glUniform4ui(e,t,r,n,i){GLctx.uniform4ui(webglGetUniformLocation(e),t,r,n,i)}function _emscripten_glUniform4uiv(e,t,r){t&&GLctx.uniform4uiv(webglGetUniformLocation(e),HEAPU32,r>>2,4*t)}function _emscripten_glUniformBlockBinding(e,t,r){e=GL.programs[e],GLctx.uniformBlockBinding(e,t,r)}function _emscripten_glUniformMatrix2fv(e,t,r,n){if(GL.currentContext.version>=2)t&&GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,4*t);else{if(t<=72)for(var i=miniTempWebGLFloatBuffers[4*t-1],a=0;a<4*t;a+=4)i[a]=HEAPF32[n+4*a>>2],i[a+1]=HEAPF32[n+(4*a+4)>>2],i[a+2]=HEAPF32[n+(4*a+8)>>2],i[a+3]=HEAPF32[n+(4*a+12)>>2];else i=HEAPF32.subarray(n>>2,n+16*t>>2);GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!r,i)}}function _emscripten_glUniformMatrix2x3fv(e,t,r,n){t&&GLctx.uniformMatrix2x3fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,6*t)}function _emscripten_glUniformMatrix2x4fv(e,t,r,n){t&&GLctx.uniformMatrix2x4fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,8*t)}function _emscripten_glUniformMatrix3fv(e,t,r,n){if(GL.currentContext.version>=2)t&&GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,9*t);else{if(t<=32)for(var i=miniTempWebGLFloatBuffers[9*t-1],a=0;a<9*t;a+=9)i[a]=HEAPF32[n+4*a>>2],i[a+1]=HEAPF32[n+(4*a+4)>>2],i[a+2]=HEAPF32[n+(4*a+8)>>2],i[a+3]=HEAPF32[n+(4*a+12)>>2],i[a+4]=HEAPF32[n+(4*a+16)>>2],i[a+5]=HEAPF32[n+(4*a+20)>>2],i[a+6]=HEAPF32[n+(4*a+24)>>2],i[a+7]=HEAPF32[n+(4*a+28)>>2],i[a+8]=HEAPF32[n+(4*a+32)>>2];else i=HEAPF32.subarray(n>>2,n+36*t>>2);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,i)}}function _emscripten_glUniformMatrix3x2fv(e,t,r,n){t&&GLctx.uniformMatrix3x2fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,6*t)}function _emscripten_glUniformMatrix3x4fv(e,t,r,n){t&&GLctx.uniformMatrix3x4fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,12*t)}function _emscripten_glUniformMatrix4fv(e,t,r,n){if(GL.currentContext.version>=2)t&&GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,16*t);else{if(t<=18){var i=miniTempWebGLFloatBuffers[16*t-1],a=HEAPF32;n>>=2;for(var o=0;o<16*t;o+=16){var s=n+o;i[o]=a[s],i[o+1]=a[s+1],i[o+2]=a[s+2],i[o+3]=a[s+3],i[o+4]=a[s+4],i[o+5]=a[s+5],i[o+6]=a[s+6],i[o+7]=a[s+7],i[o+8]=a[s+8],i[o+9]=a[s+9],i[o+10]=a[s+10],i[o+11]=a[s+11],i[o+12]=a[s+12],i[o+13]=a[s+13],i[o+14]=a[s+14],i[o+15]=a[s+15]}}else i=HEAPF32.subarray(n>>2,n+64*t>>2);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,i)}}function _emscripten_glUniformMatrix4x2fv(e,t,r,n){t&&GLctx.uniformMatrix4x2fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,8*t)}function _emscripten_glUniformMatrix4x3fv(e,t,r,n){t&&GLctx.uniformMatrix4x3fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,12*t)}function _emscripten_glUseProgram(e){e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e}function _emscripten_glValidateProgram(e){GLctx.validateProgram(GL.programs[e])}function _emscripten_glVertexAttrib1f(e,t){GLctx.vertexAttrib1f(e,t)}function _emscripten_glVertexAttrib1fv(e,t){GLctx.vertexAttrib1f(e,HEAPF32[t>>2])}function _emscripten_glVertexAttrib2f(e,t,r){GLctx.vertexAttrib2f(e,t,r)}function _emscripten_glVertexAttrib2fv(e,t){GLctx.vertexAttrib2f(e,HEAPF32[t>>2],HEAPF32[t+4>>2])}function _emscripten_glVertexAttrib3f(e,t,r,n){GLctx.vertexAttrib3f(e,t,r,n)}function _emscripten_glVertexAttrib3fv(e,t){GLctx.vertexAttrib3f(e,HEAPF32[t>>2],HEAPF32[t+4>>2],HEAPF32[t+8>>2])}function _emscripten_glVertexAttrib4f(e,t,r,n,i){GLctx.vertexAttrib4f(e,t,r,n,i)}function _emscripten_glVertexAttrib4fv(e,t){GLctx.vertexAttrib4f(e,HEAPF32[t>>2],HEAPF32[t+4>>2],HEAPF32[t+8>>2],HEAPF32[t+12>>2])}function _emscripten_glVertexAttribDivisor(e,t){GLctx.vertexAttribDivisor(e,t)}function _emscripten_glVertexAttribDivisorANGLE(e,t){GLctx.vertexAttribDivisor(e,t)}function _emscripten_glVertexAttribDivisorARB(e,t){GLctx.vertexAttribDivisor(e,t)}function _emscripten_glVertexAttribDivisorEXT(e,t){GLctx.vertexAttribDivisor(e,t)}function _emscripten_glVertexAttribDivisorNV(e,t){GLctx.vertexAttribDivisor(e,t)}function _emscripten_glVertexAttribI4i(e,t,r,n,i){GLctx.vertexAttribI4i(e,t,r,n,i)}function _emscripten_glVertexAttribI4iv(e,t){GLctx.vertexAttribI4i(e,HEAP32[t>>2],HEAP32[t+4>>2],HEAP32[t+8>>2],HEAP32[t+12>>2])}function _emscripten_glVertexAttribI4ui(e,t,r,n,i){GLctx.vertexAttribI4ui(e,t,r,n,i)}function _emscripten_glVertexAttribI4uiv(e,t){GLctx.vertexAttribI4ui(e,HEAPU32[t>>2],HEAPU32[t+4>>2],HEAPU32[t+8>>2],HEAPU32[t+12>>2])}function _emscripten_glVertexAttribIPointer(e,t,r,n,i){GLctx.vertexAttribIPointer(e,t,r,n,i)}function _emscripten_glVertexAttribPointer(e,t,r,n,i,a){GLctx.vertexAttribPointer(e,t,r,!!n,i,a)}function _emscripten_glViewport(e,t,r,n){GLctx.viewport(e,t,r,n)}function _emscripten_glWaitSync(e,t,r,n){GLctx.waitSync(GL.syncs[e],t,convertI32PairToI53(r,n))}function _emscripten_has_asyncify(){return 0}function _emscripten_memcpy_big(e,t,r){HEAPU8.copyWithin(e,t,t+r)}function doRequestFullscreen(e,t){return JSEvents.fullscreenEnabled()?(e=findEventTarget(e))?e.requestFullscreen||e.webkitRequestFullscreen?JSEvents.canPerformEventHandlerRequests()?JSEvents_requestFullscreen(e,t):t.deferUntilInEventHandler?(JSEvents.deferCall(JSEvents_requestFullscreen,1,[e,t]),1):-2:-3:-4:-1}function _emscripten_request_fullscreen_strategy(e,t,r){return doRequestFullscreen(e,{scaleMode:HEAP32[r>>2],canvasResolutionScaleMode:HEAP32[r+4>>2],filteringMode:HEAP32[r+8>>2],deferUntilInEventHandler:t,canvasResizedCallback:HEAP32[r+12>>2],canvasResizedCallbackUserData:HEAP32[r+16>>2]})}function _emscripten_request_pointerlock(e,t){return(e=findEventTarget(e))?e.requestPointerLock?JSEvents.canPerformEventHandlerRequests()?requestPointerLock(e):t?(JSEvents.deferCall(requestPointerLock,2,[e]),1):-2:-1:-4}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(e){var t=wasmMemory.buffer;try{return wasmMemory.grow(e-t.byteLength+65535>>>16),updateMemoryViews(),1}catch(e){}}function _emscripten_resize_heap(e){var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;let n=(e,t)=>e+(t-e%t)%t;for(var i=1;i<=4;i*=2){var a=t*(1+.2/i);if(a=Math.min(a,e+100663296),emscripten_realloc_buffer(Math.min(r,n(Math.max(e,a),65536))))return!0}return!1}function _emscripten_run_script_string(ptr){var s=eval(UTF8ToString(ptr));if(null==s)return 0;s+="";var me=_emscripten_run_script_string,len=lengthBytesUTF8(s);return(!me.bufferSize||me.bufferSize<len+1)&&(me.bufferSize&&_free(me.buffer),me.bufferSize=len+1,me.buffer=_malloc(me.bufferSize)),stringToUTF8(s,me.buffer,me.bufferSize),me.buffer}function _emscripten_sample_gamepad_data(){return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function registerBeforeUnloadEventCallback(e,t,r,n,i,a){var o={target:findEventTarget(e),eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=getWasmTableEntry(n)(i,0,t);if(a&&(a=UTF8ToString(a)),a)return r.preventDefault(),r.returnValue=a,a},useCapture:r};JSEvents.registerOrRemoveHandler(o)}function _emscripten_set_beforeunload_callback_on_thread(e,t,r){return"undefined"==typeof onbeforeunload?-1:1!==r?-5:(registerBeforeUnloadEventCallback(2,e,!0,t,28,"beforeunload"),0)}function registerFocusEventCallback(e,t,r,n,i,a,o){JSEvents.focusEvent||(JSEvents.focusEvent=_malloc(256));var s={target:findEventTarget(e),eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=JSEvents.getNodeNameForTarget(r.target),o=r.target.id?r.target.id:"",s=JSEvents.focusEvent;stringToUTF8(a,s+0,128),stringToUTF8(o,s+128,128),getWasmTableEntry(n)(i,s,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_blur_callback_on_thread(e,t,r,n,i){return registerFocusEventCallback(e,t,r,n,12,"blur"),0}function _emscripten_set_element_css_size(e,t,r){return(e=findEventTarget(e))?(e.style.width=t+"px",e.style.height=r+"px",0):-4}function _emscripten_set_focus_callback_on_thread(e,t,r,n,i){return registerFocusEventCallback(e,t,r,n,13,"focus"),0}function fillFullscreenChangeEventData(e){var t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,r=!!t;HEAP32[e>>2]=r,HEAP32[e+4>>2]=JSEvents.fullscreenEnabled();var n=r?t:JSEvents.previousFullscreenElement,i=JSEvents.getNodeNameForTarget(n),a=n&&n.id?n.id:"";stringToUTF8(i,e+8,128),stringToUTF8(a,e+136,128),HEAP32[e+264>>2]=n?n.clientWidth:0,HEAP32[e+268>>2]=n?n.clientHeight:0,HEAP32[e+272>>2]=screen.width,HEAP32[e+276>>2]=screen.height,r&&(JSEvents.previousFullscreenElement=t)}function registerFullscreenChangeEventCallback(e,t,r,n,i,a,o){JSEvents.fullscreenChangeEvent||(JSEvents.fullscreenChangeEvent=_malloc(280));var s={target:e,eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(a),getWasmTableEntry(n)(i,a,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_fullscreenchange_callback_on_thread(e,t,r,n,i){return JSEvents.fullscreenEnabled()?(e=findEventTarget(e))?(registerFullscreenChangeEventCallback(e,t,r,n,19,"fullscreenchange"),registerFullscreenChangeEventCallback(e,t,r,n,19,"webkitfullscreenchange"),0):-4:-1}function registerGamepadEventCallback(e,t,r,n,i,a,o){JSEvents.gamepadEvent||(JSEvents.gamepadEvent=_malloc(1432));var s={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=JSEvents.gamepadEvent;fillGamepadEventData(a,r.gamepad),getWasmTableEntry(n)(i,a,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_gamepadconnected_callback_on_thread(e,t,r,n){return navigator.getGamepads||navigator.webkitGetGamepads?(registerGamepadEventCallback(2,e,t,r,26,"gamepadconnected"),0):-1}function _emscripten_set_gamepaddisconnected_callback_on_thread(e,t,r,n){return navigator.getGamepads||navigator.webkitGetGamepads?(registerGamepadEventCallback(2,e,t,r,27,"gamepaddisconnected"),0):-1}function registerKeyEventCallback(e,t,r,n,i,a,o){JSEvents.keyEvent||(JSEvents.keyEvent=_malloc(176));var s={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=JSEvents.keyEvent;HEAPF64[r>>3]=e.timeStamp;var a=r>>2;HEAP32[a+2]=e.location,HEAP32[a+3]=e.ctrlKey,HEAP32[a+4]=e.shiftKey,HEAP32[a+5]=e.altKey,HEAP32[a+6]=e.metaKey,HEAP32[a+7]=e.repeat,HEAP32[a+8]=e.charCode,HEAP32[a+9]=e.keyCode,HEAP32[a+10]=e.which,stringToUTF8(e.key||"",r+44,32),stringToUTF8(e.code||"",r+76,32),stringToUTF8(e.char||"",r+108,32),stringToUTF8(e.locale||"",r+140,32),getWasmTableEntry(n)(i,r,t)&&e.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_keydown_callback_on_thread(e,t,r,n,i){return registerKeyEventCallback(e,t,r,n,2,"keydown"),0}function _emscripten_set_keypress_callback_on_thread(e,t,r,n,i){return registerKeyEventCallback(e,t,r,n,1,"keypress"),0}function _emscripten_set_keyup_callback_on_thread(e,t,r,n,i){return registerKeyEventCallback(e,t,r,n,3,"keyup"),0}function _emscripten_set_main_loop(e,t,r){setMainLoop(getWasmTableEntry(e),t,r)}function fillMouseEventData(e,t,r){HEAPF64[e>>3]=t.timeStamp;var n=e>>2;HEAP32[n+2]=t.screenX,HEAP32[n+3]=t.screenY,HEAP32[n+4]=t.clientX,HEAP32[n+5]=t.clientY,HEAP32[n+6]=t.ctrlKey,HEAP32[n+7]=t.shiftKey,HEAP32[n+8]=t.altKey,HEAP32[n+9]=t.metaKey,HEAP16[2*n+20]=t.button,HEAP16[2*n+21]=t.buttons,HEAP32[n+11]=t.movementX,HEAP32[n+12]=t.movementY;var i=getBoundingClientRect(r);HEAP32[n+13]=t.clientX-i.left,HEAP32[n+14]=t.clientY-i.top}function registerMouseEventCallback(e,t,r,n,i,a,o){JSEvents.mouseEvent||(JSEvents.mouseEvent=_malloc(72));var s={target:e=findEventTarget(e),allowsDeferredCalls:"mousemove"!=a&&"mouseenter"!=a&&"mouseleave"!=a,eventTypeString:a,callbackfunc:n,handlerFunc:function(r){var a=r||event;fillMouseEventData(JSEvents.mouseEvent,a,e),getWasmTableEntry(n)(i,JSEvents.mouseEvent,t)&&a.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_mousedown_callback_on_thread(e,t,r,n,i){return registerMouseEventCallback(e,t,r,n,5,"mousedown"),0}function _emscripten_set_mouseenter_callback_on_thread(e,t,r,n,i){return registerMouseEventCallback(e,t,r,n,33,"mouseenter"),0}function _emscripten_set_mouseleave_callback_on_thread(e,t,r,n,i){return registerMouseEventCallback(e,t,r,n,34,"mouseleave"),0}function _emscripten_set_mousemove_callback_on_thread(e,t,r,n,i){return registerMouseEventCallback(e,t,r,n,8,"mousemove"),0}function _emscripten_set_mouseup_callback_on_thread(e,t,r,n,i){return registerMouseEventCallback(e,t,r,n,6,"mouseup"),0}function fillPointerlockChangeEventData(e){var t=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement,r=!!t;HEAP32[e>>2]=r;var n=JSEvents.getNodeNameForTarget(t),i=t&&t.id?t.id:"";stringToUTF8(n,e+4,128),stringToUTF8(i,e+132,128)}function registerPointerlockChangeEventCallback(e,t,r,n,i,a,o){JSEvents.pointerlockChangeEvent||(JSEvents.pointerlockChangeEvent=_malloc(260));var s={target:e,eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(a),getWasmTableEntry(n)(i,a,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_pointerlockchange_callback_on_thread(e,t,r,n,i){return document&&document.body&&(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock)?(e=findEventTarget(e))?(registerPointerlockChangeEventCallback(e,t,r,n,20,"pointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"mozpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"webkitpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"mspointerlockchange"),0):-4:-1}function registerUiEventCallback(e,t,r,n,i,a,o){JSEvents.uiEvent||(JSEvents.uiEvent=_malloc(36));var s={target:e=findEventTarget(e),eventTypeString:a,callbackfunc:n,handlerFunc:function(r){var a=r||event;if(a.target==e){var o=document.body;if(o){var s=JSEvents.uiEvent;HEAP32[s>>2]=a.detail,HEAP32[s+4>>2]=o.clientWidth,HEAP32[s+8>>2]=o.clientHeight,HEAP32[s+12>>2]=innerWidth,HEAP32[s+16>>2]=innerHeight,HEAP32[s+20>>2]=outerWidth,HEAP32[s+24>>2]=outerHeight,HEAP32[s+28>>2]=pageXOffset,HEAP32[s+32>>2]=pageYOffset,getWasmTableEntry(n)(i,s,t)&&a.preventDefault()}}},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_resize_callback_on_thread(e,t,r,n,i){return registerUiEventCallback(e,t,r,n,10,"resize"),0}function registerTouchEventCallback(e,t,r,n,i,a,o){JSEvents.touchEvent||(JSEvents.touchEvent=_malloc(1696));var s={target:e=findEventTarget(e),allowsDeferredCalls:"touchstart"==a||"touchend"==a,eventTypeString:a,callbackfunc:n,handlerFunc:function(r){for(var a,o={},s=r.touches,c=0;c<s.length;++c)(a=s[c]).isChanged=a.onTarget=0,o[a.identifier]=a;for(c=0;c<r.changedTouches.length;++c)(a=r.changedTouches[c]).isChanged=1,o[a.identifier]=a;for(c=0;c<r.targetTouches.length;++c)o[r.targetTouches[c].identifier].onTarget=1;var l=JSEvents.touchEvent;HEAPF64[l>>3]=r.timeStamp;var u=l>>2;HEAP32[u+3]=r.ctrlKey,HEAP32[u+4]=r.shiftKey,HEAP32[u+5]=r.altKey,HEAP32[u+6]=r.metaKey,u+=7;var d=getBoundingClientRect(e),f=0;for(var c in o)if(a=o[c],HEAP32[u+0]=a.identifier,HEAP32[u+1]=a.screenX,HEAP32[u+2]=a.screenY,HEAP32[u+3]=a.clientX,HEAP32[u+4]=a.clientY,HEAP32[u+5]=a.pageX,HEAP32[u+6]=a.pageY,HEAP32[u+7]=a.isChanged,HEAP32[u+8]=a.onTarget,HEAP32[u+9]=a.clientX-d.left,HEAP32[u+10]=a.clientY-d.top,u+=13,++f>31)break;HEAP32[l+8>>2]=f,getWasmTableEntry(n)(i,l,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_touchcancel_callback_on_thread(e,t,r,n,i){return registerTouchEventCallback(e,t,r,n,25,"touchcancel"),0}function _emscripten_set_touchend_callback_on_thread(e,t,r,n,i){return registerTouchEventCallback(e,t,r,n,23,"touchend"),0}function _emscripten_set_touchmove_callback_on_thread(e,t,r,n,i){return registerTouchEventCallback(e,t,r,n,24,"touchmove"),0}function _emscripten_set_touchstart_callback_on_thread(e,t,r,n,i){return registerTouchEventCallback(e,t,r,n,22,"touchstart"),0}function fillVisibilityChangeEventData(e){var t=["hidden","visible","prerender","unloaded"].indexOf(document.visibilityState);HEAP32[e>>2]=document.hidden,HEAP32[e+4>>2]=t}function registerVisibilityChangeEventCallback(e,t,r,n,i,a,o){JSEvents.visibilityChangeEvent||(JSEvents.visibilityChangeEvent=_malloc(8));var s={target:e,eventTypeString:a,callbackfunc:n,handlerFunc:function(e){var r=e||event,a=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(a),getWasmTableEntry(n)(i,a,t)&&r.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_visibilitychange_callback_on_thread(e,t,r,n){return registerVisibilityChangeEventCallback(specialHTMLTargets[1],e,t,r,21,"visibilitychange"),0}function registerWheelEventCallback(e,t,r,n,i,a,o){JSEvents.wheelEvent||(JSEvents.wheelEvent=_malloc(104));var s={target:e,allowsDeferredCalls:!0,eventTypeString:a,callbackfunc:n,handlerFunc:function(r){var a=r||event,o=JSEvents.wheelEvent;fillMouseEventData(o,a,e),HEAPF64[o+72>>3]=a.deltaX,HEAPF64[o+80>>3]=a.deltaY,HEAPF64[o+88>>3]=a.deltaZ,HEAP32[o+96>>2]=a.deltaMode,getWasmTableEntry(n)(i,o,t)&&a.preventDefault()},useCapture:r};JSEvents.registerOrRemoveHandler(s)}function _emscripten_set_wheel_callback_on_thread(e,t,r,n,i){return void 0!==(e=findEventTarget(e)).onwheel?(registerWheelEventCallback(e,t,r,n,9,"wheel"),0):-1}function _emscripten_set_window_title(e){setWindowTitle(UTF8ToString(e))}function _emscripten_sleep(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:getExecutableName()};for(var t in ENV)void 0===ENV[t]?delete e[t]:e[t]=ENV[t];var r=[];for(var t in e)r.push(t+"="+e[t]);getEnvStrings.strings=r}return getEnvStrings.strings}function writeAsciiToMemory(e,t,r){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);r||(HEAP8[t>>0]=0)}function _environ_get(e,t){var r=0;return getEnvStrings().forEach((function(n,i){var a=t+r;HEAPU32[e+4*i>>2]=a,writeAsciiToMemory(n,a),r+=n.length+1})),0}function _environ_sizes_get(e,t){var r=getEnvStrings();HEAPU32[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),HEAPU32[t>>2]=n,0}function _fd_close(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doReadv(e,t,r,n){for(var i=0,a=0;a<r;a++){var o=HEAPU32[t>>2],s=HEAPU32[t+4>>2];t+=8;var c=FS.read(e,HEAP8,o,s,n);if(c<0)return-1;if(i+=c,c<s)break;void 0!==n&&(n+=c)}return i}function _fd_read(e,t,r,n){try{var i=doReadv(SYSCALLS.getStreamFromFD(e),t,r);return HEAPU32[n>>2]=i,0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function convertI32PairToI53Checked(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function _fd_seek(e,t,r,n,i){try{var a=convertI32PairToI53Checked(t,r);if(isNaN(a))return 61;var o=SYSCALLS.getStreamFromFD(e);return FS.llseek(o,a,n),tempI64=[o.position>>>0,(tempDouble=o.position,+Math.abs(tempDouble)>=1?tempDouble>0?(0|Math.min(+Math.floor(tempDouble/4294967296),4294967295))>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1],o.getdents&&0===a&&0===n&&(o.getdents=null),0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doWritev(e,t,r,n){for(var i=0,a=0;a<r;a++){var o=HEAPU32[t>>2],s=HEAPU32[t+4>>2];t+=8;var c=FS.write(e,HEAP8,o,s,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i}function _fd_write(e,t,r,n){try{var i=doWritev(SYSCALLS.getStreamFromFD(e),t,r);return HEAPU32[n>>2]=i,0}catch(e){if(void 0===FS||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function _glActiveTexture(e){GLctx.activeTexture(e)}function _glAttachShader(e,t){GLctx.attachShader(GL.programs[e],GL.shaders[t])}function _glBindAttribLocation(e,t,r){GLctx.bindAttribLocation(GL.programs[e],t,UTF8ToString(r))}function _glBindBuffer(e,t){35051==e?GLctx.currentPixelPackBufferBinding=t:35052==e&&(GLctx.currentPixelUnpackBufferBinding=t),GLctx.bindBuffer(e,GL.buffers[t])}function _glBindFramebuffer(e,t){GLctx.bindFramebuffer(e,GL.framebuffers[t])}function _glBindRenderbuffer(e,t){GLctx.bindRenderbuffer(e,GL.renderbuffers[t])}function _glBindTexture(e,t){GLctx.bindTexture(e,GL.textures[t])}function _glBlendEquation(e){GLctx.blendEquation(e)}function _glBlendFunc(e,t){GLctx.blendFunc(e,t)}function _glBufferData(e,t,r,n){GL.currentContext.version>=2?r&&t?GLctx.bufferData(e,HEAPU8,n,r,t):GLctx.bufferData(e,t,n):GLctx.bufferData(e,r?HEAPU8.subarray(r,r+t):t,n)}function _glBufferSubData(e,t,r,n){GL.currentContext.version>=2?r&&GLctx.bufferSubData(e,t,HEAPU8,n,r):GLctx.bufferSubData(e,t,HEAPU8.subarray(n,n+r))}function _glCheckFramebufferStatus(e){return GLctx.checkFramebufferStatus(e)}function _glClear(e){GLctx.clear(e)}function _glClearColor(e,t,r,n){GLctx.clearColor(e,t,r,n)}function _glClearDepthf(e){GLctx.clearDepth(e)}function _glClearStencil(e){GLctx.clearStencil(e)}function _glCompileShader(e){GLctx.compileShader(GL.shaders[e])}function _glCreateProgram(){var e=GL.getNewId(GL.programs),t=GLctx.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,GL.programs[e]=t,e}function _glCreateShader(e){var t=GL.getNewId(GL.shaders);return GL.shaders[t]=GLctx.createShader(e),t}function _glCullFace(e){GLctx.cullFace(e)}function _glDeleteBuffers(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.buffers[n];i&&(GLctx.deleteBuffer(i),i.name=0,GL.buffers[n]=null,n==GLctx.currentPixelPackBufferBinding&&(GLctx.currentPixelPackBufferBinding=0),n==GLctx.currentPixelUnpackBufferBinding&&(GLctx.currentPixelUnpackBufferBinding=0))}}function _glDeleteFramebuffers(e,t){for(var r=0;r<e;++r){var n=HEAP32[t+4*r>>2],i=GL.framebuffers[n];i&&(GLctx.deleteFramebuffer(i),i.name=0,GL.framebuffers[n]=null)}}function _glDeleteProgram(e){if(e){var t=GL.programs[e];t?(GLctx.deleteProgram(t),t.name=0,GL.programs[e]=null):GL.recordError(1281)}}function _glDeleteRenderbuffers(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.renderbuffers[n];i&&(GLctx.deleteRenderbuffer(i),i.name=0,GL.renderbuffers[n]=null)}}function _glDeleteShader(e){if(e){var t=GL.shaders[e];t?(GLctx.deleteShader(t),GL.shaders[e]=null):GL.recordError(1281)}}function _glDeleteTextures(e,t){for(var r=0;r<e;r++){var n=HEAP32[t+4*r>>2],i=GL.textures[n];i&&(GLctx.deleteTexture(i),i.name=0,GL.textures[n]=null)}}function _glDepthMask(e){GLctx.depthMask(!!e)}function _glDisable(e){GLctx.disable(e)}function _glDisableVertexAttribArray(e){GLctx.disableVertexAttribArray(e)}function _glDrawArrays(e,t,r){GLctx.drawArrays(e,t,r)}function _glEnable(e){GLctx.enable(e)}function _glEnableVertexAttribArray(e){GLctx.enableVertexAttribArray(e)}function _glFramebufferRenderbuffer(e,t,r,n){GLctx.framebufferRenderbuffer(e,t,r,GL.renderbuffers[n])}function _glFramebufferTexture2D(e,t,r,n,i){GLctx.framebufferTexture2D(e,t,r,GL.textures[n],i)}function _glFrontFace(e){GLctx.frontFace(e)}function _glGenBuffers(e,t){__glGenObject(e,t,"createBuffer",GL.buffers)}function _glGenFramebuffers(e,t){__glGenObject(e,t,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(e,t){__glGenObject(e,t,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(e,t){__glGenObject(e,t,"createTexture",GL.textures)}function _glGenerateMipmap(e){GLctx.generateMipmap(e)}function _glGetActiveAttrib(e,t,r,n,i,a,o){__glGetActiveAttribOrUniform("getActiveAttrib",e,t,r,n,i,a,o)}function _glGetActiveUniform(e,t,r,n,i,a,o){__glGetActiveAttribOrUniform("getActiveUniform",e,t,r,n,i,a,o)}function _glGetBufferParameteriv(e,t,r){r?HEAP32[r>>2]=GLctx.getBufferParameter(e,t):GL.recordError(1281)}function _glGetIntegerv(e,t){emscriptenWebGLGet(e,t,0)}function _glGetProgramInfoLog(e,t,r,n){var i=GLctx.getProgramInfoLog(GL.programs[e]);null===i&&(i="(unknown error)");var a=t>0&&n?stringToUTF8(i,n,t):0;r&&(HEAP32[r>>2]=a)}function _glGetProgramiv(e,t,r){if(r)if(e>=GL.counter)GL.recordError(1281);else if(e=GL.programs[e],35716==t){var n=GLctx.getProgramInfoLog(e);null===n&&(n="(unknown error)"),HEAP32[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var i=0;i<GLctx.getProgramParameter(e,35718);++i)e.maxUniformLength=Math.max(e.maxUniformLength,GLctx.getActiveUniform(e,i).name.length+1);HEAP32[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(i=0;i<GLctx.getProgramParameter(e,35721);++i)e.maxAttributeLength=Math.max(e.maxAttributeLength,GLctx.getActiveAttrib(e,i).name.length+1);HEAP32[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(i=0;i<GLctx.getProgramParameter(e,35382);++i)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,GLctx.getActiveUniformBlockName(e,i).length+1);HEAP32[r>>2]=e.maxUniformBlockNameLength}else HEAP32[r>>2]=GLctx.getProgramParameter(e,t);else GL.recordError(1281)}function _glGetShaderInfoLog(e,t,r,n){var i=GLctx.getShaderInfoLog(GL.shaders[e]);null===i&&(i="(unknown error)");var a=t>0&&n?stringToUTF8(i,n,t):0;r&&(HEAP32[r>>2]=a)}function _glGetShaderiv(e,t,r){if(r)if(35716==t){var n=GLctx.getShaderInfoLog(GL.shaders[e]);null===n&&(n="(unknown error)");var i=n?n.length+1:0;HEAP32[r>>2]=i}else if(35720==t){var a=GLctx.getShaderSource(GL.shaders[e]),o=a?a.length+1:0;HEAP32[r>>2]=o}else HEAP32[r>>2]=GLctx.getShaderParameter(GL.shaders[e],t);else GL.recordError(1281)}function _glGetString(e){var t=GL.stringCache[e];if(!t){switch(e){case 7939:var r=GLctx.getSupportedExtensions()||[];r=r.concat(r.map((function(e){return"GL_"+e}))),t=stringToNewUTF8(r.join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=GLctx.getParameter(e);n||GL.recordError(1280),t=n&&stringToNewUTF8(n);break;case 7938:var i=GLctx.getParameter(7938);t=stringToNewUTF8(i=GL.currentContext.version>=2?"OpenGL ES 3.0 ("+i+")":"OpenGL ES 2.0 ("+i+")");break;case 35724:var a=GLctx.getParameter(35724),o=a.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==o&&(3==o[1].length&&(o[1]=o[1]+"0"),a="OpenGL ES GLSL ES "+o[1]+" ("+a+")"),t=stringToNewUTF8(a);break;default:GL.recordError(1280)}GL.stringCache[e]=t}return t}function _glGetUniformLocation(e,t){if(t=UTF8ToString(t),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var r=e.uniformLocsById,n=0,i=t,a=webglGetLeftBracePos(t);a>0&&(n=jstoi_q(t.slice(a+1))>>>0,i=t.slice(0,a));var o=e.uniformSizeAndIdsByName[i];if(o&&n<o[0]&&(r[n+=o[1]]=r[n]||GLctx.getUniformLocation(e,t)))return n}else GL.recordError(1281);return-1}function _glLineWidth(e){GLctx.lineWidth(e)}function _glLinkProgram(e){e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function _glReadPixels(e,t,r,n,i,a,o){if(GL.currentContext.version>=2)if(GLctx.currentPixelPackBufferBinding)GLctx.readPixels(e,t,r,n,i,a,o);else{var s=heapObjectForWebGLType(a);GLctx.readPixels(e,t,r,n,i,a,s,o>>heapAccessShiftForWebGLHeap(s))}else{var c=emscriptenWebGLGetTexPixelData(a,i,r,n,o);c?GLctx.readPixels(e,t,r,n,i,a,c):GL.recordError(1280)}}function _glRenderbufferStorage(e,t,r,n){GLctx.renderbufferStorage(e,t,r,n)}function _glShaderSource(e,t,r,n){var i=GL.getSource(e,t,r,n);GLctx.shaderSource(GL.shaders[e],i)}function _glTexImage2D(e,t,r,n,i,a,o,s,c){if(GL.currentContext.version>=2)if(GLctx.currentPixelUnpackBufferBinding)GLctx.texImage2D(e,t,r,n,i,a,o,s,c);else if(c){var l=heapObjectForWebGLType(s);GLctx.texImage2D(e,t,r,n,i,a,o,s,l,c>>heapAccessShiftForWebGLHeap(l))}else GLctx.texImage2D(e,t,r,n,i,a,o,s,null);else GLctx.texImage2D(e,t,r,n,i,a,o,s,c?emscriptenWebGLGetTexPixelData(s,o,n,i,c):null)}function _glTexParameteri(e,t,r){GLctx.texParameteri(e,t,r)}function _glUniform1f(e,t){GLctx.uniform1f(webglGetUniformLocation(e),t)}function _glUniform1i(e,t){GLctx.uniform1i(webglGetUniformLocation(e),t)}function _glUniform2fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform2fv(webglGetUniformLocation(e),HEAPF32,r>>2,2*t);else{if(t<=144)for(var n=miniTempWebGLFloatBuffers[2*t-1],i=0;i<2*t;i+=2)n[i]=HEAPF32[r+4*i>>2],n[i+1]=HEAPF32[r+(4*i+4)>>2];else n=HEAPF32.subarray(r>>2,r+8*t>>2);GLctx.uniform2fv(webglGetUniformLocation(e),n)}}function _glUniform3fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform3fv(webglGetUniformLocation(e),HEAPF32,r>>2,3*t);else{if(t<=96)for(var n=miniTempWebGLFloatBuffers[3*t-1],i=0;i<3*t;i+=3)n[i]=HEAPF32[r+4*i>>2],n[i+1]=HEAPF32[r+(4*i+4)>>2],n[i+2]=HEAPF32[r+(4*i+8)>>2];else n=HEAPF32.subarray(r>>2,r+12*t>>2);GLctx.uniform3fv(webglGetUniformLocation(e),n)}}function _glUniform4f(e,t,r,n,i){GLctx.uniform4f(webglGetUniformLocation(e),t,r,n,i)}function _glUniform4fv(e,t,r){if(GL.currentContext.version>=2)t&&GLctx.uniform4fv(webglGetUniformLocation(e),HEAPF32,r>>2,4*t);else{if(t<=72){var n=miniTempWebGLFloatBuffers[4*t-1],i=HEAPF32;r>>=2;for(var a=0;a<4*t;a+=4){var o=r+a;n[a]=i[o],n[a+1]=i[o+1],n[a+2]=i[o+2],n[a+3]=i[o+3]}}else n=HEAPF32.subarray(r>>2,r+16*t>>2);GLctx.uniform4fv(webglGetUniformLocation(e),n)}}function _glUniformMatrix3fv(e,t,r,n){if(GL.currentContext.version>=2)t&&GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,9*t);else{if(t<=32)for(var i=miniTempWebGLFloatBuffers[9*t-1],a=0;a<9*t;a+=9)i[a]=HEAPF32[n+4*a>>2],i[a+1]=HEAPF32[n+(4*a+4)>>2],i[a+2]=HEAPF32[n+(4*a+8)>>2],i[a+3]=HEAPF32[n+(4*a+12)>>2],i[a+4]=HEAPF32[n+(4*a+16)>>2],i[a+5]=HEAPF32[n+(4*a+20)>>2],i[a+6]=HEAPF32[n+(4*a+24)>>2],i[a+7]=HEAPF32[n+(4*a+28)>>2],i[a+8]=HEAPF32[n+(4*a+32)>>2];else i=HEAPF32.subarray(n>>2,n+36*t>>2);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,i)}}function _glUniformMatrix4fv(e,t,r,n){if(GL.currentContext.version>=2)t&&GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,HEAPF32,n>>2,16*t);else{if(t<=18){var i=miniTempWebGLFloatBuffers[16*t-1],a=HEAPF32;n>>=2;for(var o=0;o<16*t;o+=16){var s=n+o;i[o]=a[s],i[o+1]=a[s+1],i[o+2]=a[s+2],i[o+3]=a[s+3],i[o+4]=a[s+4],i[o+5]=a[s+5],i[o+6]=a[s+6],i[o+7]=a[s+7],i[o+8]=a[s+8],i[o+9]=a[s+9],i[o+10]=a[s+10],i[o+11]=a[s+11],i[o+12]=a[s+12],i[o+13]=a[s+13],i[o+14]=a[s+14],i[o+15]=a[s+15]}}else i=HEAPF32.subarray(n>>2,n+64*t>>2);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,i)}}function _glUseProgram(e){e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e}function _glVertexAttrib4fv(e,t){GLctx.vertexAttrib4f(e,HEAPF32[t>>2],HEAPF32[t+4>>2],HEAPF32[t+8>>2],HEAPF32[t+12>>2])}function _glVertexAttribPointer(e,t,r,n,i,a){GLctx.vertexAttribPointer(e,t,r,!!n,i,a)}function _glViewport(e,t,r,n){GLctx.viewport(e,t,r,n)}function _llvm_eh_typeid_for(e){return e}function __isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function __arraySum(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(e,t){for(var r=new Date(e.getTime());t>0;){var n=__isLeapYear(r.getFullYear()),i=r.getMonth(),a=(n?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[i];if(!(t>a-r.getDate()))return r.setDate(r.getDate()+t),r;t-=a-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function _strftime(e,t,r,n){var i=HEAP32[n+40>>2],a={tm_sec:HEAP32[n>>2],tm_min:HEAP32[n+4>>2],tm_hour:HEAP32[n+8>>2],tm_mday:HEAP32[n+12>>2],tm_mon:HEAP32[n+16>>2],tm_year:HEAP32[n+20>>2],tm_wday:HEAP32[n+24>>2],tm_yday:HEAP32[n+28>>2],tm_isdst:HEAP32[n+32>>2],tm_gmtoff:HEAP32[n+36>>2],tm_zone:i?UTF8ToString(i):""},o=UTF8ToString(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)o=o.replace(new RegExp(c,"g"),s[c]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(e,t,"0")}function _(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=m(r),a=m(n);return _(i,t)<=0?_(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+__arraySum(__isLeapYear(e.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return f(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&__isLeapYear(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&__isLeapYear(e.tm_year%400-1))&&t++}return f(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in o=o.replace(/%%/g,"\0\0"),g)o.includes(c)&&(o=o.replace(new RegExp(c,"g"),g[c](a)));var h=intArrayFromString(o=o.replace(/\0\0/g,"%"),!1);return h.length>t?0:(writeArrayToMemory(h,e),h.length-1)}function _strftime_l(e,t,r,n,i){return _strftime(e,t,r,n)}function _proc_exit(e){EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit&&Module.onExit(e),ABORT=!0),quit_(e,new ExitStatus(e))}function exitJS(e,t){EXITSTATUS=e,_proc_exit(e)}function allocateUTF8OnStack(e){var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8Array(e,HEAP8,r,t),r}Module.requestFullscreen=function(e,t){Browser.requestFullscreen(e,t)},Module.requestAnimationFrame=function(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function(e,t,r){Browser.setCanvasSize(e,t,r)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},Module.createContext=function(e,t,r,n){return Browser.createContext(e,t,r,n)};var FSNode=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},readMode=365,writeMode=146,GLctx;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(e){e?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(e){e?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}),FS.FSNode=FSNode,FS.staticInit(),Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_unlink=FS.unlink,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createDevice=FS.createDevice,embind_init_charCodes(),BindingError=Module.BindingError=extendError(Error,"BindingError"),InternalError=Module.InternalError=extendError(Error,"InternalError"),init_emval(),UnboundTypeError=Module.UnboundTypeError=extendError(Error,"UnboundTypeError");for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));for(var miniTempWebGLFloatBuffersStorage=new Float32Array(288),i=0;i<288;++i)miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1);for(var __miniTempWebGLIntBuffersStorage=new Int32Array(288),i=0;i<288;++i)__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1);var asmLibraryArg={q:___cxa_begin_catch,Cc:___cxa_current_primary_exception,db:___cxa_decrement_exception_refcount,v:___cxa_end_catch,a:___cxa_find_matching_catch_2,j:___cxa_find_matching_catch_3,w:___cxa_find_matching_catch_4,u:___cxa_find_matching_catch_5,Dc:___cxa_increment_exception_refcount,Qa:___cxa_rethrow,r:___cxa_throw,Ec:___cxa_uncaught_exceptions,e:___resumeException,Tc:___syscall_chdir,fb:___syscall_fcntl64,Jc:___syscall_getcwd,Lc:___syscall_getdents64,Qc:___syscall_ioctl,Mc:___syscall_mkdirat,gb:___syscall_openat,Kc:___syscall_readlinkat,Hc:___syscall_rmdir,Gc:___syscall_stat64,Ic:___syscall_unlinkat,xc:__embind_register_bigint,Wc:__embind_register_bool,Uc:__embind_register_emval,ib:__embind_register_float,s:__embind_register_function,S:__embind_register_integer,A:__embind_register_memory_view,jb:__embind_register_std_string,Da:__embind_register_std_wstring,Xc:__embind_register_void,Rc:__emscripten_get_now_is_monotonic,ya:_abort,oi:_eglBindAPI,Qb:_eglChooseConfig,Ob:_eglCreateContext,Mb:_eglCreateWindowSurface,Nb:_eglDestroyContext,Lb:_eglDestroySurface,Pb:_eglGetConfigAttrib,Pa:_eglGetDisplay,mi:_eglGetError,Sb:_eglInitialize,Kb:_eglMakeCurrent,ni:_eglQueryString,si:_eglSwapBuffers,ri:_eglSwapInterval,Rb:_eglTerminate,pi:_eglWaitGL,qi:_eglWaitNative,xa:_emscripten_asm_const_int,C:_emscripten_asm_const_int_sync_on_main_thread,Wb:_emscripten_cancel_main_loop,hb:_emscripten_date_now,hi:_emscripten_exit_fullscreen,ki:_emscripten_exit_pointerlock,Jb:_emscripten_get_canvas_element_size,ga:_emscripten_get_device_pixel_ratio,Y:_emscripten_get_element_css_size,Tb:_emscripten_get_gamepad_status,Ca:_emscripten_get_now,Ub:_emscripten_get_num_gamepads,li:_emscripten_get_screen_size,Ph:_emscripten_glActiveTexture,Oh:_emscripten_glAttachShader,Ne:_emscripten_glBeginQuery,di:_emscripten_glBeginQueryEXT,se:_emscripten_glBeginTransformFeedback,Nh:_emscripten_glBindAttribLocation,Mh:_emscripten_glBindBuffer,pe:_emscripten_glBindBufferBase,qe:_emscripten_glBindBufferRange,Lh:_emscripten_glBindFramebuffer,Kh:_emscripten_glBindRenderbuffer,vd:_emscripten_glBindSampler,Jh:_emscripten_glBindTexture,md:_emscripten_glBindTransformFeedback,ye:_emscripten_glBindVertexArray,Xh:_emscripten_glBindVertexArrayOES,Ih:_emscripten_glBlendColor,Hh:_emscripten_glBlendEquation,Gh:_emscripten_glBlendEquationSeparate,Fh:_emscripten_glBlendFunc,Eh:_emscripten_glBlendFuncSeparate,Be:_emscripten_glBlitFramebuffer,Dh:_emscripten_glBufferData,Ch:_emscripten_glBufferSubData,Bh:_emscripten_glCheckFramebufferStatus,Ah:_emscripten_glClear,Td:_emscripten_glClearBufferfi,Ud:_emscripten_glClearBufferfv,Wd:_emscripten_glClearBufferiv,Vd:_emscripten_glClearBufferuiv,zh:_emscripten_glClearColor,yh:_emscripten_glClearDepthf,xh:_emscripten_glClearStencil,Fd:_emscripten_glClientWaitSync,wh:_emscripten_glColorMask,vh:_emscripten_glCompileShader,uh:_emscripten_glCompressedTexImage2D,Se:_emscripten_glCompressedTexImage3D,th:_emscripten_glCompressedTexSubImage2D,Re:_emscripten_glCompressedTexSubImage3D,Rd:_emscripten_glCopyBufferSubData,sh:_emscripten_glCopyTexImage2D,rh:_emscripten_glCopyTexSubImage2D,Te:_emscripten_glCopyTexSubImage3D,qh:_emscripten_glCreateProgram,ph:_emscripten_glCreateShader,oh:_emscripten_glCullFace,nh:_emscripten_glDeleteBuffers,mh:_emscripten_glDeleteFramebuffers,lh:_emscripten_glDeleteProgram,Pe:_emscripten_glDeleteQueries,fi:_emscripten_glDeleteQueriesEXT,kh:_emscripten_glDeleteRenderbuffers,xd:_emscripten_glDeleteSamplers,jh:_emscripten_glDeleteShader,Gd:_emscripten_glDeleteSync,ih:_emscripten_glDeleteTextures,ld:_emscripten_glDeleteTransformFeedbacks,we:_emscripten_glDeleteVertexArrays,Wh:_emscripten_glDeleteVertexArraysOES,hh:_emscripten_glDepthFunc,gh:_emscripten_glDepthMask,fh:_emscripten_glDepthRangef,eh:_emscripten_glDetachShader,dh:_emscripten_glDisable,ch:_emscripten_glDisableVertexAttribArray,bh:_emscripten_glDrawArrays,Kd:_emscripten_glDrawArraysInstanced,Sh:_emscripten_glDrawArraysInstancedANGLE,af:_emscripten_glDrawArraysInstancedARB,cf:_emscripten_glDrawArraysInstancedEXT,Yc:_emscripten_glDrawArraysInstancedNV,Je:_emscripten_glDrawBuffers,Ye:_emscripten_glDrawBuffersEXT,Th:_emscripten_glDrawBuffersWEBGL,ah:_emscripten_glDrawElements,Jd:_emscripten_glDrawElementsInstanced,Rh:_emscripten_glDrawElementsInstancedANGLE,Ze:_emscripten_glDrawElementsInstancedARB,_e:_emscripten_glDrawElementsInstancedEXT,$e:_emscripten_glDrawElementsInstancedNV,We:_emscripten_glDrawRangeElements,$g:_emscripten_glEnable,_g:_emscripten_glEnableVertexAttribArray,Me:_emscripten_glEndQuery,ci:_emscripten_glEndQueryEXT,re:_emscripten_glEndTransformFeedback,Id:_emscripten_glFenceSync,Zg:_emscripten_glFinish,Xg:_emscripten_glFlush,Wg:_emscripten_glFramebufferRenderbuffer,Vg:_emscripten_glFramebufferTexture2D,ze:_emscripten_glFramebufferTextureLayer,Ug:_emscripten_glFrontFace,Tg:_emscripten_glGenBuffers,Rg:_emscripten_glGenFramebuffers,Qe:_emscripten_glGenQueries,gi:_emscripten_glGenQueriesEXT,Qg:_emscripten_glGenRenderbuffers,yd:_emscripten_glGenSamplers,Pg:_emscripten_glGenTextures,kd:_emscripten_glGenTransformFeedbacks,ve:_emscripten_glGenVertexArrays,Vh:_emscripten_glGenVertexArraysOES,Sg:_emscripten_glGenerateMipmap,Og:_emscripten_glGetActiveAttrib,Ng:_emscripten_glGetActiveUniform,Md:_emscripten_glGetActiveUniformBlockName,Nd:_emscripten_glGetActiveUniformBlockiv,Pd:_emscripten_glGetActiveUniformsiv,Mg:_emscripten_glGetAttachedShaders,Lg:_emscripten_glGetAttribLocation,Kg:_emscripten_glGetBooleanv,Ad:_emscripten_glGetBufferParameteri64v,Jg:_emscripten_glGetBufferParameteriv,Ig:_emscripten_glGetError,Hg:_emscripten_glGetFloatv,ee:_emscripten_glGetFragDataLocation,Gg:_emscripten_glGetFramebufferAttachmentParameteriv,Bd:_emscripten_glGetInteger64i_v,Dd:_emscripten_glGetInteger64v,te:_emscripten_glGetIntegeri_v,Fg:_emscripten_glGetIntegerv,_c:_emscripten_glGetInternalformativ,gd:_emscripten_glGetProgramBinary,Dg:_emscripten_glGetProgramInfoLog,Eg:_emscripten_glGetProgramiv,Zh:_emscripten_glGetQueryObjecti64vEXT,$h:_emscripten_glGetQueryObjectivEXT,Yh:_emscripten_glGetQueryObjectui64vEXT,Ke:_emscripten_glGetQueryObjectuiv,_h:_emscripten_glGetQueryObjectuivEXT,Le:_emscripten_glGetQueryiv,ai:_emscripten_glGetQueryivEXT,Cg:_emscripten_glGetRenderbufferParameteriv,pd:_emscripten_glGetSamplerParameterfv,qd:_emscripten_glGetSamplerParameteriv,Ag:_emscripten_glGetShaderInfoLog,zg:_emscripten_glGetShaderPrecisionFormat,yg:_emscripten_glGetShaderSource,Bg:_emscripten_glGetShaderiv,xg:_emscripten_glGetString,Sd:_emscripten_glGetStringi,Cd:_emscripten_glGetSynciv,wg:_emscripten_glGetTexParameterfv,vg:_emscripten_glGetTexParameteriv,ne:_emscripten_glGetTransformFeedbackVarying,Od:_emscripten_glGetUniformBlockIndex,Qd:_emscripten_glGetUniformIndices,sg:_emscripten_glGetUniformLocation,ug:_emscripten_glGetUniformfv,tg:_emscripten_glGetUniformiv,fe:_emscripten_glGetUniformuiv,le:_emscripten_glGetVertexAttribIiv,ke:_emscripten_glGetVertexAttribIuiv,pg:_emscripten_glGetVertexAttribPointerv,rg:_emscripten_glGetVertexAttribfv,qg:_emscripten_glGetVertexAttribiv,og:_emscripten_glHint,cd:_emscripten_glInvalidateFramebuffer,bd:_emscripten_glInvalidateSubFramebuffer,ng:_emscripten_glIsBuffer,mg:_emscripten_glIsEnabled,lg:_emscripten_glIsFramebuffer,kg:_emscripten_glIsProgram,Oe:_emscripten_glIsQuery,ei:_emscripten_glIsQueryEXT,ig:_emscripten_glIsRenderbuffer,wd:_emscripten_glIsSampler,hg:_emscripten_glIsShader,Hd:_emscripten_glIsSync,gg:_emscripten_glIsTexture,jd:_emscripten_glIsTransformFeedback,ue:_emscripten_glIsVertexArray,Uh:_emscripten_glIsVertexArrayOES,fg:_emscripten_glLineWidth,eg:_emscripten_glLinkProgram,id:_emscripten_glPauseTransformFeedback,dg:_emscripten_glPixelStorei,cg:_emscripten_glPolygonOffset,fd:_emscripten_glProgramBinary,ed:_emscripten_glProgramParameteri,bi:_emscripten_glQueryCounterEXT,Xe:_emscripten_glReadBuffer,bg:_emscripten_glReadPixels,ag:_emscripten_glReleaseShaderCompiler,$f:_emscripten_glRenderbufferStorage,Ae:_emscripten_glRenderbufferStorageMultisample,hd:_emscripten_glResumeTransformFeedback,_f:_emscripten_glSampleCoverage,sd:_emscripten_glSamplerParameterf,rd:_emscripten_glSamplerParameterfv,ud:_emscripten_glSamplerParameteri,td:_emscripten_glSamplerParameteriv,Zf:_emscripten_glScissor,Yf:_emscripten_glShaderBinary,Xf:_emscripten_glShaderSource,Wf:_emscripten_glStencilFunc,Vf:_emscripten_glStencilFuncSeparate,Uf:_emscripten_glStencilMask,Tf:_emscripten_glStencilMaskSeparate,Sf:_emscripten_glStencilOp,Rf:_emscripten_glStencilOpSeparate,Qf:_emscripten_glTexImage2D,Ve:_emscripten_glTexImage3D,Pf:_emscripten_glTexParameterf,Of:_emscripten_glTexParameterfv,Nf:_emscripten_glTexParameteri,Mf:_emscripten_glTexParameteriv,ad:_emscripten_glTexStorage2D,$c:_emscripten_glTexStorage3D,Lf:_emscripten_glTexSubImage2D,Ue:_emscripten_glTexSubImage3D,oe:_emscripten_glTransformFeedbackVaryings,Kf:_emscripten_glUniform1f,Jf:_emscripten_glUniform1fv,If:_emscripten_glUniform1i,Hf:_emscripten_glUniform1iv,de:_emscripten_glUniform1ui,_d:_emscripten_glUniform1uiv,Gf:_emscripten_glUniform2f,Ff:_emscripten_glUniform2fv,Ef:_emscripten_glUniform2i,Df:_emscripten_glUniform2iv,be:_emscripten_glUniform2ui,Zd:_emscripten_glUniform2uiv,Cf:_emscripten_glUniform3f,Bf:_emscripten_glUniform3fv,Af:_emscripten_glUniform3i,zf:_emscripten_glUniform3iv,ae:_emscripten_glUniform3ui,Yd:_emscripten_glUniform3uiv,yf:_emscripten_glUniform4f,xf:_emscripten_glUniform4fv,wf:_emscripten_glUniform4i,vf:_emscripten_glUniform4iv,$d:_emscripten_glUniform4ui,Xd:_emscripten_glUniform4uiv,Ld:_emscripten_glUniformBlockBinding,uf:_emscripten_glUniformMatrix2fv,He:_emscripten_glUniformMatrix2x3fv,Fe:_emscripten_glUniformMatrix2x4fv,tf:_emscripten_glUniformMatrix3fv,Ge:_emscripten_glUniformMatrix3x2fv,De:_emscripten_glUniformMatrix3x4fv,sf:_emscripten_glUniformMatrix4fv,Ee:_emscripten_glUniformMatrix4x2fv,Ce:_emscripten_glUniformMatrix4x3fv,rf:_emscripten_glUseProgram,qf:_emscripten_glValidateProgram,pf:_emscripten_glVertexAttrib1f,of:_emscripten_glVertexAttrib1fv,nf:_emscripten_glVertexAttrib2f,mf:_emscripten_glVertexAttrib2fv,lf:_emscripten_glVertexAttrib3f,kf:_emscripten_glVertexAttrib3fv,jf:_emscripten_glVertexAttrib4f,hf:_emscripten_glVertexAttrib4fv,nd:_emscripten_glVertexAttribDivisor,Qh:_emscripten_glVertexAttribDivisorANGLE,df:_emscripten_glVertexAttribDivisorARB,ef:_emscripten_glVertexAttribDivisorEXT,Zc:_emscripten_glVertexAttribDivisorNV,je:_emscripten_glVertexAttribI4i,he:_emscripten_glVertexAttribI4iv,ie:_emscripten_glVertexAttribI4ui,ge:_emscripten_glVertexAttribI4uiv,me:_emscripten_glVertexAttribIPointer,gf:_emscripten_glVertexAttribPointer,ff:_emscripten_glViewport,Ed:_emscripten_glWaitSync,wa:_emscripten_has_asyncify,Sc:_emscripten_memcpy_big,ii:_emscripten_request_fullscreen_strategy,Hb:_emscripten_request_pointerlock,Fc:_emscripten_resize_heap,Yg:_emscripten_run_script_string,Vb:_emscripten_sample_gamepad_data,ob:_emscripten_set_beforeunload_callback_on_thread,zb:_emscripten_set_blur_callback_on_thread,fa:_emscripten_set_canvas_element_size,Na:_emscripten_set_element_css_size,Ab:_emscripten_set_focus_callback_on_thread,qb:_emscripten_set_fullscreenchange_callback_on_thread,ja:_emscripten_set_gamepadconnected_callback_on_thread,ia:_emscripten_set_gamepaddisconnected_callback_on_thread,tb:_emscripten_set_keydown_callback_on_thread,rb:_emscripten_set_keypress_callback_on_thread,sb:_emscripten_set_keyup_callback_on_thread,bf:_emscripten_set_main_loop,Fb:_emscripten_set_mousedown_callback_on_thread,Db:_emscripten_set_mouseenter_callback_on_thread,Cb:_emscripten_set_mouseleave_callback_on_thread,Gb:_emscripten_set_mousemove_callback_on_thread,Eb:_emscripten_set_mouseup_callback_on_thread,ub:_emscripten_set_pointerlockchange_callback_on_thread,Oa:_emscripten_set_resize_callback_on_thread,vb:_emscripten_set_touchcancel_callback_on_thread,xb:_emscripten_set_touchend_callback_on_thread,wb:_emscripten_set_touchmove_callback_on_thread,yb:_emscripten_set_touchstart_callback_on_thread,pb:_emscripten_set_visibilitychange_callback_on_thread,Bb:_emscripten_set_wheel_callback_on_thread,ji:_emscripten_set_window_title,va:_emscripten_sleep,Nc:_environ_get,Oc:_environ_sizes_get,sa:_fd_close,Pc:_fd_read,wc:_fd_seek,eb:_fd_write,ua:_glActiveTexture,Fa:_glAttachShader,kb:_glBindAttribLocation,B:_glBindBuffer,X:_glBindFramebuffer,ra:_glBindRenderbuffer,L:_glBindTexture,ka:_glBlendEquation,Q:_glBlendFunc,Ta:_glBufferData,P:_glBufferSubData,Va:_glCheckFramebufferStatus,cc:_glClear,ac:_glClearColor,$b:_glClearDepthf,_b:_glClearStencil,Ga:_glCompileShader,mb:_glCreateProgram,Ia:_glCreateShader,Yb:_glCullFace,ma:_glDeleteBuffers,W:_glDeleteFramebuffers,Ja:_glDeleteProgram,V:_glDeleteRenderbuffers,Ea:_glDeleteShader,T:_glDeleteTextures,aa:_glDepthMask,K:_glDisable,$:_glDisableVertexAttribArray,M:_glDrawArrays,Sa:_glDrawElements,G:_glEnable,la:_glEnableVertexAttribArray,Wa:_glFramebufferRenderbuffer,Xa:_glFramebufferTexture2D,Xb:_glFrontFace,Ua:_glGenBuffers,$a:_glGenFramebuffers,cb:_glGenRenderbuffers,Ma:_glGenTextures,Ka:_glGenerateMipmap,xe:_glGetActiveAttrib,ce:_glGetActiveUniform,gc:_glGetBufferParameteriv,ha:_glGetIntegerv,dd:_glGetProgramInfoLog,Ie:_glGetProgramiv,od:_glGetShaderInfoLog,nb:_glGetShaderiv,Ib:_glGetString,ea:_glGetUniformLocation,Ra:_glLineWidth,lb:_glLinkProgram,Zb:_glReadPixels,bb:_glRenderbufferStorage,Ha:_glShaderSource,La:_glTexImage2D,I:_glTexParameteri,ec:_glUniform1f,zd:_glUniform1i,fc:_glUniform2fv,dc:_glUniform3fv,J:_glUniform4f,Vc:_glUniform4fv,ta:_glUniformMatrix3fv,H:_glUniformMatrix4fv,N:_glUseProgram,jg:_glVertexAttrib4fv,O:_glVertexAttribPointer,bc:_glViewport,ab:invoke_dii,za:invoke_diii,z:invoke_fi,qa:invoke_fii,Ba:invoke_fiii,y:invoke_i,b:invoke_ii,Za:invoke_iid,U:invoke_iif,d:invoke_iii,da:invoke_iiif,_a:invoke_iiifi,f:invoke_iiii,l:invoke_iiiii,Ya:invoke_iiiiid,p:invoke_iiiiii,ca:invoke_iiiiiifi,t:invoke_iiiiiii,m:invoke_iiiiiiii,ba:invoke_iiiiiiiii,Ac:invoke_iiiiiiiiiffffiiiiiiiiii,oa:invoke_iiiiiiiiiiii,ic:invoke_iiiiij,oc:invoke_iiiijjiii,vc:invoke_iiijjjii,kc:invoke_iij,nc:invoke_iijiii,mc:invoke_iijiiiii,jc:invoke_j,tc:invoke_ji,uc:invoke_jiii,hc:invoke_jiiii,h:invoke_v,i:invoke_vi,zc:invoke_vid,F:invoke_vif,pa:invoke_vifff,c:invoke_vii,yc:invoke_viid,Aa:invoke_viifi,g:invoke_viii,_:invoke_viiifii,k:invoke_viiii,o:invoke_viiiii,n:invoke_viiiiii,x:invoke_viiiiiii,R:invoke_viiiiiiii,E:invoke_viiiiiiiii,Z:invoke_viiiiiiiiii,na:invoke_viiiiiiiiiiiiiii,rc:invoke_viiiijjii,lc:invoke_viiji,sc:invoke_viijiiii,pc:invoke_viijj,qc:invoke_vijii,D:_llvm_eh_typeid_for,Bc:_strftime_l};createWasm(),Module.___wasm_call_ctors=function(){return(Module.___wasm_call_ctors=Module.asm.ui).apply(null,arguments)},Module._main=function(){return(Module._main=Module.asm.vi).apply(null,arguments)};var ___cxa_free_exception=Module.___cxa_free_exception=function(){return(___cxa_free_exception=Module.___cxa_free_exception=Module.asm.wi).apply(null,arguments)},_malloc=Module._malloc=function(){return(_malloc=Module._malloc=Module.asm.xi).apply(null,arguments)},___errno_location=Module.___errno_location=function(){return(___errno_location=Module.___errno_location=Module.asm.yi).apply(null,arguments)},_free=Module._free=function(){return(_free=Module._free=Module.asm.zi).apply(null,arguments)},___getTypeName=Module.___getTypeName=function(){return(___getTypeName=Module.___getTypeName=Module.asm.Bi).apply(null,arguments)};Module.__embind_initialize_bindings=function(){return(Module.__embind_initialize_bindings=Module.asm.Ci).apply(null,arguments)};var _setThrew=Module._setThrew=function(){return(_setThrew=Module._setThrew=Module.asm.Di).apply(null,arguments)},setTempRet0=Module.setTempRet0=function(){return(setTempRet0=Module.setTempRet0=Module.asm.Ei).apply(null,arguments)},stackSave=Module.stackSave=function(){return(stackSave=Module.stackSave=Module.asm.Fi).apply(null,arguments)},stackRestore=Module.stackRestore=function(){return(stackRestore=Module.stackRestore=Module.asm.Gi).apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return(stackAlloc=Module.stackAlloc=Module.asm.Hi).apply(null,arguments)},___cxa_can_catch=Module.___cxa_can_catch=function(){return(___cxa_can_catch=Module.___cxa_can_catch=Module.asm.Ii).apply(null,arguments)},___cxa_is_pointer_type=Module.___cxa_is_pointer_type=function(){return(___cxa_is_pointer_type=Module.___cxa_is_pointer_type=Module.asm.Ji).apply(null,arguments)},dynCall_iiijjjii=Module.dynCall_iiijjjii=function(){return(dynCall_iiijjjii=Module.dynCall_iiijjjii=Module.asm.Ki).apply(null,arguments)},dynCall_ji=Module.dynCall_ji=function(){return(dynCall_ji=Module.dynCall_ji=Module.asm.Li).apply(null,arguments)},dynCall_jiii=Module.dynCall_jiii=function(){return(dynCall_jiii=Module.dynCall_jiii=Module.asm.Mi).apply(null,arguments)},dynCall_viijiiii=Module.dynCall_viijiiii=function(){return(dynCall_viijiiii=Module.dynCall_viijiiii=Module.asm.Ni).apply(null,arguments)},dynCall_viiiijjii=Module.dynCall_viiiijjii=function(){return(dynCall_viiiijjii=Module.dynCall_viiiijjii=Module.asm.Oi).apply(null,arguments)},dynCall_vijii=Module.dynCall_vijii=function(){return(dynCall_vijii=Module.dynCall_vijii=Module.asm.Pi).apply(null,arguments)},dynCall_viijj=Module.dynCall_viijj=function(){return(dynCall_viijj=Module.dynCall_viijj=Module.asm.Qi).apply(null,arguments)},dynCall_iiiijjiii=Module.dynCall_iiiijjiii=function(){return(dynCall_iiiijjiii=Module.dynCall_iiiijjiii=Module.asm.Ri).apply(null,arguments)},dynCall_iijiii=Module.dynCall_iijiii=function(){return(dynCall_iijiii=Module.dynCall_iijiii=Module.asm.Si).apply(null,arguments)},dynCall_iijiiiii=Module.dynCall_iijiiiii=function(){return(dynCall_iijiiiii=Module.dynCall_iijiiiii=Module.asm.Ti).apply(null,arguments)},dynCall_viiji=Module.dynCall_viiji=function(){return(dynCall_viiji=Module.dynCall_viiji=Module.asm.Ui).apply(null,arguments)},dynCall_iij=Module.dynCall_iij=function(){return(dynCall_iij=Module.dynCall_iij=Module.asm.Vi).apply(null,arguments)};Module.dynCall_jii=function(){return(Module.dynCall_jii=Module.asm.Wi).apply(null,arguments)},Module.dynCall_viji=function(){return(Module.dynCall_viji=Module.asm.Xi).apply(null,arguments)},Module.dynCall_iiiji=function(){return(Module.dynCall_iiiji=Module.asm.Yi).apply(null,arguments)},Module.dynCall_jiji=function(){return(Module.dynCall_jiji=Module.asm.Zi).apply(null,arguments)};var dynCall_j=Module.dynCall_j=function(){return(dynCall_j=Module.dynCall_j=Module.asm._i).apply(null,arguments)},dynCall_iiiiij=Module.dynCall_iiiiij=function(){return(dynCall_iiiiij=Module.dynCall_iiiiij=Module.asm.$i).apply(null,arguments)};Module.dynCall_viijii=function(){return(Module.dynCall_viijii=Module.asm.aj).apply(null,arguments)};var dynCall_jiiii=Module.dynCall_jiiii=function(){return(dynCall_jiiii=Module.dynCall_jiiii=Module.asm.bj).apply(null,arguments)},calledRun;function invoke_iiiiii(e,t,r,n,i,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a)}catch(e){if(stackRestore(o),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(e,t,r,n){var i=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(e){if(stackRestore(r),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(e,t,r,n,i){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vif(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(e,t,r,n){var i=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(e){if(stackRestore(r),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiii(e,t,r,n,i,a,o){var s=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(e){var t=stackSave();try{getWasmTableEntry(e)()}catch(e){if(stackRestore(t),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iif(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii(e,t,r,n,i,a){var o=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a)}catch(e){if(stackRestore(o),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(e,t,r,n,i){var a=stackSave();try{getWasmTableEntry(e)(t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(e){if(stackRestore(t),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(e,t,r,n,i,a,o){var s=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiif(e,t,r,n){var i=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_fi(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(e){if(stackRestore(r),e!==e+0)throw e;_setThrew(1,0)}}function invoke_fii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(e,t,r,n,i,a,o,s){var c=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o,s)}catch(e){if(stackRestore(c),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiffffiiiiiiiiii(e,t,r,n,i,a,o,s,c,l,u,d,f,_,m,p,g,h,v,E,b,w,x){var y=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o,s,c,l,u,d,f,_,m,p,g,h,v,E,b,w,x)}catch(e){if(stackRestore(y),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(e,t,r,n,i,a,o,s,c){var l=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o,s,c)}catch(e){if(stackRestore(l),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(e,t,r,n,i,a,o,s,c,l){var u=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o,s,c,l)}catch(e){if(stackRestore(u),e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiii(e,t,r,n){var i=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vid(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_dii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifff(e,t,r,n,i){var a=stackSave();try{getWasmTableEntry(e)(t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiifi(e,t,r,n,i){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiifi(e,t,r,n,i,a,o,s){var c=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o,s)}catch(e){if(stackRestore(c),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(e,t,r,n,i,a,o,s,c){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o,s,c)}catch(e){if(stackRestore(l),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiii(e,t,r,n,i,a,o,s){var c=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o,s)}catch(e){if(stackRestore(c),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iid(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifi(e,t,r,n,i){var a=stackSave();try{getWasmTableEntry(e)(t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiifii(e,t,r,n,i,a,o){var s=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiid(e,t,r,n,i,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a)}catch(e){if(stackRestore(o),e!==e+0)throw e;_setThrew(1,0)}}function invoke_diii(e,t,r,n){var i=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(e,t,r,n,i,a,o,s,c,l,u,d){var f=stackSave();try{return getWasmTableEntry(e)(t,r,n,i,a,o,s,c,l,u,d)}catch(e){if(stackRestore(f),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(e,t,r,n,i,a,o,s,c,l,u){var d=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o,s,c,l,u)}catch(e){if(stackRestore(d),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(e,t,r,n,i,a,o,s,c,l,u,d,f,_,m,p){var g=stackSave();try{getWasmTableEntry(e)(t,r,n,i,a,o,s,c,l,u,d,f,_,m,p)}catch(e){if(stackRestore(g),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viid(e,t,r,n){var i=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiijjjii(e,t,r,n,i,a,o,s,c,l,u){var d=stackSave();try{return dynCall_iiijjjii(e,t,r,n,i,a,o,s,c,l,u)}catch(e){if(stackRestore(d),e!==e+0)throw e;_setThrew(1,0)}}function invoke_jiii(e,t,r,n){var i=stackSave();try{return dynCall_jiii(e,t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_ji(e,t){var r=stackSave();try{return dynCall_ji(e,t)}catch(e){if(stackRestore(r),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viijiiii(e,t,r,n,i,a,o,s,c){var l=stackSave();try{dynCall_viijiiii(e,t,r,n,i,a,o,s,c)}catch(e){if(stackRestore(l),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiijjii(e,t,r,n,i,a,o,s,c,l,u){var d=stackSave();try{dynCall_viiiijjii(e,t,r,n,i,a,o,s,c,l,u)}catch(e){if(stackRestore(d),e!==e+0)throw e;_setThrew(1,0)}}function invoke_vijii(e,t,r,n,i,a){var o=stackSave();try{dynCall_vijii(e,t,r,n,i,a)}catch(e){if(stackRestore(o),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viijj(e,t,r,n,i,a,o){var s=stackSave();try{dynCall_viijj(e,t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiijjiii(e,t,r,n,i,a,o,s,c,l,u){var d=stackSave();try{return dynCall_iiiijjiii(e,t,r,n,i,a,o,s,c,l,u)}catch(e){if(stackRestore(d),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijiii(e,t,r,n,i,a,o){var s=stackSave();try{return dynCall_iijiii(e,t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijiiiii(e,t,r,n,i,a,o,s,c){var l=stackSave();try{return dynCall_iijiiiii(e,t,r,n,i,a,o,s,c)}catch(e){if(stackRestore(l),e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiji(e,t,r,n,i,a){var o=stackSave();try{dynCall_viiji(e,t,r,n,i,a)}catch(e){if(stackRestore(o),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iij(e,t,r,n){var i=stackSave();try{return dynCall_iij(e,t,r,n)}catch(e){if(stackRestore(i),e!==e+0)throw e;_setThrew(1,0)}}function invoke_j(e){var t=stackSave();try{return dynCall_j(e)}catch(e){if(stackRestore(t),e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiij(e,t,r,n,i,a,o){var s=stackSave();try{return dynCall_iiiiij(e,t,r,n,i,a,o)}catch(e){if(stackRestore(s),e!==e+0)throw e;_setThrew(1,0)}}function invoke_jiiii(e,t,r,n,i){var a=stackSave();try{return dynCall_jiiii(e,t,r,n,i)}catch(e){if(stackRestore(a),e!==e+0)throw e;_setThrew(1,0)}}function callMain(e){var t=Module._main;(e=e||[]).unshift(thisProgram);var r=e.length,n=stackAlloc(4*(r+1)),i=n>>2;e.forEach((e=>{HEAP32[i++]=allocateUTF8OnStack(e)})),HEAP32[i]=0;try{var a=t(r,n);return exitJS(a,!0),a}catch(e){return handleException(e)}}function run(e){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),readyPromiseResolve(Module),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}e=e||arguments_,runDependencies>0||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t()))}if(Module.dynCall_iiiiijj=function(){return(Module.dynCall_iiiiijj=Module.asm.cj).apply(null,arguments)},Module.dynCall_iiiiiijj=function(){return(Module.dynCall_iiiiiijj=Module.asm.dj).apply(null,arguments)},Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,Module.specialHTMLTargets=specialHTMLTargets,Module.FS=FS,Module.EGL=EGL,dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),createCatwalkModule.ready}})(),ModuleState;class Resource{constructor(e,t){this.assetPath=e,this.searchPath=t}}!function(e){e.NOT_LOADED="Not loaded",e.LOADING="Loading",e.LOADED="Loaded"}(ModuleState||(ModuleState={}));const colorRegEx=/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\)/;class Emb3DViewer extends s{get knownModelExtensions(){return Emb3DViewer.knownModelExtensions}_isHidden(e=this.getBoundingClientRect()){return 0===e.width&&0===e.height}constructor(){super(),this.withCredentials=!1,this.light=null,this.key=null,this.src=null,this.alt=null,this._defaultAriaLabel=null,this._emb3d=Emb3DViewer.API_MODULE_NOT_LOADED,this._module=Emb3DViewer.MODULE_NOT_LOADED,this._module_state=ModuleState.NOT_LOADED,this._activeModel=null,this._resources={},this._isElementInViewport=!1,this._resizeHandler=debounce((()=>{const e=this.getBoundingClientRect();this._resize(e)}),100),this.renderer_width=()=>this._emb3d.cc_renderer_width(),this.renderer_height=()=>this._emb3d.cc_renderer_height(),this.interaction_mode_set=e=>this._emb3d.cc_interaction_mode_set(e),this.interaction_mode_get=()=>this._emb3d.cc_interaction_mode_get(),this.interaction_mode_reset=()=>this._emb3d.cc_interaction_mode_reset(),this.override_draw_mode_set=e=>this._emb3d.cc_override_draw_mode_set(e),this.override_draw_mode_get=()=>this._emb3d.cc_override_draw_mode_get(),this.override_draw_mode_reset=()=>this._emb3d.cc_override_draw_mode_reset(),this.override_material_mode_set=e=>this._emb3d.cc_override_material_mode_set(e),this.override_material_mode_get=()=>this._emb3d.cc_override_material_mode_get(),this.override_material_mode_reset=()=>this._emb3d.cc_override_material_mode_reset(),this.view_all=(e="")=>this._emb3d.cc_view_all(e),this.viewpoint_mode_set=e=>this._emb3d.cc_viewpoint_mode_set(e),this.viewpoint_mode_get=()=>this._emb3d.cc_viewpoint_mode_get(),this.viewpoint_mode_reset=()=>this._emb3d.cc_viewpoint_mode_reset(),this.gizmo_show_set=e=>this._emb3d.cc_gizmo_show_set(e),this.gizmo_show_get=()=>this._emb3d.cc_gizmo_show_get(),this.gizmo_show_reset=()=>this._emb3d.cc_gizmo_show_reset(),this.grid_orientation_set=e=>this._emb3d.cc_grid_orientation_set(e),this.grid_orientation_get=()=>this._emb3d.cc_grid_orientation_get(),this.grid_orientation_reset=()=>this._emb3d.cc_grid_orientation_reset(),this.background_property_set=(e,t)=>this._emb3d.cc_background_property_set(e,t),this.background_property_get=e=>this._emb3d.cc_background_property_get(e),this.background_property_reset=e=>this._emb3d.cc_background_property_reset(e),this.grid_show_set=e=>this._emb3d.cc_grid_show_set(e),this.grid_show_get=()=>this._emb3d.cc_grid_show_get(),this.grid_show_reset=()=>this._emb3d.cc_grid_show_reset(),this.light_enable_set=(e,t)=>this._emb3d.cc_light_enable_set(e,t),this.light_enable_get=e=>this._emb3d.cc_light_enable_get(e),this.light_enable_reset=e=>this._emb3d.cc_light_enable_reset(e),this.resource_exists=e=>this._emb3d.cc_resource_exists(e),this.resource_list=()=>this._emb3d.cc_resource_list(),this.instance_add=(e,t)=>this._emb3d.cc_instance_add(e,t),this.instance_remove=(e,t)=>this._emb3d.cc_instance_remove(e,t),this.instance_exists=(e,t)=>this._emb3d.cc_instance_exists(e,t),this.instance_list=e=>this._emb3d.cc_instance_list(e),this.instance_show_set=(e,t,r)=>this._emb3d.cc_instance_show_set(e,t,r),this.instance_show_get=(e,t)=>this._emb3d.cc_instance_show_get(e,t),this.instance_show_reset=(e,t)=>this._emb3d.cc_instance_show_reset(e,t),this.instance_material_property_set=(e,t,r,n)=>this._emb3d.cc_instance_material_property_set(e,t,r,n),this.instance_material_property_get=(e,t,r)=>this._emb3d.cc_instance_material_property_get(e,t,r),this.instance_material_property_reset=(e,t,r)=>this._emb3d.cc_instance_material_property_reset(e,t,r),this.select=(e,t)=>this._emb3d.cc_select(e,t),this.select_none=()=>this._emb3d.cc_select_none(),this.selected_resource=()=>this._emb3d.cc_selected_resource(),this.selected_instance=()=>this._emb3d.cc_selected_instance(),this.pick_enable_set=e=>this._emb3d.cc_pick_enable_set(e),this.pick_enable_get=()=>this._emb3d.cc_pick_enable_get(),this.pick_enable_reset=()=>this._emb3d.cc_pick_enable_reset(),this.attachShadow({mode:"open"});const e=this.shadowRoot;makeTemplate(e),this._defaultAriaLabel=e.querySelector(".userInput")?.getAttribute("aria-label"),this._resizeObserver=new ResizeObserver((e=>{for(const t of e)if(t.target===this){this._resizeHandler(t.contentRect);break}})),this._intersectionObserver=new IntersectionObserver((e=>{for(const t of e)t.target===this&&(this._isElementInViewport=t.isIntersecting,this._isElementInViewport&&!this._activeModel&&this._updateSource())}),{root:null,rootMargin:"0px",threshold:0}),this._mutationObserver=new MutationObserver((e=>{for(const t of e)"style"===t.attributeName&&this._updateStyle()}))}onWebGLContextLost(e){alert("WebGL context lost. You will need to reload the page."),e.preventDefault()}connectedCallback(){super.connectedCallback(),this._resources={},this._canvas.addEventListener("webglcontextlost",this.onWebGLContextLost,!1),this._resizeObserver.observe(this),this._intersectionObserver.observe(this),this._mutationObserver.observe(this,{attributes:!0,attributeFilter:["style"]})}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this),this._intersectionObserver.unobserve(this),this._mutationObserver.disconnect(),this._canvas.removeEventListener("webglcontextlost",this.onWebGLContextLost),this._canvas.classList.remove("show"),this.unloadActiveModel(),this._resources={},this._module_state===ModuleState.LOADED&&(this._module=Emb3DViewer.MODULE_NOT_LOADED,this._emb3d=Emb3DViewer.API_MODULE_NOT_LOADED,this._module_state=ModuleState.NOT_LOADED)}async init(){if(this._module_state!==ModuleState.NOT_LOADED)return;this._progress.classList.add("show"),this._module_state=ModuleState.LOADING,this._canvas.id=`emb3d-canvas-${Math.random().toString(36).slice(2,18)}`;const e=new Emb3DModule(document.title,this._canvas),t=this._module=await createCatwalkModule(e);this._emb3d=new Proxy(t,{get(e,t,r){const n=Reflect.get(e,t,r);return"string"==typeof t&&t.startsWith("cc_")?(...t)=>{try{return n.apply(n,t)}catch(t){throw new Error(e.cc_get_exception_message(t))}}:n}}),this._module.FS.errorFromErrno=e=>{if(e.errno){return new Error(this._emb3d.cc_strerror(e.errno))}return e},this.key&&this._emb3d.cc_set_host_key(this.key),this._emb3d.cc_viewpoint_mode_set("turntable"),this._emb3d.cc_background_property_set("gradient","solid"),this._updateLight(),this._updateStyle(),this._module_state=ModuleState.LOADED,this._resize(),this._canvas.classList.add("show"),await this._updateSource(),this.dispatchEvent(new Event("init"))}_ensureLoaded(){switch(this._module_state){case ModuleState.LOADING:return!0;case ModuleState.NOT_LOADED:return!!this.init();case ModuleState.LOADED:return!1}}_updateSource(e=!1){return this._ensureLoaded()?Promise.resolve():(e&&this.unloadActiveModel(),this.src&&!this._activeModel?this.loadModel("model",this.src):(this.unloadActiveModel(),this._progress.classList.remove("show"),Promise.resolve()))}_updateStyle(){const e=getComputedStyle(this).backgroundColor,t=e.match(colorRegEx);if(null===t)throw new Error(`${e} does not match my RegEx, please report!`);const r=parseFloat(t[1])/255,n=parseFloat(t[2])/255,i=parseFloat(t[3])/255,a=parseFloat(t[4]||"1.0");this._emb3d.cc_background_property_set("color",`${r} ${n} ${i} ${a}`)}_updateLight(){const e=!this.light||"none"!==this.light;this._emb3d.cc_light_enable_set("",e)}updated(e){super.updated(e),!e.has("light")||this._isHidden()||this._ensureLoaded()||this._updateLight(),e.has("src")&&!this._isHidden()&&this._updateSource(!0),e.has("alt")&&this._userInput.setAttribute("aria-label",this.alt||this._defaultAriaLabel||"")}_resize(e=this.getBoundingClientRect()){this._ensureLoaded()||(this._container.style.width=`${e.width}px`,this._container.style.height=`${e.height}px`,this._canvas.width=e.width,this._canvas.height=e.height,this._canvas.dispatchEvent(new Event("resize")))}_addInstance(e){this._activeModel=e,this._emb3d.cc_instance_add(e,e),this._emb3d.cc_view_all("")}unloadActiveModel(){this._activeModel&&(this._emb3d.cc_resource_remove(this._activeModel),this._emb3d.cc_view_all(""),this._activeModel=null)}async getModelPreview(e,t){const r=`data:image/png;base64,${this._emb3d.cc_renderer_preview("default",e,t,"png")}`;return(await fetch(r)).blob()}_loadSingleFile(e,t){const r=new Uint8Array(e),n=mkstemp("/assets/"),i=`${n}/asset.${t}`;return this._module.FS.createPath("/",n,!0,!0),this._module.FS.createDataFile("/",i,r,!0,!0,!0),new Resource(i,n)}async _loadZipFile(e){const t=new Uint8Array(e),r=mkstemp("/assets/"),n=new Unpacker(this._module.FS);await n.extract(t,r);const i=[];for(const e of n.files){const{ext:t}=splitpath(e.filename);Emb3DViewer.knownModelExtensions.includes(t)&&i.push(`${r}/${e.filename}`)}if(i.length)return i.sort(),new Resource(i[0],r);rmtree(this._module.FS,r),this._throw("Loading failed")}_throw(e){const t=e instanceof Error?e.message:String(e);if(this._error.textContent=t,this._error.classList.add("show"),e instanceof Error)throw e;throw new Error(t)}async loadModel(e,t,r){this._error.classList.remove("show"),this._activeModel&&this._throw("Model already loaded, unload first"),""===(t??"")&&this._throw("Invalid model url"),this._progress.classList.add("show");try{this._emb3d.cc_resource_exists(e)||await this._loadFromUrl(e,t,r),this._addInstance(e),this._drag.classList.add("show"),["mousedown","wheel","touchstart"].forEach((e=>{this.addEventListener(e,(()=>this._drag.classList.remove("show")),{once:!0})})),this.dispatchEvent(new CustomEvent("load",{detail:t}))}catch(e){this._throw(e)}finally{this._progress.classList.remove("show")}}async loadFile(e,t){this._error.classList.remove("show"),e||this._throw("Missing source file"),this._activeModel&&this._throw("Model already loaded, unload first");const r=e.name;"zip"==(t=t??splitpath(r).ext)||"mzip"===t||Emb3DViewer.knownModelExtensions.includes(t)||this._throw("File type not supported");const n=await e.arrayBuffer();this._progress.classList.add("show");try{this._emb3d.cc_resource_exists(r)||await this._loadFromBuffer(n,r,t),this._addInstance(r)}catch(e){this._throw(e)}finally{this._progress.classList.remove("show")}}async _loadFromUrl(e,t,r){if("zip"!=(r=r??splitpath(t).ext)&&"mzip"!==r&&!Emb3DViewer.knownModelExtensions.includes(r))throw new Error("File type not supported");const n={credentials:this.withCredentials?"include":"omit"},i=await fetch(t,n);if(!i.ok)throw new Error(`Failed to download model: ${i.status} - ${i.statusText}`);const a=await i.arrayBuffer();return this._loadFromBuffer(a,e,r)}async _loadFromBuffer(e,t,r){let n;if(n="zip"===r||"mzip"===r?await this._loadZipFile(e):this._loadSingleFile(e,r),this.resource_remove(t),this._emb3d.cc_resource_load_from_url(t,n.assetPath,n.searchPath))return this._resources[t]=n;throw new Error(`Loading resource from url failed: ${this._emb3d.cc_get_last_error()}`)}async convertResource(e,t){if(!e||!t)throw new Error("Invalid arguments");const r=this._resources[e];if(!r)throw new Error("Asset not found");const{basename:n}=splitpath(r.assetPath),i=mkstemp("/tmp/"),a=`${i}/${n}.${t}`;this._module.FS.createPath("/",i,!0,!0);try{if(!this._emb3d.cc_asset_convert(r.assetPath,r.searchPath,-1,a))throw new Error(`Model conversion failed: ${this._emb3d.cc_get_last_error()}`);return this._module.FS.readFile(a)}finally{rmtree(this._module.FS,i)}}async convertBuffer(e,t,r){if(!e||!t||!r)throw new Error("Invalid arguments");const n=new Uint8Array(e),i=mkstemp("/tmp/"),a=`${i}/asset.${t}`;this._module.FS.createPath("/",i,!0,!0),this._module.FS.createDataFile("/",a,n,!0,!0,!0);const o=mkstemp("/tmp/"),s=`${o}/asset.${r}`;this._module.FS.createPath("/",o,!0,!0);try{if(!this._emb3d.cc_asset_convert(a,i,-1,s))throw new Error(`Model conversion failed: ${this._emb3d.cc_get_last_error()}`);return this._module.FS.readFile(s)}finally{rmtree(this._module.FS,i),rmtree(this._module.FS,o)}}async convertFile(e,t,r){if(!e||!t)throw new Error("Invalid arguments");if("zip"!=(r=r??splitpath(e.name).ext)&&"mzip"!==r&&!Emb3DViewer.knownModelExtensions.includes(r))throw new Error("File type not supported");const n=await e.arrayBuffer();return this.convertBuffer(n,r,t)}resource_remove(e){return this._resources[e]&&(rmtree(this._module.FS,this._resources[e].searchPath),delete this._resources[e]),this._emb3d.cc_resource_remove(e)}}Emb3DViewer.knownModelExtensions=["emb3d","3ds","ase","dae","fbx","glb","gltf","obj","ply","stl"],Emb3DViewer.API_MODULE_NOT_LOADED=Symbol("API_MODULE_NOT_LOADED"),Emb3DViewer.MODULE_NOT_LOADED=Symbol("MODULE_NOT_LOADED"),__decorate([i(".container")],Emb3DViewer.prototype,"_container",void 0),__decorate([i(".userInput")],Emb3DViewer.prototype,"_userInput",void 0),__decorate([i(".progress")],Emb3DViewer.prototype,"_progress",void 0),__decorate([i(".drag")],Emb3DViewer.prototype,"_drag",void 0),__decorate([i(".error")],Emb3DViewer.prototype,"_error",void 0),__decorate([i("canvas")],Emb3DViewer.prototype,"_canvas",void 0),__decorate([e$1({type:Boolean,attribute:"with-credentials"})],Emb3DViewer.prototype,"withCredentials",void 0),__decorate([e$1({reflect:!0})],Emb3DViewer.prototype,"light",void 0),__decorate([e$1()],Emb3DViewer.prototype,"key",void 0),__decorate([e$1({reflect:!0})],Emb3DViewer.prototype,"src",void 0),__decorate([e$1({reflect:!0})],Emb3DViewer.prototype,"alt",void 0),customElements.define("emb3d-viewer",Emb3DViewer);
