@geoscene/core 4.29.5 → 4.29.6

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.
Files changed (136) hide show
  1. package/arcade/serviceAreaMetaData.js +1 -1
  2. package/assets/geoscene/core/workers/RemoteClient.js +1 -1
  3. package/assets/geoscene/core/workers/chunks/02a8f0cc511b810d29dd.js +1 -1
  4. package/assets/geoscene/core/workers/chunks/0b2f4079142b4c2a4ddf.js +1 -1
  5. package/assets/geoscene/core/workers/chunks/26f1ec6ce2720bcc1202.js +1 -1
  6. package/assets/geoscene/core/workers/chunks/348bcc57b99a975902a8.js +1 -1
  7. package/assets/geoscene/core/workers/chunks/54c8eea3a70e92842c6a.js +1 -1
  8. package/assets/geoscene/core/workers/chunks/5db9739e00f15613d1ea.js +1 -1
  9. package/assets/geoscene/core/workers/chunks/71fed2917f4bee173836.js +1 -1
  10. package/assets/geoscene/core/workers/chunks/851de06c5980b9b7362a.js +1 -1
  11. package/assets/geoscene/core/workers/chunks/9d8ce7eec9d80a038477.js +1 -1
  12. package/assets/geoscene/core/workers/chunks/b139cf91bc148aa84419.js +1 -1
  13. package/assets/geoscene/core/workers/chunks/c527692694688a5b3b07.js +2 -4
  14. package/assets/geoscene/core/workers/chunks/c556644bb0cf88770939.js +1 -1
  15. package/assets/geoscene/core/workers/chunks/cf3d5bd2c9115a3e0b79.js +1 -1
  16. package/assets/geoscene/core/workers/chunks/eceaa46f622f6fa31128.js +1 -1
  17. package/assets/geoscene/core/workers/chunks/f59b5ea05caca8a1a398.js +1 -1
  18. package/assets/geoscene/core/workers/chunks/f60e5dd0e712cf32f782.js +1 -1
  19. package/assets/geoscene/themes/base/widgets/_BasemapGallery.scss +0 -1
  20. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  21. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  22. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  23. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  24. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  25. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  26. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  27. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  28. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  29. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  30. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  31. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  32. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  33. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  34. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  35. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  36. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  37. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  38. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  39. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  40. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  41. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  42. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  43. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  44. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  45. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  46. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  47. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  48. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  49. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  50. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  51. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  52. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  53. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  54. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  55. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  56. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  57. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  58. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  59. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  60. package/assets/geoscene/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  61. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
  62. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
  63. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
  64. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
  65. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
  66. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
  67. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
  68. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
  69. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
  70. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
  71. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
  72. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
  73. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
  74. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
  75. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
  76. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
  77. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
  78. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
  79. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
  80. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
  81. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
  82. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
  83. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
  84. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nb.json +1 -1
  85. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
  86. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
  87. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
  88. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
  89. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
  90. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
  91. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
  92. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
  93. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
  94. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
  95. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
  96. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
  97. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
  98. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
  99. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
  100. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
  101. package/assets/geoscene/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
  102. package/chunks/HUDMaterial.glsl.js +0 -1
  103. package/chunks/persistableUrlUtils.js +1 -1
  104. package/config.js +1 -1
  105. package/copyright.txt +1 -1
  106. package/core/devEnvironmentUtils.js +1 -1
  107. package/core/urlUtils.js +1 -1
  108. package/identity/IdentityManagerBase.js +1 -1
  109. package/identity/IdentityModal.js +1 -1
  110. package/layers/TileLayer.js +1 -1
  111. package/layers/VectorTileLayer.js +1 -1
  112. package/layers/support/arcgisLayerUrl.js +1 -1
  113. package/layers/support/arcgisLayers.js +1 -1
  114. package/package.json +1 -1
  115. package/portal/schemas/definitions.js +1 -1
  116. package/portal/support/urlUtils.js +1 -1
  117. package/request.js +1 -1
  118. package/rest/support/PlacesParameters.js +1 -1
  119. package/support/BasemapStyle.js +1 -1
  120. package/support/apiKeyUtils.js +1 -1
  121. package/support/basemapUtils.js +1 -1
  122. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  123. package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +0 -2
  124. package/widgets/Editor/EditorViewModel.js +1 -1
  125. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  126. package/widgets/Search/support/layerSearchUtils.js +1 -1
  127. package/assets/geoscene/core/workers/chunks/0af5d2f792b83f7dd0aa.js.LICENSE.txt +0 -5
  128. package/assets/geoscene/core/workers/chunks/5015d4fccf4854b9da1e.js.LICENSE.txt +0 -10
  129. package/assets/geoscene/core/workers/chunks/54c8eea3a70e92842c6a.js.LICENSE.txt +0 -16
  130. package/assets/geoscene/core/workers/chunks/804267fca0627d277286.js.LICENSE.txt +0 -5
  131. package/assets/geoscene/core/workers/chunks/87c4848dd48119fd75f9.js.LICENSE.txt +0 -5
  132. package/assets/geoscene/core/workers/chunks/8ec7475f19f8979dfaae.js.LICENSE.txt +0 -5
  133. package/assets/geoscene/core/workers/chunks/904b3e9c98e5de220650.js.LICENSE.txt +0 -11
  134. package/assets/geoscene/core/workers/chunks/c1f78653c70f6bde65b3.js.LICENSE.txt +0 -5
  135. package/assets/geoscene/core/workers/chunks/da21d31db537be097da9.js.LICENSE.txt +0 -5
  136. package/assets/geoscene/core/workers/chunks/e742cd41ab9b164ad974.js.LICENSE.txt +0 -5
@@ -277,7 +277,7 @@ return fallOffFunction(vv, vn, 0.1);
277
277
 
278
278
  fragBlur = b / w_total;
279
279
  }
