diff --git a/libs/loaders/draco.license.md b/libs/loaders/draco.license.md deleted file mode 100644 index 30109545..00000000 --- a/libs/loaders/draco.license.md +++ /dev/null @@ -1,252 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------------------------------------------------------------------- -Files: docs/assets/js/ASCIIMathML.js - -Copyright (c) 2014 Peter Jipsen and other ASCIIMathML.js contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --------------------------------------------------------------------------------- -Files: docs/assets/css/pygments/* - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/libs/loaders/draco_decoder.js b/libs/loaders/draco_decoder.js deleted file mode 100644 index bb5b1224..00000000 --- a/libs/loaders/draco_decoder.js +++ /dev/null @@ -1,117 +0,0 @@ -var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(k){var n=0;return function(){return n>>0,$jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE? -$jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+l+"$"+h),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:n})))}; -$jscomp.polyfill("Promise",function(k){function n(){this.batch_=null}function l(f){return f instanceof h?f:new h(function(q,v){q(f)})}if(k&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return k;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)}; -var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q=A}},"es6","es3"); -$jscomp.polyfill("Array.prototype.copyWithin",function(k){function n(l){l=Number(l);return Infinity===l||-Infinity===l?l:l|0}return k?k:function(l,p,h){var A=this.length;l=n(l);p=n(p);h=void 0===h?A:n(h);l=0>l?Math.max(A+l,0):Math.min(l,A);p=0>p?Math.max(A+p,0):Math.min(p,A);h=0>h?Math.max(A+h,0):Math.min(h,A);if(lp;)--h in this?this[--l]=this[h]:delete this[--l];return this}},"es6","es3"); -$jscomp.typedArrayCopyWithin=function(k){return k?k:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); -$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); -var DracoDecoderModule=function(){var k="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(k=k||__filename);return function(n){function l(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b,c){var d=b+c;for(c=b;e[c]&&!(c>=d);)++c;if(16g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function h(e,b){return e?p(ea,e,b):""}function A(){var e=ja.buffer;a.HEAP8=Y=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ea=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=V=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function f(e){if(a.onAbort)a.onAbort(e); -e="Aborted("+e+")";da(e);wa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function q(e){try{if(e==P&&fa)return new Uint8Array(fa);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){f(b)}}function v(){if(!fa&&(xa||ha)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return q(P)}); -if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return q(P)})}function z(e){for(;0>2]=b};this.get_type=function(){return V[this.ptr+4>>2]};this.set_destructor=function(b){V[this.ptr+8>>2]=b};this.get_destructor=function(){return V[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){Y[this.ptr+ -12>>0]=b?1:0};this.get_caught=function(){return 0!=Y[this.ptr+12>>0]};this.set_rethrown=function(b){Y[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Y[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){V[this.ptr+ -16>>2]=b};this.get_adjusted_ptr=function(){return V[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ya(this.get_type()))return V[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function ba(){function e(){if(!la&&(la=!0,a.calledRun=!0,!wa)){za=!0;z(oa);Aa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ba.unshift(a.postRun.shift());z(Ba)}}if(!(0=d?b++:2047>=d?b+=2:55296<=d&&57343>= -d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0=u){var X=e.charCodeAt(++g);u=65536+((u&1023)<<10)|X&1023}if(127>=u){if(c>=d)break;b[c++]=u}else{if(2047>=u){if(c+1>=d)break;b[c++]=192|u>>6}else{if(65535>=u){if(c+2>=d)break;b[c++]=224|u>>12}else{if(c+3>=d)break;b[c++]=240|u>>18;b[c++]=128|u>>12&63}b[c++]=128|u>>6&63}b[c++]=128|u&63}}b[c]=0}e=r.alloc(b,Y);r.copy(b,Y,e);return e}return e}function pa(e){if("object"===typeof e){var b= -r.alloc(e,Y);r.copy(e,Y,b);return b}return e}function Z(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=Da();x(S)[this.ptr]=this}function Q(){this.ptr=Ea();x(Q)[this.ptr]=this}function W(){this.ptr=Fa();x(W)[this.ptr]=this}function w(){this.ptr=Ga();x(w)[this.ptr]=this}function C(){this.ptr=Ha();x(C)[this.ptr]=this}function F(){this.ptr=Ia();x(F)[this.ptr]=this}function G(){this.ptr=Ja();x(G)[this.ptr]=this}function E(){this.ptr=Ka();x(E)[this.ptr]=this}function T(){this.ptr= -La();x(T)[this.ptr]=this}function B(){throw"cannot construct a Status, no constructor in IDL";}function H(){this.ptr=Ma();x(H)[this.ptr]=this}function I(){this.ptr=Na();x(I)[this.ptr]=this}function J(){this.ptr=Oa();x(J)[this.ptr]=this}function K(){this.ptr=Pa();x(K)[this.ptr]=this}function L(){this.ptr=Qa();x(L)[this.ptr]=this}function M(){this.ptr=Ra();x(M)[this.ptr]=this}function N(){this.ptr=Sa();x(N)[this.ptr]=this}function y(){this.ptr=Ta();x(y)[this.ptr]=this}function m(){this.ptr=Ua();x(m)[this.ptr]= -this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},Aa,ka;a.ready=new Promise(function(e,b){Aa=e;ka=b});var Va=!1,Wa=!1;a.onRuntimeInitialized=function(){Va=!0;if(Wa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Wa=!0;if(Va&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3=e[1]?!0:0!=e[0]||10>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);A();var u=1;break a}catch(X){}u=void 0}if(u)return!0}return!1},f:function(e){return 52},d:function(e,b,c,d,g){return 70},c:function(e,b,c,d){for(var g=0,u=0;u>2],ab=V[b+4>>2];b+=8;for(var sa=0;sa>2]=g;return 0}};(function(){function e(g,u){a.asm=g.exports;ja=a.asm.h;A();oa.unshift(a.asm.i);aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==ra&&(clearInterval(ra),ra=null),ia&&(g=ia,ia=null,g()))}function b(g){e(g.instance)}function c(g){return v().then(function(u){return WebAssembly.instantiate(u,d)}).then(function(u){return u}).then(g,function(u){da("failed to asynchronously prepare wasm: "+u);f(u)})}var d={a:xd};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa); -if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return fa||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||P.startsWith("file://")||Ya||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(u){da("wasm streaming compile failed: "+u);da("falling back to ArrayBuffer instantiation"); -return c(b)})})})().catch(ka);return{}})();var bb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(bb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.k).apply(null,arguments)},Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.l).apply(null,arguments)},cb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(cb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.m).apply(null,arguments)},db=a._emscripten_bind_DecoderBuffer___destroy___0= -function(){return(db=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.n).apply(null,arguments)},Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.o).apply(null,arguments)},eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(eb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.p).apply(null,arguments)},fb=a._emscripten_bind_AttributeTransformData___destroy___0= -function(){return(fb=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.q).apply(null,arguments)},Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.r).apply(null,arguments)},gb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(gb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.s).apply(null,arguments)},Ga=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ga= -a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.t).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_size_0=function(){return(hb=a._emscripten_bind_PointAttribute_size_0=a.asm.u).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.v).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(jb=a._emscripten_bind_PointAttribute_attribute_type_0= -a.asm.w).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(kb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.x).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(lb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.y).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(mb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.z).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_byte_stride_0= -function(){return(nb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.A).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(ob=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.B).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(pb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.C).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(qb=a._emscripten_bind_PointAttribute___destroy___0= -a.asm.D).apply(null,arguments)},Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.E).apply(null,arguments)},rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.F).apply(null,arguments)},sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0= -function(){return(sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.G).apply(null,arguments)},tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.H).apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.I).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0= -function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.J).apply(null,arguments)},Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.K).apply(null,arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.L).apply(null, -arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.M).apply(null,arguments)},yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.N).apply(null,arguments)},Ja=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ja=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.O).apply(null, -arguments)},zb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(zb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.P).apply(null,arguments)},Ab=a._emscripten_bind_PointCloud_num_points_0=function(){return(Ab=a._emscripten_bind_PointCloud_num_points_0=a.asm.Q).apply(null,arguments)},Bb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Bb=a._emscripten_bind_PointCloud___destroy___0=a.asm.R).apply(null,arguments)},Ka=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ka= -a._emscripten_bind_Mesh_Mesh_0=a.asm.S).apply(null,arguments)},Cb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Cb=a._emscripten_bind_Mesh_num_faces_0=a.asm.T).apply(null,arguments)},Db=a._emscripten_bind_Mesh_num_attributes_0=function(){return(Db=a._emscripten_bind_Mesh_num_attributes_0=a.asm.U).apply(null,arguments)},Eb=a._emscripten_bind_Mesh_num_points_0=function(){return(Eb=a._emscripten_bind_Mesh_num_points_0=a.asm.V).apply(null,arguments)},Fb=a._emscripten_bind_Mesh___destroy___0=function(){return(Fb= -a._emscripten_bind_Mesh___destroy___0=a.asm.W).apply(null,arguments)},La=a._emscripten_bind_Metadata_Metadata_0=function(){return(La=a._emscripten_bind_Metadata_Metadata_0=a.asm.X).apply(null,arguments)},Gb=a._emscripten_bind_Metadata___destroy___0=function(){return(Gb=a._emscripten_bind_Metadata___destroy___0=a.asm.Y).apply(null,arguments)},Hb=a._emscripten_bind_Status_code_0=function(){return(Hb=a._emscripten_bind_Status_code_0=a.asm.Z).apply(null,arguments)},Ib=a._emscripten_bind_Status_ok_0=function(){return(Ib= -a._emscripten_bind_Status_ok_0=a.asm._).apply(null,arguments)},Jb=a._emscripten_bind_Status_error_msg_0=function(){return(Jb=a._emscripten_bind_Status_error_msg_0=a.asm.$).apply(null,arguments)},Kb=a._emscripten_bind_Status___destroy___0=function(){return(Kb=a._emscripten_bind_Status___destroy___0=a.asm.aa).apply(null,arguments)},Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.ba).apply(null,arguments)}, -Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.ca).apply(null,arguments)},Mb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Mb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.da).apply(null,arguments)},Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ea).apply(null,arguments)},Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0= -function(){return(Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.fa).apply(null,arguments)},Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.ga).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Pb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ha).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Qb=a._emscripten_bind_DracoInt8Array___destroy___0= -a.asm.ia).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ja).apply(null,arguments)},Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.ka).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Sb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.la).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt8Array___destroy___0= -function(){return(Tb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ma).apply(null,arguments)},Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.na).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.oa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Vb=a._emscripten_bind_DracoInt16Array_size_0= -a.asm.pa).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.qa).apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.ra).apply(null,arguments)},Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.sa).apply(null,arguments)}, -Yb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Yb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.ta).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ua).apply(null,arguments)},Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.va).apply(null,arguments)},$b=a._emscripten_bind_DracoInt32Array_GetValue_1= -function(){return($b=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.wa).apply(null,arguments)},ac=a._emscripten_bind_DracoInt32Array_size_0=function(){return(ac=a._emscripten_bind_DracoInt32Array_size_0=a.asm.xa).apply(null,arguments)},bc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.ya).apply(null,arguments)},Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0= -a.asm.za).apply(null,arguments)},cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.Aa).apply(null,arguments)},dc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(dc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.Ba).apply(null,arguments)},ec=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.Ca).apply(null,arguments)},Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0= -function(){return(Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Da).apply(null,arguments)},fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ea).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.Fa).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= -a.asm.Ga).apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ha).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Ia).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ja).apply(null,arguments)}, -lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ka).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(mc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.La).apply(null,arguments)},Ua=a._emscripten_bind_Decoder_Decoder_0=function(){return(Ua=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ma).apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(nc= -a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Na).apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.Oa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.Pa).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2= -a.asm.Qa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Ra).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(sc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Sa).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Ta).apply(null,arguments)}, -uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(uc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ua).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Va).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Wa).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2= -function(){return(xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Xa).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Ya).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Za).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ac= -a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm._a).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.$a).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.ab).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Dc= -a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.bb).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.cb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.db).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3= -function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.eb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.fb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.gb).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5= -function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.hb).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.ib).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=a.asm.jb).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2= -function(){return(Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.kb).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.lb).apply(null,arguments)},Oc=a._emscripten_bind_Decoder___destroy___0=function(){return(Oc=a._emscripten_bind_Decoder___destroy___0=a.asm.mb).apply(null,arguments)},Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM= -a.asm.nb).apply(null,arguments)},Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.ob).apply(null,arguments)},Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.pb).apply(null,arguments)},Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM= -function(){return(Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.qb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.rb).apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.sb).apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL= -function(){return(Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.tb).apply(null,arguments)},Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.ub).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.vb).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC= -function(){return(Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.wb).apply(null,arguments)},Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.xb).apply(null,arguments)},$c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return($c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.yb).apply(null,arguments)},ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH= -function(){return(ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.zb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.Ab).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(cd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.Bb).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(dd=a._emscripten_enum_draco_DataType_DT_UINT8= -a.asm.Cb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(ed=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Db).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(fd=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Eb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(gd=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.Fb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_UINT32= -function(){return(hd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Gb).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Hb).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(jd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Ib).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Jb).apply(null, -arguments)},ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Kb).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(md=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Lb).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.Mb).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_OK=function(){return(od= -a._emscripten_enum_draco_StatusCode_OK=a.asm.Nb).apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Ob).apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Pb).apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER= -a.asm.Qb).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Rb).apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Sb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Tb).apply(null,arguments)};a._free=function(){return(a._free=a.asm.Ub).apply(null,arguments)}; -var ya=function(){return(ya=a.asm.Vb).apply(null,arguments)};a.___start_em_js=15856;a.___stop_em_js=15954;var la;ia=function b(){la||ba();la||(ia=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=r.size?(0>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;gb.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}(); -"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule); diff --git a/libs/loaders/draco_decoder.wasm b/libs/loaders/draco_decoder.wasm deleted file mode 100644 index 4138f559..00000000 Binary files a/libs/loaders/draco_decoder.wasm and /dev/null differ diff --git a/libs/loaders/rhino3dm.license.md b/libs/loaders/rhino3dm.license.md deleted file mode 100644 index e8556d0f..00000000 --- a/libs/loaders/rhino3dm.license.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Robert McNeel & Associates - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/libs/loaders/rhino3dm.min.js b/libs/loaders/rhino3dm.min.js deleted file mode 100644 index b4fa67e1..00000000 --- a/libs/loaders/rhino3dm.min.js +++ /dev/null @@ -1 +0,0 @@ -var rhino3dm=(()=>{var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(e=e||__filename),function(r){var t,n,o=r||{},a=void 0!==o?o:{};a.ready=new Promise(function(e,r){t=e,n=r});var i,s,u,c=Object.assign({},a),l=[],f="./this.program",d="object"==typeof window,p="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,m="";if(h){var v=require("fs"),w=require("path");m=p?w.dirname(m)+"/":__dirname+"/",i=((e,r)=>(e=ne(e)?new URL(e):w.normalize(e),v.readFileSync(e,r?void 0:"utf8"))),u=(e=>{var r=i(e,!0);return r.buffer||(r=new Uint8Array(r)),r}),s=((e,r,t)=>{e=ne(e)?new URL(e):w.normalize(e),v.readFile(e,function(e,n){e?t(e):r(n.buffer)})}),process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof ae))throw e}),process.on("unhandledRejection",function(e){throw e}),(e,r)=>{if(k)throw process.exitCode=e,r;!function(e){if(e instanceof ae)return;g("exiting due to exception: "+e)}(r),process.exit(e)},a.inspect=function(){return"[Emscripten Module object]"}}else(d||p)&&(p?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=(e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText}),p&&(u=(e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)})),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)}),e=>document.title=e);var y=a.print||console.log.bind(console),g=a.printErr||console.warn.bind(console);Object.assign(a,c),c=null,a.arguments&&(l=a.arguments),a.thisProgram&&(f=a.thisProgram),a.quit&&a.quit;var E,b=4;a.wasmBinary&&(E=a.wasmBinary);var _,k=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var T=!1;function P(e,r){e||K(r)}var C,S,D,A,F,$,M,O,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(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>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function N(e,r){return e?x(S,e,r):""}function R(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(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 z(e){for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r}function W(){var e=_.buffer;a.HEAP8=C=new Int8Array(e),a.HEAP16=D=new Int16Array(e),a.HEAP32=F=new Int32Array(e),a.HEAPU8=S=new Uint8Array(e),a.HEAPU16=A=new Uint16Array(e),a.HEAPU32=$=new Uint32Array(e),a.HEAPF32=M=new Float32Array(e),a.HEAPF64=O=new Float64Array(e)}a.INITIAL_MEMORY;var B,U=[],L=[],I=[];var H=0,V=null,q=null;function G(e){return e}function X(e){H++,a.monitorRunDependencies&&a.monitorRunDependencies(H)}function Y(e){if(H--,a.monitorRunDependencies&&a.monitorRunDependencies(H),0==H&&(null!==V&&(clearInterval(V),V=null),q)){var r=q;q=null,r()}}function K(e){a.onAbort&&a.onAbort(e),g(e="Aborted("+e+")"),T=!0,1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var Z,J,Q,ee,re="data:application/octet-stream;base64,";function te(e){return e.startsWith(re)}function ne(e){return e.startsWith("file://")}function oe(e){try{if(e==Z&&E)return new Uint8Array(E);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}catch(e){K(e)}}function ae(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ie(e){for(;e.length>0;)e.shift()(a)}te(Z="rhino3dm.wasm")||(J=Z,Z=a.locateFile?a.locateFile(J,m):m+J);var se={isAbs:e=>"/"===e.charAt(0),splitPath:e=>{return/^(\/?|)([\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=se.isAbs(e),t="/"===e.substr(-1);return(e=se.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=se.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=se.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return se.normalize(e.join("/"))},join2:(e,r)=>se.normalize(e+"/"+r)},ue={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=se.isAbs(n)}return(r?"/":"")+(e=se.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ue.resolve(e).substr(1),r=ue.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;s0?t:z(e)+1,o=new Array(n),a=R(e,o,0,o.length);return r&&(o.length=a),o}var le={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){le.ttys[e]={input:[],output:[],ops:r},pe.registerDevice(e,le.stream_ops)},stream_ops:{open:function(e){var r=le.ttys[e.node.rdev];if(!r)throw new pe.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new pe.ErrnoError(60);for(var a=0,i=0;i0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n");if(!r)return null;e.input=ce(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(y(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(y(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(g(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(g(x(e.output,0)),e.output=[])}}};function fe(e){K()}var de={ops_table:null,mount:function(e){return de.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(pe.isBlkdev(t)||pe.isFIFO(t))throw new pe.ErrnoError(63);de.ops_table||(de.ops_table={dir:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,lookup:de.node_ops.lookup,mknod:de.node_ops.mknod,rename:de.node_ops.rename,unlink:de.node_ops.unlink,rmdir:de.node_ops.rmdir,readdir:de.node_ops.readdir,symlink:de.node_ops.symlink},stream:{llseek:de.stream_ops.llseek}},file:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:{llseek:de.stream_ops.llseek,read:de.stream_ops.read,write:de.stream_ops.write,allocate:de.stream_ops.allocate,mmap:de.stream_ops.mmap,msync:de.stream_ops.msync}},link:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,readlink:de.node_ops.readlink},stream:{}},chrdev:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:pe.chrdev_stream_ops}});var o=pe.createNode(e,r,t,n);return pe.isDir(o.mode)?(o.node_ops=de.ops_table.dir.node,o.stream_ops=de.ops_table.dir.stream,o.contents={}):pe.isFile(o.mode)?(o.node_ops=de.ops_table.file.node,o.stream_ops=de.ops_table.file.stream,o.usedBytes=0,o.contents=null):pe.isLink(o.mode)?(o.node_ops=de.ops_table.link.node,o.stream_ops=de.ops_table.link.stream):pe.isChrdev(o.mode)&&(o.node_ops=de.ops_table.chrdev.node,o.stream_ops=de.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,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:function(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:function(e){var r={};return r.dev=pe.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,pe.isDir(e.mode)?r.size=4096:pe.isFile(e.mode)?r.size=e.usedBytes:pe.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:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&de.resizeFileStorage(e,r.size)},lookup:function(e,r){throw pe.genericErrors[44]},mknod:function(e,r,t,n){return de.createNode(e,r,t,n)},rename:function(e,r,t){if(pe.isDir(e.mode)){var n;try{n=pe.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new pe.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:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=pe.lookupNode(e,r);for(var n in t.contents)throw new pe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=de.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!pe.isLink(e.mode))throw new pe.ErrnoError(28);return e.link}},stream_ops:{read:function(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;s0||t+r{if(!(e=ue.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new pe.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=pe.root,o="/",a=0;a40)throw new pe.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(pe.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>>0)%pe.nameTable.length},hashAddNode:e=>{var r=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[r],pe.nameTable[r]=e},hashRemoveNode:e=>{var r=pe.hashName(e.parent.id,e.name);if(pe.nameTable[r]===e)pe.nameTable[r]=e.name_next;else for(var t=pe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=pe.mayLookup(e);if(t)throw new pe.ErrnoError(t,e);for(var n=pe.hashName(e.id,r),o=pe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return pe.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new pe.FSNode(e,r,t,n);return pe.hashAddNode(o),o},destroyNode:e=>{pe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=pe.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>pe.ignorePermissions?0:(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=pe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{pe.lookupNode(e,r);return 20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=pe.lookupNode(e,r)}catch(e){return e.errno}var o=pe.nodePermissions(e,"wx");if(o)return o;if(t){if(!pe.isDir(n.mode))return 54;if(pe.isRoot(n)||pe.getPath(n)===pe.cwd())return 10}else if(pe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(r)||512&r)?31:pe.nodePermissions(e,pe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=pe.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!pe.streams[t])return t;throw new pe.ErrnoError(33)},getStream:e=>pe.streams[e],createStream:(e,r,t)=>{pe.FSStream||(pe.FSStream=function(){this.shared={}},pe.FSStream.prototype={},Object.defineProperties(pe.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new pe.FSStream,e);var n=pe.nextfd(r,t);return e.fd=n,pe.streams[n]=e,e},closeStream:e=>{pe.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=pe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new pe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{pe.devices[e]={stream_ops:r}},getDevice:e=>pe.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),pe.syncFSRequests++,pe.syncFSRequests>1&&g("warning: "+pe.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=pe.getMounts(pe.root.mount),n=0;function o(e){return pe.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&&pe.root)throw new pe.ErrnoError(10);if(!o&&!a){var i=pe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,pe.isMountpoint(n))throw new pe.ErrnoError(10);if(!pe.isDir(n.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(r.node))throw new pe.ErrnoError(28);var t=r.node,n=t.mounted,o=pe.getMounts(n);Object.keys(pe.nameTable).forEach(e=>{for(var r=pe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&pe.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=pe.lookupPath(e,{parent:!0}).node,o=se.basename(e);if(!o||"."===o||".."===o)throw new pe.ErrnoError(28);var a=pe.mayCreate(n,o);if(a)throw new pe.ErrnoError(a);if(!n.node_ops.mknod)throw new pe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,pe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,pe.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),r|=8192,pe.mknod(e,r,t)),symlink:(e,r)=>{if(!ue.resolve(e))throw new pe.ErrnoError(44);var t=pe.lookupPath(r,{parent:!0}).node;if(!t)throw new pe.ErrnoError(44);var n=se.basename(r),o=pe.mayCreate(t,n);if(o)throw new pe.ErrnoError(o);if(!t.node_ops.symlink)throw new pe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o=se.dirname(e),a=se.dirname(r),i=se.basename(e),s=se.basename(r);if(t=pe.lookupPath(e,{parent:!0}).node,n=pe.lookupPath(r,{parent:!0}).node,!t||!n)throw new pe.ErrnoError(44);if(t.mount!==n.mount)throw new pe.ErrnoError(75);var u,c=pe.lookupNode(t,i),l=ue.relative(e,a);if("."!==l.charAt(0))throw new pe.ErrnoError(28);if("."!==(l=ue.relative(r,o)).charAt(0))throw new pe.ErrnoError(55);try{u=pe.lookupNode(n,s)}catch(e){}if(c!==u){var f=pe.isDir(c.mode),d=pe.mayDelete(t,i,f);if(d)throw new pe.ErrnoError(d);if(d=u?pe.mayDelete(n,s,f):pe.mayCreate(n,s))throw new pe.ErrnoError(d);if(!t.node_ops.rename)throw new pe.ErrnoError(63);if(pe.isMountpoint(c)||u&&pe.isMountpoint(u))throw new pe.ErrnoError(10);if(n!==t&&(d=pe.nodePermissions(t,"w")))throw new pe.ErrnoError(d);pe.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{pe.hashAddNode(c)}}},rmdir:e=>{var r=pe.lookupPath(e,{parent:!0}).node,t=se.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!0);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.rmdir)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.rmdir(r,t),pe.destroyNode(n)},readdir:e=>{var r=pe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new pe.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=pe.lookupPath(e,{parent:!0}).node;if(!r)throw new pe.ErrnoError(44);var t=se.basename(e),n=pe.lookupNode(r,t),o=pe.mayDelete(r,t,!1);if(o)throw new pe.ErrnoError(o);if(!r.node_ops.unlink)throw new pe.ErrnoError(63);if(pe.isMountpoint(n))throw new pe.ErrnoError(10);r.node_ops.unlink(r,t),pe.destroyNode(n)},readlink:e=>{var r=pe.lookupPath(e).node;if(!r)throw new pe.ErrnoError(44);if(!r.node_ops.readlink)throw new pe.ErrnoError(28);return ue.resolve(pe.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=pe.lookupPath(e,{follow:!r}).node;if(!t)throw new pe.ErrnoError(44);if(!t.node_ops.getattr)throw new pe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>pe.stat(e,!0),chmod:(e,r,t)=>{var n;"string"==typeof e?n=pe.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{pe.chmod(e,r,!0)},fchmod:(e,r)=>{var t=pe.getStream(e);if(!t)throw new pe.ErrnoError(8);pe.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;"string"==typeof e?o=pe.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new pe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{pe.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=pe.getStream(e);if(!n)throw new pe.ErrnoError(8);pe.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new pe.ErrnoError(28);var t;"string"==typeof e?t=pe.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new pe.ErrnoError(63);if(pe.isDir(t.mode))throw new pe.ErrnoError(31);if(!pe.isFile(t.mode))throw new pe.ErrnoError(28);var n=pe.nodePermissions(t,"w");if(n)throw new pe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=pe.getStream(e);if(!t)throw new pe.ErrnoError(8);if(0==(2097155&t.flags))throw new pe.ErrnoError(28);pe.truncate(t.node,r)},utime:(e,r,t)=>{var n=pe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new pe.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?pe.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=se.normalize(e);try{n=pe.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new pe.ErrnoError(20)}else n=pe.mknod(e,t,0),o=!0;if(!n)throw new pe.ErrnoError(44);if(pe.isChrdev(n.mode)&&(r&=-513),65536&r&&!pe.isDir(n.mode))throw new pe.ErrnoError(54);if(!o){var i=pe.mayOpen(n,r);if(i)throw new pe.ErrnoError(i)}512&r&&!o&&pe.truncate(n,0),r&=-131713;var s=pe.createStream({node:n,path:pe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!a.logReadFiles||1&r||(pe.readFiles||(pe.readFiles={}),e in pe.readFiles||(pe.readFiles[e]=1)),s},close:e=>{if(pe.isClosed(e))throw new pe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{pe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(pe.isClosed(e))throw new pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new pe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new pe.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 pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(1==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.read)throw new pe.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new pe.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 pe.ErrnoError(28);if(pe.isClosed(e))throw new pe.ErrnoError(8);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(pe.isDir(e.node.mode))throw new pe.ErrnoError(31);if(!e.stream_ops.write)throw new pe.ErrnoError(28);e.seekable&&1024&e.flags&&pe.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new pe.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(pe.isClosed(e))throw new pe.ErrnoError(8);if(r<0||t<=0)throw new pe.ErrnoError(28);if(0==(2097155&e.flags))throw new pe.ErrnoError(8);if(!pe.isFile(e.node.mode)&&!pe.isDir(e.node.mode))throw new pe.ErrnoError(43);if(!e.stream_ops.allocate)throw new pe.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 pe.ErrnoError(2);if(1==(2097155&e.flags))throw new pe.ErrnoError(2);if(!e.stream_ops.mmap)throw new pe.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 pe.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=pe.open(e,r.flags),o=pe.stat(e).size,a=new Uint8Array(o);return pe.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),pe.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=pe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(z(r)+1),a=R(r,o,0,o.length);pe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");pe.write(n,r,0,r.byteLength,void 0,t.canOwn)}pe.close(n)},cwd:()=>pe.currentPath,chdir:e=>{var r=pe.lookupPath(e,{follow:!0});if(null===r.node)throw new pe.ErrnoError(44);if(!pe.isDir(r.node.mode))throw new pe.ErrnoError(54);var t=pe.nodePermissions(r.node,"x");if(t)throw new pe.ErrnoError(t);pe.currentPath=r.path},createDefaultDirectories:()=>{pe.mkdir("/tmp"),pe.mkdir("/home"),pe.mkdir("/home/web_user")},createDefaultDevices:()=>{pe.mkdir("/dev"),pe.registerDevice(pe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),pe.mkdev("/dev/null",pe.makedev(1,3)),le.register(pe.makedev(5,0),le.default_tty_ops),le.register(pe.makedev(6,0),le.default_tty1_ops),pe.mkdev("/dev/tty",pe.makedev(5,0)),pe.mkdev("/dev/tty1",pe.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}if(h)try{var r=require("crypto");return()=>r.randomBytes(1)[0]}catch(e){}return()=>K("randomDevice")}();pe.createDevice("/dev","random",e),pe.createDevice("/dev","urandom",e),pe.mkdir("/dev/shm"),pe.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{pe.mkdir("/proc");var e=pe.mkdir("/proc/self");pe.mkdir("/proc/self/fd"),pe.mount({mount:()=>{var r=pe.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=pe.getStream(t);if(!n)throw new pe.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?pe.createDevice("/dev","stdin",a.stdin):pe.symlink("/dev/tty","/dev/stdin"),a.stdout?pe.createDevice("/dev","stdout",null,a.stdout):pe.symlink("/dev/tty","/dev/stdout"),a.stderr?pe.createDevice("/dev","stderr",null,a.stderr):pe.symlink("/dev/tty1","/dev/stderr");pe.open("/dev/stdin",0),pe.open("/dev/stdout",1),pe.open("/dev/stderr",1)},ensureErrnoError:()=>{pe.ErrnoError||(pe.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},pe.ErrnoError.prototype=new Error,pe.ErrnoError.prototype.constructor=pe.ErrnoError,[44].forEach(e=>{pe.genericErrors[e]=new pe.ErrnoError(e),pe.genericErrors[e].stack=""}))},staticInit:()=>{pe.ensureErrnoError(),pe.nameTable=new Array(4096),pe.mount(de,{},"/"),pe.createDefaultDirectories(),pe.createDefaultDevices(),pe.createSpecialDirectories(),pe.filesystems={MEMFS:de}},init:(e,r,t)=>{pe.init.initialized=!0,pe.ensureErrnoError(),a.stdin=e||a.stdin,a.stdout=r||a.stdout,a.stderr=t||a.stderr,pe.createStandardStreams()},quit:()=>{pe.init.initialized=!1;for(var e=0;e{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=pe.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{e=(n=pe.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=pe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=se.basename(e),n=pe.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:pe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=se.join2(e,a);try{pe.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=se.join2("string"==typeof e?e:pe.getPath(e),r),i=pe.getMode(n,o);return pe.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:pe.getPath(e),i=r?se.join2(e,r):e);var s=pe.getMode(n,o),u=pe.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,f=t.length;l{var o=se.join2("string"==typeof e?e:pe.getPath(e),r),a=pe.getMode(!!t,!!n);pe.createDevice.major||(pe.createDevice.major=64);var i=pe.makedev(pe.createDevice.major++,0);return pe.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{for(var i=0;i{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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ce(i(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new pe.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=this;s.setDataGetter(e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((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||[]):ce(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,y("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){if(!p)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=pe.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};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{var r=u.stream_ops[e];c[e]=function(){return pe.forceLoadFile(u),r.apply(null,arguments)}}),c.read=((e,r,t,n,o)=>(pe.forceLoadFile(u),l(e,r,t,n,o))),c.mmap=((e,r,t,n,o)=>{pe.forceLoadFile(u);var a=fe();if(!a)throw new pe.ErrnoError(48);return l(e,C,a,r,t),{ptr:a,allocated:!0}}),u.stream_ops=c,u},createPreloadedFile:(e,r,t,n,o,a,i,u,c,l)=>{var f=r?ue.resolve(se.join2(e,r)):e;G("cp "+f);function d(t){function s(t){l&&l(),u||pe.createDataFile(e,r,t,n,o,c),a&&a(),Y()}Browser.handledByPreloadPlugin(t,f,s,()=>{i&&i(),Y()})||s(t)}X(),"string"==typeof t?function(e,r,t,n){var o=n?"":G("al "+e);s(e,t=>{P(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&Y()},r=>{if(!t)throw'Loading data file "'+e+'" failed.';t()}),o&&X()}(t,e=>d(e),i):d(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=pe.indexedDB();try{var o=n.open(pe.DB_NAME(),pe.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=(()=>{y("creating db"),o.result.createObjectStore(pe.DB_STORE_NAME)}),o.onsuccess=(()=>{var n=o.result.transaction([pe.DB_STORE_NAME],"readwrite"),a=n.objectStore(pe.DB_STORE_NAME),i=0,s=0,u=e.length;function c(){0==s?r():t()}e.forEach(e=>{var r=a.put(pe.analyzePath(e).object.contents,e);r.onsuccess=(()=>{++i+s==u&&c()}),r.onerror=(()=>{i+ ++s==u&&c()})}),n.onerror=t}),o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=pe.indexedDB();try{var o=n.open(pe.DB_NAME(),pe.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=(()=>{var n=o.result;try{var a=n.transaction([pe.DB_STORE_NAME],"readonly")}catch(e){return void t(e)}var i=a.objectStore(pe.DB_STORE_NAME),s=0,u=0,c=e.length;function l(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=(()=>{pe.analyzePath(e).exists&&pe.unlink(e),pe.createDataFile(se.dirname(e),se.basename(e),r.result,!0,!0,!0),++s+u==c&&l()}),r.onerror=(()=>{s+ ++u==c&&l()})}),a.onerror=t}),o.onerror=t}},he={mount:function(e){return a.websocket=a.websocket&&"object"==typeof a.websocket?a.websocket:{},a.websocket._callbacks={},a.websocket.on=function(e,r){return"function"==typeof r&&(this._callbacks[e]=r),this},a.websocket.emit=function(e,r){"function"==typeof this._callbacks[e]&&this._callbacks[e].call(this,r)},pe.createNode(null,"/",16895,0)},createSocket:function(e,r,t){if(1==(r&=-526337)&&t&&6!=t)throw new pe.ErrnoError(66);var n={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:he.websocket_sock_ops},o=he.nextname(),a=pe.createNode(he.root,o,49152,0);a.sock=n;var i=pe.createStream({path:o,node:a,flags:2,seekable:!1,stream_ops:he.stream_ops});return n.stream=i,n},getSocket:function(e){var r=pe.getStream(e);return r&&pe.isSocket(r.node.mode)?r.node.sock:null},stream_ops:{poll:function(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl:function(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read:function(e,r,t,n,o){var a=e.node.sock,i=a.sock_ops.recvmsg(a,n);return i?(r.set(i.buffer,t),i.buffer.length):0},write:function(e,r,t,n,o){var a=e.node.sock;return a.sock_ops.sendmsg(a,r,t,n)},close:function(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname:function(){return he.nextname.current||(he.nextname.current=0),"socket["+he.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,r,t){var n;if("object"==typeof r&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=o[1],t=parseInt(o[2],10)}else try{var i=a.websocket&&"object"==typeof a.websocket,s="ws:#".replace("#","//");if(i&&"string"==typeof a.websocket.url&&(s=a.websocket.url),"ws://"===s||"wss://"===s){var u=r.split("/");s=s+u[0]+":"+t+"/"+u.slice(1).join("/")}var c="binary";i&&"string"==typeof a.websocket.subprotocol&&(c=a.websocket.subprotocol);var l=void 0;"null"!==c&&(l=c=c.replace(/^ +| +$/g,"").split(/ *, */)),i&&null===a.websocket.subprotocol&&(c="null",l=void 0),(n=new(h?require("ws"):WebSocket)(s,l)).binaryType="arraybuffer"}catch(e){throw new pe.ErrnoError(23)}var f={addr:r,port:t,socket:n,dgram_send_queue:[]};return he.websocket_sock_ops.addPeer(e,f),he.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&void 0!==e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,r,t){return e.peers[r+":"+t]},addPeer:function(e,r){e.peers[r.addr+":"+r.port]=r},removePeer:function(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents:function(e,r){var t=!0,n=function(){a.websocket.emit("open",e.stream.fd);try{for(var t=r.dgram_send_queue.shift();t;)r.socket.send(t),t=r.dgram_send_queue.shift()}catch(e){r.socket.close()}};function o(n){if("string"==typeof n){n=(new TextEncoder).encode(n)}else{if(P(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var o=t;if(t=!1,o&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var i=n[8]<<8|n[9];return he.websocket_sock_ops.removePeer(e,r),r.port=i,void he.websocket_sock_ops.addPeer(e,r)}e.recv_queue.push({addr:r.addr,port:r.port,data:n}),a.websocket.emit("message",e.stream.fd)}h?(r.socket.on("open",n),r.socket.on("message",function(e,r){r&&o(new Uint8Array(e).buffer)}),r.socket.on("close",function(){a.websocket.emit("close",e.stream.fd)}),r.socket.on("error",function(r){e.error=14,a.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(r.socket.onopen=n,r.socket.onclose=function(){a.websocket.emit("close",e.stream.fd)},r.socket.onmessage=function(e){o(e.data)},r.socket.onerror=function(r){e.error=14,a.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var r=0,t=1===e.type?he.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl:function(e,r,t){switch(r){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),F[t>>2]=n,0;default:return 28}},close:function(e){if(e.server){try{e.server.close()}catch(e){}e.server=null}for(var r=Object.keys(e.peers),t=0;t>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function ve(e,r){var t,n=D[e>>1],o=ht(A[e+2>>1]);switch(n){case 2:if(16!==r)return{errno:28};t=me(t=F[e+4>>2]);break;case 10:if(28!==r)return{errno:28};t=function(e){var r="",t=0,n=0,o=0,a=0,i=0,s=0,u=[65535&e[0],e[0]>>16,65535&e[1],e[1]>>16,65535&e[2],e[2]>>16,65535&e[3],e[3]>>16],c=!0,l="";for(s=0;s<5;s++)if(0!==u[s]){c=!1;break}if(c){if(l=me(u[6]|u[7]<<16),-1===u[5])return r="::ffff:",r+=l;if(0===u[5])return r="::","0.0.0.0"===l&&(l=""),"0.0.0.1"===l&&(l="1"),r+=l}for(t=0;t<8;t++)0===u[t]&&(t-o>1&&(i=0),o=t,i++),i>n&&(a=t-(n=i)+1);for(t=0;t<8;t++)n>1&&0===u[t]&&t>=a&&t>2],F[e+12>>2],F[e+16>>2],F[e+20>>2]]);break;default:return{errno:5}}return{family:n,addr:t,port:o}}function we(e){return parseInt(e)}var ye={address_map:{id:1,addrs:{},names:{}},lookup_name:function(e){var r,t=function(e){for(var r=e.split("."),t=0;t<4;t++){var n=Number(r[t]);if(isNaN(n))return null;r[t]=n}return(r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0}(e);if(null!==t)return e;if(null!==(t=function(e){var r,t,n,o,a=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(e))return null;if("::"===e)return[0,0,0,0,0,0,0,0];for((e=e.startsWith("::")?e.replace("::","Z:"):e.replace("::",":Z:")).indexOf(".")>0?((r=(e=e.replace(new RegExp("[.]","g"),":")).split(":"))[r.length-4]=we(r[r.length-4])+256*we(r[r.length-3]),r[r.length-3]=we(r[r.length-2])+256*we(r[r.length-1]),r=r.slice(0,r.length-2)):r=e.split(":"),n=0,o=0,t=0;t>2]=n.dev,F[t+8>>2]=n.ino,F[t+12>>2]=n.mode,$[t+16>>2]=n.nlink,F[t+20>>2]=n.uid,F[t+24>>2]=n.gid,F[t+28>>2]=n.rdev,ee=[n.size>>>0,(Q=n.size,+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[t+40>>2]=ee[0],F[t+44>>2]=ee[1],F[t+48>>2]=4096,F[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return ee=[Math.floor(o/1e3)>>>0,(Q=Math.floor(o/1e3),+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[t+56>>2]=ee[0],F[t+60>>2]=ee[1],$[t+64>>2]=o%1e3*1e3,ee=[Math.floor(a/1e3)>>>0,(Q=Math.floor(a/1e3),+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[t+72>>2]=ee[0],F[t+76>>2]=ee[1],$[t+80>>2]=a%1e3*1e3,ee=[Math.floor(i/1e3)>>>0,(Q=Math.floor(i/1e3),+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[t+88>>2]=ee[0],F[t+92>>2]=ee[1],$[t+96>>2]=i%1e3*1e3,ee=[n.ino>>>0,(Q=n.ino,+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[t+104>>2]=ee[0],F[t+108>>2]=ee[1],0},doMsync:function(e,r,t,n,o){if(!pe.isFile(r.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;var a=S.slice(e,e+t);pe.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ge.varargs+=4,F[ge.varargs-4>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var r=pe.getStream(e);if(!r)throw new pe.ErrnoError(8);return r}};function Ee(e,r){return r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN}var be={};function _e(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function ke(e){return this.fromWireType(F[e>>2])}var Te={},Pe={},Ce={},Se=48,De=57;function Ae(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Se&&r<=De?"_"+e:e}function Fe(e,r){return e=Ae(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function $e(e,r){var t=Fe(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}var Me=void 0;function Oe(e){throw new Me(e)}function je(e,r,t){function n(r){var n=t(r);n.length!==e.length&&Oe("Mismatched type converter count");for(var o=0;o{Pe.hasOwnProperty(e)?o[r]=Pe[e]:(a.push(e),Te.hasOwnProperty(e)||(Te[e]=[]),Te[e].push(()=>{o[r]=Pe[e],++i===a.length&&n(o)}))}),0===a.length&&n(o)}var xe={};function Ne(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Re=void 0;function ze(e){for(var r="",t=e;S[t];)r+=Re[S[t++]];return r}var We=void 0;function Be(e){throw new We(e)}function Ue(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=r.name;if(e||Be('type "'+n+'" must have a positive integer typeid pointer'),Pe.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Be("Cannot register type '"+n+"' twice")}if(Pe[e]=r,delete Ce[e],Te.hasOwnProperty(e)){var o=Te[e];delete Te[e],o.forEach(e=>e())}}function Le(e){if(!(this instanceof cr))return!1;if(!(e instanceof cr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}function Ie(e){Be(e.$$.ptrType.registeredClass.name+" instance already deleted")}var He=!1;function Ve(e){}function qe(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}var Ge={};function Xe(){return Object.keys(er).length}function Ye(){var e=[];for(var r in er)er.hasOwnProperty(r)&&e.push(er[r]);return e}var Ke=[];function Ze(){for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}}var Je=void 0;function Qe(e){Je=e,Ke.length&&Je&&Je(Ze)}var er={};function rr(e,r){return r=function(e,r){for(void 0===r&&Be("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r}(e,r),er[r]}function tr(e,r){return r.ptrType&&r.ptr||Oe("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Oe("Both smartPtrType and smartPtr must be specified"),r.count={value:1},or(Object.create(e,{$$:{value:r}}))}function nr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=rr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?tr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):tr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Ge[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=function e(r,t,n){if(t===n)return r;if(void 0===n.baseClass)return null;var o=e(r,t,n.baseClass);return null===o?null:n.downcast(o)}(r,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?tr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):tr(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function or(e){return"undefined"==typeof FinalizationRegistry?(or=(e=>e),e):(He=new FinalizationRegistry(e=>{qe(e.$$)}),Ve=(e=>He.unregister(e)),(or=(e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r};He.register(e,t,e)}return e}))(e))}function ar(){if(this.$$.ptr||Ie(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=or(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function ir(){this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Be("Object already scheduled for deletion"),Ve(this),qe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function sr(){return!this.$$.ptr}function ur(){return this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Be("Object already scheduled for deletion"),Ke.push(this),1===Ke.length&&Je&&Je(Ze),this.$$.deleteScheduled=!0,this}function cr(){}function lr(e,r,t){if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Be("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}}function fr(e,r,t){a.hasOwnProperty(e)?((void 0===t||void 0!==a[e].overloadTable&&void 0!==a[e].overloadTable[t])&&Be("Cannot register public name '"+e+"' twice"),lr(a,e,e),a.hasOwnProperty(t)&&Be("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),a[e].overloadTable[t]=r):(a[e]=r,void 0!==t&&(a[e].numArguments=t))}function dr(e,r,t){for(;r!==t;)r.upcast||Be("Expected null or instance of "+t.name+", got an instance of "+r.name),e=r.upcast(e),r=r.baseClass;return e}function pr(e,r){if(null===r)return this.isReference&&Be("null is not a valid "+this.name),0;r.$$||Be('Cannot pass "'+Rr(r)+'" as a '+this.name),r.$$.ptr||Be("Cannot pass deleted object as a pointer of type "+this.name);var t=r.$$.ptrType.registeredClass;return dr(r.$$.ptr,t,this.registeredClass)}function hr(e,r){var t;if(null===r)return this.isReference&&Be("null is not a valid "+this.name),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Be('Cannot pass "'+Rr(r)+'" as a '+this.name),r.$$.ptr||Be("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&r.$$.ptrType.isConst&&Be("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);var n=r.$$.ptrType.registeredClass;if(t=dr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Be("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Be("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,xr.toHandle(function(){o.delete()})),null!==e&&e.push(this.rawDestructor,t)}break;default:Be("Unsupporting sharing policy")}return t}function mr(e,r){if(null===r)return this.isReference&&Be("null is not a valid "+this.name),0;r.$$||Be('Cannot pass "'+Rr(r)+'" as a '+this.name),r.$$.ptr||Be("Cannot pass deleted object as a pointer of type "+this.name),r.$$.ptrType.isConst&&Be("Cannot convert argument of type "+r.$$.ptrType.name+" to parameter type "+this.name);var t=r.$$.ptrType.registeredClass;return dr(r.$$.ptr,t,this.registeredClass)}function vr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function wr(e){this.rawDestructor&&this.rawDestructor(e)}function yr(e){null!==e&&e.delete()}function gr(e,r,t,n,o,a,i,s,u,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==r.baseClass?this.toWireType=hr:n?(this.toWireType=pr,this.destructorFunction=null):(this.toWireType=mr,this.destructorFunction=null)}function Er(e){return B.get(e)}function br(e,r,t){return e.includes("j")?function(e,r,t){var n=a["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)}(e,r,t):Er(r).apply(null,t)}function _r(e,r){var t,n,o,a=(e=ze(e)).includes("j")?(t=e,n=r,o=[],function(){return o.length=0,Object.assign(o,arguments),br(t,n,o)}):Er(r);return"function"!=typeof a&&Be("unknown function pointer with signature "+e+": "+r),a}var kr=void 0;function Tr(e){var r=dt(e),t=ze(r);return lt(r),t}function Pr(e,r){var t=[],n={};throw r.forEach(function e(r){n[r]||Pe[r]||(Ce[r]?Ce[r].forEach(e):(t.push(r),n[r]=!0))}),new kr(e+": "+t.map(Tr).join([", "]))}function Cr(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=Fe(e.name||"unknownFunctionName",function(){});t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Sr(e,r,t,n,o){var a=r.length;a<2&&Be("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==r[1]&&null!==t,s=!1,u=1;u0?", ":"")+f),d+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)d+="runDestructors(destructors);\n";else for(u=i?1:2;u>2]);return t}function Ar(e,r,t){return e instanceof Object||Be(t+' with invalid "this": '+e),e instanceof r.registeredClass.constructor||Be(t+' incompatible with "this" of type '+e.constructor.name),e.$$.ptr||Be("cannot call emscripten binding method "+t+" on deleted object"),dr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)}var Fr=[],$r=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Mr(e){e>4&&0==--$r[e].refcount&&($r[e]=void 0,Fr.push(e))}function Or(){for(var e=0,r=5;r<$r.length;++r)void 0!==$r[r]&&++e;return e}function jr(){for(var e=5;e<$r.length;++e)if(void 0!==$r[e])return $r[e];return null}var xr={toValue:e=>(e||Be("Cannot use deleted val. handle = "+e),$r[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Fr.length?Fr.pop():$r.length;return $r[r]={refcount:1,value:e},r}}};function Nr(e,r){var t=Pe[e];return void 0===t&&Be(r+" has unknown type "+Tr(e)),t}function Rr(e){if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e}var zr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Wr(e,r){for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&A[n];)++n;if((t=n<<1)-e>32&&zr)return zr.decode(S.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=D[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Br(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>1]=i,r+=2}return D[r>>1]=0,r-n}function Ur(e){return 2*e.length}function Lr(e,r){for(var t=0,n="";!(t>=r/4);){var o=F[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}function Ir(e,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a);if(F[r>>2]=i,(r+=4)+4>o)break}return F[r>>2]=0,r-n}function Hr(e){for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r}var Vr={};function qr(e){var r=Vr[e];return void 0===r?ze(e):r}var Gr=[];function Xr(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Yr=[];var Kr={};function Zr(e){return $[e>>2]+4294967296*F[e+4>>2]}var Jr,Qr=[0,31,60,91,121,152,182,213,244,274,305,335],et=[0,31,59,90,120,151,181,212,243,273,304,334];function rt(e){var r;return((r=e.getFullYear())%4==0&&(r%100!=0||r%400==0)?Qr:et)[e.getMonth()]+e.getDate()-1}function tt(e){var r=z(e)+1,t=ct(r);return t&&R(e,C,t,r),t}function nt(e){var r=_.buffer;try{return _.grow(e-r.byteLength+65535>>>16),W(),1}catch(e){}}Jr=h?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now();var ot={};function at(){if(!at.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",_:f||"./this.program"};for(var r in ot)void 0===ot[r]?delete e[r]:e[r]=ot[r];var t=[];for(var r in e)t.push(r+"="+e[r]);at.strings=t}return at.strings}var it=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(it.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=it,pe.staticInit(),Me=a.InternalError=$e(Error,"InternalError"),function(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Re=e}(),We=a.BindingError=$e(Error,"BindingError"),cr.prototype.isAliasOf=Le,cr.prototype.clone=ar,cr.prototype.delete=ir,cr.prototype.isDeleted=sr,cr.prototype.deleteLater=ur,a.getInheritedInstanceCount=Xe,a.getLiveInheritedInstances=Ye,a.flushPendingDeletes=Ze,a.setDelayFunction=Qe,gr.prototype.getPointee=vr,gr.prototype.destructor=wr,gr.prototype.argPackAdvance=8,gr.prototype.readValueFromPointer=ke,gr.prototype.deleteObject=yr,gr.prototype.fromWireType=nr,kr=a.UnboundTypeError=$e(Error,"UnboundTypeError"),a.count_emval_handles=Or,a.get_first_emval=jr;var st,ut={v:function(e,r,t){throw new function(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_refcount=function(e){F[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,C[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=C[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,C[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=C[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=F[this.ptr>>2];F[this.ptr>>2]=e+1},this.release_ref=function(){var e=F[this.ptr>>2];return F[this.ptr>>2]=e-1,1===e},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(mt(this.get_type()))return $[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}(e).init(r,t),e,0,e},U:function(e,r,t){try{var n=function(e){var r=he.getSocket(e);if(!r)throw new pe.ErrnoError(8);return r}(e),o=function(e,r,t){if(t&&0===e)return null;var n=ve(e,r);if(n.errno)throw new pe.ErrnoError(n.errno);return n.addr=ye.lookup_addr(n.addr)||n.addr,n}(r,t);return n.sock_ops.connect(n,o.addr,o.port),0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},ea:function(e,r,t,n){try{if(r=ge.getStr(r),r=ge.calculateAt(e,r),-8&t)return-28;var o=pe.lookupPath(r,{follow:!0}).node;if(!o)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&pe.nodePermissions(o,a)?-2:0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},o:function(e,r,t){ge.varargs=t;try{var n=ge.getStreamFromFD(e);switch(r){case 0:return(o=ge.get())<0?-28:pe.createStream(n,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=ge.get();return n.flags|=o,0;case 5:return o=ge.get(),D[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return a=28,F[ft()>>2]=a,-1;default:return-28}}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}var a},Z:function(e,r){try{var t=ge.getStreamFromFD(e);return ge.doStat(pe.stat,t.path,r)}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},S:function(e,r,t){try{var n=Ee(r,t);return isNaN(n)?-61:(pe.ftruncate(e,n),0)}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},K:function(e,r,t){ge.varargs=t;try{var n=ge.getStreamFromFD(e);switch(r){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=ge.get();return F[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ge.get(),pe.ioctl(n,r,o);case 21523:case 21524:return n.tty?0:-59;default:return-28}}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},W:function(e,r){try{return e=ge.getStr(e),ge.doStat(pe.lstat,e,r)}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},X:function(e,r,t,n){try{r=ge.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=ge.calculateAt(e,r,a),ge.doStat(o?pe.lstat:pe.stat,r,t)}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},G:function(e,r,t,n){ge.varargs=n;try{r=ge.getStr(r),r=ge.calculateAt(e,r);var o=n?ge.get():0;return pe.open(r,t,o).fd}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},F:function(e,r,t){try{return he.createSocket(e,r,t).stream.fd}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},Y:function(e,r){try{return e=ge.getStr(e),ge.doStat(pe.stat,e,r)}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return-e.errno}},r:function(e){var r=be[e];delete be[e];var t=r.elements,n=t.length,o=t.map(function(e){return e.getterReturnType}).concat(t.map(function(e){return e.setterArgumentType})),a=r.rawConstructor,i=r.rawDestructor;je([e],o,function(e){return t.forEach((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],u=r.setter,c=r.setterContext;r.read=(e=>o.fromWireType(a(i,e))),r.write=((e,r)=>{var t=[];u(c,e,s.toWireType(t,r)),_e(t)})}),[{name:r.name,fromWireType:function(e){for(var r=new Array(n),o=0;o>a])},destructorFunction:null})},e:function(e,r,t,n,o,i,s,u,c,l,f,d,p){f=ze(f),i=_r(o,i),u&&(u=_r(s,u)),l&&(l=_r(c,l)),p=_r(d,p);var h=Ae(f);fr(h,function(){Pr("Cannot construct "+f+" due to unbound types",[n])}),je([e,r,t],n?[n]:[],function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:cr.prototype;var s=Fe(h,function(){if(Object.getPrototypeOf(this)!==c)throw new We("Use 'new' to construct "+f);if(void 0===d.constructor_body)throw new We(f+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var d=new function(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}(f,s,c,p,t,i,u,l),m=new gr(f,d,!0,!1,!1),v=new gr(f+"*",d,!1,!1,!1),w=new gr(f+" const*",d,!1,!0,!1);return Ge[e]={pointerType:v,constPointerType:w},function(e,r,t){a.hasOwnProperty(e)||Oe("Replacing nonexistant public symbol"),void 0!==a[e].overloadTable&&void 0!==t?a[e].overloadTable[t]=r:(a[e]=r,a[e].argCount=t)}(h,s),[m,v,w]})},f:function(e,r,t,n,o,a,i){var s=Dr(t,n);r=ze(r),a=_r(o,a),je([],[e],function(e){var n=(e=e[0]).name+"."+r;function o(){Pr("Cannot call "+n+" due to unbound types",s)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var u=e.registeredClass.constructor;return void 0===u[r]?(o.argCount=t-1,u[r]=o):(lr(u,r,n),u[r].overloadTable[t-1]=o),je([],s,function(e){var o=[e[0],null].concat(e.slice(1)),s=Sr(n,o,null,a,i);return void 0===u[r].overloadTable?(s.argCount=t-1,u[r]=s):u[r].overloadTable[t-1]=s,[]}),[]})},g:function(e,r,t,n,o,a){P(r>0);var i=Dr(r,t);o=_r(n,o),je([],[e],function(e){var t="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(r-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[r-1]=(()=>{Pr("Cannot construct "+e.name+" due to unbound types",i)}),je([],i,function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Sr(t,n,null,o,a),[]}),[]})},b:function(e,r,t,n,o,a,i,s){var u=Dr(t,n);r=ze(r),a=_r(o,a),je([],[e],function(e){var n=(e=e[0]).name+"."+r;function o(){Pr("Cannot call "+n+" due to unbound types",u)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var c=e.registeredClass.instancePrototype,l=c[r];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===t-2?(o.argCount=t-2,o.className=e.name,c[r]=o):(lr(c,r,n),c[r].overloadTable[t-2]=o),je([],u,function(o){var s=Sr(n,o,e,a,i);return void 0===c[r].overloadTable?(s.argCount=t-2,c[r]=s):c[r].overloadTable[t-2]=s,[]}),[]})},a:function(e,r,t,n,o,a,i,s,u,c){r=ze(r),o=_r(n,o),je([],[e],function(e){var n=(e=e[0]).name+"."+r,l={get:function(){Pr("Cannot access "+n+" due to unbound types",[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>{Pr("Cannot access "+n+" due to unbound types",[t,i])}:e=>{Be(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,r,l),je([],u?[t,i]:[t],function(t){var i=t[0],l={get:function(){var r=Ar(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(u){u=_r(s,u);var f=t[1];l.set=function(r){var t=Ar(this,e,n+" setter"),o=[];u(c,t,f.toWireType(o,r)),_e(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,l),[]}),[]})},fa:function(e,r){Ue(e,{name:r=ze(r),fromWireType:function(e){var r=xr.toValue(e);return Mr(e),r},toWireType:function(e,r){return xr.toHandle(r)},argPackAdvance:8,readValueFromPointer:ke,destructorFunction:null})},i:function(e,r,t,n){var o=Ne(t);function a(){}r=ze(r),a.values={},Ue(e,{name:r,constructor:a,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,r){return r.value},argPackAdvance:8,readValueFromPointer:function(e,r,t){switch(r){case 0:return function(e){var r=t?C:S;return this.fromWireType(r[e])};case 1:return function(e){var r=t?D:A;return this.fromWireType(r[e>>1])};case 2:return function(e){var r=t?F:$;return this.fromWireType(r[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}(r,o,n),destructorFunction:null}),fr(r,a)},d:function(e,r,t){var n=Nr(e,"enum");r=ze(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Fe(n.name+"_"+r,function(){})}});o.values[t]=a,o[r]=a},M:function(e,r,t){var n=Ne(t);Ue(e,{name:r=ze(r),fromWireType:function(e){return e},toWireType:function(e,r){return r},argPackAdvance:8,readValueFromPointer:function(e,r){switch(r){case 2:return function(e){return this.fromWireType(M[e>>2])};case 3:return function(e){return this.fromWireType(O[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(r,n),destructorFunction:null})},p:function(e,r,t,n,o){r=ze(r),-1===o&&(o=4294967295);var a=Ne(t),i=e=>e;if(0===n){var s=32-8*t;i=(e=>e<>>s)}var u=r.includes("unsigned");Ue(e,{name:r,fromWireType:i,toWireType:u?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:function(e,r,t){switch(r){case 0:return t?function(e){return C[e]}:function(e){return S[e]};case 1:return t?function(e){return D[e>>1]}:function(e){return A[e>>1]};case 2:return t?function(e){return F[e>>2]}:function(e){return $[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(r,a,0!==n),destructorFunction:null})},l:function(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=$,t=r[e>>=2],o=r[e+1];return new n(r.buffer,o,t)}Ue(e,{name:t=ze(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},L:function(e,r){var t="std::string"===(r=ze(r));Ue(e,{name:r,fromWireType:function(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==S[s]){var u=N(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var c=new Array(n);for(i=0;i>2]=n,t&&o)R(r,S,i,n+1);else if(o)for(var s=0;s255&&(lt(i),Be("String has UTF-16 code units that do not fit in 8 bits")),S[i+s]=u}else for(s=0;sA),s=1):4===r&&(n=Lr,o=Ir,i=Hr,a=(()=>$),s=2),Ue(e,{name:t,fromWireType:function(e){for(var t,o=$[e>>2],i=a(),u=e+4,c=0;c<=o;++c){var l=e+4+c*r;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=l+r}}return lt(e),t},toWireType:function(e,n){"string"!=typeof n&&Be("Cannot pass non-string to C++ string type "+t);var a=i(n),u=ct(4+a+r);return $[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(lt,u),u},argPackAdvance:8,readValueFromPointer:ke,destructorFunction:function(e){lt(e)}})},q:function(e,r,t,n,o,a){be[e]={name:ze(r),rawConstructor:_r(t,n),rawDestructor:_r(o,a),elements:[]}},ia:function(e,r,t,n,o,a,i,s,u){be[e].elements.push({getterReturnType:r,getter:_r(t,n),getterContext:o,setterArgumentType:a,setter:_r(i,s),setterContext:u})},ja:function(e,r,t,n,o,a){xe[e]={name:ze(r),rawConstructor:_r(t,n),rawDestructor:_r(o,a),fields:[]}},N:function(e,r,t,n,o,a,i,s,u,c){xe[e].fields.push({fieldName:ze(r),getterReturnType:t,getter:_r(n,o),getterContext:a,setterArgumentType:i,setter:_r(s,u),setterContext:c})},ha:function(e,r){Ue(e,{isVoid:!0,name:r=ze(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})},t:function(e,r,t){e=xr.toValue(e),r=Nr(r,"emval::as");var n=[],o=xr.toHandle(n);return $[t>>2]=o,r.toWireType(n,e)},la:function(e,r,t,n,o){return(e=Gr[e])(r=xr.toValue(r),t=qr(t),function(e){var r=[];return $[e>>2]=xr.toHandle(r),r}(n),o)},P:function(e,r,t,n){(e=Gr[e])(r=xr.toValue(r),t=qr(t),null,n)},c:Mr,Q:function(e,r){return(e=xr.toValue(e))==(r=xr.toValue(r))},y:function(e){return 0===e?xr.toHandle(Xr()):(e=qr(e),xr.toHandle(Xr()[e]))},C:function(e,r){var t=function(e,r){for(var t=new Array(e),n=0;n>2],"parameter "+n);return t}(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map(function(e){return e.name}).join("_")+"$",a=Yr[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c4&&($r[e].refcount+=1)},D:function(e,r){return(e=xr.toValue(e))instanceof(r=xr.toValue(r))},na:function(e){return"number"==typeof(e=xr.toValue(e))},ma:function(e){return"string"==typeof(e=xr.toValue(e))},O:function(e,r,t,n){e=xr.toValue(e);var o=Kr[r];return o||(o=function(e){for(var r="",t=0;t>2)], 'parameter "+t+"');\nvar arg"+t+" = argType"+t+".readValueFromPointer(args);\nargs += argType"+t+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+r+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Nr,a,xr.toHandle,()=>$)}(r),Kr[r]=o),o(e,t,n)},n:function(){return xr.toHandle([])},u:function(e){return xr.toHandle(qr(e))},k:function(){return xr.toHandle({})},s:function(e){_e(xr.toValue(e)),Mr(e)},j:function(e,r,t){e=xr.toValue(e),r=xr.toValue(r),t=xr.toValue(t),e[r]=t},h:function(e,r){var t=(e=Nr(e,"_emval_take_value")).readValueFromPointer(r);return xr.toHandle(t)},aa:function(e,r){var t=new Date(1e3*Zr(e));F[r>>2]=t.getUTCSeconds(),F[r+4>>2]=t.getUTCMinutes(),F[r+8>>2]=t.getUTCHours(),F[r+12>>2]=t.getUTCDate(),F[r+16>>2]=t.getUTCMonth(),F[r+20>>2]=t.getUTCFullYear()-1900,F[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;F[r+28>>2]=o},ba:function(e,r){var t=new Date(1e3*Zr(e));F[r>>2]=t.getSeconds(),F[r+4>>2]=t.getMinutes(),F[r+8>>2]=t.getHours(),F[r+12>>2]=t.getDate(),F[r+16>>2]=t.getMonth(),F[r+20>>2]=t.getFullYear()-1900,F[r+24>>2]=t.getDay();var n=0|rt(t);F[r+28>>2]=n,F[r+36>>2]=-60*t.getTimezoneOffset();var o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&t.getTimezoneOffset()==Math.min(i,a));F[r+32>>2]=s},ca:function(e){var r=new Date(F[e+20>>2]+1900,F[e+16>>2],F[e+12>>2],F[e+8>>2],F[e+4>>2],F[e>>2],0),t=F[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(t<0)F[e+32>>2]=Number(a!=i&&s==n);else if(t>0!=(s==n)){var u=Math.max(i,a),c=t>0?s:u;r.setTime(r.getTime()+6e4*(c-n))}F[e+24>>2]=r.getDay();var l=0|rt(r);return F[e+28>>2]=l,F[e>>2]=r.getSeconds(),F[e+4>>2]=r.getMinutes(),F[e+8>>2]=r.getHours(),F[e+12>>2]=r.getDate(),F[e+16>>2]=r.getMonth(),F[e+20>>2]=r.getYear(),r.getTime()/1e3|0},da:function(e,r,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}$[e>>2]=60*u,F[r>>2]=Number(i!=s);var l=c(o),f=c(a),d=tt(l),p=tt(f);s>2]=d,$[t+4>>2]=p):($[t>>2]=p,$[t+4>>2]=d)},z:function(){K("")},I:function(){return Date.now()},H:Jr,V:function(e){var r=S.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),nt(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},_:function(e,r){var t=0;return at().forEach(function(n,o){var a=r+t;$[e+4*o>>2]=a,function(e,r,t){for(var n=0;n>0]=e.charCodeAt(n);t||(C[r>>0]=0)}(n,a),t+=n.length+1}),0},$:function(e,r){var t=at();$[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),$[r>>2]=n,0},x:function(e){try{var r=ge.getStreamFromFD(e);return pe.close(r),0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return e.errno}},J:function(e,r,t,n){try{var o=function(e,r,t,n){for(var o=0,a=0;a>2],s=$[r+4>>2];r+=8;var u=pe.read(e,C,i,s,n);if(u<0)return-1;if(o+=u,u>2]=o,0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return e.errno}},R:function(e,r,t,n,o){try{var a=Ee(r,t);if(isNaN(a))return 61;var i=ge.getStreamFromFD(e);return pe.llseek(i,a,n),ee=[i.position>>>0,(Q=i.position,+Math.abs(Q)>=1?Q>0?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],F[o>>2]=ee[0],F[o+4>>2]=ee[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return e.errno}},A:function(e,r,t,n){try{var o=function(e,r,t,n){for(var o=0,a=0;a>2],s=$[r+4>>2];r+=8;var u=pe.write(e,C,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o}(ge.getStreamFromFD(e),r,t);return $[n>>2]=o,0}catch(e){if(void 0===pe||!(e instanceof pe.ErrnoError))throw e;return e.errno}}},ct=(function(){var e={a:ut};function r(e,r){var t,n=e.exports;a.asm=n,_=a.asm.oa,W(),B=a.asm.qa,t=a.asm.pa,L.unshift(t),Y()}function t(e){r(e.instance)}function o(r){return function(){if(!E&&(d||p)){if("function"==typeof fetch&&!ne(Z))return fetch(Z,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Z+"'";return e.arrayBuffer()}).catch(function(){return oe(Z)});if(s)return new Promise(function(e,r){s(Z,function(r){e(new Uint8Array(r))},r)})}return Promise.resolve().then(function(){return oe(Z)})}().then(function(r){return WebAssembly.instantiate(r,e)}).then(function(e){return e}).then(r,function(e){g("failed to asynchronously prepare wasm: "+e),K(e)})}if(X(),a.instantiateWasm)try{return a.instantiateWasm(e,r)}catch(e){g("Module.instantiateWasm callback failed with error: "+e),n(e)}(E||"function"!=typeof WebAssembly.instantiateStreaming||te(Z)||ne(Z)||h||"function"!=typeof fetch?o(t):fetch(Z,{credentials:"same-origin"}).then(function(r){return WebAssembly.instantiateStreaming(r,e).then(t,function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),o(t)})})).catch(n)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.pa).apply(null,arguments)},a._malloc=function(){return(ct=a._malloc=a.asm.ra).apply(null,arguments)}),lt=a._free=function(){return(lt=a._free=a.asm.sa).apply(null,arguments)},ft=a.___errno_location=function(){return(ft=a.___errno_location=a.asm.ta).apply(null,arguments)},dt=a.___getTypeName=function(){return(dt=a.___getTypeName=a.asm.ua).apply(null,arguments)},pt=(a.__embind_initialize_bindings=function(){return(a.__embind_initialize_bindings=a.asm.va).apply(null,arguments)},a._htons=function(){return(pt=a._htons=a.asm.wa).apply(null,arguments)}),ht=a._ntohs=function(){return(ht=a._ntohs=a.asm.xa).apply(null,arguments)},mt=a.___cxa_is_pointer_type=function(){return(mt=a.___cxa_is_pointer_type=a.asm.ya).apply(null,arguments)};a.dynCall_ji=function(){return(a.dynCall_ji=a.asm.za).apply(null,arguments)},a.dynCall_vij=function(){return(a.dynCall_vij=a.asm.Aa).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.Ba).apply(null,arguments)};function vt(e){function r(){st||(st=!0,a.calledRun=!0,T||(!0,he.root=pe.mount(he,{},null),a.noFSInit||pe.init.initialized||pe.init(),pe.ignorePermissions=!1,le.init(),ie(L),t(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)e=a.postRun.shift(),I.unshift(e);var e;ie(I)}()))}e=e||l,H>0||(!function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)e=a.preRun.shift(),U.unshift(e);var e;ie(U)}(),H>0||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),r()},1)):r()))}if(q=function e(){st||vt(),st||(q=e)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return vt(),o.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=rhino3dm:"function"==typeof define&&define.amd?define([],function(){return rhino3dm}):"object"==typeof exports&&(exports.rhino3dm=rhino3dm); \ No newline at end of file diff --git a/libs/loaders/rhino3dm.wasm b/libs/loaders/rhino3dm.wasm deleted file mode 100644 index 7b305791..00000000 Binary files a/libs/loaders/rhino3dm.wasm and /dev/null differ diff --git a/libs/loaders/occt-import-js-worker.js b/libs/occt-import-js-worker.js similarity index 100% rename from libs/loaders/occt-import-js-worker.js rename to libs/occt-import-js-worker.js diff --git a/libs/loaders/occt-import-js.js b/libs/occt-import-js.js similarity index 100% rename from libs/loaders/occt-import-js.js rename to libs/occt-import-js.js diff --git a/libs/loaders/occt-import-js.license.md b/libs/occt-import-js.license.md similarity index 100% rename from libs/loaders/occt-import-js.license.md rename to libs/occt-import-js.license.md diff --git a/libs/loaders/occt-import-js.wasm b/libs/occt-import-js.wasm similarity index 100% rename from libs/loaders/occt-import-js.wasm rename to libs/occt-import-js.wasm diff --git a/libs/loaders/web-ifc-api-browser.js b/libs/web-ifc-api-browser.js similarity index 100% rename from libs/loaders/web-ifc-api-browser.js rename to libs/web-ifc-api-browser.js diff --git a/libs/loaders/web-ifc.license.md b/libs/web-ifc.license.md similarity index 100% rename from libs/loaders/web-ifc.license.md rename to libs/web-ifc.license.md diff --git a/libs/loaders/web-ifc.wasm b/libs/web-ifc.wasm similarity index 100% rename from libs/loaders/web-ifc.wasm rename to libs/web-ifc.wasm diff --git a/package.json b/package.json index 6723b821..50dbf73c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "build/engine/o3dv.module.js", "build/engine/o3dv.module.d.ts", "source/engine/*", - "libs/loaders/*", + "libs/*", "website/assets/envmaps/*" ], "scripts": { @@ -74,10 +74,8 @@ }, "dependencies": { "@simonwep/pickr": "1.9.0", - "draco3d": "1.5.7", "fflate": "0.8.2", "occt-import-js": "0.0.21", - "rhino3dm": "8.4.0", "three": "0.163.0", "web-ifc": "0.0.44" }, diff --git a/source/engine/export/exporter3dm.js b/source/engine/export/exporter3dm.js index f9712e27..869c3f96 100644 --- a/source/engine/export/exporter3dm.js +++ b/source/engine/export/exporter3dm.js @@ -1,4 +1,4 @@ -import { LoadExternalLibrary } from '../io/externallibs.js'; +import { LoadExternalLibraryFromUrl } from '../io/externallibs.js'; import { FileFormat } from '../io/fileutils.js'; import { MaterialType } from '../model/material.js'; import { ConvertMeshToMeshBuffer } from '../model/meshbuffer.js'; @@ -20,7 +20,7 @@ export class Exporter3dm extends ExporterBase ExportContent (exporterModel, format, files, onFinish) { if (this.rhino === null) { - LoadExternalLibrary ('loaders/rhino3dm.min.js').then (() => { + LoadExternalLibraryFromUrl ('https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0/rhino3dm.min.js').then (() => { rhino3dm ().then ((rhino) => { this.rhino = rhino; this.ExportRhinoContent (exporterModel, files, onFinish); diff --git a/source/engine/import/importer.js b/source/engine/import/importer.js index 4e4833e9..d78ab02a 100644 --- a/source/engine/import/importer.js +++ b/source/engine/import/importer.js @@ -13,9 +13,9 @@ import { ImporterOcct } from './importerocct.js'; import { ImporterStl } from './importerstl.js'; import { ImporterBim } from './importerbim.js'; import { ImporterThreeAmf, ImporterThree3mf, ImporterThreeDae, ImporterThreeFbx, ImporterThreeWrl } from './importerthree.js'; +import { ImporterFcstd } from './importerfcstd.js'; import * as fflate from 'fflate'; -import { ImporterFcstd } from './importerfcstd.js'; export class ImportSettings { diff --git a/source/engine/import/importer3dm.js b/source/engine/import/importer3dm.js index 243e5801..541c3eb3 100644 --- a/source/engine/import/importer3dm.js +++ b/source/engine/import/importer3dm.js @@ -1,7 +1,7 @@ import { Direction } from '../geometry/geometry.js'; import { Matrix } from '../geometry/matrix.js'; import { Transformation } from '../geometry/transformation.js'; -import { LoadExternalLibrary } from '../io/externallibs.js'; +import { LoadExternalLibraryFromUrl } from '../io/externallibs.js'; import { GetFileName } from '../io/fileutils.js'; import { PhongMaterial, PhysicalMaterial } from '../model/material.js'; import { TransformMesh } from '../model/meshutils.js'; @@ -49,7 +49,7 @@ export class Importer3dm extends ImporterBase ImportContent (fileContent, onFinish) { if (this.rhino === null) { - LoadExternalLibrary ('loaders/rhino3dm.min.js').then (() => { + LoadExternalLibraryFromUrl ('https://cdn.jsdelivr.net/npm/rhino3dm@8.4.0/rhino3dm.min.js').then (() => { rhino3dm ().then ((rhino) => { this.rhino = rhino; this.ImportRhinoContent (fileContent); diff --git a/source/engine/import/importerfcstd.js b/source/engine/import/importerfcstd.js index 69c150fa..ed9f124e 100644 --- a/source/engine/import/importerfcstd.js +++ b/source/engine/import/importerfcstd.js @@ -344,7 +344,7 @@ export class ImporterFcstd extends ImporterBase ConvertObjects (objects, onFinish) { - let workerPath = GetExternalLibPath ('loaders/occt-import-js-worker.js'); + let workerPath = GetExternalLibPath ('occt-import-js-worker.js'); this.worker = new Worker (workerPath); let convertedObjectCount = 0; diff --git a/source/engine/import/importergltf.js b/source/engine/import/importergltf.js index 52c59abf..f9ef6de7 100644 --- a/source/engine/import/importergltf.js +++ b/source/engine/import/importergltf.js @@ -7,7 +7,7 @@ import { ArrayToQuaternion } from '../geometry/quaternion.js'; import { Transformation } from '../geometry/transformation.js'; import { BinaryReader } from '../io/binaryreader.js'; import { ArrayBufferToUtf8String, Base64DataURIToArrayBuffer, GetFileExtensionFromMimeType } from '../io/bufferutils.js'; -import { LoadExternalLibrary } from '../io/externallibs.js'; +import { LoadExternalLibraryFromUrl } from '../io/externallibs.js'; import { RGBColor, ColorComponentFromFloat, RGBColorFromFloatComponents, LinearToSRGB } from '../model/color.js'; import { PhongMaterial, PhysicalMaterial, TextureMap } from '../model/material.js'; import { Mesh } from '../model/mesh.js'; @@ -282,7 +282,7 @@ class GltfExtensions return; } if (this.draco === null && extensionsRequired.indexOf ('KHR_draco_mesh_compression') !== -1) { - LoadExternalLibrary ('loaders/draco_decoder.js').then (() => { + LoadExternalLibraryFromUrl ('https://cdn.jsdelivr.net/npm/draco3d@1.5.7/draco_decoder_nodejs.min.js').then (() => { DracoDecoderModule ().then ((draco) => { this.draco = draco; callbacks.onSuccess (); diff --git a/source/engine/import/importerifc.js b/source/engine/import/importerifc.js index 417a0b9b..6cb63bf0 100644 --- a/source/engine/import/importerifc.js +++ b/source/engine/import/importerifc.js @@ -44,7 +44,7 @@ export class ImporterIfc extends ImporterBase ImportContent (fileContent, onFinish) { if (this.ifc === null) { - LoadExternalLibrary ('loaders/web-ifc-api-browser.js').then (() => { + LoadExternalLibrary ('web-ifc-api-browser.js').then (() => { this.ifc = new WebIFC.IfcAPI (); this.ifc.Init ().then (() => { this.ImportIfcContent (fileContent); diff --git a/source/engine/import/importerocct.js b/source/engine/import/importerocct.js index 8b80a6e0..7e3b1e6d 100644 --- a/source/engine/import/importerocct.js +++ b/source/engine/import/importerocct.js @@ -41,7 +41,7 @@ export class ImporterOcct extends ImporterBase ImportContent (fileContent, onFinish) { - let workerPath = GetExternalLibPath ('loaders/occt-import-js-worker.js'); + let workerPath = GetExternalLibPath ('occt-import-js-worker.js'); this.worker = new Worker (workerPath); this.worker.addEventListener ('message', (ev) => { this.ImportResultJson (ev.data, onFinish); diff --git a/source/engine/io/externallibs.js b/source/engine/io/externallibs.js index 1161cd8e..14c3e750 100644 --- a/source/engine/io/externallibs.js +++ b/source/engine/io/externallibs.js @@ -1,5 +1,6 @@ let externalLibLocation = null; let loadedExternalLibs = new Set (); +let loadedExternalLibUrls = new Set (); /** * Sets the location of the external libraries used by the engine. This is the content of the libs @@ -45,3 +46,30 @@ export function LoadExternalLibrary (libName) document.head.appendChild (scriptElement); }); } + +export function LoadExternalLibraryFromUrl (libraryUrl) +{ + return new Promise ((resolve, reject) => { + if (externalLibLocation === null) { + reject (); + return; + } + + if (loadedExternalLibUrls.has (libraryUrl)) { + resolve (); + return; + } + + let scriptElement = document.createElement ('script'); + scriptElement.type = 'text/javascript'; + scriptElement.src = libraryUrl; + scriptElement.onload = () => { + loadedExternalLibUrls.add (libraryUrl); + resolve (); + }; + scriptElement.onerror = () => { + reject (); + }; + document.head.appendChild (scriptElement); + }); +} diff --git a/source/engine/main.js b/source/engine/main.js index 09964530..2cde509e 100644 --- a/source/engine/main.js +++ b/source/engine/main.js @@ -43,7 +43,7 @@ import { ColorToMaterialConverter, NameFromLine, ParametersFromLine, ReadLines, import { BinaryReader } from './io/binaryreader.js'; import { BinaryWriter } from './io/binarywriter.js'; import { ArrayBufferToUtf8String, ArrayBufferToAsciiString, AsciiStringToArrayBuffer, Utf8StringToArrayBuffer, Base64DataURIToArrayBuffer, GetFileExtensionFromMimeType, CreateObjectUrl, CreateObjectUrlWithMimeType, RevokeObjectUrl } from './io/bufferutils.js'; -import { SetExternalLibLocation, GetExternalLibPath, LoadExternalLibrary } from './io/externallibs.js'; +import { SetExternalLibLocation, GetExternalLibPath, LoadExternalLibrary, LoadExternalLibraryFromUrl } from './io/externallibs.js'; import { GetFileName, GetFileExtension, RequestUrl, ReadFile, TransformFileHostUrls, IsUrl, FileSource, FileFormat } from './io/fileutils.js'; import { TextWriter } from './io/textwriter.js'; import { RGBColor, RGBAColor, ColorComponentFromFloat, ColorComponentToFloat, RGBColorFromFloatComponents, SRGBToLinear, LinearToSRGB, IntegerToHexString, RGBColorToHexString, RGBAColorToHexString, HexStringToRGBColor, HexStringToRGBAColor, ArrayToRGBColor, RGBColorIsEqual } from './model/color.js'; @@ -207,6 +207,7 @@ export { SetExternalLibLocation, GetExternalLibPath, LoadExternalLibrary, + LoadExternalLibraryFromUrl, GetFileName, GetFileExtension, RequestUrl, diff --git a/tools/create_package.py b/tools/create_package.py index 1f7ce6e1..9a96f33d 100644 --- a/tools/create_package.py +++ b/tools/create_package.py @@ -79,8 +79,8 @@ def CreateEnginePackage (rootDir, engineDir, websiteDir): zipPath = os.path.join (engineDir, 'o3dv.zip') zip = zipfile.ZipFile (zipPath, mode = 'w', compression = zipfile.ZIP_DEFLATED) - for file in os.listdir (os.path.join (websiteDir, 'libs', 'loaders')): - zip.write (os.path.join (websiteDir, 'libs', 'loaders', file), 'libs/loaders/' + file) + for file in os.listdir (os.path.join (websiteDir, 'libs')): + zip.write (os.path.join (websiteDir, 'libs', file), 'libs/' + file) for file in os.listdir (os.path.join (websiteDir, 'assets', 'envmaps')): filePath = os.path.join (websiteDir, 'assets', 'envmaps', file) if os.path.isdir (filePath): diff --git a/tools/update_libs.py b/tools/update_libs.py index ee1e1a04..bcfe41b1 100644 --- a/tools/update_libs.py +++ b/tools/update_libs.py @@ -5,19 +5,13 @@ webIfcConverter = 'esbuild {0} --bundle --format=iife --global-name=WebIFC --external:os --external:path --external:fs --external:perf_hooks --outfile={1}' fileMap = [ - [os.path.join ('draco3d', 'draco_decoder_nodejs.js'), os.path.join ('loaders', 'draco_decoder.js'), None], - [os.path.join ('draco3d', 'draco_decoder.wasm'), os.path.join ('loaders', 'draco_decoder.wasm'), None], + [os.path.join ('web-ifc', 'web-ifc-api.js'), os.path.join ('web-ifc-api-browser.js'), webIfcConverter], + [os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('web-ifc.wasm'), None], - [os.path.join ('rhino3dm', 'rhino3dm.min.js'), os.path.join ('loaders', 'rhino3dm.min.js'), None], - [os.path.join ('rhino3dm', 'rhino3dm.wasm'), os.path.join ('loaders', 'rhino3dm.wasm'), None], - - [os.path.join ('web-ifc', 'web-ifc-api.js'), os.path.join ('loaders', 'web-ifc-api-browser.js'), webIfcConverter], - [os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('loaders', 'web-ifc.wasm'), None], - - [os.path.join ('occt-import-js', 'dist', 'occt-import-js.js'), os.path.join ('loaders', 'occt-import-js.js'), None], - [os.path.join ('occt-import-js', 'dist', 'occt-import-js-worker.js'), os.path.join ('loaders', 'occt-import-js-worker.js'), None], - [os.path.join ('occt-import-js', 'dist', 'occt-import-js.wasm'), os.path.join ('loaders', 'occt-import-js.wasm'), None], - [os.path.join ('occt-import-js', 'LICENSE.md'), os.path.join ('loaders', 'occt-import-js.license.md'), None] + [os.path.join ('occt-import-js', 'dist', 'occt-import-js.js'), os.path.join ('occt-import-js.js'), None], + [os.path.join ('occt-import-js', 'dist', 'occt-import-js-worker.js'), os.path.join ('occt-import-js-worker.js'), None], + [os.path.join ('occt-import-js', 'dist', 'occt-import-js.wasm'), os.path.join ('occt-import-js.wasm'), None], + [os.path.join ('occt-import-js', 'LICENSE.md'), os.path.join ('occt-import-js.license.md'), None] ] def PrintInfo (message):