@loaders.gl/3d-tiles 3.1.0-alpha.3 → 4.0.0-alpha.4
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/lib/classes/tile-3d-batch-table-hierarchy.js +1 -1
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
- package/dist/lib/classes/tile-3d-batch-table.js +4 -4
- package/dist/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/lib/ion/ion.js +6 -6
- package/dist/lib/ion/ion.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js +2 -2
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-header.js +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.js +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-utils.js +1 -5
- package/dist/lib/parsers/helpers/parse-utils.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-header.js +1 -1
- package/dist/lib/parsers/parse-3d-tile-header.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-instanced-model.js +1 -1
- package/dist/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile.js +1 -1
- package/dist/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/lib/utils/version.js +1 -1
- package/package.json +11 -9
- package/dist/dist.min.js +0 -2
- package/dist/dist.min.js.map +0 -1
|
@@ -22,7 +22,7 @@ export async function parse3DTile(arrayBuffer, byteOffset = 0, options, context,
|
|
|
22
22
|
return await parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context);
|
|
23
23
|
|
|
24
24
|
default:
|
|
25
|
-
throw new Error(
|
|
25
|
+
throw new Error("3DTileLoader: unknown type ".concat(tile.type));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=parse-3d-tile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/parsers/parse-3d-tile.js"],"names":["TILE3D_TYPE","getMagicString","parsePointCloud3DTile","parseBatchedModel3DTile","parseInstancedModel3DTile","parseComposite3DTile","parse3DTile","arrayBuffer","byteOffset","options","context","tile","type","COMPOSITE","BATCHED_3D_MODEL","INSTANCED_3D_MODEL","POINT_CLOUD","Error"],"mappings":"AAGA,SAAQA,WAAR,QAA0B,cAA1B;AACA,SAAQC,cAAR,QAA6B,uBAA7B;AAEA,SAAQC,qBAAR,QAAoC,6BAApC;AACA,SAAQC,uBAAR,QAAsC,+BAAtC;AACA,SAAQC,yBAAR,QAAwC,iCAAxC;AACA,SAAQC,oBAAR,QAAmC,2BAAnC;AAGA,OAAO,eAAeC,WAAf,CAA2BC,WAA3B,EAAwCC,UAAU,GAAG,CAArD,EAAwDC,OAAxD,EAAiEC,OAAjE,EAA0EC,IAAI,GAAG,EAAjF,EAAqF;AAC1FA,EAAAA,IAAI,CAACH,UAAL,GAAkBA,UAAlB;AACAG,EAAAA,IAAI,CAACC,IAAL,GAAYX,cAAc,CAACM,WAAD,EAAcC,UAAd,CAA1B;;AAEA,UAAQG,IAAI,CAACC,IAAb;AACE,SAAKZ,WAAW,CAACa,SAAjB;AAEE,aAAO,MAAMR,oBAAoB,CAC/BM,IAD+B,EAE/BJ,WAF+B,EAG/BC,UAH+B,EAI/BC,OAJ+B,EAK/BC,OAL+B,EAM/BJ,WAN+B,CAAjC;;AASF,SAAKN,WAAW,CAACc,gBAAjB;AACE,aAAO,MAAMX,uBAAuB,CAACQ,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAApC;;AAEF,SAAKV,WAAW,CAACe,kBAAjB;AACE,aAAO,MAAMX,yBAAyB,CAACO,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAAtC;;AAEF,SAAKV,WAAW,CAACgB,WAAjB;AACE,aAAO,MAAMd,qBAAqB,CAACS,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAAlC;;AAEF;AACE,YAAM,IAAIO,KAAJ,
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/parsers/parse-3d-tile.js"],"names":["TILE3D_TYPE","getMagicString","parsePointCloud3DTile","parseBatchedModel3DTile","parseInstancedModel3DTile","parseComposite3DTile","parse3DTile","arrayBuffer","byteOffset","options","context","tile","type","COMPOSITE","BATCHED_3D_MODEL","INSTANCED_3D_MODEL","POINT_CLOUD","Error"],"mappings":"AAGA,SAAQA,WAAR,QAA0B,cAA1B;AACA,SAAQC,cAAR,QAA6B,uBAA7B;AAEA,SAAQC,qBAAR,QAAoC,6BAApC;AACA,SAAQC,uBAAR,QAAsC,+BAAtC;AACA,SAAQC,yBAAR,QAAwC,iCAAxC;AACA,SAAQC,oBAAR,QAAmC,2BAAnC;AAGA,OAAO,eAAeC,WAAf,CAA2BC,WAA3B,EAAwCC,UAAU,GAAG,CAArD,EAAwDC,OAAxD,EAAiEC,OAAjE,EAA0EC,IAAI,GAAG,EAAjF,EAAqF;AAC1FA,EAAAA,IAAI,CAACH,UAAL,GAAkBA,UAAlB;AACAG,EAAAA,IAAI,CAACC,IAAL,GAAYX,cAAc,CAACM,WAAD,EAAcC,UAAd,CAA1B;;AAEA,UAAQG,IAAI,CAACC,IAAb;AACE,SAAKZ,WAAW,CAACa,SAAjB;AAEE,aAAO,MAAMR,oBAAoB,CAC/BM,IAD+B,EAE/BJ,WAF+B,EAG/BC,UAH+B,EAI/BC,OAJ+B,EAK/BC,OAL+B,EAM/BJ,WAN+B,CAAjC;;AASF,SAAKN,WAAW,CAACc,gBAAjB;AACE,aAAO,MAAMX,uBAAuB,CAACQ,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAApC;;AAEF,SAAKV,WAAW,CAACe,kBAAjB;AACE,aAAO,MAAMX,yBAAyB,CAACO,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAAtC;;AAEF,SAAKV,WAAW,CAACgB,WAAjB;AACE,aAAO,MAAMd,qBAAqB,CAACS,IAAD,EAAOJ,WAAP,EAAoBC,UAApB,EAAgCC,OAAhC,EAAyCC,OAAzC,CAAlC;;AAEF;AACE,YAAM,IAAIO,KAAJ,sCAAwCN,IAAI,CAACC,IAA7C,EAAN;AAtBJ;AAwBD","sourcesContent":["// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {TILE3D_TYPE} from '../constants';\nimport {getMagicString} from './helpers/parse-utils';\n\nimport {parsePointCloud3DTile} from './parse-3d-tile-point-cloud';\nimport {parseBatchedModel3DTile} from './parse-3d-tile-batched-model';\nimport {parseInstancedModel3DTile} from './parse-3d-tile-instanced-model';\nimport {parseComposite3DTile} from './parse-3d-tile-composite';\n\n// Extracts\nexport async function parse3DTile(arrayBuffer, byteOffset = 0, options, context, tile = {}) {\n tile.byteOffset = byteOffset;\n tile.type = getMagicString(arrayBuffer, byteOffset);\n\n switch (tile.type) {\n case TILE3D_TYPE.COMPOSITE:\n // Note: We pass this function as argument so that embedded tiles can be parsed recursively\n return await parseComposite3DTile(\n tile,\n arrayBuffer,\n byteOffset,\n options,\n context,\n parse3DTile\n );\n\n case TILE3D_TYPE.BATCHED_3D_MODEL:\n return await parseBatchedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.INSTANCED_3D_MODEL:\n return await parseInstancedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.POINT_CLOUD:\n return await parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n default:\n throw new Error(`3DTileLoader: unknown type ${tile.type}`); // eslint-disable-line\n }\n}\n"],"file":"parse-3d-tile.js"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = typeof "
|
|
1
|
+
export const VERSION = typeof "4.0.0-alpha.4" !== 'undefined' ? "4.0.0-alpha.4" : 'latest';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/3d-tiles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.4",
|
|
4
4
|
"description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,17 +31,19 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"pre-build": "npm run build-bundle",
|
|
34
|
-
"build-bundle": "
|
|
34
|
+
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@loaders.gl/
|
|
38
|
-
"@loaders.gl/
|
|
39
|
-
"@loaders.gl/
|
|
40
|
-
"@loaders.gl/
|
|
41
|
-
"@loaders.gl/
|
|
42
|
-
"@loaders.gl/tiles": "3.1.0-alpha.3",
|
|
37
|
+
"@loaders.gl/draco": "4.0.0-alpha.4",
|
|
38
|
+
"@loaders.gl/gltf": "4.0.0-alpha.4",
|
|
39
|
+
"@loaders.gl/loader-utils": "4.0.0-alpha.4",
|
|
40
|
+
"@loaders.gl/math": "4.0.0-alpha.4",
|
|
41
|
+
"@loaders.gl/tiles": "4.0.0-alpha.4",
|
|
43
42
|
"@math.gl/core": "^3.5.1",
|
|
44
43
|
"@math.gl/geospatial": "^3.5.1"
|
|
45
44
|
},
|
|
46
|
-
"
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@loaders.gl/core": "^3.0.0"
|
|
47
|
+
},
|
|
48
|
+
"gitHead": "53026061b3c8871f7e96d3a5826125cc6613bddc"
|
|
47
49
|
}
|
package/dist/dist.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return i}));var n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array,i=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(3);function s(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function i(t,e,r=""){if(n.b.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}const o={};function a(t,e){o[t]||(o[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"h",(function(){return a})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"m",(function(){return A})),r.d(e,"l",(function(){return h})),r.d(e,"n",(function(){return f})),r.d(e,"i",(function(){return B})),r.d(e,"j",(function(){return l})),r.d(e,"k",(function(){return d})),r.d(e,"a",(function(){return C})),r.d(e,"f",(function(){return b}));var n=r(0);function s(){var t=new n.a(3);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function o(t,e,r){var s=new n.a(3);return s[0]=t,s[1]=e,s[2]=r,s}function a(t,e){var r=e[0],n=e[1],s=e[2],i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2];return t[0]=s*c-i*a,t[1]=i*o-n*c,t[2]=n*a-s*o,t}function A(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*s+r[8]*i+r[12])/o,t[1]=(r[1]*n+r[5]*s+r[9]*i+r[13])/o,t[2]=(r[2]*n+r[6]*s+r[10]*i+r[14])/o,t}function h(t,e,r){var n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function f(t,e,r){var n=r[0],s=r[1],i=r[2],o=r[3],a=e[0],c=e[1],u=e[2],A=s*u-i*c,h=i*a-n*u,f=n*c-s*a,B=s*f-i*h,l=i*A-n*f,d=n*h-s*A,C=2*o;return A*=C,h*=C,f*=C,B*=2,l*=2,d*=2,t[0]=a+A+B,t[1]=c+h+l,t[2]=u+f+d,t}function B(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function l(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function d(t,e,r,n){var s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t}function C(t,e){var r=t[0],n=t[1],s=t[2],i=e[0],o=e[1],a=e[2],u=Math.sqrt(r*r+n*n+s*s)*Math.sqrt(i*i+o*o+a*a),A=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(A,-1),1))}var m,b=i;m=s()},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"e",(function(){return a})),r.d(e,"g",(function(){return u})),r.d(e,"f",(function(){return A})),r.d(e,"a",(function(){return h})),r.d(e,"c",(function(){return f}));r(6);const n=1/Math.PI*180,s=1/180*Math.PI,i={};function o(t,{precision:e=i.precision||4}={}){return t=function(t){return Math.round(t/i.EPSILON)*i.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function c(t,e,r){if(a(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function u(t){return function(t,e){return c(t,t=>t*s,e)}(t)}function A(t){return function(t,e){return c(t,t=>t*n,e)}(t)}function h(t,e,r){return c(t,t=>Math.max(e,Math.min(r,t)))}function f(t,e,r){const n=i.EPSILON;r&&(i.EPSILON=r);try{if(t===e)return!0;if(a(t)&&a(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!f(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"k",(function(){return u})),r.d(e,"h",(function(){return A})),r.d(e,"m",(function(){return h})),r.d(e,"j",(function(){return f})),r.d(e,"d",(function(){return B})),r.d(e,"i",(function(){return l})),r.d(e,"n",(function(){return d})),r.d(e,"o",(function(){return C})),r.d(e,"f",(function(){return m})),r.d(e,"e",(function(){return b}));var n=r(0);function s(t){var e=new n.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(t,e,r,s){var i=new n.a(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=s,i}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,r,n,s){return t[0]=e,t[1]=r,t[2]=n,t[3]=s,t}function c(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}function u(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}function A(t){var e=t[0],r=t[1],n=t[2],s=t[3];return Math.hypot(e,r,n,s)}function h(t){var e=t[0],r=t[1],n=t[2],s=t[3];return e*e+r*r+n*n+s*s}function f(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r*r+n*n+s*s+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=r*o,t[1]=n*o,t[2]=s*o,t[3]=i*o,t}function B(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function l(t,e,r,n){var s=e[0],i=e[1],o=e[2],a=e[3];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=o+n*(r[2]-o),t[3]=a+n*(r[3]-a),t}function d(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*o,t[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*o,t[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*o,t[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*o,t}function C(t,e,r){var n=e[0],s=e[1],i=e[2],o=r[0],a=r[1],c=r[2],u=r[3],A=u*n+a*i-c*s,h=u*s+c*n-o*i,f=u*i+o*s-a*n,B=-o*n-a*s-c*i;return t[0]=A*u+B*-o+h*-c-f*-a,t[1]=h*u+B*-a+f*-o-A*-c,t[2]=f*u+B*-c+A*-a-h*-o,t[3]=e[3],t}function m(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function b(t,e){var r=t[0],s=t[1],i=t[2],o=t[3],a=e[0],c=e[1],u=e[2],A=e[3];return Math.abs(r-a)<=n.b*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-c)<=n.b*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(i-u)<=n.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-A)<=n.b*Math.max(1,Math.abs(o),Math.abs(A))}var y,g;y=new n.a(4),n.a!=Float32Array&&(y[0]=0,y[1]=0,y[2]=0,y[3]=0),g=y},function(t,e,r){"use strict";r.d(e,"o",(function(){return s})),r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"f",(function(){return a})),r.d(e,"n",(function(){return c})),r.d(e,"m",(function(){return u})),r.d(e,"i",(function(){return A})),r.d(e,"j",(function(){return h})),r.d(e,"k",(function(){return f})),r.d(e,"l",(function(){return B})),r.d(e,"b",(function(){return l})),r.d(e,"c",(function(){return d})),r.d(e,"h",(function(){return C})),r.d(e,"g",(function(){return m})),r.d(e,"e",(function(){return b}));var n=r(0);function s(t,e){if(t===e){var r=e[1],n=e[2],s=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=s,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function i(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],A=e[8],h=e[9],f=e[10],B=e[11],l=e[12],d=e[13],C=e[14],m=e[15],b=r*a-n*o,y=r*c-s*o,g=r*u-i*o,E=n*c-s*a,p=n*u-i*a,I=s*u-i*c,F=A*d-h*l,M=A*C-f*l,T=A*m-B*l,G=h*C-f*d,O=h*m-B*d,D=f*m-B*C,w=b*D-y*O+g*G+E*T-p*M+I*F;return w?(w=1/w,t[0]=(a*D-c*O+u*G)*w,t[1]=(s*O-n*D-i*G)*w,t[2]=(d*I-C*p+m*E)*w,t[3]=(f*p-h*I-B*E)*w,t[4]=(c*T-o*D-u*M)*w,t[5]=(r*D-s*T+i*M)*w,t[6]=(C*g-l*I-m*y)*w,t[7]=(A*I-f*g+B*y)*w,t[8]=(o*O-a*T+u*F)*w,t[9]=(n*T-r*O-i*F)*w,t[10]=(l*p-d*g+m*b)*w,t[11]=(h*g-A*p-B*b)*w,t[12]=(a*M-o*G-c*F)*w,t[13]=(r*G-n*M+s*F)*w,t[14]=(d*y-l*E-C*b)*w,t[15]=(A*E-h*y+f*b)*w,t):null}function o(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8],A=t[9],h=t[10],f=t[11],B=t[12],l=t[13],d=t[14],C=t[15];return(e*o-r*i)*(h*C-f*d)-(e*a-n*i)*(A*C-f*l)+(e*c-s*i)*(A*d-h*l)+(r*a-n*o)*(u*C-f*B)-(r*c-s*o)*(u*d-h*B)+(n*c-s*a)*(u*l-A*B)}function a(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],f=e[9],B=e[10],l=e[11],d=e[12],C=e[13],m=e[14],b=e[15],y=r[0],g=r[1],E=r[2],p=r[3];return t[0]=y*n+g*a+E*h+p*d,t[1]=y*s+g*c+E*f+p*C,t[2]=y*i+g*u+E*B+p*m,t[3]=y*o+g*A+E*l+p*b,y=r[4],g=r[5],E=r[6],p=r[7],t[4]=y*n+g*a+E*h+p*d,t[5]=y*s+g*c+E*f+p*C,t[6]=y*i+g*u+E*B+p*m,t[7]=y*o+g*A+E*l+p*b,y=r[8],g=r[9],E=r[10],p=r[11],t[8]=y*n+g*a+E*h+p*d,t[9]=y*s+g*c+E*f+p*C,t[10]=y*i+g*u+E*B+p*m,t[11]=y*o+g*A+E*l+p*b,y=r[12],g=r[13],E=r[14],p=r[15],t[12]=y*n+g*a+E*h+p*d,t[13]=y*s+g*c+E*f+p*C,t[14]=y*i+g*u+E*B+p*m,t[15]=y*o+g*A+E*l+p*b,t}function c(t,e,r){var n,s,i,o,a,c,u,A,h,f,B,l,d=r[0],C=r[1],m=r[2];return e===t?(t[12]=e[0]*d+e[4]*C+e[8]*m+e[12],t[13]=e[1]*d+e[5]*C+e[9]*m+e[13],t[14]=e[2]*d+e[6]*C+e[10]*m+e[14],t[15]=e[3]*d+e[7]*C+e[11]*m+e[15]):(n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],f=e[9],B=e[10],l=e[11],t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=u,t[7]=A,t[8]=h,t[9]=f,t[10]=B,t[11]=l,t[12]=n*d+a*C+h*m+e[12],t[13]=s*d+c*C+f*m+e[13],t[14]=i*d+u*C+B*m+e[14],t[15]=o*d+A*C+l*m+e[15]),t}function u(t,e,r){var n=r[0],s=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function A(t,e,r,s){var i,o,a,c,u,A,h,f,B,l,d,C,m,b,y,g,E,p,I,F,M,T,G,O,D=s[0],w=s[1],R=s[2],J=Math.hypot(D,w,R);return J<n.b?null:(D*=J=1/J,w*=J,R*=J,i=Math.sin(r),a=1-(o=Math.cos(r)),c=e[0],u=e[1],A=e[2],h=e[3],f=e[4],B=e[5],l=e[6],d=e[7],C=e[8],m=e[9],b=e[10],y=e[11],g=D*D*a+o,E=w*D*a+R*i,p=R*D*a-w*i,I=D*w*a-R*i,F=w*w*a+o,M=R*w*a+D*i,T=D*R*a+w*i,G=w*R*a-D*i,O=R*R*a+o,t[0]=c*g+f*E+C*p,t[1]=u*g+B*E+m*p,t[2]=A*g+l*E+b*p,t[3]=h*g+d*E+y*p,t[4]=c*I+f*F+C*M,t[5]=u*I+B*F+m*M,t[6]=A*I+l*F+b*M,t[7]=h*I+d*F+y*M,t[8]=c*T+f*G+C*O,t[9]=u*T+B*G+m*O,t[10]=A*T+l*G+b*O,t[11]=h*T+d*G+y*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[4],o=e[5],a=e[6],c=e[7],u=e[8],A=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*s+u*n,t[5]=o*s+A*n,t[6]=a*s+h*n,t[7]=c*s+f*n,t[8]=u*s-i*n,t[9]=A*s-o*n,t[10]=h*s-a*n,t[11]=f*s-c*n,t}function f(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[8],A=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s-u*n,t[1]=o*s-A*n,t[2]=a*s-h*n,t[3]=c*s-f*n,t[8]=i*n+u*s,t[9]=o*n+A*s,t[10]=a*n+h*s,t[11]=c*n+f*s,t}function B(t,e,r){var n=Math.sin(r),s=Math.cos(r),i=e[0],o=e[1],a=e[2],c=e[3],u=e[4],A=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s+u*n,t[1]=o*s+A*n,t[2]=a*s+h*n,t[3]=c*s+f*n,t[4]=u*s-i*n,t[5]=A*s-o*n,t[6]=h*s-a*n,t[7]=f*s-c*n,t}function l(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,A=n*o,h=n*a,f=s*o,B=s*a,l=s*c,d=i*o,C=i*a,m=i*c;return t[0]=1-h-l,t[1]=A+m,t[2]=f-C,t[3]=0,t[4]=A-m,t[5]=1-u-l,t[6]=B+d,t[7]=0,t[8]=f+C,t[9]=B-d,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,r,n,s,i,o){var a=1/(r-e),c=1/(s-n),u=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(s+n)*c,t[10]=(o+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*u,t[15]=0,t}function C(t,e,r,n,s){var i,o=1/Math.tan(e/2);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(i=1/(n-s),t[10]=(s+n)*i,t[14]=2*s*n*i):(t[10]=-1,t[14]=-2*n),t}function m(t,e,r,n,s,i,o){var a=1/(e-r),c=1/(n-s),u=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*a,t[13]=(s+n)*c,t[14]=(o+i)*u,t[15]=1,t}function b(t,e,r,s){var i,o,a,c,u,A,h,f,B,l,d=e[0],C=e[1],m=e[2],b=s[0],y=s[1],g=s[2],E=r[0],p=r[1],I=r[2];return Math.abs(d-E)<n.b&&Math.abs(C-p)<n.b&&Math.abs(m-I)<n.b?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=d-E,f=C-p,B=m-I,i=y*(B*=l=1/Math.hypot(h,f,B))-g*(f*=l),o=g*(h*=l)-b*B,a=b*f-y*h,(l=Math.hypot(i,o,a))?(i*=l=1/l,o*=l,a*=l):(i=0,o=0,a=0),c=f*a-B*o,u=B*i-h*a,A=h*o-f*i,(l=Math.hypot(c,u,A))?(c*=l=1/l,u*=l,A*=l):(c=0,u=0,A=0),t[0]=i,t[1]=c,t[2]=h,t[3]=0,t[4]=o,t[5]=u,t[6]=f,t[7]=0,t[8]=a,t[9]=A,t[10]=B,t[11]=0,t[12]=-(i*d+o*C+a*m),t[13]=-(c*d+u*C+A*m),t[14]=-(h*d+f*C+B*m),t[15]=1,t)}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"i",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"e",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"f",(function(){return A})),r.d(e,"g",(function(){return h})),r.d(e,"c",(function(){return f}));var n=r(0);function s(){var t=new n.a(9);return n.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function i(t,e){if(t===e){var r=e[1],n=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=s}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function o(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],A=e[8],h=A*o-a*u,f=-A*i+a*c,B=u*i-o*c,l=r*h+n*f+s*B;return l?(l=1/l,t[0]=h*l,t[1]=(-A*n+s*u)*l,t[2]=(a*n-s*o)*l,t[3]=f*l,t[4]=(A*r-s*c)*l,t[5]=(-a*r+s*i)*l,t[6]=B*l,t[7]=(-u*r+n*c)*l,t[8]=(o*r-n*i)*l,t):null}function a(t){var e=t[0],r=t[1],n=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-o*c)+r*(-u*s+o*a)+n*(c*s-i*a)}function c(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],f=r[0],B=r[1],l=r[2],d=r[3],C=r[4],m=r[5],b=r[6],y=r[7],g=r[8];return t[0]=f*n+B*o+l*u,t[1]=f*s+B*a+l*A,t[2]=f*i+B*c+l*h,t[3]=d*n+C*o+m*u,t[4]=d*s+C*a+m*A,t[5]=d*i+C*c+m*h,t[6]=b*n+y*o+g*u,t[7]=b*s+y*a+g*A,t[8]=b*i+y*c+g*h,t}function u(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],f=r[0],B=r[1];return t[0]=n,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=f*n+B*o+u,t[7]=f*s+B*a+A,t[8]=f*i+B*c+h,t}function A(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],A=e[7],h=e[8],f=Math.sin(r),B=Math.cos(r);return t[0]=B*n+f*o,t[1]=B*s+f*a,t[2]=B*i+f*c,t[3]=B*o-f*n,t[4]=B*a-f*s,t[5]=B*c-f*i,t[6]=u,t[7]=A,t[8]=h,t}function h(t,e,r){var n=r[0],s=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function f(t,e){var r=e[0],n=e[1],s=e[2],i=e[3],o=r+r,a=n+n,c=s+s,u=r*o,A=n*o,h=n*a,f=s*o,B=s*a,l=s*c,d=i*o,C=i*a,m=i*c;return t[0]=1-h-l,t[3]=A-m,t[6]=f+C,t[1]=A+m,t[4]=1-u-l,t[7]=B-d,t[2]=f-C,t[5]=B+d,t[8]=1-u-h,t}},function(t,e,r){"use strict";function n(t,e,r){const n=e[0],s=e[1],i=r[3]*n+r[7]*s||1;return t[0]=(r[0]*n+r[4]*s)/i,t[1]=(r[1]*n+r[5]*s)/i,t}function s(t,e,r){const n=e[0],s=e[1],i=e[2],o=r[3]*n+r[7]*s+r[11]*i||1;return t[0]=(r[0]*n+r[4]*s+r[8]*i)/o,t[1]=(r[1]*n+r[5]*s+r[9]*i)/o,t[2]=(r[2]*n+r[6]*s+r[10]*i)/o,t}function i(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t[2]=e[2],t}function o(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[3]*s+r[6]*i,t[1]=r[1]*n+r[4]*s+r[7]*i,t[2]=r[2]*n+r[5]*s+r[8]*i,t[3]=e[3],t}r.d(e,"a",(function(){return n})),r.d(e,"c",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return a}));var n=r(0);function s(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t}function i(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function o(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t}function a(t,e,r){var n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}var c,u;c=new n.a(2),n.a!=Float32Array&&(c[0]=0,c[1]=0),u=c},,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return s}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const s=Boolean("object"!=typeof n||"[object process]"!==String(n)||n.browser),i=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);i&&parseFloat(i[1])}).call(this,r(26),r(27))},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return a}));const s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=s.global||s.self||s.window||{},o="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(26),r(27))},,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(3),s=r(6);class i extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return Object(s.a)(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:Object(n.e)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(n.b)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+Object(n.d)(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!Object(n.c)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const s=t[n];this[n]=s+r*(e[n]-s)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(n.b.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}},function(t,e){},,function(t,e){},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(14),s=r(1),i=r(6);class o extends n.a{get ELEMENTS(){return Object(i.a)(!1),0}copy(t){return Object(i.a)(!1),this}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return Object(s.a)(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return Object(s.a)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(s.a)(this[t])}setComponent(t,e){return Object(i.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(14),s=r(1),i=r(3),o=r(6);class a extends n.a{get ELEMENTS(){return Object(o.a)(!1),0}get RANK(){return Object(o.a)(!1),0}toString(){let t="[";if(i.b.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=Object(s.a)(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}},function(t,e){},,,,,function(t,e){},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,s=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var c,u=[],A=!1,h=-1;function f(){A&&c&&(A=!1,c.length?u=c.concat(u):h=-1,u.length&&B())}function B(){if(!A){var t=a(f);A=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,A=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function d(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new l(t,e)),1!==u.length||A||a(B)},l.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=d,s.addListener=d,s.once=d,s.off=d,s.removeListener=d,s.removeAllListeners=d,s.emit=d,s.prependListener=d,s.prependOnceListener=d,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e,r){const n=r(36);globalThis.loaders=globalThis.loaders||{},t.exports=Object.assign(globalThis.loaders,n)},,,,,,,,function(t,e,r){"use strict";r.r(e),r.d(e,"Tiles3DLoader",(function(){return Fn})),r.d(e,"CesiumIonLoader",(function(){return _n})),r.d(e,"Tile3DWriter",(function(){return Yn})),r.d(e,"Tile3DFeatureTable",(function(){return Et})),r.d(e,"Tile3DBatchTable",(function(){return Jt})),r.d(e,"TILE3D_TYPE",(function(){return E})),r.d(e,"_getIonTilesetMetadata",(function(){return Nn}));var n={};r.r(n),r.d(n,"filename",(function(){return h})),r.d(n,"dirname",(function(){return f})),r.d(n,"join",(function(){return B}));var s={};r.r(s),r.d(s,"name",(function(){return Ye})),r.d(s,"preprocess",(function(){return Ve})),r.d(s,"decode",(function(){return We}));var i={};r.r(i),r.d(i,"name",(function(){return tr})),r.d(i,"preprocess",(function(){return er}));var o={};r.r(o),r.d(o,"name",(function(){return rr})),r.d(o,"preprocess",(function(){return nr}));var a={};r.r(a),r.d(a,"name",(function(){return ir})),r.d(a,"preprocess",(function(){return or})),r.d(a,"decode",(function(){return ar})),r.d(a,"encode",(function(){return cr}));var c={};r.r(c),r.d(c,"name",(function(){return fr})),r.d(c,"decode",(function(){return Br})),r.d(c,"encode",(function(){return lr}));var u={};r.r(u),r.d(u,"name",(function(){return dr})),r.d(u,"decode",(function(){return Cr})),r.d(u,"encode",(function(){return mr}));var A={};function h(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(e+1):""}function f(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function B(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(A),r.d(A,"name",(function(){return br})),r.d(A,"decode",(function(){return yr})),r.d(A,"encode",(function(){return gr}));r(17),r(25);const l=1,d=2,C="empty",m="scenegraph",b="pointcloud",y="TILES3D",g="geometricError",E={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},p=(Object.keys(E),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function I(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function F(t,e,r){I(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),s=new Uint8Array(t,e,r);return n.decode(s)}const M={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.3",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 T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class G{constructor(t,e){T(this,"fields",void 0),T(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new G(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new G(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof G){const n=t;e=n.fields,r=O(O(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const s=Object.values(n);return new G(s,r)}}function O(t,e){return new Map([...t||new Map,...e||new Map])}function D(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class w{constructor(t,e,r=!1,n=new Map){D(this,"name",void 0),D(this,"type",void 0),D(this,"nullable",void 0),D(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new w(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let R,J,U,H,S,L,N,_,v;function P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(R||(R={}));class j{static isNull(t){return t&&t.typeId===R.Null}static isInt(t){return t&&t.typeId===R.Int}static isFloat(t){return t&&t.typeId===R.Float}static isBinary(t){return t&&t.typeId===R.Binary}static isUtf8(t){return t&&t.typeId===R.Utf8}static isBool(t){return t&&t.typeId===R.Bool}static isDecimal(t){return t&&t.typeId===R.Decimal}static isDate(t){return t&&t.typeId===R.Date}static isTime(t){return t&&t.typeId===R.Time}static isTimestamp(t){return t&&t.typeId===R.Timestamp}static isInterval(t){return t&&t.typeId===R.Interval}static isList(t){return t&&t.typeId===R.List}static isStruct(t){return t&&t.typeId===R.Struct}static isUnion(t){return t&&t.typeId===R.Union}static isFixedSizeBinary(t){return t&&t.typeId===R.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===R.FixedSizeList}static isMap(t){return t&&t.typeId===R.Map}static isDictionary(t){return t&&t.typeId===R.Dictionary}get typeId(){return R.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;J=Symbol.toStringTag;class x extends j{constructor(t,e){super(),P(this,"isSigned",void 0),P(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return R.Int}get[J](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class K extends x{constructor(){super(!0,8)}}class Q extends x{constructor(){super(!0,16)}}class k extends x{constructor(){super(!0,32)}}class X extends x{constructor(){super(!1,8)}}class Y extends x{constructor(){super(!1,16)}}class V extends x{constructor(){super(!1,32)}}const W=32,Z=64;U=Symbol.toStringTag;class q extends j{constructor(t){super(),P(this,"precision",void 0),this.precision=t}get typeId(){return R.Float}get[U](){return"Float"}toString(){return"Float"+this.precision}}class z extends q{constructor(){super(W)}}class $ extends q{constructor(){super(Z)}}Symbol.toStringTag;Symbol.toStringTag;H=Symbol.toStringTag;S=Symbol.toStringTag;L=Symbol.toStringTag;N=Symbol.toStringTag;_=Symbol.toStringTag;class tt extends j{constructor(t,e){super(),P(this,"listSize",void 0),P(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return R.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[_](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}v=Symbol.toStringTag;function et(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return new K;case Uint8Array:return new X;case Int16Array:return new Q;case Uint16Array:return new Y;case Int32Array:return new k;case Uint32Array:return new V;case Float32Array:return new z;case Float64Array:return new $;default:throw new Error("array type not supported")}}(e.value),s=r||function(t){const e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new w(t,new tt(e.size,new w("value",n)),!1,s)}function rt(t,e,r){return et(t,e,r?nt(r.metadata):void 0)}function nt(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function st(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const it={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ot={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class at{constructor(t){st(this,"draco",void 0),st(this,"decoder",void 0),st(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),s=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,s);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!s.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const i=this._getDracoLoaderData(s,n,e),o=this._getMeshData(s,i,e),a=function(t){let e=1/0,r=1/0,n=1/0,s=-1/0,i=-1/0,o=-1/0;const a=t.POSITION?t.POSITION.value:[],c=a&&a.length;for(let t=0;t<c;t+=3){const c=a[t],u=a[t+1],A=a[t+2];e=c<e?c:e,r=u<r?u:r,n=A<n?A:n,s=c>s?c:s,i=u>i?u:i,o=A>o?A:o}return[[e,r,n],[s,i,o]]}(o.attributes),c=function(t,e,r){const n=nt(e.metadata),s=[],i=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=rt(e,t[e],i[e]);s.push(r)}if(r){const t=rt("indices",r);s.push(t)}return new G(s,n)}(o.attributes,i,o.indices);return{loader:"draco",loaderData:i,header:{vertexCount:s.num_points(),boundingBox:a},...o,schema:c}}finally{this.draco.destroy(r),s&&this.draco.destroy(s)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),s=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:s}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const s=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[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:n,metadata:i};const o=this._getQuantizationTransform(s,e);o&&(r[s.unique_id()].quantization_transform=o);const a=this._getOctahedronTransform(s,e);a&&(r[s.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const s of Object.values(t.attributes)){const t=this._deduceAttributeName(s,r);s.name=t;const{value:i,size:o}=this._getAttributeValues(e,s);n[t]={value:i,size:o,byteOffset:s.byte_offset,byteStride:s.byte_stride,normalized:s.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=ot[e.data_type],n=e.num_components,s=t.num_points()*n,i=s*r.BYTES_PER_ELEMENT,o=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const c=this.draco._malloc(i);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,o,i,c),a=new r(this.draco.HEAPF32.buffer,c,s).slice()}finally{this.draco._free(c)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in it){if(this.draco[t]===n)return it[t]}const s=e.attributeNameEntry||"name";return t.metadata[s]?t.metadata[s].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var ct=r(12),ut=r(15);const At={};async function ht(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!ct.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.1.0-alpha.3/dist/libs/${t}`;if(ct.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),At[t]=At[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!ct.b)return ut.requireFromFile&&await ut.requireFromFile(t);if(ct.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!ct.b)return ut.requireFromString&&ut.requireFromString(t,e);if(ct.c)return eval.call(ct.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await At[t]}let ft;async function Bt(t){const e=t.modules||{};return ft=e.draco3d?ft||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):ft||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await ht("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await ft}const lt={...M,parse:async function(t,e){const{draco:r}=await Bt(e),n=new at(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const dt={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Ct={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...dt};var mt=r(41);const bt={[dt.DOUBLE]:Float64Array,[dt.FLOAT]:Float32Array,[dt.UNSIGNED_SHORT]:Uint16Array,[dt.UNSIGNED_INT]:Uint32Array,[dt.UNSIGNED_BYTE]:Uint8Array,[dt.BYTE]:Int8Array,[dt.SHORT]:Int16Array,[dt.INT]:Int32Array},yt={DOUBLE:dt.DOUBLE,FLOAT:dt.FLOAT,UNSIGNED_SHORT:dt.UNSIGNED_SHORT,UNSIGNED_INT:dt.UNSIGNED_INT,UNSIGNED_BYTE:dt.UNSIGNED_BYTE,BYTE:dt.BYTE,SHORT:dt.SHORT,INT:dt.INT};class gt{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in bt){if(bt[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=yt[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case dt.UNSIGNED_SHORT_5_6_5:case dt.UNSIGNED_SHORT_4_4_4_4:case dt.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=bt[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return gt.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(gt.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/gt.getByteSize(t));return new(gt.getArrayType(t))(e,r,n)}}class Et{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=Ct.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=gt.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,s){const i=this.json[t];if(!i)return i;const o=this.getPropertyArray(t,e,r);if(1===r)return o[n];for(let t=0;t<r;++t)s[t]=o[r*n+t];return s}_getTypedArrayFromBinary(t,e,r,n,s){const i=this._cachedTypedArrays;let o=i[t];return o||(o=gt.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+s,n*r),i[t]=o),o}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let s=n[t];return s||(s=gt.createTypedArray(e,r),n[t]=s),s}}const pt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},It={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},Ft={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Mt=t=>void 0!==t;function Tt(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const s=e.HIERARCHY;return s&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=s,n=s),n?function(t,e){let r,n,s;const i=t.instancesLength,o=t.classes;let a,c=t.classIds,u=t.parentCounts,A=t.parentIds,h=i;Mt(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,s=getBinaryAccessor(c),c=s.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,i));if(Mt(u))for(Mt(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,s=getBinaryAccessor(u),u=s.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,i)),a=new Uint16Array(i),h=0,r=0;r<i;++r)a[r]=h,h+=u[r];Mt(A)&&Mt(A.byteOffset)&&(A.componentType=defaultValue(A.componentType,GL.UNSIGNED_SHORT),A.type=AttributeType.SCALAR,s=getBinaryAccessor(A),A=s.createArrayBufferView(e.buffer,e.byteOffset+A.byteOffset,h));const f=o.length;for(r=0;r<f;++r){const t=o[r].length,n=o[r].instances,s=getBinaryProperties(t,n,e);o[r].instances=combine(s,n)}const B=new Array(f).fill(0),l=new Uint16Array(i);for(r=0;r<i;++r)n=c[r],l[r]=B[n],++B[n];const d={classes:o,classIds:c,classIndexes:l,parentCounts:u,parentIndexes:a,parentIds:A};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)Ot(t,r,stack)}(d),d}(n,r):null}function Gt(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,s=t.parentCounts,i=t.parentIds,o=t.parentIndexes,a=n.length,c=scratchVisited;c.length=Math.max(c.length,a);const u=++marker,A=scratchStack;A.length=0,A.push(e);for(;A.length>0;){if(e=A.pop(),c[e]===u)continue;c[e]=u;const n=r(t,e);if(Mt(n))return n;const a=s[e],h=o[e];for(let t=0;t<a;++t){const r=i[h+t];r!==e&&A.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const s=r(t,e);if(Mt(s))return s;const i=t.parentIds[e];n=i!==e,e=i}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function Ot(t,e,r){const n=t.parentCounts,s=t.parentIds,i=t.parentIndexes,o=t.classIds.length;if(!Mt(s))return;assert(e<o,`Parent index ${e} exceeds the total number of instances: ${o}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Mt(n)?n[e]:1,c=Mt(n)?i[e]:e;for(let n=0;n<a;++n){const i=s[c+n];i!==e&&Ot(t,i,r)}r.pop(e)}function Dt(t){return null!=t}const wt=(t,e)=>t,Rt={HIERARCHY:!0,extensions:!0,extras:!0};class Jt{constructor(t,e,r,n={}){var s;I(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(s=this.json)||void 0===s?void 0:s.extensions)||{},this._properties={};for(const t in this.json)Rt[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Tt(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),I("string"==typeof e,e),this._hierarchy){return Dt(Gt(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return I("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),I("string"==typeof e,e),Dt(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=Dt(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),I("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(Dt(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(Dt(r))return wt(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(Dt(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),I("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let s=this._properties[e];Dt(s)||(this._properties[e]=new Array(n),s=this._properties[e]),s[t]=wt(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;I(this.binary,`Property ${t} requires a batch table binary.`),I(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:s}=t;I(t.componentType);const i="string"==typeof s?gt.fromName(s):s,o=pt[t.type],a=It[t.type],c=Ft[t.type];return r+=t.byteOffset,{values:gt.createTypedArray(i,e,r,o*n),type:i,size:o,unpacker:a,packer:c}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=Gt(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return Dt(t.classes[n].instances[e])});return Dt(r)}_getPropertyNamesInHierarchy(t,e){Gt(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n].instances;for(const t in s)s.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return Gt(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],s=t.classes[n],i=t.classIndexes[r],o=s.instances[e];return Dt(o)?Dt(o.typedArray)?this._getBinaryProperty(o,i):wt(o[i]):null})}_setHierarchyProperty(t,e,r,n){const s=Gt(this._hierarchy,e,(t,s)=>{const i=t.classIds[s],o=t.classes[i],a=t.classIndexes[s],c=o.instances[r];return!!Dt(c)&&(I(s===e,`Inherited property "${r}" is read-only.`),Dt(c.typedArray)?this._setBinaryProperty(c,a,n):c[a]=wt(n),!0)});return Dt(s)}}function Ut(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Ht(t,e,r){const n=new DataView(e);let s;t.header=t.header||{};let i=n.getUint32(r,!0);r+=4;let o=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let c=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,s=i,a=o,c=0,i=0,o=0,console.warn("b3dm tile in legacy format.")):c>=570425344&&(r-=4,s=a,a=i,c=o,i=0,o=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=i,t.header.featureTableBinaryByteLength=o,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=c,t.header.batchLength=s,r}function St(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:s,featureTableBinaryByteLength:i,batchLength:o}=t.header;if(t.featureTableJson={BATCH_LENGTH:o||0},s>0){const n=F(e,r,s);t.featureTableJson=JSON.parse(n)}return r+=s,t.featureTableBinary=new Uint8Array(e,r,i),r+=i}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:s,batchTableBinaryByteLength:i}=t.header;if(s>0){const n=F(e,r,s);t.batchTableJson=JSON.parse(n),r+=s,i>0&&(t.batchTableBinary=new Uint8Array(e,r,i),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=i)}return r}(t,e,r)}function Lt(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,s=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=s<<3,e}function Nt(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:s,pointCount:i}=t;if(n&&r){const t=new Uint8ClampedArray(3*i);for(let e=0;e<i;e++){const s=n[e],i=r.getProperty(s,"dimensions").map(t=>255*t);t[3*e]=i[0],t[3*e+1]=i[1],t[3*e+2]=i[2]}return{type:Ct.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(s){const t=new Uint8ClampedArray(3*i);for(let r=0;r<i;r++){const n=Lt(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:Ct.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*i?{type:Ct.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:Ct.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var _t=r(18),vt=r(3),Pt=r(1),jt=r(9),xt=r(8);class Kt extends _t.a{constructor(t=0,e=0){super(2),Object(vt.e)(t)&&1===arguments.length?this.copy(t):(vt.b.debug&&(Object(Pt.a)(t),Object(Pt.a)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return vt.b.debug&&(Object(Pt.a)(t.x),Object(Pt.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return jt.d(this,this,t),this.check()}transformAsVector(t){return Object(xt.a)(this,this,t),this.check()}transformByMatrix3(t){return jt.c(this,this,t),this.check()}transformByMatrix2x3(t){return jt.b(this,this,t),this.check()}transformByMatrix2(t){return jt.a(this,this,t),this.check()}}var Qt=r(42);function kt(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new Kt,new mt.a,new Kt,new Kt,new Uint8Array(1);function Xt(t,e=255){return Object(vt.a)(t,0,e)/e*2-1}function Yt(t){return t<0?-1:1}function Vt(t,e,r,n){if(kt(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=Xt(t,r),n.y=Xt(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*Yt(t),n.y=(1-Math.abs(t))*Yt(n.y)}return n.normalize()}function Wt(t,e,r){return Vt(t,e,255,r)}const Zt=new mt.a;function qt(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new mt.a,n=new Float32Array(3*t.pointCount);for(let s=0;s<t.pointCount;s++)r.set(e[3*s],e[3*s+1],e[3*s+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*s);return n}(t,e)):{type:Ct.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function zt(t,e,r,n,s){r=St(t,e,r=Ht(t,e,r=Ut(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:i,batchTable:o}=function(t){const e=new Et(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",Ct.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:s,batchTableBinary:i}=t;r=new Jt(s,i,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,s){let i,o,a;const c=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];c&&(a=c.properties);const u=e.getExtension("3DTILES_draco_point_compression");if(u){o=u.properties;const e=u.byteOffset,r=u.byteLength;if(!o||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");i=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(o.POSITION),t.hasColors=Number.isFinite(o.RGB)||Number.isFinite(o.RGBA),t.hasNormals=Number.isFinite(o.NORMAL),t.hasBatchIds=Number.isFinite(o.BATCH_ID),t.isTranslucent=Number.isFinite(o.RGBA)}if(!i)return!0;const A={buffer:i,properties:{...o,...a},featureTableProperties:o,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:s}=n,i={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete i["3d-tiles"];const o=await s(e.buffer,lt,i),a=o.attributes.POSITION&&o.attributes.POSITION.value,c=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,u=o.attributes.NORMAL&&o.attributes.NORMAL.value,A=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,h=a&&o.attributes.POSITION.value.quantization,f=u&&o.attributes.NORMAL.value.quantization;if(h){const e=o.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new mt.a(r,r,r),t.quantizedVolumeOffset=new mt.a(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}f&&(t.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const B={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))o.attributes[t]&&o.attributes[t].value&&(B[t.toLowerCase()]=o.attributes[t].value);t.attributes={positions:a,colors:Nt(t,c),normals:u,batchIds:A,...B}}(t,A,n,s)}(t,i,0,n,s),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",Ct.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",Ct.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Ct.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Ct.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=qt(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,i,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",Ct.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",Ct.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",Ct.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Nt(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",Ct.UNSIGNED_BYTE,4))}(t,i,o),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",Ct.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",Ct.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)Wt(e[2*n],e[2*n+1],Zt),Zt.toArray(r,3*n);return{type:Ct.FLOAT,size:2,value:r}}return{type:Ct.FLOAT,size:2,value:e}}(t,r)}}(t,i),r}var $t=r(11);const{_parseImageNode:te}=globalThis,ee="undefined"!=typeof Image,re="undefined"!=typeof ImageBitmap,ne=Boolean(te),se=!!$t.a||ne;function ie(t){const e=ae(t);if(!e)throw new Error("Not an image");return e}function oe(t){switch(ie(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function ae(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const ce=/^data:image\/svg\+xml/,ue=/\.svg((\?|#).*)?$/;function Ae(t){return t&&(ce.test(t)||ue.test(t))}function he(t,e){if(Ae(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function fe(t,e,r){const n=function(t,e){if(Ae(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return he(t,e)}(t,r),s=self.URL||self.webkitURL,i="string"!=typeof n&&s.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(i||n,e)}finally{i&&s.revokeObjectURL(i)}}const Be={};let le=!0;async function de(t,e,r){let n;if(Ae(r)){n=await fe(t,e,r)}else n=he(t,r);const s=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||Be)return!1;return!0}(e)&&le||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),le=!1}return await createImageBitmap(t)}(n,s)}function Ce(t){const e=me(t);return function(t){const e=me(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=me(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let s=2;for(;s+9<e.byteLength;){const t=e.getUint16(s,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(s+5,!1),width:e.getUint16(s+7,!1)};if(!r.has(t))return null;s+=2,s+=e.getUint16(s,!1)}return null}(e)||function(t){const e=me(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=me(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function me(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const be={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.3",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(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:s}=r||{};let i;switch(function(t){switch(t){case"auto":case"data":return function(){if(re)return"imagebitmap";if(ee)return"image";if(se)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return re||ee||se;case"imagebitmap":return re;case"image":return ee;case"data":return se;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":i=await de(t,e,s);break;case"image":i=await fe(t,e,s);break;case"data":i=await async function(t,e){const{mimeType:r}=Ce(t)||{},n=globalThis._parseImageNode;return I(n),await n(t,r)}(t);break;default:I(!1)}return"data"===n&&(i=oe(i)),i},tests:[t=>Boolean(Ce(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};function ye(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let s="";for(let t=0;t<r;t++)s+=String.fromCharCode(n.getUint8(e+t));return s}function ge(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${function(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ye(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return ye(t,0,e)}return""}(t)}"`)}}r(20);function Ee(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}function pe(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Ie(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function Fe(t,e,r){const n=t.bufferViews[r];pe(n);const s=e[n.buffer];pe(s);const i=(n.byteOffset||0)+s.byteOffset;return new Uint8Array(s.arrayBuffer,i,n.byteLength)}function Me(t,e){return I(t>=0),I(e>0),t+(e-1)&~(e-1)}function Te(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+Me(n.byteLength,4)}const Ge=["SCALAR","VEC2","VEC3","VEC4"],Oe=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],De=new Map(Oe),we={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},Je={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Ue(t){return Ge[t-1]||Ge[0]}function He(t){const e=De.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function Se(t,e){const r=Je[t.componentType],n=we[t.type],s=Re[t.componentType],i=t.count*n,o=t.count*n*s;return pe(o>=0&&o<=e.byteLength),{ArrayType:r,length:i,byteLength:o}}function Le(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ne={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class _e{constructor(t){Le(this,"gltf",void 0),Le(this,"sourceBuffers",void 0),Le(this,"byteLength",void 0),this.gltf=t||{json:{...Ne},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(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];pe(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:s}=Se(t,e);return new n(r,e.byteOffset+t.byteOffset,s)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return pe(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return pe(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:s=4}=t,i={primitives:[{attributes:this._addAttributes(e),mode:s}]};if(r){const t=this._addIndices(r);i.primitives[0].indices=t}return Number.isFinite(n)&&(i.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=Ce(t),n=e||(null==r?void 0:r.mimeType),s={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(t){const e=t.byteLength;pe(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Me(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:Ue(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const s={size:e.size,componentType:He(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(s,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),s=new Uint8Array(n);let i=0;for(const t of this.sourceBuffers||[])i=Te(t,s,i);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],s=this._getGltfAttributeName(r),i=this.addBinaryBuffer(n.value,n);e[s]=i}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.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 t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let s=0;s<e;s++)r.min[0+s]=Math.min(r.min[0+s],t[n+s]),r.max[0+s]=Math.max(r.max[0+s],t[n+s]);return r}}const ve="object"!=typeof WebAssembly,Pe=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]),je=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]),xe={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Ke={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};let Qe;async function ke(){return Qe||(Qe=async function(){let t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCE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6QFMAFREMAEMMMFBCUNMIT9tBB",console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(function(t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e[r]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let n=0;n<t.length;++n)e[r++]=e[n]<60?je[e[n]]:64*(e[n]-60)+e[++n];return e.buffer.slice(0,r)}(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}()),Qe}function Xe(t,e,r,n,s,i,o){const a=t.exports.sbrk,c=n+3&-4,u=a(c*s),A=a(i.length),h=new Uint8Array(t.exports.memory.buffer);h.set(i,A);const f=e(u,n,s,A,i.length);if(0===f&&o&&o(u,c,s),r.set(h.subarray(u,u+n*s)),a(u-a(0)),0!==f)throw new Error("Malformed buffer data: "+f)}const Ye="EXT_meshopt_compression";function Ve(t){if(new _e(t).getRequiredExtensions().includes("EXT_meshopt_compression")&&!ve)throw new Error("gltf: Required extension EXT_meshopt_compression not supported by browser")}async function We(t,e){var r;const n=new _e(t);if(null==e||null===(r=e.gltf)||void 0===r||!r.decompressMeshes)return;const s=[];for(const e of t.json.bufferViews||[])s.push(Ze(n,e));await Promise.all(s),n.removeExtension("EXT_meshopt_compression")}async function Ze(t,e){const r=t.getObjectExtension(e,"EXT_meshopt_compression");if(r){const t=e.buffer,{byteOffset:n=0,byteLength:s=0,byteStride:i,count:o,mode:a,filter:c="NONE"}=r,u=new Uint8Array(t,n,s),A=new ArrayBuffer(o*i);return await async function(t,e,r,n,s,i="NONE"){const o=await ke();Xe(o,o.exports[Ke[s]],t,e,r,n,o.exports[xe[i||"NONE"]])}(new Uint8Array(A),o,i,u,a,c),A}return null}const qe=["image/png","image/jpeg","image/gif"],ze={};function $e(t){return void 0===ze[t]&&(ze[t]=function(t){switch(t){case"image/webp":return function(){if(!$t.a)return!1;try{return 0===document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")}catch{return!1}}();case"image/svg":return $t.a;default:if(!$t.a){const{_parseImageNode:e}=globalThis;return Boolean(e)&&qe.includes(t)}return!0}}(t)),ze[t]}const tr="EXT_texture_webp";function er(t,e){const r=new _e(t);if(!$e("image/webp")){if(r.getRequiredExtensions().includes("EXT_texture_webp"))throw new Error("gltf: Required extension EXT_texture_webp not supported by browser");return}const{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"EXT_texture_webp");e&&(t.source=e.source),r.removeObjectExtension(t,"EXT_texture_webp")}r.removeExtension("EXT_texture_webp")}const rr="KHR_texture_basisu";function nr(t,e){const r=new _e(t),{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"KHR_texture_basisu");e&&(t.source=e.source),r.removeObjectExtension(t,"KHR_texture_basisu")}r.removeExtension("KHR_texture_basisu")}function sr(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:Ue(r),componentType:He(e)}}const ir="KHR_draco_mesh_compression";function or(t,e,r){const n=new _e(t);for(const t of hr(n))n.getObjectExtension(t,"KHR_draco_mesh_compression")}async function ar(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const s=new _e(t),i=[];for(const t of hr(s))s.getObjectExtension(t,"KHR_draco_mesh_compression")&&i.push(ur(s,t,e,r));await Promise.all(i),s.removeExtension("KHR_draco_mesh_compression")}function cr(t,e={}){const r=new _e(t);for(const t of r.json.meshes||[])Ar(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function ur(t,e,r,n){const s=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!s)return;const i=t.getTypedArrayForBufferView(s.bufferView),o=Ee(i.buffer,i.byteOffset),{parse:a}=n,c={...r};delete c["3d-tiles"];const u=await a(o,lt,c,n),A=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=sr(n);e[r]=t}}return e}(u.attributes);for(const[r,n]of Object.entries(A))if(r in e.attributes){const s=e.attributes[r],i=t.getAccessor(s);null!=i&&i.min&&null!=i&&i.max&&(n.min=i.min,n.max=i.max)}e.attributes=A,u.indices&&(e.indices=sr(u.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Ar(t,e,r=4,n,s){var i;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const o=n.DracoWriter.encodeSync({attributes:t}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:t}),c=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:c,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(o),attributes:c}}}]}}function*hr(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}const fr="KHR_lights_punctual";async function Br(t){const e=new _e(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function lr(t){const e=new _e(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");pe(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}const dr="KHR_materials_unlit";async function Cr(t){const e=new _e(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function mr(t){const e=new _e(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}const br="KHR_techniques_webgl";async function yr(t){const e=new _e(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:s=[]}=t,i=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=i.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),s.forEach(t=>{t.program=r[t.program]}),s}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=Er(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function gr(t,e){}function Er(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const pr=[s,i,o,a,c,u,A];function Ir(t,e){var r;const n=(null==e||null===(r=e.gltf)||void 0===r?void 0:r.excludeExtensions)||{};return!(t in n&&!n[t])}const Fr={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Mr={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 Tr{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.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(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new _e(t),{json:r}=e;for(const t of r.images||[]){const r=e.getObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r),e.removeObjectExtension(t,"KHR_binary_glTF")}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in Fr)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const s=r[n];s.id=s.id||n;const i=t[e].length;t[e].push(s),this.idToIndexMap[e][n]=i}}}_convertObjectIdsToArrayIndices(t){for(const e in Fr)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=Mr[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const Gr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Or={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Dr={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},wr={magFilter:Dr.TEXTURE_MAG_FILTER,minFilter:Dr.TEXTURE_MIN_FILTER,wrapS:Dr.TEXTURE_WRAP_S,wrapT:Dr.TEXTURE_WRAP_T},Rr={[Dr.TEXTURE_MAG_FILTER]:Dr.LINEAR,[Dr.TEXTURE_MIN_FILTER]:Dr.NEAREST_MIPMAP_LINEAR,[Dr.TEXTURE_WRAP_S]:Dr.REPEAT,[Dr.TEXTURE_WRAP_]:Dr.REPEAT};class Jr{postProcess(t,e={}){const{json:r,buffers:n=[],images:s=[],baseUri:i=""}=t;return pe(r),this.baseUri=i,this.json=r,this.buffers=n,this.images=s,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,Or[r]),t.components=(n=t.type,Gr[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=Se(t,t.bufferView),s=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,i=e.arrayBuffer.slice(s,s+n);t.value=new r(i)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):Rr,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return wr[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let s=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(s+=t.byteOffset),t.data=new Uint8Array(n,s,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const Ur=1735152710;function Hr(t,e=0,r={}){const n=new DataView(t),{magic:s=Ur}=r,i=n.getUint32(e,!1);return i===s||i===Ur}function Sr(t,e,r=0,n={}){const s=new DataView(e),i=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(s,r+0),o=s.getUint32(r+4,!0),a=s.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:i,version:o,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){I(t.header.byteLength>20);const n=e.getUint32(r+0,!0),s=e.getUint32(r+4,!0);return r+=8,I(0===s),Lr(t,e,r,n),r+=n,r+=Nr(t,e,r,t.header.byteLength)}(t,s,r);case 2:return function(t,e,r,n){return I(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const s=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);switch(r+=8,i){case 1313821514:Lr(t,e,r,s);break;case 5130562:Nr(t,e,r,s);break;case 0:n.strict||Lr(t,e,r,s);break;case 1:n.strict||Nr(t,e,r,s)}r+=Me(s,4)}}(t,e,r,n),r+t.header.byteLength}(t,s,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function Lr(t,e,r,n){const s=new Uint8Array(e.buffer,r,n),i=new TextDecoder("utf8").decode(s);return t.json=JSON.parse(i),Me(n,4)}function Nr(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Me(n,4)}async function _r(t,e,r=0,n,s){var i,o,a,c;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!Hr(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=ge(e);else if(e instanceof ArrayBuffer){const s={};r=Sr(s,e,r,n.glb),pe("glTF"===s.type,"Invalid GLB magic string "+s.type),t._glb=s,t.json=s.json}else pe(!1,"GLTF: must be ArrayBuffer or string");const s=t.json.buffers||[];if(t.buffers=new Array(s.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const i=t.json.images||[];t.images=new Array(i.length).fill({})}(t,e,r,n),function(t,e={}){(new Tr).normalize(t,e)}(t,{normalize:null==n||null===(i=n.gltf)||void 0===i?void 0:i.normalize}),function(t,e={},r){const n=pr.filter(t=>Ir(t.name,e));for(const i of n){var s;null===(s=i.preprocess)||void 0===s||s.call(i,t,e,r)}}(t,n,s);const u=[];if(null!=n&&null!==(o=n.gltf)&&void 0!==o&&o.loadBuffers&&t.json.buffers&&await async function(t,e,r){const n=t.json.buffers||[];for(let o=0;o<n.length;++o){const a=n[o];if(a.uri){var s,i;const{fetch:n}=r;pe(n);const c=Ie(a.uri,e),u=await(null==r||null===(s=r.fetch)||void 0===s?void 0:s.call(r,c)),A=await(null==u||null===(i=u.arrayBuffer)||void 0===i?void 0:i.call(u));t.buffers[o]={arrayBuffer:A,byteOffset:0,byteLength:A.byteLength},delete a.uri}}}(t,n,s),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=function(t){const e=new Set,r=t.json.textures||[];for(const t of r)void 0!==t.source&&e.add(t.source);return Array.from(e).sort()}(t),s=t.json.images||[],i=[];for(const o of n)i.push(vr(t,s[o],o,e,r));return await Promise.all(i)}(t,n,s);u.push(e)}const A=async function(t,e={},r){const n=pr.filter(t=>Ir(t.name,e));for(const i of n){var s;await(null===(s=i.decode)||void 0===s?void 0:s.call(i,t,e,r))}}(t,n,s);return u.push(A),await Promise.all(u),null!=n&&null!==(c=n.gltf)&&void 0!==c&&c.postProcess?function(t,e){return(new Jr).postProcess(t,e)}(t,n):t}async function vr(t,e,r,n,s){const{fetch:i,parse:o}=s;let a;if(e.uri){const t=Ie(e.uri,n),r=await i(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=Fe(t.json,t.buffers,e.bufferView);a=Ee(r.buffer,r.byteOffset,r.byteLength)}pe(a,"glTF image has no data");const c=await o(a,be,{},s);t.images=t.images||[],t.images[r]=c}const Pr={name:"glTF",id:"gltf",module:"gltf",version:"3.1.0-alpha.3",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...Pr.options,...e}).gltf={...Pr.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await _r({},t,n,e,r)},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"}}};const jr=0,xr=1;function Kr(t,e,r,n){t.rotateYtoZ=!0;const s=t.byteOffset+t.byteLength-r;if(0===s)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Ee(e,r,s),t.gltfByteOffset=0,t.gltfByteLength=s,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function Qr(t,e,r,n){const s=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case jr:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case xr:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),s.loadGLTF){const{parse:e,fetch:s}=n;t.gltfUrl&&(t.gltfArrayBuffer=await s(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,Pr,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function kr(t,e,r,n,s){var i;r=function(t,e,r,n,s){r=Ut(t,e,r),r=Ht(t,e,r),r=St(t,e,r),r=Kr(t,e,r,n);const i=new Et(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=i.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3),r}(t,e,r,n),await Qr(t,xr,n,s);const o=null==t||null===(i=t.gltf)||void 0===i?void 0:i.extensions;return o&&o.CESIUM_RTC&&(t.rtcCenter=o.CESIUM_RTC.center),r}var Xr=r(44),Yr=r(45),Vr=r(43),Wr=r(6),Zr=r(2);Math.max(6378137,6378137,6356752.314245179);const qr=t=>t,zr=new mt.a;function $r(t,e,r=qr){return Object(vt.e)(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function tn(t,e,r=qr){return Object(vt.e)(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const en=new mt.a,rn=new mt.a,nn=new mt.a;const sn=new mt.a,on={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},an={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},cn={east:new mt.a,north:new mt.a,up:new mt.a,west:new mt.a,south:new mt.a,down:new mt.a},un=new mt.a,An=new mt.a,hn=new mt.a;function fn(t,e,r,n,s,i){const o=on[e]&&on[e][r];let a,c,u;Object(Wr.a)(o&&(!n||n===o));const A=sn.copy(s);if(Object(vt.c)(A.x,0,1e-14)&&Object(vt.c)(A.y,0,1e-14)){const t=Math.sign(A.z);a=un.fromArray(an[e]),"east"!==e&&"west"!==e&&a.scale(t),c=An.fromArray(an[r]),"east"!==r&&"west"!==r&&c.scale(t),u=hn.fromArray(an[n]),"east"!==n&&"west"!==n&&u.scale(t)}else{const{up:s,east:i,north:o}=cn;i.set(-A.y,A.x,0).normalize(),t.geodeticSurfaceNormal(A,s),o.copy(s).cross(i);const{down:h,west:f,south:B}=cn;h.copy(s).scale(-1),f.copy(i).scale(-1),B.copy(o).scale(-1),a=cn[e],c=cn[r],u=cn[n]}return i[0]=a.x,i[1]=a.y,i[2]=a.z,i[3]=0,i[4]=c.x,i[5]=c.y,i[6]=c.z,i[7]=0,i[8]=u.x,i[9]=u.y,i[10]=u.z,i[11]=0,i[12]=A.x,i[13]=A.y,i[14]=A.z,i[15]=1,i}const Bn=new mt.a,ln=new mt.a,dn=new mt.a,Cn=new mt.a,mn=new mt.a,bn=new mt.a;let yn;class gn{static get WGS84(){return yn=yn||new gn(6378137,6378137,6356752.314245179),yn}constructor(t=0,e=0,r=0){Object(Wr.a)(t>=0),Object(Wr.a)(e>=0),Object(Wr.a)(r>=0),this.radii=new mt.a(t,e,r),this.radiiSquared=new mt.a(t*t,e*e,r*r),this.radiiToTheFourth=new mt.a(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new mt.a(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new mt.a(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=Qt.a.EPSILON1,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=ln,n=dn,[,,s]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const i=Math.sqrt(r.dot(n));return n.scale(1/i),r.scale(s),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){bn.from(t);const r=this.scaleToGeodeticSurface(bn,Cn);if(!r)return;const n=this.geodeticSurfaceNormal(r,ln),s=mn;s.copy(bn).subtract(r);const i=Math.atan2(n.y,n.x),o=Math.asin(n.z),a=Math.sign(Zr.d(s,bn))*Zr.g(s);return tn([i,o,a],e,vt.b._cartographicRadians?qr:vt.f)}eastNorthUpToFixedFrame(t,e=new Vr.a){return fn(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,s=new Vr.a){return fn(this,t,e,r,n,s)}geocentricSurfaceNormal(t,e=[0,0,0]){return Bn.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=zr){return $r(t,e,vt.b._cartographicRadians?qr:vt.g)}(t),n=r[0],s=r[1],i=Math.cos(s);return Bn.set(i*Math.cos(n),i*Math.sin(n),Math.sin(s)).normalize(),Bn.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return Bn.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new mt.a){const{oneOverRadii:n,oneOverRadiiSquared:s,centerToleranceSquared:i}=e;en.from(t);const o=t.x,a=t.y,c=t.z,u=n.x,A=n.y,h=n.z,f=o*o*u*u,B=a*a*A*A,l=c*c*h*h,d=f+B+l,C=Math.sqrt(1/d);if(!Number.isFinite(C))return;const m=rn;if(m.copy(t).scale(C),d<i)return m.to(r);const b=s.x,y=s.y,g=s.z,E=nn;E.set(m.x*b*2,m.y*y*2,m.z*g*2);let p,I,F,M,T=(1-C)*t.len()/(.5*E.len()),G=0;do{T-=G,p=1/(1+T*b),I=1/(1+T*y),F=1/(1+T*g);const t=p*p,e=I*I,r=F*F;M=f*t+B*e+l*r-1;G=M/(-2*(f*(t*p)*b+B*(e*I)*y+l*(r*F)*g))}while(Math.abs(M)>Qt.a.EPSILON12);return en.scale([p,I,F]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Cn.from(t);const r=Cn.x,n=Cn.y,s=Cn.z,i=this.oneOverRadiiSquared,o=1/Math.sqrt(r*r*i.x+n*n*i.y+s*s*i.z);return Cn.multiplyScalar(o).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Cn.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Cn.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){Object(Wr.a)(Object(vt.c)(this.radii.x,this.radii.y,Qt.a.EPSILON15)),Object(Wr.a)(this.radii.z>0),Cn.from(t);const n=Cn.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Cn.set(0,0,n).to(r)}}async function En(t,e,r,n,s){return r=function(t,e,r,n,s){if(r=Ut(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Ht(t,e,r);const i=new DataView(e);if(t.gltfFormat=i.getUint32(r,!0),r=St(t,e,r+=4),r=Kr(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const o=new Et(t.featureTableJson,t.featureTableBinary),a=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=o.getGlobalProperty("RTC_CENTER",Ct.FLOAT,3);new Jt(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const s=[new Array(n),t._batchTable][0],i=new mt.a,o=new mt.a,a=new mt.a,c=new mt.a,u=new Xr.a,A=new Yr.a,h=new mt.a,f={},B=new Vr.a,l=[],d=[],C=new mt.a,m=new mt.a;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",Ct.FLOAT,3,r,i);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",Ct.UNSIGNED_SHORT,3,r,i);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Ct.FLOAT,3,C);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const s=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Ct.FLOAT,3,m);if(!s)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const o=65535;for(let e=0;e<3;e++)n[e]=n[e]/o*s[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");i.copy(n),f.translation=i,t.normalUp=e.getProperty("NORMAL_UP",Ct.FLOAT,3,r,l),t.normalRight=e.getProperty("NORMAL_RIGHT",Ct.FLOAT,3,r,d);const b=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",Ct.UNSIGNED_SHORT,2,l),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",Ct.UNSIGNED_SHORT,2,d),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(gn.WGS84.eastNorthUpToFixedFrame(i,B),B.getRotationMatrix3(u)):u.identity()}b&&(c.copy(o).cross(a).normalize(),u.setColumn(0,o),u.setColumn(1,a),u.setColumn(2,c)),A.fromMatrix3(u),f.rotation=A,h.set(1,1,1);const y=e.getProperty("SCALE",Ct.FLOAT,1,r);Number.isFinite(y)&&h.multiplyByScalar(y);const g=e.getProperty("SCALE_NON_UNIFORM",Ct.FLOAT,3,r,l);g&&h.scale(g),f.scale=h;let E=e.getProperty("BATCH_ID",Ct.UNSIGNED_SHORT,1,r);void 0===E&&(E=r);const p=(new Vr.a).fromQuaternion(f.rotation);B.identity(),B.translate(f.translation),B.multiplyRight(p),B.scale(f.scale);const I=B.clone();s[r]={modelMatrix:I,batchId:E}}t.instances=s}(t,o,0,a),r}(t,e,r,n),await Qr(t,t.gltfFormat,n,s),r}async function pn(t,e=0,r,n,s={}){switch(s.byteOffset=e,s.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),s.type){case E.COMPOSITE:return await async function(t,e,r,n,s,i){r=Ut(t,e,r);const o=new DataView(e);for(t.tilesLength=o.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const o={};t.tiles.push(o),r=await i(e,r,n,s,o)}return r}(s,t,e,r,n,pn);case E.BATCHED_3D_MODEL:return await kr(s,t,e,r,n);case E.INSTANCED_3D_MODEL:return await En(s,t,e,r,n);case E.POINT_CLOUD:return await zt(s,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+s.type)}}function In(t,e){if(!t)return null;if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=g,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return C;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return b;case"i3dm":case"b3dm":return m;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return d;case"ADD":case"add":return l;default:return t}}(t.refine),t}const Fn={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.1.0-alpha.3",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const s=e["3d-tiles"]||{};let i;i="auto"===s.isTileset?r.url&&-1!==r.url.indexOf(".json"):s.isTileset;t=i?await async function(t,e,r){var s;const i=JSON.parse((new TextDecoder).decode(t));return i.loader=e.loader||Fn,i.url=r.url,i.basePath=function(t){return n.dirname(t.url)}(i),i.root=function(t){const e=t.basePath,r=In(t.root,t),n=[];for(n.push(r);n.length>0;){const t=(n.pop()||{}).children||[];for(const r of t)In(r,{basePath:e}),n.push(r)}return r}(i),i.type=y,i.lodMetricType=g,i.lodMetricValue=(null===(s=i.root)||void 0===s?void 0:s.lodMetricValue)||0,i}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await pn(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};let Mn="";const Tn={};const Gn=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,On=t=>"undefined"!=typeof Blob&&t instanceof Blob,Dn=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,wn=/^([-\w.]+\/[-\w.+]+)/;function Rn(t){const e=wn.exec(t);return e?e[1]:t}function Jn(t){const e=Dn.exec(t);return e?e[1]:""}const Un=/\?.*/;function Hn(t){return t.replace(Un,"")}async function Sn(t){if(Gn(t))return t;const e={},r=function(t){return Gn(t)?t.headers["content-length"]||-1:On(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}(t);r>=0&&(e["content-length"]=String(r));const{url:n,type:s}=function(t){if(Gn(t)){const e=Hn(t.url||"");return{url:e,type:Rn(t.headers.get("content-type")||"")||Jn(e)}}return On(t)?{url:Hn(t.name||""),type:t.type||""}:"string"==typeof t?{url:Hn(t),type:Jn(t)}:{url:"",type:""}}(t);s&&(e["content-type"]=s);const i=await async function(t){if("string"==typeof t)return"data:,"+t.slice(0,5);if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const r=new FileReader;r.onload=e=>{var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},r.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return"data:base64,"+function(t){let e="";const r=new Uint8Array(t);for(let t=0;t<r.byteLength;t++)e+=String.fromCharCode(r[t]);return btoa(e)}(e)}return null}(t);i&&(e["x-first-bytes"]=i),"string"==typeof t&&(t=(new TextEncoder).encode(t));const o=new Response(t,{headers:e});return Object.defineProperty(o,"url",{value:n}),o}async function Ln(t,e){if("string"==typeof t){t=function(t){for(const e in Tn)if(t.startsWith(e)){const r=Tn[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${Mn}${t}`),t}(t);let r=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(r=e.fetch),await fetch(t,r)}return await Sn(t)}async function Nn(t,e){if(!e){const r=await async function(t){I(t);const e={Authorization:"Bearer "+t},r=await Ln("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){I(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let s=await Ln(""+n,{fetch:{headers:r}});if(!s.ok)throw new Error(s.statusText);let i=await s.json();if(s=await Ln(n+"/endpoint",{fetch:{headers:r}}),!s.ok)throw new Error(s.statusText);const o=await s.json();return i={...i,...o},i}(t,e),{type:n,url:s}=r;return I("3DTILES"===n&&s),r.headers={Authorization:"Bearer "+r.accessToken},r}const _n={...Fn,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return Nn(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=_n,Fn.parse(t,e,r)),options:{"cesium-ion":{...Fn.options["3d-tiles"],accessToken:null}}};function vn(t,e,r){if(!e)return r+12;const{magic:n,version:s=1,byteLength:i=12}=t;return I(Array.isArray(n)&&Number.isFinite(s)&&Number.isFinite(i)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,s,!0),e.setUint32(r+8,i,!0),r+=12}function Pn(t,e,r){t&&t.setUint32(e+8,r,!0)}function jn(t,e,r,n){return e=function(t,e,r,n){const s=Me(r.byteLength,n),i=s-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),s=new Uint8Array(r);n.set(s);for(let n=0;n<i;++n)t.setUint8(e+r.byteLength+n,32)}return e+=s}(t,e,(new TextEncoder).encode(r),n)}function xn(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r.charCodeAt(s));return e+n}function Kn(t,e,r,n){if(t)for(let s=0;s<n;s++)t.setUint8(e+s,r[s]);return e+n}const Qn={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function kn(t,e,r,n){const{featureTableJson:s=Qn}=t;let i=JSON.stringify(s);i=function(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let s="";for(let t=0;t<n;++t)s+=" ";return t+s}(i,4);const{featureTableJsonByteLength:o=i.length}=t,a=new ArrayBuffer(12),c=a.byteLength,u=r;return r+=vn(t={magic:p.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,o,!0),e.setUint32(r+4,c,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=xn(e,r,i,o),Pn(e,u,(r+=Kn(e,r,a,c))-u),r}function Xn(t,e,r,n){switch(I("string"==typeof t.type),t.type){case E.COMPOSITE:return function(t,e,r,n,s){const i=r;r+=vn(t={magic:p.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let i=0;i<t.tiles.length;++i)r+=s(t.tiles[i],e,r,n);return Pn(e,i,r-i),r}(t,e,r,n,Xn);case E.POINT_CLOUD:return kn(t,e,r);case E.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=0,batchTable:i}=t,o={BATCH_LENGTH:s},a=JSON.stringify(o),c=i?JSON.stringify(i):"",u=Me(a.length,8),A=c?Me(c.length,8):0,h=r;r=vn(t={magic:p.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,u,!0),e.setUint32(16,0,!0),e.setUint32(20,A,!0),e.setUint32(24,0,!0)),r=jn(e,r+=16,a,8),i&&(r=jn(e,r,c,8));const f=t.gltfEncoded;return f&&(r=Kn(e,r,f,f.byteLength)),Pn(e,h,r-h),r}(t,e,r);case E.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:s=1,gltfFormat:i=1,gltfUri:o=""}=t,a=o.length,c={INSTANCES_LENGTH:s,POSITION:new Array(3*s).fill(0)},u=JSON.stringify(c),A=u.length,h=r;return r=vn(t={magic:p.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,A,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,i,!0)),r+=20,r+=xn(e,r,u,A),Pn(e,h,(r+=xn(e,r,o,a))-h),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const Yn={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.1.0-alpha.3",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=Xn(t,null,0,e),n=new ArrayBuffer(r);return Xn(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}}},,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return A}));var n=r(18),s=r(3),i=r(1),o=r(2),a=r(8);const c=[0,0,0],u={};class A extends n.a{static get ZERO(){return u.ZERO=u.ZERO||Object.freeze(new A(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&Object(s.e)(t)?this.copy(t):(s.b.debug&&(Object(i.a)(t),Object(i.a)(e),Object(i.a)(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return s.b.debug&&(Object(i.a)(t.x),Object(i.a)(t.y),Object(i.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=Object(i.a)(t)}angle(t){return o.a(this,t)}cross(t){return o.c(this,this,t),this.check()}rotateX({radians:t,origin:e=c}){return o.i(this,this,e,t),this.check()}rotateY({radians:t,origin:e=c}){return o.j(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=c}){return o.k(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return o.m(this,this,t),this.check()}transformAsVector(t){return Object(a.c)(this,this,t),this.check()}transformByMatrix3(t){return o.l(this,this,t),this.check()}transformByMatrix2(t){return Object(a.b)(this,this,t),this.check()}transformByQuaternion(t){return o.n(this,this,t),this.check()}}},function(t,e,r){"use strict";e.a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(1),s=r(19),i=r(8),o=r(5),a=r(9),c=r(2),u=r(4);const A=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),f=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),B={};class l extends s.a{static get IDENTITY(){return B.IDENTITY=B.IDENTITY||Object.freeze(new l(A)),B.IDENTITY}static get ZERO(){return B.ZERO=B.ZERO||Object.freeze(new l(h)),B.ZERO}get INDICES(){return f}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,s,i,o,a,c,u,A,h,f,B,l,d){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this[9]=u,this[10]=A,this[11]=h,this[12]=f,this[13]=B,this[14]=l,this[15]=d,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c,u,A,h,f,B,l,d){return this[0]=t,this[1]=s,this[2]=c,this[3]=f,this[4]=e,this[5]=i,this[6]=u,this[7]=B,this[8]=r,this[9]=o,this[10]=A,this[11]=l,this[12]=n,this[13]=a,this[14]=h,this[15]=d,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(A)}fromQuaternion(t){return o.b(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:s,far:i}){return i===1/0?l._computeInfinitePerspectiveOffCenter(this,t,e,r,n,s):o.c(this,t,e,r,n,s,i),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,s,i){const o=2*i/(r-e),a=2*i/(s-n),c=(r+e)/(r-e),u=(s+n)/(s-n),A=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=c,t[9]=u,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=A,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),e=e||[0,0,0],r=r||[0,1,0],o.e(this,t,e,r),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:s=.1,far:i=500}){return o.g(this,t,e,r,n,s,i),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:s=500}){if(t>2*Math.PI)throw Error("radians");const i=t/2,o=r*Math.tan(i),a=o*e;return(new l).ortho({left:-a,right:a,bottom:-o,top:o,near:n,far:s})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:s=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return o.h(this,t,r,n,s),this.check()}determinant(){return o.a(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*s,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*s,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],s=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*s,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*s,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*s,t[8]=this[10]*i,t}transpose(){return o.o(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.f(this,t,this),this.check()}multiplyRight(t){return o.f(this,this,t),this.check()}rotateX(t){return o.j(this,this,t),this.check()}rotateY(t){return o.k(this,this,t),this.check()}rotateZ(t){return o.l(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return o.i(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?o.m(this,this,t):o.m(this,this,[t,t,t]),this.check()}translate(t){return o.n(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=u.n(e||[-0,-0,-0,-0],t,this),Object(n.b)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=a.d(e||[-0,-0],t,this);break;case 3:e=c.m(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=Object(i.a)(e||[-0,-0],t,this);break;case 3:e=Object(i.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(n.b)(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return Object(n.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return Object(n.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return Object(n.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return B}));var n=r(19),s=r(1),i=r(8),o=r(7),a=r(9),c=r(2);const u=Object.freeze([1,0,0,0,1,0,0,0,1]),A=Object.freeze([0,0,0,0,0,0,0,0,0]),h=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),f={};class B extends n.a{static get IDENTITY(){return f.IDENTITY=f.IDENTITY||Object.freeze(new B(u)),f.IDENTITY}static get ZERO(){return f.ZERO=f.ZERO||Object.freeze(new B(A)),f.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return h}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=s,this[5]=i,this[6]=o,this[7]=a,this[8]=c,this.check()}setRowMajor(t,e,r,n,s,i,o,a,c){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=s,this[5]=a,this[6]=r,this[7]=i,this[8]=c,this.check()}determinant(){return o.b(this)}identity(){return this.copy(u)}fromQuaternion(t){return o.c(this,t),this.check()}transpose(){return o.i(this,this),this.check()}invert(){return o.d(this,this),this.check()}multiplyLeft(t){return o.e(this,t,this),this.check()}multiplyRight(t){return o.e(this,this,t),this.check()}rotate(t){return o.f(this,this,t),this.check()}scale(t){return Array.isArray(t)?o.g(this,this,t):o.g(this,this,[t,t,t]),this.check()}translate(t){return o.h(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=a.c(e||[-0,-0],t,this);break;case 3:e=c.l(e||[-0,-0,-0],t,this);break;case 4:e=Object(i.d)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(s.b)(e,t.length),e}transformVector(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return Object(s.c)("Matrix3.transformVector"),this.transform(t,e)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return w}));var n=r(14),s=r(1),i=r(6),o=r(0),a=r(7),c=r(2),u=r(4);function A(){var t=new o.a(4);return o.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function f(t,e,r){var n=e[0],s=e[1],i=e[2],o=e[3],a=r[0],c=r[1],u=r[2],A=r[3];return t[0]=n*A+o*a+s*u-i*c,t[1]=s*A+o*c+i*a-n*u,t[2]=i*A+o*u+n*c-s*a,t[3]=o*A-n*a-s*c-i*u,t}function B(t,e,r,n){var s,i,a,c,u,A=e[0],h=e[1],f=e[2],B=e[3],l=r[0],d=r[1],C=r[2],m=r[3];return(i=A*l+h*d+f*C+B*m)<0&&(i=-i,l=-l,d=-d,C=-C,m=-m),1-i>o.b?(s=Math.acos(i),a=Math.sin(s),c=Math.sin((1-n)*s)/a,u=Math.sin(n*s)/a):(c=1-n,u=n),t[0]=c*A+u*l,t[1]=c*h+u*d,t[2]=c*f+u*C,t[3]=c*B+u*m,t}function l(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);var i=(s+1)%3,o=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*i+i]-e[3*o+o]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*i+o]-e[3*o+i])*r,t[i]=(e[3*i+s]+e[3*s+i])*r,t[o]=(e[3*o+s]+e[3*s+o])*r}return t}u.b,u.g,u.c,u.l;var d,C,m,b,y,g,E=u.a,p=u.k,I=u.d,F=u.i,M=u.h,T=u.m,G=u.j,O=(u.f,u.e,d=c.b(),C=c.e(1,0,0),m=c.e(0,1,0),function(t,e,r){var n=c.d(e,r);return n<-.999999?(c.c(d,C,e),c.f(d)<1e-6&&c.c(d,m,e),c.h(d,d),h(t,d,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c.c(d,e,r),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+n,G(t,t))});b=A(),y=A(),g=a.a();const D=[0,0,0,1];class w extends n.a{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return l(this,t),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}fromAxisRotation(t,e){return h(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=Object(s.a)(t)}get y(){return this[1]}set y(t){this[1]=Object(s.a)(t)}get z(){return this[2]}set z(t){this[2]=Object(s.a)(t)}get w(){return this[3]}set w(t){this[3]=Object(s.a)(t)}len(){return M(this)}lengthSquared(){return T(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return I(this,t)}rotationTo(t,e){return O(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return E(this,this,t),this.check()}calculateW(){var t,e,r,n,s;return t=this,r=(e=this)[0],n=e[1],s=e[2],t[0]=r,t[1]=n,t[2]=s,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-s*s)),this.check()}conjugate(){var t,e;return e=this,(t=this)[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],this.check()}invert(){var t,e,r,n,s,i,o,a;return t=this,r=(e=this)[0],n=e[1],s=e[2],i=e[3],a=(o=r*r+n*n+s*s+i*i)?1/o:0,t[0]=-r*a,t[1]=-n*a,t[2]=-s*a,t[3]=i*a,this.check()}lerp(t,e,r){return F(this,t,e,r),this.check()}multiplyRight(t,e){return Object(i.a)(!e),f(this,this,t),this.check()}multiplyLeft(t,e){return Object(i.a)(!e),f(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+o*a,t[1]=s*c+i*a,t[2]=i*c-s*a,t[3]=o*c-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c-i*a,t[1]=s*c+o*a,t[2]=i*c+n*a,t[3]=o*c-s*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],s=e[1],i=e[2],o=e[3],a=Math.sin(r),c=Math.cos(r);t[0]=n*c+s*a,t[1]=s*c-n*a,t[2]=i*c+o*a,t[3]=o*c-i*a}(this,this,t),this.check()}scale(t){return p(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=D,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return B(this,t,e,r),this.check()}transformVector4(t,e=t){return u.o(e,t,this),Object(s.b)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}}])}));
|
|
2
|
-
//# sourceMappingURL=dist.min.js.map
|