@arcgis/core 4.34.0-next.74 → 4.34.0-next.76

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 (248) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/applications/Components/QuantityFormatter.js +1 -1
  3. package/applications/Components/arcadeEditorUtils.d.ts +4 -0
  4. package/applications/Components/arcadeEditorUtils.js +5 -0
  5. package/applications/Components/featureUtils.d.ts +1 -0
  6. package/applications/Components/featureUtils.js +1 -1
  7. package/arcade/Feature.js +1 -1
  8. package/arcade/Pixel.js +5 -0
  9. package/arcade/Voxel.js +1 -1
  10. package/arcade/arcadeAsyncRuntime.js +1 -1
  11. package/arcade/arcadeCompiler.js +1 -1
  12. package/arcade/arcadeRuntime.js +1 -1
  13. package/arcade/featureSetUtils.js +1 -1
  14. package/arcade/featureset/actions/GroupBy.js +1 -1
  15. package/arcade/featureset/actions/OrderBy.js +1 -1
  16. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  17. package/arcade/functions/feature.js +1 -1
  18. package/arcade/functions/featuresetbase.js +1 -1
  19. package/arcade/functions/featuresetstring.js +1 -1
  20. package/arcade/functions/fieldStats.js +1 -1
  21. package/arcade/functions/geometry.js +1 -1
  22. package/arcade/functions/maths.js +1 -1
  23. package/arcade/functions/string.js +1 -1
  24. package/arcade/languageUtils.js +1 -1
  25. package/arcade.js +1 -1
  26. package/assets/esri/core/workers/RemoteClient.js +1 -1
  27. package/assets/esri/core/workers/chunks/009556f323e58271bc7a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{11acefc48c0354e675df.js → 0309d008e50e55c7ff1d.js} +1 -1
  29. package/assets/esri/core/workers/chunks/13de06e614adf92239fe.js +1 -0
  30. package/assets/esri/core/workers/chunks/14a22d1a0eefa970efa1.js +1 -0
  31. package/assets/esri/core/workers/chunks/16d66770ef841564ee3f.js +1 -0
  32. package/assets/esri/core/workers/chunks/17103e6542aae53c7301.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dd447dfc50ee7f511b84.js → 19c1f1431c0b2f4525a2.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5c30252c1bb8350cae5f.js → 1c52999a6392370844a6.js} +1 -1
  35. package/assets/esri/core/workers/chunks/21bfad7283620766d9cd.js +1 -0
  36. package/assets/esri/core/workers/chunks/{7219ceab0b6fae2e69b6.js → 280af3640f8e93c1024e.js} +2 -2
  37. package/assets/esri/core/workers/chunks/{49f7a5523462aebf90fc.js.LICENSE.txt → 280af3640f8e93c1024e.js.LICENSE.txt} +1 -1
  38. package/assets/esri/core/workers/chunks/3064320d54a9b48bd697.js +1 -0
  39. package/assets/esri/core/workers/chunks/3a5f0c759dd2f4638343.js +1 -0
  40. package/assets/esri/core/workers/chunks/{d12f373fcf5848ddcd8a.js → 3f523bc8551e712c9bd4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{5b7e5ec6aea1f7f9b005.js → 3fecfe4f8ca2a5fd7360.js} +1 -1
  42. package/assets/esri/core/workers/chunks/4832faefd3b7edc17c84.js +1 -0
  43. package/assets/esri/core/workers/chunks/{78b33c6d73824085c6d1.js → 48449abe795cb7a831eb.js} +1 -1
  44. package/assets/esri/core/workers/chunks/4d47187bc0821413492d.js +1 -0
  45. package/assets/esri/core/workers/chunks/5102c20645d9708c34b4.js +1 -0
  46. package/assets/esri/core/workers/chunks/541bffd61006d0e36166.js +1 -0
  47. package/assets/esri/core/workers/chunks/58cc06ed86301f4cee75.js +1 -0
  48. package/assets/esri/core/workers/chunks/{e12e8d69c05c182b6a69.js → 61bb39597ccf89f99a72.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{f4e9640306f64b1af7a3.js → 65ec21d29e8563fdbc55.js} +1 -1
  50. package/assets/esri/core/workers/chunks/67d9cfe02613cb73ee37.js.LICENSE.txt +1 -1
  51. package/assets/esri/core/workers/chunks/{6dc62c170e9583222df2.js → 70367da4ba916376f40c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{fb669a2e50ca7aacac25.js → 71fef0a33b7ed9456e47.js} +1 -1
  53. package/assets/esri/core/workers/chunks/7430c462c350fdd26349.js +1 -0
  54. package/assets/esri/core/workers/chunks/{ff3fe5c97a98c8cab4ac.js → 7a23b127f551bf13ef54.js} +2 -2
  55. package/assets/esri/core/workers/chunks/{ff3fe5c97a98c8cab4ac.js.LICENSE.txt → 7a23b127f551bf13ef54.js.LICENSE.txt} +1 -1
  56. package/assets/esri/core/workers/chunks/7b73a808922b52755abd.js +1 -0
  57. package/assets/esri/core/workers/chunks/{d682dd49bb9ee7f48f93.js → 9304c3cdf732745577fd.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{8d642b34d40edfe02d8e.js → 9c64b78c5c9b35b31d98.js} +2 -2
  59. package/assets/esri/core/workers/chunks/{8d642b34d40edfe02d8e.js.LICENSE.txt → 9c64b78c5c9b35b31d98.js.LICENSE.txt} +1 -1
  60. package/assets/esri/core/workers/chunks/a0edff37fd4a3f2cb2eb.js +1 -0
  61. package/assets/esri/core/workers/chunks/a6533bab3b2fbc1e2a47.js +1 -0
  62. package/assets/esri/core/workers/chunks/a9f6054d86982b9e5a7c.js +1 -0
  63. package/assets/esri/core/workers/chunks/{10ec10ca361842efce92.js → ab005fe84952f0676020.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{5c53deb45bc142219c76.js → b15ff6c9ef2de8a49853.js} +2 -2
  65. package/assets/esri/core/workers/chunks/{5a476e6743902e35f81a.js.LICENSE.txt → b15ff6c9ef2de8a49853.js.LICENSE.txt} +1 -1
  66. package/assets/esri/core/workers/chunks/b70d71144a060f7eeeeb.js +1 -0
  67. package/assets/esri/core/workers/chunks/b8d02f1b73c374767a5f.js +1 -0
  68. package/assets/esri/core/workers/chunks/ba6452acee3d6defb37e.js +1 -0
  69. package/assets/esri/core/workers/chunks/bccecd678faff927ac76.js +1 -0
  70. package/assets/esri/core/workers/chunks/{ce1f4508487298ab57b6.js → bd2dc1282c49125ede89.js} +1 -1
  71. package/assets/esri/core/workers/chunks/bfbbf180c2c8fdbb6731.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f542bdc994a5ea3aa9d1.js → c38360d912f256519e06.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{e3ad0a390387c5847aca.js → c6fecf2bbd2a711f15d3.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c86f5bb199cf046b8952.js +1 -0
  75. package/assets/esri/core/workers/chunks/cd1869e183001266c4c1.js +2 -0
  76. package/assets/esri/core/workers/chunks/{626c18c1bbc50b3b16b2.js.LICENSE.txt → cd1869e183001266c4c1.js.LICENSE.txt} +1 -1
  77. package/assets/esri/core/workers/chunks/{90321feb56f3a84f6e58.js → d153b29c542c37ae1636.js} +2 -2
  78. package/assets/esri/core/workers/chunks/{90321feb56f3a84f6e58.js.LICENSE.txt → d153b29c542c37ae1636.js.LICENSE.txt} +1 -1
  79. package/assets/esri/core/workers/chunks/{b5f197e24982f6e14468.js → d1f181f91b36351f1d3b.js} +2 -2
  80. package/assets/esri/core/workers/chunks/d55c55d39a253630d228.js +1 -0
  81. package/assets/esri/core/workers/chunks/{49f7a5523462aebf90fc.js → d66cdb9bb494da19696b.js} +2 -2
  82. package/assets/esri/core/workers/chunks/{5c53deb45bc142219c76.js.LICENSE.txt → d66cdb9bb494da19696b.js.LICENSE.txt} +1 -1
  83. package/assets/esri/core/workers/chunks/{9c00c2263e52ad51c2a2.js → d95554f43694b4769675.js} +1 -1
  84. package/assets/esri/core/workers/chunks/dd587d51dad2d82708d1.js +1 -0
  85. package/assets/esri/core/workers/chunks/ecac5ca00c742bfb5898.js +1 -0
  86. package/assets/esri/core/workers/chunks/ed773dab5965e42a2879.js +2 -0
  87. package/assets/esri/core/workers/chunks/{7219ceab0b6fae2e69b6.js.LICENSE.txt → ed773dab5965e42a2879.js.LICENSE.txt} +1 -1
  88. package/assets/esri/core/workers/chunks/{0d946a226b846b3c0849.js → fc06014fb484fc8c697e.js} +1 -1
  89. package/assets/esri/images/portal/xrexperience16.png +0 -0
  90. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  91. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  92. package/chunks/Compositing.glsl.js +4 -3
  93. package/chunks/Fog.glsl.js +6 -6
  94. package/chunks/GlowComposition.glsl.js +31 -12
  95. package/chunks/LineMarker.glsl.js +37 -36
  96. package/chunks/RibbonLine.glsl.js +83 -83
  97. package/chunks/array.js +1 -1
  98. package/chunks/cameraUtilsSpherical.js +1 -1
  99. package/chunks/languageUtils.js +1 -1
  100. package/chunks/lyr3DMain.js +1 -1
  101. package/chunks/lyr3DWorker.js +1 -1
  102. package/config.js +1 -1
  103. package/core/quantityFormatUtils.js +1 -1
  104. package/core/sql.d.ts +1 -0
  105. package/core/unitFormatUtils.js +1 -1
  106. package/core/unitUtils.js +1 -1
  107. package/form/FormTemplate.js +1 -1
  108. package/geometry/support/curves/circleUtils.js +1 -1
  109. package/geometry/support/curves/circularArcUtils.js +1 -1
  110. package/geometry/support/curves/closestPointOnCurve.js +1 -1
  111. package/geometry/support/curves/curveExtent.js +1 -1
  112. package/geometry/support/curves/lineUtils.js +5 -0
  113. package/geometry/support/heightModelInfoUtils.js +1 -1
  114. package/geometry/support/normalizeUtils.js +1 -1
  115. package/geometry/support/spatialReferenceUtils.js +1 -1
  116. package/interfaces.d.ts +315 -18
  117. package/kernel.js +1 -1
  118. package/layers/GaussianSplatLayer.js +1 -1
  119. package/layers/ImageryLayer.js +1 -1
  120. package/layers/ImageryTileLayer.js +1 -1
  121. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  122. package/layers/Lyr3DWorkerHandle.js +1 -1
  123. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  124. package/layers/support/fieldUtils.js +1 -1
  125. package/layers/support/tiles3DUtils.js +1 -1
  126. package/networks/CircuitManager.js +1 -1
  127. package/networks/support/Circuit.js +1 -1
  128. package/networks/support/CircuitSection.js +1 -1
  129. package/networks/support/Subcircuit.js +1 -1
  130. package/package.json +2 -2
  131. package/portal/PortalItem.js +1 -1
  132. package/renderers/ClassBreaksRenderer.js +1 -1
  133. package/renderers/DictionaryRenderer.js +1 -1
  134. package/renderers/DotDensityRenderer.js +1 -1
  135. package/renderers/HeatmapRenderer.js +1 -1
  136. package/renderers/PieChartRenderer.js +1 -1
  137. package/renderers/UniqueValueRenderer.js +1 -1
  138. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/loadArcade.js +1 -1
  141. package/support/modeUtils.js +1 -1
  142. package/support/revision.js +1 -1
  143. package/symbols/CIMSymbol.js +1 -1
  144. package/symbols/support/FeatureExpressionInfo.js +1 -1
  145. package/views/2d/layers/LayerView2D.js +1 -1
  146. package/views/2d/layers/MediaLayerView2D.js +1 -1
  147. package/views/2d/layers/TileLayerView2D.js +1 -1
  148. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  149. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  150. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  151. package/views/3d/analysis/Slice/ResizeManipulator.js +1 -1
  152. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  153. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  154. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  155. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  156. package/views/3d/environment/Fog.js +1 -1
  157. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  158. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  159. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  160. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  161. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  162. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  163. package/views/3d/layers/FlowSubView3D.js +1 -1
  164. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  165. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  166. package/views/3d/layers/Lyr3DWorker.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  168. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  169. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  170. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  171. package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
  172. package/views/3d/state/ViewStateManager.js +1 -1
  173. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
  174. package/views/3d/support/cameraUtils.js +1 -1
  175. package/views/3d/support/cameraUtilsSpherical.js +1 -1
  176. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  177. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  178. package/views/3d/support/flow/FlowWorker.js +1 -1
  179. package/views/3d/support/flow/geometryUtils.js +1 -1
  180. package/views/3d/support/flow/loadUtils.js +1 -1
  181. package/{layers/support/GaussianSplatAtlasPageAllocator.js → views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js} +1 -1
  182. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +5 -0
  183. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +5 -0
  184. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +5 -0
  185. package/views/3d/support/gaussianSplatting/GaussianTile.js +5 -0
  186. package/views/3d/terrain/OverlayManager.js +1 -1
  187. package/views/3d/terrain/TerrainSurface.js +1 -1
  188. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -13
  189. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +37 -25
  190. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +11 -11
  191. package/views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js +5 -0
  192. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  193. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  194. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  195. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  196. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  197. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  198. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  199. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  200. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  201. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  202. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  203. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  204. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  205. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  206. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  207. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  208. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  209. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  210. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +10 -11
  211. package/views/GroundView.js +1 -1
  212. package/views/VideoView.js +1 -1
  213. package/views/interactive/snapping/allLayerSnapping.js +1 -1
  214. package/views/layers/ImageryLayerView.js +1 -1
  215. package/views/support/LayerViewManager.js +1 -1
  216. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  217. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  218. package/widgets/support/widget.js +1 -1
  219. package/assets/esri/core/workers/chunks/06bd58c219678315cf5c.js +0 -1
  220. package/assets/esri/core/workers/chunks/0751f539db31bdb5caec.js +0 -1
  221. package/assets/esri/core/workers/chunks/19228ab0fe7944c554e5.js +0 -1
  222. package/assets/esri/core/workers/chunks/2a19a4d7d1c580121065.js +0 -1
  223. package/assets/esri/core/workers/chunks/3d2629357242492afcfa.js +0 -1
  224. package/assets/esri/core/workers/chunks/5a476e6743902e35f81a.js +0 -2
  225. package/assets/esri/core/workers/chunks/5a95688651d7e8b7101d.js +0 -1
  226. package/assets/esri/core/workers/chunks/5c4ba165816809e06340.js +0 -1
  227. package/assets/esri/core/workers/chunks/5f239972cb95afdfa77a.js +0 -1
  228. package/assets/esri/core/workers/chunks/626c18c1bbc50b3b16b2.js +0 -2
  229. package/assets/esri/core/workers/chunks/6963ded8428cc8d51d85.js +0 -1
  230. package/assets/esri/core/workers/chunks/6c3ae96c6ef764fb9552.js +0 -1
  231. package/assets/esri/core/workers/chunks/6da298da2ec09cced0b5.js +0 -1
  232. package/assets/esri/core/workers/chunks/76ec3d2646ba64e3442f.js +0 -1
  233. package/assets/esri/core/workers/chunks/8b1d2bbb2b2eb1830921.js +0 -1
  234. package/assets/esri/core/workers/chunks/925ad2665c2fe0f47cc3.js +0 -1
  235. package/assets/esri/core/workers/chunks/a2f4b6d8da93f106852c.js +0 -1
  236. package/assets/esri/core/workers/chunks/ada8e07ff12bc5d4a1d9.js +0 -1
  237. package/assets/esri/core/workers/chunks/b03dcbc31bccb9fdf9fe.js +0 -1
  238. package/assets/esri/core/workers/chunks/b0de01f8c9b1c3182e0c.js +0 -1
  239. package/assets/esri/core/workers/chunks/c7ba8f2aca0fbd6ceded.js +0 -1
  240. package/assets/esri/core/workers/chunks/c908184d747d33366881.js +0 -1
  241. package/assets/esri/core/workers/chunks/d1711256493d55eca523.js +0 -1
  242. package/assets/esri/core/workers/chunks/d305ca524837c5dc81c8.js +0 -1
  243. package/assets/esri/core/workers/chunks/e6e4e2fb9568319c6207.js +0 -1
  244. package/assets/esri/core/workers/chunks/e6f2ac738df16fb5e13a.js +0 -1
  245. package/assets/esri/core/workers/chunks/e8d25d4ca9b335883f34.js +0 -1
  246. package/assets/esri/core/workers/chunks/ee391a41144855fc625d.js +0 -1
  247. package/assets/esri/core/workers/chunks/f060a52a9b69eb250d63.js +0 -1
  248. package/layers/support/gaussianSplatUtils.js +0 -5
@@ -702,14 +702,14 @@ return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
702
702
  }
703
703
  float rgb2v(vec3 c) {
704
704
  return max(c.x, max(c.y, c.z));
705
- }`)}},63907:(e,t,r)=>{r.d(t,{CQ:()=>f,Fq:()=>p,H0:()=>o,SB:()=>l,WR:()=>i,XN:()=>a,iE:()=>s,ld:()=>c,nI:()=>m,pe:()=>n,r6:()=>u,vt:()=>d,yI:()=>h});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(o),s={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},l={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},c={FLOAT:n.FLOAT,UNSIGNED_BYTE:n.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:n.BYTE,UNSIGNED_SHORT:n.UNSIGNED_SHORT,SHORT:n.SHORT,UNSIGNED_INT:n.UNSIGNED_INT,INT:n.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},d={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},u=36064,h=36065,p=36066,m=33306,f={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},65836:(e,t,r)=>{r.d(t,{n:()=>_t});var i=r(31821),n=r(12791),o=r(31635),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(10107),u=(r(44208),r(53966)),h=(r(87811),r(40608)),p=r(37585),m=r(69540);let f=class extends m.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,h.$)("esri.CameraLayout")],f);const g=f;var v=r(69052),_=r(25482),x=r(79901),w=r(36005),y=r(43937),b=r(56507),M=r(86738);let T=class extends((0,m.OU)(_.o)){constructor(...e){super(...e),this.position=new M.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new g}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,b.GB)(e.x||0),n.y=(0,b.GB)(e.y||0),n.z=e.hasZ?(0,b.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new M.A;return r.read(e,t),r.x=(0,b.GB)(r.x||0),r.y=(0,b.GB)(r.y||0),r.z=r.hasZ?(0,b.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,d.MZ)({type:M.A,json:{write:{isRequired:!0}}})],T.prototype,"position",void 0),(0,o.Cg)([(0,y.K)("position")],T.prototype,"writePosition",null),(0,o.Cg)([(0,w.w)("position")],T.prototype,"readPosition",null),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,x.w)(e=>v.ie.normalize((0,b.GB)(e)))],T.prototype,"heading",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,x.w)(e=>(0,a.qE)((0,b.GB)(e),-180,180))],T.prototype,"tilt",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,x.w)(e=>(0,a.qE)((0,b.GB)(e,55),1,170))],T.prototype,"fov",void 0),(0,o.Cg)([(0,d.MZ)({type:g,nonNullable:!0,json:{read:!1,write:!1}})],T.prototype,"layout",void 0),T=(0,o.Cg)([(0,h.$)("esri.Camera")],T);var C,S=r(9093),E=r(38954),A=r(51850),R=r(16930),I=(r(48353),r(9762),r(65806)),F=r(27993),O=r(73941),P=(r(19419),r(65008)),D=r(90629),N=r(58083),H=r(48163),L=r(87317),z=r(91829),B=r(82919),G=r(71351),U=r(44280);let V=C=class extends P.A{constructor(e){super(e),this._ray=(0,G.vt)(),this._viewport=(0,z.fA)(0,0,1,1),this._padding=(0,z.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,H.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,S.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,S.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,S.vt)(),this._frustumDirty=!0,this._frustum=(0,B.vt)(),this._fullViewport=(0,z.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,A.vt)(),this._up=(0,A.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,E.d)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,N.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,L.c)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,L.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,L.c)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,L.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,L.a)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,L.d)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,N.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,N.B8)((0,S.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,S.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,E.j)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,N.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,N.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,d=(0,N.$h)((0,S.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,N.aI)(u,d)?u:d}copyFrom(e){(0,E.c)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,L.d)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,L.d)(this._padding,e.padding),this.notifyChange("_padding"),(0,p.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,N.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,B.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,N.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,L.d)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new C).copyFrom(this)}equals(e){return(0,E.q)(this.eye,e.eye)&&(0,E.q)(this.center,e.center)&&(0,E.q)(this.up,e.up)&&(0,L.a)(this._viewport,e.viewport)&&(0,L.a)(this._padding,e.padding)&&(0,p.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,L.f)(e.screenPadding,this.screenPadding)>=t||(0,L.f)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,E.a)(k,e.eye,e.center),(0,E.a)($,this.eye,this.center);const r=(0,E.e)(k,$),i=(0,E.y)(k),n=(0,E.y)($),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,E.x)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,U.gr)(this.viewForward,(0,E.d)(k,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,D.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==j&&(0,E.c)(j,e),j[3]=1,(0,L.t)(j,j,this.projectionMatrix);const r=Math.abs(j[3]);(0,E.g)(j,j,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*j[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*j[1]),t[2]=.5*(j[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;j[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],j[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],j[2]=(2*e[2]-1)*e[3],j[3]=e[3],null!=this.inverseProjectionMatrix&&((0,L.t)(j,j,this.inverseProjectionMatrix),t[0]=j[0],t[1]=j[1],t[2]=j[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,Z),this.renderToScreen(Z,t),t}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,(0,L.t)(j,j,this.viewProjectionMatrix),0===j[3])return null;const r=j;(0,E.g)(r,r,1/Math.abs(j[3]));const i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,Z),t)}unprojectFromRenderScreen(e,t){if((0,N.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,N.B8)(W,W))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,(0,L.t)(j,j,W),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}_computeUpGlobal(){(0,E.d)(k,this.center,this.eye);const e=(0,E.l)(this.center);e<1?(0,E.q)(this._up,A.Cb)&&((0,E.c)(this._up,A.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,E.e)(k,this.center))>.9999*(0,E.l)(k)*e||((0,E.h)($,k,this.center),(0,E.h)($,$,k),(0,E.n)($,$),(0,E.q)(this._up,$)||((0,E.c)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,E.E)(k,this.eye,this.center),Math.abs(k[2])<=.9999&&((0,E.g)(k,k,k[2]),(0,E.i)(k,-k[0],-k[1],1-k[2]),(0,E.n)(k,k),(0,E.q)(this._up,k)||((0,E.c)(this._up,k),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,E.q)(e,t)||((0,E.c)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):u.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,B.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,N.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewport",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_padding",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_fov",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_nearFar",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"pixelRatio",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_rows",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"rows",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_columns",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"columns",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"eye",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"center",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_center",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"up",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_up",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewForward",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewUp",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewRight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"nearFar",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"near",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"far",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"screenViewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"screenPadding",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"x",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"y",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"width",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"height",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fullWidth",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fullHeight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"_aspect",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"padding",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"projectionMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fov",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fovX",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fovY",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"relativeElevation",void 0),V=C=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl.RenderCamera")],V);const j=(0,z.vt)(),W=(0,S.vt)(),k=(0,A.vt)(),$=(0,A.vt)(),Z=(0,D.r_)();class q{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far))}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new q(0,0)}static{this.Infinite=new q}}r(49718),r(6867),r(16396),(0,A.vt)(),(0,A.vt)(),(0,A.vt)(),new WeakMap;var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return 1===n?1:0;const s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,H.o8)(ee));break;case 2:Q(e,(0,H.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,p.aI)(e.at(-1),t)||e.push(t)}const ee=(0,H.vt)();var te=r(11964),re=r(27921);const ie=(0,A.vt)(),ne=(0,A.vt)();function oe(){return{direction:(0,A.vt)(),up:(0,A.vt)()}}function ae(e,t,r,i,n){let o=(0,E.n)(ie,e),s=(0,E.e)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,E.e)(t,i)),s<.99?((0,E.c)(o,t),l&&(0,E.g)(o,o,-1)):o=null);let c=0;if(o){(0,E.g)(ne,i,(0,E.e)(i,o)),(0,E.d)(o,o,ne);const e=(0,E.e)(o,n)/((0,E.l)(o)*(0,E.l)(n));(0,E.h)(ne,o,n),c=((0,E.e)(ne,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,E.e)(i,e)/(0,E.l)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function se(e,t,r,i){(0,E.d)(le,r,t),(0,re.T7)(i,(0,te.LV)(t,le),e)||e===r||(0,E.c)(e,r)}const le=(0,A.vt)(),ce=(0,A.fA)(0,1,0),de=(0,A.fA)(0,0,1),ue=(0,S.vt)(),he=(0,A.vt)(),pe=(0,A.vt)();function me(e,t,r,i=oe()){const{direction:n,up:o}=i;return(0,N.N9)(ue,-(0,a.kU)(t)),(0,N.eL)(ue,ue,(0,a.kU)(r)),(0,E.t)(n,de,ue),(0,E.g)(n,n,-1),(0,E.t)(o,ce,ue),i}function fe(e,t,r,i,n){const o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,E.b)(e,i,o,a)}const ge=(0,A.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return ae(t,r,i,de,ce)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,A.vt)();return(0,E.g)(o,n.direction,-t),(0,E.f)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,G.LV)(t.origin,t.direction),n,ge)||fe(ge,r,i,t.endpoint,n),se(ge,a,ge,l),s.push((0,H.fA)(ge[0],ge[1]))}return function(e,t,r){const i=e.map(e=>((0,E.i)(ge,e[0],e[1],0),t.fromRenderCoords(ge,ge,r),[ge[0],ge[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,I.g)(t,he,o),(0,I.g)(t,pe,o),he[0]-=r/2,pe[0]+=r/2,he[1]-=i/2,pe[1]+=i/2,(0,F.F)(he,o,he,a),(0,F.F)(pe,o,pe,a),n?(n.xmin=he[0],n.ymin=he[1],n.xmax=pe[0],n.ymax=pe[1],n.spatialReference=a):n=new Y.A(he[0],he[1],pe[0],pe[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),_e=r(97937),xe=r(28735);class we{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,B.vt)(),this._points=(0,B.Qy)(),this.lines=new Array(12),this._origin=(0,A.vt)(),this._direction=(0,A.vt)(),this._altitude=null;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,A.vt)(),endpoint:null}}update(e){(0,B.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,E.c)(this._origin,e.eye),(0,E.c)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines()}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,E.c)(this._points[t],e[t]);(0,B.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,B.m7)(this.frustum,e)}intersectsRay(e){return(0,B.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,B.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,B.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;ye(this.lines[t],e[t],e[r]),ye(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),ye(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}static{this.planePointIndices=B.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function ye(e,t,r){e.origin=t,e.endpoint=r,(0,E.E)(e.direction,t,r)}r(83047);const be=(0,A.fA)(parseFloat(Number(5802e-9).toFixed(6)),parseFloat(Number(13558e-9).toFixed(6)),parseFloat(Number(331e-7).toFixed(6))),Me=(0,A.fA)(3*parseFloat(Number(65e-8).toFixed(6)),3*parseFloat(Number(1881e-9).toFixed(6)),3*parseFloat(Number(85e-9).toFixed(6)));(0,A.fA)(parseFloat(Number(be[0]+Me[0]).toFixed(6)),parseFloat(Number(be[1]+Me[1]).toFixed(6)),parseFloat(Number(be[2]+Me[2]).toFixed(6)));(0,A.vt)(),(0,A.vt)(),(0,_e.c)(),(0,G.vt)();const Te=(0,A.vt)(),Ce=(0,A.vt)();var Se=r(32728);const Ee=(0,A.fA)(0,0,1),Ae=(0,E.n)((0,A.vt)(),(0,A.fA)(1,1,1)),Re=new v.hr(-180,180),Ie=(0,S.vt)(),Fe=(0,A.vt)(),Oe=(0,A.vt)();function Pe(e,t,r,i=oe()){(0,E.h)(Fe,e,Ee),0===(0,E.e)(Fe,Fe)&&(0,E.h)(Fe,e,Ae),(0,N.$0)(Ie,-(0,a.kU)(t),e),(0,N.e$)(Ie,Ie,-(0,a.kU)(r),Fe);const{up:n,direction:o}=i;return(0,E.h)(n,Fe,e),(0,E.n)(n,n),(0,E.t)(n,n,Ie),(0,E.n)(o,e),(0,E.u)(o,o),(0,E.t)(o,o,Ie),i}function De(e){const t=e[1];e[1]=-e[2],e[2]=t}function Ne(e,t){const r=Pe(t,e.heading,e.tilt);return e.up=r.up,e}function He(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,te.Cr)(a,s,We),c=(0,re.vE)(t,l.origin,l.vector,0,Ve);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{const[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,re.Qj)(t),d=(0,E.b)((0,A.vt)(),Ve,l,e*n),u=(0,E.b)((0,A.vt)(),Ve,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Le={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},ze=(0,A.fA)(1,0,0),Be=(0,A.fA)(0,1,0),Ge=(0,A.vt)(),Ue=(0,A.vt)(),Ve=(0,A.vt)(),je=(0,_e.c)(),We=(0,te.vt)(),ke=(0,z.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Fe,o=Oe;return(0,E.n)(n,e),(0,E.h)(Oe,n,Ee),0===(0,E.e)(Oe,Oe)&&(0,E.h)(Oe,n,Ae),(0,E.h)(o,Oe,n),ae(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,A.vt)(),up:null,tilt:i,heading:r},o=Fe;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),p=Math.cos(c),m=(0,E.l)(o);let f;if(Math.abs(c)<1e-8)f=s+m;else{const e=m/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const g=p*s,v=s*s*(h*h),_=u*u*v,x=f-g,w=x*x,y=_*(_+w-o[1]*o[1]);if(y<0)return(0,E.g)(n.eye,o,f/m),n.tilt=0,Ne(n,e);const b=Math.sqrt(y),M=o[1]*x,T=_+w;let C;if(C=u>0?-b+M:b+M,Math.abs(T)<1e-8)return m<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,E.g)(n.eye,o,f/m),n.tilt=0,De(n.eye),Ne(n,e);n.eye[1]=C/T;const S=d*d*v,R=h*s,I=u*R*n.eye[1],F=n.eye[1]*n.eye[1],O=1-F,P=Math.sqrt(O),D=_*F+S-2*I*P*x+O*w;return Math.abs(D)<1e-8?((0,E.g)(n.eye,o,f/m),n.tilt=0,De(n.eye),Ne(n,e)):(n.eye[0]=(O*(f*o[0]-g*o[0])-R*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(O*(f*o[2]-g*o[2])-R*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,E.g)(n.eye,n.eye,f),De(n.eye),Ne(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,E.l)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Pe,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,E.l)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new we(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,E.j)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:p,minSamples:m,maxSamples:f}=Le,g=function(e){const{renderCoordsHelper:t,state:{camera:r}}=e,{center:i,eye:n}=r,o=Math.abs(t.getAltitude(i)),s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,Te),(0,E.d)(Ce,r,t);const i=(0,E.l)(Ce);return 0===i?0:(0,a.XM)((0,E.e)(Ce,Te)/i)}(t,i,n));return(0,_e.b)(je,t.referenceEllipsoid.radius+o),(0,_e.d)(je,s,r.distance,r.fovY)}(e),v=(0,a.qE)((u-h)/(p-h),0,1),_=Math.round((0,a.Cc)(m,f,v)),x=i.aboveGround,w=n.planes[5],y=[],b=(0,re.O_)(A.uY,ze,(0,re.vt)()),M=(0,re.O_)(A.uY,Be,(0,re.vt)());(0,L.s)(ke,0,0,0,0);const T=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-g:0,i=1===e&&x||3===e&&!x?g:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=0===n?0:(0,a.Cc)(t,i,1===e?1-(1-d)**2:3===e?d**2:d),h=(0,E.m)(Ue,s.origin,l.origin,u),p=(0,Se.nu)(s.direction,l.direction,u,Ge);r.intersectManifoldClosestSilhouette((0,G.LV)(h,p),o,Ve),se(Ve,c,Ve,w),y.push((0,A.o8)(Ve)),0!==y.length&&T((0,E.x)(y.at(-1),Ve));const m=((0,re.Tj)(b,Ve)?1:0)|((0,re.Tj)(M,Ve)?2:0);ke[m]=1}}y.length>2&&(0,E.x)(y[0],y.at(-1));const C=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,Ve,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,Ve[1]]),n.push([null,Ve[1]]),o=!0):n.push([Ve[0],Ve[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,L.b)(ke)>1?function(e,t){const r=[];for(const i of e)r.push(...He(i,t));return r}(He(y,b),M):[y],r,s);return new X.A({rings:C,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,O.tO)(e.spatialReference).radius,h=t.longitude,p=function(e,t,r){const i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(d,r,u)/2;o=h-p,s=h+p;const m=(0,a.kU)(d),f=(1+Math.sin(m))/(1-Math.sin(m)),g=(f+1)*Math.tan(i/u/2),_=g*g;function x(e){const t=Math.PI/2;return(e=v.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*f+_))),c=l+i/u,l=x(l),c=x(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=Re.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:R.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=w):n=new Y.A(o,l,s,c,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,xe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const $e="ssao";(0,A.vt)();var Ze=r(49186);let qe=class extends P.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Ze.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){1===e&&this.view.stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],qe.prototype,"view",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],qe.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],qe.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],qe.prototype,"techniques",null),qe=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl.RenderNode")],qe);var Ye=r(97220),Xe=r(98958),Je=r(63907),Ke=r(85079),Qe=r(74038);const et=[new Qe._("position",3,Je.pe.FLOAT,0,12)],tt=[new Qe._("position",2,Je.pe.FLOAT,0,8)],rt=(0,Ke.Xk)(tt);(0,Ke.Xk)(et),new Qe._("position",2,Je.pe.FLOAT,0,12),new Qe._("uv0",2,Je.pe.HALF_FLOAT,8,12),new Qe._("position",2,Je.pe.FLOAT,0,16),new Qe._("uv0",2,Je.pe.FLOAT,8,16);var it=r(95774),nt=r(90644);class ot extends Xe.w{constructor(e,t){super(e,t,new Ye.$(it.S,()=>r.e(9384).then(r.bind(r,59384))),rt)}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}}var at=r(65786);class st extends at.Y{constructor(){super(...arguments),this.projScale=1}}class lt extends st{constructor(){super(...arguments),this.intensity=1}}class ct extends at.Y{}class dt extends ct{constructor(){super(...arguments),this.blurSize=(0,H.vt)()}}var ut=r(15581);class ht extends Xe.w{constructor(e,t){super(e,t,new Ye.$(ut.S,()=>r.e(191).then(r.bind(r,90191))),rt)}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}}var pt=r(76284),mt=r(67171);const ft=2;let gt=class extends qe{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=$e,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new lt,this._drawParameters=new dt}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new mt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new pt.g(this.renderingContext,t,e),this.techniques.precompile(ht),this.techniques.precompile(ot),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(Je.nI);if(!r||!i)return;const n=this.techniques.get(ht),o=this.techniques.get(ot);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,h=u.relativeElevation,m=(0,a.qE)((5e5-h)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,g=f*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*vt/(0,ut.g)(u)**6*g;const v=u.fullViewport[2],_=u.fullViewport[3],x=this.fboCache.acquire(v,_,"ssao input",2);s.bindFramebuffer(x.fbo),s.setViewport(0,0,v,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const w=Math.round(v/ft),y=Math.round(_/ft),b=this.fboCache.acquire(w,y,"ssao blur",0);s.bindFramebuffer(b.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,0,ft/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,y),s.screen.draw(),x.release();const M=this.fboCache.acquire(w,y,$e,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,v,_),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=b.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,ft/v,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,y),s.screen.draw(),s.setViewport4fv(u.fullViewport),b.release(),f<1&&this.requestRender(1),M}};(0,o.Cg)([(0,d.MZ)()],gt.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],gt.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],gt.prototype,"isEnabled",void 0),gt=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],gt);const vt=.5;function _t(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/ft),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
705
+ }`)}},63907:(e,t,r)=>{r.d(t,{CQ:()=>f,Fq:()=>p,H0:()=>o,SB:()=>l,WR:()=>i,XN:()=>a,iE:()=>s,ld:()=>c,nI:()=>m,pe:()=>n,r6:()=>u,vt:()=>d,yI:()=>h});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(o),s={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},l={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},c={FLOAT:n.FLOAT,UNSIGNED_BYTE:n.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:n.BYTE,UNSIGNED_SHORT:n.UNSIGNED_SHORT,SHORT:n.SHORT,UNSIGNED_INT:n.UNSIGNED_INT,INT:n.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},d={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},u=36064,h=36065,p=36066,m=33306,f={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},65836:(e,t,r)=>{r.d(t,{n:()=>_t});var i=r(31821),n=r(12791),o=r(31635),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(10107),u=(r(44208),r(53966)),h=(r(87811),r(40608)),p=r(37585),m=r(69540);let f=class extends m.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,h.$)("esri.CameraLayout")],f);const g=f;var v=r(69052),_=r(25482),x=r(79901),w=r(36005),y=r(43937),b=r(56507),M=r(86738);let T=class extends((0,m.OU)(_.o)){constructor(...e){super(...e),this.position=new M.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new g}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,b.GB)(e.x||0),n.y=(0,b.GB)(e.y||0),n.z=e.hasZ?(0,b.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new M.A;return r.read(e,t),r.x=(0,b.GB)(r.x||0),r.y=(0,b.GB)(r.y||0),r.z=r.hasZ?(0,b.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,d.MZ)({type:M.A,json:{write:{isRequired:!0}}})],T.prototype,"position",void 0),(0,o.Cg)([(0,y.K)("position")],T.prototype,"writePosition",null),(0,o.Cg)([(0,w.w)("position")],T.prototype,"readPosition",null),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,x.w)(e=>v.ie.normalize((0,b.GB)(e)))],T.prototype,"heading",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,x.w)(e=>(0,a.qE)((0,b.GB)(e),-180,180))],T.prototype,"tilt",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,x.w)(e=>(0,a.qE)((0,b.GB)(e,55),1,170))],T.prototype,"fov",void 0),(0,o.Cg)([(0,d.MZ)({type:g,nonNullable:!0,json:{read:!1,write:!1}})],T.prototype,"layout",void 0),T=(0,o.Cg)([(0,h.$)("esri.Camera")],T);var C,S=r(9093),E=r(38954),A=r(51850),R=r(16930),I=(r(48353),r(9762),r(65806)),F=r(27993),O=r(73941),P=(r(19419),r(65008)),D=r(90629),N=r(58083),H=r(48163),L=r(87317),z=r(91829),B=r(82919),G=r(71351),U=r(44280);let V=C=class extends P.A{constructor(e){super(e),this._ray=(0,G.vt)(),this._viewport=(0,z.fA)(0,0,1,1),this._padding=(0,z.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,H.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,S.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,S.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,S.vt)(),this._frustumDirty=!0,this._frustum=(0,B.vt)(),this._fullViewport=(0,z.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,A.vt)(),this._up=(0,A.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,E.d)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,N.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,E.i)((0,A.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,L.c)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,L.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,L.c)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,L.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,L.a)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,L.d)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,N.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,N.B8)((0,S.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,S.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,E.j)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,N.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,N.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,d=(0,N.$h)((0,S.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,N.aI)(u,d)?u:d}copyFrom(e){(0,E.c)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,L.d)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,L.d)(this._padding,e.padding),this.notifyChange("_padding"),(0,p.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,N.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,B.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,N.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,L.d)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new C).copyFrom(this)}equals(e){return(0,E.q)(this.eye,e.eye)&&(0,E.q)(this.center,e.center)&&(0,E.q)(this.up,e.up)&&(0,L.a)(this._viewport,e.viewport)&&(0,L.a)(this._padding,e.padding)&&(0,p.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,L.f)(e.screenPadding,this.screenPadding)>=t||(0,L.f)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,E.a)(k,e.eye,e.center),(0,E.a)($,this.eye,this.center);const r=(0,E.e)(k,$),i=(0,E.y)(k),n=(0,E.y)($),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,E.x)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,U.gr)(this.viewForward,(0,E.d)(k,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,D.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==j&&(0,E.c)(j,e),j[3]=1,(0,L.t)(j,j,this.projectionMatrix);const r=Math.abs(j[3]);(0,E.g)(j,j,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*j[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*j[1]),t[2]=.5*(j[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;j[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],j[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],j[2]=(2*e[2]-1)*e[3],j[3]=e[3],null!=this.inverseProjectionMatrix&&((0,L.t)(j,j,this.inverseProjectionMatrix),t[0]=j[0],t[1]=j[1],t[2]=j[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,Z),this.renderToScreen(Z,t),t}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,(0,L.t)(j,j,this.viewProjectionMatrix),0===j[3])return null;const r=j;(0,E.g)(r,r,1/Math.abs(j[3]));const i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,Z),t)}unprojectFromRenderScreen(e,t){if((0,N.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,N.B8)(W,W))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,(0,L.t)(j,j,W),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}_computeUpGlobal(){(0,E.d)(k,this.center,this.eye);const e=(0,E.l)(this.center);e<1?(0,E.q)(this._up,A.Cb)&&((0,E.c)(this._up,A.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,E.e)(k,this.center))>.9999*(0,E.l)(k)*e||((0,E.h)($,k,this.center),(0,E.h)($,$,k),(0,E.n)($,$),(0,E.q)(this._up,$)||((0,E.c)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,E.E)(k,this.eye,this.center),Math.abs(k[2])<=.9999&&((0,E.g)(k,k,k[2]),(0,E.i)(k,-k[0],-k[1],1-k[2]),(0,E.n)(k,k),(0,E.q)(this._up,k)||((0,E.c)(this._up,k),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,E.q)(e,t)||((0,E.c)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):u.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,B.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,N.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewport",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_padding",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_fov",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_nearFar",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"pixelRatio",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_rows",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"rows",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_columns",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"columns",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"eye",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"center",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_center",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"up",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"_up",void 0),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewForward",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewUp",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"viewRight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"nearFar",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"near",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"far",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"screenViewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"screenPadding",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"x",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"y",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"width",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"height",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fullWidth",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fullHeight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"_aspect",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"padding",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"projectionMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fov",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fovX",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"fovY",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],V.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,d.MZ)()],V.prototype,"relativeElevation",void 0),V=C=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl.RenderCamera")],V);const j=(0,z.vt)(),W=(0,S.vt)(),k=(0,A.vt)(),$=(0,A.vt)(),Z=(0,D.r_)();class q{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far))}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new q(0,0)}static{this.Infinite=new q}}r(49718),r(6867),r(16396),(0,A.vt)(),(0,A.vt)(),(0,A.vt)(),new WeakMap;var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return 1===n?1:0;const s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,H.o8)(ee));break;case 2:Q(e,(0,H.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,p.aI)(e.at(-1),t)||e.push(t)}const ee=(0,H.vt)();var te=r(11964),re=r(27921);const ie=(0,A.vt)(),ne=(0,A.vt)();function oe(){return{direction:(0,A.vt)(),up:(0,A.vt)()}}function ae(e,t,r,i,n){let o=(0,E.n)(ie,e),s=(0,E.e)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,E.e)(t,i)),s<.99?((0,E.c)(o,t),l&&(0,E.g)(o,o,-1)):o=null);let c=0;if(o){(0,E.g)(ne,i,(0,E.e)(i,o)),(0,E.d)(o,o,ne);const e=(0,E.e)(o,n)/((0,E.l)(o)*(0,E.l)(n));(0,E.h)(ne,o,n),c=((0,E.e)(ne,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,E.e)(i,e)/(0,E.l)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function se(e,t,r,i){(0,E.d)(le,r,t),(0,re.T7)(i,(0,te.LV)(t,le),e)||e===r||(0,E.c)(e,r)}const le=(0,A.vt)(),ce=(0,A.fA)(0,1,0),de=(0,A.fA)(0,0,1),ue=(0,S.vt)(),he=(0,A.vt)(),pe=(0,A.vt)();function me(e,t,r,i=oe()){const{direction:n,up:o}=i;return(0,N.N9)(ue,-(0,a.kU)(t)),(0,N.eL)(ue,ue,(0,a.kU)(r)),(0,E.t)(n,de,ue),(0,E.g)(n,n,-1),(0,E.t)(o,ce,ue),i}function fe(e,t,r,i,n){const o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,E.b)(e,i,o,a)}const ge=(0,A.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return ae(t,r,i,de,ce)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,A.vt)();return(0,E.g)(o,n.direction,-t),(0,E.f)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,G.LV)(t.origin,t.direction),n,ge)||fe(ge,r,i,t.endpoint,n),se(ge,a,ge,l),s.push((0,H.fA)(ge[0],ge[1]))}return function(e,t,r){const i=e.map(e=>((0,E.i)(ge,e[0],e[1],0),t.fromRenderCoords(ge,ge,r),[ge[0],ge[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,I.g)(t,he,o),(0,I.g)(t,pe,o),he[0]-=r/2,pe[0]+=r/2,he[1]-=i/2,pe[1]+=i/2,(0,F.F)(he,o,he,a),(0,F.F)(pe,o,pe,a),n?(n.xmin=he[0],n.ymin=he[1],n.xmax=pe[0],n.ymax=pe[1],n.spatialReference=a):n=new Y.A(he[0],he[1],pe[0],pe[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),_e=r(17136),xe=r(97937),we=r(28735);class ye{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,B.vt)(),this._points=(0,B.Qy)(),this.lines=new Array(12),this._origin=(0,A.vt)(),this._direction=(0,A.vt)(),this._altitude=null;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,A.vt)(),endpoint:null}}update(e){(0,B.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,E.c)(this._origin,e.eye),(0,E.c)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines()}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,E.c)(this._points[t],e[t]);(0,B.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,B.m7)(this.frustum,e)}intersectsRay(e){return(0,B.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,B.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,B.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;be(this.lines[t],e[t],e[r]),be(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),be(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}static{this.planePointIndices=B.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function be(e,t,r){e.origin=t,e.endpoint=r,(0,E.E)(e.direction,t,r)}r(83047);const Me=(0,A.fA)(parseFloat(Number(5802e-9).toFixed(6)),parseFloat(Number(13558e-9).toFixed(6)),parseFloat(Number(331e-7).toFixed(6))),Te=(0,A.fA)(3*parseFloat(Number(65e-8).toFixed(6)),3*parseFloat(Number(1881e-9).toFixed(6)),3*parseFloat(Number(85e-9).toFixed(6)));(0,A.fA)(parseFloat(Number(Me[0]+Te[0]).toFixed(6)),parseFloat(Number(Me[1]+Te[1]).toFixed(6)),parseFloat(Number(Me[2]+Te[2]).toFixed(6)));(0,A.vt)(),(0,A.vt)(),(0,xe.c)(),(0,G.vt)();const Ce=(0,A.vt)(),Se=(0,A.vt)();var Ee=r(32728);const Ae=(0,A.fA)(0,0,1),Re=(0,E.n)((0,A.vt)(),(0,A.fA)(1,1,1)),Ie=(0,S.vt)(),Fe=(0,A.vt)(),Oe=(0,A.vt)();function Pe(e,t,r,i=oe()){(0,E.h)(Fe,e,Ae),0===(0,E.e)(Fe,Fe)&&(0,E.h)(Fe,e,Re),(0,N.$0)(Ie,-(0,a.kU)(t),e),(0,N.e$)(Ie,Ie,-(0,a.kU)(r),Fe);const{up:n,direction:o}=i;return(0,E.h)(n,Fe,e),(0,E.n)(n,n),(0,E.t)(n,n,Ie),(0,E.n)(o,e),(0,E.u)(o,o),(0,E.t)(o,o,Ie),i}function De(e){const t=e[1];e[1]=-e[2],e[2]=t}function Ne(e,t){const r=Pe(t,e.heading,e.tilt);return e.up=r.up,e}function He(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,te.Cr)(a,s,We),c=(0,re.vE)(t,l.origin,l.vector,0,Ve);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{const[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,re.Qj)(t),d=(0,E.b)((0,A.vt)(),Ve,l,e*n),u=(0,E.b)((0,A.vt)(),Ve,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Le={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},ze=(0,A.fA)(1,0,0),Be=(0,A.fA)(0,1,0),Ge=(0,A.vt)(),Ue=(0,A.vt)(),Ve=(0,A.vt)(),je=(0,xe.c)(),We=(0,te.vt)(),ke=(0,z.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Fe,o=Oe;return(0,E.n)(n,e),(0,E.h)(Oe,n,Ae),0===(0,E.e)(Oe,Oe)&&(0,E.h)(Oe,n,Re),(0,E.h)(o,Oe,n),ae(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,A.vt)(),up:null,tilt:i,heading:r},o=Fe;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),p=Math.cos(c),m=(0,E.l)(o);let f;if(Math.abs(c)<1e-8)f=s+m;else{const e=m/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const g=p*s,v=s*s*(h*h),_=u*u*v,x=f-g,w=x*x,y=_*(_+w-o[1]*o[1]);if(y<0)return(0,E.g)(n.eye,o,f/m),n.tilt=0,Ne(n,e);const b=Math.sqrt(y),M=o[1]*x,T=_+w;let C;if(C=u>0?-b+M:b+M,Math.abs(T)<1e-8)return m<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,E.g)(n.eye,o,f/m),n.tilt=0,De(n.eye),Ne(n,e);n.eye[1]=C/T;const S=d*d*v,R=h*s,I=u*R*n.eye[1],F=n.eye[1]*n.eye[1],O=1-F,P=Math.sqrt(O),D=_*F+S-2*I*P*x+O*w;return Math.abs(D)<1e-8?((0,E.g)(n.eye,o,f/m),n.tilt=0,De(n.eye),Ne(n,e)):(n.eye[0]=(O*(f*o[0]-g*o[0])-R*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(O*(f*o[2]-g*o[2])-R*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,E.g)(n.eye,n.eye,f),De(n.eye),Ne(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,E.l)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Pe,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,E.l)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ye(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,E.j)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:p,minSamples:m,maxSamples:f}=Le,g=function(e){const{renderCoordsHelper:t,state:{camera:r}}=e,{center:i,eye:n}=r,o=Math.abs(t.getAltitude(i)),s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,Ce),(0,E.d)(Se,r,t);const i=(0,E.l)(Se);return 0===i?0:(0,a.XM)((0,E.e)(Se,Ce)/i)}(t,i,n));return(0,xe.b)(je,t.referenceEllipsoid.radius+o),(0,xe.d)(je,s,r.distance,r.fovY)}(e),v=(0,a.qE)((u-h)/(p-h),0,1),_=Math.round((0,a.Cc)(m,f,v)),x=i.aboveGround,w=n.planes[5],y=[],b=(0,re.O_)(A.uY,ze,(0,re.vt)()),M=(0,re.O_)(A.uY,Be,(0,re.vt)());(0,L.s)(ke,0,0,0,0);const T=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-g:0,i=1===e&&x||3===e&&!x?g:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=0===n?0:(0,a.Cc)(t,i,1===e?1-(1-d)**2:3===e?d**2:d),h=(0,E.m)(Ue,s.origin,l.origin,u),p=(0,Ee.nu)(s.direction,l.direction,u,Ge);r.intersectManifoldClosestSilhouette((0,G.LV)(h,p),o,Ve),se(Ve,c,Ve,w),y.push((0,A.o8)(Ve)),0!==y.length&&T((0,E.x)(y.at(-1),Ve));const m=((0,re.Tj)(b,Ve)?1:0)|((0,re.Tj)(M,Ve)?2:0);ke[m]=1}}y.length>2&&(0,E.x)(y[0],y.at(-1));const C=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,Ve,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,Ve[1]]),n.push([null,Ve[1]]),o=!0):n.push([Ve[0],Ve[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,L.b)(ke)>1?function(e,t){const r=[];for(const i of e)r.push(...He(i,t));return r}(He(y,b),M):[y],r,s);return new X.A({rings:C,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,O.tO)(e.spatialReference).radius,h=t.longitude,p=function(e,t,r){const i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(d,r,u)/2;o=h-p,s=h+p;const m=(0,a.kU)(d),f=(1+Math.sin(m))/(1-Math.sin(m)),g=(f+1)*Math.tan(i/u/2),_=g*g;function x(e){const t=Math.PI/2;return(e=v.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*f+_))),c=l+i/u,l=x(l),c=x(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=_e.Y_.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:R.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=w):n=new Y.A(o,l,s,c,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,we.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const $e="ssao";(0,A.vt)();var Ze=r(49186);let qe=class extends P.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Ze.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){1===e&&this.view.stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],qe.prototype,"view",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],qe.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],qe.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],qe.prototype,"techniques",null),qe=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl.RenderNode")],qe);var Ye=r(97220),Xe=r(98958),Je=r(63907),Ke=r(85079),Qe=r(74038);const et=[new Qe._("position",3,Je.pe.FLOAT,0,12)],tt=[new Qe._("position",2,Je.pe.FLOAT,0,8)],rt=(0,Ke.Xk)(tt);(0,Ke.Xk)(et),new Qe._("position",2,Je.pe.FLOAT,0,12),new Qe._("uv0",2,Je.pe.HALF_FLOAT,8,12),new Qe._("position",2,Je.pe.FLOAT,0,16),new Qe._("uv0",2,Je.pe.FLOAT,8,16);var it=r(95774),nt=r(90644);class ot extends Xe.w{constructor(e,t){super(e,t,new Ye.$(it.S,()=>r.e(9384).then(r.bind(r,59384))),rt)}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}}var at=r(65786);class st extends at.Y{constructor(){super(...arguments),this.projScale=1}}class lt extends st{constructor(){super(...arguments),this.intensity=1}}class ct extends at.Y{}class dt extends ct{constructor(){super(...arguments),this.blurSize=(0,H.vt)()}}var ut=r(15581);class ht extends Xe.w{constructor(e,t){super(e,t,new Ye.$(ut.S,()=>r.e(191).then(r.bind(r,90191))),rt)}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}}var pt=r(76284),mt=r(67171);const ft=2;let gt=class extends qe{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=$e,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new lt,this._drawParameters=new dt}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new mt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new pt.g(this.renderingContext,t,e),this.techniques.precompile(ht),this.techniques.precompile(ot),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(Je.nI);if(!r||!i)return;const n=this.techniques.get(ht),o=this.techniques.get(ot);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,h=u.relativeElevation,m=(0,a.qE)((5e5-h)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,g=f*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*vt/(0,ut.g)(u)**6*g;const v=u.fullViewport[2],_=u.fullViewport[3],x=this.fboCache.acquire(v,_,"ssao input",2);s.bindFramebuffer(x.fbo),s.setViewport(0,0,v,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const w=Math.round(v/ft),y=Math.round(_/ft),b=this.fboCache.acquire(w,y,"ssao blur",0);s.bindFramebuffer(b.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,0,ft/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,y),s.screen.draw(),x.release();const M=this.fboCache.acquire(w,y,$e,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,v,_),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=b.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,ft/v,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,y),s.screen.draw(),s.setViewport4fv(u.fullViewport),b.release(),f<1&&this.requestRender(1),M}};(0,o.Cg)([(0,d.MZ)()],gt.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],gt.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],gt.prototype,"isEnabled",void 0),gt=(0,o.Cg)([(0,h.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],gt);const vt=.5;function _t(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/ft),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
706
706
  vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
