@arcgis/core 4.29.0-next.20240112 → 4.29.0-next.20240113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Map.js +1 -1
- package/UndoRedo.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{607b61026ec6b6f23adf.js → 62c58c77fad19155ceec.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ed62b2563ef76774bcd.js → 823b6aaddcec3a1a20db.js} +1 -1
- package/assets/esri/core/workers/chunks/{1187ba315883ff27e2d9.js → 854991c9d110044ca0c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{16060120af544bf3d7df.js → fbf359935ac5e33352eb.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/lyr3DWorker.js +1 -1
- package/layers/WFSLayer.js +1 -1
- package/layers/graphics/sources/WFSSourceWorker.js +1 -1
- package/package.json +2 -2
- package/renderers/support/HeatmapColorStop.js +1 -1
- package/support/revision.js +1 -1
- package/undoredo/OperationStatus.js +5 -0
- package/undoredo/UndoRedoError.js +5 -0
- package/undoredo/UndoableOperation.js +5 -0
- package/views/2d/engine/vectorTiles/TileManager.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/3d/effects/RenderNode.js +1 -1
- package/views/3d/externalRenderers/ExternalRenderNode.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1419],{13867:(e,t,s)=>{s.d(t,{z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=e.id+t,i=this._db.get(s);return i?i.size:0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forEach((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=l,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),S.prune(),w.prune(),v.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(p(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;p(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!p(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(p(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(w.clear(),v.clear();s||w.length>0;){if(s||(s=w.pop(),n=w.data[w.length-1],r=v.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),w.push(s),this._condense(w),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(w.push(s),v.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(S.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else S.pushArray(s.children);s=S.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new R(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const h=Math.ceil(n/r),u=h*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,h,this._compareMinY);for(let s=n;s<=t;s+=h){const n=Math.min(s+h-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),h=m(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);w.clear();const r=this._chooseSubtree(n,this._data,t,w);for(r.children.push(e),u(r,n);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;this._adjustParentBBoxes(n,w,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),h=s.leaf?new R(o):new B(o);h.height=s.height,a(s,this._toBBox),a(h,this._toBBox),t?e.data[t-1].children.push(h):this._splitRoot(s,h)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),u=_(t,a),l=d(t)+d(a);u<i?(i=u,r=o,n=l<n?l:n):u===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:l,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new R([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.Z,S=new n.Z,w=new n.Z,v=new n.Z({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class b extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class R extends b{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends b{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>h,Z_:()=>_,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>p}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function h(e,t,s={}){return l(e,t,s,f)}function u(e,t,s={}){return l(e,t,s,m)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,l=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.hw)(l),s(e)}const f=h(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.kB)((()=>{f.remove(),c()})),l}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{h(),r((0,o.zE)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,m,t)}function f(e){return!0}function m(e){return!!e}s(87538);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},16306:(e,t,s)=>{s.d(t,{aX:()=>v});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),h=s(73913),u=s(8744),l=s(40488),c=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function _(e,t,s){const i="string"==typeof e?(0,m.mN)(e):e,n=t[0].spatialReference,r=(0,d.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.B9)(n),geometries:JSON.stringify((h=t,{geometryType:(0,d.Ji)(h[0]),geometries:h.map((e=>e.toJSON()))}))}},{data:a}=await(0,c.Z)(i.path+"/simplify",o);var h;return function(e,t,s){const i=(0,d.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}(a.geometries,r,n)}const g=()=>r.Z.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.Z(e)}const s=(0,h.x3)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/h,l=(o-n)/h,c=h/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=l*i+n,a=u*i+r;s.push([o,a])}const e=(h+Math.floor(c-1)*t)/2,i=l*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:i,spatialReference:e.spatialReference}):new a.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.Sx)(t,!0)}return s&&(e=(0,h.Sy)(e,s)),e}function S(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.XZ)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.XZ)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.XZ)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.XZ)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.x3)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.XZ)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.x3)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.x3)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,m,p,y,I,b,R,B,z=0;const M=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,m=(0,u.C5)(r),p=r.isWebMercator,b=p?102100:4326,y=h.UZ[b].maxX,I=h.UZ[b].minX,R=h.UZ[b].plus180Line,B=h.UZ[b].minus180Line),m)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(S(t.clone(),y,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,y,I))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,m);C.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,h.XZ)(e.xmin,I)*(2*y);let i=0===s?t.clone():(0,h.Sy)(t.clone(),s);e.offset(s,0),e.intersects(R)&&e.xmax!==y?(z=e.xmax>z?e.xmax:z,i=x(i,p),M.push(i),C.push("cut")):e.intersects(B)&&e.xmin!==I?(z=e.xmax*(2*y)>z?e.xmax*(2*y):z,i=x(i,p,360),M.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let F=(0,h.XZ)(z,y),X=-90;const Z=F,E=new a.Z;for(;F>0;){const e=360*F-180;E.addPath([[e,X],[e,-1*X]]),X*=-1,F--}if(M.length>0&&Z>0){const t=w(M,await async function(e,t,s,i){const n=(0,f.en)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.B9)(r),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.Z)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.im)(e);return t.spatialReference=r,t}))}}(n,M,E,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(p?(0,l.$)(n):n)}}if(!i.length)return r;const o=await _(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(p?(0,l.$)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)L.push(t);else{const e=M.shift();L.push(!0===p?(0,l.$)(e):e)}}return L}},73913:(e,t,s)=>{s.d(t,{Sy:()=>h,UZ:()=>o,XZ:()=>a,x3:()=>u});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.oU)(e)?e.rings:e.paths}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},78990:(e,t,s)=>{s.d(t,{Z:()=>m});var i=s(67676),n=s(20102),r=s(32448),o=s(92604),a=s(60437),h=s(24470),u=s(98732),l=s(37549),c=s(42712),d=s(65326);const f=(0,a.Ue)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new l.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=d.n}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.$)(null!=i?i:(0,h.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.$)((0,h.Ue)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},43230:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(66643),n=s(20102),r=s(92604),o=s(95330),a=s(20941),h=s(8744),u=s(98732),l=s(78990),c=s(37427),d=s(3489),f=s(92722),m=s(23095),_=s(78089),g=s(99514),p=s(25031);const y="esri.layers.WFSLayer";class x{constructor(){this._customParameters=null,this._queryEngine=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:s,getFeatureOutputFormat:i,fields:r,geometryType:a,featureType:h,maxRecordCount:u,maxTotalRecordCount:f,maxPageCount:m,objectIdField:y,customParameters:x}=e,{spatialReference:w,getFeatureSpatialReference:v}=(0,_.fU)(s,h,e.spatialReference);try{await(0,c._W)(v,w)}catch{throw new n.Z("unsupported-projection","Projection not supported",{inSpatialReference:v,outSpatialReference:w})}(0,o.k_)(t),this._customParameters=x,this._featureType=h,this._fieldsIndex=g.Z.fromLayerJSON({fields:r,dateFieldsTimeReference:r.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:p.pt}:null}),this._geometryType=a,this._getFeatureUrl=s,this._getFeatureOutputFormat=i,this._getFeatureSpatialReference=v,this._maxRecordCount=u,this._maxTotalRecordCount=f,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=w;const I=await this._snapshotFeatures(t);if(I.errors.length>0)throw I.errors[0];return this._queryEngine=new d.q({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:w,timeInfo:null,featureStore:new l.Z({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(I.features),{warnings:S(I),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,i.vr)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of S(e))r.Z.getLogger(y).warn(new a.Z("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&r.Z.getLogger(y).warn(new a.Z("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,s=this._maxTotalRecordCount,i=this._maxPageCount,n=await(0,_.bx)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t});let r=[];const a=[];if(null==n)try{r=await this._singleQuery(t)}catch(e){(0,o.D_)(e)||a.push(e)}else{const e=Math.min(n,s),h=function*(e,t,s){for(let i=0;i<t;i++)yield e._pageQuery(i,s)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),i)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,s){let i=e.next();for(;!i.done;){try{const e=await i.value;t.push(...e)}catch(e){(0,o.D_)(e)||s.push(e)}i=e.next()}}(h,r,a))))}return(0,o.k_)(t),{features:r,totalRecordCount:n,maxTotalRecordCount:s,maxPageCount:i,errors:a}}async _singleQuery(e){const t=await(0,_.Bm)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,e)}async _pageQuery(e,t){const s=await(0,_.Bm)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:e*this._maxRecordCount,count:this._maxRecordCount,signal:t});return this._processGeoJSON(s,t)}_processGeoJSON(e,t){(0,f.O3)(e,this._getFeatureSpatialReference.wkid),(0,o.k_)(t);const s=(0,f.lG)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,h.fS)(this._spatialReference,this._getFeatureSpatialReference))for(const e of s)null!=e.geometry&&(e.geometry=(0,u.GH)((0,c.iV)((0,u.di)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let i=1;for(const e of s){const t={};(0,m.O0)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=i++)}return s}}function S(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},23095:(e,t,s)=>{s.d(t,{O0:()=>d,av:()=>h,b:()=>g,d1:()=>l,og:()=>_});var i=s(20188),n=s(8744),r=s(73012);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.Qc)(o,a);if(e)return h((0,r.vP)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.H7)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.qN)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.y2)(e)&&"string"==typeof t&&(s=(0,i.sG)(t)),(0,r.Pz)(s)}let m;function _(e,t){if(!e||!(0,n.JY)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,n.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(5837),s.e(5946)]).then(s.bind(s,30247))),m}()}},66677:(e,t,s)=>{s.d(t,{B5:()=>l,DR:()=>d,G:()=>x,M8:()=>_,Nm:()=>g,Qc:()=>c,XG:()=>p,a7:()=>m,ld:()=>f,wH:()=>y});var i=s(17452),n=s(25929);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function l(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),s=t?.path.match(a)||t?.path.match(h);if(!s)return null;const[,n,o,u,l]=s,c=o.indexOf("/");return{title:f(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=l&&""!==l?parseInt(l,10):null,url:{path:n}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=f(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function p(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function x(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},11282:(e,t,s)=>{s.d(t,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.mN)(e):(0,i.d9)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let e=0;e<r.length;e++)i[n][e]=a(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(71058)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1419],{13867:(e,t,s)=>{s.d(t,{z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=e.id+t,i=this._db.get(s);return i?i.size:0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forEach((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=l,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),S.prune(),w.prune(),v.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(p(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;p(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!p(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(p(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(w.clear(),v.clear();s||w.length>0;){if(s||(s=w.pop(),n=w.data[w.length-1],r=v.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),w.push(s),this._condense(w),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(w.push(s),v.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(S.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else S.pushArray(s.children);s=S.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new R(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const h=Math.ceil(n/r),u=h*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,h,this._compareMinY);for(let s=n;s<=t;s+=h){const n=Math.min(s+h-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),h=m(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);w.clear();const r=this._chooseSubtree(n,this._data,t,w);for(r.children.push(e),u(r,n);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;this._adjustParentBBoxes(n,w,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),h=s.leaf?new R(o):new B(o);h.height=s.height,a(s,this._toBBox),a(h,this._toBBox),t?e.data[t-1].children.push(h):this._splitRoot(s,h)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),u=_(t,a),l=d(t)+d(a);u<i?(i=u,r=o,n=l<n?l:n):u===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:l,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new R([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.Z,S=new n.Z,w=new n.Z,v=new n.Z({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class b extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class R extends b{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends b{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>h,Z_:()=>_,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>p}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function h(e,t,s={}){return l(e,t,s,f)}function u(e,t,s={}){return l(e,t,s,m)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,l=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.hw)(l),s(e)}const f=h(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.kB)((()=>{f.remove(),c()})),l}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{h(),r((0,o.zE)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,m,t)}function f(e){return!0}function m(e){return!!e}s(87538);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},16306:(e,t,s)=>{s.d(t,{aX:()=>v});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),h=s(73913),u=s(8744),l=s(40488),c=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function _(e,t,s){const i="string"==typeof e?(0,m.mN)(e):e,n=t[0].spatialReference,r=(0,d.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.B9)(n),geometries:JSON.stringify((h=t,{geometryType:(0,d.Ji)(h[0]),geometries:h.map((e=>e.toJSON()))}))}},{data:a}=await(0,c.Z)(i.path+"/simplify",o);var h;return function(e,t,s){const i=(0,d.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}(a.geometries,r,n)}const g=()=>r.Z.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.Z(e)}const s=(0,h.x3)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/h,l=(o-n)/h,c=h/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=l*i+n,a=u*i+r;s.push([o,a])}const e=(h+Math.floor(c-1)*t)/2,i=l*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:i,spatialReference:e.spatialReference}):new a.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.Sx)(t,!0)}return s&&(e=(0,h.Sy)(e,s)),e}function S(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.XZ)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.XZ)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.XZ)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.XZ)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.x3)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.XZ)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.x3)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.x3)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,m,p,y,I,b,R,B,z=0;const M=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,m=(0,u.C5)(r),p=r.isWebMercator,b=p?102100:4326,y=h.UZ[b].maxX,I=h.UZ[b].minX,R=h.UZ[b].plus180Line,B=h.UZ[b].minus180Line),m)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(S(t.clone(),y,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,y,I))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,m);C.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,h.XZ)(e.xmin,I)*(2*y);let i=0===s?t.clone():(0,h.Sy)(t.clone(),s);e.offset(s,0),e.intersects(R)&&e.xmax!==y?(z=e.xmax>z?e.xmax:z,i=x(i,p),M.push(i),C.push("cut")):e.intersects(B)&&e.xmin!==I?(z=e.xmax*(2*y)>z?e.xmax*(2*y):z,i=x(i,p,360),M.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let F=(0,h.XZ)(z,y),X=-90;const Z=F,E=new a.Z;for(;F>0;){const e=360*F-180;E.addPath([[e,X],[e,-1*X]]),X*=-1,F--}if(M.length>0&&Z>0){const t=w(M,await async function(e,t,s,i){const n=(0,f.en)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.B9)(r),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.Z)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.im)(e);return t.spatialReference=r,t}))}}(n,M,E,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(p?(0,l.$)(n):n)}}if(!i.length)return r;const o=await _(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(p?(0,l.$)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)L.push(t);else{const e=M.shift();L.push(!0===p?(0,l.$)(e):e)}}return L}},73913:(e,t,s)=>{s.d(t,{Sy:()=>h,UZ:()=>o,XZ:()=>a,x3:()=>u});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.oU)(e)?e.rings:e.paths}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},78990:(e,t,s)=>{s.d(t,{Z:()=>m});var i=s(67676),n=s(20102),r=s(32448),o=s(92604),a=s(60437),h=s(24470),u=s(98732),l=s(37549),c=s(42712),d=s(65326);const f=(0,a.Ue)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new l.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=d.n}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.$)(null!=i?i:(0,h.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.$)((0,h.Ue)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},43230:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(66643),n=s(20102),r=s(92604),o=s(95330),a=s(20941),h=s(8744),u=s(98732),l=s(78990),c=s(37427),d=s(3489),f=s(92722),m=s(23095),_=s(78089),g=s(99514),p=s(25031);const y="esri.layers.WFSLayer";class x{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:s,getFeatureOutputFormat:i,fields:r,geometryType:a,featureType:h,maxRecordCount:u,maxTotalRecordCount:f,maxPageCount:m,objectIdField:y,customParameters:x}=e,{spatialReference:w,getFeatureSpatialReference:v}=(0,_.fU)(s,h,e.spatialReference);try{await(0,c._W)(v,w)}catch{throw new n.Z("unsupported-projection","Projection not supported",{inSpatialReference:v,outSpatialReference:w})}(0,o.k_)(t),this._customParameters=x,this._featureType=h,this._fieldsIndex=g.Z.fromLayerJSON({fields:r,dateFieldsTimeReference:r.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:p.pt}:null}),this._geometryType=a,this._getFeatureUrl=s,this._getFeatureOutputFormat=i,this._getFeatureSpatialReference=v,this._maxRecordCount=u,this._maxTotalRecordCount=f,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=w;let I=await this._snapshotFeatures(t);if(I.errors.length>0&&(this._supportsPagination=!1,I=await this._snapshotFeatures(t),I.errors.length>0))throw I.errors[0];return this._queryEngine=new d.q({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:w,timeInfo:null,featureStore:new l.Z({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(I.features),{warnings:S(I),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,i.vr)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of S(e))r.Z.getLogger(y).warn(new a.Z("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&r.Z.getLogger(y).warn(new a.Z("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,s=this._maxTotalRecordCount,i=this._maxPageCount,n=this._supportsPagination?await(0,_.bx)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let r=[];const a=[];if(null==n)try{r=await this._singleQuery(t)}catch(e){(0,o.D_)(e)||a.push(e)}else{const e=Math.min(n,s),h=function*(e,t,s){for(let i=0;i<t;i++)yield e._pageQuery(i,s)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),i)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,s){let i=e.next();for(;!i.done;){try{const e=await i.value;t.push(...e)}catch(e){(0,o.D_)(e)||s.push(e)}i=e.next()}}(h,r,a))))}return(0,o.k_)(t),{features:r,totalRecordCount:n,maxTotalRecordCount:s,maxPageCount:i,errors:a}}async _singleQuery(e){const t=await(0,_.Bm)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,e)}async _pageQuery(e,t){const s=await(0,_.Bm)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:e*this._maxRecordCount,count:this._maxRecordCount,signal:t});return this._processGeoJSON(s,t)}_processGeoJSON(e,t){(0,f.O3)(e,this._getFeatureSpatialReference.wkid),(0,o.k_)(t);const s=(0,f.lG)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,h.fS)(this._spatialReference,this._getFeatureSpatialReference))for(const e of s)null!=e.geometry&&(e.geometry=(0,u.GH)((0,c.iV)((0,u.di)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let i=1;for(const e of s){const t={};(0,m.O0)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=i++)}return s}}function S(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},23095:(e,t,s)=>{s.d(t,{O0:()=>d,av:()=>h,b:()=>g,d1:()=>l,og:()=>_});var i=s(20188),n=s(8744),r=s(73012);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.Qc)(o,a);if(e)return h((0,r.vP)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.H7)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.qN)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.y2)(e)&&"string"==typeof t&&(s=(0,i.sG)(t)),(0,r.Pz)(s)}let m;function _(e,t){if(!e||!(0,n.JY)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,n.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(5837),s.e(5946)]).then(s.bind(s,30247))),m}()}},66677:(e,t,s)=>{s.d(t,{B5:()=>l,DR:()=>d,G:()=>x,M8:()=>_,Nm:()=>g,Qc:()=>c,XG:()=>p,a7:()=>m,ld:()=>f,wH:()=>y});var i=s(17452),n=s(25929);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function l(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),s=t?.path.match(a)||t?.path.match(h);if(!s)return null;const[,n,o,u,l]=s,c=o.indexOf("/");return{title:f(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=l&&""!==l?parseInt(l,10):null,url:{path:n}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=f(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function p(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function x(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},11282:(e,t,s)=>{s.d(t,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.mN)(e):(0,i.d9)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let e=0;e<r.length;e++)i[n][e]=a(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(71058)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3914,5732],{5732:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},73914:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(5732),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Fr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=t>0?t:Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=ue.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=n?"":`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.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),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(0==(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(0==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(0==(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new ue.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e},xe=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Re=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),xe(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Oe=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},ze=[],We=e=>{var r=ze[e];return r||(e>=ze.length&&(ze.length=e+1),ze[e]=r=Se.get(e)),r},Ne=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):We(r).apply(null,t))(e,r,t)}})(e,r):We(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Le=e=>{var r=gr(e),t=be(r);return vr(r),t},Be=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>y[e>>0];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Ue(e){return this.fromWireType(_[e>>2])}var Ie,He="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ye=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&He)return He.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},qe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Ve=e=>2*e.length,Xe=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ge=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Je=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Ke=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Le(e)),t},Ze={},Qe=e=>{var r=Ze[e];return void 0===r?be(e):r},er=[],rr=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},tr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},nr={},or=()=>{if(!or.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",_:l||"./this.program"};for(var r in nr)void 0===nr[r]?delete e[r]:e[r]=nr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);or.strings=t}return or.strings},ar=e=>e%4==0&&(e%100!=0||e%400==0),ir=[31,29,31,30,31,30,31,31,30,31,30,31],sr=[31,28,31,30,31,30,31,31,30,31,30,31],ur=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},lr=[],dr=(e,r)=>{Se.set(e,r),ze[e]=Se.get(e)},cr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,hr=146;Object.defineProperties(cr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},write:{get:function(){return(this.mode&hr)===hr},set:function(e){e?this.mode|=hr:this.mode&=~hr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=cr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return{[e=je(e)]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var mr={k:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[wr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},M:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},U:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},F:(e,r,t,n,o)=>{},Q:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},P:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=Ne(n,o),Re(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Le).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Oe(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},d:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Be(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return vr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=yr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(vr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(vr,a),a},argPackAdvance:8,readValueFromPointer:Ue,destructorFunction(e){vr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=Ye,o=qe,i=Ve,a=()=>g,s=1):4===r&&(n=Xe,o=Ge,i=Je,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return vr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=yr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(vr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){vr(e)}})},V:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:Ne(t,n),rawDestructor:Ne(o,a),fields:[]}},l:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:Ne(n,o),getterContext:a,setterArgumentType:i,setter:Ne(s,u),setterContext:l})},R:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},T:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},H:()=>{throw 1/0},W:(e,r,t)=>{e=$e(e),r=Ke(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=er[e])(r=$e(r),t=Qe(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,X:e=>0===e?Ce(rr()):(e=Qe(e),Ce(rr()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Ke(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=er.length;return er.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},j:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),i:e=>{e>4&&(Pe.get(e).refcount+=1)},g:e=>Ce(Qe(e)),s:e=>{var r=$e(e);fe(r),Te(e)},m:(e,r)=>{var t=(e=Ke(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},O:(e,r,t)=>y.copyWithin(e,r,r+t),I:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(tr(i))return!0}return!1},J:(e,r)=>{var t=0;return or().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0})(n,a),t+=n.length+1})),0},K:(e,r)=>{var t=or();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},S:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},L:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},E:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=br();try{return We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},h:function(e,r,t){var n=br();try{return We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},o:function(e,r,t,n){var o=br();try{return We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},t:function(e,r,t,n,o){var a=br();try{return We(e)(r,t,n,o)}catch(e){if(kr(a),e!==e+0)throw e;_r(1,0)}},D:function(e,r,t,n,o,a,i,s,u,l){var d=br();try{return We(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(kr(d),e!==e+0)throw e;_r(1,0)}},u:function(e){var r=br();try{We(e)()}catch(e){if(kr(r),e!==e+0)throw e;_r(1,0)}},c:function(e,r){var t=br();try{We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},C:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},e:function(e,r,t){var n=br();try{We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},f:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},G:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),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 u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.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 r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=ar(t.getFullYear()),o=t.getMonth(),a=(n?ir:sr)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),a=m(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(ar(e.tm_year+1900)?ir:sr,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&ar(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ar(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},pr=function(){var e={a:mr};function r(e,r){return pr=e.exports,h=pr.Y,S(),Se=pr._,function(e){P.unshift(e)}(pr.Z),R(),pr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),vr=n._free=e=>(vr=n._free=pr.$)(e),yr=n._malloc=e=>(yr=n._malloc=pr.aa)(e),wr=()=>(wr=pr.ba)(),gr=e=>(gr=pr.ca)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=pr.da)();var Er,_r=(e,r)=>(_r=pr.ea)(e,r),br=()=>(br=pr.fa)(),kr=e=>(kr=pr.ga)(e),Fr=e=>(Fr=pr.ha)(e);function Ar(){function e(){Er||(Er=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=pr.ia)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=pr.ja)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=pr.ka)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=pr.la)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=pr.ma)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=pr.na)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=pr.oa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273512,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ie||(Ie=new WeakMap,((e,r)=>{if(Ie)for(var t=0;t<0+r;t++){var n=We(t);n&&Ie.set(n,t)}})(0,Se.length)),Ie.get(e)||0))(e);if(t)return t;var n=(()=>{if(lr.length)return lr.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{dr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),ur(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];ur(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);dr(n,o)}return Ie.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){Er||Ar(),Er||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ar(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3914,5732],{5732:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},73914:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(5732),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Fr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=t>0?t:Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=ue.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=n?"":`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.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),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(0==(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(0==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(0==(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new ue.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e},xe=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Re=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),xe(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Oe=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},ze=[],We=e=>{var r=ze[e];return r||(e>=ze.length&&(ze.length=e+1),ze[e]=r=Se.get(e)),r},Ne=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):We(r).apply(null,t))(e,r,t)}})(e,r):We(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Le=e=>{var r=gr(e),t=be(r);return vr(r),t},Be=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>y[e>>0];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Ue(e){return this.fromWireType(_[e>>2])}var Ie,He="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ye=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&He)return He.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},qe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Ve=e=>2*e.length,Xe=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ge=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Je=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Ke=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Le(e)),t},Ze={},Qe=e=>{var r=Ze[e];return void 0===r?be(e):r},er=[],rr=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},tr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},nr={},or=()=>{if(!or.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",_:l||"./this.program"};for(var r in nr)void 0===nr[r]?delete e[r]:e[r]=nr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);or.strings=t}return or.strings},ar=e=>e%4==0&&(e%100!=0||e%400==0),ir=[31,29,31,30,31,30,31,31,30,31,30,31],sr=[31,28,31,30,31,30,31,31,30,31,30,31],ur=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},lr=[],dr=(e,r)=>{Se.set(e,r),ze[e]=Se.get(e)},cr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,hr=146;Object.defineProperties(cr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},write:{get:function(){return(this.mode&hr)===hr},set:function(e){e?this.mode|=hr:this.mode&=~hr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=cr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return{[e=je(e)]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var mr={k:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[wr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},M:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},U:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},F:(e,r,t,n,o)=>{},Q:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},P:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=Ne(n,o),Re(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Le).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Oe(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},d:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Be(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return vr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=yr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(vr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(vr,a),a},argPackAdvance:8,readValueFromPointer:Ue,destructorFunction(e){vr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=Ye,o=qe,i=Ve,a=()=>g,s=1):4===r&&(n=Xe,o=Ge,i=Je,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return vr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=yr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(vr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){vr(e)}})},V:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:Ne(t,n),rawDestructor:Ne(o,a),fields:[]}},l:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:Ne(n,o),getterContext:a,setterArgumentType:i,setter:Ne(s,u),setterContext:l})},R:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},T:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},H:()=>{throw 1/0},W:(e,r,t)=>{e=$e(e),r=Ke(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=er[e])(r=$e(r),t=Qe(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,X:e=>0===e?Ce(rr()):(e=Qe(e),Ce(rr()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Ke(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=er.length;return er.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},j:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),i:e=>{e>4&&(Pe.get(e).refcount+=1)},g:e=>Ce(Qe(e)),s:e=>{var r=$e(e);fe(r),Te(e)},m:(e,r)=>{var t=(e=Ke(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},O:(e,r,t)=>y.copyWithin(e,r,r+t),I:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(tr(i))return!0}return!1},J:(e,r)=>{var t=0;return or().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0})(n,a),t+=n.length+1})),0},K:(e,r)=>{var t=or();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},S:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},L:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},E:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=br();try{return We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},h:function(e,r,t){var n=br();try{return We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},o:function(e,r,t,n){var o=br();try{return We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},t:function(e,r,t,n,o){var a=br();try{return We(e)(r,t,n,o)}catch(e){if(kr(a),e!==e+0)throw e;_r(1,0)}},D:function(e,r,t,n,o,a,i,s,u,l){var d=br();try{return We(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(kr(d),e!==e+0)throw e;_r(1,0)}},u:function(e){var r=br();try{We(e)()}catch(e){if(kr(r),e!==e+0)throw e;_r(1,0)}},c:function(e,r){var t=br();try{We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},C:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},e:function(e,r,t){var n=br();try{We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},f:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},G:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),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 u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.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 r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=ar(t.getFullYear()),o=t.getMonth(),a=(n?ir:sr)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),a=m(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(ar(e.tm_year+1900)?ir:sr,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&ar(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ar(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},pr=function(){var e={a:mr};function r(e,r){return pr=e.exports,h=pr.Y,S(),Se=pr._,function(e){P.unshift(e)}(pr.Z),R(),pr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),vr=n._free=e=>(vr=n._free=pr.$)(e),yr=n._malloc=e=>(yr=n._malloc=pr.aa)(e),wr=()=>(wr=pr.ba)(),gr=e=>(gr=pr.ca)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=pr.da)();var Er,_r=(e,r)=>(_r=pr.ea)(e,r),br=()=>(br=pr.fa)(),kr=e=>(kr=pr.ga)(e),Fr=e=>(Fr=pr.ha)(e);function Ar(){function e(){Er||(Er=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=pr.ia)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=pr.ja)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=pr.ka)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=pr.la)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=pr.ma)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=pr.na)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=pr.oa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273272,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ie||(Ie=new WeakMap,((e,r)=>{if(Ie)for(var t=0;t<0+r;t++){var n=We(t);n&&Ie.set(n,t)}})(0,Se.length)),Ie.get(e)||0))(e);if(t)return t;var n=(()=>{if(lr.length)return lr.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{dr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),ur(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];ur(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);dr(n,o)}return Ie.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){Er||Ar(),Er||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ar(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
|