@arcgis/core 4.34.0-next.77 → 4.34.0-next.79

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 (125) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0668eee42b3169e1bf66.js → 03e5d1a00d85e4d16bff.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{e81386199a6db9a50fd3.js → 0914a52fb33af5d77fab.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{29a86d51407310bb7745.js → 09f1a27442bdd52cdeb7.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0bae29ffcbb812d3ba0d.js +1 -0
  6. package/assets/esri/core/workers/chunks/0dfc2ca36014910457ef.js +1 -0
  7. package/assets/esri/core/workers/chunks/{a0edff37fd4a3f2cb2eb.js → 1c7fffb496af6f2540dd.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7680d4d739f7aa3f7ae1.js → 20ae2316d927415f3df9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{54b1a960bb8c3fe05976.js → 2266a8f2c2ec37c19bb4.js} +1 -1
  10. package/assets/esri/core/workers/chunks/22bd4255b6b511a43b66.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9ce599dc1d385e6893c1.js → 22f196d173711ebd64c7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 23a13fbab9984953a7c6.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{3f7d7dc05e63fc50325e.js → 3c0990c4be06a2fd51e9.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d69bd6b5d781a6c527d1.js → 486ea51306c619238e41.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{cc7423413747566f56e2.js → 49cb78c85de0102e5f02.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{b9e725d2b5a7d0132663.js → 5610dfde4e636e2333a9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{5ed381a268855bcad072.js → 56edb55b53779e7fd31e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{bccecd678faff927ac76.js → 5b35b30495145bf8dd5d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/5c1cdc2ec06c4c6bd0b3.js +1 -0
  20. package/assets/esri/core/workers/chunks/{3452ba299f6ce0582f09.js → 5dee8c0c60ced791e57f.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{3f523bc8551e712c9bd4.js → 637a5293e36f4f7f2853.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3505988ce3839cdbbc98.js → 651b9144abb1895cc510.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{9e3164bf8872d7b1b191.js → 66e0bc4acb18f00a433d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{afa3ca2bd2648774f133.js → 6e2a3abc3dbc342212c4.js} +1 -1
  25. package/assets/esri/core/workers/chunks/6e4ec9fa931c69e4e4ba.js +1 -0
  26. package/assets/esri/core/workers/chunks/6e5175b43220d6692263.js +1 -0
  27. package/assets/esri/core/workers/chunks/{cac5732f9dfece4bf2c5.js → 7402c2853f6aed8d1bc7.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{49e6202da7a20f06c661.js → 76db75337044de8218c9.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{b97f224972f1b1abaee8.js → 79a9f47dfa9ebabb5dbd.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{d1657a29321adb259166.js → 86378d4f4d7f9a370c22.js} +1 -1
  31. package/assets/esri/core/workers/chunks/86832d94190150c70c11.js +1 -0
  32. package/assets/esri/core/workers/chunks/{d89832617bac4890893e.js → 885a398de8a33d36c59e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/88d8ff0140f5ea97c6b7.js +1 -0
  34. package/assets/esri/core/workers/chunks/{5248581d23ada240c78d.js → 8cae725e631d922853c8.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{0b69d251961d8b46fe30.js → 9346437b152b20bdcf8a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{a05a7df07b74e1957538.js → 9673e25114fc1897460d.js} +1 -1
  37. package/assets/esri/core/workers/chunks/96e483db7dd1f5dbb07a.js +1 -0
  38. package/assets/esri/core/workers/chunks/9789f178ece126c4006d.js +1 -0
  39. package/assets/esri/core/workers/chunks/9a0b9d931c1a29e81475.js +1 -0
  40. package/assets/esri/core/workers/chunks/{feed74ed275f21a68a1b.js → 9c5dcef2a75d4bb9b3d6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/a7fcb60d5a9d2d9560e4.js +1 -0
  42. package/assets/esri/core/workers/chunks/aa84775399420e35c6a5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{8b7f6f2d1692b6b6dbd5.js → ae6066ea6cb373dc6db3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ae8dce1a43ca7019f81d.js +1 -0
  45. package/assets/esri/core/workers/chunks/afb2770c4abbff9bab3d.js +1 -0
  46. package/assets/esri/core/workers/chunks/{a8a79a5c804ef715aa94.js → b4b26cc2ba3ff30e1d03.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{8a5e40f48a8265fd1b42.js → b78ea9cc4d5f2fd3d871.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{ce49ff6bf20cff349726.js → be8dd8e68c8805300ad1.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{b8d02f1b73c374767a5f.js → c78de6dd6c10280cee69.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{92d0e0155563c6355079.js → c90571063bd2bb57a5a7.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{930322c9790572bd0c49.js → d2fe403d6ab237bc89c2.js} +1 -1
  52. package/assets/esri/core/workers/chunks/d7adef4093ce19ad356d.js +1 -0
  53. package/assets/esri/core/workers/chunks/{b4ba7f8ea81522ad1e2e.js → da42cc4f6142846cb745.js} +1 -1
  54. package/assets/esri/core/workers/chunks/e080628ac6e1cf25dc72.js +1 -0
  55. package/assets/esri/core/workers/chunks/{8c94448a44fb27054a22.js → e760b8ca64d67c04d98a.js} +1 -1
  56. package/assets/esri/core/workers/chunks/edaf059c7ea18088c3dd.js +1 -0
  57. package/assets/esri/core/workers/chunks/{e7af5caab9aa9b6a12e3.js → ede479faa4e6920fe673.js} +3 -3
  58. package/assets/esri/core/workers/chunks/f9decc88561c03aca3c9.js +1 -0
  59. package/chunks/FocusAreaColor.glsl.js +5 -5
  60. package/config.js +1 -1
  61. package/core/NestedMap.js +1 -1
  62. package/interfaces.d.ts +57 -58
  63. package/intl/date.js +1 -1
  64. package/intl/number.js +1 -1
  65. package/kernel.js +1 -1
  66. package/layers/FeatureLayer.js +1 -1
  67. package/layers/support/DateTimeFieldFormat.js +5 -0
  68. package/layers/support/FieldConfiguration.js +5 -0
  69. package/layers/support/FieldFormat.js +5 -0
  70. package/layers/support/NumberFieldFormat.js +5 -0
  71. package/layers/support/fieldConfigUtils.js +5 -0
  72. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  73. package/package.json +5 -5
  74. package/rest/print.js +1 -1
  75. package/rest/support/AttributeBinsQuery.js +1 -1
  76. package/rest/support/Query.js +1 -1
  77. package/rest/support/QueryMixin.d.ts +2 -2
  78. package/rest/support/QueryMixin.js +5 -0
  79. package/rest/support/TopFeaturesQuery.js +1 -1
  80. package/support/arcadeExpressionUtils.js +1 -1
  81. package/support/revision.js +1 -1
  82. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  83. package/views/3d/FocusAreasView.js +1 -1
  84. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  85. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  86. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
  87. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  88. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  89. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  90. package/views/3d/webgl-engine/lib/GeometryBaseInstance.js +5 -0
  91. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  92. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  93. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  94. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  95. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  96. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  97. package/views/3d/webgl-engine/materials/renderers/PerBaseInstanceData.js +5 -0
  98. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  99. package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
  100. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  101. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  102. package/widgets/FeatureTable/Grid/Column.js +1 -1
  103. package/widgets/Legend.js +1 -1
  104. package/widgets/Popup.js +1 -1
  105. package/widgets/Search/SearchViewModel.js +1 -1
  106. package/widgets/Sketch/SketchViewModel.js +1 -1
  107. package/assets/esri/core/workers/chunks/25118304c9a914194e90.js +0 -1
  108. package/assets/esri/core/workers/chunks/3d6f07e04f77cc0a7506.js +0 -1
  109. package/assets/esri/core/workers/chunks/4f22e5a7f81883e8e5b6.js +0 -1
  110. package/assets/esri/core/workers/chunks/5102c20645d9708c34b4.js +0 -1
  111. package/assets/esri/core/workers/chunks/79e965e8f7cf822b4f45.js +0 -1
  112. package/assets/esri/core/workers/chunks/7b1fc59822ac2d421a5a.js +0 -1
  113. package/assets/esri/core/workers/chunks/83589cfcc443b925c1aa.js +0 -1
  114. package/assets/esri/core/workers/chunks/8f02349602b072186a1f.js +0 -1
  115. package/assets/esri/core/workers/chunks/9835c579edfc08125d31.js +0 -1
  116. package/assets/esri/core/workers/chunks/a7e649b3b02e664ada80.js +0 -1
  117. package/assets/esri/core/workers/chunks/adc61d88c3c6936ad75a.js +0 -1
  118. package/assets/esri/core/workers/chunks/ae7b86bd08a44e26b339.js +0 -1
  119. package/assets/esri/core/workers/chunks/bbb3b32affde9ea78534.js +0 -1
  120. package/assets/esri/core/workers/chunks/c35dad3d5ceaac6ad5a4.js +0 -1
  121. package/assets/esri/core/workers/chunks/c4b2678dd46fa1e22f7e.js +0 -1
  122. package/assets/esri/core/workers/chunks/cafc19bf2caaf7a8c2e8.js +0 -1
  123. package/assets/esri/core/workers/chunks/d2b69f91eb85b561fe01.js +0 -1
  124. package/assets/esri/core/workers/chunks/f6107f844f4feed42828.js +0 -1
  125. package/assets/esri/core/workers/chunks/fac020b6886ff2d75015.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2883],{1843:(e,t,r)=>{r.d(t,{BP:()=>u,l5:()=>h});var i=r(20498),n=r(13030),o=r(90239),a=r(4431),s=r(620),l=r(85079);class c{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 c(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class d{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:f(e[1].constructor)})))}freeze(){return this}get locations(){return(0,l.Xk)((0,a.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,s.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new c(this,e)}createView(e){return new c(this,e)}clone(){const e=new d;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(){return this._stride}get fields(){return this._fields}}function u(){return new d}class h{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const p=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function f(e){return g.get(e)}const g=new Map;p.forEach(e=>g.set(m(e),e))},2495:(e,t,r)=>{r.d(t,{$U:()=>Ee,fs:()=>Re,ty:()=>Ie});var i=r(38954),n=r(51850),o=r(49255),a=r(25634),s=r(11725),l=r(33524),c=r(70328),d=r(620);class u{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const h=(0,c.vt)();function p(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(S,n,r),l=(e,t,r)=>{a(e,r,t)},c=new u(!1,t.options.normalRequired);if(e.boundingInfo){(0,d.vA)(0===e.type);const i=t.tolerance;f(e.boundingInfo,r,s,i,o,c,l)}else{const t=e.attributes.get("position"),n=t.indices;!function(e,t,r,n,o,a,s,l,c,d){const u=t,h=E,p=Math.abs(u[0]),m=Math.abs(u[1]),f=Math.abs(u[2]),g=p>=m?p>=f?0:2:m>=f?1:2,w=g,b=u[w]<0?2:1,M=(g+b)%3,T=(g+(3-b))%3,C=u[M]/u[w],S=u[T]/u[w],A=1/u[w],R=v,I=_,F=x,{normalRequired:O}=c;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const c=s*o[r+1];(0,i.i)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.c)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(R,h[0],e),(0,i.a)(I,h[1],e),(0,i.a)(F,h[2],e);const p=R[M]-C*R[w],m=R[T]-S*R[w],f=I[M]-C*I[w],g=I[T]-S*I[w],v=F[M]-C*F[w],_=F[T]-S*F[w],x=v*g-_*f,b=p*_-m*v,E=f*m-g*p;if((x<0||b<0||E<0)&&(x>0||b>0||E>0))continue;const P=x+b+E;if(0===P)continue;const D=x*(A*R[w])+b*(A*I[w])+E*(A*F[w]);if(D*Math.sign(P)<0)continue;const N=D/P;N>=0&&d(N,t,O?y(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,c,l)}}const m=(0,n.vt)();function f(e,t,r,n,o,a,s){if(null==e)return;const l=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,m);if((0,c.Ne)(h,e.bbMin),(0,c.vI)(h,e.bbMax),null!=o&&o.applyToAabb(h),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(h,t,l,n)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>T){const i=e.getChildren();if(void 0!==i){for(const e of i)f(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,l,c,d){const u=e[0],h=e[1],p=e[2],m=t[0],f=t[1],v=t[2],{normalRequired:_}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let c=o[i],x=o[i+1],y=o[i+2];const b=a*n[r+1];let M=o[b],T=o[b+1],S=o[b+2];const E=a*n[r+2];let A=o[E],R=o[E+1],I=o[E+2];null!=l&&([c,x,y]=l.applyToVertex(c,x,y,e),[M,T,S]=l.applyToVertex(M,T,S,e),[A,R,I]=l.applyToVertex(A,R,I,e));const F=M-c,O=T-x,P=S-y,D=A-c,N=R-x,H=I-y,L=f*H-N*v,z=v*D-H*m,B=m*N-D*f,G=F*L+O*z+P*B;if(Math.abs(G)<=C)continue;const U=u-c,V=h-x,j=p-y,W=U*L+V*z+j*B;if(G>0){if(W<0||W>G)continue}else if(W>0||W<G)continue;const k=V*P-O*j,$=j*F-P*U,Z=U*O-F*V,q=m*k+f*$+v*Z;if(G>0){if(q<0||W+q>G)continue}else if(q>0||W+q<G)continue;const Y=(D*k+N*$+H*Z)/G;Y>=0&&d(Y,t,_?w(F,O,P,D,N,H,g):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,o,a,s)}}const g=(0,n.vt)();const v=(0,n.vt)(),_=(0,n.vt)(),x=(0,n.vt)();function w(e,t,r,n,o,a,s){return(0,i.i)(b,e,t,r),(0,i.i)(M,n,o,a),(0,i.h)(s,b,M),(0,i.n)(s,s),s}function y(e){return(0,i.a)(b,e[1],e[0]),(0,i.a)(M,e[2],e[0]),(0,i.h)(g,b,M),(0,i.n)(g,g),g}const b=(0,n.vt)(),M=(0,n.vt)(),T=1e3,C=1e-7,S=(0,n.vt)(),E=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var A=r(16396),R=r(13030),I=r(59907);class F{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return(0,I.vJ)(r,i,this.layout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const l=this.layout.createView(e).getField("position",R.xs);if(null==l)return;const c=(0,i.a)(O,a,o),d=l.count/3,u=n.options.normalRequired;!function(e,t,r,i,n,o,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],p=t[2];for(let e=0;e<i;++e){const t=3*e,r=t+1,i=t+2,m=o*t,f=n[m],v=n[m+1],_=n[m+2],x=o*r,y=o*i,b=n[x]-f,M=n[x+1]-v,T=n[x+2]-_,S=n[y]-f,E=n[y+1]-v,A=n[y+2]-_,R=h*A-E*p,I=p*S-A*u,F=u*E-S*h,O=b*R+M*I+T*F;if(Math.abs(O)<=C)continue;const P=l-f,D=c-v,N=d-_,H=P*R+D*I+N*F;if(O>0){if(H<0||H>O)continue}else if(H>0||H<O)continue;const L=D*T-M*N,z=N*b-T*P,B=P*M-b*D,G=u*L+h*z+p*B;if(O>0){if(G<0||H+G>O)continue}else if(G>0||H+G<O)continue;const U=(S*L+E*z+A*B)/O;U>=0&&s(U,e,a?w(b,M,T,S,E,A,g):null)}}(o,c,0,d,l.typedBuffer,l.typedBufferStride,u,(e,t,r)=>s(e,r,t))}}const O=(0,n.vt)();var P=r(43616),D=r(91829),N=r(4431),H=r(1843),L=r(72824),z=r(97220),B=r(98958),G=r(16943);const U={mask:255},V={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},j={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var W=r(4576),k=r(44208);r(53966),r(34275),r(94656),r(63907),(0,k.A)("esri-tests-disable-gpu-memory-measurements");var $=r(31635),Z=r(65008),q=r(65529),Y=r(10107),X=r(40608),J=r(77690),K=r(29242),Q=r(58083),ee=r(9093),te=r(32728);class re{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",R.Eq),this.color=e.getField("instanceColor",R.XP),this.olidColor=e.getField("instanceOlidColor",R.XP),this.state=e.getField("state",R.SL),this.lodLevel=e.getField("lodLevel",R.SL)}}let ie=class extends Z.A{constructor(e,t){super(e),this.events=new q.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return oe(ne.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=de,this._buffer=this._layout.createBuffer(this._capacity),this._view=new re(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,d.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,d.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=ae,n=se;t.localTransform.getMat(e,le),t.globalTransform.getMat(e,ce);const o=(0,Q.lw)(ce,ce,le);(0,i.i)(r,o[12],o[13],o[14]),t.modelOrigin.setVec(e,r),(0,J.z0)(n,o),t.model.setMat(e,n);const a=(0,te.wp)(ae,o);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,J.B8)(n,n),(0,J.mg)(n,n),t.modelNormal.setMat(e,n),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,se),r.modelOrigin.getVec(e,ae),t[0]=se[0],t[1]=se[1],t[2]=se[2],t[3]=0,t[4]=se[3],t[5]=se[4],t[6]=se[5],t[7]=0,t[8]=se[6],t[9]=se[7],t[10]=se[8],t[11]=0,t[12]=ae[0],t[13]=ae[1],t[14]=ae[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ae,this,e),t*=Math.max(ae[0],ae[1],ae[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ae,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(ae[0],ae[1],ae[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(de,Math.floor(this._capacity*W.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new re(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,$.Cg)([(0,Y.MZ)({constructOnly:!0})],ie.prototype,"shaderTransformation",void 0),(0,$.Cg)([(0,Y.MZ)()],ie.prototype,"_size",void 0),(0,$.Cg)([(0,Y.MZ)({readOnly:!0})],ie.prototype,"size",null),ie=(0,$.Cg)([(0,X.$)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],ie);const ne=(0,H.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function oe(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,G.E)()&&e.vec4u8("instanceOlidColor"),e}const ae=(0,n.vt)(),se=(0,K.vt)(),le=(0,ee.vt)(),ce=(0,ee.vt)(),de=64,ue=(0,H.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var he=r(74810),pe=r(28491),me=r(90644),fe=r(85079),ge=r(49788);class ve extends L.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=he.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=n.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,n.CN)(.2,.2,.2),this.diffuse=(0,n.CN)(.8,.8,.8),this.externalColor=(0,D.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,n.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=ge.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}L.gy;class _e extends B.w{constructor(e,t,i=new z.$(pe.D,()=>r.e(5141).then(r.bind(r,5141)))){const n=[(0,N.U)(ye(t))];t.instanced&&t.instancedDoublePrecision&&n.push((0,N.U)(function(e){return oe(ue.clone(),e)}(t))),super(e,t,i,(0,fe._u)(n))}_makePipeline(e,t){const{oitPass:r,output:i,transparent:n,cullFace:a,customDepthTest:s,hasOccludees:c}=e;return(0,me.Ey)({blending:(0,o.RN)(i)&&n?(0,l.Yf)(r):null,culling:we(e)?(0,me.Xt)(a):null,depthTest:{func:(0,l.K_)(r,xe(s))},depthWrite:(0,l.z5)(e),drawBuffers:(0,B.L)(i,(0,l.m6)(r,i)),colorWrite:me.kn,stencilWrite:c?U:null,stencilTest:c?t?j:V:null,polygonOffset:(0,l.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function xe(e){return 1===e?515:513}function we(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function ye(e){const t=(0,H.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,G.E)()&&t.vec4u8("olidColor"),t}var be=r(51976),Me=r(35256);class Te extends Me.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasGlow=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,$.Cg)([(0,be.W)({count:4})],Te.prototype,"alphaDiscardMode",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"doubleSidedMode",void 0),(0,$.Cg)([(0,be.W)({count:7})],Te.prototype,"pbrMode",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"cullFace",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"normalType",void 0),(0,$.Cg)([(0,be.W)({count:2})],Te.prototype,"customDepthTest",void 0),(0,$.Cg)([(0,be.W)({count:8})],Te.prototype,"emissionSource",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVertexColors",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasSymbolColors",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVerticalOffset",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasColorTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasMetallicRoughnessTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOcclusionTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasNormalTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasScreenSizePerspective",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVertexTangents",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOccludees",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instanced",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedDoublePrecision",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasModelTransformation",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"offsetBackfaces",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVVSize",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVVColor",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"receiveShadows",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"receiveAmbientOcclusion",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"textureAlphaPremultiplied",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedFeatureAttribute",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedColor",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"writeDepth",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"transparent",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"enableOffset",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"terrainDepthTest",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"cullAboveTerrain",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"snowCover",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasGlow",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasColorTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasEmissionTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasNormalTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOcclusionTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Ce=r(57323);class Se extends _e{constructor(e,t){super(e,t,new z.$(Ce.R,()=>r.e(2314).then(r.bind(r,39933))))}}class Ee extends s.i{constructor(e,t){super(e,Re),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&!this.transparent],[4,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[8,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=ye(this.parameters),this._configuration=new Te(t.spherical)}isVisibleForOutput(e){return 4!==e&&6!==e&&5!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=ge.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.q)(this.parameters.emissiveBaseColor,n.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:n,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=r.hasNormalTexture,i.hasColorTexture=r.hasColorTexture,i.hasMetallicRoughnessTexture=r.hasMetallicRoughnessTexture,i.hasOcclusionTexture=r.hasOcclusionTexture,i.hasVertexTangents=!n&&r.hasVertexTangents,i.instanced=r.instanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.hasVVColor=!!r.vvColor,i.hasVVSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=n?0:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??0,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?0:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!n&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=n?2:a&&"normal"===s?1:a&&"winding-order"===s?2:0,i.instancedFeatureAttribute=r.instancedFeatureAttribute,i.instancedColor=r.instancedColor,(0,o.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?2:1:0,i.emissionSource=r.emissionSource,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<l.xt,i.snowCover=t.snowCover>0,i.hasGlow=(0,o.LG)(e),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,n,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(He,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,i.n)(De,He);break;case 2:a=(0,i.c)(De,Pe)}let s=0;const l=(0,i.d)(Le,He,e.eye),c=(0,i.l)(l),d=(0,i.g)(l,l,1/c);let u=null;this.parameters.screenSizePerspective&&(u=(0,i.e)(a,d)),s+=(0,P.kE)(e,c,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective,null),(0,i.g)(a,a,s),(0,i.o)(Ne,a,r.transform.inverseRotation),n=(0,i.d)(Fe,n,Ne),o=(0,i.d)(Oe,o,Ne)}p(e,r,n,o,(0,A.ou)(r.verticalOffset),a)}createGLMaterial(e){return new Ae(e)}createBufferWriter(){return new F(this._layout)}get transparent(){return Ie(this.parameters)}}class Ae extends a.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Se:_e,e)}}class Re extends ve{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:this.usePBR?0===this.emissiveSource?2:1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function Ie(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:a,textureAlphaMode:s,colorMixMode:l}=e,c=i[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=o||null!=a)&&1!==s&&2!==s&&"replace"!==l}const Fe=(0,n.vt)(),Oe=(0,n.vt)(),Pe=(0,n.fA)(0,0,1),De=(0,n.vt)(),Ne=(0,n.vt)(),He=(0,n.vt)(),Le=(0,n.vt)()},4431:(e,t,r)=>{r.d(t,{U:()=>o}),r(44208);var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const a=e.fields.get(o),s=a.constructor.ElementCount,l=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(a.constructor.ElementType),c=a.offset,d=a.optional?.glNormalized??!1;return new n._(o,s,l,c,r,d,t)})}},6867:(e,t,r)=>{r.d(t,{i:()=>d});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,o.g)(h,this.ray.direction,this.distance),(0,o.l)(h))}withinDistance(e){return!!u(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!u(this)&&((0,o.g)(h,this.ray.direction,this.distance),(0,o.f)(e,this.ray.origin,h),!0)}getTransformedNormal(e){return(0,o.c)(p,this.normal),p[3]=0,(0,s.t)(p,p,this.transformation),(0,o.c)(e,p),(0,o.n)(e,e)}constructor(e){this.intersector=4,this.normal=(0,a.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,c.C)(e,this._ray)}set(e,t,r,s,l,c,d){this.intersector=e,this.distance=r,(0,o.c)(this.normal,s??a.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,o.c)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function u(e){return null!=e?.distance}const h=(0,a.vt)(),p=(0,l.vt)()},10906:(e,t,r)=>{r.d(t,{b:()=>o});var i=r(33094),n=r(31821);function o(e,t){t.snowCover&&(e.uniforms.add(new i.U("snowCover",e=>e.snowCover)).code.add(n.H`float getSnow(vec3 normal, vec3 groundNormal) {
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1793],{1843:(e,t,r)=>{r.d(t,{BP:()=>u,l5:()=>h});var i=r(20498),n=r(13030),o=r(90239),a=r(4431),s=r(620),l=r(85079);class c{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 c(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class d{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:f(e[1].constructor)})))}freeze(){return this}get locations(){return(0,l.Xk)((0,a.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,s.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new c(this,e)}createView(e){return new c(this,e)}clone(){const e=new d;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(){return this._stride}get fields(){return this._fields}}function u(){return new d}class h{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const p=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function f(e){return g.get(e)}const g=new Map;p.forEach(e=>g.set(m(e),e))},2495:(e,t,r)=>{r.d(t,{$U:()=>Ee,fs:()=>Re,ty:()=>Ie});var i=r(38954),n=r(51850),o=r(49255),a=r(25634),s=r(11725),l=r(33524),c=r(70328),d=r(620);class u{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const h=(0,c.vt)();function p(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(S,n,r),l=(e,t,r)=>{a(e,r,t)},c=new u(!1,t.options.normalRequired);if(e.boundingInfo){(0,d.vA)(0===e.type);const i=t.tolerance;f(e.boundingInfo,r,s,i,o,c,l)}else{const t=e.positionAttribute,n=t.indices;!function(e,t,r,n,o,a,s,l,c,d){const u=t,h=E,p=Math.abs(u[0]),m=Math.abs(u[1]),f=Math.abs(u[2]),g=p>=m?p>=f?0:2:m>=f?1:2,w=g,b=u[w]<0?2:1,M=(g+b)%3,T=(g+(3-b))%3,C=u[M]/u[w],S=u[T]/u[w],A=1/u[w],R=v,I=_,F=x,{normalRequired:O}=c;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const c=s*o[r+1];(0,i.i)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.c)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(R,h[0],e),(0,i.a)(I,h[1],e),(0,i.a)(F,h[2],e);const p=R[M]-C*R[w],m=R[T]-S*R[w],f=I[M]-C*I[w],g=I[T]-S*I[w],v=F[M]-C*F[w],_=F[T]-S*F[w],x=v*g-_*f,b=p*_-m*v,E=f*m-g*p;if((x<0||b<0||E<0)&&(x>0||b>0||E>0))continue;const P=x+b+E;if(0===P)continue;const D=x*(A*R[w])+b*(A*I[w])+E*(A*F[w]);if(D*Math.sign(P)<0)continue;const N=D/P;N>=0&&d(N,t,O?y(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,c,l)}}const m=(0,n.vt)();function f(e,t,r,n,o,a,s){if(null==e)return;const l=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,m);if((0,c.Ne)(h,e.bbMin),(0,c.vI)(h,e.bbMax),null!=o&&o.applyToAabb(h),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(h,t,l,n)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>T){const i=e.getChildren();if(void 0!==i){for(const e of i)f(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,l,c,d){const u=e[0],h=e[1],p=e[2],m=t[0],f=t[1],v=t[2],{normalRequired:_}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let c=o[i],x=o[i+1],y=o[i+2];const b=a*n[r+1];let M=o[b],T=o[b+1],S=o[b+2];const E=a*n[r+2];let A=o[E],R=o[E+1],I=o[E+2];null!=l&&([c,x,y]=l.applyToVertex(c,x,y,e),[M,T,S]=l.applyToVertex(M,T,S,e),[A,R,I]=l.applyToVertex(A,R,I,e));const F=M-c,O=T-x,P=S-y,D=A-c,N=R-x,H=I-y,L=f*H-N*v,z=v*D-H*m,B=m*N-D*f,G=F*L+O*z+P*B;if(Math.abs(G)<=C)continue;const U=u-c,V=h-x,j=p-y,W=U*L+V*z+j*B;if(G>0){if(W<0||W>G)continue}else if(W>0||W<G)continue;const k=V*P-O*j,$=j*F-P*U,Z=U*O-F*V,q=m*k+f*$+v*Z;if(G>0){if(q<0||W+q>G)continue}else if(q>0||W+q<G)continue;const Y=(D*k+N*$+H*Z)/G;Y>=0&&d(Y,t,_?w(F,O,P,D,N,H,g):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,o,a,s)}}const g=(0,n.vt)();const v=(0,n.vt)(),_=(0,n.vt)(),x=(0,n.vt)();function w(e,t,r,n,o,a,s){return(0,i.i)(b,e,t,r),(0,i.i)(M,n,o,a),(0,i.h)(s,b,M),(0,i.n)(s,s),s}function y(e){return(0,i.a)(b,e[1],e[0]),(0,i.a)(M,e[2],e[0]),(0,i.h)(g,b,M),(0,i.n)(g,g),g}const b=(0,n.vt)(),M=(0,n.vt)(),T=1e3,C=1e-7,S=(0,n.vt)(),E=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var A=r(16396),R=r(13030),I=r(59907);class F{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return(0,I.vJ)(r,i,this.layout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const l=this.layout.createView(e).getField("position",R.xs);if(null==l)return;const c=(0,i.a)(O,a,o),d=l.count/3,u=n.options.normalRequired;!function(e,t,r,i,n,o,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],p=t[2];for(let e=0;e<i;++e){const t=3*e,r=t+1,i=t+2,m=o*t,f=n[m],v=n[m+1],_=n[m+2],x=o*r,y=o*i,b=n[x]-f,M=n[x+1]-v,T=n[x+2]-_,S=n[y]-f,E=n[y+1]-v,A=n[y+2]-_,R=h*A-E*p,I=p*S-A*u,F=u*E-S*h,O=b*R+M*I+T*F;if(Math.abs(O)<=C)continue;const P=l-f,D=c-v,N=d-_,H=P*R+D*I+N*F;if(O>0){if(H<0||H>O)continue}else if(H>0||H<O)continue;const L=D*T-M*N,z=N*b-T*P,B=P*M-b*D,G=u*L+h*z+p*B;if(O>0){if(G<0||H+G>O)continue}else if(G>0||H+G<O)continue;const U=(S*L+E*z+A*B)/O;U>=0&&s(U,e,a?w(b,M,T,S,E,A,g):null)}}(o,c,0,d,l.typedBuffer,l.typedBufferStride,u,(e,t,r)=>s(e,r,t))}}const O=(0,n.vt)();var P=r(43616),D=r(91829),N=r(4431),H=r(1843),L=r(72824),z=r(97220),B=r(98958),G=r(16943);const U={mask:255},V={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},j={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var W=r(4576),k=r(44208);r(53966),r(34275),r(94656),r(63907),(0,k.A)("esri-tests-disable-gpu-memory-measurements");var $=r(31635),Z=r(65008),q=r(65529),Y=r(10107),X=r(40608),J=r(77690),K=r(29242),Q=r(58083),ee=r(9093),te=r(32728);class re{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",R.Eq),this.color=e.getField("instanceColor",R.XP),this.olidColor=e.getField("instanceOlidColor",R.XP),this.state=e.getField("state",R.SL),this.lodLevel=e.getField("lodLevel",R.SL)}}let ie=class extends Z.A{constructor(e,t){super(e),this.events=new q.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return oe(ne.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=de,this._buffer=this._layout.createBuffer(this._capacity),this._view=new re(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,d.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,d.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=ae,n=se;t.localTransform.getMat(e,le),t.globalTransform.getMat(e,ce);const o=(0,Q.lw)(ce,ce,le);(0,i.i)(r,o[12],o[13],o[14]),t.modelOrigin.setVec(e,r),(0,J.z0)(n,o),t.model.setMat(e,n);const a=(0,te.wp)(ae,o);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,J.B8)(n,n),(0,J.mg)(n,n),t.modelNormal.setMat(e,n),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,se),r.modelOrigin.getVec(e,ae),t[0]=se[0],t[1]=se[1],t[2]=se[2],t[3]=0,t[4]=se[3],t[5]=se[4],t[6]=se[5],t[7]=0,t[8]=se[6],t[9]=se[7],t[10]=se[8],t[11]=0,t[12]=ae[0],t[13]=ae[1],t[14]=ae[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ae,this,e),t*=Math.max(ae[0],ae[1],ae[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ae,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(ae[0],ae[1],ae[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(de,Math.floor(this._capacity*W.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new re(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,$.Cg)([(0,Y.MZ)({constructOnly:!0})],ie.prototype,"shaderTransformation",void 0),(0,$.Cg)([(0,Y.MZ)()],ie.prototype,"_size",void 0),(0,$.Cg)([(0,Y.MZ)({readOnly:!0})],ie.prototype,"size",null),ie=(0,$.Cg)([(0,X.$)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],ie);const ne=(0,H.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function oe(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,G.E)()&&e.vec4u8("instanceOlidColor"),e}const ae=(0,n.vt)(),se=(0,K.vt)(),le=(0,ee.vt)(),ce=(0,ee.vt)(),de=64,ue=(0,H.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var he=r(74810),pe=r(28491),me=r(90644),fe=r(85079),ge=r(49788);class ve extends L.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=he.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=n.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,n.CN)(.2,.2,.2),this.diffuse=(0,n.CN)(.8,.8,.8),this.externalColor=(0,D.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,n.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=ge.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}L.gy;class _e extends B.w{constructor(e,t,i=new z.$(pe.D,()=>r.e(5141).then(r.bind(r,5141)))){const n=[(0,N.U)(ye(t))];t.instanced&&t.instancedDoublePrecision&&n.push((0,N.U)(function(e){return oe(ue.clone(),e)}(t))),super(e,t,i,(0,fe._u)(n))}_makePipeline(e,t){const{oitPass:r,output:i,transparent:n,cullFace:a,customDepthTest:s,hasOccludees:c}=e;return(0,me.Ey)({blending:(0,o.RN)(i)&&n?(0,l.Yf)(r):null,culling:we(e)?(0,me.Xt)(a):null,depthTest:{func:(0,l.K_)(r,xe(s))},depthWrite:(0,l.z5)(e),drawBuffers:(0,B.L)(i,(0,l.m6)(r,i)),colorWrite:me.kn,stencilWrite:c?U:null,stencilTest:c?t?j:V:null,polygonOffset:(0,l.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function xe(e){return 1===e?515:513}function we(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function ye(e){const t=(0,H.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,G.E)()&&t.vec4u8("olidColor"),t}var be=r(51976),Me=r(35256);class Te extends Me.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasGlow=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,$.Cg)([(0,be.W)({count:4})],Te.prototype,"alphaDiscardMode",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"doubleSidedMode",void 0),(0,$.Cg)([(0,be.W)({count:7})],Te.prototype,"pbrMode",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"cullFace",void 0),(0,$.Cg)([(0,be.W)({count:3})],Te.prototype,"normalType",void 0),(0,$.Cg)([(0,be.W)({count:2})],Te.prototype,"customDepthTest",void 0),(0,$.Cg)([(0,be.W)({count:8})],Te.prototype,"emissionSource",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVertexColors",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasSymbolColors",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVerticalOffset",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasColorTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasMetallicRoughnessTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOcclusionTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasNormalTexture",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasScreenSizePerspective",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVertexTangents",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOccludees",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instanced",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedDoublePrecision",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasModelTransformation",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"offsetBackfaces",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVVSize",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasVVColor",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"receiveShadows",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"receiveAmbientOcclusion",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"textureAlphaPremultiplied",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedFeatureAttribute",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"instancedColor",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"writeDepth",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"transparent",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"enableOffset",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"terrainDepthTest",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"cullAboveTerrain",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"snowCover",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasGlow",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasColorTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasEmissionTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasNormalTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasOcclusionTextureTransform",void 0),(0,$.Cg)([(0,be.W)()],Te.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Ce=r(57323);class Se extends _e{constructor(e,t){super(e,t,new z.$(Ce.R,()=>r.e(2314).then(r.bind(r,39933))))}}class Ee extends s.i{constructor(e,t){super(e,Re),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&!this.transparent],[4,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[8,e=>((0,o.iq)(e)||(0,o.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=ye(this.parameters),this._configuration=new Te(t.spherical)}isVisibleForOutput(e){return 4!==e&&6!==e&&5!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=ge.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.q)(this.parameters.emissiveBaseColor,n.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:n,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=r.hasNormalTexture,i.hasColorTexture=r.hasColorTexture,i.hasMetallicRoughnessTexture=r.hasMetallicRoughnessTexture,i.hasOcclusionTexture=r.hasOcclusionTexture,i.hasVertexTangents=!n&&r.hasVertexTangents,i.instanced=r.instanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.hasVVColor=!!r.vvColor,i.hasVVSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=n?0:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??0,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?0:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!n&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=n?2:a&&"normal"===s?1:a&&"winding-order"===s?2:0,i.instancedFeatureAttribute=r.instancedFeatureAttribute,i.instancedColor=r.instancedColor,(0,o.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?2:1:0,i.emissionSource=r.emissionSource,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<l.xt,i.snowCover=t.snowCover>0,i.hasGlow=(0,o.LG)(e),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,n,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(He,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,i.n)(De,He);break;case 2:a=(0,i.c)(De,Pe)}let s=0;const l=(0,i.d)(Le,He,e.eye),c=(0,i.l)(l),d=(0,i.g)(l,l,1/c);let u=null;this.parameters.screenSizePerspective&&(u=(0,i.e)(a,d)),s+=(0,P.kE)(e,c,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective,null),(0,i.g)(a,a,s),(0,i.o)(Ne,a,r.transform.inverseRotation),n=(0,i.d)(Fe,n,Ne),o=(0,i.d)(Oe,o,Ne)}p(e,r,n,o,(0,A.ou)(r.verticalOffset),a)}createGLMaterial(e){return new Ae(e)}createBufferWriter(){return new F(this._layout)}get transparent(){return Ie(this.parameters)}}class Ae extends a.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Se:_e,e)}}class Re extends ve{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:this.usePBR?0===this.emissiveSource?2:1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function Ie(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:a,textureAlphaMode:s,colorMixMode:l}=e,c=i[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=o||null!=a)&&1!==s&&2!==s&&"replace"!==l}const Fe=(0,n.vt)(),Oe=(0,n.vt)(),Pe=(0,n.fA)(0,0,1),De=(0,n.vt)(),Ne=(0,n.vt)(),He=(0,n.vt)(),Le=(0,n.vt)()},4431:(e,t,r)=>{r.d(t,{U:()=>o}),r(44208);var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const a=e.fields.get(o),s=a.constructor.ElementCount,l=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(a.constructor.ElementType),c=a.offset,d=a.optional?.glNormalized??!1;return new n._(o,s,l,c,r,d,t)})}},6867:(e,t,r)=>{r.d(t,{i:()=>d});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,o.g)(h,this.ray.direction,this.distance),(0,o.l)(h))}withinDistance(e){return!!u(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!u(this)&&((0,o.g)(h,this.ray.direction,this.distance),(0,o.f)(e,this.ray.origin,h),!0)}getTransformedNormal(e){return(0,o.c)(p,this.normal),p[3]=0,(0,s.t)(p,p,this.transformation),(0,o.c)(e,p),(0,o.n)(e,e)}constructor(e){this.intersector=4,this.normal=(0,a.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,c.C)(e,this._ray)}set(e,t,r,s,l,c,d){this.intersector=e,this.distance=r,(0,o.c)(this.normal,s??a.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,o.c)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function u(e){return null!=e?.distance}const h=(0,a.vt)(),p=(0,l.vt)()},10906:(e,t,r)=>{r.d(t,{b:()=>o});var i=r(33094),n=r(31821);function o(e,t){t.snowCover&&(e.uniforms.add(new i.U("snowCover",e=>e.snowCover)).code.add(n.H`float getSnow(vec3 normal, vec3 groundNormal) {
2
2
  return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
3
3
  }
4
4
  float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
@@ -505,7 +505,7 @@ return MaskedColor(masked1 * masked2, bvec4(ivec4(color1.mask) & ivec4(color2.ma
505
505
  return MaskedColor(color, isnan(color));
506
506
  }`)}},43616:(e,t,r)=>{r.d(t,{MB:()=>l,Um:()=>c,kE:()=>a});var i=r(4576),n=r(34727),o=r(77194);function a(e,t,r,i,o,a){let s=r.screenLength*e.pixelRatio;null!=o&&(d.update(i,t,o,a),s=d.apply(s));const l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(l*t,r.minWorldLength,r.maxWorldLength)}const s=(0,i.VO)();function l(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(Array.isArray(n)?Array.isArray(e[i])&&s(n,e[i])||(e[i]=n.slice(),r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4},d=new o.PS},46686:(e,t,r)=>{r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
507
507
  void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
508
- `)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(99677),h=r(56058),p=r(2741);let m;var f=r(63907),g=r(76284),v=r(42293);let _=null,x=null;async function w(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function y(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function b(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,n){const o=(0,v.I)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<h;e++)p.push(new Uint8Array(a(e,d))),s(e,d,p[e]);return t.internalFormat=u,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new g.g(e,t,{type:"compressed",levels:p})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const I=R("DXT1"),F=R("DXT3"),O=R("DXT5");function P(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case I:n=8,o=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().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&&(a=Math.max(1,r[7]));let p=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*n,u=new Uint8Array(e.buffer,p,h),m.push(u),p+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function N(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:H(e,r,i)}function H(e,t,r){if(e instanceof ImageData)return H(function(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.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var L=r(620),z=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new n.bk,this._parameters={...U,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new z.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,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??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?b(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,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,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.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=P(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new g.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const n=S(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(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const n=S(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(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromPixelData(e,t){(0,L.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?6409:3===this._parameters.components?6407:6408,6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((n,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,o.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),n(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=N(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?6407:6408,n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._glTexture=new g.g(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),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),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const U={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),n=r(31821),o=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
508
+ `)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(99677),h=r(56058),p=r(2741);let m;var f=r(63907),g=r(76284),v=r(42293);let _=null,x=null;async function w(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,_=await x),x}function y(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function b(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,n){const o=(0,v.I)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<h;e++)p.push(new Uint8Array(a(e,d))),s(e,d,p[e]);return t.internalFormat=u,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new g.g(e,t,{type:"compressed",levels:p})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const I=R("DXT1"),F=R("DXT3"),O=R("DXT5");function P(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case I:n=8,o=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,o=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().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&&(a=Math.max(1,r[7]));let p=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*n,u=new Uint8Array(e.buffer,p,h),m.push(u),p+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function N(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:H(e,r,i)}function H(e,t,r){if(e instanceof ImageData)return H(function(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.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var L=r(620),z=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new n.bk,this._parameters={...U,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new z.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,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??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?b(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,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,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.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=P(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new g.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const n=S(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(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const n=S(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(),n}(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromPixelData(e,t){(0,L.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?6409:3===this._parameters.components?6407:6408,6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((n,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,o.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),n(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=N(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?6407:6408,n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._glTexture=new g.g(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),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),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const U={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49640:(e,t,r)=>{r.d(t,{V:()=>T});var i=r(9093),n=r(38954),o=r(97146),a=r(57917),s=r(29920),l=r(24326);class c{constructor(e){this.id=(0,l.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,o.Dg)(r.indices)})}get attributes(){return this._attributes}}var d=r(51850),u=r(4341),h=r(11964);function p(e,t,r){return(0,n.d)(m,t,e),(0,n.d)(f,r,e),.5*(0,n.l)((0,n.h)(m,m,f))}r(32114),new u.I(h.vt),new u.I(()=>function(e){return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()}}());const m=(0,d.vt)(),f=(0,d.vt)(),g=(0,d.vt)(),v=(0,d.vt)(),_=(0,d.vt)(),x=(0,d.vt)();class w{constructor(){this.uid=(0,l.c)()}}class y extends w{constructor(e){super(),this.highlightName=e,this.channel=0}}var b=r(620),M=r(94656);class T extends c{constructor(e,t,r=null,i=0,n=null,o=-1,a){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=a,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null;const s=this.positionAttribute;null!=s&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=s.indices.length)}instantiate(e={}){const t=new T(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,a.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,M.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,n.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0),(0,n.i)(x,0,0,0);let a=0,s=0;for(let e=0;e<o.length-2;e+=3){const l=o[e]*r,c=o[e+1]*r,d=o[e+2]*r;(0,n.i)(g,i[l],i[l+1],i[l+2]),(0,n.i)(v,i[c],i[c+1],i[c+2]),(0,n.i)(_,i[d],i[d+1],i[d+2]);const u=p(g,v,_);u?((0,n.f)(g,g,v),(0,n.f)(g,g,_),(0,n.g)(g,g,1/3*u),(0,n.f)(t,t,g),a+=u):((0,n.f)(x,x,g),(0,n.f)(x,x,v),(0,n.f)(x,x,_),s+=3)}return!(0===s&&0===a||(0!==a?((0,n.g)(t,t,1/a),0):0===s||((0,n.g)(t,x,1/s),0)))}(this.positionAttribute,e)}_computeAttachmentOriginLines(e){const t=this.positionAttribute;return function(e,t,r){if(!e)return!1;(0,n.i)(r,0,0,0),(0,n.i)(x,0,0,0);let i=0,o=0;const{size:a,data:s,indices:l}=e,c=l.length-1,d=c+(t?2:0);for(let e=0;e<d;e+=2){const t=e<c?e+1:0,d=l[e<c?e:c]*a,u=l[t]*a;g[0]=s[d],g[1]=s[d+1],g[2]=s[d+2],v[0]=s[u],v[1]=s[u+1],v[2]=s[u+2],(0,n.g)(g,(0,n.f)(g,g,v),.5);const h=(0,n.F)(g,v);h>0?((0,n.f)(r,r,(0,n.g)(g,g,h)),i+=h):0===i&&((0,n.f)(x,x,g),o++)}return 0!==i?((0,n.g)(r,r,1/i),!0):0!==o&&((0,n.g)(r,x,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<o.length;e++){const n=o[e]*r;a!==n&&(t[0]+=i[n],t[1]+=i[n+1],t[2]+=i[n+2],s++),a=n}return s>1&&(0,n.g)(t,t,1/s),s>0}(this.positionAttribute,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.positionAttribute;if(!e||0===e.indices.length)return null;const t=0===this.type?3:1;(0,b.vA)(e.indices.length%t===0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,o.tM)(e.indices.length/t);return new s.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlights(){return this._highlights||C}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new y(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const C=new Set},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),n=r(31821),o=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
509
509
  colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
510
510
  }`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new o.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK)).code.add(n.H`void forwardNormalUV(){
511
511
  normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
@@ -797,7 +797,7 @@ rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.co
797
797
  }`))}},78662:(e,t,r)=>{r.d(t,{Gd:()=>l,VC:()=>c}),r(44208);var i=r(34727),n=(r(77690),r(29242),r(58083),r(9093)),o=r(38954),a=r(51850),s=(r(87317),r(91829),r(31756),r(26857),r(16943),r(65786));class l extends s.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}function c(e,t,r){if(!t.vvSize)return(0,o.i)(e,1,1,1),e;if(Number.isNaN(r[0]))return(0,o.c)(e,t.vvSize.fallback);for(let n=0;n<3;++n){const o=t.vvSize.offset[n]+r[0]*t.vvSize.factor[n];e[n]=(0,i.qE)(o,t.vvSize.minSize[n],t.vvSize.maxSize[n])}return e}(0,n.vt)(),(0,a.vt)(),(0,n.vt)()},82048:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821);function n(e,t=!0){e.attributes.add("position","vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
798
798
  gl_Position = vec4(position, 0.0, 1.0);
799
799
  ${t?i.H`uv = position * 0.5 + vec2(0.5);`:""}
800
- `)}},82919:(e,t,r)=>{r.d(t,{DV:()=>v,C:()=>f,vt:()=>p,Qy:()=>m,ui:()=>g,ST:()=>w,bU:()=>y,pw:()=>x,m7:()=>_,c8:()=>M});var i=r(4341),n=r(58083),o=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);function d(e){return e?{ray:(0,c.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>d());var u=r(27921),h=r(32114);function p(e){return e?[(0,u.vt)(e[0]),(0,u.vt)(e[1]),(0,u.vt)(e[2]),(0,u.vt)(e[3]),(0,u.vt)(e[4]),(0,u.vt)(e[5])]:[(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)()]}function m(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function f(e,t){for(let r=0;r<T;r++)(0,u.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const a=(0,n.lw)(h.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<C;++e){const t=(0,s.t)(h.Km.get(),S[e],a);(0,o.i)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,u.Cr)(t[4],t[0],t[3],e[0]),(0,u.Cr)(t[1],t[5],t[6],e[1]),(0,u.Cr)(t[4],t[5],t[1],e[2]),(0,u.Cr)(t[3],t[2],t[6],e[3]),(0,u.Cr)(t[0],t[1],t[2],e[4]),(0,u.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<T;r++){const i=e[r];if(i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]>=t[3])return!1}return!0}function x(e,t){return b(e,function(e,t=d()){return(0,c.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function w(e,t,r){return b(e,function(e,t,r=d()){const i=(0,o.l)(e.vector);return(0,c.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function y(e,t){for(let r=0;r<T;r++)if((0,u.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<T;r++)if(!(0,u.$Q)(e[r],t))return!1;return!0}const M={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},T=6,C=8,S=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],E=new i.I(d),A=m()},85079:(e,t,r)=>{function i(e){let t=0;return new Map(e.map(({name:e,count:r})=>{const i=[e,t];return 16===r?t+=4:9===r?t+=3:++t,i}))}function n(e){const t=new Map;let r=0;return e.forEach(e=>e.forEach(({name:e,count:i})=>{t.set(e,r),16===i?r+=4:9===i?r+=3:++r})),t}r.d(t,{Xk:()=>i,_u:()=>n})},87170:(e,t,r)=>{r.d(t,{V:()=>M});var i=r(24326),n=r(9093),o=r(38954),a=r(97146),s=r(57917),l=r(29920),c=r(51850),d=r(4341),u=r(11964);function h(e,t,r){return(0,o.d)(p,t,e),(0,o.d)(m,r,e),.5*(0,o.l)((0,o.h)(p,p,m))}r(32114),new d.I(u.vt),new d.I(()=>function(e){return e?{p0:(0,c.o8)(e.p0),p1:(0,c.o8)(e.p1),p2:(0,c.o8)(e.p2)}:{p0:(0,c.vt)(),p1:(0,c.vt)(),p2:(0,c.vt)()}}());const p=(0,c.vt)(),m=(0,c.vt)(),f=(0,c.vt)(),g=(0,c.vt)(),v=(0,c.vt)(),_=(0,c.vt)();class x{constructor(){this.uid=(0,i.c)()}}class w extends x{constructor(e){super(),this.highlightName=e,this.channel=0}}var y=r(620),b=r(94656);class M{constructor(e,t,r=null,n=0,o=null,s=-1){this.material=e,this.mapPositions=r,this.type=n,this.olidColor=o,this.edgeIndicesLength=s,this._highlights=null,this._highlightOptionsCounts=null,this.id=(0,i.c)(),this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,a.Dg)(r.indices)}),"position"===e&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new M(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,s.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,b.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,o.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.i)(t,0,0,0),(0,o.i)(_,0,0,0);let a=0,s=0;for(let e=0;e<n.length-2;e+=3){const l=n[e]*r,c=n[e+1]*r,d=n[e+2]*r;(0,o.i)(f,i[l],i[l+1],i[l+2]),(0,o.i)(g,i[c],i[c+1],i[c+2]),(0,o.i)(v,i[d],i[d+1],i[d+2]);const u=h(f,g,v);u?((0,o.f)(f,f,g),(0,o.f)(f,f,v),(0,o.g)(f,f,1/3*u),(0,o.f)(t,t,f),a+=u):((0,o.f)(_,_,f),(0,o.f)(_,_,g),(0,o.f)(_,_,v),s+=3)}return!(0===s&&0===a||(0!==a?((0,o.g)(t,t,1/a),0):0===s||((0,o.g)(t,_,1/s),0)))}(this.attributes.get("position"),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get("position");return function(e,t,r){if(!e)return!1;(0,o.i)(r,0,0,0),(0,o.i)(_,0,0,0);let i=0,n=0;const{size:a,data:s,indices:l}=e,c=l.length-1,d=c+(t?2:0);for(let e=0;e<d;e+=2){const t=e<c?e+1:0,d=l[e<c?e:c]*a,u=l[t]*a;f[0]=s[d],f[1]=s[d+1],f[2]=s[d+2],g[0]=s[u],g[1]=s[u+1],g[2]=s[u+2],(0,o.g)(f,(0,o.f)(f,f,g),.5);const h=(0,o.F)(f,g);h>0?((0,o.f)(r,r,(0,o.g)(f,f,h)),i+=h):0===i&&((0,o.f)(_,_,f),n++)}return 0!==i?((0,o.g)(r,r,1/i),!0):0!==n&&((0,o.g)(r,_,1/n),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<n.length;e++){const o=n[e]*r;a!==o&&(t[0]+=i[o],t[1]+=i[o+1],t[2]+=i[o+2],s++),a=o}return s>1&&(0,o.g)(t,t,1/s),s>0}(this.attributes.get("position"),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get("position");if(!e||0===e.indices.length)return null;const t=0===this.type?3:1;(0,y.vA)(e.indices.length%t===0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,a.tM)(e.indices.length/t);return new l.j(r,t,e)}get transformation(){return this._transformation??n.zK}set transformation(e){this._transformation=e&&e!==n.zK?(0,n.o8)(e):null}get highlights(){return this._highlights||T}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new w(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const T=new Set},89390:(e,t,r)=>{r.d(t,{kA:()=>C,a8:()=>M,eU:()=>T});var i=r(40876),n=(r(44208),r(38954)),o=r(51850),a=r(87317),s=r(91829),l=r(23205),c=r(14314),d=r(31821);function u(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new l.d("lightingAmbientSH0",({lighting:e})=>(0,n.i)(h,e.sh.r[0],e.sh.g[0],e.sh.b[0]))),r.code.add(d.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
800
+ `)}},82919:(e,t,r)=>{r.d(t,{DV:()=>v,C:()=>f,vt:()=>p,Qy:()=>m,ui:()=>g,ST:()=>w,bU:()=>y,pw:()=>x,m7:()=>_,c8:()=>M});var i=r(4341),n=r(58083),o=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);function d(e){return e?{ray:(0,c.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>d());var u=r(27921),h=r(32114);function p(e){return e?[(0,u.vt)(e[0]),(0,u.vt)(e[1]),(0,u.vt)(e[2]),(0,u.vt)(e[3]),(0,u.vt)(e[4]),(0,u.vt)(e[5])]:[(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,u.vt)()]}function m(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function f(e,t){for(let r=0;r<T;r++)(0,u.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const a=(0,n.lw)(h.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<C;++e){const t=(0,s.t)(h.Km.get(),S[e],a);(0,o.i)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,u.Cr)(t[4],t[0],t[3],e[0]),(0,u.Cr)(t[1],t[5],t[6],e[1]),(0,u.Cr)(t[4],t[5],t[1],e[2]),(0,u.Cr)(t[3],t[2],t[6],e[3]),(0,u.Cr)(t[0],t[1],t[2],e[4]),(0,u.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<T;r++){const i=e[r];if(i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]>=t[3])return!1}return!0}function x(e,t){return b(e,function(e,t=d()){return(0,c.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function w(e,t,r){return b(e,function(e,t,r=d()){const i=(0,o.l)(e.vector);return(0,c.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function y(e,t){for(let r=0;r<T;r++)if((0,u.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<T;r++)if(!(0,u.$Q)(e[r],t))return!1;return!0}const M={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},T=6,C=8,S=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],E=new i.I(d),A=m()},85079:(e,t,r)=>{function i(e){let t=0;return new Map(e.map(({name:e,count:r})=>{const i=[e,t];return 16===r?t+=4:9===r?t+=3:++t,i}))}function n(e){const t=new Map;let r=0;return e.forEach(e=>e.forEach(({name:e,count:i})=>{t.set(e,r),16===i?r+=4:9===i?r+=3:++r})),t}r.d(t,{Xk:()=>i,_u:()=>n})},89390:(e,t,r)=>{r.d(t,{kA:()=>C,a8:()=>M,eU:()=>T});var i=r(40876),n=(r(44208),r(38954)),o=r(51850),a=r(87317),s=r(91829),l=r(23205),c=r(14314),d=r(31821);function u(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new l.d("lightingAmbientSH0",({lighting:e})=>(0,n.i)(h,e.sh.r[0],e.sh.g[0],e.sh.b[0]))),r.code.add(d.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
801
801
  vec3 ambientLight = 0.282095 * lightingAmbientSH0;
802
802
  return ambientLight * (1.0 - ambientOcclusion);
803
803
  }`)):1===i?(r.uniforms.add(new c.I("lightingAmbientSH_R",({lighting:e})=>(0,a.s)(p,e.sh.r[0],e.sh.r[1],e.sh.r[2],e.sh.r[3])),new c.I("lightingAmbientSH_G",({lighting:e})=>(0,a.s)(p,e.sh.g[0],e.sh.g[1],e.sh.g[2],e.sh.g[3])),new c.I("lightingAmbientSH_B",({lighting:e})=>(0,a.s)(p,e.sh.b[0],e.sh.b[1],e.sh.b[2],e.sh.b[3]))),r.code.add(d.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4575],{5834:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(31635),r=i(93637),s=i(10107),o=i(56507),a=(i(44208),i(87811),i(93223)),l=i(40608),p=i(41266),u=i(41366);function y(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,u.K)(p.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],c.prototype,"numBins",void 0),(0,n.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:y}}})],c.prototype,"end",void 0),(0,n.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:y}}})],c.prototype,"start",void 0),(0,n.Cg)([(0,a.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,n.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],c),c.from=(0,o.dp)(c)},7320:(e,t,i)=>{i.d(t,{g:()=>n});const n={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const n=new r(e.getPointX(t),e.getPointY(t),i),s=e.hasZ(t),o=e.hasM(t);return s&&(n.z=e.getPointZ(t)),o&&(n.m=e.getPointM(t)),n},exportPolygon:function(e,t,i){return new s(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new o(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new a(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const n=e.hasZ(t),r=e.hasM(t),s=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(n){const i=e.getZExtent(t);s.zmin=i.vmin,s.zmax=i.vmax}if(r){const i=e.getMExtent(t);s.mmin=i.vmin,s.mmax=i.vmax}return s}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class s{constructor(e,t,i,n){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class o{constructor(e,t,i,n){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class a{constructor(e,t,i,n){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class l{constructor(e,t,i,n,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=n,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},11440:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(31635),r=i(93637),s=i(10107),o=i(56507),a=(i(44208),i(87811),i(93223)),l=i(40608),p=i(41266);let u=class extends p.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,n.Cg)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,n.Cg)([(0,a.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,o.dp)(u)},14575:(e,t,i)=>{i.r(t),i.d(t,{default:()=>R});var n=i(31635),r=i(69540),s=i(66552),o=i(25482),a=i(53966),l=i(10107),p=i(56507),u=(i(44208),i(87811),i(93223)),y=i(40608),c=i(16930),d=i(65864),m=i(50498),h=i(58727),g=i(5834),f=i(41266),v=i(59977),w=i(11440),x=i(60909),M=i(77696),Z=i(58174),C=i(7562),S=i(79677),B=i(56400);const j=new s.J({asc:"ascending",desc:"descending"}),T={base:f.A,key:"type",typeMap:{"auto-interval":g.A,date:v.A,"fixed-boundaries":w.A,"fixed-interval":x.A}};let R=class extends((0,M.y)((0,r.OU)(o.o))){constructor(e){super(e),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.timeExtent=null,this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(e){this._set("outTimeZone",e),e&&!(0,B.wr)(e)&&a.A.getLogger(this).warn("#outTimeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}};(0,n.Cg)([(0,l.MZ)({types:T,json:{name:"bin",write:!0}})],R.prototype,"binParameters",void 0),(0,n.Cg)([(0,u.e)(j)],R.prototype,"binOrder",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],R.prototype,"datumTransformation",void 0),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{name:"defaultSR",write:!0}})],R.prototype,"defaultSpatialReference",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,n.Cg)([(0,l.MZ)({types:m.yR,json:{read:d.rS,write:!0}})],R.prototype,"geometry",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],R.prototype,"lowerBoundaryAlias",void 0),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),(0,n.Cg)([(0,l.MZ)({type:[C.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),(0,n.Cg)([(0,l.MZ)({value:null,json:{name:"outTimeReference",read:{reader:e=>e.ianaTimeZone},write:{writer:(e,t,i)=>{e&&(t[i]={ianaTimeZone:e})}}}})],R.prototype,"outTimeZone",null),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"returnDistinctValues",void 0),(0,n.Cg)([(0,u.e)(Z.x,{name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),(0,n.Cg)([(0,l.MZ)({type:S.A,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],R.prototype,"upperBoundaryAlias",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{read:h.VY.read,write:{writer:h.VY.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance}}}}})],R.prototype,"units",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=(0,n.Cg)([(0,y.$)("esri.rest.support.AttributeBinsQuery")],R),R.from=(0,p.dp)(R)},31464:(e,t,i)=>{i.d(t,{Cv:()=>g,Nk:()=>d,lK:()=>v});var n=i(4576),r=i(74887),s=i(98988),o=i(7320),a=i(21325),l=i(28735);const p=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,p),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,p),[i.xmax,i.ymax]=e(t.xmax,t.ymax,p),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:y(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:y(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:c(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function y(e,t){const i=[];for(const n of e)i.push(c(n,t));return i}function c(e,t){const i=[];for(const n of e){const e=t(n[0],n[1],[0,0]);i.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return i}async function d(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(n.Ru):[e];await(0,s.initializeProjection)(i.map(e=>({source:e,dest:t})))}const m=u.bind(null,l.je),h=u.bind(null,l.tD);function g(e,t,i,n){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,a.K8)(i)?m(e):h(e);return t.spatialReference=i,t}return(0,s.projectMany)(o.g,[e],t,i,null,n)[0]}const f=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,n){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const s={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:n,resolve:(0,r.Tw)()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:n,resolve:r,geographicTransformation:p}=e;(0,l.y7)(i,n)?(0,a.K8)(n)?r(t.map(m)):r(t.map(h)):r((0,s.projectMany)(o.g,t,i,n,p,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function v(e,t,i,n){return f.push(e,t,i,n)}},41266:(e,t,i)=>{i.d(t,{A:()=>g});var n=i(31635),r=i(69540),s=i(66552),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),p=i(40608),u=i(56507);const y=new s.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let c=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"outAlias",write:!0}})],c.prototype,"alias",void 0),(0,n.Cg)([(0,a.MZ)({type:String})],c.prototype,"responseType",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"value",void 0),(0,n.Cg)([(0,l.e)(y)],c.prototype,"valueType",void 0),c=(0,n.Cg)([(0,p.$)("esri.rest.support.AttributeBinsGrouping")],c);const d=c;c.from=(0,u.dp)(c);const m=new s.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),h=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let g=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],g.prototype,"expression",void 0),(0,n.Cg)([(0,l.e)(m,{name:"onExpression.valueType"})],g.prototype,"expressionValueType",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"onField",write:!0}})],g.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"firstDayOfWeek",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"hideUpperBound",void 0),(0,n.Cg)([(0,a.MZ)({type:d,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],g.prototype,"splitBy",void 0),(0,n.Cg)([(0,a.MZ)({type:d,json:{write:{target:{stackBy:{type:d},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>d.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],g.prototype,"stackBy",void 0),(0,n.Cg)([(0,l.e)(h)],g.prototype,"transformation",void 0),g=(0,n.Cg)([(0,p.$)("esri.rest.support.BinParametersBase")],g)},57231:(e,t,i)=>{i.d(t,{g:()=>n});const n=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>g,T2:()=>f,VY:()=>c,dO:()=>w,iJ:()=>h,v8:()=>d});var n=i(49186),r=i(66552),s=i(83047),o=i(98988),a=i(90634),l=i(65864),p=i(17136),u=i(21325),y=i(31464);const c=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),d=Object.freeze({}),m="frequency";async function h(e,t,i){const n=e.bin;return n.onField&&(n.onField=n.onField.trim()),n.onExpression?.value&&(n.onExpression.value=n.onExpression.value.trim()),n.splitBy&&(n.splitBy.value&&(n.splitBy.value=n.splitBy.value.trim()),n.splitBy.outAlias&&(n.splitBy.outAlias=n.splitBy.outAlias.trim())),n.stackBy&&(n.stackBy.value&&(n.stackBy.value=n.stackBy.value.trim()),n.stackBy.outAlias&&(n.stackBy.outAlias=n.stackBy.outAlias.trim())),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),g(e,t,i)}async function g(e,t,i){const{outFields:n,orderByFields:r,groupByFieldsForStatistics:s,outStatistics:o}=e;if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(o)for(let e=0;e<o.length;e++)o[e].onStatisticField&&(o[e].onStatisticField=o[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),f(e,t,i)}async function f(e,t,r){if(!e)return null;let{where:o}=e;if(e.where=o=o?.trim(),(!o||/^1 *= *1$/.test(o)||t&&t===o)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,o=e.geometry;if(null==t||"vertexAttributes"in o)return o;const a=o.spatialReference,p=r?c.fromJSON(r):(0,s.Ij)(a),d=a&&((0,u.EA)(a)||(0,u.K8)(a))?o:await(0,y.Nk)(a,u.KK).then(()=>(0,y.Cv)(o,u.KK)),m=await i.e(9159).then(i.bind(i,49159));await m.load();const h=m.execute(d,t||1,{unit:p})??void 0;if(!h||!(0,l.Bi)(h)||0===h.rings.length)throw new n.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return h}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,a.HA)(m),m.spatialReference=t}if(m){await(0,y.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return v(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,p.el)((0,l.rS)(m)))[0];if(null==t)throw d;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&v(m,r)?{densificationStep:8*i}:void 0,s=t.toJSON(),o=(0,y.Cv)(s,s.spatialReference,r,n);if(!o)throw d;o.spatialReference=r,e.geometry=o}return e}function v(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,u.aI)(i,t)&&!(0,o.canProjectWithoutEngine)(i,t)}function w(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(31635),r=i(93637),s=i(10107),o=i(56507),a=(i(44208),i(87811),i(93223)),l=i(40608),p=i(41266),u=i(69540),y=i(25482),c=i(57231);let d=class extends((0,u.OU)(y.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],d.prototype,"value",void 0),(0,n.Cg)([(0,a.e)(c.g)],d.prototype,"unit",void 0),d=(0,n.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],d);const m=d;function h(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}d.from=(0,o.dp)(d);let f=class extends p.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,n.Cg)([(0,s.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:h}}})],f.prototype,"end",void 0),(0,n.Cg)([(0,s.MZ)({type:m,json:{name:"parameters",write:!0}})],f.prototype,"interval",void 0),(0,n.Cg)([(0,s.MZ)({type:m,json:{name:"parameters.offset",write:!0}})],f.prototype,"offset",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],f.prototype,"returnFullIntervalBin",void 0),(0,n.Cg)([(0,s.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:h}}})],f.prototype,"start",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],f.prototype,"snapToData",void 0),(0,n.Cg)([(0,a.e)({dateBin:"date"},{readOnly:!0})],f.prototype,"type",void 0),f=(0,n.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],f),f.from=(0,o.dp)(f)},60909:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(31635),r=i(93637),s=i(10107),o=i(56507),a=(i(44208),i(87811),i(93223)),l=i(40608),p=i(41266),u=i(41366);function y(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,u.K)(p.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:y}}})],c.prototype,"end",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],c.prototype,"interval",void 0),(0,n.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:y}}})],c.prototype,"start",void 0),(0,n.Cg)([(0,a.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,n.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],c),c.from=(0,o.dp)(c)}}]);
@@ -2,13 +2,13 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";class c extends a{constructor(){super(...arguments),this.effect=0}}function l(){const a=new t;return a.include(e),a.outputs.add("fragColor","vec4",0),a.fragment.uniforms.add(new s("colorTexture",e=>e.color),new s("focusArea",e=>e.focusArea),new o("focusAreaEffectMode",e=>e.effect)).main.add(r`
5
+ import{signal as e}from"../core/signal.js";import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{FloatPassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as c}from"../views/webgl/NoParameters.js";import{ShaderBuilder as l}from"../views/webgl/ShaderBuilder.js";class f extends c{constructor(){super(...arguments),this.effect=0,this.fadeFactor=e(1)}}function i(){const e=new l;return e.include(o),e.outputs.add("fragColor","vec4",0),e.fragment.uniforms.add(new t("colorTexture",e=>e.color),new t("focusArea",e=>e.focusArea),new a("focusAreaEffectMode",e=>e.effect),new r("fadeFactor",e=>e.fadeFactor.value)).main.add(s`
6
6
  float mask = texture( focusArea, uv, 0.0 ).r;
7
7
  vec4 color = texture( colorTexture, uv, 0.0 );
8
8
  vec4 colorDeSaturate = vec4(color.r * 0.25 + color.g * 0.5 + color.b * 0.25);
9
- if (focusAreaEffectMode == ${r.int(0)}) {
10
- fragColor = mask > 0.0 ? color : 0.55 * colorDeSaturate + 0.45;
9
+ if (focusAreaEffectMode == ${s.int(0)}) {
10
+ fragColor = mask > 0.0 ? color : mix(color, 0.55 * colorDeSaturate + 0.45, fadeFactor);
11
11
  } else {
12
- fragColor = mask > 0.0 ? color : 0.33 * mix(color, colorDeSaturate, 0.);
12
+ fragColor = mask > 0.0 ? color : mix(color, 0.33 * color, fadeFactor);
13
13
  }
14
- `),a}const u=Object.freeze(Object.defineProperty({__proto__:null,FocusAreaColorPassParameters:c,build:l},Symbol.toStringTag,{value:"Module"}));export{c as F,u as a,l as b};
14
+ `),e}const n=Object.freeze(Object.defineProperty({__proto__:null,FocusAreaColorPassParameters:f,build:i},Symbol.toStringTag,{value:"Module"}));export{f as F,n as a,i as b};
package/config.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.77";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.79";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/NestedMap.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- class t{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get(t,e){return this._outer.get(t)?.get(e)}getInner(t){return this._outer.get(t)}set(t,e,r){const o=this._outer.get(t);o?o.set(e,r):this._outer.set(t,new Map([[e,r]]))}delete(t,e){const r=this._outer.get(t);r&&(r.delete(e),0===r.size&&this._outer.delete(t))}forEach(t){this._outer.forEach((e,r)=>t(e,r))}forAll(t){this._outer.forEach((e,r)=>e.forEach((e,o)=>t(e,r,o)))}}export{t as NestedMap};
5
+ class t{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get(t,e){return this._outer.get(t)?.get(e)}getInner(t){return this._outer.get(t)}set(t,e,r){const o=this._outer.get(t);o?o.set(e,r):this._outer.set(t,new Map([[e,r]]))}delete(t,e){const r=this._outer.get(t);r&&(r.delete(e),0===r.size&&this._outer.delete(t))}*outerMap(){for(const t of this._outer)yield t}forEach(t){this._outer.forEach((e,r)=>t(e,r))}forAll(t){this._outer.forEach((e,r)=>e.forEach((e,o)=>t(e,r,o)))}}export{t as NestedMap};