@arcgis/core 5.2.0-next.164 → 5.2.0-next.165

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 (163) hide show
  1. package/Graphic.d.ts +47 -14
  2. package/PopupTemplate.js +1 -1
  3. package/WebScene.d.ts +3 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{97d6ef9e34a43ad2e556.js → 02e10f44edf911832c2a.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{97b5f4302fb867c829f4.js → 07f7177bfaf9de73bc25.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{612345f17f5eeb99ea8f.js → 0d9c4c6c571ce26d356b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{12a7997a40c77f5c9160.js → 151e5799ede763a03ee2.js} +1 -1
  9. package/assets/esri/core/workers/chunks/196979cc6a765be3c5cd.js +1 -0
  10. package/assets/esri/core/workers/chunks/1ab59a97ffa49e9e1659.js +1 -0
  11. package/assets/esri/core/workers/chunks/{8715661a838361d4211a.js → 1b24a40c0fa197014873.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{83f29a159b8b5197e76a.js → 266c90d8d56a2da42fcf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{b1d989b72203113a06fe.js → 2a36fe3f3f257a779a1b.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{fcaf9450642fcef83286.js → 3048e74e6246324ce6fc.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{95b82cbbe355266c65d7.js → 30af63b3b750142faadb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{74137ffec5265628c33b.js → 36c780a9527c75b36725.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{6a0ec102962d2c7b4368.js → 40d803584eeade4df433.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a546ec82ba149e12f7bf.js → 41773d858e212468db88.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{129e04d24ced77c9bb6d.js → 49b967d89d2841cea675.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{b59aaf30c7fe2c8d1aaa.js → 4b99b4cf729881e616bc.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{a09d2e1e2540921e4717.js → 4d3d7ec407ee5cd5f036.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{2c626f525f3483c03477.js → 548b8f74a6883e364931.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{25a3bd8bede2d07d3a54.js → 5af8fb4ec2c72697e35b.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{340256866f524cb069f6.js → 5d2f043ebe1051326c56.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3f46acfda693c70abbdd.js → 61552b4b8111a8624d84.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e653c81ffb3d818645dd.js → 632fdf1d95ad69109427.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{434a8ba841a59e0deab9.js → 67e533748435253aaba6.js} +1 -1
  28. package/assets/esri/core/workers/chunks/69d5f8ef78b9b8b3d33d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{feb41abc03d677df6f73.js → 6b9961261241fdce0e94.js} +1 -1
  30. package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e251921bc5367258c4d2.js → 710b8251a59884aee31e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{af349c7bc8ef41a0e1bd.js → 7748c2886d0122b40eeb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8a7b02037151767542f1.js → 7dbf4c7480bf9c72820d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 7dfbc31f3b56728485a4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{c19f238b55ff2893f7c2.js → 82a022cc21364c9a8539.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5cb26bbaa08114aec5ce.js → 89cc1a5539b82fb46216.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{8ab57cb1bfd3dc8d3c2a.js → 8b8118ab56cc808b5a71.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{542e5640ea1b80ef801a.js → 9189dfe19a2a2ccd5173.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{f74ae0eff3f08978e607.js → 9f358c7b052cdc0ac06f.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ee08ae5b73439a1ff666.js → a163c6005aba3378edaa.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{ec9a2425b4a498054a19.js → a17673e691ced46a90d3.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{72bd866df89b8d92e247.js → a43b33955aa78a2a8deb.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{46c5371c7a627537098c.js → a88f346786b04bd194dc.js} +6 -6
  44. package/assets/esri/core/workers/chunks/{092e311cb7aea92a6a26.js → acb265a22be5e12f38e5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{9e8f012a56237fc8285f.js → aea44253c80493ef5755.js} +1 -1
  46. package/assets/esri/core/workers/chunks/b5b9d42e1f84ee82429c.js +1 -0
  47. package/assets/esri/core/workers/chunks/c046c4fc934bc6f54c69.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c72a904e01dc8c17d992.js → c47d095434d09b5f10c6.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{226f862bbeb33fc7c597.js → c4b7111dcedd9d6e1c2a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{81cad8d2f62a5f671c55.js → cb4db5489388559d6bd9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{bbd44ac63d2a317d8ed9.js → cc794bb94ebc1cb66024.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{be308db5b61a7246edfe.js → cc94bf05b235e65291fc.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +1 -0
  54. package/assets/esri/core/workers/chunks/{fc5a36e54929e03efa86.js → dba5f44c4e4a3f075df2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{1f43e06dcfe56229bb0f.js → debe45e792212682b304.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{8414ffd937c1099e0bbc.js → e6d10136bc08aef255ff.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{45fd2b456a6997584ca1.js → f8379cd45f750f28a3d8.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{709e019885822b1f6f3e.js → f905f1a1aa4c123cbe83.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{a2fcbc494333376192aa.js → f9c80e9fc349db4873e8.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{c070d2ddf290b4f92916.js → feb4f8c807bb0dca488f.js} +1 -1
  61. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  62. package/chunks/GlobalIllumination.glsl.js +15 -30
  63. package/config.js +1 -1
  64. package/core/workers/WorkerFallback.js +4 -2
  65. package/core/workers/workerFactory.js +1 -1
  66. package/core/workers/workers.js +4 -2
  67. package/form/elements/inputs.d.ts +126 -25
  68. package/form/elements/inputs.js +1 -1
  69. package/form/elements.d.ts +1 -0
  70. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +49 -9
  71. package/graphic/BuildingGraphicOrigin.d.ts +49 -0
  72. package/graphic/CSVGraphicOrigin.d.ts +42 -9
  73. package/graphic/CatalogGraphicOrigin.d.ts +42 -9
  74. package/graphic/DimensionFeatureGraphicOrigin.d.ts +42 -9
  75. package/graphic/FeatureGraphicOrigin.d.ts +42 -9
  76. package/graphic/GeoJSONGraphicOrigin.d.ts +42 -9
  77. package/graphic/GeoRSSGraphicOrigin.d.ts +42 -9
  78. package/graphic/GraphicOrigin.d.ts +52 -12
  79. package/graphic/ImageryGraphicOrigin.d.ts +42 -9
  80. package/graphic/ImageryTileGraphicOrigin.d.ts +42 -9
  81. package/graphic/KMLGraphicOrigin.d.ts +47 -10
  82. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +49 -1
  83. package/graphic/LinkChartGraphicOrigin.d.ts +49 -1
  84. package/graphic/MapImageGraphicOrigin.d.ts +49 -1
  85. package/graphic/MapNotesGraphicOrigin.d.ts +48 -1
  86. package/graphic/OGCFeatureGraphicOrigin.d.ts +42 -9
  87. package/graphic/OrientedImageryGraphicOrigin.d.ts +42 -9
  88. package/graphic/ParquetGraphicOrigin.d.ts +42 -9
  89. package/graphic/PointCloudGraphicOrigin.d.ts +43 -0
  90. package/graphic/SceneGraphicOrigin.d.ts +43 -0
  91. package/graphic/SketchGraphicOrigin.d.ts +43 -0
  92. package/graphic/StreamGraphicOrigin.d.ts +43 -0
  93. package/graphic/SubtypeGroupGraphicOrigin.d.ts +49 -1
  94. package/graphic/TileGraphicOrigin.d.ts +49 -1
  95. package/graphic/VectorTileGraphicOrigin.d.ts +43 -14
  96. package/graphic/VoxelGraphicOrigin.d.ts +43 -0
  97. package/graphic/WCSGraphicOrigin.d.ts +43 -0
  98. package/graphic/WFSGraphicOrigin.d.ts +42 -9
  99. package/graphic/getGraphicOriginTitle.d.ts +21 -3
  100. package/kernel.js +1 -1
  101. package/layers/GaussianSplatLayer.d.ts +2 -1
  102. package/layers/ParquetLayer.d.ts +24 -1
  103. package/layers/ParquetLayer.js +1 -1
  104. package/layers/mixins/ReloadableLayer.js +1 -1
  105. package/layers/mixins/SublayersOwner.js +1 -1
  106. package/layers/orientedImagery/transformations/utils.js +1 -1
  107. package/layers/save/featureLayerUtils.js +1 -1
  108. package/layers/save/imageryUtils.js +1 -1
  109. package/layers/save/mapImageLayerUtils.js +1 -1
  110. package/layers/save/mediaLayerUtils.js +1 -1
  111. package/layers/save/parquetLayerUtils.js +2 -0
  112. package/layers/save/streamLayerUtils.js +1 -1
  113. package/layers/support/LabelClass.d.ts +8 -2
  114. package/layers/support/Sublayer.js +1 -1
  115. package/layers/support/SubtypeSublayer.js +1 -1
  116. package/layers/support/layerUtils.js +1 -1
  117. package/layers/support/layersMapping.js +1 -1
  118. package/package.json +2 -2
  119. package/popup/content.js +1 -1
  120. package/portal/schemas/definitions.js +1 -1
  121. package/portal/schemas/webScene.js +1 -1
  122. package/tables/elements.d.ts +1 -0
  123. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  124. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  125. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +5 -5
  127. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  128. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  129. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  130. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  131. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  133. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  134. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  135. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  137. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  138. package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +1 -1
  139. package/views/selection/SelectionOperation.js +1 -1
  140. package/views/selection/types.d.ts +43 -3
  141. package/views/support/layerViewUtils.js +1 -1
  142. package/views/support/selectionUtils.js +1 -1
  143. package/views/webgl/Texture.js +1 -1
  144. package/webdoc/support/webdocSaveUtils.js +1 -1
  145. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  146. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  147. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  148. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  149. package/widgets/Sketch/SketchViewModel.js +1 -1
  150. package/widgets/support/SelectionList/GroupLayerItem.d.ts +6 -0
  151. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  152. package/widgets/support/SelectionList/ItemBase.js +1 -1
  153. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +6 -1
  154. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  155. package/widgets/support/SelectionToolbar.d.ts +8 -1
  156. package/widgets/support/SelectionToolbar.js +1 -1
  157. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  158. package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +0 -1
  159. package/assets/esri/core/workers/chunks/72071ea5de89720fbe42.js +0 -1
  160. package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +0 -1
  161. package/assets/esri/core/workers/chunks/b736046c6b4ede73ea46.js +0 -1
  162. package/assets/esri/core/workers/chunks/c19cd5a03b6d480fe53b.js +0 -1
  163. package/assets/esri/core/workers/chunks/d1f98c5249c487eb96f1.js +0 -1
@@ -222,7 +222,7 @@ return fallOffFunction(vv, vn, 0.1);
222
222
  vec2 uvOffset = uv + rf * blurSize;
223
223
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
224
224
  }
225
- fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,h])},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){let o=t.length/2,a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}let l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){let n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count,s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>n,d:()=>a,e:()=>h,f:()=>u,l:()=>c,n:()=>f,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[4],f=r[5],m=r[6],p=r[8],v=r[9],g=r[10],x=r[12],_=r[13],b=r[14],y=0,w=0;for(let r=0;r<l;r++){let r=t[y],i=t[y+1],a=t[y+2];e[w]=c*r+h*i+p*a+x,e[w+1]=u*r+f*i+v*a+_,e[w+2]=d*r+m*i+g*a+b,y+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){let o=Math.min(e.length/i,t.length/n),a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){let a=Math.min(e.length/n,t.length/o),s=0,l=0,c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function d(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,i=r){let n=Math.min(e.length/r,t.length/i),o=0,a=0;for(let s=0;s<n;s++){let n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){let t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},50867(e,t,r){r.d(t,{a:()=>n,b:()=>c,l:()=>l,n:()=>a,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2],s=t[x+3];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,e[_+3]=s,x+=o,_+=n}}function a(e,t){let r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*n,r=e*a,s=o[r],l=o[r+1],c=o[r+2],u=s*s+l*l+c*c;if(u>0){let e=1/Math.sqrt(u);i[t]=e*s,i[t+1]=e*l,i[t+2]=e*c}}}function s(e,t,r,i=4){let n=Math.min(e.length/i,t.count),o=t.typedBuffer,a=t.typedBufferStride,s=0,l=0;for(let t=0;t<n;t++)e[l]=r*o[s],e[l+1]=r*o[s+1],e[l+2]=r*o[s+2],e[l+3]=r*o[s+3],s+=a,l+=i}function l(e,t,r,i){c(e.typedBuffer,t,r,i,e.typedBufferStride)}function c(e,t,r,i,n=4){let o=Math.min(e.length/n,t.count),a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0,u=1/2.2;for(let t=0;t<o;t++)e[c]=i*(r*a[l])**u,e[c+1]=i*(r*a[l+1])**u,e[c+2]=i*(r*a[l+2])**u,e[c+3]=i*r*a[l+3],l+=s,c+=n}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:s,scaleView:function(e,t,r){s(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:o,transformMat3View:n,transformMat4:function(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=r[9],_=r[10],b=r[11],y=r[12],w=r[13],M=r[14],T=r[15],S=0,C=0;for(let r=0;r<l;r++){let r=t[S],i=t[S+1],a=t[S+2],s=t[S+3];e[C]=c*r+f*i+g*a+y*s,e[C+1]=u*r+m*i+x*a+w*s,e[C+2]=d*r+p*i+_*a+M*s,e[C+3]=h*r+v*i+b*a+T*s,S+=o,C+=n}},transformMat4View:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=(0,i.k)(n.length,o,4),c=(0,i.k)(a.length,s,4),u=Math.min(l,c),d=r[0],h=r[1],f=r[2],m=r[3],p=r[4],v=r[5],g=r[6],x=r[7],_=r[8],b=r[9],y=r[10],w=r[11],M=r[12],T=r[13],S=r[14],C=r[15];for(let e=0;e<u;e++){let t=e*o,r=e*s,i=a[r],l=a[r+1],c=a[r+2],u=a[r+3];n[t]=d*i+p*l+_*c+M*u,n[t+1]=h*i+v*l+b*c+T*u,n[t+2]=f*i+g*l+y*c+S*u,n[t+3]=m*i+x*l+w*c+C*u}}},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},61473(e,t,r){function i(e){return e||=globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t||=globalThis.location.hostname,t?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e):null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){let r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{fA:()=>n,vt:()=>i});const c=o(),u=a(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){let t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,d=145},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);let a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lC:()=>s,my:()=>a,tM:()=>d,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r&&=0===e,n&&=e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>f.length){let t=Math.max(2*f.length,e);f=new Uint8Array(t)}return new Uint8Array(f.buffer,0,e)}(e.length):n?d(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function s(e,t,r){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let i=a(e.length+t.length,r);for(let t=0;t<e.length;++t)i[t]=e[t];for(let r=0;r<t.length;++r)i[e.length+r]=t[r];return i}let l=h(131072);const c=[0],u=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<u.length?new Uint16Array(u.buffer,0,e):(e>l.length&&(l=h(Math.max(2*l.length,e))),new Uint32Array(l.buffer,0,e))}function h(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let f=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;let i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},65720(e,t,r){r.d(t,{C:()=>g,vt:()=>p,Qy:()=>v,ui:()=>x,ST:()=>T,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>b,GH:()=>w,Pi:()=>y,LJ:()=>S,c8:()=>O});var i=r(4341),n=r(58083),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(70328),u=r(71351);function d(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>d());var h=r(27921);function f(e,t,r,i){let{t0:n,t1:o}=i,a=(0,h.mN)(e,t),s=(0,h.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){let e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var m=r(32114);function p(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function v(){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 g(e,t){for(let r=0;r<I;r++)(0,h.C)(e[r],t[r]);return e}function x(e,t,r,i=F){let a=(0,n.lw)(m.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<P;++e){let t=(0,s.Z0)(m.Km.get(),D[e],a);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}(r,i)}function _(e,t){return b(e,t.center,t.radius)}function b(e,t,r){for(let i=0;i<I;i++){let n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function y(e,t,r){for(let i of E)if((0,h.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){let i=(0,c.gX)(t,B),n=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,n,a){let s=(0,o.Z0)(N,t,a);for(let t=0;t<I;t++){let o=e[t];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*r+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*i+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*n)>0)return!1}return!0}(e,i,n,a,s,r):function(e,t,r,i,n){for(let o=0;o<I;o++){let a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,n,a,s)}function M(e,t){return A(e,function(e,t=d()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,R.get()))}function T(e,t,r){return A(e,function(e,t,r=d()){let i=(0,o.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,R.get()))}function S(e,t,r){return function(e,t,r,i){let n={t0:0,t1:1};for(let o of t)if(!f(e[o],r,i,n))return!1;return n.t0<n.t1}(e,E,t,r)}function C(e,t){for(let r=0;r<I;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function A(e,t){for(let r=0;r<I;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const E=[0,1,2,3,5],O={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]},I=6,P=8,D=[(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)],R=new i.I(d),F=v(),B=(0,a.vt)(),N=(0,a.vt)()},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>c});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829)),s=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let n=(0,l.Vp)(i);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[s,c]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=c,h||=t.x<=s;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=c,h||=e.xmin<=s,h||=e.xmax>=c,h||=e.xmax<=s}if(!h)return e;let[{foldInto360Range:f},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),r),p=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(f(t,p),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),d=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[n,o]=i.valid,a=2*o,s=0,c=0;t>o?s=Math.ceil(Math.abs(t-o)/a):t<n&&(s=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(s-c)*a,d=u-t;return d>o?u-=a:d<n&&(u+=a),u}function f(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,n]=t.valid;return new i.hr(r,n)}const m=f(s.A.WGS84);f(s.A.WebMercator),r.d(t,["Y_",0,m])},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>d,rb:()=>h});var i=r(4341),n=r(35522),o=r(51850),a=r(11964);function s(e,t,r){let{direction:i,origin:o}=t,{p0:a,p1:s,p2:l}=e,c=s[0]-a[0],u=s[1]-a[1],d=s[2]-a[2],h=l[0]-a[0],f=l[1]-a[1],m=l[2]-a[2],p=i[1]*m-f*i[2],v=i[2]*h-m*i[0],g=i[0]*f-h*i[1],x=c*p+u*v+d*g;if(x>-1e-5&&x<1e-5)return!1;let _=1/x,b=o[0]-a[0],y=o[1]-a[1],w=o[2]-a[2],M=_*(b*p+y*v+w*g);if(M<0||M>1)return!1;let T=y*d-u*w,S=w*c-d*b,C=b*u-c*y,A=_*(i[0]*T+i[1]*S+i[2]*C);if(A<0||M+A>1)return!1;if(r){let e=_*(h*T+f*S+m*C);(0,n.hs)(r,i,e),(0,n.WQ)(r,o,r)}return!0}function l(e,t,r){let[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){let o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,n.Re)(f,t,e),(0,n.Re)(m,r,e),.5*(0,n.Bw)((0,n.$A)(f,f,m))}function d(e,t,r,i,o){(0,n.jb)(f,i,r),(0,n.jb)(p,o,r),(0,n.jb)(m,t,r);let a=(0,n.Om)(f,m),s=(0,n.Om)(p,m);if(a<=0&&s<=0)return void(0,n.C)(e,r);(0,n.jb)(m,t,i);let l=(0,n.Om)(f,m),c=(0,n.Om)(p,m);if(l>=0&&c<=l)return void(0,n.C)(e,i);let u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,n.Ln)(e,r,f,a/(a-l));(0,n.jb)(m,t,o);let d=(0,n.Om)(f,m),h=(0,n.Om)(p,m);if(h>=0&&d<=h)return void(0,n.C)(e,o);let v=d*s-a*h;if(v<=0&&s>=0&&h<=0)return void(0,n.Ln)(e,r,p,s/(s-h));let g=l*h-d*c;if(g<=0&&c-l>=0&&d-h>=0)return(0,n.jb)(m,o,i),void(0,n.Ln)(e,i,m,(c-l)/(c-l+(d-h)));let x=1/(g+v+u);(0,n.C)(e,r),(0,n.Ln)(e,e,f,v*x),(0,n.Ln)(e,e,p,u*x)}function h(e,t,r,i){(0,n.jb)(f,r,t),(0,n.jb)(m,i,t),(0,n.$A)(e,f,m);let o=(0,n.Bw)(e);return 0!==o&&((0,n.hs)(e,e,1/o),!0)}r(32114),new i.I(a.vt),new i.I(()=>{return e?{p0:(0,o.o8)(e.p0),p1:(0,o.o8)(e.p1),p2:(0,o.o8)(e.p2)}:{p0:(0,o.vt)(),p1:(0,o.vt)(),p2:(0,o.vt)()};var e});const f=(0,o.vt)(),m=(0,o.vt)(),p=(0,o.vt)()},21015(e,t,r){r.d(t,{R:()=>l});var i=r(56507),n=r(60999),o=r(49186),a=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);let s=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,a.QP)(s.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array;let r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}let n=e[0],o=e[1],a=0;for(let t=0;t<r;++t){let r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){let t=await new Blob([e]).text();return JSON.parse(t)}async function s(e,t){if("image/ktx2"===t)return new n(e);let r=new Blob([e],{type:t}),o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}let a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{let r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},24426(e,t,r){r.d(t,{fetch:()=>wr});var i=r(40876),n=r(61473),o=r(34727),a=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),f=r(70328);function m(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Float32Array(e)}var p=r(13030),v=r(73354),g=r(50867),x=r(43609),_=r(21015),b=r(84498),y=r(51530),w=r(88340);function M(e){if(null==e)return null;let t=null==e.offset?w.uY:e.offset,r=null==e.rotation?0:e.rotation,i=null==e.scale?w.Un:e.scale,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,s.vt)();return(0,a.lw)(c,o,l),(0,a.lw)(c,n,c),c}class T{constructor(){this.geometries=[],this.materials=[],this.textures=[]}}class S{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var C=r(56507),A=r(60999),E=r(49186),O=r(53966),I=r(69397);class P{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(let t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){let i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){let r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){let r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(let e of this._outer)yield e}*values(){for(let e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(let[e,t]of this._outer)for(let[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}clone(){let e=new P;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var D=r(17676),R=r(46140),F=r(97146),B=r(31217),N=r(46610),z=r(34275);function L(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.LW)(e)?Float16Array.from(e):(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,z.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var H=r(15142),V=r(94008),U=r(620);class j{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._children=void 0,(0,U.vA)(e.length>=1);let i=e.length;$.clear();let n=(0,f.Ie)();for(let o=0;o<i;++o){let i=t*e[o];for(let e=0;e<t;++e){let t=i+e;$.push(t),(0,f.iT)(n,r(k,t))}}this.box=n;let o=new V.iy,a=(0,f.gX)(n,o.center),s=.5*Math.max((0,f.VL)(n),(0,f.yr)(n),(0,f.uJ)(n)),l=s*s;for(let e=0;e<$.length;++e){let t=r(k,$.at(e)),i=(0,d.Re)(t,t,a),n=(0,d.uE)(i);if(n<=l)continue;let o=Math.sqrt(n),c=.5*(o-s);s+=c,l=s*s;let u=c/o;(0,d.Ln)(a,a,i,u)}o.radius=s,this.sphere=o,$.clear()}get children(){if(this._children)return this._children;let e=this.box;if((0,f.TF)(e)<=1)return;let{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,f.gX)(e,k),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){let o=r*i[e],l=t(G,o);for(let e=1;e<r;++e)(0,d.jk)(l,l,t(W,o+e));let c=+(l[0]<n[0])|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;let c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){let t=a[e];c[t][s[t]++]=i[e]}let u=[];for(let e=0;e<8;++e){let i=c[e];void 0!==i&&u.push(new j(i,r,t))}return this._children=u,this._children}static prune(){$.prune()}}const k=(0,h.vt)(),G=(0,h.vt)(),W=(0,h.vt)(),$=new H.A({deallocator:null});var Z=r(24326);class q{constructor(e){this.id=(0,Z.c)(),this.type=0,this._attributes=new Map;for(let[t,r]of e)this._attributes.set(t,{...r,indices:(0,F.Dg)(r.indices)})}get attributes(){return this._attributes}}class Y{constructor(){this.uid=(0,Z.c)()}}class X extends Y{constructor(e){super(),this.highlightName=e,this.channel=0}}var K=r(94656);class J extends q{constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,U.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){let{data:r,indices:i,size:n,stride:o}=e;return(0,U.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null==t?(e,t)=>{let n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:null==t?function(e,t,r){return(i,n)=>{let o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o):(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){let t=new J(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);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:L(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){let r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,K.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){return void 0===this._vertexPositionIndicesCache&&(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){let{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){let r=[];for(let i of e)r.push(t.indices[i]);return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){return(this.drawIndices??this.positionAttribute?.indices)?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,d.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){let e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;let r=this.material.primitiveVertexCount;(0,U.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);let i=(0,F.tM)(t/r);return new j(i,r,this.readPrimitivePosition)}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||Q}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){let t=new X(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{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)){let{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const Q=new Set;var ee=r(46859),te=r(49255),re=r(97768);class ie{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var ne=r(65786);class oe extends ie{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,re.Gz)(this._texture),this._textureNormal=(0,re.Gz)(this._textureNormal),this._textureEmissive=(0,re.Gz)(this._textureEmissive),this._textureOcclusion=(0,re.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,re.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new se(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){(null==this._texture||e!==this._texture.id)&&(this._texture=(0,re.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);let r=this._textures.acquire(e);if((0,D.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,re.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ae extends ne.Y{constructor(e=null){super(),this.textureEmissive=e}}class se extends ae{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}var le=r(48295);const ce=(0,h.vt)(),ue=(0,h.vt)(),de=(0,h.vt)(),he=(0,h.vt)();var fe=r(19245);class me{constructor(e,t){this.id=(0,Z.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,fe.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,fe.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,te._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,te._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,d.hZ)(e,0,0,0),(0,d.hZ)(he,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){let r=3*o;t(ce,r),t(ue,r+1),t(de,r+2);let a=(0,le.BU)(ce,ue,de);a?((0,d.WQ)(ce,ce,ue),(0,d.WQ)(ce,ce,de),(0,d.hs)(ce,ce,1/3*a),(0,d.WQ)(e,e,ce),i+=a):((0,d.WQ)(he,he,ce),(0,d.WQ)(he,he,ue),(0,d.WQ)(he,he,de),n+=3)}return!(0===n&&0===i||(0===i?0===n||((0,d.hs)(e,he,1/n),0):((0,d.hs)(e,e,1/i),0)))}(e,t,r/3)}}ne.Y;var pe=r(58682),ve=r(90629),ge=r(65720),xe=r(27921),_e=r(19419),be=r(11964);function ye(e,t){return e.isRectangle?(0,_e.Uc)(e.bounds,t):function(e,t){return Me(e[0],e[1],t)}(t,e.points)}function we(e,t,r,i){let n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,_e.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(let r of e.points)if((0,_e.Uc)(t,r))return!0;if(function(e,t){let r=e[0],i=e[1],n=e[2],o=e[3];return Me(r,i,t)||Me(n,i,t)||Me(n,o,t)||Me(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(Te(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,_e.fA)(n,o,a,s,Ie)))return!1;if(ye(e,t)||ye(e,r)||ye(e,i))return!0;for(let n of e.points)if((0,le.cq)(t,r,i,n,Pe))return!0;for(let n=0;n<e.points.length;n++){let o=e.points[n],a=e.points[(n+1)%e.points.length];if(Ce(t,r,o,a)||Ce(r,i,o,a)||Ce(i,t,o,a))return!0}return!1}function Me(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function Te(e,t,r){let i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,_e.Rj)(r,s,l)&&!(0,_e.Rj)(r,c,u))||Se(e,t,i,n,o,n)||Se(e,t,o,n,o,a)||Se(e,t,o,a,i,a)||Se(e,t,i,a,i,n))}function Se(e,t,r,i,n,o){let a=Ae(e[0],e[1],t[0],t[1],r,i),s=Ae(e[0],e[1],t[0],t[1],n,o),l=Ae(r,i,n,o,e[0],e[1]),c=Ae(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&Ee(e,t,r,i)||0===s&&Ee(e,t,n,o)||0===l&&Oe(r,i,n,o,e[0],e[1])||0===c&&Oe(r,i,n,o,t[0],t[1])}function Ce(e,t,r,i){return Se(e,t,r[0],r[1],i[0],i[1])}function Ae(e,t,r,i,n,o){let a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Pe?0:Math.sign(a)}function Ee(e,t,r,i){return Oe(e[0],e[1],t[0],t[1],r,i)}function Oe(e,t,r,i,n,o){return n>=Math.min(e,r)-Pe&&n<=Math.max(e,r)+Pe&&o>=Math.min(t,i)-Pe&&o<=Math.max(t,i)+Pe}const Ie=(0,_e.vt)(),Pe=((0,ve.r_)(),(0,ve.r_)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,be.vt)(),1e-9);class De{constructor(e){this.type=e,this.distance=1/0,this.renderDistance=1/0,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,h.vt)(),this.normal=(0,h.vt)()}reset(){this.distance=1/0,this.renderDistance=1/0,this.hasNormal=!1}update(e,t,r,i,n=e){this.distance=e,this.renderDistance=n,this.primitiveIndex=t,(0,d.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,d.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i,n=e){n<this.renderDistance&&this.update(e,t,r,i,n)}updateIfCloser(e){let{distance:t,renderDistance:r,primitiveIndex:i,point:n,normal:o}=e;this.updateIfCloserFromValues(t,i,n,e.hasNormal?o:null,r)}get valid(){return Number.isFinite(this.distance)}}function Re(e,t,r,i,n){if(!e.visible)return null;let o,a=new De(4);o=e.boundingInfo?Be(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Fe(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(let e of o)a.updateIfCloser(e);return a.valid?a:null}function*Fe(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;let{camera:c,screenPolygonPrimitiveProcessor:u}=e;for(let e=i;e<n;++e){let i=(s?.[e]??e)+l,n=null==s?i:e,h=3*i;Ne(Ve[0],o,h+0,a,n,t),Ne(Ve[1],o,h+1,a,n,t),Ne(Ve[2],o,h+2,a,n,t);let f,m=Ge;$e.reset();let p=Ue;for(let e of u.processTriangle(Ve))if(p.length=0,(0,xe.H)(c.frustum[4],e,()=>p.pushNew(),!1),!(p.length<3)){for(let e=0;e<p.length;e++)c.projectToScreen(p.at(e),je[e]);ze(r,je,p.length)&&(Le(c.eye,p,ke),f??=(0,le.rb)(Ge,Ve[0],Ve[1],Ve[2]),$e.updateIfCloserFromValues((0,d.Io)(c.eye,ke),i,ke,f?m:null))}$e.valid&&(yield $e)}}function*Be(e,t,r,i,n,o){let a;if(null==o?a=(0,ge.GH)(n.broadPhaseFrustum,t.box,i):((0,f.C)(He,t.box),o.applyToAabb(He),a=(0,ge.GH)(n.broadPhaseFrustum,He,i)),!a)return;let{primitiveIndices:s}=t,l=s.length;if(l>1e3){let a=t.children;if(void 0!==a){for(let t of a)yield*Be(e,t,r,i,n,o);return}}yield*Fe(r,i,n,0,l,e,o,s,0)}function Ne(e,t,r,i,n,o){let[a,s,l]=t(e,r);null==i?(0,d.hZ)(e,a,s,l):i.applyToVertex(e,a,s,l,n),o&&(0,d.Z0)(e,e,o)}function ze(e,t,r){for(let i=1;i<r-1;i++)if(we(e,t[0],t[i],t[i+1]))return!0;return!1}function Le(e,t,r){let i=1/0,n=t.at(0);for(let o=1;o<t.length-1;o++){(0,le.k3)(We,e,n,t.at(o),t.at(o+1));let a=(0,d.hG)(e,We);a<i&&(i=a,(0,d.C)(r,We))}}const He=(0,f.vt)(),Ve=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],Ue=new H.A({allocator:e=>e??(0,h.vt)()}),je=Array.from({length:12},()=>(0,ve.gs)()),ke=(0,h.vt)(),Ge=(0,h.vt)(),We=(0,h.vt)(),$e=new De(4);var Ze=r(16396);function qe(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){let t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function Ye(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Xe(e,t,r,i,n=1){let{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];let e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;let u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){let t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){let t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}}function Ke(e,t,r,i,n,o){switch(e){case"position":{(0,U.vA)(3===t.size);let i=n.getField(e,p.xs);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Ye(e,r,i,n);let{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,u=a.length,d=t[0],h=t[1],f=t[2],m=t[4],p=t[5],v=t[6],g=t[8],x=t[9],_=t[10],b=t[12],y=t[13],w=t[14];i*=c;let M=0,T=0,S=0,C=(0,l.tZ)(t)?e=>{M=o[e]+b,T=o[e+1]+y,S=o[e+2]+w}:e=>{let t=o[e],r=o[e+1],i=o[e+2];M=d*t+m*r+g*i+b,T=h*t+p*r+x*i+y,S=f*t+v*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),s[i]=M,s[i+1]=T,s[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)s[i]=M,s[i+1]=T,s[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,U.vA)(3===t.size);let r=n.getField(e,p.xs);(0,U.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Ye(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],b=s[10],y=!(0,l.ut)(s),w=1e-6,M=.999999;i*=u;let T=0,S=0,C=0,A=(0,l.tZ)(s)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{let t=o[e],r=o[e+1],i=o[e+2];T=h*t+p*r+x*i,S=f*t+v*r+_*i,C=m*t+g*r+b*i};if(1===n)if(y)for(let e=0;e<d;++e){A(3*a[e]);let t=T*T+S*S+C*C;if(t<M&&t>w){let e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*a[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*a[e]),y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),qe(t,r,o);break}case"uv0":{(0,U.vA)(2===t.size);let r=n.getField(e,p.ZD)??n.getField(e,p.gH);(0,U.vA)(!!r,`No buffer view for ${e}`),qe(t,r,o);break}case"uvi":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),qe(t,r,o);break}case"color":case"symbolColor":{let r=n.getField(e,p.XP);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(3===t.size||4===t.size),Xe(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{let r=n.getField(e,p.Y$)??n.getField(e,p.Y$);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(1===t.size),function(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,U.vA)(4===t.size);let i=n.getField(e,p.Eq);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],b=s[10],y=!(0,l.ut)(s),w=1e-6,M=.999999;if(i*=u,1===n)for(let e=0;e<d;++e){let t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3],d=h*r+p*n+x*s,T=f*r+v*n+_*s,S=m*r+g*n+b*s;if(y){let e=d*d+T*T+S*S;if(e<M&&e>w){let t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){let t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],d=o[t+3],T=h*r+p*s+x*l,S=f*r+v*s+_*l,C=m*r+g*s+b*l;if(y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"olidColor":(0,U.vA)(4===t.size),Xe(t,4,n.getField(e,p.XP),o)}}(0,h.vt)();class Je{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){null!=i&&function(e,t,r,i,n){let{buffer:o,offset:a}=n;for(let n of t.fields.keys()){let t=e.get(n),s=t?.indices;t&&s&&Ke(n,t,r,i,o,a)}}(r,this.layout,e,t,i)}}const Qe=ot(-1),et=ot(1),tt=Qe,rt=[];rt[0]=null,rt[1]=et,rt[2]=Qe,rt[3]=ot(-2),rt[4]=ot(-3);const it=rt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(tt,e));function nt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,te._$)(e)&&t?it[r]:rt[r]}function ot(e){return{factor:1*e,units:2*e}}rt[1]=et;var at=r(32198),st=r(51976),lt=r(34711);class ct extends lt.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,at.Cg)([(0,st.W)()],ct.prototype,"hasHighlightMixTexture",void 0),(0,at.Cg)([(0,st.W)()],ct.prototype,"emissionDimmingPass",void 0);class ut extends ct{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}function dt(e){return ft.output=+!!e.transparent,ft.polygonOffset=e.polygonOffset,ft.enableOITOffset=e.enableOITOffset,nt(ft)}function ht({units:e,factor:t},r,i,n){let o=pt*e;return i+((n?1-Math.abs((0,d.Om)(r,n)):0)*t*mt+o)}(0,at.Cg)([(0,st.W)({count:5})],ut.prototype,"polygonOffset",void 0),(0,at.Cg)([(0,st.W)()],ut.prototype,"transparent",void 0),(0,at.Cg)([(0,st.W)()],ut.prototype,"enableOITOffset",void 0);const ft=new ut,mt=2e-5,pt=2e-6,vt=(0,h.vt)();var gt=r(91429),xt=r(91829),_t=r(4431),bt=r(1843),yt=r(72824),wt=r(13840),Mt=r(42958),Tt=r(16943),St=r(90644);const Ct=(0,St.p3)(1,0,1,771);function At(e,t=!1,r=!1){if(r)return St.uR;switch(e){case 0:return t?St.RC:St.T8;case 1:return Ct;default:return null}}function Et(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?St.Uy:null;case 1:return null}}function Ot(e,t=513){return{func:(0,te._$)(e)?515:t}}(0,xt._Y)();const It={mask:255},Pt=(0,St.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),Dt=(0,St.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,St.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,St.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680}),r(4576),r(66289);var Rt=r(69622),Ft=r(65529),Bt=r(32728);class Nt{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",p.Eq),this.color=e.getField("instanceColor",p.XP),this.olidColor=e.getField("instanceOlidColor",p.XP),this.state=e.getField("state",p.SL),this.lodLevel=e.getField("lodLevel",p.SL)}}let zt=class extends Rt.A{constructor(e,t){super(e),this.events=new Ft.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ht(Lt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Gt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Nt(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();let e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){let t=this._view.state;(0,U.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){let t=this._view.state;(0,U.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){let t=this._view,r=Vt,i=Ut;t.localTransform.getMat(e,jt),t.globalTransform.getMat(e,kt);let n=(0,l.lw)(kt,kt,jt);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,a.z0)(i,n),t.model.setMat(e,i);let o=(0,Bt.wp)(Vt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,a.B8)(i,i),(0,a.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){let r=this._view;r.model.getMat(e,Ut),r.modelOrigin.getVec(e,Vt),t[0]=Ut[0],t[1]=Ut[1],t[2]=Ut[2],t[3]=0,t[4]=Ut[3],t[5]=Ut[4],t[6]=Ut[5],t[7]=0,t[8]=Ut[6],t[9]=Ut[7],t[10]=Ut[8],t[11]=0,t[12]=Vt[0],t[13]=Vt[1],t[14]=Vt[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(Vt,this,e),t*=Math.max(Vt[0],Vt[1],Vt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Vt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Vt[0],Vt[1],Vt[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){let{_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){let t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){let 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){let r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){let 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(Gt,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Nt(this._buffer)}_findSlot(){let e=this._view.state,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,at.Cg)([(0,gt.MZ)({constructOnly:!0})],zt.prototype,"shaderTransformation",void 0),(0,at.Cg)([(0,gt.MZ)()],zt.prototype,"_size",void 0),(0,at.Cg)([(0,gt.MZ)({readOnly:!0})],zt.prototype,"size",null),zt=(0,at.Cg)([(0,gt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],zt);const Lt=(0,bt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ht(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Tt.E)()&&e.vec4u8("instanceOlidColor"),e}const Vt=(0,h.vt)(),Ut=(0,s.vt)(),jt=(0,c.vt)(),kt=(0,c.vt)(),Gt=64,Wt=(0,bt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var $t=r(74810),Zt=r(28491),qt=r(49788);class Yt extends yt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=$t.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.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,xt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=qt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}yt.gy;let Xt=class extends Mt.w{constructor(e,t){let i=(0,_t.U)(Qt(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,_t.U)(function(e){return Ht(Wt.clone(),e)}(t)))),super(e,t,i),this.shader=new wt.r(Zt.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){let{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,St.Ey)({blending:i?At(r,!1,e.emissionDimmingPass):null,culling:Jt(e)?(0,St.Xt)(n):null,depthTest:Ot(r,Kt(o)),depthWrite:Et(e),colorWrite:St.kn,stencilWrite:a?It:null,stencilTest:a?t?Dt:Pt:null,polygonOffset:nt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Kt(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function Jt(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Qt(e){let t=(0,bt.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",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Tt.E)()&&t.vec4u8("olidColor"),t}Xt=(0,at.Cg)([(0,gt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Xt);class er extends ut{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.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return+!!this.hasTextures}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,at.Cg)([(0,st.W)({count:4})],er.prototype,"alphaDiscardMode",void 0),(0,at.Cg)([(0,st.W)({count:3})],er.prototype,"doubleSidedMode",void 0),(0,at.Cg)([(0,st.W)({count:8})],er.prototype,"pbrMode",void 0),(0,at.Cg)([(0,st.W)({count:3})],er.prototype,"cullFace",void 0),(0,at.Cg)([(0,st.W)({count:3})],er.prototype,"normalType",void 0),(0,at.Cg)([(0,st.W)({count:4})],er.prototype,"customDepthTest",void 0),(0,at.Cg)([(0,st.W)({count:8})],er.prototype,"emissionSource",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasVertexColors",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasSymbolColors",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasVerticalOffset",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasColorTexture",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasMetallicRoughnessTexture",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasOcclusionTexture",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasNormalTexture",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasScreenSizePerspective",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasVertexTangents",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasOccludees",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"instanced",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"instancedDoublePrecision",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasModelTransformation",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"offsetBackfaces",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasVVSize",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasVVColor",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"receiveShadows",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasShadowHighlights",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"receiveAmbientOcclusion",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"receiveGlobalIllumination",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"textureAlphaPremultiplied",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"instancedFeatureAttribute",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"instancedColor",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"writeDepth",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"snowCover",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasColorTextureTransform",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasEmissionTextureTransform",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasNormalTextureTransform",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasOcclusionTextureTransform",void 0),(0,at.Cg)([(0,st.W)()],er.prototype,"hasMetallicRoughnessTextureTransform",void 0);var tr=r(57323);let rr=class extends Xt{constructor(){super(...arguments),this.shader=new wt.r(tr.R,()=>r.e(9933).then(()=>r(39933)))}};rr=(0,at.Cg)([(0,gt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],rr);class ir extends st.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,at.Cg)([(0,st.W)()],ir.prototype,"receiveShadows",void 0);class nr extends me{constructor(e,t){super(e,ar),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,te.uw)(e)&&!this.transparent],[4,e=>(0,te.uw)(e)&&this.transparent]]),this._layout=Qt(this.parameters),this._configuration=new er(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=qt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,te._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=r.receiveGlobalIllumination=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){let a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,d.Re)(sr,i,a),n=(0,d.Re)(lr,n,a)),o=function(e,t,r,i){let n=dt(t);if(!n)return e;let o=(0,d.oW)(vt,i,r);return(t,r,i,a)=>e(t,ht(n,o,r,i),i,a)}(o,this._configuration,i,n),(0,pe.Uy)(e,r,i,n,(0,Ze.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.renderDistance=function(e,t,r,i,n){let o=dt(r);return o?ht(o,(0,d.oW)(vt,n,i),e,t):e}(e.renderDistance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Re(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new or(e)}createBufferWriter(){return new Je(this._layout)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,f.Ne)(e,(0,d.WQ)(mr,(0,f.pg)(e,mr),r)),(0,f.vI)(e,(0,d.WQ)(mr,(0,f.Lu)(e,mr),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;let r=t.camera;(0,d.hZ)(dr,e[12],e[13],e[14]);let i=null;switch(t.viewingMode){case 1:i=(0,d.S8)(ur,dr);break;case 2:i=(0,d.C)(ur,cr)}let n=(0,d.Re)(hr,dr,r.eye),o=(0,d.Bw)(n),a=(0,d.hs)(n,n,1/o),s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(i,a));let l=(0,fe.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(i,i,l),(0,d.ei)(fr,i,t.transform.inverseRotation)}}class or extends oe{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?rr:Xt,e)}}class ar extends Yt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!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 null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const sr=(0,h.vt)(),lr=(0,h.vt)(),cr=(0,h.fA)(0,0,1),ur=(0,h.vt)(),dr=(0,h.vt)(),hr=(0,h.vt)(),fr=(0,h.vt)(),mr=(0,h.vt)(),pr=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class vr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function gr(e){let t=e.params,r=t.topology,i=!0;switch(t.vertexAttributes||(pr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{let e=t.faces;if(e){if(t.vertexAttributes)for(let r in t.vertexAttributes){let t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(pr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(pr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(pr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else pr().warn("Indexed geometries must specify faces"),i=!1;break}default:pr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(pr().warn("Geometry requires material"),i=!1);let n=e.params.vertexAttributes;for(let e in n)n[e].values||(pr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function xr(e){let t=(0,f.Ie)();return e.forEach(e=>{let r=e.boundingInfo;null!=r&&(0,f.RF)(t,r.box)}),t}function _r(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function br(e){let t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const yr=new R.A(1,2,"wosr");async function wr(e,t){let s,w=function(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null==t[4]?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===w.fileType){let e=await(t.cache?t.cache.loadWOSR(w.url,t):async function(e,t){let r=await async function(e,t){let r=await(0,A.Ke)((0,C.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new E.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){let r=[];for(let i in e){let n=e[i],o=n.images[0].data;if(!o){pr().warn("Externally referenced texture data is not yet supported");continue}let a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==_r(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}let i=await Promise.all(r),n={};for(let e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t),n=0;for(let e in i)if(i.hasOwnProperty(e)){let t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new vr(r,i,n+(0,I.Qh)(r))}(w.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){let r=[],i=[],n=[],o=new P,a=e.resource,s=R.A.parse(a.version||"1.0","wosr");yr.validate(s);let l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},d=e.textures,f=0,m=new Map;for(let e=0;e<c.length;e++){let a=c[e];if(!gr(a))continue;let s=br(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;let t=a.params.faces;for(let r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(let e in l){let t=l[e],r=t.values,i=v(e)??(0,F.tM)(x);p.push([e,new N.n(r,i,t.valuesPerElement,!0)])}let _=s.texture,b=d&&d[_];if(b&&!m.has(_)){let{image:e,parameters:t}=b,r=new ee.h(e,t);i.push(r),m.set(_,r)}let y=m.get(_),w=y?y.id:void 0,M=s.material,T=o.get(M,_);if(null==T){let e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);let r=b?_r(b.alphaChannelUsage):void 0,i={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),T=new nr(i,t),o.set(M,_,T)}n.push(T);let S=new J(T,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:xr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}if(t.cache)s=await t.cache.loadGLTF(w.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await r.e(1698).then(()=>r(51698));s=await e(new _.R,w.url,t,t.usePBR,t.useEmissive)}let{engineResources:T,referenceBoundingBox:O}=function(e,t,r){let n=e.model,s=e.meta,_=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=_&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let n of i.parts){let i=n.attributes.normal;if(null==i)return;let o=n.attributes.position,a=o.count,s=(0,h.vt)(),u=(0,h.vt)(),f=(0,h.vt)(),m=new Float32Array(4*a),v=new Float32Array(3*a),g=(0,l.B8)((0,c.vt)(),n.transform),x=0,_=0;for(let l=0;l<a;l++){o.getVec(l,u),i.getVec(l,s),(0,d.Z0)(u,u,n.transform),(0,d.Re)(f,u,t.center),(0,d.Qr)(f,f,t.radius);let a=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(f,f,t.radius),null!==g&&(0,d.Z0)(f,f,g),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(a>-1?(0,d.Cc)(f,f,s,.2):(0,d.Cc)(f,f,s,Math.min(-4*a-3.8,1))),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,m[_]=h,m[_+1]=h,m[_+2]=h,m[_+3]=1,_+=4}n.attributes.normal=new p.xs(v.buffer),n.attributes.color=new p.Eq(m.buffer)}}}(e,_));let T=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:w,mrrFactors:$t.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:$t.mb},A={...t.materialParameters,treeRendering:w},E=[],O=new Map,I=new Map,P=n.lods.length,D=(0,f.Ie)();return n.lods.forEach((e,s)=>{let l=!0===t.skipHighLods&&(P>1&&0===s||P>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;let c=new S(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let r=l?new nr({},t):function(e,t,r,n,o,a,s,l,c){let d=e.materials.get(t.material);if(null==d)return null;let{normal:f,color:m,texCoord0:p,tangent:v}=t.attributes,g=t.material+(f?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!a.has(g)){if(x){let t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){let n=e.textures.get(t);if(n){let e=n.data,o=r&&!(0,y.x3)(e)?l.compressionOptions:void 0;s.set(t,new ee.h((0,y.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&i,encoding:(0,y.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}let r=(0,i.xV)(d.color[0]),f=(0,i.xV)(d.color[1]),m=(0,i.xV)(d.color[2]),p=null!=d.colorTexture&&x?s.get(d.colorTexture):null,v=(0,$t.Jr)(d),w=null==d.normalTextureTransform?.scale?u.Un:d.normalTextureTransform?.scale;a.set(g,new nr({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,f,m],ambient:[r,f,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:p?.id,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&x?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&x?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&x&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&x?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?h.uY:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null==d.emissiveStrengthKHR?1:d.emissiveStrengthKHR,emissiveStrengthFromSymbol:null==o.emissiveStrengthFromSymbol?void 0:o.emissiveStrengthFromSymbol,mrrFactors:v?$t.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:M(d.colorTextureTransform),normalTextureTransformMatrix:M(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:M(d.occlusionTextureTransform),emissiveTextureTransformMatrix:M(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(d.metallicRoughnessTextureTransform),...o},l))}let w=a.get(g);if(r.stageResources.materials.push(w),x){let e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,c,C,A,O,I,t,w),{geometry:d,vertexCount:_}=function(e,t){let r=e.attributes.position.count,i=(0,b.x)(e.indices||r,e.primitiveType),n=m(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.t)(n,s,e.transform,3,l);let c=[["position",new N.n(n,i,3,!0)]];if(null!=e.attributes.normal){let t=m(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,a.Ge)(Mr,e.transform),(0,v.b)(t,n,Mr,3,s),(0,o.or)(Mr)&&(0,v.n)(t,t),c.push(["normal",new N.n(t,i,3,!0)])}if(null!=e.attributes.tangent){let t=m(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,a.z0)(Mr,e.transform),(0,g.t)(t,n,Mr,4,s),(0,o.or)(Mr)&&(0,v.n)(t,t,4),c.push(["tangent",new N.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){let t=m(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new N.n(t,i,2,!0)])}let u=e.attributes.color;if(null!=u){let t=new Uint8Array(4*r);4===u.elementCount?u instanceof p.Eq?(0,g.b)(t,u,1,255):(u instanceof p.XP||u instanceof p.Uz)&&(0,g.b)(t,u,1/255,255):(t.fill(255),u instanceof p.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new N.n(t,i,4,!0)])}return{geometry:new J(t,c),vertexCount:r}}(e,r??new nr({},t)),T=d.boundingInfo;null!=T&&0===s&&(0,f.RF)(D,T.box),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=_)}),l||E.push(c)}),{engineResources:E,referenceBoundingBox:D}}(s,t,w.specifiedLodIndex);return{lods:T,referenceBoundingBox:O,isEsriSymbolResource:s.meta.isEsriSymbolResource,isWosr:!1}}const Mr=(0,s.vt)()},26857(e,t,r){var i=r(32198),n=r(69622),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{A7:()=>o,Y0:()=>n});var i=r(29941);class n extends i.v{constructor(e){super(),this.spherical=e,this.draped=!1}}function o(e){(function(e){e.varyings.add("linearDepth","float",{invariant:!0})})(e),e.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
225
+ fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,h])},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){let o=t.length/2,a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}let l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){let n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count,s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>n,d:()=>a,e:()=>h,f:()=>u,l:()=>c,n:()=>f,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[4],f=r[5],m=r[6],p=r[8],v=r[9],g=r[10],x=r[12],_=r[13],b=r[14],y=0,w=0;for(let r=0;r<l;r++){let r=t[y],i=t[y+1],a=t[y+2];e[w]=c*r+h*i+p*a+x,e[w+1]=u*r+f*i+v*a+_,e[w+2]=d*r+m*i+g*a+b,y+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){let o=Math.min(e.length/i,t.length/n),a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){let a=Math.min(e.length/n,t.length/o),s=0,l=0,c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function d(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,i=r){let n=Math.min(e.length/r,t.length/i),o=0,a=0;for(let s=0;s<n;s++){let n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){let t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},50867(e,t,r){r.d(t,{a:()=>n,b:()=>c,l:()=>l,n:()=>a,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2],s=t[x+3];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,e[_+3]=s,x+=o,_+=n}}function a(e,t){let r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*n,r=e*a,s=o[r],l=o[r+1],c=o[r+2],u=s*s+l*l+c*c;if(u>0){let e=1/Math.sqrt(u);i[t]=e*s,i[t+1]=e*l,i[t+2]=e*c}}}function s(e,t,r,i=4){let n=Math.min(e.length/i,t.count),o=t.typedBuffer,a=t.typedBufferStride,s=0,l=0;for(let t=0;t<n;t++)e[l]=r*o[s],e[l+1]=r*o[s+1],e[l+2]=r*o[s+2],e[l+3]=r*o[s+3],s+=a,l+=i}function l(e,t,r,i){c(e.typedBuffer,t,r,i,e.typedBufferStride)}function c(e,t,r,i,n=4){let o=Math.min(e.length/n,t.count),a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0,u=1/2.2;for(let t=0;t<o;t++)e[c]=i*(r*a[l])**u,e[c+1]=i*(r*a[l+1])**u,e[c+2]=i*(r*a[l+2])**u,e[c+3]=i*r*a[l+3],l+=s,c+=n}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:s,scaleView:function(e,t,r){s(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:o,transformMat3View:n,transformMat4:function(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=r[9],_=r[10],b=r[11],y=r[12],w=r[13],M=r[14],T=r[15],S=0,C=0;for(let r=0;r<l;r++){let r=t[S],i=t[S+1],a=t[S+2],s=t[S+3];e[C]=c*r+f*i+g*a+y*s,e[C+1]=u*r+m*i+x*a+w*s,e[C+2]=d*r+p*i+_*a+M*s,e[C+3]=h*r+v*i+b*a+T*s,S+=o,C+=n}},transformMat4View:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=(0,i.k)(n.length,o,4),c=(0,i.k)(a.length,s,4),u=Math.min(l,c),d=r[0],h=r[1],f=r[2],m=r[3],p=r[4],v=r[5],g=r[6],x=r[7],_=r[8],b=r[9],y=r[10],w=r[11],M=r[12],T=r[13],S=r[14],C=r[15];for(let e=0;e<u;e++){let t=e*o,r=e*s,i=a[r],l=a[r+1],c=a[r+2],u=a[r+3];n[t]=d*i+p*l+_*c+M*u,n[t+1]=h*i+v*l+b*c+T*u,n[t+2]=f*i+g*l+y*c+S*u,n[t+3]=m*i+x*l+w*c+C*u}}},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},61473(e,t,r){function i(e){return e||=globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t||=globalThis.location.hostname,t?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e):null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){let r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{fA:()=>n,vt:()=>i});const c=o(),u=a(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){let t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,d=145},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);let a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lC:()=>s,my:()=>a,tM:()=>d,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r&&=0===e,n&&=e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>f.length){let t=Math.max(2*f.length,e);f=new Uint8Array(t)}return new Uint8Array(f.buffer,0,e)}(e.length):n?d(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function s(e,t,r){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let i=a(e.length+t.length,r);for(let t=0;t<e.length;++t)i[t]=e[t];for(let r=0;r<t.length;++r)i[e.length+r]=t[r];return i}let l=h(131072);const c=[0],u=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<u.length?new Uint16Array(u.buffer,0,e):(e>l.length&&(l=h(Math.max(2*l.length,e))),new Uint32Array(l.buffer,0,e))}function h(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let f=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;let i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},65720(e,t,r){r.d(t,{C:()=>g,vt:()=>p,Qy:()=>v,ui:()=>x,ST:()=>T,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>b,GH:()=>w,Pi:()=>y,LJ:()=>S,c8:()=>O});var i=r(4341),n=r(58083),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(70328),u=r(71351);function d(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>d());var h=r(27921);function f(e,t,r,i){let{t0:n,t1:o}=i,a=(0,h.mN)(e,t),s=(0,h.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){let e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var m=r(32114);function p(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function v(){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 g(e,t){for(let r=0;r<I;r++)(0,h.C)(e[r],t[r]);return e}function x(e,t,r,i=F){let a=(0,n.lw)(m.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<P;++e){let t=(0,s.Z0)(m.Km.get(),D[e],a);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}(r,i)}function _(e,t){return b(e,t.center,t.radius)}function b(e,t,r){for(let i=0;i<I;i++){let n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function y(e,t,r){for(let i of E)if((0,h.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){let i=(0,c.gX)(t,B),n=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,n,a){let s=(0,o.Z0)(N,t,a);for(let t=0;t<I;t++){let o=e[t];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*r+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*i+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*n)>0)return!1}return!0}(e,i,n,a,s,r):function(e,t,r,i,n){for(let o=0;o<I;o++){let a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,n,a,s)}function M(e,t){return A(e,function(e,t=d()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,R.get()))}function T(e,t,r){return A(e,function(e,t,r=d()){let i=(0,o.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,R.get()))}function S(e,t,r){return function(e,t,r,i){let n={t0:0,t1:1};for(let o of t)if(!f(e[o],r,i,n))return!1;return n.t0<n.t1}(e,E,t,r)}function C(e,t){for(let r=0;r<I;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function A(e,t){for(let r=0;r<I;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const E=[0,1,2,3,5],O={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]},I=6,P=8,D=[(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)],R=new i.I(d),F=v(),B=(0,a.vt)(),N=(0,a.vt)()},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>c});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829)),s=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let n=(0,l.Vp)(i);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[s,c]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=c,h||=t.x<=s;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=c,h||=e.xmin<=s,h||=e.xmax>=c,h||=e.xmax<=s}if(!h)return e;let[{foldInto360Range:f},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),r),p=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(f(t,p),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),d=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[n,o]=i.valid,a=2*o,s=0,c=0;t>o?s=Math.ceil(Math.abs(t-o)/a):t<n&&(s=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(s-c)*a,d=u-t;return d>o?u-=a:d<n&&(u+=a),u}function f(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,n]=t.valid;return new i.hr(r,n)}const m=f(s.A.WGS84);f(s.A.WebMercator),r.d(t,["Y_",0,m])},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>d,rb:()=>h});var i=r(4341),n=r(35522),o=r(51850),a=r(11964);function s(e,t,r){let{direction:i,origin:o}=t,{p0:a,p1:s,p2:l}=e,c=s[0]-a[0],u=s[1]-a[1],d=s[2]-a[2],h=l[0]-a[0],f=l[1]-a[1],m=l[2]-a[2],p=i[1]*m-f*i[2],v=i[2]*h-m*i[0],g=i[0]*f-h*i[1],x=c*p+u*v+d*g;if(x>-1e-5&&x<1e-5)return!1;let _=1/x,b=o[0]-a[0],y=o[1]-a[1],w=o[2]-a[2],M=_*(b*p+y*v+w*g);if(M<0||M>1)return!1;let T=y*d-u*w,S=w*c-d*b,C=b*u-c*y,A=_*(i[0]*T+i[1]*S+i[2]*C);if(A<0||M+A>1)return!1;if(r){let e=_*(h*T+f*S+m*C);(0,n.hs)(r,i,e),(0,n.WQ)(r,o,r)}return!0}function l(e,t,r){let[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){let o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,n.Re)(f,t,e),(0,n.Re)(m,r,e),.5*(0,n.Bw)((0,n.$A)(f,f,m))}function d(e,t,r,i,o){(0,n.jb)(f,i,r),(0,n.jb)(p,o,r),(0,n.jb)(m,t,r);let a=(0,n.Om)(f,m),s=(0,n.Om)(p,m);if(a<=0&&s<=0)return void(0,n.C)(e,r);(0,n.jb)(m,t,i);let l=(0,n.Om)(f,m),c=(0,n.Om)(p,m);if(l>=0&&c<=l)return void(0,n.C)(e,i);let u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,n.Ln)(e,r,f,a/(a-l));(0,n.jb)(m,t,o);let d=(0,n.Om)(f,m),h=(0,n.Om)(p,m);if(h>=0&&d<=h)return void(0,n.C)(e,o);let v=d*s-a*h;if(v<=0&&s>=0&&h<=0)return void(0,n.Ln)(e,r,p,s/(s-h));let g=l*h-d*c;if(g<=0&&c-l>=0&&d-h>=0)return(0,n.jb)(m,o,i),void(0,n.Ln)(e,i,m,(c-l)/(c-l+(d-h)));let x=1/(g+v+u);(0,n.C)(e,r),(0,n.Ln)(e,e,f,v*x),(0,n.Ln)(e,e,p,u*x)}function h(e,t,r,i){(0,n.jb)(f,r,t),(0,n.jb)(m,i,t),(0,n.$A)(e,f,m);let o=(0,n.Bw)(e);return 0!==o&&((0,n.hs)(e,e,1/o),!0)}r(32114),new i.I(a.vt),new i.I(()=>{return e?{p0:(0,o.o8)(e.p0),p1:(0,o.o8)(e.p1),p2:(0,o.o8)(e.p2)}:{p0:(0,o.vt)(),p1:(0,o.vt)(),p2:(0,o.vt)()};var e});const f=(0,o.vt)(),m=(0,o.vt)(),p=(0,o.vt)()},21015(e,t,r){r.d(t,{R:()=>l});var i=r(56507),n=r(60999),o=r(49186),a=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);let s=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,a.QP)(s.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array;let r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}let n=e[0],o=e[1],a=0;for(let t=0;t<r;++t){let r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){let t=await new Blob([e]).text();return JSON.parse(t)}async function s(e,t){if("image/ktx2"===t)return new n(e);let r=new Blob([e],{type:t}),o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}let a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{let r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},24426(e,t,r){r.d(t,{fetch:()=>Tr});var i=r(40876),n=r(61473),o=r(34727),a=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),f=r(70328);function m(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Float32Array(e)}var p=r(13030),v=r(73354),g=r(50867),x=r(43609),_=r(21015),b=r(84498),y=r(51530),w=r(88340);function M(e){if(null==e)return null;let t=null==e.offset?w.uY:e.offset,r=null==e.rotation?0:e.rotation,i=null==e.scale?w.Un:e.scale,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,s.vt)();return(0,a.lw)(c,o,l),(0,a.lw)(c,n,c),c}class T{constructor(){this.geometries=[],this.materials=[],this.textures=[]}}class S{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var C=r(56507),A=r(60999),E=r(49186),O=r(53966),I=r(69397);class P{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(let t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){let i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){let r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){let r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(let e of this._outer)yield e}*values(){for(let e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(let[e,t]of this._outer)for(let[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}clone(){let e=new P;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var D=r(17676),R=r(46140),F=r(97146),B=r(31217),N=r(46610),z=r(34275);function L(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.LW)(e)?Float16Array.from(e):(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,z.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var H=r(15142),V=r(94008),U=r(620);class j{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._children=void 0,(0,U.vA)(e.length>=1);let i=e.length;$.clear();let n=(0,f.Ie)();for(let o=0;o<i;++o){let i=t*e[o];for(let e=0;e<t;++e){let t=i+e;$.push(t),(0,f.iT)(n,r(k,t))}}this.box=n;let o=new V.iy,a=(0,f.gX)(n,o.center),s=.5*Math.max((0,f.VL)(n),(0,f.yr)(n),(0,f.uJ)(n)),l=s*s;for(let e=0;e<$.length;++e){let t=r(k,$.at(e)),i=(0,d.Re)(t,t,a),n=(0,d.uE)(i);if(n<=l)continue;let o=Math.sqrt(n),c=.5*(o-s);s+=c,l=s*s;let u=c/o;(0,d.Ln)(a,a,i,u)}o.radius=s,this.sphere=o,$.clear()}get children(){if(this._children)return this._children;let e=this.box;if((0,f.TF)(e)<=1)return;let{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,f.gX)(e,k),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){let o=r*i[e],l=t(G,o);for(let e=1;e<r;++e)(0,d.jk)(l,l,t(W,o+e));let c=+(l[0]<n[0])|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;let c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){let t=a[e];c[t][s[t]++]=i[e]}let u=[];for(let e=0;e<8;++e){let i=c[e];void 0!==i&&u.push(new j(i,r,t))}return this._children=u,this._children}static prune(){$.prune()}}const k=(0,h.vt)(),G=(0,h.vt)(),W=(0,h.vt)(),$=new H.A({deallocator:null});var Z=r(24326);class q{constructor(e){this.id=(0,Z.c)(),this.type=0,this._attributes=new Map;for(let[t,r]of e)this._attributes.set(t,{...r,indices:(0,F.Dg)(r.indices)})}get attributes(){return this._attributes}}class Y{constructor(){this.uid=(0,Z.c)()}}class X extends Y{constructor(e){super(),this.highlightName=e,this.channel=0}}var K=r(94656);class J extends q{constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,U.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){let{data:r,indices:i,size:n,stride:o}=e;return(0,U.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null==t?(e,t)=>{let n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:null==t?function(e,t,r){return(i,n)=>{let o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o):(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){let t=new J(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);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:L(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){let r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,K.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){return void 0===this._vertexPositionIndicesCache&&(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){let{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){let r=[];for(let i of e)r.push(t.indices[i]);return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){return(this.drawIndices??this.positionAttribute?.indices)?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,d.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){let e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;let r=this.material.primitiveVertexCount;(0,U.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);let i=(0,F.tM)(t/r);return new j(i,r,this.readPrimitivePosition)}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||Q}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){let t=new X(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{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)){let{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const Q=new Set;var ee=r(46859),te=r(49255),re=r(97768);class ie{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var ne=r(65786);class oe extends ie{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,re.Gz)(this._texture),this._textureNormal=(0,re.Gz)(this._textureNormal),this._textureEmissive=(0,re.Gz)(this._textureEmissive),this._textureOcclusion=(0,re.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,re.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new se(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){(null==this._texture||e!==this._texture.id)&&(this._texture=(0,re.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);let r=this._textures.acquire(e);if((0,D.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,re.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ae extends ne.Y{constructor(e=null){super(),this.textureEmissive=e}}class se extends ae{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}var le=r(48295);const ce=(0,h.vt)(),ue=(0,h.vt)(),de=(0,h.vt)(),he=(0,h.vt)();var fe=r(19245);class me{constructor(e,t){this.id=(0,Z.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,fe.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,fe.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,te._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,te._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,d.hZ)(e,0,0,0),(0,d.hZ)(he,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){let r=3*o;t(ce,r),t(ue,r+1),t(de,r+2);let a=(0,le.BU)(ce,ue,de);a?((0,d.WQ)(ce,ce,ue),(0,d.WQ)(ce,ce,de),(0,d.hs)(ce,ce,1/3*a),(0,d.WQ)(e,e,ce),i+=a):((0,d.WQ)(he,he,ce),(0,d.WQ)(he,he,ue),(0,d.WQ)(he,he,de),n+=3)}return!(0===n&&0===i||(0===i?0===n||((0,d.hs)(e,he,1/n),0):((0,d.hs)(e,e,1/i),0)))}(e,t,r/3)}}ne.Y;var pe=r(58682),ve=r(90629),ge=r(65720),xe=r(27921),_e=r(19419),be=r(11964);function ye(e,t){return e.isRectangle?(0,_e.Uc)(e.bounds,t):function(e,t){return Me(e[0],e[1],t)}(t,e.points)}function we(e,t,r,i){let n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,_e.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(let r of e.points)if((0,_e.Uc)(t,r))return!0;if(function(e,t){let r=e[0],i=e[1],n=e[2],o=e[3];return Me(r,i,t)||Me(n,i,t)||Me(n,o,t)||Me(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(Te(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,_e.fA)(n,o,a,s,Ie)))return!1;if(ye(e,t)||ye(e,r)||ye(e,i))return!0;for(let n of e.points)if((0,le.cq)(t,r,i,n,Pe))return!0;for(let n=0;n<e.points.length;n++){let o=e.points[n],a=e.points[(n+1)%e.points.length];if(Ce(t,r,o,a)||Ce(r,i,o,a)||Ce(i,t,o,a))return!0}return!1}function Me(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function Te(e,t,r){let i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,_e.Rj)(r,s,l)&&!(0,_e.Rj)(r,c,u))||Se(e,t,i,n,o,n)||Se(e,t,o,n,o,a)||Se(e,t,o,a,i,a)||Se(e,t,i,a,i,n))}function Se(e,t,r,i,n,o){let a=Ae(e[0],e[1],t[0],t[1],r,i),s=Ae(e[0],e[1],t[0],t[1],n,o),l=Ae(r,i,n,o,e[0],e[1]),c=Ae(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&Ee(e,t,r,i)||0===s&&Ee(e,t,n,o)||0===l&&Oe(r,i,n,o,e[0],e[1])||0===c&&Oe(r,i,n,o,t[0],t[1])}function Ce(e,t,r,i){return Se(e,t,r[0],r[1],i[0],i[1])}function Ae(e,t,r,i,n,o){let a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Pe?0:Math.sign(a)}function Ee(e,t,r,i){return Oe(e[0],e[1],t[0],t[1],r,i)}function Oe(e,t,r,i,n,o){return n>=Math.min(e,r)-Pe&&n<=Math.max(e,r)+Pe&&o>=Math.min(t,i)-Pe&&o<=Math.max(t,i)+Pe}const Ie=(0,_e.vt)(),Pe=((0,ve.r_)(),(0,ve.r_)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,be.vt)(),1e-9);class De{constructor(e){this.type=e,this.distance=1/0,this.renderDistance=1/0,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,h.vt)(),this.normal=(0,h.vt)()}reset(){this.distance=1/0,this.renderDistance=1/0,this.hasNormal=!1}update(e,t,r,i,n=e){this.distance=e,this.renderDistance=n,this.primitiveIndex=t,(0,d.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,d.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i,n=e){n<this.renderDistance&&this.update(e,t,r,i,n)}updateIfCloser(e){let{distance:t,renderDistance:r,primitiveIndex:i,point:n,normal:o}=e;this.updateIfCloserFromValues(t,i,n,e.hasNormal?o:null,r)}get valid(){return Number.isFinite(this.distance)}}function Re(e,t,r,i,n){if(!e.visible)return null;let o,a=new De(4);o=e.boundingInfo?Be(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Fe(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(let e of o)a.updateIfCloser(e);return a.valid?a:null}function*Fe(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;let{camera:c,screenPolygonPrimitiveProcessor:u}=e;for(let e=i;e<n;++e){let i=(s?.[e]??e)+l,n=null==s?i:e,h=3*i;Ne(Ve[0],o,h+0,a,n,t),Ne(Ve[1],o,h+1,a,n,t),Ne(Ve[2],o,h+2,a,n,t);let f,m=$e;qe.reset();let p=Ue;for(let e of u.processTriangle(Ve))ze(r,e,c,p)&&(Le(c.eye,p,We),f??=(0,le.rb)($e,Ve[0],Ve[1],Ve[2]),qe.updateIfCloserFromValues((0,d.Io)(c.eye,We),i,We,f?m:null));qe.valid&&(yield qe)}}function*Be(e,t,r,i,n,o){let a;if(null==o?a=(0,ge.GH)(n.broadPhaseFrustum,t.box,i):((0,f.C)(He,t.box),o.applyToAabb(He),a=(0,ge.GH)(n.broadPhaseFrustum,He,i)),!a)return;let{primitiveIndices:s}=t,l=s.length;if(l>1e3){let a=t.children;if(void 0!==a){for(let t of a)yield*Be(e,t,r,i,n,o);return}}yield*Fe(r,i,n,0,l,e,o,s,0)}function Ne(e,t,r,i,n,o){let[a,s,l]=t(e,r);null==i?(0,d.hZ)(e,a,s,l):i.applyToVertex(e,a,s,l,n),o&&(0,d.Z0)(e,e,o)}function ze(e,t,r,i){if(i.length=0,(0,xe.H)(r.frustum[4],t,()=>i.pushNew()),i.length<3)return!1;let n=je,o=ke,a=Ge;r.projectToScreen(i.data[0],n),r.projectToScreen(i.data[1],o);for(let t=2;t<i.length;t++){if(r.projectToScreen(i.data[t],a),we(e,n,o,a))return!0;let s=o;o=a,a=s}return!1}function Le(e,t,r){let i=1/0,n=t.at(0);for(let o=1;o<t.length-1;o++){(0,le.k3)(Ze,e,n,t.at(o),t.at(o+1));let a=(0,d.hG)(e,Ze);a<i&&(i=a,(0,d.C)(r,Ze))}}const He=(0,f.vt)(),Ve=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],Ue=new H.A({allocator:e=>e??(0,h.vt)()}),je=(0,ve.gs)(),ke=(0,ve.gs)(),Ge=(0,ve.gs)(),We=(0,h.vt)(),$e=(0,h.vt)(),Ze=(0,h.vt)(),qe=new De(4);var Ye=r(16396);function Xe(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){let t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function Ke(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Je(e,t,r,i,n=1){let{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];let e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;let u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){let t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){let t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}}function Qe(e,t,r,i,n,o){switch(e){case"position":{(0,U.vA)(3===t.size);let i=n.getField(e,p.xs);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Ke(e,r,i,n);let{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,u=a.length,d=t[0],h=t[1],f=t[2],m=t[4],p=t[5],v=t[6],g=t[8],x=t[9],_=t[10],b=t[12],y=t[13],w=t[14];i*=c;let M=0,T=0,S=0,C=(0,l.tZ)(t)?e=>{M=o[e]+b,T=o[e+1]+y,S=o[e+2]+w}:e=>{let t=o[e],r=o[e+1],i=o[e+2];M=d*t+m*r+g*i+b,T=h*t+p*r+x*i+y,S=f*t+v*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),s[i]=M,s[i+1]=T,s[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)s[i]=M,s[i+1]=T,s[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,U.vA)(3===t.size);let r=n.getField(e,p.xs);(0,U.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Ke(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],b=s[10],y=!(0,l.ut)(s),w=1e-6,M=.999999;i*=u;let T=0,S=0,C=0,A=(0,l.tZ)(s)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{let t=o[e],r=o[e+1],i=o[e+2];T=h*t+p*r+x*i,S=f*t+v*r+_*i,C=m*t+g*r+b*i};if(1===n)if(y)for(let e=0;e<d;++e){A(3*a[e]);let t=T*T+S*S+C*C;if(t<M&&t>w){let e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*a[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*a[e]),y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"uv0":{(0,U.vA)(2===t.size);let r=n.getField(e,p.ZD)??n.getField(e,p.gH);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"uvi":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"color":case"symbolColor":{let r=n.getField(e,p.XP);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(3===t.size||4===t.size),Je(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{let r=n.getField(e,p.Y$)??n.getField(e,p.Y$);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(1===t.size),function(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,U.vA)(4===t.size);let i=n.getField(e,p.Eq);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],b=s[10],y=!(0,l.ut)(s),w=1e-6,M=.999999;if(i*=u,1===n)for(let e=0;e<d;++e){let t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3],d=h*r+p*n+x*s,T=f*r+v*n+_*s,S=m*r+g*n+b*s;if(y){let e=d*d+T*T+S*S;if(e<M&&e>w){let t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){let t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],d=o[t+3],T=h*r+p*s+x*l,S=f*r+v*s+_*l,C=m*r+g*s+b*l;if(y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"olidColor":(0,U.vA)(4===t.size),Je(t,4,n.getField(e,p.XP),o)}}(0,h.vt)();class et{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){null!=i&&function(e,t,r,i,n){let{buffer:o,offset:a}=n;for(let n of t.fields.keys()){let t=e.get(n),s=t?.indices;t&&s&&Qe(n,t,r,i,o,a)}}(r,this.layout,e,t,i)}}const tt=st(-1),rt=st(1),it=tt,nt=[];nt[0]=null,nt[1]=rt,nt[2]=tt,nt[3]=st(-2),nt[4]=st(-3);const ot=nt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(it,e));function at({output:e,enableOITOffset:t,polygonOffset:r}){return(0,te._$)(e)&&t?ot[r]:nt[r]}function st(e){return{factor:1*e,units:2*e}}nt[1]=rt;var lt=r(32198),ct=r(51976),ut=r(34711);class dt extends ut.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,lt.Cg)([(0,ct.W)()],dt.prototype,"hasHighlightMixTexture",void 0),(0,lt.Cg)([(0,ct.W)()],dt.prototype,"emissionDimmingPass",void 0);class ht extends dt{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}function ft(e){return pt.output=+!!e.transparent,pt.polygonOffset=e.polygonOffset,pt.enableOITOffset=e.enableOITOffset,at(pt)}function mt({units:e,factor:t},r,i,n){let o=gt*e;return i+((n?1-Math.abs((0,d.Om)(r,n)):0)*t*vt+o)}(0,lt.Cg)([(0,ct.W)({count:5})],ht.prototype,"polygonOffset",void 0),(0,lt.Cg)([(0,ct.W)()],ht.prototype,"transparent",void 0),(0,lt.Cg)([(0,ct.W)()],ht.prototype,"enableOITOffset",void 0);const pt=new ht,vt=2e-5,gt=2e-6,xt=(0,h.vt)();var _t=r(91429),bt=r(91829),yt=r(4431),wt=r(1843),Mt=r(72824),Tt=r(13840),St=r(42958),Ct=r(16943),At=r(90644);const Et=(0,At.p3)(1,0,1,771);function Ot(e,t=!1,r=!1){if(r)return At.uR;switch(e){case 0:return t?At.RC:At.T8;case 1:return Et;default:return null}}function It(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?At.Uy:null;case 1:return null}}function Pt(e,t=513){return{func:(0,te._$)(e)?515:t}}(0,bt._Y)();const Dt={mask:255},Rt=(0,At.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),Ft=(0,At.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,At.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,At.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680}),r(4576),r(66289);var Bt=r(69622),Nt=r(65529),zt=r(32728);class Lt{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",p.Eq),this.color=e.getField("instanceColor",p.XP),this.olidColor=e.getField("instanceOlidColor",p.XP),this.state=e.getField("state",p.SL),this.lodLevel=e.getField("lodLevel",p.SL)}}let Ht=class extends Bt.A{constructor(e,t){super(e),this.events=new Nt.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ut(Vt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=$t,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Lt(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();let e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){let t=this._view.state;(0,U.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){let t=this._view.state;(0,U.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){let t=this._view,r=jt,i=kt;t.localTransform.getMat(e,Gt),t.globalTransform.getMat(e,Wt);let n=(0,l.lw)(Wt,Wt,Gt);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,a.z0)(i,n),t.model.setMat(e,i);let o=(0,zt.wp)(jt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,a.B8)(i,i),(0,a.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){let r=this._view;r.model.getMat(e,kt),r.modelOrigin.getVec(e,jt),t[0]=kt[0],t[1]=kt[1],t[2]=kt[2],t[3]=0,t[4]=kt[3],t[5]=kt[4],t[6]=kt[5],t[7]=0,t[8]=kt[6],t[9]=kt[7],t[10]=kt[8],t[11]=0,t[12]=jt[0],t[13]=jt[1],t[14]=jt[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(jt,this,e),t*=Math.max(jt[0],jt[1],jt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(jt[0],jt[1],jt[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){let{_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){let t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){let 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){let r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){let 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($t,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Lt(this._buffer)}_findSlot(){let e=this._view.state,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,lt.Cg)([(0,_t.MZ)({constructOnly:!0})],Ht.prototype,"shaderTransformation",void 0),(0,lt.Cg)([(0,_t.MZ)()],Ht.prototype,"_size",void 0),(0,lt.Cg)([(0,_t.MZ)({readOnly:!0})],Ht.prototype,"size",null),Ht=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ht);const Vt=(0,wt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ut(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ct.E)()&&e.vec4u8("instanceOlidColor"),e}const jt=(0,h.vt)(),kt=(0,s.vt)(),Gt=(0,c.vt)(),Wt=(0,c.vt)(),$t=64,Zt=(0,wt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var qt=r(74810),Yt=r(28491),Xt=r(49788);class Kt extends Mt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=qt.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.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,bt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Xt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Mt.gy;let Jt=class extends St.w{constructor(e,t){let i=(0,yt.U)(tr(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,yt.U)(function(e){return Ut(Zt.clone(),e)}(t)))),super(e,t,i),this.shader=new Tt.r(Yt.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){let{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,At.Ey)({blending:i?Ot(r,!1,e.emissionDimmingPass):null,culling:er(e)?(0,At.Xt)(n):null,depthTest:Pt(r,Qt(o)),depthWrite:It(e),colorWrite:At.kn,stencilWrite:a?Dt:null,stencilTest:a?t?Ft:Rt:null,polygonOffset:at(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Qt(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function er(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function tr(e){let t=(0,wt.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",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ct.E)()&&t.vec4u8("olidColor"),t}Jt=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Jt);class rr extends ht{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.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return+!!this.hasTextures}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,lt.Cg)([(0,ct.W)({count:4})],rr.prototype,"alphaDiscardMode",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"doubleSidedMode",void 0),(0,lt.Cg)([(0,ct.W)({count:8})],rr.prototype,"pbrMode",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"cullFace",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"normalType",void 0),(0,lt.Cg)([(0,ct.W)({count:4})],rr.prototype,"customDepthTest",void 0),(0,lt.Cg)([(0,ct.W)({count:8})],rr.prototype,"emissionSource",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVertexColors",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasSymbolColors",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVerticalOffset",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasColorTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasMetallicRoughnessTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOcclusionTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasNormalTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasScreenSizePerspective",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVertexTangents",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOccludees",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instanced",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedDoublePrecision",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasModelTransformation",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"offsetBackfaces",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVVSize",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVVColor",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveShadows",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasShadowHighlights",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveAmbientOcclusion",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveGlobalIllumination",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"textureAlphaPremultiplied",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedFeatureAttribute",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedColor",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"writeDepth",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"snowCover",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasColorTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasEmissionTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasNormalTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOcclusionTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var ir=r(57323);let nr=class extends Jt{constructor(){super(...arguments),this.shader=new Tt.r(ir.R,()=>r.e(9933).then(()=>r(39933)))}};nr=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],nr);class or extends ct.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,lt.Cg)([(0,ct.W)()],or.prototype,"receiveShadows",void 0);class ar extends me{constructor(e,t){super(e,lr),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,te.uw)(e)&&!this.transparent],[4,e=>(0,te.uw)(e)&&this.transparent]]),this._layout=tr(this.parameters),this._configuration=new rr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=Xt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,te._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=r.receiveGlobalIllumination=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){let a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,d.Re)(cr,i,a),n=(0,d.Re)(ur,n,a)),o=function(e,t,r,i){let n=ft(t);if(!n)return e;let o=(0,d.oW)(xt,i,r);return(t,r,i,a)=>e(t,mt(n,o,r,i),i,a)}(o,this._configuration,i,n),(0,pe.Uy)(e,r,i,n,(0,Ye.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.renderDistance=function(e,t,r,i,n){let o=ft(r);return o?mt(o,(0,d.oW)(xt,n,i),e,t):e}(e.renderDistance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Re(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new sr(e)}createBufferWriter(){return new et(this._layout)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,f.Ne)(e,(0,d.WQ)(vr,(0,f.pg)(e,vr),r)),(0,f.vI)(e,(0,d.WQ)(vr,(0,f.Lu)(e,vr),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;let r=t.camera;(0,d.hZ)(fr,e[12],e[13],e[14]);let i=null;switch(t.viewingMode){case 1:i=(0,d.S8)(hr,fr);break;case 2:i=(0,d.C)(hr,dr)}let n=(0,d.Re)(mr,fr,r.eye),o=(0,d.Bw)(n),a=(0,d.hs)(n,n,1/o),s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(i,a));let l=(0,fe.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(i,i,l),(0,d.ei)(pr,i,t.transform.inverseRotation)}}class sr extends oe{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?nr:Jt,e)}}class lr extends Kt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!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 null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const cr=(0,h.vt)(),ur=(0,h.vt)(),dr=(0,h.fA)(0,0,1),hr=(0,h.vt)(),fr=(0,h.vt)(),mr=(0,h.vt)(),pr=(0,h.vt)(),vr=(0,h.vt)(),gr=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class xr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function _r(e){let t=e.params,r=t.topology,i=!0;switch(t.vertexAttributes||(gr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{let e=t.faces;if(e){if(t.vertexAttributes)for(let r in t.vertexAttributes){let t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(gr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(gr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(gr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else gr().warn("Indexed geometries must specify faces"),i=!1;break}default:gr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(gr().warn("Geometry requires material"),i=!1);let n=e.params.vertexAttributes;for(let e in n)n[e].values||(gr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function br(e){let t=(0,f.Ie)();return e.forEach(e=>{let r=e.boundingInfo;null!=r&&(0,f.RF)(t,r.box)}),t}function yr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function wr(e){let t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Mr=new R.A(1,2,"wosr");async function Tr(e,t){let s,w=function(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null==t[4]?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===w.fileType){let e=await(t.cache?t.cache.loadWOSR(w.url,t):async function(e,t){let r=await async function(e,t){let r=await(0,A.Ke)((0,C.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new E.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){let r=[];for(let i in e){let n=e[i],o=n.images[0].data;if(!o){gr().warn("Externally referenced texture data is not yet supported");continue}let a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==yr(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}let i=await Promise.all(r),n={};for(let e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t),n=0;for(let e in i)if(i.hasOwnProperty(e)){let t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new xr(r,i,n+(0,I.Qh)(r))}(w.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){let r=[],i=[],n=[],o=new P,a=e.resource,s=R.A.parse(a.version||"1.0","wosr");Mr.validate(s);let l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},d=e.textures,f=0,m=new Map;for(let e=0;e<c.length;e++){let a=c[e];if(!_r(a))continue;let s=wr(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;let t=a.params.faces;for(let r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(let e in l){let t=l[e],r=t.values,i=v(e)??(0,F.tM)(x);p.push([e,new N.n(r,i,t.valuesPerElement,!0)])}let _=s.texture,b=d&&d[_];if(b&&!m.has(_)){let{image:e,parameters:t}=b,r=new ee.h(e,t);i.push(r),m.set(_,r)}let y=m.get(_),w=y?y.id:void 0,M=s.material,T=o.get(M,_);if(null==T){let e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);let r=b?yr(b.alphaChannelUsage):void 0,i={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),T=new ar(i,t),o.set(M,_,T)}n.push(T);let S=new J(T,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:br(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}if(t.cache)s=await t.cache.loadGLTF(w.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await r.e(1698).then(()=>r(51698));s=await e(new _.R,w.url,t,t.usePBR,t.useEmissive)}let{engineResources:T,referenceBoundingBox:O}=function(e,t,r){let n=e.model,s=e.meta,_=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=_&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let n of i.parts){let i=n.attributes.normal;if(null==i)return;let o=n.attributes.position,a=o.count,s=(0,h.vt)(),u=(0,h.vt)(),f=(0,h.vt)(),m=new Float32Array(4*a),v=new Float32Array(3*a),g=(0,l.B8)((0,c.vt)(),n.transform),x=0,_=0;for(let l=0;l<a;l++){o.getVec(l,u),i.getVec(l,s),(0,d.Z0)(u,u,n.transform),(0,d.Re)(f,u,t.center),(0,d.Qr)(f,f,t.radius);let a=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(f,f,t.radius),null!==g&&(0,d.Z0)(f,f,g),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(a>-1?(0,d.Cc)(f,f,s,.2):(0,d.Cc)(f,f,s,Math.min(-4*a-3.8,1))),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,m[_]=h,m[_+1]=h,m[_+2]=h,m[_+3]=1,_+=4}n.attributes.normal=new p.xs(v.buffer),n.attributes.color=new p.Eq(m.buffer)}}}(e,_));let T=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:w,mrrFactors:qt.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:qt.mb},A={...t.materialParameters,treeRendering:w},E=[],O=new Map,I=new Map,P=n.lods.length,D=(0,f.Ie)();return n.lods.forEach((e,s)=>{let l=!0===t.skipHighLods&&(P>1&&0===s||P>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;let c=new S(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let r=l?new ar({},t):function(e,t,r,n,o,a,s,l,c){let d=e.materials.get(t.material);if(null==d)return null;let{normal:f,color:m,texCoord0:p,tangent:v}=t.attributes,g=t.material+(f?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!a.has(g)){if(x){let t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){let n=e.textures.get(t);if(n){let e=n.data,o=r&&!(0,y.x3)(e)?l.compressionOptions:void 0;s.set(t,new ee.h((0,y.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&i,encoding:(0,y.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}let r=(0,i.xV)(d.color[0]),f=(0,i.xV)(d.color[1]),m=(0,i.xV)(d.color[2]),p=null!=d.colorTexture&&x?s.get(d.colorTexture):null,v=(0,qt.Jr)(d),w=null==d.normalTextureTransform?.scale?u.Un:d.normalTextureTransform?.scale;a.set(g,new ar({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,f,m],ambient:[r,f,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:p?.id,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&x?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&x?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&x&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&x?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?h.uY:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null==d.emissiveStrengthKHR?1:d.emissiveStrengthKHR,emissiveStrengthFromSymbol:null==o.emissiveStrengthFromSymbol?void 0:o.emissiveStrengthFromSymbol,mrrFactors:v?qt.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:M(d.colorTextureTransform),normalTextureTransformMatrix:M(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:M(d.occlusionTextureTransform),emissiveTextureTransformMatrix:M(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(d.metallicRoughnessTextureTransform),...o},l))}let w=a.get(g);if(r.stageResources.materials.push(w),x){let e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,c,C,A,O,I,t,w),{geometry:d,vertexCount:_}=function(e,t){let r=e.attributes.position.count,i=(0,b.x)(e.indices||r,e.primitiveType),n=m(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.t)(n,s,e.transform,3,l);let c=[["position",new N.n(n,i,3,!0)]];if(null!=e.attributes.normal){let t=m(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,a.Ge)(Sr,e.transform),(0,v.b)(t,n,Sr,3,s),(0,o.or)(Sr)&&(0,v.n)(t,t),c.push(["normal",new N.n(t,i,3,!0)])}if(null!=e.attributes.tangent){let t=m(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,a.z0)(Sr,e.transform),(0,g.t)(t,n,Sr,4,s),(0,o.or)(Sr)&&(0,v.n)(t,t,4),c.push(["tangent",new N.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){let t=m(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new N.n(t,i,2,!0)])}let u=e.attributes.color;if(null!=u){let t=new Uint8Array(4*r);4===u.elementCount?u instanceof p.Eq?(0,g.b)(t,u,1,255):(u instanceof p.XP||u instanceof p.Uz)&&(0,g.b)(t,u,1/255,255):(t.fill(255),u instanceof p.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new N.n(t,i,4,!0)])}return{geometry:new J(t,c),vertexCount:r}}(e,r??new ar({},t)),T=d.boundingInfo;null!=T&&0===s&&(0,f.RF)(D,T.box),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=_)}),l||E.push(c)}),{engineResources:E,referenceBoundingBox:D}}(s,t,w.specifiedLodIndex);return{lods:T,referenceBoundingBox:O,isEsriSymbolResource:s.meta.isEsriSymbolResource,isWosr:!1}}const Sr=(0,s.vt)()},26857(e,t,r){var i=r(32198),n=r(69622),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{A7:()=>o,Y0:()=>n});var i=r(29941);class n extends i.v{constructor(e){super(),this.spherical=e,this.draped=!1}}function o(e){(function(e){e.varyings.add("linearDepth","float",{invariant:!0})})(e),e.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
226
226
  vec3 camToVert = posWorld - camPosWorld;
227
227
  bool isBackface = dot(camToVert, normalWorld) > 0.0;
228
228
  if (isBackface) {
@@ -707,7 +707,7 @@ return mix(color, vec3(newPeak), g);
707
707
  `),e.uniforms.add(c.VK).code.add(o.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
708
708
  float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
709
709
  return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
710
- }`);let g=f?"globalIlluminationOcclusion":"ssao",w=f?"factorDirect":"0.0",M=f?"factorAmbient":"1.0";switch(e.constants.add("mainLightIrradianceScale","float",f?.75:1),e.constants.add("ambientIrradianceScale","float",f?1.5:1),f&&(e.uniforms.add(new p.U("factorDirect",e=>e.globalIlluminationDirectFactor),new p.U("factorAmbient",e=>e.globalIlluminationAmbientFactor)),e.constants.add("globalIlluminationOcclusionBoost","float",1.2),e.constants.add("globalIlluminationEmissionBoost","float",2.25),e.constants.add("globalIlluminationEmissionCompressionWeight","float",.75),e.code.add(o.H`vec3 evaluateGlobalIlluminationOcclusion() {
710
+ }`);let g=f?"globalIlluminationOcclusion":"ssao";switch(e.constants.add("globalIlluminationDirectFactor","float",f?.55:0),e.constants.add("globalIlluminationAmbientFactor","float",f?.85:1),e.constants.add("mainLightIrradianceScale","float",f?.75:1),e.constants.add("ambientIrradianceScale","float",f?1.5:1),f&&(e.constants.add("globalIlluminationOcclusionBoost","float",1.2),e.constants.add("globalIlluminationEmissionBoost","float",2.25),e.constants.add("globalIlluminationEmissionCompressionWeight","float",.75),e.code.add(o.H`vec3 evaluateGlobalIlluminationOcclusion() {
711
711
  return min(globalIlluminationOcclusionBoost * readGlobalIlluminationOcclusion(), 1.0);
712
712
  }
713
713
  vec3 evaluateGlobalIlluminationEmission(vec3 albedoLinear) {
@@ -747,8 +747,8 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
747
747
  // Calculate the irradiance components: sun, fill lights and the sky.
748
748
  // Applying AO to both direct and ambient lighting enhances depth perception.
749
749
  // This is an artistic choice; physically, AO should only attenuate ambient lighting.
750
- vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), ${w});
751
- vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), ${M});
750
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationDirectFactor);
751
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationAmbientFactor);
752
752
  vec3 mainLightIrradianceComponent = mainLightIrradianceScale * inputs.NdotL * (1.0 - shadow) * mainLightIntensity * directOcclusionFactor;
753
753
  vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity * directOcclusionFactor;
754
754
  // calculate ambient irradiance for localView and additionalLight for globalView
@@ -802,8 +802,8 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
802
802
 
803
803
  // Applying AO to both direct and ambient lighting enhances depth perception.
804
804
  // This is an artistic choice; physically, AO should only attenuate ambient lighting.
805
- vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), ${w});
806
- vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), ${M});
805
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationDirectFactor);
806
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationAmbientFactor);
807
807
  vec3 mainLightIrradianceComponent = mainLightIrradianceScale * (1.0 - shadow) * inputs.NdotL * mainLightIntensity * directOcclusionFactor;
808
808
  vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
809
809
  vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3312,6553,7656],{52106(e,t,i){i.d(t,{A:()=>w});var r,l,o=i(32198),n=i(37838),s=i(69540),a=i(51447),u=i(25482),p=i(53966),d=i(36708),g=i(24326),y=i(91429),c=i(12195),h=i(65864),f=i(50498),m=i(55156),b=i(60950),v=i(54339),M=i(94128),S=i(33910);const C=Symbol("meshGeometryHandles");function _(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let w=class extends((0,s.OU)(u.o)){static{r=M.Z}static{l=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,g.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new l({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:_(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,c.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=r),"attributes"===e&&(l.attributeName=r),this.layer.graphicChanged(l)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,h.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],w.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],w.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:f.yR,json:{read:h.rS}})],w.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],w.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:n.A,value:null})],w.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],w.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:S.Es})],w.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=l=(0,o.Cg)([(0,y.$K)("esri.Graphic")],w)},6797(e,t,i){i.d(t,{Ui:()=>g});var r=i(69622),l=i(7762),o=i(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function s(e){return e instanceof r.A}function a(e){return e instanceof l.A?Object.keys(e.items):s(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof l.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let i=e.diff;if(i&&"function"==typeof i)return i(e,t);let r=a(e),l=a(t);if(0===r.length&&0===l.length)return;if(!r.length||!l.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=l.filter(e=>!r.includes(e)),g=r.filter(e=>!l.includes(e)),y=r.filter(i=>l.includes(i)&&u(e,i)!==u(t,i)).concat(o,g).sort(),c=p(e);if(c&&n.has(c)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,f=s(e)&&s(t);for(let r of y){let l,o=u(e,r),n=u(t,r);if((f||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(i&&i[r]&&"function"==typeof i[r])l=i[r]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;l={type:"complete",oldValue:o,newValue:n}}else l="object"==typeof o&&"object"==typeof n&&p(o)===p(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=l&&(null==h?h={type:"partial",diff:{[r]:l}}:h.diff[r]=l)}}return h}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},76553(e,t,i){function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},13069(e,t,i){i.d(t,{AG:()=>s,lk:()=>l,vD:()=>n,yS:()=>o});const r="randomUUID"in crypto;function l(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${l().toUpperCase()}}`}function n(){return`{${l()}}`}function s(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},55156(e,t,i){i.d(t,{I:()=>l});const r=Symbol("idFieldsProviderSymbol");function l(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function l(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>l})},52136(e,t,i){var r=i(32198),l=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},28032(e,t,i){i.d(t,{A:()=>a});var r=i(32198),l=i(69540),o=i(25482),n=i(91429),s=i(56400);let a=class extends((0,l.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r.Cg)([(0,n.MZ)()],a.prototype,"creatorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"creationDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"realm",void 0),(0,r.Cg)([(0,n.MZ)((0,s.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,r.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],a)},37352(e,t,i){i.d(t,{A:()=>a});var r,l=i(32198),o=i(7762),n=i(25482),s=i(91429);let a=r=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,l.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,l.Cg)([(0,s.$K)("esri.layers.support.LayerFloorInfo")],a)},45067(e,t,i){i.d(t,{A:()=>p});var r=i(32198),l=i(69540),o=i(66552),n=i(25482),s=i(91429);const a=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,l.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,r.Cg)([(0,s.$K)("esri.layers.support.Relationship")],p)},32730(e,t,i){i.d(t,{BI:()=>d,D3:()=>u,XJ:()=>p,lc:()=>a,mX:()=>y,rU:()=>g,tH:()=>b,zA:()=>M});var r=i(799);const l=RegExp("__begin__","ig"),o=RegExp("__end__","ig"),n=RegExp("^__begin__","i"),s=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function p(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function d(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function g(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(c))?.[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,r.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=n.test(t)?t.replace(n,""):'"'+t,t=s.test(t)?t.replace(s,""):t+'"',t=t.replaceAll(l,'" + ').replaceAll(o,' + "')):t='""',t}const c=/^\s*\{([^}]+)\}\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=h.exec(e)||f.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function M(e){return"object"==typeof e&&!!e&&v in e}i.d(t,["vK",0,v])},41366(e,t,i){var r=i(32198),l=i(66552),o=i(53966),n=i(91429),s=i(93223);const a=(0,l.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&p||i&&u||null,t&&i&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,s.e)(a,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,a])},93470(e,t,i){const r=[252,146,31,255],l={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r};i.d(t,["Cb",0,l,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,r,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3312,6553,7656],{52106(e,t,i){i.d(t,{A:()=>w});var r,l,o=i(32198),n=i(40124),s=i(69540),a=i(51447),u=i(25482),p=i(53966),d=i(36708),g=i(24326),y=i(91429),c=i(12195),h=i(65864),f=i(50498),m=i(55156),b=i(60950),v=i(54339),M=i(94128),S=i(33910);const C=Symbol("meshGeometryHandles");function _(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let w=class extends((0,s.OU)(u.o)){static{r=M.Z}static{l=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,g.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new l({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:_(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,c.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=r),"attributes"===e&&(l.attributeName=r),this.layer.graphicChanged(l)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,h.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],w.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],w.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:f.yR,json:{read:h.rS}})],w.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],w.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:n.A,value:null})],w.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],w.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:S.Es})],w.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=l=(0,o.Cg)([(0,y.$K)("esri.Graphic")],w)},6797(e,t,i){i.d(t,{Ui:()=>g});var r=i(69622),l=i(7762),o=i(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function s(e){return e instanceof r.A}function a(e){return e instanceof l.A?Object.keys(e.items):s(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof l.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let i=e.diff;if(i&&"function"==typeof i)return i(e,t);let r=a(e),l=a(t);if(0===r.length&&0===l.length)return;if(!r.length||!l.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=l.filter(e=>!r.includes(e)),g=r.filter(e=>!l.includes(e)),y=r.filter(i=>l.includes(i)&&u(e,i)!==u(t,i)).concat(o,g).sort(),c=p(e);if(c&&n.has(c)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,f=s(e)&&s(t);for(let r of y){let l,o=u(e,r),n=u(t,r);if((f||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(i&&i[r]&&"function"==typeof i[r])l=i[r]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;l={type:"complete",oldValue:o,newValue:n}}else l="object"==typeof o&&"object"==typeof n&&p(o)===p(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=l&&(null==h?h={type:"partial",diff:{[r]:l}}:h.diff[r]=l)}}return h}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},76553(e,t,i){function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},13069(e,t,i){i.d(t,{AG:()=>s,lk:()=>l,vD:()=>n,yS:()=>o});const r="randomUUID"in crypto;function l(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${l().toUpperCase()}}`}function n(){return`{${l()}}`}function s(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},55156(e,t,i){i.d(t,{I:()=>l});const r=Symbol("idFieldsProviderSymbol");function l(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function l(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>l})},52136(e,t,i){var r=i(32198),l=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},28032(e,t,i){i.d(t,{A:()=>a});var r=i(32198),l=i(69540),o=i(25482),n=i(91429),s=i(56400);let a=class extends((0,l.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r.Cg)([(0,n.MZ)()],a.prototype,"creatorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"creationDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"realm",void 0),(0,r.Cg)([(0,n.MZ)((0,s.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,r.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],a)},37352(e,t,i){i.d(t,{A:()=>a});var r,l=i(32198),o=i(7762),n=i(25482),s=i(91429);let a=r=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,l.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,l.Cg)([(0,s.$K)("esri.layers.support.LayerFloorInfo")],a)},45067(e,t,i){i.d(t,{A:()=>p});var r=i(32198),l=i(69540),o=i(66552),n=i(25482),s=i(91429);const a=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,l.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,r.Cg)([(0,s.$K)("esri.layers.support.Relationship")],p)},32730(e,t,i){i.d(t,{BI:()=>d,D3:()=>u,XJ:()=>p,lc:()=>a,mX:()=>y,rU:()=>g,tH:()=>b,zA:()=>M});var r=i(799);const l=RegExp("__begin__","ig"),o=RegExp("__end__","ig"),n=RegExp("^__begin__","i"),s=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function p(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function d(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function g(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(c))?.[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,r.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=n.test(t)?t.replace(n,""):'"'+t,t=s.test(t)?t.replace(s,""):t+'"',t=t.replaceAll(l,'" + ').replaceAll(o,' + "')):t='""',t}const c=/^\s*\{([^}]+)\}\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=h.exec(e)||f.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function M(e){return"object"==typeof e&&!!e&&v in e}i.d(t,["vK",0,v])},41366(e,t,i){var r=i(32198),l=i(66552),o=i(53966),n=i(91429),s=i(93223);const a=(0,l.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&p||i&&u||null,t&&i&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,s.e)(a,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,a])},93470(e,t,i){const r=[252,146,31,255],l={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r};i.d(t,["Cb",0,l,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,r,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);