280
- `),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>T,c:()=>x,d:()=>v,f:()=>b,g:()=>E,i:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.p)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.r)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.q)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("geoscene.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.q)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.m)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.geoscene.cn"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.geoscene.cn$/,n=/^qaext.geoscene.cn$/,s=/^[\w-]*\.mapsdevext.geoscene.cn$/,l=/^[\w-]*\.mapsqa.geoscene.cn$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,n,/^jsapps.esri.com$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.k)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`geoscene/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("geoscene.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.d)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.r)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.r)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.r)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.r)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.d)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.r)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.r)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.r)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.k)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("geoscene.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.geosceneTreeRendering&&(a.customMeta.geosceneTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.H)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.H)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.m)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.j)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.u)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.w)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.x)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.w)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.u)(Ae,Ae,Ee),n=(0,l.u)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.u)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.u)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.z)(ze,e,d),(0,l.u)(ze,ze,Ee),(0,l.v)(ze,ze),(0,l.C)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.u)(ze,s,Ee),(0,l.v)(Ye,ze),(0,l.y)(He,Ye,d),(0,l.z)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.r)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.r)(He,He,d,u),(0,l.A)(ze,ze),(0,l.B)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.u)(ze,ze,h)}}else{o.center=(0,l.r)(ze,s,c.wx,(r+t)/2);const e=(0,l.u)(ze,c.wx,Ee);(0,l.v)(e,e),o.halfSize=(0,l.r)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
280
+ `),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>T,c:()=>x,d:()=>v,f:()=>b,g:()=>E,i:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.p)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.r)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.q)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("geoscene.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.q)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.m)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.geoscene.cn","staticdev.geoscene.cn"):null!=t.match(n)||null!=t.match(l)?e.replace("static.geoscene.cn","staticqa.geoscene.cn"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.geoscene.cn$/,n=/^qaext.geoscene.cn$/,s=/^[\w-]*\.mapsdevext.geoscene.cn$/,l=/^[\w-]*\.mapsqa.geoscene.cn$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.geoscene.cn$/,a,n,/^jsapps.geoscene.cn$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.k)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`geoscene/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("geoscene.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.d)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.r)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.r)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.r)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.r)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.d)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.r)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.r)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.r)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.k)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("geoscene.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.geosceneTreeRendering&&(a.customMeta.geosceneTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.H)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.H)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.m)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.j)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.u)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.w)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.x)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.w)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.u)(Ae,Ae,Ee),n=(0,l.u)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.u)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.u)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.z)(ze,e,d),(0,l.u)(ze,ze,Ee),(0,l.v)(ze,ze),(0,l.C)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.u)(ze,s,Ee),(0,l.v)(Ye,ze),(0,l.y)(He,Ye,d),(0,l.z)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.r)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.r)(He,He,d,u),(0,l.A)(ze,ze),(0,l.B)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.u)(ze,ze,h)}}else{o.center=(0,l.r)(ze,s,c.wx,(r+t)/2);const e=(0,l.u)(ze,c.wx,Ee);(0,l.v)(e,e),o.halfSize=(0,l.r)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
281
281
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
282
282
  }`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.mC.Color:if(t.receiveShadows)return s(e),void r.code.add(n.Y`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.mC.LinearDepth:case i.mC.Shadow:case i.mC.ShadowHighlight:case i.mC.ShadowExcludeHighlight:return e.include(o.AX,t),s(e),l(e),c(e),void r.code.add(n.Y`void forwardLinearDepth() {
283
283
  linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
@@ -368,7 +368,7 @@ return proj * (view * vec4(pos, 1.0));
368
368
  ${i?m.Y`
369
369
  // Negated inputs are intentionally the first two arguments. The other way around the obfuscation in dpAdd() stopped
370
370
  // working for macOS 14+ and iOS 17+.
371
- // Issue: https://devtopia.esri.com/WebGIS/geoscene-js-api/issues/56280
371
+
372
372
  vec3 originDelta = dpAdd(-instanceModelOriginHi, -instanceModelOriginLo, viewOriginHi, viewOriginLo);
373
373
  return _pos - originDelta;`:"return vpos;"}
374
374
  }
@@ -1028,7 +1028,6 @@ return max(c.x, max(c.y, c.z));
1028
1028
  }`)}function n(e){e.include(a),e.code.add(o.Y`
1029
1029
  vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
1030
1030
  // workaround for artifacts in OSX using Intel Iris Pro
1031
- // see: https://devtopia.esri.com/WebGIS/geoscene-js-api/issues/10475
1032
1031
  vec3 internalMixed = internalColor * textureColor;
1033
1032
  vec3 allMixed = internalMixed * externalColor;
1034
1033
 
@@ -1051,7 +1050,6 @@ return max(c.x, max(c.y, c.z));
1051
1050
 
1052
1051
  float mixExternalOpacity(float internalOpacity, float textureOpacity, float externalOpacity, int mode) {
1053
1052
  // workaround for artifacts in OSX using Intel Iris Pro
1054
- // see: https://devtopia.esri.com/WebGIS/geoscene-js-api/issues/10475
1055
1053
  float internalMixed = internalOpacity * textureOpacity;
1056
1054
  float allMixed = internalMixed * externalOpacity;
1057
1055
 
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9232],{69232:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(20744),n=r(28176),l=r(48212),s=r(50420),i=r(13608),o=r(71068),c=r(83928),u=r(66668);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.K0)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.S)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.Ej)(e):null;return{title:null!=o&&r.name||(0,n.u8)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.as)(e).path}}}(e,a)),null==r)throw new t.c("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"},p="FeatureServer"===c,S="SceneServer"===c,b={parsedUrl:r,Constructor:null,layerId:p||S?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":f=null!=d?"FeatureLayer":await async function(e,a){return(await(0,u.S)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.S)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.S)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.Wr[e]&&(f=o.Wr[e])}}break}case"3DTilesServer":throw new t.c("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.S)(e,{customParameters:a});b.sourceJSON=r,"Oriented Imagery Layer"===r.type&&(f="OrientedImageryLayer")}break;default:f=h[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.I)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.S)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.S)(e),n=await(0,u.S)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.S)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);if(p&&(b.sublayerInfos=r.layerInfos,b.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)b.layers=r.layers,b.tables=r.tables,p&&r.layerInfos?.length&&(b.sublayerConstructorProvider=await async function(e){const a=[],r=[];if(e.forEach((e=>{const{type:t}=e;"Oriented Imagery Layer"===t?(a.push(t),r.push(w("OrientedImageryLayer"))):(a.push(t),r.push(w("FeatureLayer")))})),!r.length)return;const t=await Promise.all(r),n=new Map;return a.forEach(((e,a)=>{n.set(e,t[a])})),e=>n.get(e.type)}(r.layerInfos));else if(p||S){const e=r.layerInfos?.[0]??r.tableInfos?.[0];b.layerId=r.layers[0]?.id??r.tables[0]?.id,b.sourceJSON=e,p&&"Oriented Imagery Layer"===e?.type&&(f="OrientedImageryLayer")}}return b.Constructor=await w(f),b}(e.url,a),d={...e.properties,url:e.url};if(c.layers.length+c.tables.length===0)return null!=c.layerId&&(d.layerId=c.layerId),null!=c.sourceJSON&&(d.sourceJSON=c.sourceJSON),new c.Constructor(d);const h=new(0,(await Promise.all([r.e(5612),r.e(5076)]).then(r.bind(r,44080))).default)({title:c.parsedUrl.title});return await async function(e,a,r){function t(e,a,t,n){const l={...r,layerId:a,sublayerTitleMode:"service-name"};return null!=e&&(l.url=e),null!=t&&(l.sourceJSON=t),n(l)}const n=a.sublayerConstructorProvider;for(const{id:r,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,r),i=(s&&n?.(s))??a.Constructor,o=t(l,r,s,(e=>new i(e)));e.add(o)}if(a.tables.length){const r=await w("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=t(l,n,f(a.tableInfos,n),(e=>new r(e)));e.tables.add(s)}))}}(h,c,d),h}function f(e,a){return e?e.find((e=>e.id===a)):null}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function w(e){return(0,c.q[e])()}},50420:(e,a,r)=>{r.d(a,{S:()=>u});var t=r(47620),n=r(2600),l=r(20744),s=r(10860),i=r(48212),o=r(54872),c=r(9764);async function u(e,a){const r=(0,i.K0)(e);if(!r)throw new l.c("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.c)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.CE)(e)}return null}(e);null!=l&&(r.portal=new o.c({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.CE)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.CE)(e),null}}(u);if(!f?.url)throw new l.c("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.c)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.K0)(e);if(!r)throw new l.c("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.c)(t,r)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,o]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}},13608:(e,a,r)=>{r.d(a,{I:()=>n});var t=r(66668);async function n(e,a){const{loadContext:r,...n}=a||{},l=r?await r.fetchServiceMetadata(e,n):await(0,t.S)(e,n);u(l),i(l);const s={serviceJSON:l};if((l.currentVersion??0)<10.5)return s;const o=`${e}/layers`,c=r?await r.fetchServiceMetadata(o,n):await(0,t.S)(o,n);return u(c),i(c),s.layersJSON={layers:c.layers,tables:c.tables},s}function l(e){return"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}function s(e){return"Table"===e.type}function i(e){e.layers=e.layers?.filter(l),e.tables=e.tables?.filter(s)}function o(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function u(e){e.layers?.forEach(o),e.tables?.forEach(c)}},83928:(e,a,r)=>{r.d(a,{q:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3912)]).then(r.bind(r,48388))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(8644),r.e(5928)]).then(r.bind(r,10948))).default,CatalogLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(2848),r.e(5468),r.e(572),r.e(2907)]).then(r.bind(r,20324))).default,CSVLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1744)]).then(r.bind(r,79468))).default,DimensionLayer:async()=>(await Promise.all([r.e(5612),r.e(7832)]).then(r.bind(r,28320))).default,ElevationLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(8380)]).then(r.bind(r,47104))).default,FeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(8348)]).then(r.bind(r,672))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(6528)]).then(r.bind(r,92768))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(7988),r.e(7148),r.e(2672)]).then(r.bind(r,43984))).default,GroupLayer:async()=>(await Promise.all([r.e(5612),r.e(7456)]).then(r.bind(r,44080))).default,ImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(2848),r.e(6128),r.e(9056),r.e(3291)]).then(r.bind(r,7896))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(6128),r.e(7048),r.e(9056),r.e(5496)]).then(r.bind(r,82744))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(5612),r.e(9644),r.e(7024)]).then(r.bind(r,96584))).default,KMLLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(9032)]).then(r.bind(r,53688))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(5612),r.e(3536)]).then(r.bind(r,91884))).default,LinkChartLayer:async()=>(await Promise.all([r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(9512),r.e(3220),r.e(1512),r.e(6680),r.e(8080)]).then(r.bind(r,54192))).default,MapImageLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(1248),r.e(3089)]).then(r.bind(r,3089))).default,MapNotesLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(9516)]).then(r.bind(r,37784))).default,MediaLayer:async()=>(await Promise.all([r.e(5612),r.e(2364)]).then(r.bind(r,66664))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3160),r.e(8224)]).then(r.bind(r,56288))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(1244)]).then(r.bind(r,1244))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1740)]).then(r.bind(r,75432))).default,PointCloudLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(2296)]).then(r.bind(r,21680))).default,RouteLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(6352)]).then(r.bind(r,40900))).default,SceneLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(8624),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(7424),r.e(9780),r.e(8644),r.e(712)]).then(r.bind(r,3688))).default,StreamLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3460)]).then(r.bind(r,18e3))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(6556),r.e(5368),r.e(2608)]).then(r.bind(r,8444))).default,TileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(2968),r.e(1248),r.e(0)]).then(r.bind(r,5e4))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(5612),r.e(7752)]).then(r.bind(r,71316))).default,UnknownLayer:async()=>(await r.e(6584).then(r.bind(r,56584))).default,UnsupportedLayer:async()=>(await r.e(2456).then(r.bind(r,12456))).default,VectorTileLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(3780),r.e(6055),r.e(7936)]).then(r.bind(r,65632))).default,VoxelLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(8256)]).then(r.bind(r,59496))).default,WFSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(4808),r.e(3688)]).then(r.bind(r,53440))).default,WMSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(280)]).then(r.bind(r,85024))).default,WMTSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(4832)]).then(r.bind(r,54832))).default,WebTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632)]).then(r.bind(r,32896))).default}},66668:(e,a,r)=>{r.d(a,{S:()=>n});var t=r(2600);async function n(e,a){const{data:r}=await(0,t.c)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9232],{69232:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(20744),n=r(28176),l=r(48212),s=r(50420),i=r(13608),o=r(71068),c=r(83928),u=r(66668);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.K0)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.S)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.Ej)(e):null;return{title:null!=o&&r.name||(0,n.u8)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.as)(e).path}}}(e,a)),null==r)throw new t.c("arcgis-layers:url-mismatch","The url '${url}' is not a valid GeoScene resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"},p="FeatureServer"===c,S="SceneServer"===c,b={parsedUrl:r,Constructor:null,layerId:p||S?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":f=null!=d?"FeatureLayer":await async function(e,a){return(await(0,u.S)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.S)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.S)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.Wr[e]&&(f=o.Wr[e])}}break}case"3DTilesServer":throw new t.c("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.S)(e,{customParameters:a});b.sourceJSON=r,"Oriented Imagery Layer"===r.type&&(f="OrientedImageryLayer")}break;default:f=h[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.I)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.S)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.S)(e),n=await(0,u.S)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.S)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);if(p&&(b.sublayerInfos=r.layerInfos,b.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)b.layers=r.layers,b.tables=r.tables,p&&r.layerInfos?.length&&(b.sublayerConstructorProvider=await async function(e){const a=[],r=[];if(e.forEach((e=>{const{type:t}=e;"Oriented Imagery Layer"===t?(a.push(t),r.push(w("OrientedImageryLayer"))):(a.push(t),r.push(w("FeatureLayer")))})),!r.length)return;const t=await Promise.all(r),n=new Map;return a.forEach(((e,a)=>{n.set(e,t[a])})),e=>n.get(e.type)}(r.layerInfos));else if(p||S){const e=r.layerInfos?.[0]??r.tableInfos?.[0];b.layerId=r.layers[0]?.id??r.tables[0]?.id,b.sourceJSON=e,p&&"Oriented Imagery Layer"===e?.type&&(f="OrientedImageryLayer")}}return b.Constructor=await w(f),b}(e.url,a),d={...e.properties,url:e.url};if(c.layers.length+c.tables.length===0)return null!=c.layerId&&(d.layerId=c.layerId),null!=c.sourceJSON&&(d.sourceJSON=c.sourceJSON),new c.Constructor(d);const h=new(0,(await Promise.all([r.e(5612),r.e(5076)]).then(r.bind(r,44080))).default)({title:c.parsedUrl.title});return await async function(e,a,r){function t(e,a,t,n){const l={...r,layerId:a,sublayerTitleMode:"service-name"};return null!=e&&(l.url=e),null!=t&&(l.sourceJSON=t),n(l)}const n=a.sublayerConstructorProvider;for(const{id:r,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,r),i=(s&&n?.(s))??a.Constructor,o=t(l,r,s,(e=>new i(e)));e.add(o)}if(a.tables.length){const r=await w("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=t(l,n,f(a.tableInfos,n),(e=>new r(e)));e.tables.add(s)}))}}(h,c,d),h}function f(e,a){return e?e.find((e=>e.id===a)):null}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function w(e){return(0,c.q[e])()}},50420:(e,a,r)=>{r.d(a,{S:()=>u});var t=r(47620),n=r(2600),l=r(20744),s=r(10860),i=r(48212),o=r(54872),c=r(9764);async function u(e,a){const r=(0,i.K0)(e);if(!r)throw new l.c("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.c)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.CE)(e)}return null}(e);null!=l&&(r.portal=new o.c({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.CE)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.CE)(e),null}}(u);if(!f?.url)throw new l.c("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.c)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.K0)(e);if(!r)throw new l.c("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.c)(t,r)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,o]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}},13608:(e,a,r)=>{r.d(a,{I:()=>n});var t=r(66668);async function n(e,a){const{loadContext:r,...n}=a||{},l=r?await r.fetchServiceMetadata(e,n):await(0,t.S)(e,n);u(l),i(l);const s={serviceJSON:l};if((l.currentVersion??0)<10.5)return s;const o=`${e}/layers`,c=r?await r.fetchServiceMetadata(o,n):await(0,t.S)(o,n);return u(c),i(c),s.layersJSON={layers:c.layers,tables:c.tables},s}function l(e){return"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}function s(e){return"Table"===e.type}function i(e){e.layers=e.layers?.filter(l),e.tables=e.tables?.filter(s)}function o(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function u(e){e.layers?.forEach(o),e.tables?.forEach(c)}},83928:(e,a,r)=>{r.d(a,{q:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3912)]).then(r.bind(r,48388))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(8644),r.e(5928)]).then(r.bind(r,10948))).default,CatalogLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(2848),r.e(5468),r.e(572),r.e(2907)]).then(r.bind(r,20324))).default,CSVLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1744)]).then(r.bind(r,79468))).default,DimensionLayer:async()=>(await Promise.all([r.e(5612),r.e(7832)]).then(r.bind(r,28320))).default,ElevationLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(8380)]).then(r.bind(r,47104))).default,FeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(8348)]).then(r.bind(r,672))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(6528)]).then(r.bind(r,92768))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(7988),r.e(7148),r.e(2672)]).then(r.bind(r,43984))).default,GroupLayer:async()=>(await Promise.all([r.e(5612),r.e(7456)]).then(r.bind(r,44080))).default,ImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(2848),r.e(6128),r.e(9056),r.e(3291)]).then(r.bind(r,7896))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(6128),r.e(7048),r.e(9056),r.e(5496)]).then(r.bind(r,82744))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(5612),r.e(9644),r.e(7024)]).then(r.bind(r,96584))).default,KMLLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(9032)]).then(r.bind(r,53688))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(5612),r.e(3536)]).then(r.bind(r,91884))).default,LinkChartLayer:async()=>(await Promise.all([r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(9512),r.e(3220),r.e(1512),r.e(6680),r.e(8080)]).then(r.bind(r,54192))).default,MapImageLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(1248),r.e(3089)]).then(r.bind(r,3089))).default,MapNotesLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(9516)]).then(r.bind(r,37784))).default,MediaLayer:async()=>(await Promise.all([r.e(5612),r.e(2364)]).then(r.bind(r,66664))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3160),r.e(8224)]).then(r.bind(r,56288))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(1244)]).then(r.bind(r,1244))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1740)]).then(r.bind(r,75432))).default,PointCloudLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(2296)]).then(r.bind(r,21680))).default,RouteLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(6352)]).then(r.bind(r,40900))).default,SceneLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(8624),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(7424),r.e(9780),r.e(8644),r.e(712)]).then(r.bind(r,3688))).default,StreamLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3460)]).then(r.bind(r,18e3))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(6556),r.e(5368),r.e(2608)]).then(r.bind(r,8444))).default,TileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(2968),r.e(1248),r.e(0)]).then(r.bind(r,5e4))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(5612),r.e(7752)]).then(r.bind(r,71316))).default,UnknownLayer:async()=>(await r.e(6584).then(r.bind(r,56584))).default,UnsupportedLayer:async()=>(await r.e(2456).then(r.bind(r,12456))).default,VectorTileLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(3780),r.e(6055),r.e(7936)]).then(r.bind(r,65632))).default,VoxelLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(8256)]).then(r.bind(r,59496))).default,WFSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(4808),r.e(3688)]).then(r.bind(r,53440))).default,WMSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(280)]).then(r.bind(r,85024))).default,WMTSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(4832)]).then(r.bind(r,54832))).default,WebTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632)]).then(r.bind(r,32896))).default}},66668:(e,a,r)=>{r.d(a,{S:()=>n});var t=r(2600);async function n(e,a){const{data:r}=await(0,t.c)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6368],{24832:(e,t,r)=>{r.d(t,{O:()=>i});var s=r(6220),n=(r(2600),r(20744)),o=r(66360),a=r(28176);function i(e){if(!s.default.assetsPath)throw o.c.getLogger("geoscene.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://doc.geoscene.cn/javascript/4.29/api-reference/geoscene-config.html"),new n.c("assets:path-not-set","config.assetsPath is not set");return(0,a.kn)(s.default.assetsPath,e)}},2600:(e,t,r)=>{r.d(t,{c:()=>f});var s=r(6220),n=r(47620),o=r(20744),a=r(9456),i=r(62088),c=r(10860),l=r(28176),u=r(5604),d=r(20572),p=r(49628);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,l.a4)(t.query.toString().replaceAll("+"," ")));const i=(0,l.o9)(e),u=(0,l.ue)(e);u||i||(e=(0,l.k7)(e));const f={url:e,requestOptions:{...t}};let w=(0,l.OO)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=L("request:interceptor",e,t)}if((s instanceof Error||s instanceof o.c)&&(r=L("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(w,f);if(null!=e)return{data:e,getAllHeaders:S,getHeader:S,httpStatus:200,requestOptions:f.requestOptions,url:f.url};w.after||w.error||(w=null)}if(e=f.url,"image"===(t=f.requestOptions).responseType&&((0,a.c)("host-webworker")||(0,a.c)("host-node")))throw L("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),f);if("head"===t.method){if(t.body)throw L("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),f);if(i||u)throw L("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),f)}if(await async function(){(0,a.c)("host-webworker")&&!h&&(h=await r.e(5469).then(r.bind(r,75469)))}(),h)return h.execute(e,t);const y=new AbortController;(0,c.wD)(t,(()=>y.abort()));const b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:w,params:f,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,o=e.controller.signal,a=r.body;let i=null,l=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:o},(i||l)&&(e.fetchOptions.body=i||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.s)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!N(t)&&!(0,c.wv)(o)){let s;"immediate"===r.authMode?(await v(),s=await n.id.getCredential(t,{signal:o}),e.credential=s):"no-prompt"===r.authMode?(await v(),s=await n.id.getCredential(t,{prompt:!1,signal:o}).catch((()=>{})),e.credential=s):n.id&&(s=n.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await O(e)}while(!await C(e,t,r))}catch(r){const s=L("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const o=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.Yf)(o)){const e=(0,l.iK)(o,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,p.Ko)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&n.id){const e=n.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,a.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getAllHeaders:t?()=>Array.from(t.headers):S,getHeader:t?e=>t.headers.get(e):S,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(b);return w?.after?.(T),T}let h;const m=s.default.request,g="FormData"in globalThis,w=new Set([499,498,403,401]),y=new Set(["COM_0056","COM_0057","SB_0008"]),b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],S=()=>null,T=Symbol();function q(e){const t=(0,l.iK)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,l.Yf)(t)}function L(e,t,r,s){let n="Error";const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:S,getHeader:S,ssl:!1};if(t instanceof o.c)return t.details?(t.details=(0,i.ct)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,c.mA)(t)?(0,c.Uh)():new o.c(e,n,a)}async function v(){n.id||await Promise.all([r.e(9452),r.e(6712),r.e(7744),r.e(7144)]).then(r.bind(r,57592))}function N(e){return b.some((t=>t.test(e)))}async function O(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},o=(0,l.ue)(t)||(0,l.o9)(t),i=r.responseType||"json",d=o?0:null!=r.timeout?r.timeout:m.timeout;let h=!1;if(!o){e.useSSL&&(t=(0,l.ms)(t));let o={...r.query};e.credentialToken&&(o.token=e.credentialToken);let i=(0,l.GK)(o);(0,a.c)("geoscene-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const c=t.length+1+i.length;let d;h="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||c>m.maxUrlLength;const f=r.useProxy||!!(0,l.Gq)(t);if(f){const e=(0,l.CI)(t);d=e.path,!h&&d.length+1+c>m.maxUrlLength&&(h=!0),e.query&&(o={...e.query,...o})}if("HEAD"===s.method&&(h||f)){if(h){if(c>m.maxUrlLength)throw L("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw L("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw L("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(h?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.UP)(t,o):(s.body=(0,l.GK)(o),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.UP)(t,o),f&&(e.useProxy=!0,t=`${d}?${t}`),o.token&&g&&s.body instanceof FormData&&!(0,u.C)(t)&&s.body.set("token",o.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.OS)(t,(0,l.k3)()))if((0,l.Yf)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,p.yK)(t)&&await(0,p.y4)(h?(0,l.UP)(t,o):t))}let w,y,b=0,S=!1;d>0&&(b=setTimeout((()=>{S=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)y=s,y.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||h||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!o&&!e.useProxy&&m.proxyUrl&&!q(t)){if(f._beforeFetch&&await f._beforeFetch(t,s),w=await fetch(t,s),f._afterFetch&&await f._afterFetch(w),e.useProxy||function(e){const t=(0,l.iK)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)y=w;else if("HEAD"!==s.method)if(w.ok){switch(i){case"array-buffer":y=await w.arrayBuffer();break;case"blob":case"image":y=await w.blob();break;default:y=await w.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(y)switch(i){case"json":y=JSON.parse(y);break;case"xml":y=k(y,"application/xml");break;case"document":y=k(y,"text/html")}else y=null;if(y){if("array-buffer"===i||"blob"===i){const e=w.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===i&&y instanceof Blob&&(y=await U(URL.createObjectURL(y),e,!0))}}else{y=await w.text();try{y=JSON.parse(y)}catch{}}}else y=await U(t,e)}catch(s){if("AbortError"===s.name){if(S)throw(0,p.ol)();throw(0,c.Uh)("Request canceled")}if(!(!w&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||q(t))throw s;e.redoRequest=!0,(0,l.e8)({proxyUrl:m.proxyUrl,urlPrefix:(0,l.iK)(t)??""})}finally{b&&clearTimeout(b)}return[w,y]}function k(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function C(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[T]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[T]=r,o;let i,c=null;o&&(a=Number(o.code),c=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const l=s.authMode;if(403===a&&(4===c||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===a)&&void 0!==a&&w.has(a)&&!N(e.params.url)&&(403!==a||(!i||!y.has(i))&&(null==c||2===c&&e.credentialToken))){await v();try{const t=await n.id.getCredential(e.params.url,{error:L("request:server",o,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===l)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function U(e,t,r=!1){const s=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=m.priority,n.src=e,(0,p.wx)(n,e,r,s)}f._corsServers=["https://www.geosceneonline.cn"],f._beforeFetch=void 0,f._afterFetch=void 0},20572:(e,t,r)=>{r.d(t,{s:()=>o});var s=r(28176);const n=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function o(e){const t=(0,s.iK)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!n.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},49628:(e,t,r)=>{r.d(t,{Ko:()=>d,ol:()=>u,wx:()=>i,y4:()=>f,yK:()=>p});var s=r(6220),n=r(9456),o=r(10860),a=r(28176);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,o.wv)(s))return void i(c());let l=()=>{p(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;p(),a(t)},d=()=>{if(!e)return;const t=e;p(),t.src="",i(c())};const p=()=>{(0,n.c)("geoscene-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",u)),l=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,n.c)("geoscene-image-decode")?e.decode().then(u,l):(e.addEventListener("error",l),e.addEventListener("load",u))}))}function c(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const l="Timeout exceeded";function u(){return new Error(l)}function d(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.iK)(r)??""]=0:(t[(0,a.iK)("http://"+r)??""]=0,t[(0,a.iK)("https://"+r)??""]=0)}function p(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.iK)(e);if(r)return r=r.toLowerCase(),!(0,a.OS)(r,(0,a.k3)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.iK)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const n=(0,a.as)(e);e=n.path,"json"===n.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},96368:(e,t,r)=>{var s,n,o,a,i,c,l,u,d,p,f,h,m,g,w;r.r(t),r.d(t,{destroyWasm:()=>L,initialize:()=>v,process:()=>q}),function(e){e.U8="U8",e.I8="I8",e.U16="U16",e.I16="I16",e.U32="U32",e.I32="I32",e.F32="F32",e.F64="F64",e.Utf8String="Utf8String",e.NotSet="NotSet"}(s||(s={})),function(e){e.Png="Png",e.Jpeg="Jpeg",e.Dds="Dds",e.Raw="Raw",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Etc2="Etc2",e.Astc="Astc",e.Pvrtc="Pvrtc",e.NotSet="NotSet"}(n||(n={})),function(e){e.Rgb8="Rgb8",e.Rgba8="Rgba8",e.R8="R8",e.Bgr8="Bgr8",e.Bgra8="Bgra8",e.Rg8="Rg8",e.NotSet="NotSet"}(o||(o={})),function(e){e.Position="Position",e.Normal="Normal",e.TexCoord="TexCoord",e.Color="Color",e.Tangent="Tangent",e.FeatureIndex="FeatureIndex",e.UvRegion="UvRegion",e.NotSet="NotSet"}(a||(a={})),function(e){e.Opaque="Opaque",e.Mask="Mask",e.Blend="Blend"}(i||(i={})),function(e){e.None="None",e.Mask="Mask",e.Alpha="Alpha",e.PreMultAlpha="PreMultAlpha",e.NotSet="NotSet"}(c||(c={})),function(e){e.Points="Points",e.Lines="Lines",e.LineStrip="LineStrip",e.Triangles="Triangles",e.TriangleStrip="TriangleStrip",e.NotSet="NotSet"}(l||(l={})),function(e){e.None="None",e.WrapXBit="WrapXBit",e.WrapYBit="WrapYBit",e.WrapXy="WrapXy",e.NotSet="NotSet"}(u||(u={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NotSet="NotSet"}(d||(d={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NearestMipmapNearest="NearestMipmapNearest",e.LinearMipmapNearest="LinearMipmapNearest",e.NearestMipmapLinear="NearestMipmapLinear",e.LinearMipmapLinear="LinearMipmapLinear",e.NotSet="NotSet"}(p||(p={})),function(e){e.FeatureId="FeatureId",e.GlobalUid="GlobalUid",e.UnspecifiedDateTime="UnspecifiedDateTime",e.EcmaIso8601DateTime="EcmaIso8601DateTime",e.EcmaIso8601DateOnly="EcmaIso8601DateOnly",e.TimeOnly="TimeOnly",e.TimeStamp="TimeStamp",e.ColorRgb="ColorRgb",e.ColorRgba="ColorRgba",e.Unrecognized="Unrecognized",e.NotSet="NotSet"}(f||(f={})),function(e){e.Texture="Texture",e.VertexAtrb="VertexAtrb",e.Implicit="Implicit",e.NotSet="NotSet"}(h||(h={})),function(e){e.Front="Front",e.Back="Back",e.None="None",e.NotSet="NotSet"}(m||(m={})),function(e){e.Pbr="Pbr",e.Unlit="Unlit"}(g||(g={})),function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.MissingInputs=2]="MissingInputs"}(w||(w={}));var y=r(24832);function b(e){return(0,y.O)(`geoscene/libs/lyr3d/${e}`)}let S,T;async function q(e){if(await v(),e.inputs.length<1)return{result:{status:w.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]},transferList:[]};const t={ptrs:[],sizes:[]};for(const r of e.inputs){const e=T._malloc(r.byteLength);new Uint8Array(T.HEAPU8.buffer,e,r.byteLength).set(new Uint8Array(r)),t.ptrs.push(e),t.sizes.push(r.byteLength)}const r=T.process(e.jobDescJson,t,e.isMissingResourceCase),s=r.status===w.Succeeded&&r.data,n=r.status===w.MissingInputs&&r.missingInputUrls.length>0;if(s){const e=r.data.slice();r.data=e}else n&&(r.jobDescJson=r.jobDescJson.slice(0),r.originalInputs=e.inputs);for(let e=0;e<t.ptrs.length;++e)T._free(t.ptrs[e]);const o=[];if(s)o.push(r.data.buffer);else if(n)for(const t of e.inputs)o.push(t);return{result:r,transferList:o}}function L(){T&&(T.uninitialize_lyr3d_worker_wasm(),T=null)}function v(){return T?Promise.resolve():(S||(S=new Promise((e=>r.e(9496).then(r.bind(r,29496)).then((e=>e.l)).then((({default:t})=>{const r=t({locateFile:b,onRuntimeInitialized:()=>e(r)})})))).catch((e=>{throw e})).then((e=>{T=e,T.initialize_lyr3d_worker_wasm(),S=null}))),S)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6368],{24832:(e,t,r)=>{r.d(t,{O:()=>i});var s=r(6220),n=(r(2600),r(20744)),o=r(66360),a=r(28176);function i(e){if(!s.default.assetsPath)throw o.c.getLogger("geoscene.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://doc.geoscene.cn/javascript/4.29/api-reference/geoscene-config.html"),new n.c("assets:path-not-set","config.assetsPath is not set");return(0,a.kn)(s.default.assetsPath,e)}},2600:(e,t,r)=>{r.d(t,{c:()=>f});var s=r(6220),n=r(47620),o=r(20744),a=r(9456),i=r(62088),c=r(10860),l=r(28176),u=r(5604),d=r(20572),p=r(49628);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,l.a4)(t.query.toString().replaceAll("+"," ")));const i=(0,l.o9)(e),u=(0,l.ue)(e);u||i||(e=(0,l.k7)(e));const f={url:e,requestOptions:{...t}};let w=(0,l.OO)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=L("request:interceptor",e,t)}if((s instanceof Error||s instanceof o.c)&&(r=L("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(w,f);if(null!=e)return{data:e,getAllHeaders:S,getHeader:S,httpStatus:200,requestOptions:f.requestOptions,url:f.url};w.after||w.error||(w=null)}if(e=f.url,"image"===(t=f.requestOptions).responseType&&((0,a.c)("host-webworker")||(0,a.c)("host-node")))throw L("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),f);if("head"===t.method){if(t.body)throw L("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),f);if(i||u)throw L("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),f)}if(await async function(){(0,a.c)("host-webworker")&&!h&&(h=await r.e(5469).then(r.bind(r,75469)))}(),h)return h.execute(e,t);const y=new AbortController;(0,c.wD)(t,(()=>y.abort()));const b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:w,params:f,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,o=e.controller.signal,a=r.body;let i=null,l=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:o},(i||l)&&(e.fetchOptions.body=i||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.s)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!N(t)&&!(0,c.wv)(o)){let s;"immediate"===r.authMode?(await v(),s=await n.id.getCredential(t,{signal:o}),e.credential=s):"no-prompt"===r.authMode?(await v(),s=await n.id.getCredential(t,{prompt:!1,signal:o}).catch((()=>{})),e.credential=s):n.id&&(s=n.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await O(e)}while(!await C(e,t,r))}catch(r){const s=L("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const o=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.Yf)(o)){const e=(0,l.iK)(o,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,p.Ko)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&n.id){const e=n.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,a.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getAllHeaders:t?()=>Array.from(t.headers):S,getHeader:t?e=>t.headers.get(e):S,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(b);return w?.after?.(T),T}let h;const m=s.default.request,g="FormData"in globalThis,w=new Set([499,498,403,401]),y=new Set(["COM_0056","COM_0057","SB_0008"]),b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],S=()=>null,T=Symbol();function q(e){const t=(0,l.iK)(e);return!t||t.endsWith(".Grcgis.cn")||f._corsServers.includes(t)||(0,l.Yf)(t)}function L(e,t,r,s){let n="Error";const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:S,getHeader:S,ssl:!1};if(t instanceof o.c)return t.details?(t.details=(0,i.ct)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,c.mA)(t)?(0,c.Uh)():new o.c(e,n,a)}async function v(){n.id||await Promise.all([r.e(9452),r.e(6712),r.e(7744),r.e(7144)]).then(r.bind(r,57592))}function N(e){return b.some((t=>t.test(e)))}async function O(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},o=(0,l.ue)(t)||(0,l.o9)(t),i=r.responseType||"json",d=o?0:null!=r.timeout?r.timeout:m.timeout;let h=!1;if(!o){e.useSSL&&(t=(0,l.ms)(t));let o={...r.query};e.credentialToken&&(o.token=e.credentialToken);let i=(0,l.GK)(o);(0,a.c)("geoscene-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const c=t.length+1+i.length;let d;h="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||c>m.maxUrlLength;const f=r.useProxy||!!(0,l.Gq)(t);if(f){const e=(0,l.CI)(t);d=e.path,!h&&d.length+1+c>m.maxUrlLength&&(h=!0),e.query&&(o={...e.query,...o})}if("HEAD"===s.method&&(h||f)){if(h){if(c>m.maxUrlLength)throw L("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw L("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw L("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(h?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.UP)(t,o):(s.body=(0,l.GK)(o),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.UP)(t,o),f&&(e.useProxy=!0,t=`${d}?${t}`),o.token&&g&&s.body instanceof FormData&&!(0,u.C)(t)&&s.body.set("token",o.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.OS)(t,(0,l.k3)()))if((0,l.Yf)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,p.yK)(t)&&await(0,p.y4)(h?(0,l.UP)(t,o):t))}let w,y,b=0,S=!1;d>0&&(b=setTimeout((()=>{S=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)y=s,y.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||h||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!o&&!e.useProxy&&m.proxyUrl&&!q(t)){if(f._beforeFetch&&await f._beforeFetch(t,s),w=await fetch(t,s),f._afterFetch&&await f._afterFetch(w),e.useProxy||function(e){const t=(0,l.iK)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)y=w;else if("HEAD"!==s.method)if(w.ok){switch(i){case"array-buffer":y=await w.arrayBuffer();break;case"blob":case"image":y=await w.blob();break;default:y=await w.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(y)switch(i){case"json":y=JSON.parse(y);break;case"xml":y=k(y,"application/xml");break;case"document":y=k(y,"text/html")}else y=null;if(y){if("array-buffer"===i||"blob"===i){const e=w.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===i&&y instanceof Blob&&(y=await U(URL.createObjectURL(y),e,!0))}}else{y=await w.text();try{y=JSON.parse(y)}catch{}}}else y=await U(t,e)}catch(s){if("AbortError"===s.name){if(S)throw(0,p.ol)();throw(0,c.Uh)("Request canceled")}if(!(!w&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||q(t))throw s;e.redoRequest=!0,(0,l.e8)({proxyUrl:m.proxyUrl,urlPrefix:(0,l.iK)(t)??""})}finally{b&&clearTimeout(b)}return[w,y]}function k(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function C(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[T]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[T]=r,o;let i,c=null;o&&(a=Number(o.code),c=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const l=s.authMode;if(403===a&&(4===c||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===a)&&void 0!==a&&w.has(a)&&!N(e.params.url)&&(403!==a||(!i||!y.has(i))&&(null==c||2===c&&e.credentialToken))){await v();try{const t=await n.id.getCredential(e.params.url,{error:L("request:server",o,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===l)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function U(e,t,r=!1){const s=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=m.priority,n.src=e,(0,p.wx)(n,e,r,s)}f._corsServers=["https://www.geosceneonline.cn"],f._beforeFetch=void 0,f._afterFetch=void 0},20572:(e,t,r)=>{r.d(t,{s:()=>o});var s=r(28176);const n=new Set(["elevation3d.Grcgis.cn","js.Grcgis.cn","jsdev.Grcgis.cn","jsqa.Grcgis.cn","static.Grcgis.cn"]);function o(e){const t=(0,s.iK)(e,!0);return!!t&&t.endsWith(".Grcgis.cn")&&!n.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},49628:(e,t,r)=>{r.d(t,{Ko:()=>d,ol:()=>u,wx:()=>i,y4:()=>f,yK:()=>p});var s=r(6220),n=r(9456),o=r(10860),a=r(28176);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,o.wv)(s))return void i(c());let l=()=>{p(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;p(),a(t)},d=()=>{if(!e)return;const t=e;p(),t.src="",i(c())};const p=()=>{(0,n.c)("geoscene-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",u)),l=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,n.c)("geoscene-image-decode")?e.decode().then(u,l):(e.addEventListener("error",l),e.addEventListener("load",u))}))}function c(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const l="Timeout exceeded";function u(){return new Error(l)}function d(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.iK)(r)??""]=0:(t[(0,a.iK)("http://"+r)??""]=0,t[(0,a.iK)("https://"+r)??""]=0)}function p(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.iK)(e);if(r)return r=r.toLowerCase(),!(0,a.OS)(r,(0,a.k3)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.iK)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const n=(0,a.as)(e);e=n.path,"json"===n.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},96368:(e,t,r)=>{var s,n,o,a,i,c,l,u,d,p,f,h,m,g,w;r.r(t),r.d(t,{destroyWasm:()=>L,initialize:()=>v,process:()=>q}),function(e){e.U8="U8",e.I8="I8",e.U16="U16",e.I16="I16",e.U32="U32",e.I32="I32",e.F32="F32",e.F64="F64",e.Utf8String="Utf8String",e.NotSet="NotSet"}(s||(s={})),function(e){e.Png="Png",e.Jpeg="Jpeg",e.Dds="Dds",e.Raw="Raw",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Etc2="Etc2",e.Astc="Astc",e.Pvrtc="Pvrtc",e.NotSet="NotSet"}(n||(n={})),function(e){e.Rgb8="Rgb8",e.Rgba8="Rgba8",e.R8="R8",e.Bgr8="Bgr8",e.Bgra8="Bgra8",e.Rg8="Rg8",e.NotSet="NotSet"}(o||(o={})),function(e){e.Position="Position",e.Normal="Normal",e.TexCoord="TexCoord",e.Color="Color",e.Tangent="Tangent",e.FeatureIndex="FeatureIndex",e.UvRegion="UvRegion",e.NotSet="NotSet"}(a||(a={})),function(e){e.Opaque="Opaque",e.Mask="Mask",e.Blend="Blend"}(i||(i={})),function(e){e.None="None",e.Mask="Mask",e.Alpha="Alpha",e.PreMultAlpha="PreMultAlpha",e.NotSet="NotSet"}(c||(c={})),function(e){e.Points="Points",e.Lines="Lines",e.LineStrip="LineStrip",e.Triangles="Triangles",e.TriangleStrip="TriangleStrip",e.NotSet="NotSet"}(l||(l={})),function(e){e.None="None",e.WrapXBit="WrapXBit",e.WrapYBit="WrapYBit",e.WrapXy="WrapXy",e.NotSet="NotSet"}(u||(u={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NotSet="NotSet"}(d||(d={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NearestMipmapNearest="NearestMipmapNearest",e.LinearMipmapNearest="LinearMipmapNearest",e.NearestMipmapLinear="NearestMipmapLinear",e.LinearMipmapLinear="LinearMipmapLinear",e.NotSet="NotSet"}(p||(p={})),function(e){e.FeatureId="FeatureId",e.GlobalUid="GlobalUid",e.UnspecifiedDateTime="UnspecifiedDateTime",e.EcmaIso8601DateTime="EcmaIso8601DateTime",e.EcmaIso8601DateOnly="EcmaIso8601DateOnly",e.TimeOnly="TimeOnly",e.TimeStamp="TimeStamp",e.ColorRgb="ColorRgb",e.ColorRgba="ColorRgba",e.Unrecognized="Unrecognized",e.NotSet="NotSet"}(f||(f={})),function(e){e.Texture="Texture",e.VertexAtrb="VertexAtrb",e.Implicit="Implicit",e.NotSet="NotSet"}(h||(h={})),function(e){e.Front="Front",e.Back="Back",e.None="None",e.NotSet="NotSet"}(m||(m={})),function(e){e.Pbr="Pbr",e.Unlit="Unlit"}(g||(g={})),function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.MissingInputs=2]="MissingInputs"}(w||(w={}));var y=r(24832);function b(e){return(0,y.O)(`geoscene/libs/lyr3d/${e}`)}let S,T;async function q(e){if(await v(),e.inputs.length<1)return{result:{status:w.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]},transferList:[]};const t={ptrs:[],sizes:[]};for(const r of e.inputs){const e=T._malloc(r.byteLength);new Uint8Array(T.HEAPU8.buffer,e,r.byteLength).set(new Uint8Array(r)),t.ptrs.push(e),t.sizes.push(r.byteLength)}const r=T.process(e.jobDescJson,t,e.isMissingResourceCase),s=r.status===w.Succeeded&&r.data,n=r.status===w.MissingInputs&&r.missingInputUrls.length>0;if(s){const e=r.data.slice();r.data=e}else n&&(r.jobDescJson=r.jobDescJson.slice(0),r.originalInputs=e.inputs);for(let e=0;e<t.ptrs.length;++e)T._free(t.ptrs[e]);const o=[];if(s)o.push(r.data.buffer);else if(n)for(const t of e.inputs)o.push(t);return{result:r,transferList:o}}function L(){T&&(T.uninitialize_lyr3d_worker_wasm(),T=null)}function v(){return T?Promise.resolve():(S||(S=new Promise((e=>r.e(9496).then(r.bind(r,29496)).then((e=>e.l)).then((({default:t})=>{const r=t({locateFile:b,onRuntimeInitialized:()=>e(r)})})))).catch((e=>{throw e})).then((e=>{T=e,T.initialize_lyr3d_worker_wasm(),S=null}))),S)}}}]);