707
707
  return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
708
708
  }
709
709
  float evaluateAmbientOcclusion() {
710
710
  return 1.0 - evaluateAmbientOcclusionInverse();
711
711
  }`)):e.code.add(i.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
712
- float evaluateAmbientOcclusion() { return 0.0; }`)}},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>a});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.I)(e.internalFormat))*(34067===e.target?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>l,uC:()=>s});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);const 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))},71955:(e,t,r)=>{r.d(t,{K:()=>l});var i=r(43519),n=r(31821),o=r(74333);class a extends o.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var s=r(43616);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new a("symbolColorMixMode",e=>s.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
712
+ float evaluateAmbientOcclusion() { return 0.0; }`)}},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>a});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.I)(e.internalFormat))*(34067===e.target?6:1))}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},71955:(e,t,r)=>{r.d(t,{K:()=>l});var i=r(43519),n=r(31821),o=r(74333);class a extends o.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var s=r(43616);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new a("symbolColorMixMode",e=>s.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
713
713
  MaskedColor applySymbolColor(MaskedColor color) {
714
714
  return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
715
715
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9718],{5359:(e,t,i)=>{i.d(t,{H:()=>s,Z:()=>r});const s=Symbol("isImageryTileGraphicOrigin");function r(e){return!!e&&s in e}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(31635),r=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],i),i}},19718:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ye});var s,r=i(31635),n=i(37838),a=i(69540),o=i(49186),l=i(53966),c=i(92071),u=i(74887),f=i(36708),h=i(10107),p=i(56507),d=i(44208),m=(i(87811),i(40608)),g=i(89808),y=i(99959),w=i(5359);class v extends y.A{get[(s=w.H,g.Q)](){return this.layer}constructor(e){super(),this[s]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var x=i(4146),b=i(18768),I=i(63074),C=i(69208),S=i(89015),A=i(16131),T=i(8303),R=i(63660),M=i(56551),O=i(54310),_=i(25036),F=i(82935),P=i(10873),k=i(20437),D=i(74797),N=i(22796),L=i(76353),E=i(84169),B=i(4916),z=i(68197),J=i(5443),$=i(16930),U=i(73444),j=i(14140),Z=i(16019);function q(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function H(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function V(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let n=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];q(l)?n=e:H(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,n=(t-e)/(i-1);s.push([e-.5*n,t+.5*n]),r.push(n);for(let t=0;t<i;t++)u.push(e+n*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}n>-1&&-1===a?a=0===n?1:0:a>-1&&-1===n?n=0===a?1:0:-1===a&&-1===n&&(n=0,a=1),o=o.filter((e,t)=>!(t===n||t===a));const{referencing:l}=e.domain,c=l.find(e=>e.coordinates.includes(i[n])).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new $.A({wkid:f}),[p,d]=s[n],[m,g]=s[a],y=new J.A({xmin:p,xmax:d,ymin:m,ymax:g,spatialReference:h});return{width:Math.round(y.width/r[n]),height:Math.round(y.height/r[a]),extent:y,dimensions:o}}function G(e){const t=(0,U.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function W(){return Math.round(255*Math.random())}function X(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:n,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=G(r)),n&&(t[e].unit=n.label?G(n.label):null,t[e].symbol=n.symbol?.value),a)){const i=Object.entries(a).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let s=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(!r)return;const n=e.label?G(e.label):null;if(r.Label=n,e.preferredColor){const t=z.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),s&&i.forEach(e=>{null==e.Red&&(e.Red=W(),e.Green=W(),e.Blue=W())}));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Y(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,Z.X1)(t,i)}function K(e,t,i){const s=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(n=1,e=>n*=e.count);var n;const a=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=a[s.findIndex(({name:t})=>t===e[r])]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Q=i(45617),ee=i(87186),te=i(77301),ie=i(28435),se=i(6952);let re=class extends B.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[n,a]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:n,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,ie.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:n,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new J.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new $.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},g={...t.keyProperties};s&&(g.DataType="Thematic");const y=new ee.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:g,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(y),this.createRemoteDatasetStorageInfo(y,512,512),this._set("rasterInfo",y),this.updateTileInfo(),y.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,y.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),y.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,n="thematic"!==s.dataType,a=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:n},i):Promise.resolve((0,ie.lD)(e,t,r,n)),l=null!=s.statistics,c=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,se.f4)(e)),h=await(0,u.Lx)([a,f]);if(!h[0].value&&h[1].value)throw new o.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),c||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const n=r.dimensions.map(e=>new Q.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),a=(0,te.NG)(n,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,se.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],re.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"source",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"url",null),re=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],re);const ne=re;var ae=i(22671);let oe=class extends B.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:n}=await this._fetchData(e),{statistics:a,histograms:o}=(0,se.eH)(i[0]),l=n?.map(e=>({BandName:e})),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ne({source:{extent:t,pixelBlocks:i,attributeTable:r?ae.A.fromJSON(r):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:n,values:a}=s[e];if(!("ndarray"===n.toLowerCase()&&a?.length&&t?.length&&r?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!q(t[t.length-1])||!H(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=V(e),{ranges:n}=e,a=Object.keys(n).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<a.length;e++){const t=a[e];r?.length&&o.push({name:t,dimensions:r})}const l=X(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:f}=n[s],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":Y(o),g=t*i,y=o.length/g;for(let s=0;s<y;s++){const n=j.A.createEmptyBand(m,g),a=new Uint8Array(g).fill(255);let l=!1;const c=s*g;for(let e=0;e<g;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):n[e]=t}if(0===e||r?.length){const e=new j.A({width:t,height:i,mask:l?a:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[K(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(n),l?e.mask&&(e.mask=j.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const f=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:a}}(t)}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],oe.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],oe.prototype,"source",void 0),oe=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],oe);const le=oe;var ce=i(4576),ue=i(21325),fe=i(50103),he=i(21312);function pe(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function de(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new $.A({wkid:t});if(e=String(e).trim(),(0,ue.jp)(e))return new $.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),n=r>-1?r:i.indexOf("GEOGCS");if(-1===n)return null;const a=e.slice(n,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=me(a);const l=new $.A(t?{wkid:t}:{wkt:a}),c=me(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=me(e),new $.A(0!==t?{wkid:t}:{wkt:e})):null}function me(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ge(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,fe.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,fe.mX)(e);t.spatialReference=de(i)}}else if((0,fe.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,fe.V6)(e,"GeodataXform"),i=de((0,fe.v7)(t,"SpatialReference/WKID")||(0,fe.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,fe.v7)(t,"PolynomialOrder")??1,r=(0,fe.Ui)(t,"CoeffX/Double"),n=(0,fe.Ui)(t,"CoeffY/Double"),a=(0,fe.Ui)(t,"InverseCoeffX/Double"),o=(0,fe.Ui)(t,"InverseCoeffY/Double"),l=pe(r,n),c=pe(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new he.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,fe.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,fe.mX)(e));else if((0,fe.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,fe.v7)(e,"NoDataValue"),i=(0,fe.V6)(e,"Histograms/HistItem"),s=(0,fe.v7)(i,"HistMin"),r=(0,fe.v7)(i,"HistMax"),n=(0,fe.v7)(i,"BucketCount"),a=(0,fe.mX)(i,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,u;(0,fe.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}});const f=(0,fe.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=r?{min:s,max:r,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map(e=>e.statistics).filter(ce.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map(e=>e.histogram).filter(ce.Ru):null}return t}var ye=i(77649);let we=class extends B.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new $.A({wkid:3857})),r?.length&&null==s&&(s=(0,se.Pg)(r));const{width:o,height:l}=t;let c=new J.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ne({source:{extent:u,nativeExtent:c,transform:n,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,ye.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new o.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,d.A)("ios"),n=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==n)throw new o.A("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,a="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,u.Lx)([r,o]);if(t?.aborted)throw(0,u.NK)();const c=ge(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new he.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],we.prototype,"datasetFormat",void 0),we=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],we);const ve=we;var xe=i(97768),be=i(84952),Ie=i(86738),Ce=i(20223),Se=i(87045),Ae=i(25943),Te=i(73037),Re=i(82371);let Me=class extends B.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:n}=this.rasterInfo,{transposeInfo:a}=r,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let n=0;for(const{data:e}of t)h.push(n),r.set(new Uint8Array(e),n),n+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?a.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:g,blockWidth:y,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((n.xmin-g.x)/v)%y,I=Math.round((n.xmax-g.x)/v)%y||y,C=Math.round((g.y-n.ymax)/x)%w,S=Math.round((g.y-n.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?C:0,R=i===m.maxCol?I:y,M=t===m.maxRow?S:w;return(0,ie.z$)(d,{x:A,y:T},{width:R-A,height:M-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let n=r-s+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===n||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new o.A("image-server-raster:open","cannot initialize image service");(0,Re.E9)(r,s);const n="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:n}=t;if(null!=r&&null!=n)return Se.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=n)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,n=s?t(s):-1/0;return Se.A.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=n})})}return Se.A.fromJSON(e)}(s.tileInfo,s):Se.A.fromJSON(s.tileInfo);(0,xe.Lw)(n);const[a,l]=this._computeMinMaxLOD(r,n),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=n;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some(e=>Math.abs(e.resolution-h)<f))&&(u.x=u.y=a.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=a.level-l.level,[m,g]=n.size,y=[],w=[];p.forEach((e,t)=>{e.level>=l.level&&e.level<=a.level&&y.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)}),y.sort((e,t)=>e.x-t.x);const v=this.computeBlockBoundary(c,m,g,n.origin,y,d),x=y.length>1?y.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every(e=>e===w[0])?w[0]??2:Math.round(10/(l.resolution/a.resolution)**(-1/d))/10;if(r.storageInfo=new Ce.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Te.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,be.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new Ae.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=$.A.fromJSON(t.spatialReference||e.spatialReference),n=new Ie.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new ee.A({width:i,height:s,bandCount:3,extent:J.A.fromJSON(e),spatialReference:r,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Re.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,n=await Promise.all([s,r]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,n=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),a=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[n,a];if("Raster"===o)return[r.find(e=>e.resolution===i.x)??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=r.find(e=>Math.abs(e.scale-c)<s),u||(u=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??n));let f=a;return l>0&&(f=r.find(e=>Math.abs(e.scale-l)<s)??a,this._levelOffset=f.level-a.level),[u,f]}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Me.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],Me.prototype,"tileType",void 0),Me=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],Me);const Oe=Me;var _e=i(47124);const Fe=new Map;Fe.set("Int8","s8"),Fe.set("UInt8","u8"),Fe.set("Int16","s16"),Fe.set("UInt16","u16"),Fe.set("Int32","s32"),Fe.set("UInt32","u32"),Fe.set("Float32","f32"),Fe.set("Float64","f32"),Fe.set("Double64","f32");const Pe=new Map;Pe.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Pe.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Pe.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Pe.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),Pe.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ke=class extends B.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*n);return new j.A({width:r,height:n,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let g=0;for(g=0;g<d;g++)p&&!p.includes(g)||m.push(this.request(this._files.data,{range:{from:u[g].from,to:u[g].to},responseType:"array-buffer",signal:s.signal}));const y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),v=new Uint8Array(w),x=[];let b=0;for(g=0;g<d;g++)x.push(b),v.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;const I=Pe.get(this.rasterInfo.storageInfo.compression).decoderFormat,C=await this.decodePixelBlock(v.buffer,{width:r,height:n,format:I,planes:p?.length||l,offsets:x,pixelType:c}).catch(()=>null);if(null==C)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!C.mask&&(S=S[0],null!=S)){const e=C.width*C.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(g=0;g<e;g++)Math.abs((C.pixels[0][g]-S)/S)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)C.pixels[0][g]!==S&&(t[g]=1);C.mask=t}let A=0,T=0;if(f!==r||h!==n){let e=C.mask;if(e)for(g=0;g<n;g++)if(T=g*r,g<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*n),C.mask=e,g=0;g<h;g++)for(T=g*r,A=0;A<f;A++)e[T+A]=1}return C}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!n){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,se.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,n,a;if(_e.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)s[4*n+a]=i[4*n+3-a];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(f/l/u**g)-1,t=Math.ceil(h/c/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return Pe.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=n**f,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=c*u;p=n**e,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,fe.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");const i=(0,fe.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),a=((0,fe.mX)(t,"Compression")||"none").toLowerCase();if(!Pe.has(a))throw new o.A("mrf:open","currently does not support compression "+a);const l=(0,fe.mX)(t,"DataType")||"UInt8",c=Fe.get(l);if(null==c)throw new o.A("mrf:open","currently does not support pixel type "+l);const u=(0,fe.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,fe.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map(e=>parseFloat(e)))),(0,fe.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");const g=(0,fe.V6)(e,"MRF_META/GeoTags"),y=(0,fe.V6)(g,"BoundingBox");let w,v=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),i=parseFloat(y.getAttribute("maxx")),s=parseFloat(y.getAttribute("maxy")),r=(0,fe.mX)(g,"Projection")||"";let n=$.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(n=new $.A({wkid:e}))}else n=de(r)??$.A.WGS84;else v=!0,n=new $.A({wkid:3857});w=new J.A(e,t,i,s),w.spatialReference=n}else v=!0,w=new J.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new $.A({wkid:3857})});const x=(0,fe.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,C=new Ce.A({origin:new Ie.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:a,pyramidScalingFactor:b}),S=new Ie.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new ee.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:n,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:C}),T=(0,fe.mX)(e,"datafile"),R=(0,fe.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Pe.get(a).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ke.prototype,"datasetFormat",void 0),ke=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.MRFRaster")],ke);const De=ke;var Ne=i(15265);function Le(e){const t=e.fields,i=e.records,s=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),n=r.map(e=>e.name),a=[];let o=0,l=0;return i.forEach(e=>{const t={};for(t[s]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})}),{displayFieldName:"",fields:r,features:a}}class Ee{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:r,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Ne.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)i.push((0,Ne.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length}),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:Le({fields:l,records:c})}}}var Be=i(45664),ze=i(12196);const Je=(e,t)=>e.get(t)?.values,$e=(e,t)=>e.get(t)?.values?.[0];let Ue=class extends B.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,s);null!=n&&n.pixels[0]instanceof Uint8Array&&(r.mask=n.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new o.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:n}=(0,Be.uT)(i),a=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(a,c,s,n?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,Be.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:g}=t;let y=de(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==y&&(w=!0,y=new $.A({wkid:3857}));const v=new J.A({...t.extent,spatialReference:y}),x=new Ie.A(v?{x:v.xmin,y:v.ymax,spatialReference:y}:{x:0,y:0}),b=new Ce.A({blockWidth:r,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),C=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{};let S=null;const A=$e(e[0],"PHOTOMETRICINTERPRETATION"),T=Je(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new ee.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:y,isPseudoSpatialReference:w,keyProperties:C,extent:v,colormap:S,statistics:g?g.statistics:null});if(m?.length&&(R.nativeExtent=new J.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:y}),R.transform=new he.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:R}}(a),h=(0,Be.zS)(a),p=(0,Be.r9)(a);if(this._headerInfo={littleEndian:s,isBigTiff:n,ifds:a,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new o.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&l.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=a[0].get("PREDICTOR")?.values?.[0],m=a[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,se.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new Ie.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}y.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||g||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const n=await this._readIFD(t,i,ze.NB,s,r);if(!n?.ifd)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=ze.NB,s=4,r){let{fileChunk:n,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,Be.JM)(n,t,a,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:a,fileOffset:o},r),c=await this._readIFD(l,t,ze.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,n.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;const n=r.map(e=>e.offlineOffsetSize),a=Math.min.apply(null,n.map(e=>e[0])),o=Math.max.apply(null,n.map(e=>e[0]+e[1]));let l=1===n.length||o-a<=this._bufferSize;if(!l&&n.length>1&&(n.sort((e,t)=>e[0]-t[0]),l=n.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,n[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),s);return void r.forEach(i=>(0,Be.Cr)(e,t,i,a))}const c=r.map(async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,Be.Cr)(r,t,e,i[0])});await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,n=Math.ceil((t-e)/r);let a=e;for(let e=0;e<n;e++)s.push(this.request(this.url,{range:{from:a,to:e===n-1?t:a+r-1},responseType:"array-buffer",signal:i})),a+=r;const o=await Promise.all(s);if(1===n)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<n;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const n=this._getTileLocation(e,t,i,s);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),f=await Promise.all(u),h=f.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==g||l!==y){let e=w.mask;if(e)for(v=0;v<y;v++)if(b=v*g,v<l)for(x=o;x<g;x++)e[b+x]=0;else for(x=0;x<g;x++)e[b+x]=0;else for(e=new Uint8Array(g*y),w.mask=e,v=0;v<l;v++)for(b=v*g,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,Be.XO)(l,o),u=Je(l,"TILEOFFSETS");if(void 0===u)return null;const f=Je(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=n[a];if(t>d||i>m||t<h||i<p)return null;const g=$e(l,"IMAGEWIDTH"),y=$e(l,"IMAGELENGTH"),w=$e(l,"TILEWIDTH"),v=$e(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===d&&y%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Ee.parse(t);return i?.recordSet?ae.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],Ue.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],Ue.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,h.MZ)()],Ue.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,h.MZ)()],Ue.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ue.prototype,"datasetFormat",void 0),Ue=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Ue);const je=Ue,Ze=new Map;Ze.set("MRF",{desc:"Meta Raster Format",constructor:De}),Ze.set("TIFF",{desc:"GeoTIFF",constructor:je}),Ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Oe}),Ze.set("JPG",{desc:"JPG Raster Format",constructor:ve}),Ze.set("PNG",{desc:"PNG Raster Format",constructor:ve}),Ze.set("GIF",{desc:"GIF Raster Format",constructor:ve}),Ze.set("BMP",{desc:"BMP Raster Format",constructor:ve}),Ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:le}),Ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ne});class qe{static get supportedFormats(){const e=new Set;return Ze.forEach((t,i)=>e.add(i)),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let n=e.datasetFormat??i?.datasetFormat;null==n&&(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?n="CovJSON":s?.extent&&s.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");const a={url:t,source:s,sourceJSON:r,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(a).forEach(e=>{null==a[e]&&delete a[e]}),n){if(!this.supportedFormats.has(n))throw new o.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,Ze.get(n).constructor)(a);return await i.open({signal:e.signal}),i}const l=Array.from(Ze.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const u=()=>{if(n=l[c++],!n)return null;if("CRF"===n)return null;const t=new(0,Ze.get(n).constructor)(a);return t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){Ze.has(e.toUpperCase())||Ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var He=i(6049),Ve=i(24212),Ge=i(30291),We=i(88625);let Xe=class extends((0,I.dM)((0,_.j)((0,A.q)((0,T.A)((0,M.H)((0,C.d)((0,S.o)((0,R.G)((0,F.e)((0,b.b)((0,O.J)((0,c.P)((0,a.OU)(x.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.graphicOrigin=new v(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,u.sg)(async(e,t,s)=>{const{save:r,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return r(this,t);case 1:return n(this,s,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,D.rZ)("Pixel Value"),(0,D.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,D.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,D.DV)(t),s=(0,D.y6)();e.push(i,s)}if(r){const t=(0,D.AL)(r);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==D.F_.rawServicePixelValue)),s=(0,Ge.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,D.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,p.PZ)(N.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,L.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new o.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,f.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,L.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,He.UD)(t.toJSON(),s);const r=await Promise.all(s.map(e=>qe.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i}))),n=r.findIndex(e=>null==e);if(n>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await qe.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await qe.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);const s=(0,He.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new E.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,Ve.XF)(l.A.getLogger(this),(0,Ve.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ve.XF)(l.A.getLogger(this),(0,Ve.tW)("ImageryTile layers",e))}};(0,r.Cg)([(0,h.MZ)({clonable:!1})],Xe.prototype,"_primaryRasters",void 0),(0,r.Cg)([(0,h.MZ)({type:We.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Xe.prototype,"elevationInfo",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],Xe.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,h.MZ)(P.fV)],Xe.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Xe.prototype,"isReference",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide"]})],Xe.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],Xe.prototype,"blendMode",void 0),(0,r.Cg)([(0,h.MZ)({type:N.A,json:{name:"renderingRule",write:!0}})],Xe.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,h.MZ)()],Xe.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Xe.prototype,"version",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],Xe.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Xe.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],Xe.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,h.MZ)({json:{read:!1,write:!1}}),(0,h.MZ)(P.PY)],Xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"fields",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"rasterFields",null),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],Xe.prototype,"source",void 0),Xe=(0,r.Cg)([(0,m.$)("esri.layers.ImageryTileLayer")],Xe);const Ye=Xe},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(31635),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,n=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+n*e[9]+i*e[11]}}const n=s*s,a=r*r,o=s*r,l=n*s,c=n*r,u=s*a,f=r*a;return{x:e[0]+s*e[2]+r*e[4]+n*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+n*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:n,ymax:a,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:a}),l.push({x:n,y:a}),l.push({x:s,y:r}),l.push({x:n,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(a-r)*t/(e-1)}),l.push({x:n,y:r+(a-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(n-s)*t/e,y:r}),l.push({x:s+(n-s)*t/e,y:a})}l=l.map(t=>p(e,t,i));const c=l.map(e=>e.x),f=l.map(e=>e.y);return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,n,a]=e,o=s*a-n*r,l=n*r-s*a;return[(n*i-t*a)/o,(s*i-t*r)/l,a/o,r/l,-n/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,n.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,n.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,n.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,n.MZ)()],m.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,a.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r.Cg)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},24212:(e,t,i)=>{function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:c}(e).mode}(null==e||(e.hasZ??!1),t)}function r(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}i.d(t,{$7:()=>n,B:()=>r,XF:()=>o,tW:()=>a,w7:()=>s}),i(83047),i(16271);const l={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},25943:(e,t,i)=>{i.d(t,{d:()=>S});var s,r=i(31635),n=i(78888),a=i(65008),o=i(49186),l=i(36563),c=(i(44208),i(66344)),u=i(15142),f=i(74887),h=i(36708),p=i(96211),d=i(84952),m=i(10107),g=(i(53966),i(87811),i(40608)),y=i(72802),w=i(4718),v=i(69397),x=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,w.o8)(t));const s=this.location.width,r=this.location.height;let n=!0,a=!0;const l=function(e,t=!1){return e<=x.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,l[c]|=1<<t):n=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,n=this._availability;return r<0||r>n.length?"unknown":n[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:s,col:r,width:a,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:a,height:l},valid:!0,data:new Array(a*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==a||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:a,height:l}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function I(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends a.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,h.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),h.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof b){const r=s.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const n=this.layer.tileInfo;n.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,f.zf)(e))throw e;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,n,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const c=new AbortController;a.then(()=>c.abort(),()=>c.abort());let u=!1;const h=(0,l.hA)(()=>{u||(u=!0,c.abort())});if(this.addHandles(h,o),await(0,p.md)(10,c.signal).catch(()=>{}),u||(u=!0,this.removeHandles(o)),(0,f.G4)(c))return;const d=new y.U(e,t,i,r),m={...n,signal:c.signal},g=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&g.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,r);if(n)return Promise.resolve(n);const a=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,f.u7)(a,()=>t((0,f.NK)()));const i=I(r);let n=this._pendingTilemapRequests[i];if(!n){n=b.fromDefinition(r,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=I(s);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=s=(0,r.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],S)},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(31635),r=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends((0,a.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s.Cg)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s.Cg)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s.Cg)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s.Cg)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,s.Cg)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,s.Cg)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>n,ez:()=>h,lM:()=>a,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(31635),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r.Cg)([(0,a.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r.Cg)([(0,n.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r.Cg)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),g=(0,c.jV)(m,i);e=f.path;const y=p||await(0,s.A)(e,g).then(e=>e.data),w=y.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,s.A)(`${e}/colormap`,g):null,x=y.hasHistograms?(0,s.A)(`${e}/histograms`,g):null,b=y.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,g):null,I=y.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([w,v,x,b,I]);let S=null;if(y.minValues&&y.minValues.length===y.bandCount){S=[];for(let e=0;e<y.minValues.length;e++)S.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const A=r.A.fromJSON(y.extent),T=Math.ceil(A.width/y.pixelSizeX-.1),R=Math.ceil(A.height/y.pixelSizeY-.1),M=a.A.fromJSON(y.spatialReference||y.extent.spatialReference),O="fulfilled"===C[0].status?C[0].value?.data:null,_=O?.features?.length?u.A.fromJSON(O):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===C[2].status?C[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;E&&E.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:B,serviceDataType:z}=y;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==J)&&(J=y.noDataValues);const $=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:M,pixelSize:new n.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:M}),pixelType:y.pixelType.toLowerCase(),statistics:S,attributeTable:_,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:E,storageInfo:$})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(31635),r=i(25482),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s.Cg)([(0,n.MZ)()],o.prototype,"affectsPixelSize",null),(0,s.Cg)([(0,n.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s.Cg)([(0,a.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 49f7a5523462aebf90fc.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5455],{37836:(t,e,n)=>{n.r(e),n.d(e,{Button:()=>$}),n(30357),n(32239);var a=n(34088),o=n(46337),r=n(48015),c=n(52567),l=n(32906),i=n(60178),s=n(21796),d=n(60992),u=n(93174),b=n(4643),p=n(83623),h=n(75572),v=n(79e3),g=n(20307);const f="content--slotted",k="icon",m="icon--start",x="icon--end",y="icon-start-empty",w="icon-end-empty",z="button-padding",E="button-padding--shrunk",C=o.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill]) button:hover,:host([appearance=outline-fill]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([appearance=outline-fill]) button:active,:host([appearance=outline-fill]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]) button:hover,:host([appearance=solid][kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-border-3)}:host([appearance=solid][kind=neutral]) button:active,:host([appearance=solid][kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-border-2)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline]) button:hover,:host([appearance=outline]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=outline]) button:active,:host([appearance=outline]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]) button,:host([appearance=transparent]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=transparent]) button:hover,:host([appearance=transparent]) button:focus,:host([appearance=transparent]) a:hover,:host([appearance=transparent]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=transparent]) button:active,:host([appearance=transparent]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button:hover,:host([appearance=transparent][kind=inverse]) a:hover{background-color:var(--calcite-color-transparent-inverse-hover)}:host([appearance=transparent][kind=inverse]) button:active,:host([appearance=transparent][kind=inverse]) a:active{background-color:var(--calcite-color-transparent-inverse-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`;class $ extends l.WF{constructor(){super(...arguments),this.attributeWatch=(0,i.oW)(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentEl=(0,r._)(),this.mutationObserver=(0,b.c)("mutation",()=>this.updateHasContent()),this.resizeObserver=(0,b.c)("resize",()=>this.setTooltipText()),this.focusSetter=(0,g.u)()(this),this.messages=(0,h.u)(),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:l.pf},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=C}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),(0,u.c)(this),this.formEl=(0,s.f)(this)}async load(){o.S$||this.updateHasContent()}updated(){(0,d.u)(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),(0,u.d)(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=(0,v.C)(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){const{type:t}=this;this.href||("submit"===t?(0,s.s)(this):"reset"===t&&(0,s.r)(this))}setTooltipText(){const{contentEl:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){this.childEl=t,t&&this.resizeObserver?.observe(t)}render(){const t=this.href?"a":"button",e=this.href?c.eu`a`:c.eu`button`,n=this.loading?o.qy`<div class=${(0,l.CP)("calcite-button--loader")}><calcite-loader class=${(0,l.CP)(this.loading?"loading-in":"loading-out")} inline .label=${this.messages.loading} .scale=${"l"===this.scale?"m":"s"}></calcite-loader></div>`:null,a=!this.iconStart&&!this.iconEnd,i=o.qy`<calcite-icon class=${(0,l.CP)({[k]:!0,[m]:!0})} .flipRtl=${"start"===this.iconFlipRtl||"both"===this.iconFlipRtl} .icon=${this.iconStart} .scale=${(0,p.g)(this.scale)}></calcite-icon>`,s=o.qy`<calcite-icon class=${(0,l.CP)({[k]:!0,[x]:!0})} .flipRtl=${"end"===this.iconFlipRtl||"both"===this.iconFlipRtl} .icon=${this.iconEnd} .scale=${(0,p.g)(this.scale)}></calcite-icon>`,b=o.qy`<span class=${(0,l.CP)("content")} ${(0,r.K)(this.contentEl)}><slot></slot></span>`;return(0,d.I)({disabled:this.disabled,children:c.qy`<${e} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:(0,u.g)(this)} aria-live=polite class=${(0,l.CP)({[z]:a,[E]:!a,[f]:this.hasContent,[y]:!this.iconStart,[w]:!this.iconEnd})} .disabled=${"button"===t?this.disabled:null} download=${("a"===t?!0===this.download||""===this.download?"":this.download||null:null)??o.s6} href=${("a"===t&&this.href)??o.s6} name=${("button"===t&&this.name)??o.s6} @click=${this.handleClick} rel=${("a"===t&&this.rel)??o.s6} tabindex=${(this.disabled?-1:null)??o.s6} target=${("a"===t&&this.target)??o.s6} title=${this.tooltipText??o.s6} type=${("button"===t?this.type:null)??o.s6} ${(0,r.K)(this.setChildEl)}>${n}${this.iconStart?i:null}${this.hasContent?b:null}${this.iconEnd?s:null}</${e}>`})}}(0,a.c)("calcite-button",$)},93174:(t,e,n)=>{n.d(e,{a:()=>y,b:()=>c,c:()=>h,d:()=>v,g:()=>f,l:()=>r});var a=n(79e3);const o="calciteInternalLabelClick",r="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",l="calcite-label",i=new WeakMap,s=new WeakMap,d=new WeakMap,u=new WeakMap,b=new Set,p=t=>{const{id:e}=t,n=e&&(0,a.q)(t,{selector:`${l}[for="${e}"]`});if(n)return n;const o=(0,a.l)(t,l);return!o||function(t,e){let n;const a="custom-element-ancestor-check",o=a=>{a.stopImmediatePropagation();const o=a.composedPath();n=o.slice(o.indexOf(e),o.indexOf(t))};t.addEventListener(a,o,{once:!0}),e.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),t.removeEventListener(a,o);return n.filter(n=>n!==e&&n!==t).filter(t=>t.tagName?.includes("-")).length>0}(o,t)?null:o};function h(t){if(!t)return;const e=p(t.el);if(s.has(e)&&e===t.labelEl||!e&&b.has(t))return;const n=x.bind(t);if(e){t.labelEl=e;const a=i.get(e)||[];a.push(t),i.set(e,a.sort(g)),s.has(t.labelEl)||(s.set(t.labelEl,k),t.labelEl.addEventListener(o,k)),b.delete(t),document.removeEventListener(r,d.get(t)),u.set(t,n),document.addEventListener(c,n)}else b.has(t)||(n(),document.removeEventListener(c,u.get(t)))}function v(t){if(!t)return;if(b.delete(t),document.removeEventListener(r,d.get(t)),document.removeEventListener(c,u.get(t)),d.delete(t),u.delete(t),!t.labelEl)return;const e=i.get(t.labelEl);1===e.length&&(t.labelEl.removeEventListener(o,s.get(t.labelEl)),s.delete(t.labelEl)),i.set(t.labelEl,e.filter(e=>e!==t).sort(g)),t.labelEl=null}function g(t,e){return(0,a.m)(t.el,e.el)?-1:1}function f(t){return t.label||t.labelEl?.textContent?.trim()||""}function k(t){const e=t.detail.sourceEvent.target,n=i.get(this),a=n.find(t=>t.el===e);if(n.includes(a))return;const o=n[0];o.disabled||o.onLabelClick(t)}function m(){b.has(this)&&h(this)}function x(){b.add(this);const t=d.get(this)||m.bind(this);d.set(this,t),document.addEventListener(r,t)}async function y(t){if(await t.componentOnReady(),i.has(t))return;const e=t.ownerDocument?.getElementById(t.for);e&&requestAnimationFrame(()=>{for(const t of b)if(t.el===e){h(t);break}})}}}]);
1
+ /*! For license information please see d66cdb9bb494da19696b.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5455],{37836:(t,e,n)=>{n.r(e),n.d(e,{Button:()=>$}),n(30357),n(32239);var a=n(34088),o=n(46337),r=n(48015),c=n(52567),l=n(17899),i=n(50941),s=n(21796),d=n(60992),u=n(93174),b=n(4643),p=n(83623),h=n(75572),v=n(79e3),g=n(20307);const f="content--slotted",k="icon",m="icon--start",x="icon--end",y="icon-start-empty",w="icon-end-empty",z="button-padding",E="button-padding--shrunk",C=o.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill]) button:hover,:host([appearance=outline-fill]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([appearance=outline-fill]) button:active,:host([appearance=outline-fill]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]) button:hover,:host([appearance=solid][kind=neutral]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-border-3)}:host([appearance=solid][kind=neutral]) button:active,:host([appearance=solid][kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-border-2)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline]) button:hover,:host([appearance=outline]) a:hover{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=outline]) button:active,:host([appearance=outline]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]) button,:host([appearance=transparent]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=transparent]) button:hover,:host([appearance=transparent]) button:focus,:host([appearance=transparent]) a:hover,:host([appearance=transparent]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-transparent-hover)}:host([appearance=transparent]) button:active,:host([appearance=transparent]) a:active{--calcite-internal-button-background-color: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:hover{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button:hover,:host([appearance=transparent][kind=inverse]) a:hover{background-color:var(--calcite-color-transparent-inverse-hover)}:host([appearance=transparent][kind=inverse]) button:active,:host([appearance=transparent][kind=inverse]) a:active{background-color:var(--calcite-color-transparent-inverse-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`;class $ extends l.WF{constructor(){super(...arguments),this.attributeWatch=(0,i.oW)(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentEl=(0,r._)(),this.mutationObserver=(0,b.c)("mutation",()=>this.updateHasContent()),this.resizeObserver=(0,b.c)("resize",()=>this.setTooltipText()),this.focusSetter=(0,g.u)()(this),this.messages=(0,h.u)(),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:l.pf},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=C}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),(0,u.c)(this),this.formEl=(0,s.f)(this)}async load(){o.S$||this.updateHasContent()}updated(){(0,d.u)(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),(0,u.d)(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=(0,v.C)(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){const{type:t}=this;this.href||("submit"===t?(0,s.s)(this):"reset"===t&&(0,s.r)(this))}setTooltipText(){const{contentEl:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){this.childEl=t,t&&this.resizeObserver?.observe(t)}render(){const t=this.href?"a":"button",e=this.href?c.eu`a`:c.eu`button`,n=this.loading?o.qy`<div class=${(0,l.CP)("calcite-button--loader")}><calcite-loader class=${(0,l.CP)(this.loading?"loading-in":"loading-out")} inline .label=${this.messages.loading} .scale=${"l"===this.scale?"m":"s"}></calcite-loader></div>`:null,a=!this.iconStart&&!this.iconEnd,i=o.qy`<calcite-icon class=${(0,l.CP)({[k]:!0,[m]:!0})} .flipRtl=${"start"===this.iconFlipRtl||"both"===this.iconFlipRtl} .icon=${this.iconStart} .scale=${(0,p.g)(this.scale)}></calcite-icon>`,s=o.qy`<calcite-icon class=${(0,l.CP)({[k]:!0,[x]:!0})} .flipRtl=${"end"===this.iconFlipRtl||"both"===this.iconFlipRtl} .icon=${this.iconEnd} .scale=${(0,p.g)(this.scale)}></calcite-icon>`,b=o.qy`<span class=${(0,l.CP)("content")} ${(0,r.K)(this.contentEl)}><slot></slot></span>`;return(0,d.I)({disabled:this.disabled,children:c.qy`<${e} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:(0,u.g)(this)} aria-live=polite class=${(0,l.CP)({[z]:a,[E]:!a,[f]:this.hasContent,[y]:!this.iconStart,[w]:!this.iconEnd})} .disabled=${"button"===t?this.disabled:null} download=${("a"===t?!0===this.download||""===this.download?"":this.download||null:null)??o.s6} href=${("a"===t&&this.href)??o.s6} name=${("button"===t&&this.name)??o.s6} @click=${this.handleClick} rel=${("a"===t&&this.rel)??o.s6} tabindex=${(this.disabled?-1:null)??o.s6} target=${("a"===t&&this.target)??o.s6} title=${this.tooltipText??o.s6} type=${("button"===t?this.type:null)??o.s6} ${(0,r.K)(this.setChildEl)}>${n}${this.iconStart?i:null}${this.hasContent?b:null}${this.iconEnd?s:null}</${e}>`})}}(0,a.c)("calcite-button",$)},93174:(t,e,n)=>{n.d(e,{a:()=>y,b:()=>c,c:()=>h,d:()=>v,g:()=>f,l:()=>r});var a=n(79e3);const o="calciteInternalLabelClick",r="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",l="calcite-label",i=new WeakMap,s=new WeakMap,d=new WeakMap,u=new WeakMap,b=new Set,p=t=>{const{id:e}=t,n=e&&(0,a.q)(t,{selector:`${l}[for="${e}"]`});if(n)return n;const o=(0,a.l)(t,l);return!o||function(t,e){let n;const a="custom-element-ancestor-check",o=a=>{a.stopImmediatePropagation();const o=a.composedPath();n=o.slice(o.indexOf(e),o.indexOf(t))};t.addEventListener(a,o,{once:!0}),e.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),t.removeEventListener(a,o);return n.filter(n=>n!==e&&n!==t).filter(t=>t.tagName?.includes("-")).length>0}(o,t)?null:o};function h(t){if(!t)return;const e=p(t.el);if(s.has(e)&&e===t.labelEl||!e&&b.has(t))return;const n=x.bind(t);if(e){t.labelEl=e;const a=i.get(e)||[];a.push(t),i.set(e,a.sort(g)),s.has(t.labelEl)||(s.set(t.labelEl,k),t.labelEl.addEventListener(o,k)),b.delete(t),document.removeEventListener(r,d.get(t)),u.set(t,n),document.addEventListener(c,n)}else b.has(t)||(n(),document.removeEventListener(c,u.get(t)))}function v(t){if(!t)return;if(b.delete(t),document.removeEventListener(r,d.get(t)),document.removeEventListener(c,u.get(t)),d.delete(t),u.delete(t),!t.labelEl)return;const e=i.get(t.labelEl);1===e.length&&(t.labelEl.removeEventListener(o,s.get(t.labelEl)),s.delete(t.labelEl)),i.set(t.labelEl,e.filter(e=>e!==t).sort(g)),t.labelEl=null}function g(t,e){return(0,a.m)(t.el,e.el)?-1:1}function f(t){return t.label||t.labelEl?.textContent?.trim()||""}function k(t){const e=t.detail.sourceEvent.target,n=i.get(this),a=n.find(t=>t.el===e);if(n.includes(a))return;const o=n[0];o.disabled||o.onLabelClick(t)}function m(){b.has(this)&&h(this)}function x(){b.add(this);const t=d.get(this)||m.bind(this);d.set(this,t),document.addEventListener(r,t)}async function y(t){if(await t.componentOnReady(),i.has(t))return;const e=t.ownerDocument?.getElementById(t.for);e&&requestAnimationFrame(()=>{for(const t of b)if(t.el===e){h(t);break}})}}}]);
@@ -1,3 +1,3 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v3.3.0-next.95 */
3
+ v3.3.0-next.96 */