@loaders.gl/gltf 3.1.0-alpha.1 → 3.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +1 -0
- package/dist/dist.min.js +1 -1
- package/dist/dist.min.js.map +1 -1
- package/dist/es5/bundle.js +7 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/glb-loader.js +47 -0
- package/dist/es5/glb-loader.js.map +1 -0
- package/dist/es5/glb-writer.js +42 -0
- package/dist/es5/glb-writer.js.map +1 -0
- package/dist/es5/gltf-loader.js +59 -0
- package/dist/es5/gltf-loader.js.map +1 -0
- package/dist/es5/gltf-writer.js +40 -0
- package/dist/es5/gltf-writer.js.map +1 -0
- package/dist/es5/index.js +56 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/api/gltf-extensions.js +58 -0
- package/dist/es5/lib/api/gltf-extensions.js.map +1 -0
- package/dist/es5/lib/api/gltf-scenegraph.js +529 -0
- package/dist/es5/lib/api/gltf-scenegraph.js.map +1 -0
- package/dist/es5/lib/api/normalize-gltf-v1.js +259 -0
- package/dist/es5/lib/api/normalize-gltf-v1.js.map +1 -0
- package/dist/es5/lib/api/post-process-gltf.js +401 -0
- package/dist/es5/lib/api/post-process-gltf.js.map +1 -0
- package/dist/es5/lib/encoders/encode-glb.js +72 -0
- package/dist/es5/lib/encoders/encode-glb.js.map +1 -0
- package/dist/es5/lib/encoders/encode-gltf.js +24 -0
- package/dist/es5/lib/encoders/encode-gltf.js.map +1 -0
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js +72 -0
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -0
- package/dist/es5/lib/extensions/EXT_texture_webp.js +46 -0
- package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_binary_gltf.js +39 -0
- package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +146 -0
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_texture_basisu.js +35 -0
- package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +65 -0
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +52 -0
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +83 -0
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
- package/dist/es5/lib/gltf-utils/get-typed-array.js +26 -0
- package/dist/es5/lib/gltf-utils/get-typed-array.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js +83 -0
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-constants.js +48 -0
- package/dist/es5/lib/gltf-utils/gltf-constants.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js +69 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -0
- package/dist/es5/lib/gltf-utils/resolve-url.js +23 -0
- package/dist/es5/lib/gltf-utils/resolve-url.js.map +1 -0
- package/dist/es5/lib/parsers/parse-glb.js +138 -0
- package/dist/es5/lib/parsers/parse-glb.js.map +1 -0
- package/dist/es5/lib/parsers/parse-gltf.js +193 -0
- package/dist/es5/lib/parsers/parse-gltf.js.map +1 -0
- package/dist/es5/lib/types/glb-types.js +2 -0
- package/dist/{lib → es5/lib}/types/glb-types.js.map +0 -0
- package/dist/es5/lib/types/gltf-json-schema.js +2 -0
- package/dist/{lib → es5/lib}/types/gltf-json-schema.js.map +0 -0
- package/dist/es5/lib/types/gltf-postprocessed-schema.js +2 -0
- package/dist/{lib → es5/lib}/types/gltf-postprocessed-schema.js.map +0 -0
- package/dist/es5/lib/types/gltf-types.js +2 -0
- package/dist/{lib → es5/lib}/types/gltf-types.js.map +0 -0
- package/dist/es5/lib/utils/assert.js +13 -0
- package/dist/es5/lib/utils/assert.js.map +1 -0
- package/dist/es5/lib/utils/version.js +9 -0
- package/dist/es5/lib/utils/version.js.map +1 -0
- package/dist/es5/meshopt/meshopt-decoder.js +119 -0
- package/dist/es5/meshopt/meshopt-decoder.js.map +1 -0
- package/dist/{meshopt → es5/meshopt}/meshopt-encoder.ts.disabled +0 -0
- package/dist/es5/webp/webp.js +36 -0
- package/dist/es5/webp/webp.js.map +1 -0
- package/dist/esm/bundle.js +5 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/{glb-loader.js → esm/glb-loader.js} +0 -0
- package/dist/esm/glb-loader.js.map +1 -0
- package/dist/{glb-writer.js → esm/glb-writer.js} +0 -0
- package/dist/esm/glb-writer.js.map +1 -0
- package/dist/{gltf-loader.js → esm/gltf-loader.js} +0 -0
- package/dist/esm/gltf-loader.js.map +1 -0
- package/dist/{gltf-writer.js → esm/gltf-writer.js} +0 -0
- package/dist/esm/gltf-writer.js.map +1 -0
- package/dist/{index.js → esm/index.js} +0 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/api/gltf-extensions.js +35 -0
- package/dist/esm/lib/api/gltf-extensions.js.map +1 -0
- package/dist/{lib → esm/lib}/api/gltf-scenegraph.js +1 -1
- package/dist/esm/lib/api/gltf-scenegraph.js.map +1 -0
- package/dist/{lib → esm/lib}/api/normalize-gltf-v1.js +4 -4
- package/dist/esm/lib/api/normalize-gltf-v1.js.map +1 -0
- package/dist/{lib → esm/lib}/api/post-process-gltf.js +12 -12
- package/dist/esm/lib/api/post-process-gltf.js.map +1 -0
- package/dist/{lib → esm/lib}/encoders/encode-glb.js +0 -0
- package/dist/esm/lib/encoders/encode-glb.js.map +1 -0
- package/dist/{lib → esm/lib}/encoders/encode-gltf.js +0 -0
- package/dist/esm/lib/encoders/encode-gltf.js.map +1 -0
- package/dist/{lib → esm/lib}/extensions/EXT_meshopt_compression.js +16 -8
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -0
- package/dist/esm/lib/extensions/EXT_texture_webp.js +32 -0
- package/dist/esm/lib/extensions/EXT_texture_webp.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_binary_gltf.js +26 -0
- package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +1 -0
- package/dist/{lib → esm/lib}/extensions/KHR_draco_mesh_compression.js +9 -1
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_texture_basisu.js +22 -0
- package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +1 -0
- package/dist/{lib/extensions → esm/lib/extensions/deprecated}/KHR_lights_punctual.js +4 -3
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
- package/dist/{lib/extensions → esm/lib/extensions/deprecated}/KHR_materials_unlit.js +3 -2
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
- package/dist/{lib/extensions → esm/lib/extensions/deprecated}/KHR_techniques_webgl.js +3 -2
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
- package/dist/{lib → esm/lib}/gltf-utils/get-typed-array.js +0 -0
- package/dist/esm/lib/gltf-utils/get-typed-array.js.map +1 -0
- package/dist/{lib → esm/lib}/gltf-utils/gltf-attribute-utils.js +0 -0
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/gltf-utils/gltf-constants.js +0 -6
- package/dist/esm/lib/gltf-utils/gltf-constants.js.map +1 -0
- package/dist/{lib → esm/lib}/gltf-utils/gltf-utils.js +0 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/gltf-utils/resolve-url.js +1 -1
- package/dist/esm/lib/gltf-utils/resolve-url.js.map +1 -0
- package/dist/{lib → esm/lib}/parsers/parse-glb.js +2 -6
- package/dist/esm/lib/parsers/parse-glb.js.map +1 -0
- package/dist/{lib → esm/lib}/parsers/parse-gltf.js +42 -7
- package/dist/esm/lib/parsers/parse-gltf.js.map +1 -0
- package/dist/{lib → esm/lib}/types/glb-types.js +0 -0
- package/dist/esm/lib/types/glb-types.js.map +1 -0
- package/dist/{lib → esm/lib}/types/gltf-json-schema.js +0 -0
- package/dist/esm/lib/types/gltf-json-schema.js.map +1 -0
- package/dist/{lib → esm/lib}/types/gltf-postprocessed-schema.js +0 -0
- package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +1 -0
- package/dist/{lib → esm/lib}/types/gltf-types.js +0 -0
- package/dist/esm/lib/types/gltf-types.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/assert.js +0 -0
- package/dist/esm/lib/utils/assert.js.map +1 -0
- package/dist/esm/lib/utils/version.js +2 -0
- package/dist/esm/lib/utils/version.js.map +1 -0
- package/dist/{meshopt → esm/meshopt}/meshopt-decoder.js +1 -1
- package/dist/esm/meshopt/meshopt-decoder.js.map +1 -0
- package/dist/esm/meshopt/meshopt-encoder.ts.disabled +409 -0
- package/dist/esm/webp/webp.js +29 -0
- package/dist/esm/webp/webp.js.map +1 -0
- package/dist/glb-loader.d.ts +12 -0
- package/dist/glb-writer.d.ts +21 -0
- package/dist/gltf-loader.d.ts +17 -0
- package/dist/gltf-writer.d.ts +24 -0
- package/dist/index.d.ts +10 -0
- package/dist/lib/api/gltf-extensions.d.ts +25 -0
- package/dist/lib/api/gltf-scenegraph.d.ts +182 -0
- package/dist/lib/api/normalize-gltf-v1.d.ts +1 -0
- package/dist/lib/api/post-process-gltf.d.ts +1 -0
- package/dist/lib/encoders/encode-glb.d.ts +1 -0
- package/dist/lib/encoders/encode-gltf.d.ts +1 -0
- package/dist/lib/extensions/EXT_meshopt_compression.d.ts +9 -0
- package/dist/lib/extensions/EXT_texture_webp.d.ts +11 -0
- package/dist/lib/extensions/KHR_binary_gltf.d.ts +6 -0
- package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +12 -0
- package/dist/lib/extensions/KHR_texture_basisu.d.ts +11 -0
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts +6 -0
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts +6 -0
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts +6 -0
- package/dist/lib/gltf-utils/get-typed-array.d.ts +2 -0
- package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts +5 -0
- package/dist/lib/gltf-utils/gltf-constants.d.ts +3 -0
- package/dist/lib/gltf-utils/gltf-utils.d.ts +7 -0
- package/dist/lib/gltf-utils/resolve-url.d.ts +1 -0
- package/dist/lib/parsers/parse-glb.d.ts +7 -0
- package/dist/lib/parsers/parse-gltf.d.ts +13 -0
- package/dist/lib/types/glb-types.d.ts +16 -0
- package/dist/lib/types/gltf-json-schema.d.ts +719 -0
- package/dist/lib/types/gltf-postprocessed-schema.d.ts +684 -0
- package/dist/lib/types/gltf-types.d.ts +9 -0
- package/dist/lib/utils/assert.d.ts +1 -0
- package/dist/lib/utils/version.d.ts +1 -0
- package/dist/meshopt/meshopt-decoder.d.ts +5 -0
- package/dist/webp/webp.d.ts +6 -0
- package/package.json +13 -9
- package/src/bundle.ts +2 -3
- package/src/gltf-loader.ts +7 -4
- package/src/index.ts +8 -4
- package/src/lib/api/gltf-extensions.ts +71 -0
- package/src/lib/api/gltf-scenegraph.ts +4 -6
- package/src/lib/api/normalize-gltf-v1.js +2 -1
- package/src/lib/extensions/EXT_meshopt_compression.ts +32 -23
- package/src/lib/extensions/EXT_texture_webp.ts +45 -0
- package/src/lib/extensions/KHR_binary_gltf.ts +19 -10
- package/src/lib/extensions/KHR_draco_mesh_compression.ts +29 -4
- package/src/lib/extensions/KHR_texture_basisu.ts +36 -0
- package/src/lib/extensions/{KHR_lights_punctual.ts → deprecated/KHR_lights_punctual.ts} +7 -4
- package/src/lib/extensions/{KHR_materials_unlit.ts → deprecated/KHR_materials_unlit.ts} +6 -3
- package/src/lib/extensions/{KHR_techniques_webgl.ts → deprecated/KHR_techniques_webgl.ts} +6 -3
- package/src/lib/gltf-utils/gltf-constants.ts +0 -12
- package/src/lib/parsers/parse-gltf.ts +72 -20
- package/src/lib/types/gltf-json-schema.ts +96 -3
- package/src/lib/types/gltf-types.ts +19 -21
- package/src/webp/webp.ts +41 -0
- package/dist/bundle.js +0 -7
- package/dist/bundle.js.map +0 -1
- package/dist/glb-loader.js.map +0 -1
- package/dist/glb-writer.js.map +0 -1
- package/dist/gltf-loader.js.map +0 -1
- package/dist/gltf-writer.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/api/gltf-scenegraph.js.map +0 -1
- package/dist/lib/api/normalize-gltf-v1.js.map +0 -1
- package/dist/lib/api/post-process-gltf.js.map +0 -1
- package/dist/lib/encoders/encode-glb.js.map +0 -1
- package/dist/lib/encoders/encode-gltf.js.map +0 -1
- package/dist/lib/extensions/EXT_meshopt_compression.js.map +0 -1
- package/dist/lib/extensions/KHR_binary_gltf.js +0 -26
- package/dist/lib/extensions/KHR_binary_gltf.js.map +0 -1
- package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
- package/dist/lib/extensions/KHR_lights_punctual.js.map +0 -1
- package/dist/lib/extensions/KHR_materials_unlit.js.map +0 -1
- package/dist/lib/extensions/KHR_techniques_webgl.js.map +0 -1
- package/dist/lib/extensions/gltf-extensions.js +0 -24
- package/dist/lib/extensions/gltf-extensions.js.map +0 -1
- package/dist/lib/gltf-utils/get-typed-array.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-constants.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-utils.js.map +0 -1
- package/dist/lib/gltf-utils/resolve-url.js.map +0 -1
- package/dist/lib/parsers/parse-glb.js.map +0 -1
- package/dist/lib/parsers/parse-gltf.js.map +0 -1
- package/dist/lib/utils/assert.js.map +0 -1
- package/dist/lib/utils/version.js +0 -2
- package/dist/lib/utils/version.js.map +0 -1
- package/dist/meshopt/meshopt-decoder.js.map +0 -1
- package/src/lib/extensions/gltf-extensions.ts +0 -48
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare const moduleExports: any;
|
package/dist/dist.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window||{},o="object"!=typeof r||"[object process]"!==String(r)||r.browser,a="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version));c&&parseFloat(c[1])}).call(this,n(4),n(7))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window,o="object"!=typeof r||"[object process]"!==String(r)||r.browser,a=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);a&&parseFloat(a[1])}).call(this,n(4),n(7))},function(e,t){},,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},,function(e,t){var n,r,s=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var c,u=[],f=!1,d=-1;function l(){f&&c&&(f=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!f){var e=a(l);f=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||f||a(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},,function(e,t,n){(function(t){const r=n(12),s="undefined"==typeof window?t:window;s.loaders=s.loaders||{},e.exports=Object.assign(s.loaders,r)}).call(this,n(4))},,,function(e,t,n){"use strict";n.r(t),n.d(t,"KHR_DRACO_MESH_COMPRESSION",(function(){return a})),n.d(t,"GLTFLoader",(function(){return yt})),n.d(t,"GLTFWriter",(function(){return _t})),n.d(t,"GLBLoader",(function(){return xt})),n.d(t,"GLBWriter",(function(){return It})),n.d(t,"GLTFScenegraph",(function(){return ze})),n.d(t,"postProcessGLTF",(function(){return ut}));var r={};n.r(r),n.d(r,"decode",(function(){return ke})),n.d(r,"encode",(function(){return qe}));var s={};n.r(s),n.d(s,"decode",(function(){return He})),n.d(s,"encode",(function(){return Ke}));var i={};n.r(i),n.d(i,"decode",(function(){return We})),n.d(i,"encode",(function(){return Xe}));var o={};n.r(o),n.d(o,"decode",(function(){return Qe})),n.d(o,"encode",(function(){return Je}));const a="KHR_draco_mesh_compression";const c="3.1.0-alpha.1";function u(e,t){if(!e)throw new Error(t)}var f=n(1);const{_parseImageNode:d}=f.a,l="undefined"!=typeof Image,h="undefined"!=typeof ImageBitmap,m=Boolean(d),g=!!f.b||m;function b(e){const t=p(e);if(!t)throw new Error("Not an image");return t}function y(e){switch(b(e)){case"data":return e;case"image":case"imagebitmap":const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("getImageData");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function p(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&e instanceof Image?"image":e&&"object"==typeof e&&e.data&&e.width&&e.height?"data":null}const w=/^data:image\/svg\+xml/,T=/\.svg((\?|#).*)?$/;function v(e){return e&&(w.test(e)||T.test(e))}function _(e,t){if(v(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function x(e,t,n){const r=function(e,t){if(v(t)){let t=(new TextDecoder).decode(e);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(t=unescape(encodeURIComponent(t)))}catch(e){throw new Error(e.message)}return"data:image/svg+xml;base64,"+btoa(t)}return _(e,t)}(e,n),s=self.URL||self.webkitURL,i="string"!=typeof r&&s.createObjectURL(r);try{return await async function(e,t){const n=new Image;if(n.src=e,t.image&&t.image.decode&&n.decode)return await n.decode(),n;return await new Promise((t,r)=>{try{n.onload=()=>t(n),n.onerror=t=>r(new Error(`Could not load image ${e}: ${t}`))}catch(e){r(e)}})}(i||r,t)}finally{i&&s.revokeObjectURL(i)}}const A={};let I=!0;async function j(e,t,n){let r;if(v(n)){r=await x(e,t,n)}else r=_(e,n);const s=t&&t.imagebitmap;return await async function(e,t=null){!function(e){for(const t in e||A)return!1;return!0}(t)&&I||(t=null);if(t)try{return await createImageBitmap(e,t)}catch(e){console.warn(e),I=!1}return await createImageBitmap(e)}(r,s)}function E(e){const t=O(e);return function(e){const t=O(e);if(!(t.byteLength>=24&&2303741511===t.getUint32(0,!1)))return null;return{mimeType:"image/png",width:t.getUint32(16,!1),height:t.getUint32(20,!1)}}(t)||function(e){const t=O(e);if(!(t.byteLength>=3&&65496===t.getUint16(0,!1)&&255===t.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let s=2;for(;s+9<t.byteLength;){const e=t.getUint16(s,!1);if(r.has(e))return{mimeType:"image/jpeg",height:t.getUint16(s+5,!1),width:t.getUint16(s+7,!1)};if(!n.has(e))return null;s+=2,s+=t.getUint16(s,!1)}return null}(t)||function(e){const t=O(e);if(!(t.byteLength>=10&&1195984440===t.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:t.getUint16(6,!0),height:t.getUint16(8,!0)}}(t)||function(e){const t=O(e);if(!(t.byteLength>=14&&16973===t.getUint16(0,!1)&&t.getUint32(2,!0)===t.byteLength))return null;return{mimeType:"image/bmp",width:t.getUint32(18,!0),height:t.getUint32(22,!0)}}(t)}function O(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}const S={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.1",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(e,t,n){const r=((t=t||{}).image||{}).type||"auto",{url:s}=n||{};let i;switch(function(e){switch(e){case"auto":case"data":return function(){if(h)return"imagebitmap";if(l)return"image";if(g)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return h||l||g;case"imagebitmap":return h;case"image":return l;case"data":return g;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}(e),e}}(r)){case"imagebitmap":i=await j(e,t,s);break;case"image":i=await x(e,t,s);break;case"data":i=await function(e,t){const{mimeType:n}=E(e)||{},{_parseImageNode:r}=f.a;return u(r),r(e,n,t)}(e,t);break;default:u(!1)}return"data"===r&&(i=y(i)),i},tests:[e=>Boolean(E(new DataView(e)))],options:{image:{type:"auto",decode:!0}}};function U(e,t,n){if(e.byteLength<=t+n)return"";const r=new DataView(e);let s="";for(let e=0;e<n;e++)s+=String.fromCharCode(r.getUint8(t+e));return s}function M(e){try{return JSON.parse(e)}catch(t){throw new Error(`Failed to parse JSON from data starting with "${function(e,t=5){if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return U(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return U(e,0,t)}return""}(e)}"`)}}n(5);function L(e,t,n){const r=void 0!==n?new Uint8Array(e).subarray(t,t+n):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}function R(e,t){if(!e)throw new Error(t||"assert failed: gltf")}function B(e,t){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;const n=t.baseUri||t.uri;if(!n)throw new Error("'baseUri' must be provided to resolve relative url "+e);return n.substr(0,n.lastIndexOf("/")+1)+e}function F(e,t,n){const r=e.bufferViews[n];R(r);const s=t[r.buffer];R(s);const i=(r.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,r.byteLength)}const D={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.1",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class V{constructor(e,t){N(this,"fields",void 0),N(this,"metadata",void 0),function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}(Array.isArray(e)),function(e){const t={};for(const n of e)t[n.name]&&console.warn("Schema: duplicated field name",n.name,n),t[n.name]=!0}(e),this.fields=e,this.metadata=t||new Map}compareTo(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}select(...e){const t=Object.create(null);for(const n of e)t[n]=!0;const n=this.fields.filter(e=>t[e.name]);return new V(n,this.metadata)}selectAt(...e){const t=e.map(e=>this.fields[e]).filter(Boolean);return new V(t,this.metadata)}assign(e){let t,n=this.metadata;if(e instanceof V){const r=e;t=r.fields,n=C(C(new Map,this.metadata),r.metadata)}else t=e;const r=Object.create(null);for(const e of this.fields)r[e.name]=e;for(const e of t)r[e.name]=e;const s=Object.values(r);return new V(s,n)}}function C(e,t){return new Map([...e||new Map,...t||new Map])}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class P{constructor(e,t,n=!1,r=new Map){z(this,"name",void 0),z(this,"type",void 0),z(this,"nullable",void 0),z(this,"metadata",void 0),this.name=e,this.type=t,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new P(this.name,this.type,this.nullable,this.metadata)}compareTo(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let k,q,G,$,H,K,W,X,Q;function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(k||(k={}));class Y{static isNull(e){return e&&e.typeId===k.Null}static isInt(e){return e&&e.typeId===k.Int}static isFloat(e){return e&&e.typeId===k.Float}static isBinary(e){return e&&e.typeId===k.Binary}static isUtf8(e){return e&&e.typeId===k.Utf8}static isBool(e){return e&&e.typeId===k.Bool}static isDecimal(e){return e&&e.typeId===k.Decimal}static isDate(e){return e&&e.typeId===k.Date}static isTime(e){return e&&e.typeId===k.Time}static isTimestamp(e){return e&&e.typeId===k.Timestamp}static isInterval(e){return e&&e.typeId===k.Interval}static isList(e){return e&&e.typeId===k.List}static isStruct(e){return e&&e.typeId===k.Struct}static isUnion(e){return e&&e.typeId===k.Union}static isFixedSizeBinary(e){return e&&e.typeId===k.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===k.FixedSizeList}static isMap(e){return e&&e.typeId===k.Map}static isDictionary(e){return e&&e.typeId===k.Dictionary}get typeId(){return k.NONE}compareTo(e){return this===e}}Symbol.toStringTag;Symbol.toStringTag;q=Symbol.toStringTag;class Z extends Y{constructor(e,t){super(),J(this,"isSigned",void 0),J(this,"bitWidth",void 0),this.isSigned=e,this.bitWidth=t}get typeId(){return k.Int}get[q](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class ee extends Z{constructor(){super(!0,8)}}class te extends Z{constructor(){super(!0,16)}}class ne extends Z{constructor(){super(!0,32)}}class re extends Z{constructor(){super(!1,8)}}class se extends Z{constructor(){super(!1,16)}}class ie extends Z{constructor(){super(!1,32)}}const oe=32,ae=64;G=Symbol.toStringTag;class ce extends Y{constructor(e){super(),J(this,"precision",void 0),this.precision=e}get typeId(){return k.Float}get[G](){return"Float"}toString(){return"Float"+this.precision}}class ue extends ce{constructor(){super(oe)}}class fe extends ce{constructor(){super(ae)}}Symbol.toStringTag;Symbol.toStringTag;$=Symbol.toStringTag;H=Symbol.toStringTag;K=Symbol.toStringTag;W=Symbol.toStringTag;X=Symbol.toStringTag;class de extends Y{constructor(e,t){super(),J(this,"listSize",void 0),J(this,"children",void 0),this.listSize=e,this.children=[t]}get typeId(){return k.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[X](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}Q=Symbol.toStringTag;function le(e,t,n){const r=function(e){switch(e.constructor){case Int8Array:return new ee;case Uint8Array:return new re;case Int16Array:return new te;case Uint16Array:return new se;case Int32Array:return new ne;case Uint32Array:return new ie;case Float32Array:return new ue;case Float64Array:return new fe;default:throw new Error("array type not supported")}}(t.value),s=n||function(e){const t=new Map;"byteOffset"in e&&t.set("byteOffset",e.byteOffset.toString(10));"byteStride"in e&&t.set("byteStride",e.byteStride.toString(10));"normalized"in e&&t.set("normalized",e.normalized.toString());return t}(t);return new P(e,new de(t.size,new P("value",r)),!1,s)}function he(e,t,n){return le(e,t,n?me(n.metadata):void 0)}function me(e){const t=new Map;for(const n in e)t.set(n+".string",JSON.stringify(e[n]));return t}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const be={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ye={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class pe{constructor(e){ge(this,"draco",void 0),ge(this,"decoder",void 0),ge(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const r=this.decoder.GetEncodedGeometryType(n),s=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let e;switch(r){case this.draco.TRIANGULAR_MESH:e=this.decoder.DecodeBufferToMesh(n,s);break;case this.draco.POINT_CLOUD:e=this.decoder.DecodeBufferToPointCloud(n,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!e.ok()||!s.ptr){const t="DRACO decompression failed: "+e.error_msg();throw new Error(t)}const i=this._getDracoLoaderData(s,r,t),o=this._getMeshData(s,i,t),a=function(e){let t=1/0,n=1/0,r=1/0,s=-1/0,i=-1/0,o=-1/0;const a=e.POSITION?e.POSITION.value:[],c=a&&a.length;for(let e=0;e<c;e+=3){const c=a[e],u=a[e+1],f=a[e+2];t=c<t?c:t,n=u<n?u:n,r=f<r?f:r,s=c>s?c:s,i=u>i?u:i,o=f>o?f:o}return[[t,n,r],[s,i,o]]}(o.attributes),c=function(e,t,n){const r=me(t.metadata),s=[],i=function(e){const t={};for(const n in e){const r=e[n];t[r.name||"undefined"]=r}return t}(t.attributes);for(const t in e){const n=he(t,e[t],i[t]);s.push(n)}if(n){const e=he("indices",n);s.push(e)}return new V(s,r)}(o.attributes,i,o.indices);return{loader:"draco",loaderData:i,header:{vertexCount:s.num_points(),boundingBox:a},...o,schema:c}}finally{this.draco.destroy(n),s&&this.draco.destroy(s)}}_getDracoLoaderData(e,t,n){const r=this._getTopLevelMetadata(e),s=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:s}}_getDracoAttributes(e,t){const n={};for(let r=0;r<e.num_attributes();r++){const s=this.decoder.GetAttribute(e,r),i=this._getAttributeMetadata(e,r);n[s.unique_id()]={unique_id:s.unique_id(),attribute_type:s.attribute_type(),data_type:s.data_type(),num_components:s.num_components(),byte_offset:s.byte_offset(),byte_stride:s.byte_stride(),normalized:s.normalized(),attribute_index:r,metadata:i};const o=this._getQuantizationTransform(s,t);o&&(n[s.unique_id()].quantization_transform=o);const a=this._getOctahedronTransform(s,t);a&&(n[s.unique_id()].octahedron_transform=a)}return n}_getMeshData(e,t,n){const r=this._getMeshAttributes(t,e,n);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(n.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,t,n){const r={};for(const s of Object.values(e.attributes)){const e=this._deduceAttributeName(s,n);s.name=e;const{value:i,size:o}=this._getAttributeValues(t,s);r[e]={value:i,size:o,byteOffset:s.byte_offset,byteStride:s.byte_stride,normalized:s.normalized}}return r}_getTriangleListIndices(e){const t=3*e.num_faces(),n=4*t,r=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(e,n,r),new Uint32Array(this.draco.HEAPF32.buffer,r,t).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),function(e){const t=e.size(),n=new Int32Array(t);for(let r=0;r<t;r++)n[r]=e.GetValue(r);return n}(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const n=ye[t.data_type],r=t.num_components,s=e.num_points()*r,i=s*n.BYTES_PER_ELEMENT,o=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}(this.draco,n);let a;const c=this.draco._malloc(i);try{const r=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,r,o,i,c),a=new n(this.draco.HEAPF32.buffer,c,s).slice()}finally{this.draco._free(c)}return{value:a,size:r}}_deduceAttributeName(e,t){const n=e.unique_id;for(const[e,r]of Object.entries(t.extraAttributes||{}))if(r===n)return e;const r=e.attribute_type;for(const e in be){if(this.draco[e]===r)return be[e]}const s=t.attributeNameEntry||"name";return e.metadata[s]?e.metadata[s].string:"CUSTOM_ATTRIBUTE_"+n}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const n=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(n)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},n=this.metadataQuerier.NumEntries(e);for(let r=0;r<n;r++){const n=this.metadataQuerier.GetEntryName(e,r);t[n]=this._getDracoMetadataField(e,n)}return t}_getDracoMetadataField(e,t){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,n);const r=function(e){const t=e.size(),n=new Int32Array(t);for(let r=0;r<t;r++)n[r]=e.GetValue(r);return n}(n);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:r}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:n=[]}=e,r=[...t,...n];for(const e of r)this.decoder.SkipAttributeTransform(this.draco[e])}_getQuantizationTransform(e,t){const{quantizedAttributes:n=[]}=t,r=e.attribute_type();if(n.map(e=>this.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits(),range:t.range(),min_values:new Float32Array([1,2,3]).map(e=>t.min_value(e))}}finally{this.draco.destroy(t)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:n=[]}=t,r=e.attribute_type();if(n.map(e=>this.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits()}}finally{this.draco.destroy(t)}}return null}}var we=n(0),Te=n(2);const ve={};async function _e(e,t=null,n={}){return t&&(e=function(e,t,n){if(e.startsWith("http"))return e;const r=n.modules||{};if(r[e])return r[e];if(!we.b)return`modules/${t}/dist/libs/${e}`;if(n.CDN)return function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(n.CDN.startsWith("http")),`${n.CDN}/${t}@3.1.0-alpha.1/dist/libs/${e}`;if(we.c)return"../src/libs/"+e;return`modules/${t}/src/libs/${e}`}(e,t,n)),ve[e]=ve[e]||async function(e){if(e.endsWith("wasm")){const t=await fetch(e);return await t.arrayBuffer()}if(!we.b)return Te.requireFromFile&&await Te.requireFromFile(e);if(we.c)return importScripts(e);const t=await fetch(e);return function(e,t){if(!we.b)return Te.requireFromString&&Te.requireFromString(e,t);if(we.c)return eval.call(we.a,e),null;const n=document.createElement("script");n.id=t;try{n.appendChild(document.createTextNode(e))}catch(t){n.text=e}return document.body.appendChild(n),null}(await t.text(),e)}(e),await ve[e]}let xe;async function Ae(e){const t=e.modules||{};return xe=t.draco3d?xe||t.draco3d.createDecoderModule({}).then(e=>({draco:e})):xe||async function(e){let t,n;switch(e.draco&&e.draco.decoderType){case"js":t=await _e("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",e);break;case"wasm":default:[t,n]=await Promise.all([await _e("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",e),await _e("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",e)])}return t=t||globalThis.DracoDecoderModule,await function(e,t){const n={};t&&(n.wasmBinary=t);return new Promise(t=>{e({...n,onModuleLoaded:e=>t({draco:e})})})}(t,n)}(e),await xe}const Ie={...D,parse:async function(e,t){const{draco:n}=await Ae(t),r=new pe(n);try{return r.parseSync(e,null==t?void 0:t.draco)}finally{r.destroy()}}};function je(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function Ee(e,t){return je(e>=0),je(t>0),e+(t-1)&~(t-1)}function Oe(e,t,n){let r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{const t=e.byteOffset,n=e.byteLength;r=new Uint8Array(e.buffer||e.arrayBuffer,t,n)}return t.set(r,n),n+Ee(r.byteLength,4)}const Se=["SCALAR","VEC2","VEC3","VEC4"],Ue=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Me=new Map(Ue),Le={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Re={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Be={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Fe(e){return Se[e-1]||Se[0]}function De(e){const t=Me.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function Ne(e,t){const n=Be[e.componentType],r=Le[e.type],s=Re[e.componentType],i=e.count*r,o=e.count*r*s;return R(o>=0&&o<=t.byteLength),{ArrayType:n,length:i,byteLength:o}}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ce={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class ze{constructor(e){Ve(this,"gltf",void 0),Ve(this,"sourceBuffers",void 0),Ve(this,"byteLength",void 0),this.gltf=e||{json:{...Ce},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}getExtension(e){const t=this.getUsedExtensions().find(t=>t===e),n=this.json.extensions||{};return t?n[e]||!0:null}getRequiredExtension(e){return this.getRequiredExtensions().find(t=>t===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if("object"==typeof t)return t;const n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){const t=(e=this.getBufferView(e)).buffer,n=this.gltf.buffers[t];R(n);const r=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,{ArrayType:r,length:s}=Ne(e,t);return new r(n,t.byteOffset+e.byteOffset,s)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(n,r,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){(e.extensions||{})[t]=n}removeObjectExtension(e,t){const n=e.extensions||{},r=n[t];return delete n[t],r}addExtension(e,t={}){return R(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return R(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e]}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];const r={mesh:t};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:n,material:r,mode:s=4}=e,i={primitives:[{attributes:this._addAttributes(t),mode:s}]};if(n){const e=this._addIndices(n);i.primitives[0].indices=e}return Number.isFinite(r)&&(i.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addPointCloud(e){const t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}addImage(e,t){const n=E(e),r=t||(null==n?void 0:n.mimeType),s={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e){const t=e.byteLength;R(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=Ee(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,t){const n={bufferView:e,type:Fe(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const n=this.addBufferView(e);let r={min:t.min,max:t.max};r.min&&r.max||(r=this._getAccessorMinMax(e,t.size));const s={size:t.size,componentType:De(e),count:Math.round(e.length/t.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(s,t))}addTexture(e){const{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){var e,t;this.gltf.buffers=[];const n=this.byteLength,r=new ArrayBuffer(n),s=new Uint8Array(r);let i=0;for(const e of this.sourceBuffers||[])i=Oe(e,s,i);null!==(e=this.json)&&void 0!==e&&null!==(t=e.buffers)&&void 0!==t&&t[0]?this.json.buffers[0].byteLength=n:this.json.buffers=[{byteLength:n}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(e,t){let n=!0;for(;n;){const r=e.indexOf(t);r>-1?e.splice(r,1):n=!1}}_addAttributes(e={}){const t={};for(const n in e){const r=e[n],s=this._getGltfAttributeName(n),i=this.addBinaryBuffer(r.value,r);t[s]=i}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const n={min:null,max:null};if(e.length<t)return n;n.min=[],n.max=[];const r=e.subarray(0,t);for(const e of r)n.min.push(e),n.max.push(e);for(let r=t;r<e.length;r+=t)for(let s=0;s<t;s++)n.min[0+s]=Math.min(n.min[0+s],e[r+s]),n.max[0+s]=Math.max(n.max[0+s],e[r+s]);return n}}function Pe(e){const{buffer:t,size:n,count:r}=function(e){let t=e,n=1,r=0;e&&e.value&&(t=e.value,n=e.size||1);t&&(ArrayBuffer.isView(t)||(t=function(e,t,n=!1){if(!e)return null;if(Array.isArray(e))return new t(e);if(n&&!(e instanceof t))return new t(e);return e}(t,Float32Array)),r=t.length/n);return{buffer:t,size:n,count:r}}(e);return{value:t,size:n,byteOffset:0,count:r,type:Fe(n),componentType:De(t)}}async function ke(e,t,n){var r;if(null==t||null===(r=t.gltf)||void 0===r||!r.decompressMeshes)return;const s=new ze(e),i=[];for(const e of function*(e){for(const t of e.json.meshes||[])for(const e of t.primitives)yield e}(s))s.getObjectExtension(e,a)&&i.push(Ge(s,e,t,n));await Promise.all(i),s.removeExtension(a)}function qe(e,t={}){const n=new ze(e);for(const e of n.json.meshes||[])$e(e,t),n.addRequiredExtension(a)}async function Ge(e,t,n,r){const s=e.getObjectExtension(t,a);if(!s)return;const i=e.getTypedArrayForBufferView(s.bufferView),o=L(i.buffer,i.byteOffset),{parse:c}=r,u={...n};delete u["3d-tiles"];const f=await c(o,Ie,u,r),d=function(e){const t={};for(const n in e){const r=e[n];if("indices"!==n){const e=Pe(r);t[n]=e}}return t}(f.attributes);for(const[n,r]of Object.entries(d))if(n in t.attributes){const s=t.attributes[n],i=e.getAccessor(s);null!=i&&i.min&&null!=i&&i.max&&(r.min=i.min,r.max=i.max)}t.attributes=d,f.indices&&(t.indices=Pe(f.indices)),function(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(t)}function $e(e,t,n=4,r,s){var i;if(!r.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const o=r.DracoWriter.encodeSync({attributes:e}),c=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:e}),u=r._addFauxAttributes(c.attributes),f=r.addBufferView(o);return{primitives:[{attributes:u,mode:n,extensions:{[a]:{bufferView:f,attributes:u}}}]}}async function He(e){const t=new ze(e),{json:n}=t;t.removeExtension("KHR_materials_unlit");for(const e of n.materials||[]){e.extensions&&e.extensions.KHR_materials_unlit&&(e.unlit=!0),t.removeObjectExtension(e,"KHR_materials_unlit")}}function Ke(e){const t=new ze(e),{json:n}=t;if(t.materials)for(const e of n.materials||[])e.unlit&&(delete e.unlit,t.addObjectExtension(e,"KHR_materials_unlit",{}),t.addExtension("KHR_materials_unlit"))}async function We(e){const t=new ze(e),{json:n}=t,r=t.getExtension("KHR_lights_punctual");r&&(t.json.lights=r.lights,t.removeExtension("KHR_lights_punctual"));for(const e of n.nodes||[]){const n=t.getObjectExtension(e,"KHR_lights_punctual");n&&(e.light=n.light),t.removeObjectExtension(e,"KHR_lights_punctual")}}async function Xe(e){const t=new ze(e),{json:n}=t;if(n.lights){const e=t.addExtension("KHR_lights_punctual");R(!e.lights),e.lights=n.lights,delete n.lights}if(t.json.lights){for(const e of t.json.lights){const n=e.node;t.addObjectExtension(n,"KHR_lights_punctual",e)}delete t.json.lights}}async function Qe(e){const t=new ze(e),{json:n}=t,r=t.getExtension("KHR_techniques_webgl");if(r){const e=function(e,t){const{programs:n=[],shaders:r=[],techniques:s=[]}=e,i=new TextDecoder;return r.forEach(e=>{if(!Number.isFinite(e.bufferView))throw new Error("KHR_techniques_webgl: no shader code");e.code=i.decode(t.getTypedArrayForBufferView(e.bufferView))}),n.forEach(e=>{e.fragmentShader=r[e.fragmentShader],e.vertexShader=r[e.vertexShader]}),s.forEach(e=>{e.program=n[e.program]}),s}(r,t);for(const r of n.materials||[]){const n=t.getObjectExtension(r,"KHR_techniques_webgl");n&&(r.technique=Object.assign({},n,e[n.technique]),r.technique.values=Ye(r.technique,t)),t.removeObjectExtension(r,"KHR_techniques_webgl")}t.removeExtension("KHR_techniques_webgl")}}async function Je(e,t){}function Ye(e,t){const n=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach(t=>{e.uniforms[t].value&&!(t in n)&&(n[t]=e.uniforms[t].value)}),Object.keys(n).forEach(e=>{"object"==typeof n[e]&&void 0!==n[e].index&&(n[e].texture=t.getTexture(n[e].index))}),n}const Ze={KHR_draco_mesh_compression:r,KHR_materials_unlit:s,KHR_lights_punctual:i,KHR_techniques_webgl:o};const et={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},tt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class nt{constructor(e){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(e,t){this.json=e.json;const n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+n.asset.version)}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),function(e){const t=new ze(e),{json:n}=t;for(const e of n.images||[]){const n=t.removeObjectExtension(e,"KHR_binary_glTF");n&&Object.assign(e,n)}n.buffers&&n.buffers[0]&&delete n.buffers[0].uri,t.removeExtension("KHR_binary_glTF")}(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in et)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const n=e[t];if(n&&!Array.isArray(n)){e[t]=[];for(const r in n){const s=n[r];s.id=s.id||r;const i=e[t].length;e[t].push(s),this.idToIndexMap[t][r]=i}}}_convertObjectIdsToArrayIndices(e){for(const t in et)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:e,indices:n,material:r}=t;for(const t in e)e[t]=this._convertIdToIndex(e[t],"accessor");n&&(t.indices=this._convertIdToIndex(n,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(e=>this._convertIdToIndex(e,"node"))),e.meshes&&(e.meshes=e.meshes.map(e=>this._convertIdToIndex(e,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(e=>this._convertIdToIndex(e,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn("gltf v1: json doesn't contain attribute "+t),e[t]=[]);for(const n of e[t])for(const e in n){const t=n[e],r=this._convertIdToIndex(t,e);n[e]=r}}_convertIdToIndex(e,t){const n=tt[t];if(n in this.idToIndexMap){const r=this.idToIndexMap[n][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return r}return e}_updateObjects(e){for(const e of this.json.buffers)delete e.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const n=t.values&&t.values.tex,r=e.textures.findIndex(e=>e.id===n);-1!==r&&(t.pbrMetallicRoughness.baseColorTexture={index:r})}}}const rt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},st={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},it={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},ot={magFilter:it.TEXTURE_MAG_FILTER,minFilter:it.TEXTURE_MIN_FILTER,wrapS:it.TEXTURE_WRAP_S,wrapT:it.TEXTURE_WRAP_T},at={[it.TEXTURE_MAG_FILTER]:it.LINEAR,[it.TEXTURE_MIN_FILTER]:it.NEAREST_MIPMAP_LINEAR,[it.TEXTURE_WRAP_S]:it.REPEAT,[it.TEXTURE_WRAP_]:it.REPEAT};class ct{postProcess(e,t={}){const{json:n,buffers:r=[],images:s=[],baseUri:i=""}=e;return R(n),this.baseUri=i,this.json=n,this.buffers=r,this.images=s,this._resolveTree(this.json,t),this.json}_resolveTree(e,t={}){e.bufferViews&&(e.bufferViews=e.bufferViews.map((e,t)=>this._resolveBufferView(e,t))),e.images&&(e.images=e.images.map((e,t)=>this._resolveImage(e,t))),e.samplers&&(e.samplers=e.samplers.map((e,t)=>this._resolveSampler(e,t))),e.textures&&(e.textures=e.textures.map((e,t)=>this._resolveTexture(e,t))),e.accessors&&(e.accessors=e.accessors.map((e,t)=>this._resolveAccessor(e,t))),e.materials&&(e.materials=e.materials.map((e,t)=>this._resolveMaterial(e,t))),e.meshes&&(e.meshes=e.meshes.map((e,t)=>this._resolveMesh(e,t))),e.nodes&&(e.nodes=e.nodes.map((e,t)=>this._resolveNode(e,t))),e.skins&&(e.skins=e.skins.map((e,t)=>this._resolveSkin(e,t))),e.scenes&&(e.scenes=e.scenes.map((e,t)=>this._resolveScene(e,t))),void 0!==e.scene&&(e.scene=e.scenes[this.json.scene])}getScene(e){return this._get("scenes",e)}getNode(e){return this._get("nodes",e)}getSkin(e){return this._get("skins",e)}getMesh(e){return this._get("meshes",e)}getMaterial(e){return this._get("materials",e)}getAccessor(e){return this._get("accessors",e)}getCamera(e){return null}getTexture(e){return this._get("textures",e)}getSampler(e){return this._get("samplers",e)}getImage(e){return this._get("images",e)}getBufferView(e){return this._get("bufferViews",e)}getBuffer(e){return this._get("buffers",e)}_get(e,t){if("object"==typeof t)return t;const n=this.json[e]&&this.json[e][t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return e.id=e.id||"scene-"+t,e.nodes=(e.nodes||[]).map(e=>this.getNode(e)),e}_resolveNode(e,t){return e.id=e.id||"node-"+t,e.children&&(e.children=e.children.map(e=>this.getNode(e))),void 0!==e.mesh?e.mesh=this.getMesh(e.mesh):void 0!==e.meshes&&e.meshes.length&&(e.mesh=e.meshes.reduce((e,t)=>{const n=this.getMesh(t);return e.id=n.id,e.primitives=e.primitives.concat(n.primitives),e},{primitives:[]})),void 0!==e.camera&&(e.camera=this.getCamera(e.camera)),void 0!==e.skin&&(e.skin=this.getSkin(e.skin)),e}_resolveSkin(e,t){return e.id=e.id||"skin-"+t,e.inverseBindMatrices=this.getAccessor(e.inverseBindMatrices),e}_resolveMesh(e,t){return e.id=e.id||"mesh-"+t,e.primitives&&(e.primitives=e.primitives.map(e=>{const t=(e={...e}).attributes;e.attributes={};for(const n in t)e.attributes[n]=this.getAccessor(t[n]);return void 0!==e.indices&&(e.indices=this.getAccessor(e.indices)),void 0!==e.material&&(e.material=this.getMaterial(e.material)),e})),e}_resolveMaterial(e,t){if(e.id=e.id||"material-"+t,e.normalTexture&&(e.normalTexture={...e.normalTexture},e.normalTexture.texture=this.getTexture(e.normalTexture.index)),e.occlusionTexture&&(e.occlustionTexture={...e.occlustionTexture},e.occlusionTexture.texture=this.getTexture(e.occlusionTexture.index)),e.emissiveTexture&&(e.emmisiveTexture={...e.emmisiveTexture},e.emissiveTexture.texture=this.getTexture(e.emissiveTexture.index)),e.emissiveFactor||(e.emissiveFactor=e.emmisiveTexture?[1,1,1]:[0,0,0]),e.pbrMetallicRoughness){e.pbrMetallicRoughness={...e.pbrMetallicRoughness};const t=e.pbrMetallicRoughness;t.baseColorTexture&&(t.baseColorTexture={...t.baseColorTexture},t.baseColorTexture.texture=this.getTexture(t.baseColorTexture.index)),t.metallicRoughnessTexture&&(t.metallicRoughnessTexture={...t.metallicRoughnessTexture},t.metallicRoughnessTexture.texture=this.getTexture(t.metallicRoughnessTexture.index))}return e}_resolveAccessor(e,t){var n,r;if(e.id=e.id||"accessor-"+t,void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView)),e.bytesPerComponent=(n=e.componentType,st[n]),e.components=(r=e.type,rt[r]),e.bytesPerElement=e.bytesPerComponent*e.components,e.bufferView){const t=e.bufferView.buffer,{ArrayType:n,byteLength:r}=Ne(e,e.bufferView),s=(e.bufferView.byteOffset||0)+(e.byteOffset||0)+t.byteOffset,i=t.arrayBuffer.slice(s,s+r);e.value=new n(i)}return e}_resolveTexture(e,t){return e.id=e.id||"texture-"+t,e.sampler="sampler"in e?this.getSampler(e.sampler):at,e.source=this.getImage(e.source),e}_resolveSampler(e,t){e.id=e.id||"sampler-"+t,e.parameters={};for(const t in e){const n=this._enumSamplerParameter(t);void 0!==n&&(e.parameters[n]=e[t])}return e}_enumSamplerParameter(e){return ot[e]}_resolveImage(e,t){e.id=e.id||"image-"+t,void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView));const n=this.images[t];return n&&(e.image=n),e}_resolveBufferView(e,t){e.id=e.id||"bufferView-"+t;const n=e.buffer;e.buffer=this.buffers[n];const r=this.buffers[n].arrayBuffer;let s=this.buffers[n].byteOffset||0;return"byteOffset"in e&&(s+=e.byteOffset),e.data=new Uint8Array(r,s,e.byteLength),e}_resolveCamera(e,t){return e.id=e.id||"camera-"+t,e.perspective,e.orthographic,e}}function ut(e,t){return(new ct).postProcess(e,t)}const ft=1735152710;function dt(e,t=0,n={}){const r=new DataView(e),{magic:s=ft}=n,i=r.getUint32(t,!1);return i===s||i===ft}function lt(e,t,n=0,r={}){const s=new DataView(t),i=function(e,t=0){return`${String.fromCharCode(e.getUint8(t+0))}${String.fromCharCode(e.getUint8(t+1))}${String.fromCharCode(e.getUint8(t+2))}${String.fromCharCode(e.getUint8(t+3))}`}(s,n+0),o=s.getUint32(n+4,!0),a=s.getUint32(n+8,!0);switch(Object.assign(e,{header:{byteOffset:n,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),n+=12,e.version){case 1:return function(e,t,n){je(e.header.byteLength>20);const r=t.getUint32(n+0,!0),s=t.getUint32(n+4,!0);return n+=8,je(0===s),ht(e,t,n,r),n+=r,n+=mt(e,t,n,e.header.byteLength)}(e,s,n);case 2:return function(e,t,n,r){return je(e.header.byteLength>20),function(e,t,n,r){for(;n+8<=e.header.byteLength;){const s=t.getUint32(n+0,!0),i=t.getUint32(n+4,!0);switch(n+=8,i){case 1313821514:ht(e,t,n,s);break;case 5130562:mt(e,t,n,s);break;case 0:r.strict||ht(e,t,n,s);break;case 1:r.strict||mt(e,t,n,s)}n+=Ee(s,4)}}(e,t,n,r),n+e.header.byteLength}(e,s,n,{});default:throw new Error(`Invalid GLB version ${e.version}. Only supports v1 and v2.`)}}function ht(e,t,n,r){const s=new Uint8Array(t.buffer,n,r),i=new TextDecoder("utf8").decode(s);return e.json=JSON.parse(i),Ee(r,4)}function mt(e,t,n,r){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:t.buffer}),Ee(r,4)}async function gt(e,t,n=0,r,s){var i,o,a,c;!function(e,t,n,r){r.uri&&(e.baseUri=r.uri);if(t instanceof ArrayBuffer&&!dt(t,n,r)){const e=new TextDecoder;t=e.decode(t)}if("string"==typeof t)e.json=M(t);else if(t instanceof ArrayBuffer){const s={};n=lt(s,t,n,r.glb),R("glTF"===s.type,"Invalid GLB magic string "+s.type),e._glb=s,e.json=s.json}else R(!1,"GLTF: must be ArrayBuffer or string");const s=e.json.buffers||[];if(e.buffers=new Array(s.length).fill(null),e._glb&&e._glb.header.hasBinChunk){const{binChunks:t}=e._glb;e.buffers[0]={arrayBuffer:t[0].arrayBuffer,byteOffset:t[0].byteOffset,byteLength:t[0].byteLength}}const i=e.json.images||[];e.images=new Array(i.length).fill({})}(e,t,n,r),function(e,t={}){(new nt).normalize(e,t)}(e,{normalize:null==r||null===(i=r.gltf)||void 0===i?void 0:i.normalize});const u=[];if(null!=r&&null!==(o=r.gltf)&&void 0!==o&&o.loadBuffers&&e.json.buffers&&await async function(e,t,n){for(let i=0;i<e.json.buffers.length;++i){const o=e.json.buffers[i];if(o.uri){var r,s;const{fetch:a}=n;R(a);const c=B(o.uri,t),u=await(null==n||null===(r=n.fetch)||void 0===r?void 0:r.call(n,c)),f=await(null==u||null===(s=u.arrayBuffer)||void 0===s?void 0:s.call(u));e.buffers[i]={arrayBuffer:f,byteOffset:0,byteLength:f.byteLength},delete o.uri}}}(e,r,s),null!=r&&null!==(a=r.gltf)&&void 0!==a&&a.loadImages){const t=async function(e,t,n){const r=e.json.images||[],s=[];for(let i=0;i<r.length;++i)s.push(bt(e,r[i],i,t,n));return await Promise.all(s)}(e,r,s);u.push(t)}const f=async function(e,t={},n){for(const s in Ze){var r;const i=(null==t||null===(r=t.gltf)||void 0===r?void 0:r.excludeExtensions)||{};if(!(s in i&&!i[s])){const r=Ze[s];await r.decode(e,t,n)}}}(e,r,s);return u.push(f),await Promise.all(u),null!=r&&null!==(c=r.gltf)&&void 0!==c&&c.postProcess?ut(e,r):e}async function bt(e,t,n,r,s){const{fetch:i,parse:o}=s;let a;if(t.uri){const e=B(t.uri,r),n=await i(e);a=await n.arrayBuffer()}if(Number.isFinite(t.bufferView)){const n=F(e.json,e.buffers,t.bufferView);a=L(n.buffer,n.byteOffset,n.byteLength)}R(a,"glTF image has no data");const c=await o(a,S,{},s);e.images[n]=c}const yt={name:"glTF",id:"gltf",module:"gltf",version:c,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(e,t={},n){(t={...yt.options,...t}).gltf={...yt.options.gltf,...t.gltf};const{byteOffset:r=0}=t;return await gt({},e,r,t,n)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};function pt(e,t,n,r){const s=Ee(n.byteLength,r),i=s-n.byteLength;if(e){const r=new Uint8Array(e.buffer,e.byteOffset+t,n.byteLength),s=new Uint8Array(n);r.set(s);for(let r=0;r<i;++r)e.setUint8(t+n.byteLength+r,32)}return t+=s}const wt=1179937895;function Tt(e,t,n=0,r={}){const{magic:s=wt,version:i=2,json:o={},binary:a}=e,c=n;t&&(t.setUint32(n+0,s,!0),t.setUint32(n+4,i,!0),t.setUint32(n+8,0,!0));const u=n+8,f=n+=12;t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,1313821514,!0));if(n=function(e,t,n,r){return t=pt(e,t,(new TextEncoder).encode(n),r)}(t,n+=8,JSON.stringify(o),4),t){const e=n-f-8;t.setUint32(f+0,e,!0)}if(a){const e=n;if(t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,5130562,!0)),n=pt(t,n+=8,a,4),t){const r=n-e-8;t.setUint32(e+0,r,!0)}}if(t){const e=n-c;t.setUint32(u,e,!0)}return n}function vt(e,t,n,r){return function(e,{firstBuffer:t=0}={}){if(e.buffers&&e.buffers.length>t)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(e),Tt(e,t,n,r)}const _t={name:"glTF",id:"gltf",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(e,t={}){const{byteOffset:n=0}=t,r=vt(e,null,n,t),s=new ArrayBuffer(r),i=new DataView(s);return vt(e,i,n,t),s},options:{gltf:{}}};const xt={name:"GLB",id:"glb",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,parse:async function(e,t){return At(e,t)},parseSync:At,options:{glb:{strict:!1}}};function At(e,t){const{byteOffset:n=0}=t||{},r={};return lt(r,e,n,null==t?void 0:t.glb),r}const It={name:"GLB",id:"glb",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(e,t){const{byteOffset:n=0}=t,r=Tt(e,null,n,t),s=new ArrayBuffer(r),i=new DataView(s);return Tt(e,i,n,t),s},options:{glb:{}}}}])}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([,function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==e&&e,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window||{},o="object"!=typeof r||"[object process]"!==String(r)||r.browser,a="function"==typeof importScripts,A=("undefined"!=typeof window&&window.orientation,void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version));A&&parseFloat(A[1])}).call(this,n(6),n(7))},function(e,t){},function(e,t){},,,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,s=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var A,B=[],c=!1,u=-1;function C(){c&&A&&(c=!1,A.length?B=A.concat(B):u=-1,B.length&&f())}function f(){if(!c){var e=a(C);c=!0;for(var t=B.length;t;){for(A=B,B=[];++u<t;)A&&A[u].run();u=-1,t=B.length}A=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function l(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];B.push(new d(e,t)),1!==B.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=l,s.addListener=l,s.once=l,s.off=l,s.removeListener=l,s.removeAllListeners=l,s.emit=l,s.prependListener=l,s.prependOnceListener=l,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},,function(e,t,n){const r=n(13);globalThis.loaders=globalThis.loaders||{},e.exports=Object.assign(globalThis.loaders,r)},,,,function(e,t,n){"use strict";n.r(t),n.d(t,"GLTFLoader",(function(){return hn})),n.d(t,"GLTFWriter",(function(){return Dn})),n.d(t,"GLBLoader",(function(){return In})),n.d(t,"GLBWriter",(function(){return Rn})),n.d(t,"GLTFScenegraph",(function(){return pe})),n.d(t,"postProcessGLTF",(function(){return cn}));var r={};n.r(r),n.d(r,"name",(function(){return Ke})),n.d(r,"preprocess",(function(){return Pe})),n.d(r,"decode",(function(){return Le}));var s={};n.r(s),n.d(s,"name",(function(){return Xe})),n.d(s,"preprocess",(function(){return Ne}));var i={};n.r(i),n.d(i,"name",(function(){return Ye})),n.d(i,"preprocess",(function(){return We}));var o={};n.r(o),n.d(o,"name",(function(){return Ot})),n.d(o,"preprocess",(function(){return wt})),n.d(o,"decode",(function(){return Kt})),n.d(o,"encode",(function(){return Pt}));var a={};n.r(a),n.d(a,"name",(function(){return jt})),n.d(a,"decode",(function(){return Qt})),n.d(a,"encode",(function(){return Xt}));var A={};n.r(A),n.d(A,"name",(function(){return Nt})),n.d(A,"decode",(function(){return Yt})),n.d(A,"encode",(function(){return Wt}));var B={};n.r(B),n.d(B,"name",(function(){return Zt})),n.d(B,"decode",(function(){return Vt})),n.d(B,"encode",(function(){return kt}));const c="3.1.0-alpha.5";var u=n(1),C=n(2);const f={};async function d(e,t=null,n={}){return t&&(e=function(e,t,n){if(e.startsWith("http"))return e;const r=n.modules||{};if(r[e])return r[e];if(!u.b)return`modules/${t}/dist/libs/${e}`;if(n.CDN)return function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(n.CDN.startsWith("http")),`${n.CDN}/${t}@3.1.0-alpha.5/dist/libs/${e}`;if(u.c)return"../src/libs/"+e;return`modules/${t}/src/libs/${e}`}(e,t,n)),f[e]=f[e]||async function(e){if(e.endsWith("wasm")){const t=await fetch(e);return await t.arrayBuffer()}if(!u.b)return C.requireFromFile&&await C.requireFromFile(e);if(u.c)return importScripts(e);const t=await fetch(e);return function(e,t){if(!u.b)return C.requireFromString&&C.requireFromString(e,t);if(u.c)return eval.call(u.a,e),null;const n=document.createElement("script");n.id=t;try{n.appendChild(document.createTextNode(e))}catch(t){n.text=e}return document.body.appendChild(n),null}(await t.text(),e)}(e),await f[e]}let l,m;async function E(e){const t=e.modules||{};return t.basis?t.basis:(l=l||async function(e){let t=null,n=null;return[t,n]=await Promise.all([await d("basis_transcoder.js","textures",e),await d("basis_transcoder.wasm","textures",e)]),t=t||globalThis.BASIS,await function(e,t){const n={};t&&(n.wasmBinary=t);return new Promise(t=>{e(n).then(e=>{const{BasisFile:n,initializeBasis:r}=e;r(),t({BasisFile:n})})})}(t,n)}(e),await l)}async function h(e){const t=e.modules||{};return t.basisEncoder?t.basisEncoder:(m=m||async function(e){let t=null,n=null;return[t,n]=await Promise.all([await d("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.js","textures",e),await d("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.wasm","textures",e)]),t=t||globalThis.BASIS,await function(e,t){const n={};t&&(n.wasmBinary=t);return new Promise(t=>{e(n).then(e=>{const{BasisFile:n,KTX2File:r,initializeBasis:s,BasisEncoder:i}=e;s(),t({BasisFile:n,KTX2File:r,BasisEncoder:i})})})}(t,n)}(e),await m)}const G={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},F=["","WEBKIT_","MOZ_"],b={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let g=null;function D(e){if(!g){e=e||function(){try{return document.createElement("canvas").getContext("webgl")}catch(e){return null}}()||void 0,g=new Set;for(const t of F)for(const n in b)if(e&&e.getExtension(`${t}${n}`)){const e=b[n];g.add(e)}}return g}new Uint8Array([0]);var I,M,R,y,p,H,J,_;!function(e){e[e.NONE=0]="NONE",e[e.BASISLZ=1]="BASISLZ",e[e.ZSTD=2]="ZSTD",e[e.ZLIB=3]="ZLIB"}(I||(I={})),function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(M||(M={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(R||(R={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(y||(y={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(p||(p={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(H||(H={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(J||(J={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(_||(_={}));const T=[171,75,84,88,32,50,48,187,13,10,26,10];const S={etc1:{basisFormat:0,compressed:!0,format:G.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:G.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:G.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:G.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:G.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:G.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function U(e,t,n){const r=new e(new Uint8Array(t));try{if(!r.startTranscoding())return null;const e=r.getNumImages(),t=[];for(let s=0;s<e;s++){const e=r.getNumLevels(s),i=[];for(let t=0;t<e;t++)i.push(O(r,s,t,n));t.push(i)}return t}finally{r.close(),r.delete()}}function O(e,t,n,r){const s=e.getImageWidth(t,n),i=e.getImageHeight(t,n),o=e.getHasAlpha(),{compressed:a,format:A,basisFormat:B}=P(r,o),c=e.getImageTranscodedSizeInBytes(t,n,B),u=new Uint8Array(c);return e.transcodeImage(u,t,n,B,0,0)?{width:s,height:i,data:u,compressed:a,hasAlpha:o,format:A}:null}function w(e,t,n){const r=new e(new Uint8Array(t));try{if(!r.startTranscoding())return null;const e=r.getLevels(),t=[];for(let s=0;s<e;s++){t.push(K(r,s,n));break}return t}finally{r.close(),r.delete()}}function K(e,t,n){const{alphaFlag:r,height:s,width:i}=e.getImageLevelInfo(t,0,0),{compressed:o,format:a,basisFormat:A}=P(n,r),B=e.getImageTranscodedSizeInBytes(t,0,0,A),c=new Uint8Array(B);return e.transcodeImage(c,t,0,0,A,0,-1,-1)?{width:i,height:s,data:c,compressed:o,alphaFlag:r,format:a}:null}function P(e,t){let n=e&&e.basis&&e.basis.format;return"auto"===n&&(n=L()),"object"==typeof n&&(n=t?n.alpha:n.noAlpha),n=n.toLowerCase(),S[n]}function L(){const e=D();return e.has("astc")?"astc-4x4":e.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:e.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:e.has("etc1")?"etc1":e.has("etc2")?"etc2":"rgb565"}const v={name:"Basis",id:"basis",module:"textures",version:"3.1.0-alpha.5",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},x={...v,parse:async function(e,t){if("auto"===t.basis.containerFormat){if(function(e){const t=new Uint8Array(e.buffer||e,e.byteOffset||0,T.length);return!(t[0]!==T[0]||t[1]!==T[1]||t[2]!==T[2]||t[3]!==T[3]||t[4]!==T[4]||t[5]!==T[5]||t[6]!==T[6]||t[7]!==T[7]||t[8]!==T[8]||t[9]!==T[9]||t[10]!==T[10]||t[11]!==T[11])}(e)){return w((await h(t)).KTX2File,e,t)}const{BasisFile:n}=await E(t);return U(n,e,t)}switch(t.basis.module){case"encoder":const n=await h(t);switch(t.basis.containerFormat){case"ktx2":return w(n.KTX2File,e,t);case"basis":default:return U(n.BasisFile,e,t)}case"transcoder":default:const{BasisFile:r}=await E(t);return U(r,e,t)}}};function j(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var Q=n(15);const{_parseImageNode:X}=globalThis,N="undefined"!=typeof Image,Y="undefined"!=typeof ImageBitmap,W=Boolean(X),Z=!!Q.a||W;function V(e){const t=q(e);if(!t)throw new Error("Not an image");return t}function k(e){switch(V(e)){case"data":return e;case"image":case"imagebitmap":const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("getImageData");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function q(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&e instanceof Image?"image":e&&"object"==typeof e&&e.data&&e.width&&e.height?"data":null}const z=/^data:image\/svg\+xml/,$=/\.svg((\?|#).*)?$/;function ee(e){return e&&(z.test(e)||$.test(e))}function te(e,t){if(ee(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function ne(e,t,n){const r=function(e,t){if(ee(t)){let t=(new TextDecoder).decode(e);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(t=unescape(encodeURIComponent(t)))}catch(e){throw new Error(e.message)}return"data:image/svg+xml;base64,"+btoa(t)}return te(e,t)}(e,n),s=self.URL||self.webkitURL,i="string"!=typeof r&&s.createObjectURL(r);try{return await async function(e,t){const n=new Image;if(n.src=e,t.image&&t.image.decode&&n.decode)return await n.decode(),n;return await new Promise((t,r)=>{try{n.onload=()=>t(n),n.onerror=t=>r(new Error(`Could not load image ${e}: ${t}`))}catch(e){r(e)}})}(i||r,t)}finally{i&&s.revokeObjectURL(i)}}const re={};let se=!0;async function ie(e,t,n){let r;if(ee(n)){r=await ne(e,t,n)}else r=te(e,n);const s=t&&t.imagebitmap;return await async function(e,t=null){!function(e){for(const t in e||re)return!1;return!0}(t)&&se||(t=null);if(t)try{return await createImageBitmap(e,t)}catch(e){console.warn(e),se=!1}return await createImageBitmap(e)}(r,s)}function oe(e){const t=ae(e);return function(e){const t=ae(e);if(!(t.byteLength>=24&&2303741511===t.getUint32(0,!1)))return null;return{mimeType:"image/png",width:t.getUint32(16,!1),height:t.getUint32(20,!1)}}(t)||function(e){const t=ae(e);if(!(t.byteLength>=3&&65496===t.getUint16(0,!1)&&255===t.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let s=2;for(;s+9<t.byteLength;){const e=t.getUint16(s,!1);if(r.has(e))return{mimeType:"image/jpeg",height:t.getUint16(s+5,!1),width:t.getUint16(s+7,!1)};if(!n.has(e))return null;s+=2,s+=t.getUint16(s,!1)}return null}(t)||function(e){const t=ae(e);if(!(t.byteLength>=10&&1195984440===t.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:t.getUint16(6,!0),height:t.getUint16(8,!0)}}(t)||function(e){const t=ae(e);if(!(t.byteLength>=14&&16973===t.getUint16(0,!1)&&t.getUint32(2,!0)===t.byteLength))return null;return{mimeType:"image/bmp",width:t.getUint32(18,!0),height:t.getUint32(22,!0)}}(t)}function ae(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}const Ae={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.5",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(e,t,n){const r=((t=t||{}).image||{}).type||"auto",{url:s}=n||{};let i;switch(function(e){switch(e){case"auto":case"data":return function(){if(Y)return"imagebitmap";if(N)return"image";if(Z)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return Y||N||Z;case"imagebitmap":return Y;case"image":return N;case"data":return Z;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}(e),e}}(r)){case"imagebitmap":i=await ie(e,t,s);break;case"image":i=await ne(e,t,s);break;case"data":i=await async function(e,t){const{mimeType:n}=oe(e)||{},r=globalThis._parseImageNode;return j(r),await r(e,n)}(e);break;default:j(!1)}return"data"===r&&(i=k(i)),i},tests:[e=>Boolean(oe(new DataView(e)))],options:{image:{type:"auto",decode:!0}}};function Be(e,t,n){if(e.byteLength<=t+n)return"";const r=new DataView(e);let s="";for(let e=0;e<n;e++)s+=String.fromCharCode(r.getUint8(t+e));return s}function ce(e){try{return JSON.parse(e)}catch(t){throw new Error(`Failed to parse JSON from data starting with "${function(e,t=5){if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return Be(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return Be(e,0,t)}return""}(e)}"`)}}n(3);function ue(e,t,n){const r=void 0!==n?new Uint8Array(e).subarray(t,t+n):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}function Ce(e,t){if(!e)throw new Error(t||"assert failed: gltf")}function fe(e,t){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;const n=t.baseUri||t.uri;if(!n)throw new Error("'baseUri' must be provided to resolve relative url "+e);return n.substr(0,n.lastIndexOf("/")+1)+e}function de(e,t,n){const r=e.bufferViews[n];Ce(r);const s=t[r.buffer];Ce(s);const i=(r.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,r.byteLength)}function le(e,t){return j(e>=0),j(t>0),e+(t-1)&~(t-1)}function me(e,t,n){let r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{const t=e.byteOffset,n=e.byteLength;r=new Uint8Array(e.buffer||e.arrayBuffer,t,n)}return t.set(r,n),n+le(r.byteLength,4)}const Ee=["SCALAR","VEC2","VEC3","VEC4"],he=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Ge=new Map(he),Fe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},be={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ge={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function De(e){return Ee[e-1]||Ee[0]}function Ie(e){const t=Ge.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function Me(e,t){const n=ge[e.componentType],r=Fe[e.type],s=be[e.componentType],i=e.count*r,o=e.count*r*s;return Ce(o>=0&&o<=t.byteLength),{ArrayType:n,length:i,byteLength:o}}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ye={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class pe{constructor(e){Re(this,"gltf",void 0),Re(this,"sourceBuffers",void 0),Re(this,"byteLength",void 0),this.gltf=e||{json:{...ye},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}getExtension(e){const t=this.getUsedExtensions().find(t=>t===e),n=this.json.extensions||{};return t?n[e]||!0:null}getRequiredExtension(e){return this.getRequiredExtensions().find(t=>t===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if("object"==typeof t)return t;const n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){const t=(e=this.getBufferView(e)).buffer,n=this.gltf.buffers[t];Ce(n);const r=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,{ArrayType:r,length:s}=Me(e,t);return new r(n,t.byteOffset+e.byteOffset,s)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(n,r,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){(e.extensions||{})[t]=n}removeObjectExtension(e,t){const n=e.extensions||{},r=n[t];return delete n[t],r}addExtension(e,t={}){return Ce(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return Ce(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e]}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];const r={mesh:t};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:n,material:r,mode:s=4}=e,i={primitives:[{attributes:this._addAttributes(t),mode:s}]};if(n){const e=this._addIndices(n);i.primitives[0].indices=e}return Number.isFinite(r)&&(i.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addPointCloud(e){const t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}addImage(e,t){const n=oe(e),r=t||(null==n?void 0:n.mimeType),s={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e){const t=e.byteLength;Ce(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=le(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,t){const n={bufferView:e,type:De(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const n=this.addBufferView(e);let r={min:t.min,max:t.max};r.min&&r.max||(r=this._getAccessorMinMax(e,t.size));const s={size:t.size,componentType:Ie(e),count:Math.round(e.length/t.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(s,t))}addTexture(e){const{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){var e,t;this.gltf.buffers=[];const n=this.byteLength,r=new ArrayBuffer(n),s=new Uint8Array(r);let i=0;for(const e of this.sourceBuffers||[])i=me(e,s,i);null!==(e=this.json)&&void 0!==e&&null!==(t=e.buffers)&&void 0!==t&&t[0]?this.json.buffers[0].byteLength=n:this.json.buffers=[{byteLength:n}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(e,t){let n=!0;for(;n;){const r=e.indexOf(t);r>-1?e.splice(r,1):n=!1}}_addAttributes(e={}){const t={};for(const n in e){const r=e[n],s=this._getGltfAttributeName(n),i=this.addBinaryBuffer(r.value,r);t[s]=i}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const n={min:null,max:null};if(e.length<t)return n;n.min=[],n.max=[];const r=e.subarray(0,t);for(const e of r)n.min.push(e),n.max.push(e);for(let r=t;r<e.length;r+=t)for(let s=0;s<t;s++)n.min[0+s]=Math.min(n.min[0+s],e[r+s]),n.max[0+s]=Math.max(n.max[0+s],e[r+s]);return n}}const He="object"!=typeof WebAssembly,Je=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),_e=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),Te={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Se={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};let Ue;async function Oe(){return Ue||(Ue=async function(){let e="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHK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ABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",console.log("Warning: meshopt_decoder is using experimental SIMD support"));const t=await WebAssembly.instantiate(function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);t[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let n=0;for(let r=0;r<e.length;++r)t[n++]=t[r]<60?_e[t[r]]:64*(t[r]-60)+t[++r];return t.buffer.slice(0,n)}(e),{});return await t.instance.exports.__wasm_call_ctors(),t.instance}()),Ue}function we(e,t,n,r,s,i,o){const a=e.exports.sbrk,A=r+3&-4,B=a(A*s),c=a(i.length),u=new Uint8Array(e.exports.memory.buffer);u.set(i,c);const C=t(B,r,s,c,i.length);if(0===C&&o&&o(B,A,s),n.set(u.subarray(B,B+r*s)),a(B-a(0)),0!==C)throw new Error("Malformed buffer data: "+C)}const Ke="EXT_meshopt_compression";function Pe(e){if(new pe(e).getRequiredExtensions().includes("EXT_meshopt_compression")&&!He)throw new Error("gltf: Required extension EXT_meshopt_compression not supported by browser")}async function Le(e,t){var n;const r=new pe(e);if(null==t||null===(n=t.gltf)||void 0===n||!n.decompressMeshes)return;const s=[];for(const t of e.json.bufferViews||[])s.push(ve(r,t));await Promise.all(s),r.removeExtension("EXT_meshopt_compression")}async function ve(e,t){const n=e.getObjectExtension(t,"EXT_meshopt_compression");if(n){const e=t.buffer,{byteOffset:r=0,byteLength:s=0,byteStride:i,count:o,mode:a,filter:A="NONE"}=n,B=new Uint8Array(e,r,s),c=new ArrayBuffer(o*i);return await async function(e,t,n,r,s,i="NONE"){const o=await Oe();we(o,o.exports[Se[s]],e,t,n,r,o.exports[Te[i||"NONE"]])}(new Uint8Array(c),o,i,B,a,A),c}return null}const xe=["image/png","image/jpeg","image/gif"],je={};function Qe(e){return void 0===je[e]&&(je[e]=function(e){switch(e){case"image/webp":return function(){if(!Q.a)return!1;try{return 0===document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")}catch{return!1}}();case"image/svg":return Q.a;default:if(!Q.a){const{_parseImageNode:t}=globalThis;return Boolean(t)&&xe.includes(e)}return!0}}(e)),je[e]}const Xe="EXT_texture_webp";function Ne(e,t){const n=new pe(e);if(!Qe("image/webp")){if(n.getRequiredExtensions().includes("EXT_texture_webp"))throw new Error("gltf: Required extension EXT_texture_webp not supported by browser");return}const{json:r}=n;for(const e of r.textures||[]){const t=n.getObjectExtension(e,"EXT_texture_webp");t&&(e.source=t.source),n.removeObjectExtension(e,"EXT_texture_webp")}n.removeExtension("EXT_texture_webp")}const Ye="KHR_texture_basisu";function We(e,t){const n=new pe(e),{json:r}=n;for(const e of r.textures||[]){const t=n.getObjectExtension(e,"KHR_texture_basisu");t&&(e.source=t.source),n.removeObjectExtension(e,"KHR_texture_basisu")}n.removeExtension("KHR_texture_basisu")}const Ze={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.5",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ke{constructor(e,t){Ve(this,"fields",void 0),Ve(this,"metadata",void 0),function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}(Array.isArray(e)),function(e){const t={};for(const n of e)t[n.name]&&console.warn("Schema: duplicated field name",n.name,n),t[n.name]=!0}(e),this.fields=e,this.metadata=t||new Map}compareTo(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}select(...e){const t=Object.create(null);for(const n of e)t[n]=!0;const n=this.fields.filter(e=>t[e.name]);return new ke(n,this.metadata)}selectAt(...e){const t=e.map(e=>this.fields[e]).filter(Boolean);return new ke(t,this.metadata)}assign(e){let t,n=this.metadata;if(e instanceof ke){const r=e;t=r.fields,n=qe(qe(new Map,this.metadata),r.metadata)}else t=e;const r=Object.create(null);for(const e of this.fields)r[e.name]=e;for(const e of t)r[e.name]=e;const s=Object.values(r);return new ke(s,n)}}function qe(e,t){return new Map([...e||new Map,...t||new Map])}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class $e{constructor(e,t,n=!1,r=new Map){ze(this,"name",void 0),ze(this,"type",void 0),ze(this,"nullable",void 0),ze(this,"metadata",void 0),this.name=e,this.type=t,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new $e(this.name,this.type,this.nullable,this.metadata)}compareTo(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let et,tt,nt,rt,st,it,ot,at,At;function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(et||(et={}));class ct{static isNull(e){return e&&e.typeId===et.Null}static isInt(e){return e&&e.typeId===et.Int}static isFloat(e){return e&&e.typeId===et.Float}static isBinary(e){return e&&e.typeId===et.Binary}static isUtf8(e){return e&&e.typeId===et.Utf8}static isBool(e){return e&&e.typeId===et.Bool}static isDecimal(e){return e&&e.typeId===et.Decimal}static isDate(e){return e&&e.typeId===et.Date}static isTime(e){return e&&e.typeId===et.Time}static isTimestamp(e){return e&&e.typeId===et.Timestamp}static isInterval(e){return e&&e.typeId===et.Interval}static isList(e){return e&&e.typeId===et.List}static isStruct(e){return e&&e.typeId===et.Struct}static isUnion(e){return e&&e.typeId===et.Union}static isFixedSizeBinary(e){return e&&e.typeId===et.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===et.FixedSizeList}static isMap(e){return e&&e.typeId===et.Map}static isDictionary(e){return e&&e.typeId===et.Dictionary}get typeId(){return et.NONE}compareTo(e){return this===e}}Symbol.toStringTag;Symbol.toStringTag;tt=Symbol.toStringTag;class ut extends ct{constructor(e,t){super(),Bt(this,"isSigned",void 0),Bt(this,"bitWidth",void 0),this.isSigned=e,this.bitWidth=t}get typeId(){return et.Int}get[tt](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class Ct extends ut{constructor(){super(!0,8)}}class ft extends ut{constructor(){super(!0,16)}}class dt extends ut{constructor(){super(!0,32)}}class lt extends ut{constructor(){super(!1,8)}}class mt extends ut{constructor(){super(!1,16)}}class Et extends ut{constructor(){super(!1,32)}}const ht=32,Gt=64;nt=Symbol.toStringTag;class Ft extends ct{constructor(e){super(),Bt(this,"precision",void 0),this.precision=e}get typeId(){return et.Float}get[nt](){return"Float"}toString(){return"Float"+this.precision}}class bt extends Ft{constructor(){super(ht)}}class gt extends Ft{constructor(){super(Gt)}}Symbol.toStringTag;Symbol.toStringTag;rt=Symbol.toStringTag;st=Symbol.toStringTag;it=Symbol.toStringTag;ot=Symbol.toStringTag;at=Symbol.toStringTag;class Dt extends ct{constructor(e,t){super(),Bt(this,"listSize",void 0),Bt(this,"children",void 0),this.listSize=e,this.children=[t]}get typeId(){return et.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[at](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}At=Symbol.toStringTag;function It(e,t,n){const r=function(e){switch(e.constructor){case Int8Array:return new Ct;case Uint8Array:return new lt;case Int16Array:return new ft;case Uint16Array:return new mt;case Int32Array:return new dt;case Uint32Array:return new Et;case Float32Array:return new bt;case Float64Array:return new gt;default:throw new Error("array type not supported")}}(t.value),s=n||function(e){const t=new Map;"byteOffset"in e&&t.set("byteOffset",e.byteOffset.toString(10));"byteStride"in e&&t.set("byteStride",e.byteStride.toString(10));"normalized"in e&&t.set("normalized",e.normalized.toString());return t}(t);return new $e(e,new Dt(t.size,new $e("value",r)),!1,s)}function Mt(e,t,n){return It(e,t,n?Rt(n.metadata):void 0)}function Rt(e){const t=new Map;for(const n in e)t.set(n+".string",JSON.stringify(e[n]));return t}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pt={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},Ht={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class Jt{constructor(e){yt(this,"draco",void 0),yt(this,"decoder",void 0),yt(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const r=this.decoder.GetEncodedGeometryType(n),s=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let e;switch(r){case this.draco.TRIANGULAR_MESH:e=this.decoder.DecodeBufferToMesh(n,s);break;case this.draco.POINT_CLOUD:e=this.decoder.DecodeBufferToPointCloud(n,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!e.ok()||!s.ptr){const t="DRACO decompression failed: "+e.error_msg();throw new Error(t)}const i=this._getDracoLoaderData(s,r,t),o=this._getMeshData(s,i,t),a=function(e){let t=1/0,n=1/0,r=1/0,s=-1/0,i=-1/0,o=-1/0;const a=e.POSITION?e.POSITION.value:[],A=a&&a.length;for(let e=0;e<A;e+=3){const A=a[e],B=a[e+1],c=a[e+2];t=A<t?A:t,n=B<n?B:n,r=c<r?c:r,s=A>s?A:s,i=B>i?B:i,o=c>o?c:o}return[[t,n,r],[s,i,o]]}(o.attributes),A=function(e,t,n){const r=Rt(t.metadata),s=[],i=function(e){const t={};for(const n in e){const r=e[n];t[r.name||"undefined"]=r}return t}(t.attributes);for(const t in e){const n=Mt(t,e[t],i[t]);s.push(n)}if(n){const e=Mt("indices",n);s.push(e)}return new ke(s,r)}(o.attributes,i,o.indices);return{loader:"draco",loaderData:i,header:{vertexCount:s.num_points(),boundingBox:a},...o,schema:A}}finally{this.draco.destroy(n),s&&this.draco.destroy(s)}}_getDracoLoaderData(e,t,n){const r=this._getTopLevelMetadata(e),s=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:s}}_getDracoAttributes(e,t){const n={};for(let r=0;r<e.num_attributes();r++){const s=this.decoder.GetAttribute(e,r),i=this._getAttributeMetadata(e,r);n[s.unique_id()]={unique_id:s.unique_id(),attribute_type:s.attribute_type(),data_type:s.data_type(),num_components:s.num_components(),byte_offset:s.byte_offset(),byte_stride:s.byte_stride(),normalized:s.normalized(),attribute_index:r,metadata:i};const o=this._getQuantizationTransform(s,t);o&&(n[s.unique_id()].quantization_transform=o);const a=this._getOctahedronTransform(s,t);a&&(n[s.unique_id()].octahedron_transform=a)}return n}_getMeshData(e,t,n){const r=this._getMeshAttributes(t,e,n);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(n.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,t,n){const r={};for(const s of Object.values(e.attributes)){const e=this._deduceAttributeName(s,n);s.name=e;const{value:i,size:o}=this._getAttributeValues(t,s);r[e]={value:i,size:o,byteOffset:s.byte_offset,byteStride:s.byte_stride,normalized:s.normalized}}return r}_getTriangleListIndices(e){const t=3*e.num_faces(),n=4*t,r=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(e,n,r),new Uint32Array(this.draco.HEAPF32.buffer,r,t).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),function(e){const t=e.size(),n=new Int32Array(t);for(let r=0;r<t;r++)n[r]=e.GetValue(r);return n}(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const n=Ht[t.data_type],r=t.num_components,s=e.num_points()*r,i=s*n.BYTES_PER_ELEMENT,o=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}(this.draco,n);let a;const A=this.draco._malloc(i);try{const r=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,r,o,i,A),a=new n(this.draco.HEAPF32.buffer,A,s).slice()}finally{this.draco._free(A)}return{value:a,size:r}}_deduceAttributeName(e,t){const n=e.unique_id;for(const[e,r]of Object.entries(t.extraAttributes||{}))if(r===n)return e;const r=e.attribute_type;for(const e in pt){if(this.draco[e]===r)return pt[e]}const s=t.attributeNameEntry||"name";return e.metadata[s]?e.metadata[s].string:"CUSTOM_ATTRIBUTE_"+n}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const n=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(n)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},n=this.metadataQuerier.NumEntries(e);for(let r=0;r<n;r++){const n=this.metadataQuerier.GetEntryName(e,r);t[n]=this._getDracoMetadataField(e,n)}return t}_getDracoMetadataField(e,t){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,n);const r=function(e){const t=e.size(),n=new Int32Array(t);for(let r=0;r<t;r++)n[r]=e.GetValue(r);return n}(n);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:r}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:n=[]}=e,r=[...t,...n];for(const e of r)this.decoder.SkipAttributeTransform(this.draco[e])}_getQuantizationTransform(e,t){const{quantizedAttributes:n=[]}=t,r=e.attribute_type();if(n.map(e=>this.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits(),range:t.range(),min_values:new Float32Array([1,2,3]).map(e=>t.min_value(e))}}finally{this.draco.destroy(t)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:n=[]}=t,r=e.attribute_type();if(n.map(e=>this.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits()}}finally{this.draco.destroy(t)}}return null}}let _t;async function Tt(e){const t=e.modules||{};return _t=t.draco3d?_t||t.draco3d.createDecoderModule({}).then(e=>({draco:e})):_t||async function(e){let t,n;switch(e.draco&&e.draco.decoderType){case"js":t=await d("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",e);break;case"wasm":default:[t,n]=await Promise.all([await d("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",e),await d("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",e)])}return t=t||globalThis.DracoDecoderModule,await function(e,t){const n={};t&&(n.wasmBinary=t);return new Promise(t=>{e({...n,onModuleLoaded:e=>t({draco:e})})})}(t,n)}(e),await _t}const St={...Ze,parse:async function(e,t){const{draco:n}=await Tt(t),r=new Jt(n);try{return r.parseSync(e,null==t?void 0:t.draco)}finally{r.destroy()}}};function Ut(e){const{buffer:t,size:n,count:r}=function(e){let t=e,n=1,r=0;e&&e.value&&(t=e.value,n=e.size||1);t&&(ArrayBuffer.isView(t)||(t=function(e,t,n=!1){if(!e)return null;if(Array.isArray(e))return new t(e);if(n&&!(e instanceof t))return new t(e);return e}(t,Float32Array)),r=t.length/n);return{buffer:t,size:n,count:r}}(e);return{value:t,size:n,byteOffset:0,count:r,type:De(n),componentType:Ie(t)}}const Ot="KHR_draco_mesh_compression";function wt(e,t,n){const r=new pe(e);for(const e of xt(r))r.getObjectExtension(e,"KHR_draco_mesh_compression")}async function Kt(e,t,n){var r;if(null==t||null===(r=t.gltf)||void 0===r||!r.decompressMeshes)return;const s=new pe(e),i=[];for(const e of xt(s))s.getObjectExtension(e,"KHR_draco_mesh_compression")&&i.push(Lt(s,e,t,n));await Promise.all(i),s.removeExtension("KHR_draco_mesh_compression")}function Pt(e,t={}){const n=new pe(e);for(const e of n.json.meshes||[])vt(e,t),n.addRequiredExtension("KHR_draco_mesh_compression")}async function Lt(e,t,n,r){const s=e.getObjectExtension(t,"KHR_draco_mesh_compression");if(!s)return;const i=e.getTypedArrayForBufferView(s.bufferView),o=ue(i.buffer,i.byteOffset),{parse:a}=r,A={...n};delete A["3d-tiles"];const B=await a(o,St,A,r),c=function(e){const t={};for(const n in e){const r=e[n];if("indices"!==n){const e=Ut(r);t[n]=e}}return t}(B.attributes);for(const[n,r]of Object.entries(c))if(n in t.attributes){const s=t.attributes[n],i=e.getAccessor(s);null!=i&&i.min&&null!=i&&i.max&&(r.min=i.min,r.max=i.max)}t.attributes=c,B.indices&&(t.indices=Ut(B.indices)),function(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(t)}function vt(e,t,n=4,r,s){var i;if(!r.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const o=r.DracoWriter.encodeSync({attributes:e}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:e}),A=r._addFauxAttributes(a.attributes);return{primitives:[{attributes:A,mode:n,extensions:{KHR_draco_mesh_compression:{bufferView:r.addBufferView(o),attributes:A}}}]}}function*xt(e){for(const t of e.json.meshes||[])for(const e of t.primitives)yield e}const jt="KHR_lights_punctual";async function Qt(e){const t=new pe(e),{json:n}=t,r=t.getExtension("KHR_lights_punctual");r&&(t.json.lights=r.lights,t.removeExtension("KHR_lights_punctual"));for(const e of n.nodes||[]){const n=t.getObjectExtension(e,"KHR_lights_punctual");n&&(e.light=n.light),t.removeObjectExtension(e,"KHR_lights_punctual")}}async function Xt(e){const t=new pe(e),{json:n}=t;if(n.lights){const e=t.addExtension("KHR_lights_punctual");Ce(!e.lights),e.lights=n.lights,delete n.lights}if(t.json.lights){for(const e of t.json.lights){const n=e.node;t.addObjectExtension(n,"KHR_lights_punctual",e)}delete t.json.lights}}const Nt="KHR_materials_unlit";async function Yt(e){const t=new pe(e),{json:n}=t;t.removeExtension("KHR_materials_unlit");for(const e of n.materials||[]){e.extensions&&e.extensions.KHR_materials_unlit&&(e.unlit=!0),t.removeObjectExtension(e,"KHR_materials_unlit")}}function Wt(e){const t=new pe(e),{json:n}=t;if(t.materials)for(const e of n.materials||[])e.unlit&&(delete e.unlit,t.addObjectExtension(e,"KHR_materials_unlit",{}),t.addExtension("KHR_materials_unlit"))}const Zt="KHR_techniques_webgl";async function Vt(e){const t=new pe(e),{json:n}=t,r=t.getExtension("KHR_techniques_webgl");if(r){const e=function(e,t){const{programs:n=[],shaders:r=[],techniques:s=[]}=e,i=new TextDecoder;return r.forEach(e=>{if(!Number.isFinite(e.bufferView))throw new Error("KHR_techniques_webgl: no shader code");e.code=i.decode(t.getTypedArrayForBufferView(e.bufferView))}),n.forEach(e=>{e.fragmentShader=r[e.fragmentShader],e.vertexShader=r[e.vertexShader]}),s.forEach(e=>{e.program=n[e.program]}),s}(r,t);for(const r of n.materials||[]){const n=t.getObjectExtension(r,"KHR_techniques_webgl");n&&(r.technique=Object.assign({},n,e[n.technique]),r.technique.values=qt(r.technique,t)),t.removeObjectExtension(r,"KHR_techniques_webgl")}t.removeExtension("KHR_techniques_webgl")}}async function kt(e,t){}function qt(e,t){const n=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach(t=>{e.uniforms[t].value&&!(t in n)&&(n[t]=e.uniforms[t].value)}),Object.keys(n).forEach(e=>{"object"==typeof n[e]&&void 0!==n[e].index&&(n[e].texture=t.getTexture(n[e].index))}),n}const zt=[r,s,i,o,a,A,B];function $t(e,t){var n;const r=(null==t||null===(n=t.gltf)||void 0===n?void 0:n.excludeExtensions)||{};return!(e in r&&!r[e])}const en={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},tn={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class nn{constructor(e){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(e,t){this.json=e.json;const n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+n.asset.version)}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),function(e){const t=new pe(e),{json:n}=t;for(const e of n.images||[]){const n=t.getObjectExtension(e,"KHR_binary_glTF");n&&Object.assign(e,n),t.removeObjectExtension(e,"KHR_binary_glTF")}n.buffers&&n.buffers[0]&&delete n.buffers[0].uri,t.removeExtension("KHR_binary_glTF")}(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in en)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const n=e[t];if(n&&!Array.isArray(n)){e[t]=[];for(const r in n){const s=n[r];s.id=s.id||r;const i=e[t].length;e[t].push(s),this.idToIndexMap[t][r]=i}}}_convertObjectIdsToArrayIndices(e){for(const t in en)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:e,indices:n,material:r}=t;for(const t in e)e[t]=this._convertIdToIndex(e[t],"accessor");n&&(t.indices=this._convertIdToIndex(n,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(e=>this._convertIdToIndex(e,"node"))),e.meshes&&(e.meshes=e.meshes.map(e=>this._convertIdToIndex(e,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(e=>this._convertIdToIndex(e,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn("gltf v1: json doesn't contain attribute "+t),e[t]=[]);for(const n of e[t])for(const e in n){const t=n[e],r=this._convertIdToIndex(t,e);n[e]=r}}_convertIdToIndex(e,t){const n=tn[t];if(n in this.idToIndexMap){const r=this.idToIndexMap[n][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return r}return e}_updateObjects(e){for(const e of this.json.buffers)delete e.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const n=t.values&&t.values.tex,r=e.textures.findIndex(e=>e.id===n);-1!==r&&(t.pbrMetallicRoughness.baseColorTexture={index:r})}}}const rn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},sn={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},on={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},an={magFilter:on.TEXTURE_MAG_FILTER,minFilter:on.TEXTURE_MIN_FILTER,wrapS:on.TEXTURE_WRAP_S,wrapT:on.TEXTURE_WRAP_T},An={[on.TEXTURE_MAG_FILTER]:on.LINEAR,[on.TEXTURE_MIN_FILTER]:on.NEAREST_MIPMAP_LINEAR,[on.TEXTURE_WRAP_S]:on.REPEAT,[on.TEXTURE_WRAP_]:on.REPEAT};class Bn{postProcess(e,t={}){const{json:n,buffers:r=[],images:s=[],baseUri:i=""}=e;return Ce(n),this.baseUri=i,this.json=n,this.buffers=r,this.images=s,this._resolveTree(this.json,t),this.json}_resolveTree(e,t={}){e.bufferViews&&(e.bufferViews=e.bufferViews.map((e,t)=>this._resolveBufferView(e,t))),e.images&&(e.images=e.images.map((e,t)=>this._resolveImage(e,t))),e.samplers&&(e.samplers=e.samplers.map((e,t)=>this._resolveSampler(e,t))),e.textures&&(e.textures=e.textures.map((e,t)=>this._resolveTexture(e,t))),e.accessors&&(e.accessors=e.accessors.map((e,t)=>this._resolveAccessor(e,t))),e.materials&&(e.materials=e.materials.map((e,t)=>this._resolveMaterial(e,t))),e.meshes&&(e.meshes=e.meshes.map((e,t)=>this._resolveMesh(e,t))),e.nodes&&(e.nodes=e.nodes.map((e,t)=>this._resolveNode(e,t))),e.skins&&(e.skins=e.skins.map((e,t)=>this._resolveSkin(e,t))),e.scenes&&(e.scenes=e.scenes.map((e,t)=>this._resolveScene(e,t))),void 0!==e.scene&&(e.scene=e.scenes[this.json.scene])}getScene(e){return this._get("scenes",e)}getNode(e){return this._get("nodes",e)}getSkin(e){return this._get("skins",e)}getMesh(e){return this._get("meshes",e)}getMaterial(e){return this._get("materials",e)}getAccessor(e){return this._get("accessors",e)}getCamera(e){return null}getTexture(e){return this._get("textures",e)}getSampler(e){return this._get("samplers",e)}getImage(e){return this._get("images",e)}getBufferView(e){return this._get("bufferViews",e)}getBuffer(e){return this._get("buffers",e)}_get(e,t){if("object"==typeof t)return t;const n=this.json[e]&&this.json[e][t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return e.id=e.id||"scene-"+t,e.nodes=(e.nodes||[]).map(e=>this.getNode(e)),e}_resolveNode(e,t){return e.id=e.id||"node-"+t,e.children&&(e.children=e.children.map(e=>this.getNode(e))),void 0!==e.mesh?e.mesh=this.getMesh(e.mesh):void 0!==e.meshes&&e.meshes.length&&(e.mesh=e.meshes.reduce((e,t)=>{const n=this.getMesh(t);return e.id=n.id,e.primitives=e.primitives.concat(n.primitives),e},{primitives:[]})),void 0!==e.camera&&(e.camera=this.getCamera(e.camera)),void 0!==e.skin&&(e.skin=this.getSkin(e.skin)),e}_resolveSkin(e,t){return e.id=e.id||"skin-"+t,e.inverseBindMatrices=this.getAccessor(e.inverseBindMatrices),e}_resolveMesh(e,t){return e.id=e.id||"mesh-"+t,e.primitives&&(e.primitives=e.primitives.map(e=>{const t=(e={...e}).attributes;e.attributes={};for(const n in t)e.attributes[n]=this.getAccessor(t[n]);return void 0!==e.indices&&(e.indices=this.getAccessor(e.indices)),void 0!==e.material&&(e.material=this.getMaterial(e.material)),e})),e}_resolveMaterial(e,t){if(e.id=e.id||"material-"+t,e.normalTexture&&(e.normalTexture={...e.normalTexture},e.normalTexture.texture=this.getTexture(e.normalTexture.index)),e.occlusionTexture&&(e.occlustionTexture={...e.occlustionTexture},e.occlusionTexture.texture=this.getTexture(e.occlusionTexture.index)),e.emissiveTexture&&(e.emmisiveTexture={...e.emmisiveTexture},e.emissiveTexture.texture=this.getTexture(e.emissiveTexture.index)),e.emissiveFactor||(e.emissiveFactor=e.emmisiveTexture?[1,1,1]:[0,0,0]),e.pbrMetallicRoughness){e.pbrMetallicRoughness={...e.pbrMetallicRoughness};const t=e.pbrMetallicRoughness;t.baseColorTexture&&(t.baseColorTexture={...t.baseColorTexture},t.baseColorTexture.texture=this.getTexture(t.baseColorTexture.index)),t.metallicRoughnessTexture&&(t.metallicRoughnessTexture={...t.metallicRoughnessTexture},t.metallicRoughnessTexture.texture=this.getTexture(t.metallicRoughnessTexture.index))}return e}_resolveAccessor(e,t){var n,r;if(e.id=e.id||"accessor-"+t,void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView)),e.bytesPerComponent=(n=e.componentType,sn[n]),e.components=(r=e.type,rn[r]),e.bytesPerElement=e.bytesPerComponent*e.components,e.bufferView){const t=e.bufferView.buffer,{ArrayType:n,byteLength:r}=Me(e,e.bufferView),s=(e.bufferView.byteOffset||0)+(e.byteOffset||0)+t.byteOffset,i=t.arrayBuffer.slice(s,s+r);e.value=new n(i)}return e}_resolveTexture(e,t){return e.id=e.id||"texture-"+t,e.sampler="sampler"in e?this.getSampler(e.sampler):An,e.source=this.getImage(e.source),e}_resolveSampler(e,t){e.id=e.id||"sampler-"+t,e.parameters={};for(const t in e){const n=this._enumSamplerParameter(t);void 0!==n&&(e.parameters[n]=e[t])}return e}_enumSamplerParameter(e){return an[e]}_resolveImage(e,t){e.id=e.id||"image-"+t,void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView));const n=this.images[t];return n&&(e.image=n),e}_resolveBufferView(e,t){e.id=e.id||"bufferView-"+t;const n=e.buffer;e.buffer=this.buffers[n];const r=this.buffers[n].arrayBuffer;let s=this.buffers[n].byteOffset||0;return"byteOffset"in e&&(s+=e.byteOffset),e.data=new Uint8Array(r,s,e.byteLength),e}_resolveCamera(e,t){return e.id=e.id||"camera-"+t,e.perspective,e.orthographic,e}}function cn(e,t){return(new Bn).postProcess(e,t)}const un=1735152710;function Cn(e,t=0,n={}){const r=new DataView(e),{magic:s=un}=n,i=r.getUint32(t,!1);return i===s||i===un}function fn(e,t,n=0,r={}){const s=new DataView(t),i=function(e,t=0){return`${String.fromCharCode(e.getUint8(t+0))}${String.fromCharCode(e.getUint8(t+1))}${String.fromCharCode(e.getUint8(t+2))}${String.fromCharCode(e.getUint8(t+3))}`}(s,n+0),o=s.getUint32(n+4,!0),a=s.getUint32(n+8,!0);switch(Object.assign(e,{header:{byteOffset:n,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),n+=12,e.version){case 1:return function(e,t,n){j(e.header.byteLength>20);const r=t.getUint32(n+0,!0),s=t.getUint32(n+4,!0);return n+=8,j(0===s),dn(e,t,n,r),n+=r,n+=ln(e,t,n,e.header.byteLength)}(e,s,n);case 2:return function(e,t,n,r){return j(e.header.byteLength>20),function(e,t,n,r){for(;n+8<=e.header.byteLength;){const s=t.getUint32(n+0,!0),i=t.getUint32(n+4,!0);switch(n+=8,i){case 1313821514:dn(e,t,n,s);break;case 5130562:ln(e,t,n,s);break;case 0:r.strict||dn(e,t,n,s);break;case 1:r.strict||ln(e,t,n,s)}n+=le(s,4)}}(e,t,n,r),n+e.header.byteLength}(e,s,n,{});default:throw new Error(`Invalid GLB version ${e.version}. Only supports v1 and v2.`)}}function dn(e,t,n,r){const s=new Uint8Array(t.buffer,n,r),i=new TextDecoder("utf8").decode(s);return e.json=JSON.parse(i),le(r,4)}function ln(e,t,n,r){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:t.buffer}),le(r,4)}async function mn(e,t,n=0,r,s){var i,o,a,A;!function(e,t,n,r){r.uri&&(e.baseUri=r.uri);if(t instanceof ArrayBuffer&&!Cn(t,n,r)){const e=new TextDecoder;t=e.decode(t)}if("string"==typeof t)e.json=ce(t);else if(t instanceof ArrayBuffer){const s={};n=fn(s,t,n,r.glb),Ce("glTF"===s.type,"Invalid GLB magic string "+s.type),e._glb=s,e.json=s.json}else Ce(!1,"GLTF: must be ArrayBuffer or string");const s=e.json.buffers||[];if(e.buffers=new Array(s.length).fill(null),e._glb&&e._glb.header.hasBinChunk){const{binChunks:t}=e._glb;e.buffers[0]={arrayBuffer:t[0].arrayBuffer,byteOffset:t[0].byteOffset,byteLength:t[0].byteLength}}const i=e.json.images||[];e.images=new Array(i.length).fill({})}(e,t,n,r),function(e,t={}){(new nn).normalize(e,t)}(e,{normalize:null==r||null===(i=r.gltf)||void 0===i?void 0:i.normalize}),function(e,t={},n){const r=zt.filter(e=>$t(e.name,t));for(const i of r){var s;null===(s=i.preprocess)||void 0===s||s.call(i,e,t,n)}}(e,r,s);const B=[];if(null!=r&&null!==(o=r.gltf)&&void 0!==o&&o.loadBuffers&&e.json.buffers&&await async function(e,t,n){const r=e.json.buffers||[];for(let o=0;o<r.length;++o){const a=r[o];if(a.uri){var s,i;const{fetch:r}=n;Ce(r);const A=fe(a.uri,t),B=await(null==n||null===(s=n.fetch)||void 0===s?void 0:s.call(n,A)),c=await(null==B||null===(i=B.arrayBuffer)||void 0===i?void 0:i.call(B));e.buffers[o]={arrayBuffer:c,byteOffset:0,byteLength:c.byteLength},delete a.uri}}}(e,r,s),null!=r&&null!==(a=r.gltf)&&void 0!==a&&a.loadImages){const t=async function(e,t,n){const r=function(e){const t=new Set,n=e.json.textures||[];for(const e of n)void 0!==e.source&&t.add(e.source);return Array.from(t).sort()}(e),s=e.json.images||[],i=[];for(const o of r)i.push(En(e,s[o],o,t,n));return await Promise.all(i)}(e,r,s);B.push(t)}const c=async function(e,t={},n){const r=zt.filter(e=>$t(e.name,t));for(const i of r){var s;await(null===(s=i.decode)||void 0===s?void 0:s.call(i,e,t,n))}}(e,r,s);return B.push(c),await Promise.all(B),null!=r&&null!==(A=r.gltf)&&void 0!==A&&A.postProcess?cn(e,r):e}async function En(e,t,n,r,s){const{fetch:i,parse:o}=s;let a;if(t.uri){const e=fe(t.uri,r),n=await i(e);a=await n.arrayBuffer()}if(Number.isFinite(t.bufferView)){const n=de(e.json,e.buffers,t.bufferView);a=ue(n.buffer,n.byteOffset,n.byteLength)}Ce(a,"glTF image has no data");let A=await o(a,[Ae,x],{mimeType:t.mimeType,basis:{format:L()}},s);A&&A[0]&&(A={compressed:!0,mipmaps:!1,width:A[0].width,height:A[0].height,data:A}),e.images=e.images||[],e.images[n]=A}const hn={name:"glTF",id:"gltf",module:"gltf",version:c,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(e,t={},n){(t={...hn.options,...t}).gltf={...hn.options.gltf,...t.gltf};const{byteOffset:r=0}=t;return await mn({},e,r,t,n)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};function Gn(e,t,n,r){const s=le(n.byteLength,r),i=s-n.byteLength;if(e){const r=new Uint8Array(e.buffer,e.byteOffset+t,n.byteLength),s=new Uint8Array(n);r.set(s);for(let r=0;r<i;++r)e.setUint8(t+n.byteLength+r,32)}return t+=s}const Fn=1179937895;function bn(e,t,n=0,r={}){const{magic:s=Fn,version:i=2,json:o={},binary:a}=e,A=n;t&&(t.setUint32(n+0,s,!0),t.setUint32(n+4,i,!0),t.setUint32(n+8,0,!0));const B=n+8,c=n+=12;t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,1313821514,!0));if(n=function(e,t,n,r){return t=Gn(e,t,(new TextEncoder).encode(n),r)}(t,n+=8,JSON.stringify(o),4),t){const e=n-c-8;t.setUint32(c+0,e,!0)}if(a){const e=n;if(t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,5130562,!0)),n=Gn(t,n+=8,a,4),t){const r=n-e-8;t.setUint32(e+0,r,!0)}}if(t){const e=n-A;t.setUint32(B,e,!0)}return n}function gn(e,t,n,r){return function(e,{firstBuffer:t=0}={}){if(e.buffers&&e.buffers.length>t)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(e),bn(e,t,n,r)}const Dn={name:"glTF",id:"gltf",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(e,t={}){const{byteOffset:n=0}=t,r=gn(e,null,n,t),s=new ArrayBuffer(r),i=new DataView(s);return gn(e,i,n,t),s},options:{gltf:{}}};const In={name:"GLB",id:"glb",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,parse:async function(e,t){return Mn(e,t)},parseSync:Mn,options:{glb:{strict:!1}}};function Mn(e,t){const{byteOffset:n=0}=t||{},r={};return fn(r,e,n,null==t?void 0:t.glb),r}const Rn={name:"GLB",id:"glb",module:"gltf",version:c,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(e,t){const{byteOffset:n=0}=t,r=bn(e,null,n,t),s=new ArrayBuffer(r),i=new DataView(s);return bn(e,i,n,t),s},options:{glb:{}}}},,function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return s}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const s=Boolean("object"!=typeof r||"[object process]"!==String(r)||r.browser),i=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);i&&parseFloat(i[1])}).call(this,n(6),n(7))}])}));
|
|
2
2
|
//# sourceMappingURL=dist.min.js.map
|